diff --git a/generation_config.yaml b/generation_config.yaml index 0b5a6a8a8211..4d9ef8c95fe3 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -1,6 +1,6 @@ gapic_generator_version: 2.38.1 protobuf_version: '25.2' -googleapis_commitish: 0acc64cb759eb3a11c2230d42f24f1a35f81b178 +googleapis_commitish: 5db2bbe911db5a01c6a7564f78e84f8116de91d3 owlbot_cli_image: sha256:623647ee79ac605858d09e60c1382a716c125fb776f69301b72de1cd35d49409 synthtool_commitish: 6612ab8f3afcd5e292aecd647f0fa68812c9f5b5 template_excludes: diff --git a/java-accessapproval/README.md b/java-accessapproval/README.md index bbaaa89cad99..52131c62538b 100644 --- a/java-accessapproval/README.md +++ b/java-accessapproval/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.34.0 + 26.37.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-accessapproval.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-accessapproval/2.39.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-accessapproval/2.42.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-accesscontextmanager/README.md b/java-accesscontextmanager/README.md index 25c17755219d..2d15fdff67af 100644 --- a/java-accesscontextmanager/README.md +++ b/java-accesscontextmanager/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.34.0 + 26.37.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-identity-accesscontextmanager.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-identity-accesscontextmanager/1.39.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-identity-accesscontextmanager/1.42.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-advisorynotifications/README.md b/java-advisorynotifications/README.md index 68e1c1374ae3..90dc8d86d464 100644 --- a/java-advisorynotifications/README.md +++ b/java-advisorynotifications/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -201,7 +201,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-advisorynotifications.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-advisorynotifications/0.27.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-advisorynotifications/0.30.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-advisorynotifications/google-cloud-advisorynotifications/src/main/java/com/google/cloud/advisorynotifications/v1/AdvisoryNotificationsServiceClient.java b/java-advisorynotifications/google-cloud-advisorynotifications/src/main/java/com/google/cloud/advisorynotifications/v1/AdvisoryNotificationsServiceClient.java index ad9cd85f8328..eff4f4341737 100644 --- a/java-advisorynotifications/google-cloud-advisorynotifications/src/main/java/com/google/cloud/advisorynotifications/v1/AdvisoryNotificationsServiceClient.java +++ b/java-advisorynotifications/google-cloud-advisorynotifications/src/main/java/com/google/cloud/advisorynotifications/v1/AdvisoryNotificationsServiceClient.java @@ -277,7 +277,7 @@ public AdvisoryNotificationsServiceStub getStub() { * * @param parent Required. The parent, which owns this collection of notifications. Must be of the * form "organizations/{organization}/locations/{location}" or - * "projects/{project}/locations/{location}" + * "projects/{project}/locations/{location}". * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListNotificationsPagedResponse listNotifications(LocationName parent) { @@ -313,7 +313,7 @@ public final ListNotificationsPagedResponse listNotifications(LocationName paren * * @param parent Required. The parent, which owns this collection of notifications. Must be of the * form "organizations/{organization}/locations/{location}" or - * "projects/{project}/locations/{location}" + * "projects/{project}/locations/{location}". * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListNotificationsPagedResponse listNotifications(String parent) { @@ -587,13 +587,14 @@ public final UnaryCallable getNotification * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AdvisoryNotificationsServiceClient advisoryNotificationsServiceClient = * AdvisoryNotificationsServiceClient.create()) { - * SettingsName name = SettingsName.of("[ORGANIZATION]", "[LOCATION]"); + * SettingsName name = SettingsName.ofOrganizationLocationName("[ORGANIZATION]", "[LOCATION]"); * Settings response = advisoryNotificationsServiceClient.getSettings(name); * } * } * * @param name Required. The resource name of the settings to retrieve. Format: - * organizations/{organization}/locations/{location}/settings. + * organizations/{organization}/locations/{location}/settings or + * projects/{projects}/locations/{location}/settings. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Settings getSettings(SettingsName name) { @@ -616,13 +617,15 @@ public final Settings getSettings(SettingsName name) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AdvisoryNotificationsServiceClient advisoryNotificationsServiceClient = * AdvisoryNotificationsServiceClient.create()) { - * String name = SettingsName.of("[ORGANIZATION]", "[LOCATION]").toString(); + * String name = + * SettingsName.ofOrganizationLocationName("[ORGANIZATION]", "[LOCATION]").toString(); * Settings response = advisoryNotificationsServiceClient.getSettings(name); * } * } * * @param name Required. The resource name of the settings to retrieve. Format: - * organizations/{organization}/locations/{location}/settings. + * organizations/{organization}/locations/{location}/settings or + * projects/{projects}/locations/{location}/settings. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Settings getSettings(String name) { @@ -646,7 +649,9 @@ public final Settings getSettings(String name) { * AdvisoryNotificationsServiceClient.create()) { * GetSettingsRequest request = * GetSettingsRequest.newBuilder() - * .setName(SettingsName.of("[ORGANIZATION]", "[LOCATION]").toString()) + * .setName( + * SettingsName.ofOrganizationLocationName("[ORGANIZATION]", "[LOCATION]") + * .toString()) * .build(); * Settings response = advisoryNotificationsServiceClient.getSettings(request); * } @@ -675,7 +680,9 @@ public final Settings getSettings(GetSettingsRequest request) { * AdvisoryNotificationsServiceClient.create()) { * GetSettingsRequest request = * GetSettingsRequest.newBuilder() - * .setName(SettingsName.of("[ORGANIZATION]", "[LOCATION]").toString()) + * .setName( + * SettingsName.ofOrganizationLocationName("[ORGANIZATION]", "[LOCATION]") + * .toString()) * .build(); * ApiFuture future = * advisoryNotificationsServiceClient.getSettingsCallable().futureCall(request); diff --git a/java-advisorynotifications/google-cloud-advisorynotifications/src/main/java/com/google/cloud/advisorynotifications/v1/stub/HttpJsonAdvisoryNotificationsServiceStub.java b/java-advisorynotifications/google-cloud-advisorynotifications/src/main/java/com/google/cloud/advisorynotifications/v1/stub/HttpJsonAdvisoryNotificationsServiceStub.java index 86c137f57294..4875223ab6cb 100644 --- a/java-advisorynotifications/google-cloud-advisorynotifications/src/main/java/com/google/cloud/advisorynotifications/v1/stub/HttpJsonAdvisoryNotificationsServiceStub.java +++ b/java-advisorynotifications/google-cloud-advisorynotifications/src/main/java/com/google/cloud/advisorynotifications/v1/stub/HttpJsonAdvisoryNotificationsServiceStub.java @@ -153,6 +153,7 @@ public class HttpJsonAdvisoryNotificationsServiceStub extends AdvisoryNotificati serializer.putPathParam(fields, "name", request.getName()); return fields; }) + .setAdditionalPaths("/v1/{name=projects/*/locations/*/settings}") .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); @@ -189,6 +190,7 @@ public class HttpJsonAdvisoryNotificationsServiceStub extends AdvisoryNotificati fields, "settings.name", request.getSettings().getName()); return fields; }) + .setAdditionalPaths("/v1/{settings.name=projects/*/locations/*/settings}") .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); diff --git a/java-advisorynotifications/google-cloud-advisorynotifications/src/test/java/com/google/cloud/advisorynotifications/v1/AdvisoryNotificationsServiceClientHttpJsonTest.java b/java-advisorynotifications/google-cloud-advisorynotifications/src/test/java/com/google/cloud/advisorynotifications/v1/AdvisoryNotificationsServiceClientHttpJsonTest.java index f769ca153317..7f0f124b3f95 100644 --- a/java-advisorynotifications/google-cloud-advisorynotifications/src/test/java/com/google/cloud/advisorynotifications/v1/AdvisoryNotificationsServiceClientHttpJsonTest.java +++ b/java-advisorynotifications/google-cloud-advisorynotifications/src/test/java/com/google/cloud/advisorynotifications/v1/AdvisoryNotificationsServiceClientHttpJsonTest.java @@ -290,13 +290,14 @@ public void getNotificationExceptionTest2() throws Exception { public void getSettingsTest() throws Exception { Settings expectedResponse = Settings.newBuilder() - .setName(SettingsName.of("[ORGANIZATION]", "[LOCATION]").toString()) + .setName( + SettingsName.ofOrganizationLocationName("[ORGANIZATION]", "[LOCATION]").toString()) .putAllNotificationSettings(new HashMap()) .setEtag("etag3123477") .build(); mockService.addResponse(expectedResponse); - SettingsName name = SettingsName.of("[ORGANIZATION]", "[LOCATION]"); + SettingsName name = SettingsName.ofOrganizationLocationName("[ORGANIZATION]", "[LOCATION]"); Settings actualResponse = client.getSettings(name); Assert.assertEquals(expectedResponse, actualResponse); @@ -324,7 +325,7 @@ public void getSettingsExceptionTest() throws Exception { mockService.addException(exception); try { - SettingsName name = SettingsName.of("[ORGANIZATION]", "[LOCATION]"); + SettingsName name = SettingsName.ofOrganizationLocationName("[ORGANIZATION]", "[LOCATION]"); client.getSettings(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { @@ -336,7 +337,8 @@ public void getSettingsExceptionTest() throws Exception { public void getSettingsTest2() throws Exception { Settings expectedResponse = Settings.newBuilder() - .setName(SettingsName.of("[ORGANIZATION]", "[LOCATION]").toString()) + .setName( + SettingsName.ofOrganizationLocationName("[ORGANIZATION]", "[LOCATION]").toString()) .putAllNotificationSettings(new HashMap()) .setEtag("etag3123477") .build(); @@ -382,7 +384,8 @@ public void getSettingsExceptionTest2() throws Exception { public void updateSettingsTest() throws Exception { Settings expectedResponse = Settings.newBuilder() - .setName(SettingsName.of("[ORGANIZATION]", "[LOCATION]").toString()) + .setName( + SettingsName.ofOrganizationLocationName("[ORGANIZATION]", "[LOCATION]").toString()) .putAllNotificationSettings(new HashMap()) .setEtag("etag3123477") .build(); @@ -390,7 +393,8 @@ public void updateSettingsTest() throws Exception { Settings settings = Settings.newBuilder() - .setName(SettingsName.of("[ORGANIZATION]", "[LOCATION]").toString()) + .setName( + SettingsName.ofOrganizationLocationName("[ORGANIZATION]", "[LOCATION]").toString()) .putAllNotificationSettings(new HashMap()) .setEtag("etag3123477") .build(); @@ -423,7 +427,9 @@ public void updateSettingsExceptionTest() throws Exception { try { Settings settings = Settings.newBuilder() - .setName(SettingsName.of("[ORGANIZATION]", "[LOCATION]").toString()) + .setName( + SettingsName.ofOrganizationLocationName("[ORGANIZATION]", "[LOCATION]") + .toString()) .putAllNotificationSettings(new HashMap()) .setEtag("etag3123477") .build(); diff --git a/java-advisorynotifications/google-cloud-advisorynotifications/src/test/java/com/google/cloud/advisorynotifications/v1/AdvisoryNotificationsServiceClientTest.java b/java-advisorynotifications/google-cloud-advisorynotifications/src/test/java/com/google/cloud/advisorynotifications/v1/AdvisoryNotificationsServiceClientTest.java index 70efe2ad1f48..9d14cd7f08ba 100644 --- a/java-advisorynotifications/google-cloud-advisorynotifications/src/test/java/com/google/cloud/advisorynotifications/v1/AdvisoryNotificationsServiceClientTest.java +++ b/java-advisorynotifications/google-cloud-advisorynotifications/src/test/java/com/google/cloud/advisorynotifications/v1/AdvisoryNotificationsServiceClientTest.java @@ -268,13 +268,14 @@ public void getNotificationExceptionTest2() throws Exception { public void getSettingsTest() throws Exception { Settings expectedResponse = Settings.newBuilder() - .setName(SettingsName.of("[ORGANIZATION]", "[LOCATION]").toString()) + .setName( + SettingsName.ofOrganizationLocationName("[ORGANIZATION]", "[LOCATION]").toString()) .putAllNotificationSettings(new HashMap()) .setEtag("etag3123477") .build(); mockAdvisoryNotificationsService.addResponse(expectedResponse); - SettingsName name = SettingsName.of("[ORGANIZATION]", "[LOCATION]"); + SettingsName name = SettingsName.ofOrganizationLocationName("[ORGANIZATION]", "[LOCATION]"); Settings actualResponse = client.getSettings(name); Assert.assertEquals(expectedResponse, actualResponse); @@ -296,7 +297,7 @@ public void getSettingsExceptionTest() throws Exception { mockAdvisoryNotificationsService.addException(exception); try { - SettingsName name = SettingsName.of("[ORGANIZATION]", "[LOCATION]"); + SettingsName name = SettingsName.ofOrganizationLocationName("[ORGANIZATION]", "[LOCATION]"); client.getSettings(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { @@ -308,7 +309,8 @@ public void getSettingsExceptionTest() throws Exception { public void getSettingsTest2() throws Exception { Settings expectedResponse = Settings.newBuilder() - .setName(SettingsName.of("[ORGANIZATION]", "[LOCATION]").toString()) + .setName( + SettingsName.ofOrganizationLocationName("[ORGANIZATION]", "[LOCATION]").toString()) .putAllNotificationSettings(new HashMap()) .setEtag("etag3123477") .build(); @@ -348,7 +350,8 @@ public void getSettingsExceptionTest2() throws Exception { public void updateSettingsTest() throws Exception { Settings expectedResponse = Settings.newBuilder() - .setName(SettingsName.of("[ORGANIZATION]", "[LOCATION]").toString()) + .setName( + SettingsName.ofOrganizationLocationName("[ORGANIZATION]", "[LOCATION]").toString()) .putAllNotificationSettings(new HashMap()) .setEtag("etag3123477") .build(); diff --git a/java-advisorynotifications/proto-google-cloud-advisorynotifications-v1/src/main/java/com/google/cloud/advisorynotifications/v1/GetSettingsRequest.java b/java-advisorynotifications/proto-google-cloud-advisorynotifications-v1/src/main/java/com/google/cloud/advisorynotifications/v1/GetSettingsRequest.java index dccec75148b9..225963fb9087 100644 --- a/java-advisorynotifications/proto-google-cloud-advisorynotifications-v1/src/main/java/com/google/cloud/advisorynotifications/v1/GetSettingsRequest.java +++ b/java-advisorynotifications/proto-google-cloud-advisorynotifications-v1/src/main/java/com/google/cloud/advisorynotifications/v1/GetSettingsRequest.java @@ -73,7 +73,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { *
    * Required. The resource name of the settings to retrieve.
    * Format:
-   * organizations/{organization}/locations/{location}/settings.
+   * organizations/{organization}/locations/{location}/settings or
+   * projects/{projects}/locations/{location}/settings.
    * 
* * @@ -100,7 +101,8 @@ public java.lang.String getName() { *
    * Required. The resource name of the settings to retrieve.
    * Format:
-   * organizations/{organization}/locations/{location}/settings.
+   * organizations/{organization}/locations/{location}/settings or
+   * projects/{projects}/locations/{location}/settings.
    * 
* * @@ -475,7 +477,8 @@ public Builder mergeFrom( *
      * Required. The resource name of the settings to retrieve.
      * Format:
-     * organizations/{organization}/locations/{location}/settings.
+     * organizations/{organization}/locations/{location}/settings or
+     * projects/{projects}/locations/{location}/settings.
      * 
* * @@ -501,7 +504,8 @@ public java.lang.String getName() { *
      * Required. The resource name of the settings to retrieve.
      * Format:
-     * organizations/{organization}/locations/{location}/settings.
+     * organizations/{organization}/locations/{location}/settings or
+     * projects/{projects}/locations/{location}/settings.
      * 
* * @@ -527,7 +531,8 @@ public com.google.protobuf.ByteString getNameBytes() { *
      * Required. The resource name of the settings to retrieve.
      * Format:
-     * organizations/{organization}/locations/{location}/settings.
+     * organizations/{organization}/locations/{location}/settings or
+     * projects/{projects}/locations/{location}/settings.
      * 
* * @@ -552,7 +557,8 @@ public Builder setName(java.lang.String value) { *
      * Required. The resource name of the settings to retrieve.
      * Format:
-     * organizations/{organization}/locations/{location}/settings.
+     * organizations/{organization}/locations/{location}/settings or
+     * projects/{projects}/locations/{location}/settings.
      * 
* * @@ -573,7 +579,8 @@ public Builder clearName() { *
      * Required. The resource name of the settings to retrieve.
      * Format:
-     * organizations/{organization}/locations/{location}/settings.
+     * organizations/{organization}/locations/{location}/settings or
+     * projects/{projects}/locations/{location}/settings.
      * 
* * diff --git a/java-advisorynotifications/proto-google-cloud-advisorynotifications-v1/src/main/java/com/google/cloud/advisorynotifications/v1/GetSettingsRequestOrBuilder.java b/java-advisorynotifications/proto-google-cloud-advisorynotifications-v1/src/main/java/com/google/cloud/advisorynotifications/v1/GetSettingsRequestOrBuilder.java index 7172be58d9e8..065466680e26 100644 --- a/java-advisorynotifications/proto-google-cloud-advisorynotifications-v1/src/main/java/com/google/cloud/advisorynotifications/v1/GetSettingsRequestOrBuilder.java +++ b/java-advisorynotifications/proto-google-cloud-advisorynotifications-v1/src/main/java/com/google/cloud/advisorynotifications/v1/GetSettingsRequestOrBuilder.java @@ -30,7 +30,8 @@ public interface GetSettingsRequestOrBuilder *
    * Required. The resource name of the settings to retrieve.
    * Format:
-   * organizations/{organization}/locations/{location}/settings.
+   * organizations/{organization}/locations/{location}/settings or
+   * projects/{projects}/locations/{location}/settings.
    * 
* * @@ -46,7 +47,8 @@ public interface GetSettingsRequestOrBuilder *
    * Required. The resource name of the settings to retrieve.
    * Format:
-   * organizations/{organization}/locations/{location}/settings.
+   * organizations/{organization}/locations/{location}/settings or
+   * projects/{projects}/locations/{location}/settings.
    * 
* * diff --git a/java-advisorynotifications/proto-google-cloud-advisorynotifications-v1/src/main/java/com/google/cloud/advisorynotifications/v1/ListNotificationsRequest.java b/java-advisorynotifications/proto-google-cloud-advisorynotifications-v1/src/main/java/com/google/cloud/advisorynotifications/v1/ListNotificationsRequest.java index 98033c294aed..d5d986fa7185 100644 --- a/java-advisorynotifications/proto-google-cloud-advisorynotifications-v1/src/main/java/com/google/cloud/advisorynotifications/v1/ListNotificationsRequest.java +++ b/java-advisorynotifications/proto-google-cloud-advisorynotifications-v1/src/main/java/com/google/cloud/advisorynotifications/v1/ListNotificationsRequest.java @@ -76,7 +76,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { *
    * Required. The parent, which owns this collection of notifications.
    * Must be of the form "organizations/{organization}/locations/{location}"
-   * or "projects/{project}/locations/{location}"
+   * or "projects/{project}/locations/{location}".
    * 
* * @@ -103,7 +103,7 @@ public java.lang.String getParent() { *
    * Required. The parent, which owns this collection of notifications.
    * Must be of the form "organizations/{organization}/locations/{location}"
-   * or "projects/{project}/locations/{location}"
+   * or "projects/{project}/locations/{location}".
    * 
* * @@ -753,7 +753,7 @@ public Builder mergeFrom( *
      * Required. The parent, which owns this collection of notifications.
      * Must be of the form "organizations/{organization}/locations/{location}"
-     * or "projects/{project}/locations/{location}"
+     * or "projects/{project}/locations/{location}".
      * 
* * @@ -779,7 +779,7 @@ public java.lang.String getParent() { *
      * Required. The parent, which owns this collection of notifications.
      * Must be of the form "organizations/{organization}/locations/{location}"
-     * or "projects/{project}/locations/{location}"
+     * or "projects/{project}/locations/{location}".
      * 
* * @@ -805,7 +805,7 @@ public com.google.protobuf.ByteString getParentBytes() { *
      * Required. The parent, which owns this collection of notifications.
      * Must be of the form "organizations/{organization}/locations/{location}"
-     * or "projects/{project}/locations/{location}"
+     * or "projects/{project}/locations/{location}".
      * 
* * @@ -830,7 +830,7 @@ public Builder setParent(java.lang.String value) { *
      * Required. The parent, which owns this collection of notifications.
      * Must be of the form "organizations/{organization}/locations/{location}"
-     * or "projects/{project}/locations/{location}"
+     * or "projects/{project}/locations/{location}".
      * 
* * @@ -851,7 +851,7 @@ public Builder clearParent() { *
      * Required. The parent, which owns this collection of notifications.
      * Must be of the form "organizations/{organization}/locations/{location}"
-     * or "projects/{project}/locations/{location}"
+     * or "projects/{project}/locations/{location}".
      * 
* * diff --git a/java-advisorynotifications/proto-google-cloud-advisorynotifications-v1/src/main/java/com/google/cloud/advisorynotifications/v1/ListNotificationsRequestOrBuilder.java b/java-advisorynotifications/proto-google-cloud-advisorynotifications-v1/src/main/java/com/google/cloud/advisorynotifications/v1/ListNotificationsRequestOrBuilder.java index 14674ddf6786..0466c0afafa6 100644 --- a/java-advisorynotifications/proto-google-cloud-advisorynotifications-v1/src/main/java/com/google/cloud/advisorynotifications/v1/ListNotificationsRequestOrBuilder.java +++ b/java-advisorynotifications/proto-google-cloud-advisorynotifications-v1/src/main/java/com/google/cloud/advisorynotifications/v1/ListNotificationsRequestOrBuilder.java @@ -30,7 +30,7 @@ public interface ListNotificationsRequestOrBuilder *
    * Required. The parent, which owns this collection of notifications.
    * Must be of the form "organizations/{organization}/locations/{location}"
-   * or "projects/{project}/locations/{location}"
+   * or "projects/{project}/locations/{location}".
    * 
* * @@ -46,7 +46,7 @@ public interface ListNotificationsRequestOrBuilder *
    * Required. The parent, which owns this collection of notifications.
    * Must be of the form "organizations/{organization}/locations/{location}"
-   * or "projects/{project}/locations/{location}"
+   * or "projects/{project}/locations/{location}".
    * 
* * diff --git a/java-advisorynotifications/proto-google-cloud-advisorynotifications-v1/src/main/java/com/google/cloud/advisorynotifications/v1/ServiceProto.java b/java-advisorynotifications/proto-google-cloud-advisorynotifications-v1/src/main/java/com/google/cloud/advisorynotifications/v1/ServiceProto.java index 74252e6e1ddc..dac1ed6e7b1d 100644 --- a/java-advisorynotifications/proto-google-cloud-advisorynotifications-v1/src/main/java/com/google/cloud/advisorynotifications/v1/ServiceProto.java +++ b/java-advisorynotifications/proto-google-cloud-advisorynotifications-v1/src/main/java/com/google/cloud/advisorynotifications/v1/ServiceProto.java @@ -152,71 +152,76 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\026GetNotificationRequest\022G\n\004name\030\001 \001(\tB9\340" + "A\002\372A3\n1advisorynotifications.googleapis." + "com/Notification\022\025\n\rlanguage_code\030\005 \001(\t\"" - + "\211\003\n\010Settings\022\021\n\004name\030\001 \001(\tB\003\340A\003\022m\n\025notif" + + "\321\003\n\010Settings\022\021\n\004name\030\001 \001(\tB\003\340A\010\022m\n\025notif" + "ication_settings\030\002 \003(\0132I.google.cloud.ad" + "visorynotifications.v1.Settings.Notifica" + "tionSettingsEntryB\003\340A\002\022\021\n\004etag\030\003 \001(\tB\003\340A" + "\002\032x\n\031NotificationSettingsEntry\022\013\n\003key\030\001 " + "\001(\t\022J\n\005value\030\002 \001(\0132;.google.cloud.adviso" + "rynotifications.v1.NotificationSettings:" - + "\0028\001:n\352Ak\n-advisorynotifications.googleap" - + "is.com/Settings\022:organizations/{organiza" - + "tion}/locations/{location}/settings\"\'\n\024N" - + "otificationSettings\022\017\n\007enabled\030\001 \001(\010\"Y\n\022" - + "GetSettingsRequest\022C\n\004name\030\001 \001(\tB5\340A\002\372A/" - + "\n-advisorynotifications.googleapis.com/S" - + "ettings\"_\n\025UpdateSettingsRequest\022F\n\010sett" - + "ings\030\001 \001(\0132/.google.cloud.advisorynotifi" - + "cations.v1.SettingsB\003\340A\002*J\n\020Notification" - + "View\022!\n\035NOTIFICATION_VIEW_UNSPECIFIED\020\000\022" - + "\t\n\005BASIC\020\001\022\010\n\004FULL\020\002*\240\001\n\021LocalizationSta" - + "te\022\"\n\036LOCALIZATION_STATE_UNSPECIFIED\020\000\022%" - + "\n!LOCALIZATION_STATE_NOT_APPLICABLE\020\001\022\036\n" - + "\032LOCALIZATION_STATE_PENDING\020\002\022 \n\034LOCALIZ" - + "ATION_STATE_COMPLETED\020\003*\332\001\n\020Notification" - + "Type\022!\n\035NOTIFICATION_TYPE_UNSPECIFIED\020\000\022" - + "/\n+NOTIFICATION_TYPE_SECURITY_PRIVACY_AD" - + "VISORY\020\001\022\'\n#NOTIFICATION_TYPE_SENSITIVE_" - + "ACTIONS\020\002\022\"\n\036NOTIFICATION_TYPE_SECURITY_" - + "MSA\020\003\022%\n!NOTIFICATION_TYPE_THREAT_HORIZO" - + "NS\020\0042\250\010\n\034AdvisoryNotificationsService\022\224\002" - + "\n\021ListNotifications\022?.google.cloud.advis" - + "orynotifications.v1.ListNotificationsReq" - + "uest\032@.google.cloud.advisorynotification" - + "s.v1.ListNotificationsResponse\"|\332A\006paren" - + "t\202\323\344\223\002m\0226/v1/{parent=organizations/*/loc" - + "ations/*}/notificationsZ3\0221/v1/{parent=p" - + "rojects/*/locations/*}/notifications\022\201\002\n" - + "\017GetNotification\022=.google.cloud.advisory" - + "notifications.v1.GetNotificationRequest\032" - + "3.google.cloud.advisorynotifications.v1." - + "Notification\"z\332A\004name\202\323\344\223\002m\0226/v1/{name=o" - + "rganizations/*/locations/*/notifications" - + "/*}Z3\0221/v1/{name=projects/*/locations/*/" - + "notifications/*}\022\271\001\n\013GetSettings\0229.googl" - + "e.cloud.advisorynotifications.v1.GetSett" - + "ingsRequest\032/.google.cloud.advisorynotif" - + "ications.v1.Settings\">\332A\004name\202\323\344\223\0021\022//v1" - + "/{name=organizations/*/locations/*/setti" - + "ngs}\022\326\001\n\016UpdateSettings\022<.google.cloud.a" - + "dvisorynotifications.v1.UpdateSettingsRe" - + "quest\032/.google.cloud.advisorynotificatio" - + "ns.v1.Settings\"U\332A\010settings\202\323\344\223\002D28/v1/{" + + "\0028\001:\265\001\352A\261\001\n-advisorynotifications.google" + + "apis.com/Settings\022:organizations/{organi" + + "zation}/locations/{location}/settings\0220p" + + "rojects/{project}/locations/{location}/s" + + "ettings*\010settings2\010settings\"\'\n\024Notificat" + + "ionSettings\022\017\n\007enabled\030\001 \001(\010\"Y\n\022GetSetti" + + "ngsRequest\022C\n\004name\030\001 \001(\tB5\340A\002\372A/\n-adviso" + + "rynotifications.googleapis.com/Settings\"" + + "_\n\025UpdateSettingsRequest\022F\n\010settings\030\001 \001" + + "(\0132/.google.cloud.advisorynotifications." + + "v1.SettingsB\003\340A\002*J\n\020NotificationView\022!\n\035" + + "NOTIFICATION_VIEW_UNSPECIFIED\020\000\022\t\n\005BASIC" + + "\020\001\022\010\n\004FULL\020\002*\240\001\n\021LocalizationState\022\"\n\036LO" + + "CALIZATION_STATE_UNSPECIFIED\020\000\022%\n!LOCALI" + + "ZATION_STATE_NOT_APPLICABLE\020\001\022\036\n\032LOCALIZ" + + "ATION_STATE_PENDING\020\002\022 \n\034LOCALIZATION_ST" + + "ATE_COMPLETED\020\003*\332\001\n\020NotificationType\022!\n\035" + + "NOTIFICATION_TYPE_UNSPECIFIED\020\000\022/\n+NOTIF" + + "ICATION_TYPE_SECURITY_PRIVACY_ADVISORY\020\001" + + "\022\'\n#NOTIFICATION_TYPE_SENSITIVE_ACTIONS\020" + + "\002\022\"\n\036NOTIFICATION_TYPE_SECURITY_MSA\020\003\022%\n" + + "!NOTIFICATION_TYPE_THREAT_HORIZONS\020\0042\231\t\n" + + "\034AdvisoryNotificationsService\022\224\002\n\021ListNo" + + "tifications\022?.google.cloud.advisorynotif" + + "ications.v1.ListNotificationsRequest\032@.g" + + "oogle.cloud.advisorynotifications.v1.Lis" + + "tNotificationsResponse\"|\332A\006parent\202\323\344\223\002m\022" + + "6/v1/{parent=organizations/*/locations/*" + + "}/notificationsZ3\0221/v1/{parent=projects/" + + "*/locations/*}/notifications\022\201\002\n\017GetNoti" + + "fication\022=.google.cloud.advisorynotifica" + + "tions.v1.GetNotificationRequest\0323.google" + + ".cloud.advisorynotifications.v1.Notifica" + + "tion\"z\332A\004name\202\323\344\223\002m\0226/v1/{name=organizat" + + "ions/*/locations/*/notifications/*}Z3\0221/" + + "v1/{name=projects/*/locations/*/notifica" + + "tions/*}\022\347\001\n\013GetSettings\0229.google.cloud." + + "advisorynotifications.v1.GetSettingsRequ" + + "est\032/.google.cloud.advisorynotifications" + + ".v1.Settings\"l\332A\004name\202\323\344\223\002_\022//v1/{name=o" + + "rganizations/*/locations/*/settings}Z,\022*" + + "/v1/{name=projects/*/locations/*/setting" + + "s}\022\231\002\n\016UpdateSettings\022<.google.cloud.adv" + + "isorynotifications.v1.UpdateSettingsRequ" + + "est\032/.google.cloud.advisorynotifications" + + ".v1.Settings\"\227\001\332A\010settings\202\323\344\223\002\205\00128/v1/{" + "settings.name=organizations/*/locations/" - + "*/settings}:\010settings\032X\312A$advisorynotifi" - + "cations.googleapis.com\322A.https://www.goo" - + "gleapis.com/auth/cloud-platformB\246\003\n)com." - + "google.cloud.advisorynotifications.v1B\014S" - + "erviceProtoP\001Z_cloud.google.com/go/advis" - + "orynotifications/apiv1/advisorynotificat" - + "ionspb;advisorynotificationspb\252\002%Google." - + "Cloud.AdvisoryNotifications.V1\312\002%Google\\" - + "Cloud\\AdvisoryNotifications\\V1\352\002(Google:" - + ":Cloud::AdvisoryNotifications::V1\352A\213\001\n-a" - + "dvisorynotifications.googleapis.com/Loca" - + "tion\0221organizations/{organization}/locat" - + "ions/{location}\022\'projects/{project}/loca" - + "tions/{location}b\006proto3" + + "*/settings}:\010settingsZ?23/v1/{settings.n" + + "ame=projects/*/locations/*/settings}:\010se" + + "ttings\032X\312A$advisorynotifications.googlea" + + "pis.com\322A.https://www.googleapis.com/aut" + + "h/cloud-platformB\246\003\n)com.google.cloud.ad" + + "visorynotifications.v1B\014ServiceProtoP\001Z_" + + "cloud.google.com/go/advisorynotification" + + "s/apiv1/advisorynotificationspb;advisory" + + "notificationspb\252\002%Google.Cloud.AdvisoryN" + + "otifications.V1\312\002%Google\\Cloud\\AdvisoryN" + + "otifications\\V1\352\002(Google::Cloud::Advisor" + + "yNotifications::V1\352A\213\001\n-advisorynotifica" + + "tions.googleapis.com/Location\0221organizat" + + "ions/{organization}/locations/{location}" + + "\022\'projects/{project}/locations/{location" + + "}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/java-advisorynotifications/proto-google-cloud-advisorynotifications-v1/src/main/java/com/google/cloud/advisorynotifications/v1/Settings.java b/java-advisorynotifications/proto-google-cloud-advisorynotifications-v1/src/main/java/com/google/cloud/advisorynotifications/v1/Settings.java index a7550db643fc..d28eb581298d 100644 --- a/java-advisorynotifications/proto-google-cloud-advisorynotifications-v1/src/main/java/com/google/cloud/advisorynotifications/v1/Settings.java +++ b/java-advisorynotifications/proto-google-cloud-advisorynotifications-v1/src/main/java/com/google/cloud/advisorynotifications/v1/Settings.java @@ -84,12 +84,13 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldRefl * * *
-   * Output only. The resource name of the settings to retrieve.
+   * Identifier. The resource name of the settings to retrieve.
    * Format:
-   * organizations/{organization}/locations/{location}/settings.
+   * organizations/{organization}/locations/{location}/settings or
+   * projects/{projects}/locations/{location}/settings.
    * 
* - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @return The name. */ @@ -109,12 +110,13 @@ public java.lang.String getName() { * * *
-   * Output only. The resource name of the settings to retrieve.
+   * Identifier. The resource name of the settings to retrieve.
    * Format:
-   * organizations/{organization}/locations/{location}/settings.
+   * organizations/{organization}/locations/{location}/settings or
+   * projects/{projects}/locations/{location}/settings.
    * 
* - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @return The bytes for name. */ @@ -764,12 +766,13 @@ public Builder mergeFrom( * * *
-     * Output only. The resource name of the settings to retrieve.
+     * Identifier. The resource name of the settings to retrieve.
      * Format:
-     * organizations/{organization}/locations/{location}/settings.
+     * organizations/{organization}/locations/{location}/settings or
+     * projects/{projects}/locations/{location}/settings.
      * 
* - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @return The name. */ @@ -788,12 +791,13 @@ public java.lang.String getName() { * * *
-     * Output only. The resource name of the settings to retrieve.
+     * Identifier. The resource name of the settings to retrieve.
      * Format:
-     * organizations/{organization}/locations/{location}/settings.
+     * organizations/{organization}/locations/{location}/settings or
+     * projects/{projects}/locations/{location}/settings.
      * 
* - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @return The bytes for name. */ @@ -812,12 +816,13 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-     * Output only. The resource name of the settings to retrieve.
+     * Identifier. The resource name of the settings to retrieve.
      * Format:
-     * organizations/{organization}/locations/{location}/settings.
+     * organizations/{organization}/locations/{location}/settings or
+     * projects/{projects}/locations/{location}/settings.
      * 
* - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @param value The name to set. * @return This builder for chaining. @@ -835,12 +840,13 @@ public Builder setName(java.lang.String value) { * * *
-     * Output only. The resource name of the settings to retrieve.
+     * Identifier. The resource name of the settings to retrieve.
      * Format:
-     * organizations/{organization}/locations/{location}/settings.
+     * organizations/{organization}/locations/{location}/settings or
+     * projects/{projects}/locations/{location}/settings.
      * 
* - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @return This builder for chaining. */ @@ -854,12 +860,13 @@ public Builder clearName() { * * *
-     * Output only. The resource name of the settings to retrieve.
+     * Identifier. The resource name of the settings to retrieve.
      * Format:
-     * organizations/{organization}/locations/{location}/settings.
+     * organizations/{organization}/locations/{location}/settings or
+     * projects/{projects}/locations/{location}/settings.
      * 
* - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @param value The bytes for name to set. * @return This builder for chaining. diff --git a/java-advisorynotifications/proto-google-cloud-advisorynotifications-v1/src/main/java/com/google/cloud/advisorynotifications/v1/SettingsName.java b/java-advisorynotifications/proto-google-cloud-advisorynotifications-v1/src/main/java/com/google/cloud/advisorynotifications/v1/SettingsName.java index 5dca8c57431f..5b6f16f0c8af 100644 --- a/java-advisorynotifications/proto-google-cloud-advisorynotifications-v1/src/main/java/com/google/cloud/advisorynotifications/v1/SettingsName.java +++ b/java-advisorynotifications/proto-google-cloud-advisorynotifications-v1/src/main/java/com/google/cloud/advisorynotifications/v1/SettingsName.java @@ -17,6 +17,7 @@ package com.google.cloud.advisorynotifications.v1; import com.google.api.pathtemplate.PathTemplate; +import com.google.api.pathtemplate.ValidationException; import com.google.api.resourcenames.ResourceName; import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableMap; @@ -32,19 +33,34 @@ public class SettingsName implements ResourceName { private static final PathTemplate ORGANIZATION_LOCATION = PathTemplate.createWithoutUrlEncoding( "organizations/{organization}/locations/{location}/settings"); + private static final PathTemplate PROJECT_LOCATION = + PathTemplate.createWithoutUrlEncoding("projects/{project}/locations/{location}/settings"); private volatile Map fieldValuesMap; + private PathTemplate pathTemplate; + private String fixedValue; private final String organization; private final String location; + private final String project; @Deprecated protected SettingsName() { organization = null; location = null; + project = null; } private SettingsName(Builder builder) { organization = Preconditions.checkNotNull(builder.getOrganization()); location = Preconditions.checkNotNull(builder.getLocation()); + project = null; + pathTemplate = ORGANIZATION_LOCATION; + } + + private SettingsName(ProjectLocationBuilder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + organization = null; + pathTemplate = PROJECT_LOCATION; } public String getOrganization() { @@ -55,10 +71,22 @@ public String getLocation() { return location; } + public String getProject() { + return project; + } + public static Builder newBuilder() { return new Builder(); } + public static Builder newOrganizationLocationBuilder() { + return new Builder(); + } + + public static ProjectLocationBuilder newProjectLocationBuilder() { + return new ProjectLocationBuilder(); + } + public Builder toBuilder() { return new Builder(this); } @@ -67,18 +95,38 @@ public static SettingsName of(String organization, String location) { return newBuilder().setOrganization(organization).setLocation(location).build(); } + public static SettingsName ofOrganizationLocationName(String organization, String location) { + return newBuilder().setOrganization(organization).setLocation(location).build(); + } + + public static SettingsName ofProjectLocationName(String project, String location) { + return newProjectLocationBuilder().setProject(project).setLocation(location).build(); + } + public static String format(String organization, String location) { return newBuilder().setOrganization(organization).setLocation(location).build().toString(); } + public static String formatOrganizationLocationName(String organization, String location) { + return newBuilder().setOrganization(organization).setLocation(location).build().toString(); + } + + public static String formatProjectLocationName(String project, String location) { + return newProjectLocationBuilder().setProject(project).setLocation(location).build().toString(); + } + public static SettingsName parse(String formattedString) { if (formattedString.isEmpty()) { return null; } - Map matchMap = - ORGANIZATION_LOCATION.validatedMatch( - formattedString, "SettingsName.parse: formattedString not in valid format"); - return of(matchMap.get("organization"), matchMap.get("location")); + if (ORGANIZATION_LOCATION.matches(formattedString)) { + Map matchMap = ORGANIZATION_LOCATION.match(formattedString); + return ofOrganizationLocationName(matchMap.get("organization"), matchMap.get("location")); + } else if (PROJECT_LOCATION.matches(formattedString)) { + Map matchMap = PROJECT_LOCATION.match(formattedString); + return ofProjectLocationName(matchMap.get("project"), matchMap.get("location")); + } + throw new ValidationException("SettingsName.parse: formattedString not in valid format"); } public static List parseList(List formattedStrings) { @@ -102,7 +150,8 @@ public static List toStringList(List values) { } public static boolean isParsableFrom(String formattedString) { - return ORGANIZATION_LOCATION.matches(formattedString); + return ORGANIZATION_LOCATION.matches(formattedString) + || PROJECT_LOCATION.matches(formattedString); } @Override @@ -117,6 +166,9 @@ public Map getFieldValuesMap() { if (location != null) { fieldMapBuilder.put("location", location); } + if (project != null) { + fieldMapBuilder.put("project", project); + } fieldValuesMap = fieldMapBuilder.build(); } } @@ -130,7 +182,7 @@ public String getFieldValue(String fieldName) { @Override public String toString() { - return ORGANIZATION_LOCATION.instantiate("organization", organization, "location", location); + return fixedValue != null ? fixedValue : pathTemplate.instantiate(getFieldValuesMap()); } @Override @@ -141,7 +193,8 @@ public boolean equals(Object o) { if (o != null && getClass() == o.getClass()) { SettingsName that = ((SettingsName) o); return Objects.equals(this.organization, that.organization) - && Objects.equals(this.location, that.location); + && Objects.equals(this.location, that.location) + && Objects.equals(this.project, that.project); } return false; } @@ -150,9 +203,13 @@ public boolean equals(Object o) { public int hashCode() { int h = 1; h *= 1000003; + h ^= Objects.hashCode(fixedValue); + h *= 1000003; h ^= Objects.hashCode(organization); h *= 1000003; h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(project); return h; } @@ -182,6 +239,9 @@ public Builder setLocation(String location) { } private Builder(SettingsName settingsName) { + Preconditions.checkArgument( + Objects.equals(settingsName.pathTemplate, ORGANIZATION_LOCATION), + "toBuilder is only supported when SettingsName has the pattern of organizations/{organization}/locations/{location}/settings"); this.organization = settingsName.organization; this.location = settingsName.location; } @@ -190,4 +250,34 @@ public SettingsName build() { return new SettingsName(this); } } + + /** Builder for projects/{project}/locations/{location}/settings. */ + public static class ProjectLocationBuilder { + private String project; + private String location; + + protected ProjectLocationBuilder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public ProjectLocationBuilder setProject(String project) { + this.project = project; + return this; + } + + public ProjectLocationBuilder setLocation(String location) { + this.location = location; + return this; + } + + public SettingsName build() { + return new SettingsName(this); + } + } } diff --git a/java-advisorynotifications/proto-google-cloud-advisorynotifications-v1/src/main/java/com/google/cloud/advisorynotifications/v1/SettingsOrBuilder.java b/java-advisorynotifications/proto-google-cloud-advisorynotifications-v1/src/main/java/com/google/cloud/advisorynotifications/v1/SettingsOrBuilder.java index c5cf26da6b3f..51346ba2eb8e 100644 --- a/java-advisorynotifications/proto-google-cloud-advisorynotifications-v1/src/main/java/com/google/cloud/advisorynotifications/v1/SettingsOrBuilder.java +++ b/java-advisorynotifications/proto-google-cloud-advisorynotifications-v1/src/main/java/com/google/cloud/advisorynotifications/v1/SettingsOrBuilder.java @@ -28,12 +28,13 @@ public interface SettingsOrBuilder * * *
-   * Output only. The resource name of the settings to retrieve.
+   * Identifier. The resource name of the settings to retrieve.
    * Format:
-   * organizations/{organization}/locations/{location}/settings.
+   * organizations/{organization}/locations/{location}/settings or
+   * projects/{projects}/locations/{location}/settings.
    * 
* - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @return The name. */ @@ -42,12 +43,13 @@ public interface SettingsOrBuilder * * *
-   * Output only. The resource name of the settings to retrieve.
+   * Identifier. The resource name of the settings to retrieve.
    * Format:
-   * organizations/{organization}/locations/{location}/settings.
+   * organizations/{organization}/locations/{location}/settings or
+   * projects/{projects}/locations/{location}/settings.
    * 
* - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @return The bytes for name. */ diff --git a/java-advisorynotifications/proto-google-cloud-advisorynotifications-v1/src/main/proto/google/cloud/advisorynotifications/v1/service.proto b/java-advisorynotifications/proto-google-cloud-advisorynotifications-v1/src/main/proto/google/cloud/advisorynotifications/v1/service.proto index 87947ba2158a..2d76524eebfc 100644 --- a/java-advisorynotifications/proto-google-cloud-advisorynotifications-v1/src/main/proto/google/cloud/advisorynotifications/v1/service.proto +++ b/java-advisorynotifications/proto-google-cloud-advisorynotifications-v1/src/main/proto/google/cloud/advisorynotifications/v1/service.proto @@ -68,6 +68,7 @@ service AdvisoryNotificationsService { rpc GetSettings(GetSettingsRequest) returns (Settings) { option (google.api.http) = { get: "/v1/{name=organizations/*/locations/*/settings}" + additional_bindings { get: "/v1/{name=projects/*/locations/*/settings}" } }; option (google.api.method_signature) = "name"; } @@ -77,6 +78,10 @@ service AdvisoryNotificationsService { option (google.api.http) = { patch: "/v1/{settings.name=organizations/*/locations/*/settings}" body: "settings" + additional_bindings { + patch: "/v1/{settings.name=projects/*/locations/*/settings}" + body: "settings" + } }; option (google.api.method_signature) = "settings"; } @@ -238,7 +243,7 @@ message Csv { message ListNotificationsRequest { // Required. The parent, which owns this collection of notifications. // Must be of the form "organizations/{organization}/locations/{location}" - // or "projects/{project}/locations/{location}" + // or "projects/{project}/locations/{location}". string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -308,12 +313,16 @@ message Settings { option (google.api.resource) = { type: "advisorynotifications.googleapis.com/Settings" pattern: "organizations/{organization}/locations/{location}/settings" + pattern: "projects/{project}/locations/{location}/settings" + plural: "settings" + singular: "settings" }; - // Output only. The resource name of the settings to retrieve. + // Identifier. The resource name of the settings to retrieve. // Format: - // organizations/{organization}/locations/{location}/settings. - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + // organizations/{organization}/locations/{location}/settings or + // projects/{projects}/locations/{location}/settings. + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; // Required. Map of each notification type and its settings to get/set all // settings at once. The server will validate the value for each notification @@ -338,7 +347,8 @@ message NotificationSettings { message GetSettingsRequest { // Required. The resource name of the settings to retrieve. // Format: - // organizations/{organization}/locations/{location}/settings. + // organizations/{organization}/locations/{location}/settings or + // projects/{projects}/locations/{location}/settings. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { diff --git a/java-advisorynotifications/samples/snippets/generated/com/google/cloud/advisorynotifications/v1/advisorynotificationsservice/getsettings/AsyncGetSettings.java b/java-advisorynotifications/samples/snippets/generated/com/google/cloud/advisorynotifications/v1/advisorynotificationsservice/getsettings/AsyncGetSettings.java index fe38d5780a69..cb1884e05e8e 100644 --- a/java-advisorynotifications/samples/snippets/generated/com/google/cloud/advisorynotifications/v1/advisorynotificationsservice/getsettings/AsyncGetSettings.java +++ b/java-advisorynotifications/samples/snippets/generated/com/google/cloud/advisorynotifications/v1/advisorynotificationsservice/getsettings/AsyncGetSettings.java @@ -39,7 +39,9 @@ public static void asyncGetSettings() throws Exception { AdvisoryNotificationsServiceClient.create()) { GetSettingsRequest request = GetSettingsRequest.newBuilder() - .setName(SettingsName.of("[ORGANIZATION]", "[LOCATION]").toString()) + .setName( + SettingsName.ofOrganizationLocationName("[ORGANIZATION]", "[LOCATION]") + .toString()) .build(); ApiFuture future = advisoryNotificationsServiceClient.getSettingsCallable().futureCall(request); diff --git a/java-advisorynotifications/samples/snippets/generated/com/google/cloud/advisorynotifications/v1/advisorynotificationsservice/getsettings/SyncGetSettings.java b/java-advisorynotifications/samples/snippets/generated/com/google/cloud/advisorynotifications/v1/advisorynotificationsservice/getsettings/SyncGetSettings.java index a0e991267a09..c2e8444171ef 100644 --- a/java-advisorynotifications/samples/snippets/generated/com/google/cloud/advisorynotifications/v1/advisorynotificationsservice/getsettings/SyncGetSettings.java +++ b/java-advisorynotifications/samples/snippets/generated/com/google/cloud/advisorynotifications/v1/advisorynotificationsservice/getsettings/SyncGetSettings.java @@ -38,7 +38,9 @@ public static void syncGetSettings() throws Exception { AdvisoryNotificationsServiceClient.create()) { GetSettingsRequest request = GetSettingsRequest.newBuilder() - .setName(SettingsName.of("[ORGANIZATION]", "[LOCATION]").toString()) + .setName( + SettingsName.ofOrganizationLocationName("[ORGANIZATION]", "[LOCATION]") + .toString()) .build(); Settings response = advisoryNotificationsServiceClient.getSettings(request); } diff --git a/java-advisorynotifications/samples/snippets/generated/com/google/cloud/advisorynotifications/v1/advisorynotificationsservice/getsettings/SyncGetSettingsSettingsname.java b/java-advisorynotifications/samples/snippets/generated/com/google/cloud/advisorynotifications/v1/advisorynotificationsservice/getsettings/SyncGetSettingsSettingsname.java index 00fc3e3bb46b..8c95c4339c38 100644 --- a/java-advisorynotifications/samples/snippets/generated/com/google/cloud/advisorynotifications/v1/advisorynotificationsservice/getsettings/SyncGetSettingsSettingsname.java +++ b/java-advisorynotifications/samples/snippets/generated/com/google/cloud/advisorynotifications/v1/advisorynotificationsservice/getsettings/SyncGetSettingsSettingsname.java @@ -35,7 +35,7 @@ public static void syncGetSettingsSettingsname() throws Exception { // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AdvisoryNotificationsServiceClient advisoryNotificationsServiceClient = AdvisoryNotificationsServiceClient.create()) { - SettingsName name = SettingsName.of("[ORGANIZATION]", "[LOCATION]"); + SettingsName name = SettingsName.ofOrganizationLocationName("[ORGANIZATION]", "[LOCATION]"); Settings response = advisoryNotificationsServiceClient.getSettings(name); } } diff --git a/java-advisorynotifications/samples/snippets/generated/com/google/cloud/advisorynotifications/v1/advisorynotificationsservice/getsettings/SyncGetSettingsString.java b/java-advisorynotifications/samples/snippets/generated/com/google/cloud/advisorynotifications/v1/advisorynotificationsservice/getsettings/SyncGetSettingsString.java index 695337e5627c..92f4c0011fbf 100644 --- a/java-advisorynotifications/samples/snippets/generated/com/google/cloud/advisorynotifications/v1/advisorynotificationsservice/getsettings/SyncGetSettingsString.java +++ b/java-advisorynotifications/samples/snippets/generated/com/google/cloud/advisorynotifications/v1/advisorynotificationsservice/getsettings/SyncGetSettingsString.java @@ -35,7 +35,8 @@ public static void syncGetSettingsString() throws Exception { // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AdvisoryNotificationsServiceClient advisoryNotificationsServiceClient = AdvisoryNotificationsServiceClient.create()) { - String name = SettingsName.of("[ORGANIZATION]", "[LOCATION]").toString(); + String name = + SettingsName.ofOrganizationLocationName("[ORGANIZATION]", "[LOCATION]").toString(); Settings response = advisoryNotificationsServiceClient.getSettings(name); } } diff --git a/java-aiplatform/README.md b/java-aiplatform/README.md index 9525400261b5..9b5f741a1fee 100644 --- a/java-aiplatform/README.md +++ b/java-aiplatform/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.34.0 + 26.37.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-aiplatform.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-aiplatform/3.39.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-aiplatform/3.42.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-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/GenAiTuningServiceClient.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/GenAiTuningServiceClient.java new file mode 100644 index 000000000000..1b6a16f6103b --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/GenAiTuningServiceClient.java @@ -0,0 +1,1408 @@ +/* + * Copyright 2024 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.aiplatform.v1; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.aiplatform.v1.stub.GenAiTuningServiceStub; +import com.google.cloud.aiplatform.v1.stub.GenAiTuningServiceStubSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: A service for creating and managing GenAI Tuning Jobs. + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

{@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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) {
+ *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ *   TuningJob tuningJob = TuningJob.newBuilder().build();
+ *   TuningJob response = genAiTuningServiceClient.createTuningJob(parent, tuningJob);
+ * }
+ * }
+ * + *

Note: close() needs to be called on the GenAiTuningServiceClient object to clean up resources + * such as threads. In the example above, try-with-resources is used, which automatically calls + * close(). + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Methods
MethodDescriptionMethod Variants

CreateTuningJob

Creates a TuningJob. A created TuningJob right away will be attempted to be run.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createTuningJob(CreateTuningJobRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • createTuningJob(LocationName parent, TuningJob tuningJob) + *

  • createTuningJob(String parent, TuningJob tuningJob) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createTuningJobCallable() + *

+ *

GetTuningJob

Gets a TuningJob.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getTuningJob(GetTuningJobRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getTuningJob(TuningJobName name) + *

  • getTuningJob(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getTuningJobCallable() + *

+ *

ListTuningJobs

Lists TuningJobs in a Location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listTuningJobs(ListTuningJobsRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listTuningJobs(LocationName parent) + *

  • listTuningJobs(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listTuningJobsPagedCallable() + *

  • listTuningJobsCallable() + *

+ *

CancelTuningJob

Cancels a TuningJob. Starts asynchronous cancellation on the TuningJob. The server makes a best effort to cancel the job, but success is not guaranteed. Clients can use [GenAiTuningService.GetTuningJob][google.cloud.aiplatform.v1.GenAiTuningService.GetTuningJob] or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On successful cancellation, the TuningJob is not deleted; instead it becomes a job with a [TuningJob.error][google.cloud.aiplatform.v1.TuningJob.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`, and [TuningJob.state][google.cloud.aiplatform.v1.TuningJob.state] is set to `CANCELLED`.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • cancelTuningJob(CancelTuningJobRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • cancelTuningJob(TuningJobName name) + *

  • cancelTuningJob(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • cancelTuningJobCallable() + *

+ *

ListLocations

Lists information about the supported locations for this service.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listLocations(ListLocationsRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listLocationsPagedCallable() + *

  • listLocationsCallable() + *

+ *

GetLocation

Gets information about a location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getLocation(GetLocationRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getLocationCallable() + *

+ *

SetIamPolicy

Sets the access control policy on the specified resource. Replacesany existing policy. + *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • setIamPolicy(SetIamPolicyRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • setIamPolicyCallable() + *

+ *

GetIamPolicy

Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getIamPolicy(GetIamPolicyRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getIamPolicyCallable() + *

+ *

TestIamPermissions

Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a `NOT_FOUND` error. + *

Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • testIamPermissions(TestIamPermissionsRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • testIamPermissionsCallable() + *

+ *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of GenAiTuningServiceSettings to + * create(). For example: + * + *

To customize credentials: + * + *

{@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
+ * GenAiTuningServiceSettings genAiTuningServiceSettings =
+ *     GenAiTuningServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * GenAiTuningServiceClient genAiTuningServiceClient =
+ *     GenAiTuningServiceClient.create(genAiTuningServiceSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@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
+ * GenAiTuningServiceSettings genAiTuningServiceSettings =
+ *     GenAiTuningServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * GenAiTuningServiceClient genAiTuningServiceClient =
+ *     GenAiTuningServiceClient.create(genAiTuningServiceSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class GenAiTuningServiceClient implements BackgroundResource { + private final GenAiTuningServiceSettings settings; + private final GenAiTuningServiceStub stub; + + /** Constructs an instance of GenAiTuningServiceClient with default settings. */ + public static final GenAiTuningServiceClient create() throws IOException { + return create(GenAiTuningServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of GenAiTuningServiceClient, using the given settings. The channels are + * created based on the settings passed in, or defaults for any settings that are not set. + */ + public static final GenAiTuningServiceClient create(GenAiTuningServiceSettings settings) + throws IOException { + return new GenAiTuningServiceClient(settings); + } + + /** + * Constructs an instance of GenAiTuningServiceClient, using the given stub for making calls. This + * is for advanced usage - prefer using create(GenAiTuningServiceSettings). + */ + public static final GenAiTuningServiceClient create(GenAiTuningServiceStub stub) { + return new GenAiTuningServiceClient(stub); + } + + /** + * Constructs an instance of GenAiTuningServiceClient, using the given settings. This is protected + * so that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GenAiTuningServiceClient(GenAiTuningServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((GenAiTuningServiceStubSettings) settings.getStubSettings()).createStub(); + } + + protected GenAiTuningServiceClient(GenAiTuningServiceStub stub) { + this.settings = null; + this.stub = stub; + } + + public final GenAiTuningServiceSettings getSettings() { + return settings; + } + + public GenAiTuningServiceStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a TuningJob. A created TuningJob right away will be attempted to be run. + * + *

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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   TuningJob tuningJob = TuningJob.newBuilder().build();
+   *   TuningJob response = genAiTuningServiceClient.createTuningJob(parent, tuningJob);
+   * }
+   * }
+ * + * @param parent Required. The resource name of the Location to create the TuningJob in. Format: + * `projects/{project}/locations/{location}` + * @param tuningJob Required. The TuningJob to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TuningJob createTuningJob(LocationName parent, TuningJob tuningJob) { + CreateTuningJobRequest request = + CreateTuningJobRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setTuningJob(tuningJob) + .build(); + return createTuningJob(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a TuningJob. A created TuningJob right away will be attempted to be run. + * + *

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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   TuningJob tuningJob = TuningJob.newBuilder().build();
+   *   TuningJob response = genAiTuningServiceClient.createTuningJob(parent, tuningJob);
+   * }
+   * }
+ * + * @param parent Required. The resource name of the Location to create the TuningJob in. Format: + * `projects/{project}/locations/{location}` + * @param tuningJob Required. The TuningJob to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TuningJob createTuningJob(String parent, TuningJob tuningJob) { + CreateTuningJobRequest request = + CreateTuningJobRequest.newBuilder().setParent(parent).setTuningJob(tuningJob).build(); + return createTuningJob(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a TuningJob. A created TuningJob right away will be attempted to be run. + * + *

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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) {
+   *   CreateTuningJobRequest request =
+   *       CreateTuningJobRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setTuningJob(TuningJob.newBuilder().build())
+   *           .build();
+   *   TuningJob response = genAiTuningServiceClient.createTuningJob(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TuningJob createTuningJob(CreateTuningJobRequest request) { + return createTuningJobCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a TuningJob. A created TuningJob right away will be attempted to be run. + * + *

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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) {
+   *   CreateTuningJobRequest request =
+   *       CreateTuningJobRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setTuningJob(TuningJob.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       genAiTuningServiceClient.createTuningJobCallable().futureCall(request);
+   *   // Do something.
+   *   TuningJob response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createTuningJobCallable() { + return stub.createTuningJobCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a TuningJob. + * + *

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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) {
+   *   TuningJobName name = TuningJobName.of("[PROJECT]", "[LOCATION]", "[TUNING_JOB]");
+   *   TuningJob response = genAiTuningServiceClient.getTuningJob(name);
+   * }
+   * }
+ * + * @param name Required. The name of the TuningJob resource. Format: + * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TuningJob getTuningJob(TuningJobName name) { + GetTuningJobRequest request = + GetTuningJobRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getTuningJob(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a TuningJob. + * + *

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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) {
+   *   String name = TuningJobName.of("[PROJECT]", "[LOCATION]", "[TUNING_JOB]").toString();
+   *   TuningJob response = genAiTuningServiceClient.getTuningJob(name);
+   * }
+   * }
+ * + * @param name Required. The name of the TuningJob resource. Format: + * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TuningJob getTuningJob(String name) { + GetTuningJobRequest request = GetTuningJobRequest.newBuilder().setName(name).build(); + return getTuningJob(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a TuningJob. + * + *

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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) {
+   *   GetTuningJobRequest request =
+   *       GetTuningJobRequest.newBuilder()
+   *           .setName(TuningJobName.of("[PROJECT]", "[LOCATION]", "[TUNING_JOB]").toString())
+   *           .build();
+   *   TuningJob response = genAiTuningServiceClient.getTuningJob(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TuningJob getTuningJob(GetTuningJobRequest request) { + return getTuningJobCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a TuningJob. + * + *

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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) {
+   *   GetTuningJobRequest request =
+   *       GetTuningJobRequest.newBuilder()
+   *           .setName(TuningJobName.of("[PROJECT]", "[LOCATION]", "[TUNING_JOB]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       genAiTuningServiceClient.getTuningJobCallable().futureCall(request);
+   *   // Do something.
+   *   TuningJob response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getTuningJobCallable() { + return stub.getTuningJobCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists TuningJobs in a Location. + * + *

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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (TuningJob element : genAiTuningServiceClient.listTuningJobs(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The resource name of the Location to list the TuningJobs from. Format: + * `projects/{project}/locations/{location}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListTuningJobsPagedResponse listTuningJobs(LocationName parent) { + ListTuningJobsRequest request = + ListTuningJobsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listTuningJobs(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists TuningJobs in a Location. + * + *

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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (TuningJob element : genAiTuningServiceClient.listTuningJobs(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The resource name of the Location to list the TuningJobs from. Format: + * `projects/{project}/locations/{location}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListTuningJobsPagedResponse listTuningJobs(String parent) { + ListTuningJobsRequest request = ListTuningJobsRequest.newBuilder().setParent(parent).build(); + return listTuningJobs(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists TuningJobs in a Location. + * + *

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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) {
+   *   ListTuningJobsRequest request =
+   *       ListTuningJobsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (TuningJob element : genAiTuningServiceClient.listTuningJobs(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListTuningJobsPagedResponse listTuningJobs(ListTuningJobsRequest request) { + return listTuningJobsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists TuningJobs in a Location. + * + *

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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) {
+   *   ListTuningJobsRequest request =
+   *       ListTuningJobsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       genAiTuningServiceClient.listTuningJobsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (TuningJob element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listTuningJobsPagedCallable() { + return stub.listTuningJobsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists TuningJobs in a Location. + * + *

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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) {
+   *   ListTuningJobsRequest request =
+   *       ListTuningJobsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListTuningJobsResponse response =
+   *         genAiTuningServiceClient.listTuningJobsCallable().call(request);
+   *     for (TuningJob element : response.getTuningJobsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listTuningJobsCallable() { + return stub.listTuningJobsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Cancels a TuningJob. Starts asynchronous cancellation on the TuningJob. The server makes a best + * effort to cancel the job, but success is not guaranteed. Clients can use + * [GenAiTuningService.GetTuningJob][google.cloud.aiplatform.v1.GenAiTuningService.GetTuningJob] + * or other methods to check whether the cancellation succeeded or whether the job completed + * despite cancellation. On successful cancellation, the TuningJob is not deleted; instead it + * becomes a job with a [TuningJob.error][google.cloud.aiplatform.v1.TuningJob.error] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`, and + * [TuningJob.state][google.cloud.aiplatform.v1.TuningJob.state] is set to `CANCELLED`. + * + *

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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) {
+   *   TuningJobName name = TuningJobName.of("[PROJECT]", "[LOCATION]", "[TUNING_JOB]");
+   *   genAiTuningServiceClient.cancelTuningJob(name);
+   * }
+   * }
+ * + * @param name Required. The name of the TuningJob to cancel. Format: + * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void cancelTuningJob(TuningJobName name) { + CancelTuningJobRequest request = + CancelTuningJobRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + cancelTuningJob(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Cancels a TuningJob. Starts asynchronous cancellation on the TuningJob. The server makes a best + * effort to cancel the job, but success is not guaranteed. Clients can use + * [GenAiTuningService.GetTuningJob][google.cloud.aiplatform.v1.GenAiTuningService.GetTuningJob] + * or other methods to check whether the cancellation succeeded or whether the job completed + * despite cancellation. On successful cancellation, the TuningJob is not deleted; instead it + * becomes a job with a [TuningJob.error][google.cloud.aiplatform.v1.TuningJob.error] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`, and + * [TuningJob.state][google.cloud.aiplatform.v1.TuningJob.state] is set to `CANCELLED`. + * + *

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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) {
+   *   String name = TuningJobName.of("[PROJECT]", "[LOCATION]", "[TUNING_JOB]").toString();
+   *   genAiTuningServiceClient.cancelTuningJob(name);
+   * }
+   * }
+ * + * @param name Required. The name of the TuningJob to cancel. Format: + * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void cancelTuningJob(String name) { + CancelTuningJobRequest request = CancelTuningJobRequest.newBuilder().setName(name).build(); + cancelTuningJob(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Cancels a TuningJob. Starts asynchronous cancellation on the TuningJob. The server makes a best + * effort to cancel the job, but success is not guaranteed. Clients can use + * [GenAiTuningService.GetTuningJob][google.cloud.aiplatform.v1.GenAiTuningService.GetTuningJob] + * or other methods to check whether the cancellation succeeded or whether the job completed + * despite cancellation. On successful cancellation, the TuningJob is not deleted; instead it + * becomes a job with a [TuningJob.error][google.cloud.aiplatform.v1.TuningJob.error] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`, and + * [TuningJob.state][google.cloud.aiplatform.v1.TuningJob.state] is set to `CANCELLED`. + * + *

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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) {
+   *   CancelTuningJobRequest request =
+   *       CancelTuningJobRequest.newBuilder()
+   *           .setName(TuningJobName.of("[PROJECT]", "[LOCATION]", "[TUNING_JOB]").toString())
+   *           .build();
+   *   genAiTuningServiceClient.cancelTuningJob(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void cancelTuningJob(CancelTuningJobRequest request) { + cancelTuningJobCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Cancels a TuningJob. Starts asynchronous cancellation on the TuningJob. The server makes a best + * effort to cancel the job, but success is not guaranteed. Clients can use + * [GenAiTuningService.GetTuningJob][google.cloud.aiplatform.v1.GenAiTuningService.GetTuningJob] + * or other methods to check whether the cancellation succeeded or whether the job completed + * despite cancellation. On successful cancellation, the TuningJob is not deleted; instead it + * becomes a job with a [TuningJob.error][google.cloud.aiplatform.v1.TuningJob.error] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`, and + * [TuningJob.state][google.cloud.aiplatform.v1.TuningJob.state] is set to `CANCELLED`. + * + *

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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) {
+   *   CancelTuningJobRequest request =
+   *       CancelTuningJobRequest.newBuilder()
+   *           .setName(TuningJobName.of("[PROJECT]", "[LOCATION]", "[TUNING_JOB]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       genAiTuningServiceClient.cancelTuningJobCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable cancelTuningJobCallable() { + return stub.cancelTuningJobCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Location element : genAiTuningServiceClient.listLocations(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListLocationsPagedResponse listLocations(ListLocationsRequest request) { + return listLocationsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       genAiTuningServiceClient.listLocationsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Location element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listLocationsPagedCallable() { + return stub.listLocationsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListLocationsResponse response =
+   *         genAiTuningServiceClient.listLocationsCallable().call(request);
+   *     for (Location element : response.getLocationsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listLocationsCallable() { + return stub.listLocationsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   Location response = genAiTuningServiceClient.getLocation(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Location getLocation(GetLocationRequest request) { + return getLocationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future =
+   *       genAiTuningServiceClient.getLocationCallable().futureCall(request);
+   *   // Do something.
+   *   Location response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getLocationCallable() { + return stub.getLocationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the access control policy on the specified resource. Replacesany existing policy. + * + *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. + * + *

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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) {
+   *   SetIamPolicyRequest request =
+   *       SetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Policy response = genAiTuningServiceClient.setIamPolicy(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Policy setIamPolicy(SetIamPolicyRequest request) { + return setIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the access control policy on the specified resource. Replacesany existing policy. + * + *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. + * + *

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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) {
+   *   SetIamPolicyRequest request =
+   *       SetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       genAiTuningServiceClient.setIamPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Policy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable setIamPolicyCallable() { + return stub.setIamPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the access control policy for a resource. Returns an empty policyif the resource exists + * and does not have a policy set. + * + *

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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) {
+   *   GetIamPolicyRequest request =
+   *       GetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .setOptions(GetPolicyOptions.newBuilder().build())
+   *           .build();
+   *   Policy response = genAiTuningServiceClient.getIamPolicy(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Policy getIamPolicy(GetIamPolicyRequest request) { + return getIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the access control policy for a resource. Returns an empty policyif the resource exists + * and does not have a policy set. + * + *

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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) {
+   *   GetIamPolicyRequest request =
+   *       GetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .setOptions(GetPolicyOptions.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       genAiTuningServiceClient.getIamPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Policy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getIamPolicyCallable() { + return stub.getIamPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns permissions that a caller has on the specified resource. If theresource does not exist, + * this will return an empty set ofpermissions, not a `NOT_FOUND` error. + * + *

Note: This operation is designed to be used for buildingpermission-aware UIs and + * command-line tools, not for authorizationchecking. This operation may "fail open" without + * warning. + * + *

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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) {
+   *   TestIamPermissionsRequest request =
+   *       TestIamPermissionsRequest.newBuilder()
+   *           .setResource(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .addAllPermissions(new ArrayList())
+   *           .build();
+   *   TestIamPermissionsResponse response = genAiTuningServiceClient.testIamPermissions(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) { + return testIamPermissionsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns permissions that a caller has on the specified resource. If theresource does not exist, + * this will return an empty set ofpermissions, not a `NOT_FOUND` error. + * + *

Note: This operation is designed to be used for buildingpermission-aware UIs and + * command-line tools, not for authorizationchecking. This operation may "fail open" without + * warning. + * + *

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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) {
+   *   TestIamPermissionsRequest request =
+   *       TestIamPermissionsRequest.newBuilder()
+   *           .setResource(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .addAllPermissions(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       genAiTuningServiceClient.testIamPermissionsCallable().futureCall(request);
+   *   // Do something.
+   *   TestIamPermissionsResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + testIamPermissionsCallable() { + return stub.testIamPermissionsCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListTuningJobsPagedResponse + extends AbstractPagedListResponse< + ListTuningJobsRequest, + ListTuningJobsResponse, + TuningJob, + ListTuningJobsPage, + ListTuningJobsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListTuningJobsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListTuningJobsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListTuningJobsPagedResponse(ListTuningJobsPage page) { + super(page, ListTuningJobsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListTuningJobsPage + extends AbstractPage< + ListTuningJobsRequest, ListTuningJobsResponse, TuningJob, ListTuningJobsPage> { + + private ListTuningJobsPage( + PageContext context, + ListTuningJobsResponse response) { + super(context, response); + } + + private static ListTuningJobsPage createEmptyPage() { + return new ListTuningJobsPage(null, null); + } + + @Override + protected ListTuningJobsPage createPage( + PageContext context, + ListTuningJobsResponse response) { + return new ListTuningJobsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListTuningJobsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListTuningJobsRequest, + ListTuningJobsResponse, + TuningJob, + ListTuningJobsPage, + ListTuningJobsFixedSizeCollection> { + + private ListTuningJobsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListTuningJobsFixedSizeCollection createEmptyCollection() { + return new ListTuningJobsFixedSizeCollection(null, 0); + } + + @Override + protected ListTuningJobsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListTuningJobsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListLocationsPagedResponse + extends AbstractPagedListResponse< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListLocationsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListLocationsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListLocationsPagedResponse(ListLocationsPage page) { + super(page, ListLocationsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListLocationsPage + extends AbstractPage< + ListLocationsRequest, ListLocationsResponse, Location, ListLocationsPage> { + + private ListLocationsPage( + PageContext context, + ListLocationsResponse response) { + super(context, response); + } + + private static ListLocationsPage createEmptyPage() { + return new ListLocationsPage(null, null); + } + + @Override + protected ListLocationsPage createPage( + PageContext context, + ListLocationsResponse response) { + return new ListLocationsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListLocationsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + private ListLocationsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListLocationsFixedSizeCollection createEmptyCollection() { + return new ListLocationsFixedSizeCollection(null, 0); + } + + @Override + protected ListLocationsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListLocationsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/GenAiTuningServiceSettings.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/GenAiTuningServiceSettings.java new file mode 100644 index 000000000000..c28ed084f3bd --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/GenAiTuningServiceSettings.java @@ -0,0 +1,288 @@ +/* + * Copyright 2024 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.aiplatform.v1; + +import static com.google.cloud.aiplatform.v1.GenAiTuningServiceClient.ListLocationsPagedResponse; +import static com.google.cloud.aiplatform.v1.GenAiTuningServiceClient.ListTuningJobsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.aiplatform.v1.stub.GenAiTuningServiceStubSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link GenAiTuningServiceClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (aiplatform.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of createTuningJob to 30 seconds: + * + *

{@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
+ * GenAiTuningServiceSettings.Builder genAiTuningServiceSettingsBuilder =
+ *     GenAiTuningServiceSettings.newBuilder();
+ * genAiTuningServiceSettingsBuilder
+ *     .createTuningJobSettings()
+ *     .setRetrySettings(
+ *         genAiTuningServiceSettingsBuilder
+ *             .createTuningJobSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * GenAiTuningServiceSettings genAiTuningServiceSettings =
+ *     genAiTuningServiceSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class GenAiTuningServiceSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to createTuningJob. */ + public UnaryCallSettings createTuningJobSettings() { + return ((GenAiTuningServiceStubSettings) getStubSettings()).createTuningJobSettings(); + } + + /** Returns the object with the settings used for calls to getTuningJob. */ + public UnaryCallSettings getTuningJobSettings() { + return ((GenAiTuningServiceStubSettings) getStubSettings()).getTuningJobSettings(); + } + + /** Returns the object with the settings used for calls to listTuningJobs. */ + public PagedCallSettings< + ListTuningJobsRequest, ListTuningJobsResponse, ListTuningJobsPagedResponse> + listTuningJobsSettings() { + return ((GenAiTuningServiceStubSettings) getStubSettings()).listTuningJobsSettings(); + } + + /** Returns the object with the settings used for calls to cancelTuningJob. */ + public UnaryCallSettings cancelTuningJobSettings() { + return ((GenAiTuningServiceStubSettings) getStubSettings()).cancelTuningJobSettings(); + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return ((GenAiTuningServiceStubSettings) getStubSettings()).listLocationsSettings(); + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return ((GenAiTuningServiceStubSettings) getStubSettings()).getLocationSettings(); + } + + /** Returns the object with the settings used for calls to setIamPolicy. */ + public UnaryCallSettings setIamPolicySettings() { + return ((GenAiTuningServiceStubSettings) getStubSettings()).setIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to getIamPolicy. */ + public UnaryCallSettings getIamPolicySettings() { + return ((GenAiTuningServiceStubSettings) getStubSettings()).getIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to testIamPermissions. */ + public UnaryCallSettings + testIamPermissionsSettings() { + return ((GenAiTuningServiceStubSettings) getStubSettings()).testIamPermissionsSettings(); + } + + public static final GenAiTuningServiceSettings create(GenAiTuningServiceStubSettings stub) + throws IOException { + return new GenAiTuningServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return GenAiTuningServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return GenAiTuningServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return GenAiTuningServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GenAiTuningServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return GenAiTuningServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return GenAiTuningServiceStubSettings.defaultTransportChannelProvider(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return GenAiTuningServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected GenAiTuningServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for GenAiTuningServiceSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(GenAiTuningServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(GenAiTuningServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(GenAiTuningServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(GenAiTuningServiceStubSettings.newBuilder()); + } + + public GenAiTuningServiceStubSettings.Builder getStubSettingsBuilder() { + return ((GenAiTuningServiceStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to createTuningJob. */ + public UnaryCallSettings.Builder createTuningJobSettings() { + return getStubSettingsBuilder().createTuningJobSettings(); + } + + /** Returns the builder for the settings used for calls to getTuningJob. */ + public UnaryCallSettings.Builder getTuningJobSettings() { + return getStubSettingsBuilder().getTuningJobSettings(); + } + + /** Returns the builder for the settings used for calls to listTuningJobs. */ + public PagedCallSettings.Builder< + ListTuningJobsRequest, ListTuningJobsResponse, ListTuningJobsPagedResponse> + listTuningJobsSettings() { + return getStubSettingsBuilder().listTuningJobsSettings(); + } + + /** Returns the builder for the settings used for calls to cancelTuningJob. */ + public UnaryCallSettings.Builder cancelTuningJobSettings() { + return getStubSettingsBuilder().cancelTuningJobSettings(); + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return getStubSettingsBuilder().listLocationsSettings(); + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getStubSettingsBuilder().getLocationSettings(); + } + + /** Returns the builder for the settings used for calls to setIamPolicy. */ + public UnaryCallSettings.Builder setIamPolicySettings() { + return getStubSettingsBuilder().setIamPolicySettings(); + } + + /** Returns the builder for the settings used for calls to getIamPolicy. */ + public UnaryCallSettings.Builder getIamPolicySettings() { + return getStubSettingsBuilder().getIamPolicySettings(); + } + + /** Returns the builder for the settings used for calls to testIamPermissions. */ + public UnaryCallSettings.Builder + testIamPermissionsSettings() { + return getStubSettingsBuilder().testIamPermissionsSettings(); + } + + @Override + public GenAiTuningServiceSettings build() throws IOException { + return new GenAiTuningServiceSettings(this); + } + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/NotebookServiceClient.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/NotebookServiceClient.java new file mode 100644 index 000000000000..eca18ef93b60 --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/NotebookServiceClient.java @@ -0,0 +1,2884 @@ +/* + * Copyright 2024 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.aiplatform.v1; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.aiplatform.v1.stub.NotebookServiceStub; +import com.google.cloud.aiplatform.v1.stub.NotebookServiceStubSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.longrunning.OperationsClient; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: The interface for Vertex Notebook service (a.k.a. Colab on Workbench). + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

{@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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ *   NotebookRuntimeTemplateName name =
+ *       NotebookRuntimeTemplateName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]");
+ *   NotebookRuntimeTemplate response = notebookServiceClient.getNotebookRuntimeTemplate(name);
+ * }
+ * }
+ * + *

Note: close() needs to be called on the NotebookServiceClient object to clean up resources + * such as threads. In the example above, try-with-resources is used, which automatically calls + * close(). + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Methods
MethodDescriptionMethod Variants

CreateNotebookRuntimeTemplate

Creates a NotebookRuntimeTemplate.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createNotebookRuntimeTemplateAsync(CreateNotebookRuntimeTemplateRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • createNotebookRuntimeTemplateAsync(LocationName parent, NotebookRuntimeTemplate notebookRuntimeTemplate, String notebookRuntimeTemplateId) + *

  • createNotebookRuntimeTemplateAsync(String parent, NotebookRuntimeTemplate notebookRuntimeTemplate, String notebookRuntimeTemplateId) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createNotebookRuntimeTemplateOperationCallable() + *

  • createNotebookRuntimeTemplateCallable() + *

+ *

GetNotebookRuntimeTemplate

Gets a NotebookRuntimeTemplate.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getNotebookRuntimeTemplate(GetNotebookRuntimeTemplateRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getNotebookRuntimeTemplate(NotebookRuntimeTemplateName name) + *

  • getNotebookRuntimeTemplate(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getNotebookRuntimeTemplateCallable() + *

+ *

ListNotebookRuntimeTemplates

Lists NotebookRuntimeTemplates in a Location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listNotebookRuntimeTemplates(ListNotebookRuntimeTemplatesRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listNotebookRuntimeTemplates(LocationName parent) + *

  • listNotebookRuntimeTemplates(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listNotebookRuntimeTemplatesPagedCallable() + *

  • listNotebookRuntimeTemplatesCallable() + *

+ *

DeleteNotebookRuntimeTemplate

Deletes a NotebookRuntimeTemplate.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteNotebookRuntimeTemplateAsync(DeleteNotebookRuntimeTemplateRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • deleteNotebookRuntimeTemplateAsync(NotebookRuntimeTemplateName name) + *

  • deleteNotebookRuntimeTemplateAsync(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteNotebookRuntimeTemplateOperationCallable() + *

  • deleteNotebookRuntimeTemplateCallable() + *

+ *

AssignNotebookRuntime

Assigns a NotebookRuntime to a user for a particular Notebook file. This method will either returns an existing assignment or generates a new one.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • assignNotebookRuntimeAsync(AssignNotebookRuntimeRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • assignNotebookRuntimeAsync(LocationName parent, NotebookRuntimeTemplateName notebookRuntimeTemplate, NotebookRuntime notebookRuntime, String notebookRuntimeId) + *

  • assignNotebookRuntimeAsync(LocationName parent, String notebookRuntimeTemplate, NotebookRuntime notebookRuntime, String notebookRuntimeId) + *

  • assignNotebookRuntimeAsync(String parent, NotebookRuntimeTemplateName notebookRuntimeTemplate, NotebookRuntime notebookRuntime, String notebookRuntimeId) + *

  • assignNotebookRuntimeAsync(String parent, String notebookRuntimeTemplate, NotebookRuntime notebookRuntime, String notebookRuntimeId) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • assignNotebookRuntimeOperationCallable() + *

  • assignNotebookRuntimeCallable() + *

+ *

GetNotebookRuntime

Gets a NotebookRuntime.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getNotebookRuntime(GetNotebookRuntimeRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getNotebookRuntime(NotebookRuntimeName name) + *

  • getNotebookRuntime(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getNotebookRuntimeCallable() + *

+ *

ListNotebookRuntimes

Lists NotebookRuntimes in a Location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listNotebookRuntimes(ListNotebookRuntimesRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listNotebookRuntimes(LocationName parent) + *

  • listNotebookRuntimes(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listNotebookRuntimesPagedCallable() + *

  • listNotebookRuntimesCallable() + *

+ *

DeleteNotebookRuntime

Deletes a NotebookRuntime.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteNotebookRuntimeAsync(DeleteNotebookRuntimeRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • deleteNotebookRuntimeAsync(NotebookRuntimeName name) + *

  • deleteNotebookRuntimeAsync(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteNotebookRuntimeOperationCallable() + *

  • deleteNotebookRuntimeCallable() + *

+ *

UpgradeNotebookRuntime

Upgrades a NotebookRuntime.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • upgradeNotebookRuntimeAsync(UpgradeNotebookRuntimeRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • upgradeNotebookRuntimeAsync(NotebookRuntimeName name) + *

  • upgradeNotebookRuntimeAsync(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • upgradeNotebookRuntimeOperationCallable() + *

  • upgradeNotebookRuntimeCallable() + *

+ *

StartNotebookRuntime

Starts a NotebookRuntime.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • startNotebookRuntimeAsync(StartNotebookRuntimeRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • startNotebookRuntimeAsync(NotebookRuntimeName name) + *

  • startNotebookRuntimeAsync(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • startNotebookRuntimeOperationCallable() + *

  • startNotebookRuntimeCallable() + *

+ *

ListLocations

Lists information about the supported locations for this service.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listLocations(ListLocationsRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listLocationsPagedCallable() + *

  • listLocationsCallable() + *

+ *

GetLocation

Gets information about a location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getLocation(GetLocationRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getLocationCallable() + *

+ *

SetIamPolicy

Sets the access control policy on the specified resource. Replacesany existing policy. + *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • setIamPolicy(SetIamPolicyRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • setIamPolicyCallable() + *

+ *

GetIamPolicy

Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getIamPolicy(GetIamPolicyRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getIamPolicyCallable() + *

+ *

TestIamPermissions

Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a `NOT_FOUND` error. + *

Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • testIamPermissions(TestIamPermissionsRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • testIamPermissionsCallable() + *

+ *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of NotebookServiceSettings to + * create(). For example: + * + *

To customize credentials: + * + *

{@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
+ * NotebookServiceSettings notebookServiceSettings =
+ *     NotebookServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * NotebookServiceClient notebookServiceClient =
+ *     NotebookServiceClient.create(notebookServiceSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@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
+ * NotebookServiceSettings notebookServiceSettings =
+ *     NotebookServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * NotebookServiceClient notebookServiceClient =
+ *     NotebookServiceClient.create(notebookServiceSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class NotebookServiceClient implements BackgroundResource { + private final NotebookServiceSettings settings; + private final NotebookServiceStub stub; + private final OperationsClient operationsClient; + + /** Constructs an instance of NotebookServiceClient with default settings. */ + public static final NotebookServiceClient create() throws IOException { + return create(NotebookServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of NotebookServiceClient, using the given settings. The channels are + * created based on the settings passed in, or defaults for any settings that are not set. + */ + public static final NotebookServiceClient create(NotebookServiceSettings settings) + throws IOException { + return new NotebookServiceClient(settings); + } + + /** + * Constructs an instance of NotebookServiceClient, using the given stub for making calls. This is + * for advanced usage - prefer using create(NotebookServiceSettings). + */ + public static final NotebookServiceClient create(NotebookServiceStub stub) { + return new NotebookServiceClient(stub); + } + + /** + * Constructs an instance of NotebookServiceClient, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected NotebookServiceClient(NotebookServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((NotebookServiceStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + protected NotebookServiceClient(NotebookServiceStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + public final NotebookServiceSettings getSettings() { + return settings; + } + + public NotebookServiceStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final OperationsClient getOperationsClient() { + return operationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a NotebookRuntimeTemplate. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   NotebookRuntimeTemplate notebookRuntimeTemplate =
+   *       NotebookRuntimeTemplate.newBuilder().build();
+   *   String notebookRuntimeTemplateId = "notebookRuntimeTemplateId-633369454";
+   *   NotebookRuntimeTemplate response =
+   *       notebookServiceClient
+   *           .createNotebookRuntimeTemplateAsync(
+   *               parent, notebookRuntimeTemplate, notebookRuntimeTemplateId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The resource name of the Location to create the + * NotebookRuntimeTemplate. Format: `projects/{project}/locations/{location}` + * @param notebookRuntimeTemplate Required. The NotebookRuntimeTemplate to create. + * @param notebookRuntimeTemplateId Optional. User specified ID for the notebook runtime template. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture< + NotebookRuntimeTemplate, CreateNotebookRuntimeTemplateOperationMetadata> + createNotebookRuntimeTemplateAsync( + LocationName parent, + NotebookRuntimeTemplate notebookRuntimeTemplate, + String notebookRuntimeTemplateId) { + CreateNotebookRuntimeTemplateRequest request = + CreateNotebookRuntimeTemplateRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setNotebookRuntimeTemplate(notebookRuntimeTemplate) + .setNotebookRuntimeTemplateId(notebookRuntimeTemplateId) + .build(); + return createNotebookRuntimeTemplateAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a NotebookRuntimeTemplate. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   NotebookRuntimeTemplate notebookRuntimeTemplate =
+   *       NotebookRuntimeTemplate.newBuilder().build();
+   *   String notebookRuntimeTemplateId = "notebookRuntimeTemplateId-633369454";
+   *   NotebookRuntimeTemplate response =
+   *       notebookServiceClient
+   *           .createNotebookRuntimeTemplateAsync(
+   *               parent, notebookRuntimeTemplate, notebookRuntimeTemplateId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The resource name of the Location to create the + * NotebookRuntimeTemplate. Format: `projects/{project}/locations/{location}` + * @param notebookRuntimeTemplate Required. The NotebookRuntimeTemplate to create. + * @param notebookRuntimeTemplateId Optional. User specified ID for the notebook runtime template. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture< + NotebookRuntimeTemplate, CreateNotebookRuntimeTemplateOperationMetadata> + createNotebookRuntimeTemplateAsync( + String parent, + NotebookRuntimeTemplate notebookRuntimeTemplate, + String notebookRuntimeTemplateId) { + CreateNotebookRuntimeTemplateRequest request = + CreateNotebookRuntimeTemplateRequest.newBuilder() + .setParent(parent) + .setNotebookRuntimeTemplate(notebookRuntimeTemplate) + .setNotebookRuntimeTemplateId(notebookRuntimeTemplateId) + .build(); + return createNotebookRuntimeTemplateAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a NotebookRuntimeTemplate. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   CreateNotebookRuntimeTemplateRequest request =
+   *       CreateNotebookRuntimeTemplateRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setNotebookRuntimeTemplate(NotebookRuntimeTemplate.newBuilder().build())
+   *           .setNotebookRuntimeTemplateId("notebookRuntimeTemplateId-633369454")
+   *           .build();
+   *   NotebookRuntimeTemplate response =
+   *       notebookServiceClient.createNotebookRuntimeTemplateAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture< + NotebookRuntimeTemplate, CreateNotebookRuntimeTemplateOperationMetadata> + createNotebookRuntimeTemplateAsync(CreateNotebookRuntimeTemplateRequest request) { + return createNotebookRuntimeTemplateOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a NotebookRuntimeTemplate. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   CreateNotebookRuntimeTemplateRequest request =
+   *       CreateNotebookRuntimeTemplateRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setNotebookRuntimeTemplate(NotebookRuntimeTemplate.newBuilder().build())
+   *           .setNotebookRuntimeTemplateId("notebookRuntimeTemplateId-633369454")
+   *           .build();
+   *   OperationFuture
+   *       future =
+   *           notebookServiceClient
+   *               .createNotebookRuntimeTemplateOperationCallable()
+   *               .futureCall(request);
+   *   // Do something.
+   *   NotebookRuntimeTemplate response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + CreateNotebookRuntimeTemplateRequest, + NotebookRuntimeTemplate, + CreateNotebookRuntimeTemplateOperationMetadata> + createNotebookRuntimeTemplateOperationCallable() { + return stub.createNotebookRuntimeTemplateOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a NotebookRuntimeTemplate. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   CreateNotebookRuntimeTemplateRequest request =
+   *       CreateNotebookRuntimeTemplateRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setNotebookRuntimeTemplate(NotebookRuntimeTemplate.newBuilder().build())
+   *           .setNotebookRuntimeTemplateId("notebookRuntimeTemplateId-633369454")
+   *           .build();
+   *   ApiFuture future =
+   *       notebookServiceClient.createNotebookRuntimeTemplateCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + createNotebookRuntimeTemplateCallable() { + return stub.createNotebookRuntimeTemplateCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a NotebookRuntimeTemplate. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   NotebookRuntimeTemplateName name =
+   *       NotebookRuntimeTemplateName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]");
+   *   NotebookRuntimeTemplate response = notebookServiceClient.getNotebookRuntimeTemplate(name);
+   * }
+   * }
+ * + * @param name Required. The name of the NotebookRuntimeTemplate resource. Format: + * `projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final NotebookRuntimeTemplate getNotebookRuntimeTemplate( + NotebookRuntimeTemplateName name) { + GetNotebookRuntimeTemplateRequest request = + GetNotebookRuntimeTemplateRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getNotebookRuntimeTemplate(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a NotebookRuntimeTemplate. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   String name =
+   *       NotebookRuntimeTemplateName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]")
+   *           .toString();
+   *   NotebookRuntimeTemplate response = notebookServiceClient.getNotebookRuntimeTemplate(name);
+   * }
+   * }
+ * + * @param name Required. The name of the NotebookRuntimeTemplate resource. Format: + * `projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final NotebookRuntimeTemplate getNotebookRuntimeTemplate(String name) { + GetNotebookRuntimeTemplateRequest request = + GetNotebookRuntimeTemplateRequest.newBuilder().setName(name).build(); + return getNotebookRuntimeTemplate(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a NotebookRuntimeTemplate. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   GetNotebookRuntimeTemplateRequest request =
+   *       GetNotebookRuntimeTemplateRequest.newBuilder()
+   *           .setName(
+   *               NotebookRuntimeTemplateName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]")
+   *                   .toString())
+   *           .build();
+   *   NotebookRuntimeTemplate response = notebookServiceClient.getNotebookRuntimeTemplate(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final NotebookRuntimeTemplate getNotebookRuntimeTemplate( + GetNotebookRuntimeTemplateRequest request) { + return getNotebookRuntimeTemplateCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a NotebookRuntimeTemplate. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   GetNotebookRuntimeTemplateRequest request =
+   *       GetNotebookRuntimeTemplateRequest.newBuilder()
+   *           .setName(
+   *               NotebookRuntimeTemplateName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       notebookServiceClient.getNotebookRuntimeTemplateCallable().futureCall(request);
+   *   // Do something.
+   *   NotebookRuntimeTemplate response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + getNotebookRuntimeTemplateCallable() { + return stub.getNotebookRuntimeTemplateCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists NotebookRuntimeTemplates in a Location. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (NotebookRuntimeTemplate element :
+   *       notebookServiceClient.listNotebookRuntimeTemplates(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The resource name of the Location from which to list the + * NotebookRuntimeTemplates. Format: `projects/{project}/locations/{location}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListNotebookRuntimeTemplatesPagedResponse listNotebookRuntimeTemplates( + LocationName parent) { + ListNotebookRuntimeTemplatesRequest request = + ListNotebookRuntimeTemplatesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listNotebookRuntimeTemplates(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists NotebookRuntimeTemplates in a Location. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (NotebookRuntimeTemplate element :
+   *       notebookServiceClient.listNotebookRuntimeTemplates(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The resource name of the Location from which to list the + * NotebookRuntimeTemplates. Format: `projects/{project}/locations/{location}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListNotebookRuntimeTemplatesPagedResponse listNotebookRuntimeTemplates( + String parent) { + ListNotebookRuntimeTemplatesRequest request = + ListNotebookRuntimeTemplatesRequest.newBuilder().setParent(parent).build(); + return listNotebookRuntimeTemplates(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists NotebookRuntimeTemplates in a Location. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   ListNotebookRuntimeTemplatesRequest request =
+   *       ListNotebookRuntimeTemplatesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setReadMask(FieldMask.newBuilder().build())
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (NotebookRuntimeTemplate element :
+   *       notebookServiceClient.listNotebookRuntimeTemplates(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListNotebookRuntimeTemplatesPagedResponse listNotebookRuntimeTemplates( + ListNotebookRuntimeTemplatesRequest request) { + return listNotebookRuntimeTemplatesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists NotebookRuntimeTemplates in a Location. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   ListNotebookRuntimeTemplatesRequest request =
+   *       ListNotebookRuntimeTemplatesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setReadMask(FieldMask.newBuilder().build())
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       notebookServiceClient.listNotebookRuntimeTemplatesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (NotebookRuntimeTemplate element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable< + ListNotebookRuntimeTemplatesRequest, ListNotebookRuntimeTemplatesPagedResponse> + listNotebookRuntimeTemplatesPagedCallable() { + return stub.listNotebookRuntimeTemplatesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists NotebookRuntimeTemplates in a Location. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   ListNotebookRuntimeTemplatesRequest request =
+   *       ListNotebookRuntimeTemplatesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setReadMask(FieldMask.newBuilder().build())
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListNotebookRuntimeTemplatesResponse response =
+   *         notebookServiceClient.listNotebookRuntimeTemplatesCallable().call(request);
+   *     for (NotebookRuntimeTemplate element : response.getNotebookRuntimeTemplatesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable< + ListNotebookRuntimeTemplatesRequest, ListNotebookRuntimeTemplatesResponse> + listNotebookRuntimeTemplatesCallable() { + return stub.listNotebookRuntimeTemplatesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a NotebookRuntimeTemplate. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   NotebookRuntimeTemplateName name =
+   *       NotebookRuntimeTemplateName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]");
+   *   notebookServiceClient.deleteNotebookRuntimeTemplateAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the NotebookRuntimeTemplate resource to be deleted. Format: + * `projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteNotebookRuntimeTemplateAsync( + NotebookRuntimeTemplateName name) { + DeleteNotebookRuntimeTemplateRequest request = + DeleteNotebookRuntimeTemplateRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return deleteNotebookRuntimeTemplateAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a NotebookRuntimeTemplate. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   String name =
+   *       NotebookRuntimeTemplateName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]")
+   *           .toString();
+   *   notebookServiceClient.deleteNotebookRuntimeTemplateAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the NotebookRuntimeTemplate resource to be deleted. Format: + * `projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteNotebookRuntimeTemplateAsync( + String name) { + DeleteNotebookRuntimeTemplateRequest request = + DeleteNotebookRuntimeTemplateRequest.newBuilder().setName(name).build(); + return deleteNotebookRuntimeTemplateAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a NotebookRuntimeTemplate. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   DeleteNotebookRuntimeTemplateRequest request =
+   *       DeleteNotebookRuntimeTemplateRequest.newBuilder()
+   *           .setName(
+   *               NotebookRuntimeTemplateName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]")
+   *                   .toString())
+   *           .build();
+   *   notebookServiceClient.deleteNotebookRuntimeTemplateAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteNotebookRuntimeTemplateAsync( + DeleteNotebookRuntimeTemplateRequest request) { + return deleteNotebookRuntimeTemplateOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a NotebookRuntimeTemplate. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   DeleteNotebookRuntimeTemplateRequest request =
+   *       DeleteNotebookRuntimeTemplateRequest.newBuilder()
+   *           .setName(
+   *               NotebookRuntimeTemplateName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]")
+   *                   .toString())
+   *           .build();
+   *   OperationFuture future =
+   *       notebookServiceClient
+   *           .deleteNotebookRuntimeTemplateOperationCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + DeleteNotebookRuntimeTemplateRequest, Empty, DeleteOperationMetadata> + deleteNotebookRuntimeTemplateOperationCallable() { + return stub.deleteNotebookRuntimeTemplateOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a NotebookRuntimeTemplate. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   DeleteNotebookRuntimeTemplateRequest request =
+   *       DeleteNotebookRuntimeTemplateRequest.newBuilder()
+   *           .setName(
+   *               NotebookRuntimeTemplateName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       notebookServiceClient.deleteNotebookRuntimeTemplateCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + deleteNotebookRuntimeTemplateCallable() { + return stub.deleteNotebookRuntimeTemplateCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Assigns a NotebookRuntime to a user for a particular Notebook file. This method will either + * returns an existing assignment or generates a new one. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   NotebookRuntimeTemplateName notebookRuntimeTemplate =
+   *       NotebookRuntimeTemplateName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]");
+   *   NotebookRuntime notebookRuntime = NotebookRuntime.newBuilder().build();
+   *   String notebookRuntimeId = "notebookRuntimeId400795512";
+   *   NotebookRuntime response =
+   *       notebookServiceClient
+   *           .assignNotebookRuntimeAsync(
+   *               parent, notebookRuntimeTemplate, notebookRuntime, notebookRuntimeId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The resource name of the Location to get the NotebookRuntime + * assignment. Format: `projects/{project}/locations/{location}` + * @param notebookRuntimeTemplate Required. The resource name of the NotebookRuntimeTemplate based + * on which a NotebookRuntime will be assigned (reuse or create a new one). + * @param notebookRuntime Required. Provide runtime specific information (e.g. runtime owner, + * notebook id) used for NotebookRuntime assignment. + * @param notebookRuntimeId Optional. User specified ID for the notebook runtime. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + assignNotebookRuntimeAsync( + LocationName parent, + NotebookRuntimeTemplateName notebookRuntimeTemplate, + NotebookRuntime notebookRuntime, + String notebookRuntimeId) { + AssignNotebookRuntimeRequest request = + AssignNotebookRuntimeRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setNotebookRuntimeTemplate( + notebookRuntimeTemplate == null ? null : notebookRuntimeTemplate.toString()) + .setNotebookRuntime(notebookRuntime) + .setNotebookRuntimeId(notebookRuntimeId) + .build(); + return assignNotebookRuntimeAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Assigns a NotebookRuntime to a user for a particular Notebook file. This method will either + * returns an existing assignment or generates a new one. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   String notebookRuntimeTemplate =
+   *       NotebookRuntimeTemplateName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]")
+   *           .toString();
+   *   NotebookRuntime notebookRuntime = NotebookRuntime.newBuilder().build();
+   *   String notebookRuntimeId = "notebookRuntimeId400795512";
+   *   NotebookRuntime response =
+   *       notebookServiceClient
+   *           .assignNotebookRuntimeAsync(
+   *               parent, notebookRuntimeTemplate, notebookRuntime, notebookRuntimeId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The resource name of the Location to get the NotebookRuntime + * assignment. Format: `projects/{project}/locations/{location}` + * @param notebookRuntimeTemplate Required. The resource name of the NotebookRuntimeTemplate based + * on which a NotebookRuntime will be assigned (reuse or create a new one). + * @param notebookRuntime Required. Provide runtime specific information (e.g. runtime owner, + * notebook id) used for NotebookRuntime assignment. + * @param notebookRuntimeId Optional. User specified ID for the notebook runtime. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + assignNotebookRuntimeAsync( + LocationName parent, + String notebookRuntimeTemplate, + NotebookRuntime notebookRuntime, + String notebookRuntimeId) { + AssignNotebookRuntimeRequest request = + AssignNotebookRuntimeRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setNotebookRuntimeTemplate(notebookRuntimeTemplate) + .setNotebookRuntime(notebookRuntime) + .setNotebookRuntimeId(notebookRuntimeId) + .build(); + return assignNotebookRuntimeAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Assigns a NotebookRuntime to a user for a particular Notebook file. This method will either + * returns an existing assignment or generates a new one. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   NotebookRuntimeTemplateName notebookRuntimeTemplate =
+   *       NotebookRuntimeTemplateName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]");
+   *   NotebookRuntime notebookRuntime = NotebookRuntime.newBuilder().build();
+   *   String notebookRuntimeId = "notebookRuntimeId400795512";
+   *   NotebookRuntime response =
+   *       notebookServiceClient
+   *           .assignNotebookRuntimeAsync(
+   *               parent, notebookRuntimeTemplate, notebookRuntime, notebookRuntimeId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The resource name of the Location to get the NotebookRuntime + * assignment. Format: `projects/{project}/locations/{location}` + * @param notebookRuntimeTemplate Required. The resource name of the NotebookRuntimeTemplate based + * on which a NotebookRuntime will be assigned (reuse or create a new one). + * @param notebookRuntime Required. Provide runtime specific information (e.g. runtime owner, + * notebook id) used for NotebookRuntime assignment. + * @param notebookRuntimeId Optional. User specified ID for the notebook runtime. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + assignNotebookRuntimeAsync( + String parent, + NotebookRuntimeTemplateName notebookRuntimeTemplate, + NotebookRuntime notebookRuntime, + String notebookRuntimeId) { + AssignNotebookRuntimeRequest request = + AssignNotebookRuntimeRequest.newBuilder() + .setParent(parent) + .setNotebookRuntimeTemplate( + notebookRuntimeTemplate == null ? null : notebookRuntimeTemplate.toString()) + .setNotebookRuntime(notebookRuntime) + .setNotebookRuntimeId(notebookRuntimeId) + .build(); + return assignNotebookRuntimeAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Assigns a NotebookRuntime to a user for a particular Notebook file. This method will either + * returns an existing assignment or generates a new one. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   String notebookRuntimeTemplate =
+   *       NotebookRuntimeTemplateName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]")
+   *           .toString();
+   *   NotebookRuntime notebookRuntime = NotebookRuntime.newBuilder().build();
+   *   String notebookRuntimeId = "notebookRuntimeId400795512";
+   *   NotebookRuntime response =
+   *       notebookServiceClient
+   *           .assignNotebookRuntimeAsync(
+   *               parent, notebookRuntimeTemplate, notebookRuntime, notebookRuntimeId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The resource name of the Location to get the NotebookRuntime + * assignment. Format: `projects/{project}/locations/{location}` + * @param notebookRuntimeTemplate Required. The resource name of the NotebookRuntimeTemplate based + * on which a NotebookRuntime will be assigned (reuse or create a new one). + * @param notebookRuntime Required. Provide runtime specific information (e.g. runtime owner, + * notebook id) used for NotebookRuntime assignment. + * @param notebookRuntimeId Optional. User specified ID for the notebook runtime. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + assignNotebookRuntimeAsync( + String parent, + String notebookRuntimeTemplate, + NotebookRuntime notebookRuntime, + String notebookRuntimeId) { + AssignNotebookRuntimeRequest request = + AssignNotebookRuntimeRequest.newBuilder() + .setParent(parent) + .setNotebookRuntimeTemplate(notebookRuntimeTemplate) + .setNotebookRuntime(notebookRuntime) + .setNotebookRuntimeId(notebookRuntimeId) + .build(); + return assignNotebookRuntimeAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Assigns a NotebookRuntime to a user for a particular Notebook file. This method will either + * returns an existing assignment or generates a new one. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   AssignNotebookRuntimeRequest request =
+   *       AssignNotebookRuntimeRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setNotebookRuntimeTemplate(
+   *               NotebookRuntimeTemplateName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]")
+   *                   .toString())
+   *           .setNotebookRuntime(NotebookRuntime.newBuilder().build())
+   *           .setNotebookRuntimeId("notebookRuntimeId400795512")
+   *           .build();
+   *   NotebookRuntime response = notebookServiceClient.assignNotebookRuntimeAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + assignNotebookRuntimeAsync(AssignNotebookRuntimeRequest request) { + return assignNotebookRuntimeOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Assigns a NotebookRuntime to a user for a particular Notebook file. This method will either + * returns an existing assignment or generates a new one. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   AssignNotebookRuntimeRequest request =
+   *       AssignNotebookRuntimeRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setNotebookRuntimeTemplate(
+   *               NotebookRuntimeTemplateName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]")
+   *                   .toString())
+   *           .setNotebookRuntime(NotebookRuntime.newBuilder().build())
+   *           .setNotebookRuntimeId("notebookRuntimeId400795512")
+   *           .build();
+   *   OperationFuture future =
+   *       notebookServiceClient.assignNotebookRuntimeOperationCallable().futureCall(request);
+   *   // Do something.
+   *   NotebookRuntime response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + AssignNotebookRuntimeRequest, NotebookRuntime, AssignNotebookRuntimeOperationMetadata> + assignNotebookRuntimeOperationCallable() { + return stub.assignNotebookRuntimeOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Assigns a NotebookRuntime to a user for a particular Notebook file. This method will either + * returns an existing assignment or generates a new one. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   AssignNotebookRuntimeRequest request =
+   *       AssignNotebookRuntimeRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setNotebookRuntimeTemplate(
+   *               NotebookRuntimeTemplateName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]")
+   *                   .toString())
+   *           .setNotebookRuntime(NotebookRuntime.newBuilder().build())
+   *           .setNotebookRuntimeId("notebookRuntimeId400795512")
+   *           .build();
+   *   ApiFuture future =
+   *       notebookServiceClient.assignNotebookRuntimeCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + assignNotebookRuntimeCallable() { + return stub.assignNotebookRuntimeCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a NotebookRuntime. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   NotebookRuntimeName name =
+   *       NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]");
+   *   NotebookRuntime response = notebookServiceClient.getNotebookRuntime(name);
+   * }
+   * }
+ * + * @param name Required. The name of the NotebookRuntime resource. Instead of checking whether the + * name is in valid NotebookRuntime resource name format, directly throw NotFound exception if + * there is no such NotebookRuntime in spanner. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final NotebookRuntime getNotebookRuntime(NotebookRuntimeName name) { + GetNotebookRuntimeRequest request = + GetNotebookRuntimeRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getNotebookRuntime(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a NotebookRuntime. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   String name =
+   *       NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]").toString();
+   *   NotebookRuntime response = notebookServiceClient.getNotebookRuntime(name);
+   * }
+   * }
+ * + * @param name Required. The name of the NotebookRuntime resource. Instead of checking whether the + * name is in valid NotebookRuntime resource name format, directly throw NotFound exception if + * there is no such NotebookRuntime in spanner. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final NotebookRuntime getNotebookRuntime(String name) { + GetNotebookRuntimeRequest request = + GetNotebookRuntimeRequest.newBuilder().setName(name).build(); + return getNotebookRuntime(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a NotebookRuntime. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   GetNotebookRuntimeRequest request =
+   *       GetNotebookRuntimeRequest.newBuilder()
+   *           .setName(
+   *               NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]")
+   *                   .toString())
+   *           .build();
+   *   NotebookRuntime response = notebookServiceClient.getNotebookRuntime(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final NotebookRuntime getNotebookRuntime(GetNotebookRuntimeRequest request) { + return getNotebookRuntimeCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a NotebookRuntime. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   GetNotebookRuntimeRequest request =
+   *       GetNotebookRuntimeRequest.newBuilder()
+   *           .setName(
+   *               NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       notebookServiceClient.getNotebookRuntimeCallable().futureCall(request);
+   *   // Do something.
+   *   NotebookRuntime response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + getNotebookRuntimeCallable() { + return stub.getNotebookRuntimeCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists NotebookRuntimes in a Location. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (NotebookRuntime element :
+   *       notebookServiceClient.listNotebookRuntimes(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The resource name of the Location from which to list the + * NotebookRuntimes. Format: `projects/{project}/locations/{location}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListNotebookRuntimesPagedResponse listNotebookRuntimes(LocationName parent) { + ListNotebookRuntimesRequest request = + ListNotebookRuntimesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listNotebookRuntimes(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists NotebookRuntimes in a Location. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (NotebookRuntime element :
+   *       notebookServiceClient.listNotebookRuntimes(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The resource name of the Location from which to list the + * NotebookRuntimes. Format: `projects/{project}/locations/{location}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListNotebookRuntimesPagedResponse listNotebookRuntimes(String parent) { + ListNotebookRuntimesRequest request = + ListNotebookRuntimesRequest.newBuilder().setParent(parent).build(); + return listNotebookRuntimes(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists NotebookRuntimes in a Location. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   ListNotebookRuntimesRequest request =
+   *       ListNotebookRuntimesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setReadMask(FieldMask.newBuilder().build())
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (NotebookRuntime element :
+   *       notebookServiceClient.listNotebookRuntimes(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListNotebookRuntimesPagedResponse listNotebookRuntimes( + ListNotebookRuntimesRequest request) { + return listNotebookRuntimesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists NotebookRuntimes in a Location. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   ListNotebookRuntimesRequest request =
+   *       ListNotebookRuntimesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setReadMask(FieldMask.newBuilder().build())
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       notebookServiceClient.listNotebookRuntimesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (NotebookRuntime element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listNotebookRuntimesPagedCallable() { + return stub.listNotebookRuntimesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists NotebookRuntimes in a Location. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   ListNotebookRuntimesRequest request =
+   *       ListNotebookRuntimesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setReadMask(FieldMask.newBuilder().build())
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListNotebookRuntimesResponse response =
+   *         notebookServiceClient.listNotebookRuntimesCallable().call(request);
+   *     for (NotebookRuntime element : response.getNotebookRuntimesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listNotebookRuntimesCallable() { + return stub.listNotebookRuntimesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a NotebookRuntime. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   NotebookRuntimeName name =
+   *       NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]");
+   *   notebookServiceClient.deleteNotebookRuntimeAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the NotebookRuntime resource to be deleted. Instead of + * checking whether the name is in valid NotebookRuntime resource name format, directly throw + * NotFound exception if there is no such NotebookRuntime in spanner. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteNotebookRuntimeAsync( + NotebookRuntimeName name) { + DeleteNotebookRuntimeRequest request = + DeleteNotebookRuntimeRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return deleteNotebookRuntimeAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a NotebookRuntime. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   String name =
+   *       NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]").toString();
+   *   notebookServiceClient.deleteNotebookRuntimeAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the NotebookRuntime resource to be deleted. Instead of + * checking whether the name is in valid NotebookRuntime resource name format, directly throw + * NotFound exception if there is no such NotebookRuntime in spanner. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteNotebookRuntimeAsync( + String name) { + DeleteNotebookRuntimeRequest request = + DeleteNotebookRuntimeRequest.newBuilder().setName(name).build(); + return deleteNotebookRuntimeAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a NotebookRuntime. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   DeleteNotebookRuntimeRequest request =
+   *       DeleteNotebookRuntimeRequest.newBuilder()
+   *           .setName(
+   *               NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]")
+   *                   .toString())
+   *           .build();
+   *   notebookServiceClient.deleteNotebookRuntimeAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteNotebookRuntimeAsync( + DeleteNotebookRuntimeRequest request) { + return deleteNotebookRuntimeOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a NotebookRuntime. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   DeleteNotebookRuntimeRequest request =
+   *       DeleteNotebookRuntimeRequest.newBuilder()
+   *           .setName(
+   *               NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]")
+   *                   .toString())
+   *           .build();
+   *   OperationFuture future =
+   *       notebookServiceClient.deleteNotebookRuntimeOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteNotebookRuntimeOperationCallable() { + return stub.deleteNotebookRuntimeOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a NotebookRuntime. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   DeleteNotebookRuntimeRequest request =
+   *       DeleteNotebookRuntimeRequest.newBuilder()
+   *           .setName(
+   *               NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       notebookServiceClient.deleteNotebookRuntimeCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + deleteNotebookRuntimeCallable() { + return stub.deleteNotebookRuntimeCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Upgrades a NotebookRuntime. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   NotebookRuntimeName name =
+   *       NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]");
+   *   UpgradeNotebookRuntimeResponse response =
+   *       notebookServiceClient.upgradeNotebookRuntimeAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the NotebookRuntime resource to be upgrade. Instead of + * checking whether the name is in valid NotebookRuntime resource name format, directly throw + * NotFound exception if there is no such NotebookRuntime in spanner. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture< + UpgradeNotebookRuntimeResponse, UpgradeNotebookRuntimeOperationMetadata> + upgradeNotebookRuntimeAsync(NotebookRuntimeName name) { + UpgradeNotebookRuntimeRequest request = + UpgradeNotebookRuntimeRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return upgradeNotebookRuntimeAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Upgrades a NotebookRuntime. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   String name =
+   *       NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]").toString();
+   *   UpgradeNotebookRuntimeResponse response =
+   *       notebookServiceClient.upgradeNotebookRuntimeAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the NotebookRuntime resource to be upgrade. Instead of + * checking whether the name is in valid NotebookRuntime resource name format, directly throw + * NotFound exception if there is no such NotebookRuntime in spanner. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture< + UpgradeNotebookRuntimeResponse, UpgradeNotebookRuntimeOperationMetadata> + upgradeNotebookRuntimeAsync(String name) { + UpgradeNotebookRuntimeRequest request = + UpgradeNotebookRuntimeRequest.newBuilder().setName(name).build(); + return upgradeNotebookRuntimeAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Upgrades a NotebookRuntime. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   UpgradeNotebookRuntimeRequest request =
+   *       UpgradeNotebookRuntimeRequest.newBuilder()
+   *           .setName(
+   *               NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]")
+   *                   .toString())
+   *           .build();
+   *   UpgradeNotebookRuntimeResponse response =
+   *       notebookServiceClient.upgradeNotebookRuntimeAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture< + UpgradeNotebookRuntimeResponse, UpgradeNotebookRuntimeOperationMetadata> + upgradeNotebookRuntimeAsync(UpgradeNotebookRuntimeRequest request) { + return upgradeNotebookRuntimeOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Upgrades a NotebookRuntime. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   UpgradeNotebookRuntimeRequest request =
+   *       UpgradeNotebookRuntimeRequest.newBuilder()
+   *           .setName(
+   *               NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]")
+   *                   .toString())
+   *           .build();
+   *   OperationFuture
+   *       future =
+   *           notebookServiceClient.upgradeNotebookRuntimeOperationCallable().futureCall(request);
+   *   // Do something.
+   *   UpgradeNotebookRuntimeResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + UpgradeNotebookRuntimeRequest, + UpgradeNotebookRuntimeResponse, + UpgradeNotebookRuntimeOperationMetadata> + upgradeNotebookRuntimeOperationCallable() { + return stub.upgradeNotebookRuntimeOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Upgrades a NotebookRuntime. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   UpgradeNotebookRuntimeRequest request =
+   *       UpgradeNotebookRuntimeRequest.newBuilder()
+   *           .setName(
+   *               NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       notebookServiceClient.upgradeNotebookRuntimeCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + upgradeNotebookRuntimeCallable() { + return stub.upgradeNotebookRuntimeCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Starts a NotebookRuntime. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   NotebookRuntimeName name =
+   *       NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]");
+   *   StartNotebookRuntimeResponse response =
+   *       notebookServiceClient.startNotebookRuntimeAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the NotebookRuntime resource to be started. Instead of + * checking whether the name is in valid NotebookRuntime resource name format, directly throw + * NotFound exception if there is no such NotebookRuntime in spanner. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + startNotebookRuntimeAsync(NotebookRuntimeName name) { + StartNotebookRuntimeRequest request = + StartNotebookRuntimeRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return startNotebookRuntimeAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Starts a NotebookRuntime. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   String name =
+   *       NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]").toString();
+   *   StartNotebookRuntimeResponse response =
+   *       notebookServiceClient.startNotebookRuntimeAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the NotebookRuntime resource to be started. Instead of + * checking whether the name is in valid NotebookRuntime resource name format, directly throw + * NotFound exception if there is no such NotebookRuntime in spanner. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + startNotebookRuntimeAsync(String name) { + StartNotebookRuntimeRequest request = + StartNotebookRuntimeRequest.newBuilder().setName(name).build(); + return startNotebookRuntimeAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Starts a NotebookRuntime. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   StartNotebookRuntimeRequest request =
+   *       StartNotebookRuntimeRequest.newBuilder()
+   *           .setName(
+   *               NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]")
+   *                   .toString())
+   *           .build();
+   *   StartNotebookRuntimeResponse response =
+   *       notebookServiceClient.startNotebookRuntimeAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + startNotebookRuntimeAsync(StartNotebookRuntimeRequest request) { + return startNotebookRuntimeOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Starts a NotebookRuntime. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   StartNotebookRuntimeRequest request =
+   *       StartNotebookRuntimeRequest.newBuilder()
+   *           .setName(
+   *               NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]")
+   *                   .toString())
+   *           .build();
+   *   OperationFuture future =
+   *       notebookServiceClient.startNotebookRuntimeOperationCallable().futureCall(request);
+   *   // Do something.
+   *   StartNotebookRuntimeResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + StartNotebookRuntimeRequest, + StartNotebookRuntimeResponse, + StartNotebookRuntimeOperationMetadata> + startNotebookRuntimeOperationCallable() { + return stub.startNotebookRuntimeOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Starts a NotebookRuntime. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   StartNotebookRuntimeRequest request =
+   *       StartNotebookRuntimeRequest.newBuilder()
+   *           .setName(
+   *               NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       notebookServiceClient.startNotebookRuntimeCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + startNotebookRuntimeCallable() { + return stub.startNotebookRuntimeCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Location element : notebookServiceClient.listLocations(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListLocationsPagedResponse listLocations(ListLocationsRequest request) { + return listLocationsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       notebookServiceClient.listLocationsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Location element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listLocationsPagedCallable() { + return stub.listLocationsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListLocationsResponse response =
+   *         notebookServiceClient.listLocationsCallable().call(request);
+   *     for (Location element : response.getLocationsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listLocationsCallable() { + return stub.listLocationsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   Location response = notebookServiceClient.getLocation(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Location getLocation(GetLocationRequest request) { + return getLocationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future = notebookServiceClient.getLocationCallable().futureCall(request);
+   *   // Do something.
+   *   Location response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getLocationCallable() { + return stub.getLocationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the access control policy on the specified resource. Replacesany existing policy. + * + *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   SetIamPolicyRequest request =
+   *       SetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Policy response = notebookServiceClient.setIamPolicy(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Policy setIamPolicy(SetIamPolicyRequest request) { + return setIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the access control policy on the specified resource. Replacesany existing policy. + * + *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   SetIamPolicyRequest request =
+   *       SetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = notebookServiceClient.setIamPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Policy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable setIamPolicyCallable() { + return stub.setIamPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the access control policy for a resource. Returns an empty policyif the resource exists + * and does not have a policy set. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   GetIamPolicyRequest request =
+   *       GetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .setOptions(GetPolicyOptions.newBuilder().build())
+   *           .build();
+   *   Policy response = notebookServiceClient.getIamPolicy(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Policy getIamPolicy(GetIamPolicyRequest request) { + return getIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the access control policy for a resource. Returns an empty policyif the resource exists + * and does not have a policy set. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   GetIamPolicyRequest request =
+   *       GetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .setOptions(GetPolicyOptions.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = notebookServiceClient.getIamPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Policy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getIamPolicyCallable() { + return stub.getIamPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns permissions that a caller has on the specified resource. If theresource does not exist, + * this will return an empty set ofpermissions, not a `NOT_FOUND` error. + * + *

Note: This operation is designed to be used for buildingpermission-aware UIs and + * command-line tools, not for authorizationchecking. This operation may "fail open" without + * warning. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   TestIamPermissionsRequest request =
+   *       TestIamPermissionsRequest.newBuilder()
+   *           .setResource(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .addAllPermissions(new ArrayList())
+   *           .build();
+   *   TestIamPermissionsResponse response = notebookServiceClient.testIamPermissions(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) { + return testIamPermissionsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns permissions that a caller has on the specified resource. If theresource does not exist, + * this will return an empty set ofpermissions, not a `NOT_FOUND` error. + * + *

Note: This operation is designed to be used for buildingpermission-aware UIs and + * command-line tools, not for authorizationchecking. This operation may "fail open" without + * warning. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   TestIamPermissionsRequest request =
+   *       TestIamPermissionsRequest.newBuilder()
+   *           .setResource(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .addAllPermissions(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       notebookServiceClient.testIamPermissionsCallable().futureCall(request);
+   *   // Do something.
+   *   TestIamPermissionsResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + testIamPermissionsCallable() { + return stub.testIamPermissionsCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListNotebookRuntimeTemplatesPagedResponse + extends AbstractPagedListResponse< + ListNotebookRuntimeTemplatesRequest, + ListNotebookRuntimeTemplatesResponse, + NotebookRuntimeTemplate, + ListNotebookRuntimeTemplatesPage, + ListNotebookRuntimeTemplatesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + ListNotebookRuntimeTemplatesRequest, + ListNotebookRuntimeTemplatesResponse, + NotebookRuntimeTemplate> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListNotebookRuntimeTemplatesPage.createEmptyPage() + .createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListNotebookRuntimeTemplatesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListNotebookRuntimeTemplatesPagedResponse(ListNotebookRuntimeTemplatesPage page) { + super(page, ListNotebookRuntimeTemplatesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListNotebookRuntimeTemplatesPage + extends AbstractPage< + ListNotebookRuntimeTemplatesRequest, + ListNotebookRuntimeTemplatesResponse, + NotebookRuntimeTemplate, + ListNotebookRuntimeTemplatesPage> { + + private ListNotebookRuntimeTemplatesPage( + PageContext< + ListNotebookRuntimeTemplatesRequest, + ListNotebookRuntimeTemplatesResponse, + NotebookRuntimeTemplate> + context, + ListNotebookRuntimeTemplatesResponse response) { + super(context, response); + } + + private static ListNotebookRuntimeTemplatesPage createEmptyPage() { + return new ListNotebookRuntimeTemplatesPage(null, null); + } + + @Override + protected ListNotebookRuntimeTemplatesPage createPage( + PageContext< + ListNotebookRuntimeTemplatesRequest, + ListNotebookRuntimeTemplatesResponse, + NotebookRuntimeTemplate> + context, + ListNotebookRuntimeTemplatesResponse response) { + return new ListNotebookRuntimeTemplatesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext< + ListNotebookRuntimeTemplatesRequest, + ListNotebookRuntimeTemplatesResponse, + NotebookRuntimeTemplate> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListNotebookRuntimeTemplatesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListNotebookRuntimeTemplatesRequest, + ListNotebookRuntimeTemplatesResponse, + NotebookRuntimeTemplate, + ListNotebookRuntimeTemplatesPage, + ListNotebookRuntimeTemplatesFixedSizeCollection> { + + private ListNotebookRuntimeTemplatesFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListNotebookRuntimeTemplatesFixedSizeCollection createEmptyCollection() { + return new ListNotebookRuntimeTemplatesFixedSizeCollection(null, 0); + } + + @Override + protected ListNotebookRuntimeTemplatesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListNotebookRuntimeTemplatesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListNotebookRuntimesPagedResponse + extends AbstractPagedListResponse< + ListNotebookRuntimesRequest, + ListNotebookRuntimesResponse, + NotebookRuntime, + ListNotebookRuntimesPage, + ListNotebookRuntimesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListNotebookRuntimesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListNotebookRuntimesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListNotebookRuntimesPagedResponse(ListNotebookRuntimesPage page) { + super(page, ListNotebookRuntimesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListNotebookRuntimesPage + extends AbstractPage< + ListNotebookRuntimesRequest, + ListNotebookRuntimesResponse, + NotebookRuntime, + ListNotebookRuntimesPage> { + + private ListNotebookRuntimesPage( + PageContext + context, + ListNotebookRuntimesResponse response) { + super(context, response); + } + + private static ListNotebookRuntimesPage createEmptyPage() { + return new ListNotebookRuntimesPage(null, null); + } + + @Override + protected ListNotebookRuntimesPage createPage( + PageContext + context, + ListNotebookRuntimesResponse response) { + return new ListNotebookRuntimesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListNotebookRuntimesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListNotebookRuntimesRequest, + ListNotebookRuntimesResponse, + NotebookRuntime, + ListNotebookRuntimesPage, + ListNotebookRuntimesFixedSizeCollection> { + + private ListNotebookRuntimesFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListNotebookRuntimesFixedSizeCollection createEmptyCollection() { + return new ListNotebookRuntimesFixedSizeCollection(null, 0); + } + + @Override + protected ListNotebookRuntimesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListNotebookRuntimesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListLocationsPagedResponse + extends AbstractPagedListResponse< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListLocationsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListLocationsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListLocationsPagedResponse(ListLocationsPage page) { + super(page, ListLocationsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListLocationsPage + extends AbstractPage< + ListLocationsRequest, ListLocationsResponse, Location, ListLocationsPage> { + + private ListLocationsPage( + PageContext context, + ListLocationsResponse response) { + super(context, response); + } + + private static ListLocationsPage createEmptyPage() { + return new ListLocationsPage(null, null); + } + + @Override + protected ListLocationsPage createPage( + PageContext context, + ListLocationsResponse response) { + return new ListLocationsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListLocationsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + private ListLocationsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListLocationsFixedSizeCollection createEmptyCollection() { + return new ListLocationsFixedSizeCollection(null, 0); + } + + @Override + protected ListLocationsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListLocationsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/NotebookServiceSettings.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/NotebookServiceSettings.java new file mode 100644 index 000000000000..41da68aa4379 --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/NotebookServiceSettings.java @@ -0,0 +1,479 @@ +/* + * Copyright 2024 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.aiplatform.v1; + +import static com.google.cloud.aiplatform.v1.NotebookServiceClient.ListLocationsPagedResponse; +import static com.google.cloud.aiplatform.v1.NotebookServiceClient.ListNotebookRuntimeTemplatesPagedResponse; +import static com.google.cloud.aiplatform.v1.NotebookServiceClient.ListNotebookRuntimesPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.aiplatform.v1.stub.NotebookServiceStubSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link NotebookServiceClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (aiplatform.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of getNotebookRuntimeTemplate to 30 seconds: + * + *

{@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
+ * NotebookServiceSettings.Builder notebookServiceSettingsBuilder =
+ *     NotebookServiceSettings.newBuilder();
+ * notebookServiceSettingsBuilder
+ *     .getNotebookRuntimeTemplateSettings()
+ *     .setRetrySettings(
+ *         notebookServiceSettingsBuilder
+ *             .getNotebookRuntimeTemplateSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * NotebookServiceSettings notebookServiceSettings = notebookServiceSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class NotebookServiceSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to createNotebookRuntimeTemplate. */ + public UnaryCallSettings + createNotebookRuntimeTemplateSettings() { + return ((NotebookServiceStubSettings) getStubSettings()) + .createNotebookRuntimeTemplateSettings(); + } + + /** Returns the object with the settings used for calls to createNotebookRuntimeTemplate. */ + public OperationCallSettings< + CreateNotebookRuntimeTemplateRequest, + NotebookRuntimeTemplate, + CreateNotebookRuntimeTemplateOperationMetadata> + createNotebookRuntimeTemplateOperationSettings() { + return ((NotebookServiceStubSettings) getStubSettings()) + .createNotebookRuntimeTemplateOperationSettings(); + } + + /** Returns the object with the settings used for calls to getNotebookRuntimeTemplate. */ + public UnaryCallSettings + getNotebookRuntimeTemplateSettings() { + return ((NotebookServiceStubSettings) getStubSettings()).getNotebookRuntimeTemplateSettings(); + } + + /** Returns the object with the settings used for calls to listNotebookRuntimeTemplates. */ + public PagedCallSettings< + ListNotebookRuntimeTemplatesRequest, + ListNotebookRuntimeTemplatesResponse, + ListNotebookRuntimeTemplatesPagedResponse> + listNotebookRuntimeTemplatesSettings() { + return ((NotebookServiceStubSettings) getStubSettings()).listNotebookRuntimeTemplatesSettings(); + } + + /** Returns the object with the settings used for calls to deleteNotebookRuntimeTemplate. */ + public UnaryCallSettings + deleteNotebookRuntimeTemplateSettings() { + return ((NotebookServiceStubSettings) getStubSettings()) + .deleteNotebookRuntimeTemplateSettings(); + } + + /** Returns the object with the settings used for calls to deleteNotebookRuntimeTemplate. */ + public OperationCallSettings + deleteNotebookRuntimeTemplateOperationSettings() { + return ((NotebookServiceStubSettings) getStubSettings()) + .deleteNotebookRuntimeTemplateOperationSettings(); + } + + /** Returns the object with the settings used for calls to assignNotebookRuntime. */ + public UnaryCallSettings + assignNotebookRuntimeSettings() { + return ((NotebookServiceStubSettings) getStubSettings()).assignNotebookRuntimeSettings(); + } + + /** Returns the object with the settings used for calls to assignNotebookRuntime. */ + public OperationCallSettings< + AssignNotebookRuntimeRequest, NotebookRuntime, AssignNotebookRuntimeOperationMetadata> + assignNotebookRuntimeOperationSettings() { + return ((NotebookServiceStubSettings) getStubSettings()) + .assignNotebookRuntimeOperationSettings(); + } + + /** Returns the object with the settings used for calls to getNotebookRuntime. */ + public UnaryCallSettings + getNotebookRuntimeSettings() { + return ((NotebookServiceStubSettings) getStubSettings()).getNotebookRuntimeSettings(); + } + + /** Returns the object with the settings used for calls to listNotebookRuntimes. */ + public PagedCallSettings< + ListNotebookRuntimesRequest, + ListNotebookRuntimesResponse, + ListNotebookRuntimesPagedResponse> + listNotebookRuntimesSettings() { + return ((NotebookServiceStubSettings) getStubSettings()).listNotebookRuntimesSettings(); + } + + /** Returns the object with the settings used for calls to deleteNotebookRuntime. */ + public UnaryCallSettings + deleteNotebookRuntimeSettings() { + return ((NotebookServiceStubSettings) getStubSettings()).deleteNotebookRuntimeSettings(); + } + + /** Returns the object with the settings used for calls to deleteNotebookRuntime. */ + public OperationCallSettings + deleteNotebookRuntimeOperationSettings() { + return ((NotebookServiceStubSettings) getStubSettings()) + .deleteNotebookRuntimeOperationSettings(); + } + + /** Returns the object with the settings used for calls to upgradeNotebookRuntime. */ + public UnaryCallSettings + upgradeNotebookRuntimeSettings() { + return ((NotebookServiceStubSettings) getStubSettings()).upgradeNotebookRuntimeSettings(); + } + + /** Returns the object with the settings used for calls to upgradeNotebookRuntime. */ + public OperationCallSettings< + UpgradeNotebookRuntimeRequest, + UpgradeNotebookRuntimeResponse, + UpgradeNotebookRuntimeOperationMetadata> + upgradeNotebookRuntimeOperationSettings() { + return ((NotebookServiceStubSettings) getStubSettings()) + .upgradeNotebookRuntimeOperationSettings(); + } + + /** Returns the object with the settings used for calls to startNotebookRuntime. */ + public UnaryCallSettings startNotebookRuntimeSettings() { + return ((NotebookServiceStubSettings) getStubSettings()).startNotebookRuntimeSettings(); + } + + /** Returns the object with the settings used for calls to startNotebookRuntime. */ + public OperationCallSettings< + StartNotebookRuntimeRequest, + StartNotebookRuntimeResponse, + StartNotebookRuntimeOperationMetadata> + startNotebookRuntimeOperationSettings() { + return ((NotebookServiceStubSettings) getStubSettings()) + .startNotebookRuntimeOperationSettings(); + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return ((NotebookServiceStubSettings) getStubSettings()).listLocationsSettings(); + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return ((NotebookServiceStubSettings) getStubSettings()).getLocationSettings(); + } + + /** Returns the object with the settings used for calls to setIamPolicy. */ + public UnaryCallSettings setIamPolicySettings() { + return ((NotebookServiceStubSettings) getStubSettings()).setIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to getIamPolicy. */ + public UnaryCallSettings getIamPolicySettings() { + return ((NotebookServiceStubSettings) getStubSettings()).getIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to testIamPermissions. */ + public UnaryCallSettings + testIamPermissionsSettings() { + return ((NotebookServiceStubSettings) getStubSettings()).testIamPermissionsSettings(); + } + + public static final NotebookServiceSettings create(NotebookServiceStubSettings stub) + throws IOException { + return new NotebookServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return NotebookServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return NotebookServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return NotebookServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return NotebookServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return NotebookServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return NotebookServiceStubSettings.defaultTransportChannelProvider(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return NotebookServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected NotebookServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for NotebookServiceSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(NotebookServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(NotebookServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(NotebookServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(NotebookServiceStubSettings.newBuilder()); + } + + public NotebookServiceStubSettings.Builder getStubSettingsBuilder() { + return ((NotebookServiceStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to createNotebookRuntimeTemplate. */ + public UnaryCallSettings.Builder + createNotebookRuntimeTemplateSettings() { + return getStubSettingsBuilder().createNotebookRuntimeTemplateSettings(); + } + + /** Returns the builder for the settings used for calls to createNotebookRuntimeTemplate. */ + public OperationCallSettings.Builder< + CreateNotebookRuntimeTemplateRequest, + NotebookRuntimeTemplate, + CreateNotebookRuntimeTemplateOperationMetadata> + createNotebookRuntimeTemplateOperationSettings() { + return getStubSettingsBuilder().createNotebookRuntimeTemplateOperationSettings(); + } + + /** Returns the builder for the settings used for calls to getNotebookRuntimeTemplate. */ + public UnaryCallSettings.Builder + getNotebookRuntimeTemplateSettings() { + return getStubSettingsBuilder().getNotebookRuntimeTemplateSettings(); + } + + /** Returns the builder for the settings used for calls to listNotebookRuntimeTemplates. */ + public PagedCallSettings.Builder< + ListNotebookRuntimeTemplatesRequest, + ListNotebookRuntimeTemplatesResponse, + ListNotebookRuntimeTemplatesPagedResponse> + listNotebookRuntimeTemplatesSettings() { + return getStubSettingsBuilder().listNotebookRuntimeTemplatesSettings(); + } + + /** Returns the builder for the settings used for calls to deleteNotebookRuntimeTemplate. */ + public UnaryCallSettings.Builder + deleteNotebookRuntimeTemplateSettings() { + return getStubSettingsBuilder().deleteNotebookRuntimeTemplateSettings(); + } + + /** Returns the builder for the settings used for calls to deleteNotebookRuntimeTemplate. */ + public OperationCallSettings.Builder< + DeleteNotebookRuntimeTemplateRequest, Empty, DeleteOperationMetadata> + deleteNotebookRuntimeTemplateOperationSettings() { + return getStubSettingsBuilder().deleteNotebookRuntimeTemplateOperationSettings(); + } + + /** Returns the builder for the settings used for calls to assignNotebookRuntime. */ + public UnaryCallSettings.Builder + assignNotebookRuntimeSettings() { + return getStubSettingsBuilder().assignNotebookRuntimeSettings(); + } + + /** Returns the builder for the settings used for calls to assignNotebookRuntime. */ + public OperationCallSettings.Builder< + AssignNotebookRuntimeRequest, NotebookRuntime, AssignNotebookRuntimeOperationMetadata> + assignNotebookRuntimeOperationSettings() { + return getStubSettingsBuilder().assignNotebookRuntimeOperationSettings(); + } + + /** Returns the builder for the settings used for calls to getNotebookRuntime. */ + public UnaryCallSettings.Builder + getNotebookRuntimeSettings() { + return getStubSettingsBuilder().getNotebookRuntimeSettings(); + } + + /** Returns the builder for the settings used for calls to listNotebookRuntimes. */ + public PagedCallSettings.Builder< + ListNotebookRuntimesRequest, + ListNotebookRuntimesResponse, + ListNotebookRuntimesPagedResponse> + listNotebookRuntimesSettings() { + return getStubSettingsBuilder().listNotebookRuntimesSettings(); + } + + /** Returns the builder for the settings used for calls to deleteNotebookRuntime. */ + public UnaryCallSettings.Builder + deleteNotebookRuntimeSettings() { + return getStubSettingsBuilder().deleteNotebookRuntimeSettings(); + } + + /** Returns the builder for the settings used for calls to deleteNotebookRuntime. */ + public OperationCallSettings.Builder< + DeleteNotebookRuntimeRequest, Empty, DeleteOperationMetadata> + deleteNotebookRuntimeOperationSettings() { + return getStubSettingsBuilder().deleteNotebookRuntimeOperationSettings(); + } + + /** Returns the builder for the settings used for calls to upgradeNotebookRuntime. */ + public UnaryCallSettings.Builder + upgradeNotebookRuntimeSettings() { + return getStubSettingsBuilder().upgradeNotebookRuntimeSettings(); + } + + /** Returns the builder for the settings used for calls to upgradeNotebookRuntime. */ + public OperationCallSettings.Builder< + UpgradeNotebookRuntimeRequest, + UpgradeNotebookRuntimeResponse, + UpgradeNotebookRuntimeOperationMetadata> + upgradeNotebookRuntimeOperationSettings() { + return getStubSettingsBuilder().upgradeNotebookRuntimeOperationSettings(); + } + + /** Returns the builder for the settings used for calls to startNotebookRuntime. */ + public UnaryCallSettings.Builder + startNotebookRuntimeSettings() { + return getStubSettingsBuilder().startNotebookRuntimeSettings(); + } + + /** Returns the builder for the settings used for calls to startNotebookRuntime. */ + public OperationCallSettings.Builder< + StartNotebookRuntimeRequest, + StartNotebookRuntimeResponse, + StartNotebookRuntimeOperationMetadata> + startNotebookRuntimeOperationSettings() { + return getStubSettingsBuilder().startNotebookRuntimeOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return getStubSettingsBuilder().listLocationsSettings(); + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getStubSettingsBuilder().getLocationSettings(); + } + + /** Returns the builder for the settings used for calls to setIamPolicy. */ + public UnaryCallSettings.Builder setIamPolicySettings() { + return getStubSettingsBuilder().setIamPolicySettings(); + } + + /** Returns the builder for the settings used for calls to getIamPolicy. */ + public UnaryCallSettings.Builder getIamPolicySettings() { + return getStubSettingsBuilder().getIamPolicySettings(); + } + + /** Returns the builder for the settings used for calls to testIamPermissions. */ + public UnaryCallSettings.Builder + testIamPermissionsSettings() { + return getStubSettingsBuilder().testIamPermissionsSettings(); + } + + @Override + public NotebookServiceSettings build() throws IOException { + return new NotebookServiceSettings(this); + } + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/PersistentResourceServiceClient.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/PersistentResourceServiceClient.java new file mode 100644 index 000000000000..5969ec329d7d --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/PersistentResourceServiceClient.java @@ -0,0 +1,1917 @@ +/* + * Copyright 2024 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.aiplatform.v1; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.aiplatform.v1.stub.PersistentResourceServiceStub; +import com.google.cloud.aiplatform.v1.stub.PersistentResourceServiceStubSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.longrunning.OperationsClient; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: A service for managing Vertex AI's machine learning PersistentResource. + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

{@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 (PersistentResourceServiceClient persistentResourceServiceClient =
+ *     PersistentResourceServiceClient.create()) {
+ *   PersistentResourceName name =
+ *       PersistentResourceName.of("[PROJECT]", "[LOCATION]", "[PERSISTENT_RESOURCE]");
+ *   PersistentResource response = persistentResourceServiceClient.getPersistentResource(name);
+ * }
+ * }
+ * + *

Note: close() needs to be called on the PersistentResourceServiceClient object to clean up + * resources such as threads. In the example above, try-with-resources is used, which automatically + * calls close(). + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Methods
MethodDescriptionMethod Variants

CreatePersistentResource

Creates a PersistentResource.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createPersistentResourceAsync(CreatePersistentResourceRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • createPersistentResourceAsync(LocationName parent, PersistentResource persistentResource, String persistentResourceId) + *

  • createPersistentResourceAsync(String parent, PersistentResource persistentResource, String persistentResourceId) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createPersistentResourceOperationCallable() + *

  • createPersistentResourceCallable() + *

+ *

GetPersistentResource

Gets a PersistentResource.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getPersistentResource(GetPersistentResourceRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getPersistentResource(PersistentResourceName name) + *

  • getPersistentResource(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getPersistentResourceCallable() + *

+ *

ListPersistentResources

Lists PersistentResources in a Location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listPersistentResources(ListPersistentResourcesRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listPersistentResources(LocationName parent) + *

  • listPersistentResources(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listPersistentResourcesPagedCallable() + *

  • listPersistentResourcesCallable() + *

+ *

DeletePersistentResource

Deletes a PersistentResource.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deletePersistentResourceAsync(DeletePersistentResourceRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • deletePersistentResourceAsync(PersistentResourceName name) + *

  • deletePersistentResourceAsync(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deletePersistentResourceOperationCallable() + *

  • deletePersistentResourceCallable() + *

+ *

UpdatePersistentResource

Updates a PersistentResource.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updatePersistentResourceAsync(UpdatePersistentResourceRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • updatePersistentResourceAsync(PersistentResource persistentResource, FieldMask updateMask) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updatePersistentResourceOperationCallable() + *

  • updatePersistentResourceCallable() + *

+ *

RebootPersistentResource

Reboots a PersistentResource.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • rebootPersistentResourceAsync(RebootPersistentResourceRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • rebootPersistentResourceAsync(PersistentResourceName name) + *

  • rebootPersistentResourceAsync(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • rebootPersistentResourceOperationCallable() + *

  • rebootPersistentResourceCallable() + *

+ *

ListLocations

Lists information about the supported locations for this service.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listLocations(ListLocationsRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listLocationsPagedCallable() + *

  • listLocationsCallable() + *

+ *

GetLocation

Gets information about a location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getLocation(GetLocationRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getLocationCallable() + *

+ *

SetIamPolicy

Sets the access control policy on the specified resource. Replacesany existing policy. + *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • setIamPolicy(SetIamPolicyRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • setIamPolicyCallable() + *

+ *

GetIamPolicy

Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getIamPolicy(GetIamPolicyRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getIamPolicyCallable() + *

+ *

TestIamPermissions

Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a `NOT_FOUND` error. + *

Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • testIamPermissions(TestIamPermissionsRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • testIamPermissionsCallable() + *

+ *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of + * PersistentResourceServiceSettings to create(). For example: + * + *

To customize credentials: + * + *

{@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
+ * PersistentResourceServiceSettings persistentResourceServiceSettings =
+ *     PersistentResourceServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * PersistentResourceServiceClient persistentResourceServiceClient =
+ *     PersistentResourceServiceClient.create(persistentResourceServiceSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@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
+ * PersistentResourceServiceSettings persistentResourceServiceSettings =
+ *     PersistentResourceServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * PersistentResourceServiceClient persistentResourceServiceClient =
+ *     PersistentResourceServiceClient.create(persistentResourceServiceSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class PersistentResourceServiceClient implements BackgroundResource { + private final PersistentResourceServiceSettings settings; + private final PersistentResourceServiceStub stub; + private final OperationsClient operationsClient; + + /** Constructs an instance of PersistentResourceServiceClient with default settings. */ + public static final PersistentResourceServiceClient create() throws IOException { + return create(PersistentResourceServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of PersistentResourceServiceClient, using the given settings. The + * channels are created based on the settings passed in, or defaults for any settings that are not + * set. + */ + public static final PersistentResourceServiceClient create( + PersistentResourceServiceSettings settings) throws IOException { + return new PersistentResourceServiceClient(settings); + } + + /** + * Constructs an instance of PersistentResourceServiceClient, using the given stub for making + * calls. This is for advanced usage - prefer using create(PersistentResourceServiceSettings). + */ + public static final PersistentResourceServiceClient create(PersistentResourceServiceStub stub) { + return new PersistentResourceServiceClient(stub); + } + + /** + * Constructs an instance of PersistentResourceServiceClient, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected PersistentResourceServiceClient(PersistentResourceServiceSettings settings) + throws IOException { + this.settings = settings; + this.stub = ((PersistentResourceServiceStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + protected PersistentResourceServiceClient(PersistentResourceServiceStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + public final PersistentResourceServiceSettings getSettings() { + return settings; + } + + public PersistentResourceServiceStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final OperationsClient getOperationsClient() { + return operationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a PersistentResource. + * + *

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 (PersistentResourceServiceClient persistentResourceServiceClient =
+   *     PersistentResourceServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   PersistentResource persistentResource = PersistentResource.newBuilder().build();
+   *   String persistentResourceId = "persistentResourceId-2123080768";
+   *   PersistentResource response =
+   *       persistentResourceServiceClient
+   *           .createPersistentResourceAsync(parent, persistentResource, persistentResourceId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The resource name of the Location to create the PersistentResource in. + * Format: `projects/{project}/locations/{location}` + * @param persistentResource Required. The PersistentResource to create. + * @param persistentResourceId Required. The ID to use for the PersistentResource, which become + * the final component of the PersistentResource's resource name. + *

The maximum length is 63 characters, and valid characters are + * `/^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$/`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + createPersistentResourceAsync( + LocationName parent, PersistentResource persistentResource, String persistentResourceId) { + CreatePersistentResourceRequest request = + CreatePersistentResourceRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setPersistentResource(persistentResource) + .setPersistentResourceId(persistentResourceId) + .build(); + return createPersistentResourceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a PersistentResource. + * + *

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 (PersistentResourceServiceClient persistentResourceServiceClient =
+   *     PersistentResourceServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   PersistentResource persistentResource = PersistentResource.newBuilder().build();
+   *   String persistentResourceId = "persistentResourceId-2123080768";
+   *   PersistentResource response =
+   *       persistentResourceServiceClient
+   *           .createPersistentResourceAsync(parent, persistentResource, persistentResourceId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The resource name of the Location to create the PersistentResource in. + * Format: `projects/{project}/locations/{location}` + * @param persistentResource Required. The PersistentResource to create. + * @param persistentResourceId Required. The ID to use for the PersistentResource, which become + * the final component of the PersistentResource's resource name. + *

The maximum length is 63 characters, and valid characters are + * `/^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$/`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + createPersistentResourceAsync( + String parent, PersistentResource persistentResource, String persistentResourceId) { + CreatePersistentResourceRequest request = + CreatePersistentResourceRequest.newBuilder() + .setParent(parent) + .setPersistentResource(persistentResource) + .setPersistentResourceId(persistentResourceId) + .build(); + return createPersistentResourceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a PersistentResource. + * + *

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 (PersistentResourceServiceClient persistentResourceServiceClient =
+   *     PersistentResourceServiceClient.create()) {
+   *   CreatePersistentResourceRequest request =
+   *       CreatePersistentResourceRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPersistentResource(PersistentResource.newBuilder().build())
+   *           .setPersistentResourceId("persistentResourceId-2123080768")
+   *           .build();
+   *   PersistentResource response =
+   *       persistentResourceServiceClient.createPersistentResourceAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + createPersistentResourceAsync(CreatePersistentResourceRequest request) { + return createPersistentResourceOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a PersistentResource. + * + *

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 (PersistentResourceServiceClient persistentResourceServiceClient =
+   *     PersistentResourceServiceClient.create()) {
+   *   CreatePersistentResourceRequest request =
+   *       CreatePersistentResourceRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPersistentResource(PersistentResource.newBuilder().build())
+   *           .setPersistentResourceId("persistentResourceId-2123080768")
+   *           .build();
+   *   OperationFuture future =
+   *       persistentResourceServiceClient
+   *           .createPersistentResourceOperationCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   PersistentResource response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + CreatePersistentResourceRequest, + PersistentResource, + CreatePersistentResourceOperationMetadata> + createPersistentResourceOperationCallable() { + return stub.createPersistentResourceOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a PersistentResource. + * + *

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 (PersistentResourceServiceClient persistentResourceServiceClient =
+   *     PersistentResourceServiceClient.create()) {
+   *   CreatePersistentResourceRequest request =
+   *       CreatePersistentResourceRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPersistentResource(PersistentResource.newBuilder().build())
+   *           .setPersistentResourceId("persistentResourceId-2123080768")
+   *           .build();
+   *   ApiFuture future =
+   *       persistentResourceServiceClient.createPersistentResourceCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + createPersistentResourceCallable() { + return stub.createPersistentResourceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a PersistentResource. + * + *

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 (PersistentResourceServiceClient persistentResourceServiceClient =
+   *     PersistentResourceServiceClient.create()) {
+   *   PersistentResourceName name =
+   *       PersistentResourceName.of("[PROJECT]", "[LOCATION]", "[PERSISTENT_RESOURCE]");
+   *   PersistentResource response = persistentResourceServiceClient.getPersistentResource(name);
+   * }
+   * }
+ * + * @param name Required. The name of the PersistentResource resource. Format: + * `projects/{project_id_or_number}/locations/{location_id}/persistentResources/{persistent_resource_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final PersistentResource getPersistentResource(PersistentResourceName name) { + GetPersistentResourceRequest request = + GetPersistentResourceRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getPersistentResource(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a PersistentResource. + * + *

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 (PersistentResourceServiceClient persistentResourceServiceClient =
+   *     PersistentResourceServiceClient.create()) {
+   *   String name =
+   *       PersistentResourceName.of("[PROJECT]", "[LOCATION]", "[PERSISTENT_RESOURCE]").toString();
+   *   PersistentResource response = persistentResourceServiceClient.getPersistentResource(name);
+   * }
+   * }
+ * + * @param name Required. The name of the PersistentResource resource. Format: + * `projects/{project_id_or_number}/locations/{location_id}/persistentResources/{persistent_resource_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final PersistentResource getPersistentResource(String name) { + GetPersistentResourceRequest request = + GetPersistentResourceRequest.newBuilder().setName(name).build(); + return getPersistentResource(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a PersistentResource. + * + *

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 (PersistentResourceServiceClient persistentResourceServiceClient =
+   *     PersistentResourceServiceClient.create()) {
+   *   GetPersistentResourceRequest request =
+   *       GetPersistentResourceRequest.newBuilder()
+   *           .setName(
+   *               PersistentResourceName.of("[PROJECT]", "[LOCATION]", "[PERSISTENT_RESOURCE]")
+   *                   .toString())
+   *           .build();
+   *   PersistentResource response = persistentResourceServiceClient.getPersistentResource(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final PersistentResource getPersistentResource(GetPersistentResourceRequest request) { + return getPersistentResourceCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a PersistentResource. + * + *

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 (PersistentResourceServiceClient persistentResourceServiceClient =
+   *     PersistentResourceServiceClient.create()) {
+   *   GetPersistentResourceRequest request =
+   *       GetPersistentResourceRequest.newBuilder()
+   *           .setName(
+   *               PersistentResourceName.of("[PROJECT]", "[LOCATION]", "[PERSISTENT_RESOURCE]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       persistentResourceServiceClient.getPersistentResourceCallable().futureCall(request);
+   *   // Do something.
+   *   PersistentResource response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + getPersistentResourceCallable() { + return stub.getPersistentResourceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists PersistentResources in a Location. + * + *

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 (PersistentResourceServiceClient persistentResourceServiceClient =
+   *     PersistentResourceServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (PersistentResource element :
+   *       persistentResourceServiceClient.listPersistentResources(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The resource name of the Location to list the PersistentResources from. + * Format: `projects/{project}/locations/{location}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListPersistentResourcesPagedResponse listPersistentResources(LocationName parent) { + ListPersistentResourcesRequest request = + ListPersistentResourcesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listPersistentResources(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists PersistentResources in a Location. + * + *

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 (PersistentResourceServiceClient persistentResourceServiceClient =
+   *     PersistentResourceServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (PersistentResource element :
+   *       persistentResourceServiceClient.listPersistentResources(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The resource name of the Location to list the PersistentResources from. + * Format: `projects/{project}/locations/{location}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListPersistentResourcesPagedResponse listPersistentResources(String parent) { + ListPersistentResourcesRequest request = + ListPersistentResourcesRequest.newBuilder().setParent(parent).build(); + return listPersistentResources(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists PersistentResources in a Location. + * + *

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 (PersistentResourceServiceClient persistentResourceServiceClient =
+   *     PersistentResourceServiceClient.create()) {
+   *   ListPersistentResourcesRequest request =
+   *       ListPersistentResourcesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (PersistentResource element :
+   *       persistentResourceServiceClient.listPersistentResources(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListPersistentResourcesPagedResponse listPersistentResources( + ListPersistentResourcesRequest request) { + return listPersistentResourcesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists PersistentResources in a Location. + * + *

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 (PersistentResourceServiceClient persistentResourceServiceClient =
+   *     PersistentResourceServiceClient.create()) {
+   *   ListPersistentResourcesRequest request =
+   *       ListPersistentResourcesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       persistentResourceServiceClient
+   *           .listPersistentResourcesPagedCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   for (PersistentResource element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listPersistentResourcesPagedCallable() { + return stub.listPersistentResourcesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists PersistentResources in a Location. + * + *

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 (PersistentResourceServiceClient persistentResourceServiceClient =
+   *     PersistentResourceServiceClient.create()) {
+   *   ListPersistentResourcesRequest request =
+   *       ListPersistentResourcesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListPersistentResourcesResponse response =
+   *         persistentResourceServiceClient.listPersistentResourcesCallable().call(request);
+   *     for (PersistentResource element : response.getPersistentResourcesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listPersistentResourcesCallable() { + return stub.listPersistentResourcesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a PersistentResource. + * + *

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 (PersistentResourceServiceClient persistentResourceServiceClient =
+   *     PersistentResourceServiceClient.create()) {
+   *   PersistentResourceName name =
+   *       PersistentResourceName.of("[PROJECT]", "[LOCATION]", "[PERSISTENT_RESOURCE]");
+   *   persistentResourceServiceClient.deletePersistentResourceAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the PersistentResource to be deleted. Format: + * `projects/{project}/locations/{location}/persistentResources/{persistent_resource}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deletePersistentResourceAsync( + PersistentResourceName name) { + DeletePersistentResourceRequest request = + DeletePersistentResourceRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return deletePersistentResourceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a PersistentResource. + * + *

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 (PersistentResourceServiceClient persistentResourceServiceClient =
+   *     PersistentResourceServiceClient.create()) {
+   *   String name =
+   *       PersistentResourceName.of("[PROJECT]", "[LOCATION]", "[PERSISTENT_RESOURCE]").toString();
+   *   persistentResourceServiceClient.deletePersistentResourceAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the PersistentResource to be deleted. Format: + * `projects/{project}/locations/{location}/persistentResources/{persistent_resource}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deletePersistentResourceAsync( + String name) { + DeletePersistentResourceRequest request = + DeletePersistentResourceRequest.newBuilder().setName(name).build(); + return deletePersistentResourceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a PersistentResource. + * + *

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 (PersistentResourceServiceClient persistentResourceServiceClient =
+   *     PersistentResourceServiceClient.create()) {
+   *   DeletePersistentResourceRequest request =
+   *       DeletePersistentResourceRequest.newBuilder()
+   *           .setName(
+   *               PersistentResourceName.of("[PROJECT]", "[LOCATION]", "[PERSISTENT_RESOURCE]")
+   *                   .toString())
+   *           .build();
+   *   persistentResourceServiceClient.deletePersistentResourceAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deletePersistentResourceAsync( + DeletePersistentResourceRequest request) { + return deletePersistentResourceOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a PersistentResource. + * + *

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 (PersistentResourceServiceClient persistentResourceServiceClient =
+   *     PersistentResourceServiceClient.create()) {
+   *   DeletePersistentResourceRequest request =
+   *       DeletePersistentResourceRequest.newBuilder()
+   *           .setName(
+   *               PersistentResourceName.of("[PROJECT]", "[LOCATION]", "[PERSISTENT_RESOURCE]")
+   *                   .toString())
+   *           .build();
+   *   OperationFuture future =
+   *       persistentResourceServiceClient
+   *           .deletePersistentResourceOperationCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deletePersistentResourceOperationCallable() { + return stub.deletePersistentResourceOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a PersistentResource. + * + *

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 (PersistentResourceServiceClient persistentResourceServiceClient =
+   *     PersistentResourceServiceClient.create()) {
+   *   DeletePersistentResourceRequest request =
+   *       DeletePersistentResourceRequest.newBuilder()
+   *           .setName(
+   *               PersistentResourceName.of("[PROJECT]", "[LOCATION]", "[PERSISTENT_RESOURCE]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       persistentResourceServiceClient.deletePersistentResourceCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + deletePersistentResourceCallable() { + return stub.deletePersistentResourceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a PersistentResource. + * + *

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 (PersistentResourceServiceClient persistentResourceServiceClient =
+   *     PersistentResourceServiceClient.create()) {
+   *   PersistentResource persistentResource = PersistentResource.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   PersistentResource response =
+   *       persistentResourceServiceClient
+   *           .updatePersistentResourceAsync(persistentResource, updateMask)
+   *           .get();
+   * }
+   * }
+ * + * @param persistentResource Required. The PersistentResource to update. + *

The PersistentResource's `name` field is used to identify the PersistentResource to + * update. Format: + * `projects/{project}/locations/{location}/persistentResources/{persistent_resource}` + * @param updateMask Required. Specify the fields to be overwritten in the PersistentResource by + * the update method. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + updatePersistentResourceAsync(PersistentResource persistentResource, FieldMask updateMask) { + UpdatePersistentResourceRequest request = + UpdatePersistentResourceRequest.newBuilder() + .setPersistentResource(persistentResource) + .setUpdateMask(updateMask) + .build(); + return updatePersistentResourceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a PersistentResource. + * + *

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 (PersistentResourceServiceClient persistentResourceServiceClient =
+   *     PersistentResourceServiceClient.create()) {
+   *   UpdatePersistentResourceRequest request =
+   *       UpdatePersistentResourceRequest.newBuilder()
+   *           .setPersistentResource(PersistentResource.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   PersistentResource response =
+   *       persistentResourceServiceClient.updatePersistentResourceAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + updatePersistentResourceAsync(UpdatePersistentResourceRequest request) { + return updatePersistentResourceOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a PersistentResource. + * + *

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 (PersistentResourceServiceClient persistentResourceServiceClient =
+   *     PersistentResourceServiceClient.create()) {
+   *   UpdatePersistentResourceRequest request =
+   *       UpdatePersistentResourceRequest.newBuilder()
+   *           .setPersistentResource(PersistentResource.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       persistentResourceServiceClient
+   *           .updatePersistentResourceOperationCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   PersistentResource response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + UpdatePersistentResourceRequest, + PersistentResource, + UpdatePersistentResourceOperationMetadata> + updatePersistentResourceOperationCallable() { + return stub.updatePersistentResourceOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a PersistentResource. + * + *

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 (PersistentResourceServiceClient persistentResourceServiceClient =
+   *     PersistentResourceServiceClient.create()) {
+   *   UpdatePersistentResourceRequest request =
+   *       UpdatePersistentResourceRequest.newBuilder()
+   *           .setPersistentResource(PersistentResource.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       persistentResourceServiceClient.updatePersistentResourceCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + updatePersistentResourceCallable() { + return stub.updatePersistentResourceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Reboots a PersistentResource. + * + *

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 (PersistentResourceServiceClient persistentResourceServiceClient =
+   *     PersistentResourceServiceClient.create()) {
+   *   PersistentResourceName name =
+   *       PersistentResourceName.of("[PROJECT]", "[LOCATION]", "[PERSISTENT_RESOURCE]");
+   *   PersistentResource response =
+   *       persistentResourceServiceClient.rebootPersistentResourceAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the PersistentResource resource. Format: + * `projects/{project_id_or_number}/locations/{location_id}/persistentResources/{persistent_resource_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + rebootPersistentResourceAsync(PersistentResourceName name) { + RebootPersistentResourceRequest request = + RebootPersistentResourceRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return rebootPersistentResourceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Reboots a PersistentResource. + * + *

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 (PersistentResourceServiceClient persistentResourceServiceClient =
+   *     PersistentResourceServiceClient.create()) {
+   *   String name =
+   *       PersistentResourceName.of("[PROJECT]", "[LOCATION]", "[PERSISTENT_RESOURCE]").toString();
+   *   PersistentResource response =
+   *       persistentResourceServiceClient.rebootPersistentResourceAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the PersistentResource resource. Format: + * `projects/{project_id_or_number}/locations/{location_id}/persistentResources/{persistent_resource_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + rebootPersistentResourceAsync(String name) { + RebootPersistentResourceRequest request = + RebootPersistentResourceRequest.newBuilder().setName(name).build(); + return rebootPersistentResourceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Reboots a PersistentResource. + * + *

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 (PersistentResourceServiceClient persistentResourceServiceClient =
+   *     PersistentResourceServiceClient.create()) {
+   *   RebootPersistentResourceRequest request =
+   *       RebootPersistentResourceRequest.newBuilder()
+   *           .setName(
+   *               PersistentResourceName.of("[PROJECT]", "[LOCATION]", "[PERSISTENT_RESOURCE]")
+   *                   .toString())
+   *           .build();
+   *   PersistentResource response =
+   *       persistentResourceServiceClient.rebootPersistentResourceAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + rebootPersistentResourceAsync(RebootPersistentResourceRequest request) { + return rebootPersistentResourceOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Reboots a PersistentResource. + * + *

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 (PersistentResourceServiceClient persistentResourceServiceClient =
+   *     PersistentResourceServiceClient.create()) {
+   *   RebootPersistentResourceRequest request =
+   *       RebootPersistentResourceRequest.newBuilder()
+   *           .setName(
+   *               PersistentResourceName.of("[PROJECT]", "[LOCATION]", "[PERSISTENT_RESOURCE]")
+   *                   .toString())
+   *           .build();
+   *   OperationFuture future =
+   *       persistentResourceServiceClient
+   *           .rebootPersistentResourceOperationCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   PersistentResource response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + RebootPersistentResourceRequest, + PersistentResource, + RebootPersistentResourceOperationMetadata> + rebootPersistentResourceOperationCallable() { + return stub.rebootPersistentResourceOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Reboots a PersistentResource. + * + *

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 (PersistentResourceServiceClient persistentResourceServiceClient =
+   *     PersistentResourceServiceClient.create()) {
+   *   RebootPersistentResourceRequest request =
+   *       RebootPersistentResourceRequest.newBuilder()
+   *           .setName(
+   *               PersistentResourceName.of("[PROJECT]", "[LOCATION]", "[PERSISTENT_RESOURCE]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       persistentResourceServiceClient.rebootPersistentResourceCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + rebootPersistentResourceCallable() { + return stub.rebootPersistentResourceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

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 (PersistentResourceServiceClient persistentResourceServiceClient =
+   *     PersistentResourceServiceClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Location element : persistentResourceServiceClient.listLocations(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListLocationsPagedResponse listLocations(ListLocationsRequest request) { + return listLocationsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

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 (PersistentResourceServiceClient persistentResourceServiceClient =
+   *     PersistentResourceServiceClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       persistentResourceServiceClient.listLocationsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Location element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listLocationsPagedCallable() { + return stub.listLocationsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

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 (PersistentResourceServiceClient persistentResourceServiceClient =
+   *     PersistentResourceServiceClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListLocationsResponse response =
+   *         persistentResourceServiceClient.listLocationsCallable().call(request);
+   *     for (Location element : response.getLocationsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listLocationsCallable() { + return stub.listLocationsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

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 (PersistentResourceServiceClient persistentResourceServiceClient =
+   *     PersistentResourceServiceClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   Location response = persistentResourceServiceClient.getLocation(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Location getLocation(GetLocationRequest request) { + return getLocationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

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 (PersistentResourceServiceClient persistentResourceServiceClient =
+   *     PersistentResourceServiceClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future =
+   *       persistentResourceServiceClient.getLocationCallable().futureCall(request);
+   *   // Do something.
+   *   Location response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getLocationCallable() { + return stub.getLocationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the access control policy on the specified resource. Replacesany existing policy. + * + *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. + * + *

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 (PersistentResourceServiceClient persistentResourceServiceClient =
+   *     PersistentResourceServiceClient.create()) {
+   *   SetIamPolicyRequest request =
+   *       SetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Policy response = persistentResourceServiceClient.setIamPolicy(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Policy setIamPolicy(SetIamPolicyRequest request) { + return setIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the access control policy on the specified resource. Replacesany existing policy. + * + *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. + * + *

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 (PersistentResourceServiceClient persistentResourceServiceClient =
+   *     PersistentResourceServiceClient.create()) {
+   *   SetIamPolicyRequest request =
+   *       SetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       persistentResourceServiceClient.setIamPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Policy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable setIamPolicyCallable() { + return stub.setIamPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the access control policy for a resource. Returns an empty policyif the resource exists + * and does not have a policy set. + * + *

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 (PersistentResourceServiceClient persistentResourceServiceClient =
+   *     PersistentResourceServiceClient.create()) {
+   *   GetIamPolicyRequest request =
+   *       GetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .setOptions(GetPolicyOptions.newBuilder().build())
+   *           .build();
+   *   Policy response = persistentResourceServiceClient.getIamPolicy(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Policy getIamPolicy(GetIamPolicyRequest request) { + return getIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the access control policy for a resource. Returns an empty policyif the resource exists + * and does not have a policy set. + * + *

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 (PersistentResourceServiceClient persistentResourceServiceClient =
+   *     PersistentResourceServiceClient.create()) {
+   *   GetIamPolicyRequest request =
+   *       GetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .setOptions(GetPolicyOptions.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       persistentResourceServiceClient.getIamPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Policy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getIamPolicyCallable() { + return stub.getIamPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns permissions that a caller has on the specified resource. If theresource does not exist, + * this will return an empty set ofpermissions, not a `NOT_FOUND` error. + * + *

Note: This operation is designed to be used for buildingpermission-aware UIs and + * command-line tools, not for authorizationchecking. This operation may "fail open" without + * warning. + * + *

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 (PersistentResourceServiceClient persistentResourceServiceClient =
+   *     PersistentResourceServiceClient.create()) {
+   *   TestIamPermissionsRequest request =
+   *       TestIamPermissionsRequest.newBuilder()
+   *           .setResource(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .addAllPermissions(new ArrayList())
+   *           .build();
+   *   TestIamPermissionsResponse response =
+   *       persistentResourceServiceClient.testIamPermissions(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) { + return testIamPermissionsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns permissions that a caller has on the specified resource. If theresource does not exist, + * this will return an empty set ofpermissions, not a `NOT_FOUND` error. + * + *

Note: This operation is designed to be used for buildingpermission-aware UIs and + * command-line tools, not for authorizationchecking. This operation may "fail open" without + * warning. + * + *

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 (PersistentResourceServiceClient persistentResourceServiceClient =
+   *     PersistentResourceServiceClient.create()) {
+   *   TestIamPermissionsRequest request =
+   *       TestIamPermissionsRequest.newBuilder()
+   *           .setResource(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .addAllPermissions(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       persistentResourceServiceClient.testIamPermissionsCallable().futureCall(request);
+   *   // Do something.
+   *   TestIamPermissionsResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + testIamPermissionsCallable() { + return stub.testIamPermissionsCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListPersistentResourcesPagedResponse + extends AbstractPagedListResponse< + ListPersistentResourcesRequest, + ListPersistentResourcesResponse, + PersistentResource, + ListPersistentResourcesPage, + ListPersistentResourcesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + ListPersistentResourcesRequest, ListPersistentResourcesResponse, PersistentResource> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListPersistentResourcesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListPersistentResourcesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListPersistentResourcesPagedResponse(ListPersistentResourcesPage page) { + super(page, ListPersistentResourcesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListPersistentResourcesPage + extends AbstractPage< + ListPersistentResourcesRequest, + ListPersistentResourcesResponse, + PersistentResource, + ListPersistentResourcesPage> { + + private ListPersistentResourcesPage( + PageContext< + ListPersistentResourcesRequest, ListPersistentResourcesResponse, PersistentResource> + context, + ListPersistentResourcesResponse response) { + super(context, response); + } + + private static ListPersistentResourcesPage createEmptyPage() { + return new ListPersistentResourcesPage(null, null); + } + + @Override + protected ListPersistentResourcesPage createPage( + PageContext< + ListPersistentResourcesRequest, ListPersistentResourcesResponse, PersistentResource> + context, + ListPersistentResourcesResponse response) { + return new ListPersistentResourcesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext< + ListPersistentResourcesRequest, ListPersistentResourcesResponse, PersistentResource> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListPersistentResourcesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListPersistentResourcesRequest, + ListPersistentResourcesResponse, + PersistentResource, + ListPersistentResourcesPage, + ListPersistentResourcesFixedSizeCollection> { + + private ListPersistentResourcesFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListPersistentResourcesFixedSizeCollection createEmptyCollection() { + return new ListPersistentResourcesFixedSizeCollection(null, 0); + } + + @Override + protected ListPersistentResourcesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListPersistentResourcesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListLocationsPagedResponse + extends AbstractPagedListResponse< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListLocationsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListLocationsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListLocationsPagedResponse(ListLocationsPage page) { + super(page, ListLocationsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListLocationsPage + extends AbstractPage< + ListLocationsRequest, ListLocationsResponse, Location, ListLocationsPage> { + + private ListLocationsPage( + PageContext context, + ListLocationsResponse response) { + super(context, response); + } + + private static ListLocationsPage createEmptyPage() { + return new ListLocationsPage(null, null); + } + + @Override + protected ListLocationsPage createPage( + PageContext context, + ListLocationsResponse response) { + return new ListLocationsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListLocationsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + private ListLocationsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListLocationsFixedSizeCollection createEmptyCollection() { + return new ListLocationsFixedSizeCollection(null, 0); + } + + @Override + protected ListLocationsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListLocationsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/PersistentResourceServiceSettings.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/PersistentResourceServiceSettings.java new file mode 100644 index 000000000000..3508cbb1bdf6 --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/PersistentResourceServiceSettings.java @@ -0,0 +1,403 @@ +/* + * Copyright 2024 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.aiplatform.v1; + +import static com.google.cloud.aiplatform.v1.PersistentResourceServiceClient.ListLocationsPagedResponse; +import static com.google.cloud.aiplatform.v1.PersistentResourceServiceClient.ListPersistentResourcesPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.aiplatform.v1.stub.PersistentResourceServiceStubSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link PersistentResourceServiceClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (aiplatform.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of getPersistentResource to 30 seconds: + * + *

{@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
+ * PersistentResourceServiceSettings.Builder persistentResourceServiceSettingsBuilder =
+ *     PersistentResourceServiceSettings.newBuilder();
+ * persistentResourceServiceSettingsBuilder
+ *     .getPersistentResourceSettings()
+ *     .setRetrySettings(
+ *         persistentResourceServiceSettingsBuilder
+ *             .getPersistentResourceSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * PersistentResourceServiceSettings persistentResourceServiceSettings =
+ *     persistentResourceServiceSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class PersistentResourceServiceSettings + extends ClientSettings { + + /** Returns the object with the settings used for calls to createPersistentResource. */ + public UnaryCallSettings + createPersistentResourceSettings() { + return ((PersistentResourceServiceStubSettings) getStubSettings()) + .createPersistentResourceSettings(); + } + + /** Returns the object with the settings used for calls to createPersistentResource. */ + public OperationCallSettings< + CreatePersistentResourceRequest, + PersistentResource, + CreatePersistentResourceOperationMetadata> + createPersistentResourceOperationSettings() { + return ((PersistentResourceServiceStubSettings) getStubSettings()) + .createPersistentResourceOperationSettings(); + } + + /** Returns the object with the settings used for calls to getPersistentResource. */ + public UnaryCallSettings + getPersistentResourceSettings() { + return ((PersistentResourceServiceStubSettings) getStubSettings()) + .getPersistentResourceSettings(); + } + + /** Returns the object with the settings used for calls to listPersistentResources. */ + public PagedCallSettings< + ListPersistentResourcesRequest, + ListPersistentResourcesResponse, + ListPersistentResourcesPagedResponse> + listPersistentResourcesSettings() { + return ((PersistentResourceServiceStubSettings) getStubSettings()) + .listPersistentResourcesSettings(); + } + + /** Returns the object with the settings used for calls to deletePersistentResource. */ + public UnaryCallSettings + deletePersistentResourceSettings() { + return ((PersistentResourceServiceStubSettings) getStubSettings()) + .deletePersistentResourceSettings(); + } + + /** Returns the object with the settings used for calls to deletePersistentResource. */ + public OperationCallSettings + deletePersistentResourceOperationSettings() { + return ((PersistentResourceServiceStubSettings) getStubSettings()) + .deletePersistentResourceOperationSettings(); + } + + /** Returns the object with the settings used for calls to updatePersistentResource. */ + public UnaryCallSettings + updatePersistentResourceSettings() { + return ((PersistentResourceServiceStubSettings) getStubSettings()) + .updatePersistentResourceSettings(); + } + + /** Returns the object with the settings used for calls to updatePersistentResource. */ + public OperationCallSettings< + UpdatePersistentResourceRequest, + PersistentResource, + UpdatePersistentResourceOperationMetadata> + updatePersistentResourceOperationSettings() { + return ((PersistentResourceServiceStubSettings) getStubSettings()) + .updatePersistentResourceOperationSettings(); + } + + /** Returns the object with the settings used for calls to rebootPersistentResource. */ + public UnaryCallSettings + rebootPersistentResourceSettings() { + return ((PersistentResourceServiceStubSettings) getStubSettings()) + .rebootPersistentResourceSettings(); + } + + /** Returns the object with the settings used for calls to rebootPersistentResource. */ + public OperationCallSettings< + RebootPersistentResourceRequest, + PersistentResource, + RebootPersistentResourceOperationMetadata> + rebootPersistentResourceOperationSettings() { + return ((PersistentResourceServiceStubSettings) getStubSettings()) + .rebootPersistentResourceOperationSettings(); + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return ((PersistentResourceServiceStubSettings) getStubSettings()).listLocationsSettings(); + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return ((PersistentResourceServiceStubSettings) getStubSettings()).getLocationSettings(); + } + + /** Returns the object with the settings used for calls to setIamPolicy. */ + public UnaryCallSettings setIamPolicySettings() { + return ((PersistentResourceServiceStubSettings) getStubSettings()).setIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to getIamPolicy. */ + public UnaryCallSettings getIamPolicySettings() { + return ((PersistentResourceServiceStubSettings) getStubSettings()).getIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to testIamPermissions. */ + public UnaryCallSettings + testIamPermissionsSettings() { + return ((PersistentResourceServiceStubSettings) getStubSettings()).testIamPermissionsSettings(); + } + + public static final PersistentResourceServiceSettings create( + PersistentResourceServiceStubSettings stub) throws IOException { + return new PersistentResourceServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return PersistentResourceServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return PersistentResourceServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return PersistentResourceServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return PersistentResourceServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return PersistentResourceServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return PersistentResourceServiceStubSettings.defaultTransportChannelProvider(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return PersistentResourceServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected PersistentResourceServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for PersistentResourceServiceSettings. */ + public static class Builder + extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(PersistentResourceServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(PersistentResourceServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(PersistentResourceServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(PersistentResourceServiceStubSettings.newBuilder()); + } + + public PersistentResourceServiceStubSettings.Builder getStubSettingsBuilder() { + return ((PersistentResourceServiceStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to createPersistentResource. */ + public UnaryCallSettings.Builder + createPersistentResourceSettings() { + return getStubSettingsBuilder().createPersistentResourceSettings(); + } + + /** Returns the builder for the settings used for calls to createPersistentResource. */ + public OperationCallSettings.Builder< + CreatePersistentResourceRequest, + PersistentResource, + CreatePersistentResourceOperationMetadata> + createPersistentResourceOperationSettings() { + return getStubSettingsBuilder().createPersistentResourceOperationSettings(); + } + + /** Returns the builder for the settings used for calls to getPersistentResource. */ + public UnaryCallSettings.Builder + getPersistentResourceSettings() { + return getStubSettingsBuilder().getPersistentResourceSettings(); + } + + /** Returns the builder for the settings used for calls to listPersistentResources. */ + public PagedCallSettings.Builder< + ListPersistentResourcesRequest, + ListPersistentResourcesResponse, + ListPersistentResourcesPagedResponse> + listPersistentResourcesSettings() { + return getStubSettingsBuilder().listPersistentResourcesSettings(); + } + + /** Returns the builder for the settings used for calls to deletePersistentResource. */ + public UnaryCallSettings.Builder + deletePersistentResourceSettings() { + return getStubSettingsBuilder().deletePersistentResourceSettings(); + } + + /** Returns the builder for the settings used for calls to deletePersistentResource. */ + public OperationCallSettings.Builder< + DeletePersistentResourceRequest, Empty, DeleteOperationMetadata> + deletePersistentResourceOperationSettings() { + return getStubSettingsBuilder().deletePersistentResourceOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updatePersistentResource. */ + public UnaryCallSettings.Builder + updatePersistentResourceSettings() { + return getStubSettingsBuilder().updatePersistentResourceSettings(); + } + + /** Returns the builder for the settings used for calls to updatePersistentResource. */ + public OperationCallSettings.Builder< + UpdatePersistentResourceRequest, + PersistentResource, + UpdatePersistentResourceOperationMetadata> + updatePersistentResourceOperationSettings() { + return getStubSettingsBuilder().updatePersistentResourceOperationSettings(); + } + + /** Returns the builder for the settings used for calls to rebootPersistentResource. */ + public UnaryCallSettings.Builder + rebootPersistentResourceSettings() { + return getStubSettingsBuilder().rebootPersistentResourceSettings(); + } + + /** Returns the builder for the settings used for calls to rebootPersistentResource. */ + public OperationCallSettings.Builder< + RebootPersistentResourceRequest, + PersistentResource, + RebootPersistentResourceOperationMetadata> + rebootPersistentResourceOperationSettings() { + return getStubSettingsBuilder().rebootPersistentResourceOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return getStubSettingsBuilder().listLocationsSettings(); + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getStubSettingsBuilder().getLocationSettings(); + } + + /** Returns the builder for the settings used for calls to setIamPolicy. */ + public UnaryCallSettings.Builder setIamPolicySettings() { + return getStubSettingsBuilder().setIamPolicySettings(); + } + + /** Returns the builder for the settings used for calls to getIamPolicy. */ + public UnaryCallSettings.Builder getIamPolicySettings() { + return getStubSettingsBuilder().getIamPolicySettings(); + } + + /** Returns the builder for the settings used for calls to testIamPermissions. */ + public UnaryCallSettings.Builder + testIamPermissionsSettings() { + return getStubSettingsBuilder().testIamPermissionsSettings(); + } + + @Override + public PersistentResourceServiceSettings build() throws IOException { + return new PersistentResourceServiceSettings(this); + } + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/PredictionServiceClient.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/PredictionServiceClient.java index 9c31c46a6cb5..9c9f6c32dec9 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/PredictionServiceClient.java +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/PredictionServiceClient.java @@ -1393,6 +1393,7 @@ public final GenerateContentResponse generateContent(String model, List * GenerateContentRequest.newBuilder() * .setModel("model104069929") * .addAllContents(new ArrayList()) + * .setSystemInstruction(Content.newBuilder().build()) * .addAllTools(new ArrayList()) * .addAllSafetySettings(new ArrayList()) * .setGenerationConfig(GenerationConfig.newBuilder().build()) @@ -1425,6 +1426,7 @@ public final GenerateContentResponse generateContent(GenerateContentRequest requ * GenerateContentRequest.newBuilder() * .setModel("model104069929") * .addAllContents(new ArrayList()) + * .setSystemInstruction(Content.newBuilder().build()) * .addAllTools(new ArrayList()) * .addAllSafetySettings(new ArrayList()) * .setGenerationConfig(GenerationConfig.newBuilder().build()) @@ -1458,6 +1460,7 @@ public final GenerateContentResponse generateContent(GenerateContentRequest requ * GenerateContentRequest.newBuilder() * .setModel("model104069929") * .addAllContents(new ArrayList()) + * .setSystemInstruction(Content.newBuilder().build()) * .addAllTools(new ArrayList()) * .addAllSafetySettings(new ArrayList()) * .setGenerationConfig(GenerationConfig.newBuilder().build()) diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/gapic_metadata.json b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/gapic_metadata.json index 475843524b75..c7dc16770aed 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/gapic_metadata.json +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/gapic_metadata.json @@ -437,6 +437,42 @@ } } }, + "GenAiTuningService": { + "clients": { + "grpc": { + "libraryClient": "GenAiTuningServiceClient", + "rpcs": { + "CancelTuningJob": { + "methods": ["cancelTuningJob", "cancelTuningJob", "cancelTuningJob", "cancelTuningJobCallable"] + }, + "CreateTuningJob": { + "methods": ["createTuningJob", "createTuningJob", "createTuningJob", "createTuningJobCallable"] + }, + "GetIamPolicy": { + "methods": ["getIamPolicy", "getIamPolicyCallable"] + }, + "GetLocation": { + "methods": ["getLocation", "getLocationCallable"] + }, + "GetTuningJob": { + "methods": ["getTuningJob", "getTuningJob", "getTuningJob", "getTuningJobCallable"] + }, + "ListLocations": { + "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"] + }, + "ListTuningJobs": { + "methods": ["listTuningJobs", "listTuningJobs", "listTuningJobs", "listTuningJobsPagedCallable", "listTuningJobsCallable"] + }, + "SetIamPolicy": { + "methods": ["setIamPolicy", "setIamPolicyCallable"] + }, + "TestIamPermissions": { + "methods": ["testIamPermissions", "testIamPermissionsCallable"] + } + } + } + } + }, "IndexEndpointService": { "clients": { "grpc": { @@ -974,6 +1010,102 @@ } } }, + "NotebookService": { + "clients": { + "grpc": { + "libraryClient": "NotebookServiceClient", + "rpcs": { + "AssignNotebookRuntime": { + "methods": ["assignNotebookRuntimeAsync", "assignNotebookRuntimeAsync", "assignNotebookRuntimeAsync", "assignNotebookRuntimeAsync", "assignNotebookRuntimeAsync", "assignNotebookRuntimeOperationCallable", "assignNotebookRuntimeCallable"] + }, + "CreateNotebookRuntimeTemplate": { + "methods": ["createNotebookRuntimeTemplateAsync", "createNotebookRuntimeTemplateAsync", "createNotebookRuntimeTemplateAsync", "createNotebookRuntimeTemplateOperationCallable", "createNotebookRuntimeTemplateCallable"] + }, + "DeleteNotebookRuntime": { + "methods": ["deleteNotebookRuntimeAsync", "deleteNotebookRuntimeAsync", "deleteNotebookRuntimeAsync", "deleteNotebookRuntimeOperationCallable", "deleteNotebookRuntimeCallable"] + }, + "DeleteNotebookRuntimeTemplate": { + "methods": ["deleteNotebookRuntimeTemplateAsync", "deleteNotebookRuntimeTemplateAsync", "deleteNotebookRuntimeTemplateAsync", "deleteNotebookRuntimeTemplateOperationCallable", "deleteNotebookRuntimeTemplateCallable"] + }, + "GetIamPolicy": { + "methods": ["getIamPolicy", "getIamPolicyCallable"] + }, + "GetLocation": { + "methods": ["getLocation", "getLocationCallable"] + }, + "GetNotebookRuntime": { + "methods": ["getNotebookRuntime", "getNotebookRuntime", "getNotebookRuntime", "getNotebookRuntimeCallable"] + }, + "GetNotebookRuntimeTemplate": { + "methods": ["getNotebookRuntimeTemplate", "getNotebookRuntimeTemplate", "getNotebookRuntimeTemplate", "getNotebookRuntimeTemplateCallable"] + }, + "ListLocations": { + "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"] + }, + "ListNotebookRuntimeTemplates": { + "methods": ["listNotebookRuntimeTemplates", "listNotebookRuntimeTemplates", "listNotebookRuntimeTemplates", "listNotebookRuntimeTemplatesPagedCallable", "listNotebookRuntimeTemplatesCallable"] + }, + "ListNotebookRuntimes": { + "methods": ["listNotebookRuntimes", "listNotebookRuntimes", "listNotebookRuntimes", "listNotebookRuntimesPagedCallable", "listNotebookRuntimesCallable"] + }, + "SetIamPolicy": { + "methods": ["setIamPolicy", "setIamPolicyCallable"] + }, + "StartNotebookRuntime": { + "methods": ["startNotebookRuntimeAsync", "startNotebookRuntimeAsync", "startNotebookRuntimeAsync", "startNotebookRuntimeOperationCallable", "startNotebookRuntimeCallable"] + }, + "TestIamPermissions": { + "methods": ["testIamPermissions", "testIamPermissionsCallable"] + }, + "UpgradeNotebookRuntime": { + "methods": ["upgradeNotebookRuntimeAsync", "upgradeNotebookRuntimeAsync", "upgradeNotebookRuntimeAsync", "upgradeNotebookRuntimeOperationCallable", "upgradeNotebookRuntimeCallable"] + } + } + } + } + }, + "PersistentResourceService": { + "clients": { + "grpc": { + "libraryClient": "PersistentResourceServiceClient", + "rpcs": { + "CreatePersistentResource": { + "methods": ["createPersistentResourceAsync", "createPersistentResourceAsync", "createPersistentResourceAsync", "createPersistentResourceOperationCallable", "createPersistentResourceCallable"] + }, + "DeletePersistentResource": { + "methods": ["deletePersistentResourceAsync", "deletePersistentResourceAsync", "deletePersistentResourceAsync", "deletePersistentResourceOperationCallable", "deletePersistentResourceCallable"] + }, + "GetIamPolicy": { + "methods": ["getIamPolicy", "getIamPolicyCallable"] + }, + "GetLocation": { + "methods": ["getLocation", "getLocationCallable"] + }, + "GetPersistentResource": { + "methods": ["getPersistentResource", "getPersistentResource", "getPersistentResource", "getPersistentResourceCallable"] + }, + "ListLocations": { + "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"] + }, + "ListPersistentResources": { + "methods": ["listPersistentResources", "listPersistentResources", "listPersistentResources", "listPersistentResourcesPagedCallable", "listPersistentResourcesCallable"] + }, + "RebootPersistentResource": { + "methods": ["rebootPersistentResourceAsync", "rebootPersistentResourceAsync", "rebootPersistentResourceAsync", "rebootPersistentResourceOperationCallable", "rebootPersistentResourceCallable"] + }, + "SetIamPolicy": { + "methods": ["setIamPolicy", "setIamPolicyCallable"] + }, + "TestIamPermissions": { + "methods": ["testIamPermissions", "testIamPermissionsCallable"] + }, + "UpdatePersistentResource": { + "methods": ["updatePersistentResourceAsync", "updatePersistentResourceAsync", "updatePersistentResourceOperationCallable", "updatePersistentResourceCallable"] + } + } + } + } + }, "PipelineService": { "clients": { "grpc": { diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/package-info.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/package-info.java index 4389dfcf6825..f2abad14f200 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/package-info.java +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/package-info.java @@ -179,6 +179,25 @@ * } * } * + *

======================= GenAiTuningServiceClient ======================= + * + *

Service Description: A service for creating and managing GenAI Tuning Jobs. + * + *

Sample for GenAiTuningServiceClient: + * + *

{@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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) {
+ *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ *   TuningJob tuningJob = TuningJob.newBuilder().build();
+ *   TuningJob response = genAiTuningServiceClient.createTuningJob(parent, tuningJob);
+ * }
+ * }
+ * *

======================= IndexEndpointServiceClient ======================= * *

Service Description: A service for managing Vertex AI's IndexEndpoints. @@ -354,6 +373,45 @@ * } * } * + *

======================= NotebookServiceClient ======================= + * + *

Service Description: The interface for Vertex Notebook service (a.k.a. Colab on Workbench). + * + *

Sample for NotebookServiceClient: + * + *

{@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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ *   NotebookRuntimeTemplateName name =
+ *       NotebookRuntimeTemplateName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]");
+ *   NotebookRuntimeTemplate response = notebookServiceClient.getNotebookRuntimeTemplate(name);
+ * }
+ * }
+ * + *

======================= PersistentResourceServiceClient ======================= + * + *

Service Description: A service for managing Vertex AI's machine learning PersistentResource. + * + *

Sample for PersistentResourceServiceClient: + * + *

{@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 (PersistentResourceServiceClient persistentResourceServiceClient =
+ *     PersistentResourceServiceClient.create()) {
+ *   PersistentResourceName name =
+ *       PersistentResourceName.of("[PROJECT]", "[LOCATION]", "[PERSISTENT_RESOURCE]");
+ *   PersistentResource response = persistentResourceServiceClient.getPersistentResource(name);
+ * }
+ * }
+ * *

======================= PipelineServiceClient ======================= * *

Service Description: A service for creating and managing Vertex AI's pipelines. This includes diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GenAiTuningServiceStub.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GenAiTuningServiceStub.java new file mode 100644 index 000000000000..169308e246aa --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GenAiTuningServiceStub.java @@ -0,0 +1,100 @@ +/* + * Copyright 2024 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.aiplatform.v1.stub; + +import static com.google.cloud.aiplatform.v1.GenAiTuningServiceClient.ListLocationsPagedResponse; +import static com.google.cloud.aiplatform.v1.GenAiTuningServiceClient.ListTuningJobsPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.aiplatform.v1.CancelTuningJobRequest; +import com.google.cloud.aiplatform.v1.CreateTuningJobRequest; +import com.google.cloud.aiplatform.v1.GetTuningJobRequest; +import com.google.cloud.aiplatform.v1.ListTuningJobsRequest; +import com.google.cloud.aiplatform.v1.ListTuningJobsResponse; +import com.google.cloud.aiplatform.v1.TuningJob; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the GenAiTuningService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class GenAiTuningServiceStub implements BackgroundResource { + + public UnaryCallable createTuningJobCallable() { + throw new UnsupportedOperationException("Not implemented: createTuningJobCallable()"); + } + + public UnaryCallable getTuningJobCallable() { + throw new UnsupportedOperationException("Not implemented: getTuningJobCallable()"); + } + + public UnaryCallable + listTuningJobsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listTuningJobsPagedCallable()"); + } + + public UnaryCallable listTuningJobsCallable() { + throw new UnsupportedOperationException("Not implemented: listTuningJobsCallable()"); + } + + public UnaryCallable cancelTuningJobCallable() { + throw new UnsupportedOperationException("Not implemented: cancelTuningJobCallable()"); + } + + public UnaryCallable + listLocationsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()"); + } + + public UnaryCallable listLocationsCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsCallable()"); + } + + public UnaryCallable getLocationCallable() { + throw new UnsupportedOperationException("Not implemented: getLocationCallable()"); + } + + public UnaryCallable setIamPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: setIamPolicyCallable()"); + } + + public UnaryCallable getIamPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: getIamPolicyCallable()"); + } + + public UnaryCallable + testIamPermissionsCallable() { + throw new UnsupportedOperationException("Not implemented: testIamPermissionsCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GenAiTuningServiceStubSettings.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GenAiTuningServiceStubSettings.java new file mode 100644 index 000000000000..6f3c8462b156 --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GenAiTuningServiceStubSettings.java @@ -0,0 +1,618 @@ +/* + * Copyright 2024 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.aiplatform.v1.stub; + +import static com.google.cloud.aiplatform.v1.GenAiTuningServiceClient.ListLocationsPagedResponse; +import static com.google.cloud.aiplatform.v1.GenAiTuningServiceClient.ListTuningJobsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.aiplatform.v1.CancelTuningJobRequest; +import com.google.cloud.aiplatform.v1.CreateTuningJobRequest; +import com.google.cloud.aiplatform.v1.GetTuningJobRequest; +import com.google.cloud.aiplatform.v1.ListTuningJobsRequest; +import com.google.cloud.aiplatform.v1.ListTuningJobsResponse; +import com.google.cloud.aiplatform.v1.TuningJob; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link GenAiTuningServiceStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (aiplatform.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of createTuningJob to 30 seconds: + * + *

{@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
+ * GenAiTuningServiceStubSettings.Builder genAiTuningServiceSettingsBuilder =
+ *     GenAiTuningServiceStubSettings.newBuilder();
+ * genAiTuningServiceSettingsBuilder
+ *     .createTuningJobSettings()
+ *     .setRetrySettings(
+ *         genAiTuningServiceSettingsBuilder
+ *             .createTuningJobSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * GenAiTuningServiceStubSettings genAiTuningServiceSettings =
+ *     genAiTuningServiceSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class GenAiTuningServiceStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final UnaryCallSettings createTuningJobSettings; + private final UnaryCallSettings getTuningJobSettings; + private final PagedCallSettings< + ListTuningJobsRequest, ListTuningJobsResponse, ListTuningJobsPagedResponse> + listTuningJobsSettings; + private final UnaryCallSettings cancelTuningJobSettings; + private final PagedCallSettings< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings getLocationSettings; + private final UnaryCallSettings setIamPolicySettings; + private final UnaryCallSettings getIamPolicySettings; + private final UnaryCallSettings + testIamPermissionsSettings; + + private static final PagedListDescriptor + LIST_TUNING_JOBS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListTuningJobsRequest injectToken(ListTuningJobsRequest payload, String token) { + return ListTuningJobsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListTuningJobsRequest injectPageSize( + ListTuningJobsRequest payload, int pageSize) { + return ListTuningJobsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListTuningJobsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListTuningJobsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListTuningJobsResponse payload) { + return payload.getTuningJobsList() == null + ? ImmutableList.of() + : payload.getTuningJobsList(); + } + }; + + private static final PagedListDescriptor + LIST_LOCATIONS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListLocationsRequest injectToken(ListLocationsRequest payload, String token) { + return ListLocationsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListLocationsRequest injectPageSize(ListLocationsRequest payload, int pageSize) { + return ListLocationsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListLocationsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListLocationsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListLocationsResponse payload) { + return payload.getLocationsList() == null + ? ImmutableList.of() + : payload.getLocationsList(); + } + }; + + private static final PagedListResponseFactory< + ListTuningJobsRequest, ListTuningJobsResponse, ListTuningJobsPagedResponse> + LIST_TUNING_JOBS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListTuningJobsRequest, ListTuningJobsResponse, ListTuningJobsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListTuningJobsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_TUNING_JOBS_PAGE_STR_DESC, request, context); + return ListTuningJobsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + LIST_LOCATIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListLocationsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_LOCATIONS_PAGE_STR_DESC, request, context); + return ListLocationsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to createTuningJob. */ + public UnaryCallSettings createTuningJobSettings() { + return createTuningJobSettings; + } + + /** Returns the object with the settings used for calls to getTuningJob. */ + public UnaryCallSettings getTuningJobSettings() { + return getTuningJobSettings; + } + + /** Returns the object with the settings used for calls to listTuningJobs. */ + public PagedCallSettings< + ListTuningJobsRequest, ListTuningJobsResponse, ListTuningJobsPagedResponse> + listTuningJobsSettings() { + return listTuningJobsSettings; + } + + /** Returns the object with the settings used for calls to cancelTuningJob. */ + public UnaryCallSettings cancelTuningJobSettings() { + return cancelTuningJobSettings; + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return getLocationSettings; + } + + /** Returns the object with the settings used for calls to setIamPolicy. */ + public UnaryCallSettings setIamPolicySettings() { + return setIamPolicySettings; + } + + /** Returns the object with the settings used for calls to getIamPolicy. */ + public UnaryCallSettings getIamPolicySettings() { + return getIamPolicySettings; + } + + /** Returns the object with the settings used for calls to testIamPermissions. */ + public UnaryCallSettings + testIamPermissionsSettings() { + return testIamPermissionsSettings; + } + + public GenAiTuningServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcGenAiTuningServiceStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns the endpoint set by the user or the the service's default endpoint. */ + @Override + public String getEndpoint() { + if (super.getEndpoint() != null) { + return super.getEndpoint(); + } + return getDefaultEndpoint(); + } + + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "aiplatform"; + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "aiplatform.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "aiplatform.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(GenAiTuningServiceStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected GenAiTuningServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + createTuningJobSettings = settingsBuilder.createTuningJobSettings().build(); + getTuningJobSettings = settingsBuilder.getTuningJobSettings().build(); + listTuningJobsSettings = settingsBuilder.listTuningJobsSettings().build(); + cancelTuningJobSettings = settingsBuilder.cancelTuningJobSettings().build(); + listLocationsSettings = settingsBuilder.listLocationsSettings().build(); + getLocationSettings = settingsBuilder.getLocationSettings().build(); + setIamPolicySettings = settingsBuilder.setIamPolicySettings().build(); + getIamPolicySettings = settingsBuilder.getIamPolicySettings().build(); + testIamPermissionsSettings = settingsBuilder.testIamPermissionsSettings().build(); + } + + /** Builder for GenAiTuningServiceStubSettings. */ + public static class Builder + extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder + createTuningJobSettings; + private final UnaryCallSettings.Builder getTuningJobSettings; + private final PagedCallSettings.Builder< + ListTuningJobsRequest, ListTuningJobsResponse, ListTuningJobsPagedResponse> + listTuningJobsSettings; + private final UnaryCallSettings.Builder cancelTuningJobSettings; + private final PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings.Builder getLocationSettings; + private final UnaryCallSettings.Builder setIamPolicySettings; + private final UnaryCallSettings.Builder getIamPolicySettings; + private final UnaryCallSettings.Builder + testIamPermissionsSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); + definitions.put("no_retry_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + createTuningJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getTuningJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listTuningJobsSettings = PagedCallSettings.newBuilder(LIST_TUNING_JOBS_PAGE_STR_FACT); + cancelTuningJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); + getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + setIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + testIamPermissionsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createTuningJobSettings, + getTuningJobSettings, + listTuningJobsSettings, + cancelTuningJobSettings, + listLocationsSettings, + getLocationSettings, + setIamPolicySettings, + getIamPolicySettings, + testIamPermissionsSettings); + initDefaults(this); + } + + protected Builder(GenAiTuningServiceStubSettings settings) { + super(settings); + + createTuningJobSettings = settings.createTuningJobSettings.toBuilder(); + getTuningJobSettings = settings.getTuningJobSettings.toBuilder(); + listTuningJobsSettings = settings.listTuningJobsSettings.toBuilder(); + cancelTuningJobSettings = settings.cancelTuningJobSettings.toBuilder(); + listLocationsSettings = settings.listLocationsSettings.toBuilder(); + getLocationSettings = settings.getLocationSettings.toBuilder(); + setIamPolicySettings = settings.setIamPolicySettings.toBuilder(); + getIamPolicySettings = settings.getIamPolicySettings.toBuilder(); + testIamPermissionsSettings = settings.testIamPermissionsSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createTuningJobSettings, + getTuningJobSettings, + listTuningJobsSettings, + cancelTuningJobSettings, + listLocationsSettings, + getLocationSettings, + setIamPolicySettings, + getIamPolicySettings, + testIamPermissionsSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .createTuningJobSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getTuningJobSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listTuningJobsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .cancelTuningJobSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listLocationsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getLocationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .setIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .testIamPermissionsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to createTuningJob. */ + public UnaryCallSettings.Builder createTuningJobSettings() { + return createTuningJobSettings; + } + + /** Returns the builder for the settings used for calls to getTuningJob. */ + public UnaryCallSettings.Builder getTuningJobSettings() { + return getTuningJobSettings; + } + + /** Returns the builder for the settings used for calls to listTuningJobs. */ + public PagedCallSettings.Builder< + ListTuningJobsRequest, ListTuningJobsResponse, ListTuningJobsPagedResponse> + listTuningJobsSettings() { + return listTuningJobsSettings; + } + + /** Returns the builder for the settings used for calls to cancelTuningJob. */ + public UnaryCallSettings.Builder cancelTuningJobSettings() { + return cancelTuningJobSettings; + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getLocationSettings; + } + + /** Returns the builder for the settings used for calls to setIamPolicy. */ + public UnaryCallSettings.Builder setIamPolicySettings() { + return setIamPolicySettings; + } + + /** Returns the builder for the settings used for calls to getIamPolicy. */ + public UnaryCallSettings.Builder getIamPolicySettings() { + return getIamPolicySettings; + } + + /** Returns the builder for the settings used for calls to testIamPermissions. */ + public UnaryCallSettings.Builder + testIamPermissionsSettings() { + return testIamPermissionsSettings; + } + + /** Returns the endpoint set by the user or the the service's default endpoint. */ + @Override + public String getEndpoint() { + if (super.getEndpoint() != null) { + return super.getEndpoint(); + } + return getDefaultEndpoint(); + } + + @Override + public GenAiTuningServiceStubSettings build() throws IOException { + return new GenAiTuningServiceStubSettings(this); + } + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcGenAiTuningServiceCallableFactory.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcGenAiTuningServiceCallableFactory.java new file mode 100644 index 000000000000..f0a7907daee2 --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcGenAiTuningServiceCallableFactory.java @@ -0,0 +1,113 @@ +/* + * Copyright 2024 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.aiplatform.v1.stub; + +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the GenAiTuningService service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcGenAiTuningServiceCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcGenAiTuningServiceStub.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcGenAiTuningServiceStub.java new file mode 100644 index 000000000000..53b459fcd324 --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcGenAiTuningServiceStub.java @@ -0,0 +1,435 @@ +/* + * Copyright 2024 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.aiplatform.v1.stub; + +import static com.google.cloud.aiplatform.v1.GenAiTuningServiceClient.ListLocationsPagedResponse; +import static com.google.cloud.aiplatform.v1.GenAiTuningServiceClient.ListTuningJobsPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.aiplatform.v1.CancelTuningJobRequest; +import com.google.cloud.aiplatform.v1.CreateTuningJobRequest; +import com.google.cloud.aiplatform.v1.GetTuningJobRequest; +import com.google.cloud.aiplatform.v1.ListTuningJobsRequest; +import com.google.cloud.aiplatform.v1.ListTuningJobsResponse; +import com.google.cloud.aiplatform.v1.TuningJob; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the GenAiTuningService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcGenAiTuningServiceStub extends GenAiTuningServiceStub { + private static final MethodDescriptor + createTuningJobMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1.GenAiTuningService/CreateTuningJob") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateTuningJobRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(TuningJob.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getTuningJobMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1.GenAiTuningService/GetTuningJob") + .setRequestMarshaller(ProtoUtils.marshaller(GetTuningJobRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(TuningJob.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listTuningJobsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1.GenAiTuningService/ListTuningJobs") + .setRequestMarshaller( + ProtoUtils.marshaller(ListTuningJobsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListTuningJobsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + cancelTuningJobMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1.GenAiTuningService/CancelTuningJob") + .setRequestMarshaller( + ProtoUtils.marshaller(CancelTuningJobRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listLocationsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setRequestMarshaller( + ProtoUtils.marshaller(ListLocationsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListLocationsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getLocationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setRequestMarshaller(ProtoUtils.marshaller(GetLocationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Location.getDefaultInstance())) + .build(); + + private static final MethodDescriptor setIamPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/SetIamPolicy") + .setRequestMarshaller(ProtoUtils.marshaller(SetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getIamPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/GetIamPolicy") + .setRequestMarshaller(ProtoUtils.marshaller(GetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + testIamPermissionsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/TestIamPermissions") + .setRequestMarshaller( + ProtoUtils.marshaller(TestIamPermissionsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(TestIamPermissionsResponse.getDefaultInstance())) + .build(); + + private final UnaryCallable createTuningJobCallable; + private final UnaryCallable getTuningJobCallable; + private final UnaryCallable listTuningJobsCallable; + private final UnaryCallable + listTuningJobsPagedCallable; + private final UnaryCallable cancelTuningJobCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; + private final UnaryCallable setIamPolicyCallable; + private final UnaryCallable getIamPolicyCallable; + private final UnaryCallable + testIamPermissionsCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcGenAiTuningServiceStub create(GenAiTuningServiceStubSettings settings) + throws IOException { + return new GrpcGenAiTuningServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcGenAiTuningServiceStub create(ClientContext clientContext) + throws IOException { + return new GrpcGenAiTuningServiceStub( + GenAiTuningServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcGenAiTuningServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcGenAiTuningServiceStub( + GenAiTuningServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcGenAiTuningServiceStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected GrpcGenAiTuningServiceStub( + GenAiTuningServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new GrpcGenAiTuningServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcGenAiTuningServiceStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected GrpcGenAiTuningServiceStub( + GenAiTuningServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings createTuningJobTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createTuningJobMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getTuningJobTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getTuningJobMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + listTuningJobsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listTuningJobsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings cancelTuningJobTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(cancelTuningJobMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings listLocationsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings getLocationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings setIamPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(setIamPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("resource", String.valueOf(request.getResource())); + return builder.build(); + }) + .build(); + GrpcCallSettings getIamPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getIamPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("resource", String.valueOf(request.getResource())); + return builder.build(); + }) + .build(); + GrpcCallSettings + testIamPermissionsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(testIamPermissionsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("resource", String.valueOf(request.getResource())); + return builder.build(); + }) + .build(); + + this.createTuningJobCallable = + callableFactory.createUnaryCallable( + createTuningJobTransportSettings, settings.createTuningJobSettings(), clientContext); + this.getTuningJobCallable = + callableFactory.createUnaryCallable( + getTuningJobTransportSettings, settings.getTuningJobSettings(), clientContext); + this.listTuningJobsCallable = + callableFactory.createUnaryCallable( + listTuningJobsTransportSettings, settings.listTuningJobsSettings(), clientContext); + this.listTuningJobsPagedCallable = + callableFactory.createPagedCallable( + listTuningJobsTransportSettings, settings.listTuningJobsSettings(), clientContext); + this.cancelTuningJobCallable = + callableFactory.createUnaryCallable( + cancelTuningJobTransportSettings, settings.cancelTuningJobSettings(), clientContext); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); + this.setIamPolicyCallable = + callableFactory.createUnaryCallable( + setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext); + this.getIamPolicyCallable = + callableFactory.createUnaryCallable( + getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext); + this.testIamPermissionsCallable = + callableFactory.createUnaryCallable( + testIamPermissionsTransportSettings, + settings.testIamPermissionsSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable createTuningJobCallable() { + return createTuningJobCallable; + } + + @Override + public UnaryCallable getTuningJobCallable() { + return getTuningJobCallable; + } + + @Override + public UnaryCallable listTuningJobsCallable() { + return listTuningJobsCallable; + } + + @Override + public UnaryCallable + listTuningJobsPagedCallable() { + return listTuningJobsPagedCallable; + } + + @Override + public UnaryCallable cancelTuningJobCallable() { + return cancelTuningJobCallable; + } + + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @Override + public UnaryCallable setIamPolicyCallable() { + return setIamPolicyCallable; + } + + @Override + public UnaryCallable getIamPolicyCallable() { + return getIamPolicyCallable; + } + + @Override + public UnaryCallable + testIamPermissionsCallable() { + return testIamPermissionsCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcNotebookServiceCallableFactory.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcNotebookServiceCallableFactory.java new file mode 100644 index 000000000000..8c9f96b4370e --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcNotebookServiceCallableFactory.java @@ -0,0 +1,113 @@ +/* + * Copyright 2024 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.aiplatform.v1.stub; + +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the NotebookService service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcNotebookServiceCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcNotebookServiceStub.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcNotebookServiceStub.java new file mode 100644 index 000000000000..86ee09bc2076 --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcNotebookServiceStub.java @@ -0,0 +1,806 @@ +/* + * Copyright 2024 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.aiplatform.v1.stub; + +import static com.google.cloud.aiplatform.v1.NotebookServiceClient.ListLocationsPagedResponse; +import static com.google.cloud.aiplatform.v1.NotebookServiceClient.ListNotebookRuntimeTemplatesPagedResponse; +import static com.google.cloud.aiplatform.v1.NotebookServiceClient.ListNotebookRuntimesPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.aiplatform.v1.AssignNotebookRuntimeOperationMetadata; +import com.google.cloud.aiplatform.v1.AssignNotebookRuntimeRequest; +import com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateOperationMetadata; +import com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateRequest; +import com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeRequest; +import com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeTemplateRequest; +import com.google.cloud.aiplatform.v1.DeleteOperationMetadata; +import com.google.cloud.aiplatform.v1.GetNotebookRuntimeRequest; +import com.google.cloud.aiplatform.v1.GetNotebookRuntimeTemplateRequest; +import com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest; +import com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse; +import com.google.cloud.aiplatform.v1.ListNotebookRuntimesRequest; +import com.google.cloud.aiplatform.v1.ListNotebookRuntimesResponse; +import com.google.cloud.aiplatform.v1.NotebookRuntime; +import com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate; +import com.google.cloud.aiplatform.v1.StartNotebookRuntimeOperationMetadata; +import com.google.cloud.aiplatform.v1.StartNotebookRuntimeRequest; +import com.google.cloud.aiplatform.v1.StartNotebookRuntimeResponse; +import com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeOperationMetadata; +import com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeRequest; +import com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeResponse; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the NotebookService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcNotebookServiceStub extends NotebookServiceStub { + private static final MethodDescriptor + createNotebookRuntimeTemplateMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.aiplatform.v1.NotebookService/CreateNotebookRuntimeTemplate") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateNotebookRuntimeTemplateRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getNotebookRuntimeTemplateMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.aiplatform.v1.NotebookService/GetNotebookRuntimeTemplate") + .setRequestMarshaller( + ProtoUtils.marshaller(GetNotebookRuntimeTemplateRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(NotebookRuntimeTemplate.getDefaultInstance())) + .build(); + + private static final MethodDescriptor< + ListNotebookRuntimeTemplatesRequest, ListNotebookRuntimeTemplatesResponse> + listNotebookRuntimeTemplatesMethodDescriptor = + MethodDescriptor + . + newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.aiplatform.v1.NotebookService/ListNotebookRuntimeTemplates") + .setRequestMarshaller( + ProtoUtils.marshaller(ListNotebookRuntimeTemplatesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListNotebookRuntimeTemplatesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteNotebookRuntimeTemplateMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.aiplatform.v1.NotebookService/DeleteNotebookRuntimeTemplate") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteNotebookRuntimeTemplateRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + assignNotebookRuntimeMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1.NotebookService/AssignNotebookRuntime") + .setRequestMarshaller( + ProtoUtils.marshaller(AssignNotebookRuntimeRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getNotebookRuntimeMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1.NotebookService/GetNotebookRuntime") + .setRequestMarshaller( + ProtoUtils.marshaller(GetNotebookRuntimeRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(NotebookRuntime.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listNotebookRuntimesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1.NotebookService/ListNotebookRuntimes") + .setRequestMarshaller( + ProtoUtils.marshaller(ListNotebookRuntimesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListNotebookRuntimesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteNotebookRuntimeMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1.NotebookService/DeleteNotebookRuntime") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteNotebookRuntimeRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + upgradeNotebookRuntimeMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.aiplatform.v1.NotebookService/UpgradeNotebookRuntime") + .setRequestMarshaller( + ProtoUtils.marshaller(UpgradeNotebookRuntimeRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + startNotebookRuntimeMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1.NotebookService/StartNotebookRuntime") + .setRequestMarshaller( + ProtoUtils.marshaller(StartNotebookRuntimeRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listLocationsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setRequestMarshaller( + ProtoUtils.marshaller(ListLocationsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListLocationsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getLocationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setRequestMarshaller(ProtoUtils.marshaller(GetLocationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Location.getDefaultInstance())) + .build(); + + private static final MethodDescriptor setIamPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/SetIamPolicy") + .setRequestMarshaller(ProtoUtils.marshaller(SetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getIamPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/GetIamPolicy") + .setRequestMarshaller(ProtoUtils.marshaller(GetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + testIamPermissionsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/TestIamPermissions") + .setRequestMarshaller( + ProtoUtils.marshaller(TestIamPermissionsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(TestIamPermissionsResponse.getDefaultInstance())) + .build(); + + private final UnaryCallable + createNotebookRuntimeTemplateCallable; + private final OperationCallable< + CreateNotebookRuntimeTemplateRequest, + NotebookRuntimeTemplate, + CreateNotebookRuntimeTemplateOperationMetadata> + createNotebookRuntimeTemplateOperationCallable; + private final UnaryCallable + getNotebookRuntimeTemplateCallable; + private final UnaryCallable< + ListNotebookRuntimeTemplatesRequest, ListNotebookRuntimeTemplatesResponse> + listNotebookRuntimeTemplatesCallable; + private final UnaryCallable< + ListNotebookRuntimeTemplatesRequest, ListNotebookRuntimeTemplatesPagedResponse> + listNotebookRuntimeTemplatesPagedCallable; + private final UnaryCallable + deleteNotebookRuntimeTemplateCallable; + private final OperationCallable< + DeleteNotebookRuntimeTemplateRequest, Empty, DeleteOperationMetadata> + deleteNotebookRuntimeTemplateOperationCallable; + private final UnaryCallable + assignNotebookRuntimeCallable; + private final OperationCallable< + AssignNotebookRuntimeRequest, NotebookRuntime, AssignNotebookRuntimeOperationMetadata> + assignNotebookRuntimeOperationCallable; + private final UnaryCallable + getNotebookRuntimeCallable; + private final UnaryCallable + listNotebookRuntimesCallable; + private final UnaryCallable + listNotebookRuntimesPagedCallable; + private final UnaryCallable + deleteNotebookRuntimeCallable; + private final OperationCallable + deleteNotebookRuntimeOperationCallable; + private final UnaryCallable + upgradeNotebookRuntimeCallable; + private final OperationCallable< + UpgradeNotebookRuntimeRequest, + UpgradeNotebookRuntimeResponse, + UpgradeNotebookRuntimeOperationMetadata> + upgradeNotebookRuntimeOperationCallable; + private final UnaryCallable startNotebookRuntimeCallable; + private final OperationCallable< + StartNotebookRuntimeRequest, + StartNotebookRuntimeResponse, + StartNotebookRuntimeOperationMetadata> + startNotebookRuntimeOperationCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; + private final UnaryCallable setIamPolicyCallable; + private final UnaryCallable getIamPolicyCallable; + private final UnaryCallable + testIamPermissionsCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcNotebookServiceStub create(NotebookServiceStubSettings settings) + throws IOException { + return new GrpcNotebookServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcNotebookServiceStub create(ClientContext clientContext) + throws IOException { + return new GrpcNotebookServiceStub( + NotebookServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcNotebookServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcNotebookServiceStub( + NotebookServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcNotebookServiceStub, using the given settings. This is protected + * so that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcNotebookServiceStub( + NotebookServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new GrpcNotebookServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcNotebookServiceStub, using the given settings. This is protected + * so that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcNotebookServiceStub( + NotebookServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings + createNotebookRuntimeTemplateTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createNotebookRuntimeTemplateMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings + getNotebookRuntimeTemplateTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(getNotebookRuntimeTemplateMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + listNotebookRuntimeTemplatesTransportSettings = + GrpcCallSettings + . + newBuilder() + .setMethodDescriptor(listNotebookRuntimeTemplatesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings + deleteNotebookRuntimeTemplateTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteNotebookRuntimeTemplateMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + assignNotebookRuntimeTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(assignNotebookRuntimeMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings + getNotebookRuntimeTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getNotebookRuntimeMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + listNotebookRuntimesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listNotebookRuntimesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings + deleteNotebookRuntimeTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteNotebookRuntimeMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + upgradeNotebookRuntimeTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(upgradeNotebookRuntimeMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings startNotebookRuntimeTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(startNotebookRuntimeMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings listLocationsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings getLocationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings setIamPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(setIamPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("resource", String.valueOf(request.getResource())); + return builder.build(); + }) + .build(); + GrpcCallSettings getIamPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getIamPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("resource", String.valueOf(request.getResource())); + return builder.build(); + }) + .build(); + GrpcCallSettings + testIamPermissionsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(testIamPermissionsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("resource", String.valueOf(request.getResource())); + return builder.build(); + }) + .build(); + + this.createNotebookRuntimeTemplateCallable = + callableFactory.createUnaryCallable( + createNotebookRuntimeTemplateTransportSettings, + settings.createNotebookRuntimeTemplateSettings(), + clientContext); + this.createNotebookRuntimeTemplateOperationCallable = + callableFactory.createOperationCallable( + createNotebookRuntimeTemplateTransportSettings, + settings.createNotebookRuntimeTemplateOperationSettings(), + clientContext, + operationsStub); + this.getNotebookRuntimeTemplateCallable = + callableFactory.createUnaryCallable( + getNotebookRuntimeTemplateTransportSettings, + settings.getNotebookRuntimeTemplateSettings(), + clientContext); + this.listNotebookRuntimeTemplatesCallable = + callableFactory.createUnaryCallable( + listNotebookRuntimeTemplatesTransportSettings, + settings.listNotebookRuntimeTemplatesSettings(), + clientContext); + this.listNotebookRuntimeTemplatesPagedCallable = + callableFactory.createPagedCallable( + listNotebookRuntimeTemplatesTransportSettings, + settings.listNotebookRuntimeTemplatesSettings(), + clientContext); + this.deleteNotebookRuntimeTemplateCallable = + callableFactory.createUnaryCallable( + deleteNotebookRuntimeTemplateTransportSettings, + settings.deleteNotebookRuntimeTemplateSettings(), + clientContext); + this.deleteNotebookRuntimeTemplateOperationCallable = + callableFactory.createOperationCallable( + deleteNotebookRuntimeTemplateTransportSettings, + settings.deleteNotebookRuntimeTemplateOperationSettings(), + clientContext, + operationsStub); + this.assignNotebookRuntimeCallable = + callableFactory.createUnaryCallable( + assignNotebookRuntimeTransportSettings, + settings.assignNotebookRuntimeSettings(), + clientContext); + this.assignNotebookRuntimeOperationCallable = + callableFactory.createOperationCallable( + assignNotebookRuntimeTransportSettings, + settings.assignNotebookRuntimeOperationSettings(), + clientContext, + operationsStub); + this.getNotebookRuntimeCallable = + callableFactory.createUnaryCallable( + getNotebookRuntimeTransportSettings, + settings.getNotebookRuntimeSettings(), + clientContext); + this.listNotebookRuntimesCallable = + callableFactory.createUnaryCallable( + listNotebookRuntimesTransportSettings, + settings.listNotebookRuntimesSettings(), + clientContext); + this.listNotebookRuntimesPagedCallable = + callableFactory.createPagedCallable( + listNotebookRuntimesTransportSettings, + settings.listNotebookRuntimesSettings(), + clientContext); + this.deleteNotebookRuntimeCallable = + callableFactory.createUnaryCallable( + deleteNotebookRuntimeTransportSettings, + settings.deleteNotebookRuntimeSettings(), + clientContext); + this.deleteNotebookRuntimeOperationCallable = + callableFactory.createOperationCallable( + deleteNotebookRuntimeTransportSettings, + settings.deleteNotebookRuntimeOperationSettings(), + clientContext, + operationsStub); + this.upgradeNotebookRuntimeCallable = + callableFactory.createUnaryCallable( + upgradeNotebookRuntimeTransportSettings, + settings.upgradeNotebookRuntimeSettings(), + clientContext); + this.upgradeNotebookRuntimeOperationCallable = + callableFactory.createOperationCallable( + upgradeNotebookRuntimeTransportSettings, + settings.upgradeNotebookRuntimeOperationSettings(), + clientContext, + operationsStub); + this.startNotebookRuntimeCallable = + callableFactory.createUnaryCallable( + startNotebookRuntimeTransportSettings, + settings.startNotebookRuntimeSettings(), + clientContext); + this.startNotebookRuntimeOperationCallable = + callableFactory.createOperationCallable( + startNotebookRuntimeTransportSettings, + settings.startNotebookRuntimeOperationSettings(), + clientContext, + operationsStub); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); + this.setIamPolicyCallable = + callableFactory.createUnaryCallable( + setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext); + this.getIamPolicyCallable = + callableFactory.createUnaryCallable( + getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext); + this.testIamPermissionsCallable = + callableFactory.createUnaryCallable( + testIamPermissionsTransportSettings, + settings.testIamPermissionsSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable + createNotebookRuntimeTemplateCallable() { + return createNotebookRuntimeTemplateCallable; + } + + @Override + public OperationCallable< + CreateNotebookRuntimeTemplateRequest, + NotebookRuntimeTemplate, + CreateNotebookRuntimeTemplateOperationMetadata> + createNotebookRuntimeTemplateOperationCallable() { + return createNotebookRuntimeTemplateOperationCallable; + } + + @Override + public UnaryCallable + getNotebookRuntimeTemplateCallable() { + return getNotebookRuntimeTemplateCallable; + } + + @Override + public UnaryCallable + listNotebookRuntimeTemplatesCallable() { + return listNotebookRuntimeTemplatesCallable; + } + + @Override + public UnaryCallable< + ListNotebookRuntimeTemplatesRequest, ListNotebookRuntimeTemplatesPagedResponse> + listNotebookRuntimeTemplatesPagedCallable() { + return listNotebookRuntimeTemplatesPagedCallable; + } + + @Override + public UnaryCallable + deleteNotebookRuntimeTemplateCallable() { + return deleteNotebookRuntimeTemplateCallable; + } + + @Override + public OperationCallable + deleteNotebookRuntimeTemplateOperationCallable() { + return deleteNotebookRuntimeTemplateOperationCallable; + } + + @Override + public UnaryCallable assignNotebookRuntimeCallable() { + return assignNotebookRuntimeCallable; + } + + @Override + public OperationCallable< + AssignNotebookRuntimeRequest, NotebookRuntime, AssignNotebookRuntimeOperationMetadata> + assignNotebookRuntimeOperationCallable() { + return assignNotebookRuntimeOperationCallable; + } + + @Override + public UnaryCallable getNotebookRuntimeCallable() { + return getNotebookRuntimeCallable; + } + + @Override + public UnaryCallable + listNotebookRuntimesCallable() { + return listNotebookRuntimesCallable; + } + + @Override + public UnaryCallable + listNotebookRuntimesPagedCallable() { + return listNotebookRuntimesPagedCallable; + } + + @Override + public UnaryCallable deleteNotebookRuntimeCallable() { + return deleteNotebookRuntimeCallable; + } + + @Override + public OperationCallable + deleteNotebookRuntimeOperationCallable() { + return deleteNotebookRuntimeOperationCallable; + } + + @Override + public UnaryCallable upgradeNotebookRuntimeCallable() { + return upgradeNotebookRuntimeCallable; + } + + @Override + public OperationCallable< + UpgradeNotebookRuntimeRequest, + UpgradeNotebookRuntimeResponse, + UpgradeNotebookRuntimeOperationMetadata> + upgradeNotebookRuntimeOperationCallable() { + return upgradeNotebookRuntimeOperationCallable; + } + + @Override + public UnaryCallable startNotebookRuntimeCallable() { + return startNotebookRuntimeCallable; + } + + @Override + public OperationCallable< + StartNotebookRuntimeRequest, + StartNotebookRuntimeResponse, + StartNotebookRuntimeOperationMetadata> + startNotebookRuntimeOperationCallable() { + return startNotebookRuntimeOperationCallable; + } + + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @Override + public UnaryCallable setIamPolicyCallable() { + return setIamPolicyCallable; + } + + @Override + public UnaryCallable getIamPolicyCallable() { + return getIamPolicyCallable; + } + + @Override + public UnaryCallable + testIamPermissionsCallable() { + return testIamPermissionsCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcPersistentResourceServiceCallableFactory.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcPersistentResourceServiceCallableFactory.java new file mode 100644 index 000000000000..23ec82ae45ea --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcPersistentResourceServiceCallableFactory.java @@ -0,0 +1,113 @@ +/* + * Copyright 2024 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.aiplatform.v1.stub; + +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the PersistentResourceService service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcPersistentResourceServiceCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcPersistentResourceServiceStub.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcPersistentResourceServiceStub.java new file mode 100644 index 000000000000..b7e0f9a1ec8a --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcPersistentResourceServiceStub.java @@ -0,0 +1,619 @@ +/* + * Copyright 2024 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.aiplatform.v1.stub; + +import static com.google.cloud.aiplatform.v1.PersistentResourceServiceClient.ListLocationsPagedResponse; +import static com.google.cloud.aiplatform.v1.PersistentResourceServiceClient.ListPersistentResourcesPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.aiplatform.v1.CreatePersistentResourceOperationMetadata; +import com.google.cloud.aiplatform.v1.CreatePersistentResourceRequest; +import com.google.cloud.aiplatform.v1.DeleteOperationMetadata; +import com.google.cloud.aiplatform.v1.DeletePersistentResourceRequest; +import com.google.cloud.aiplatform.v1.GetPersistentResourceRequest; +import com.google.cloud.aiplatform.v1.ListPersistentResourcesRequest; +import com.google.cloud.aiplatform.v1.ListPersistentResourcesResponse; +import com.google.cloud.aiplatform.v1.PersistentResource; +import com.google.cloud.aiplatform.v1.RebootPersistentResourceOperationMetadata; +import com.google.cloud.aiplatform.v1.RebootPersistentResourceRequest; +import com.google.cloud.aiplatform.v1.UpdatePersistentResourceOperationMetadata; +import com.google.cloud.aiplatform.v1.UpdatePersistentResourceRequest; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the PersistentResourceService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcPersistentResourceServiceStub extends PersistentResourceServiceStub { + private static final MethodDescriptor + createPersistentResourceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.aiplatform.v1.PersistentResourceService/CreatePersistentResource") + .setRequestMarshaller( + ProtoUtils.marshaller(CreatePersistentResourceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getPersistentResourceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.aiplatform.v1.PersistentResourceService/GetPersistentResource") + .setRequestMarshaller( + ProtoUtils.marshaller(GetPersistentResourceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(PersistentResource.getDefaultInstance())) + .build(); + + private static final MethodDescriptor< + ListPersistentResourcesRequest, ListPersistentResourcesResponse> + listPersistentResourcesMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.aiplatform.v1.PersistentResourceService/ListPersistentResources") + .setRequestMarshaller( + ProtoUtils.marshaller(ListPersistentResourcesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListPersistentResourcesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deletePersistentResourceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.aiplatform.v1.PersistentResourceService/DeletePersistentResource") + .setRequestMarshaller( + ProtoUtils.marshaller(DeletePersistentResourceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updatePersistentResourceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.aiplatform.v1.PersistentResourceService/UpdatePersistentResource") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdatePersistentResourceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + rebootPersistentResourceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.aiplatform.v1.PersistentResourceService/RebootPersistentResource") + .setRequestMarshaller( + ProtoUtils.marshaller(RebootPersistentResourceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listLocationsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setRequestMarshaller( + ProtoUtils.marshaller(ListLocationsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListLocationsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getLocationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setRequestMarshaller(ProtoUtils.marshaller(GetLocationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Location.getDefaultInstance())) + .build(); + + private static final MethodDescriptor setIamPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/SetIamPolicy") + .setRequestMarshaller(ProtoUtils.marshaller(SetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getIamPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/GetIamPolicy") + .setRequestMarshaller(ProtoUtils.marshaller(GetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + testIamPermissionsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/TestIamPermissions") + .setRequestMarshaller( + ProtoUtils.marshaller(TestIamPermissionsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(TestIamPermissionsResponse.getDefaultInstance())) + .build(); + + private final UnaryCallable + createPersistentResourceCallable; + private final OperationCallable< + CreatePersistentResourceRequest, + PersistentResource, + CreatePersistentResourceOperationMetadata> + createPersistentResourceOperationCallable; + private final UnaryCallable + getPersistentResourceCallable; + private final UnaryCallable + listPersistentResourcesCallable; + private final UnaryCallable + listPersistentResourcesPagedCallable; + private final UnaryCallable + deletePersistentResourceCallable; + private final OperationCallable + deletePersistentResourceOperationCallable; + private final UnaryCallable + updatePersistentResourceCallable; + private final OperationCallable< + UpdatePersistentResourceRequest, + PersistentResource, + UpdatePersistentResourceOperationMetadata> + updatePersistentResourceOperationCallable; + private final UnaryCallable + rebootPersistentResourceCallable; + private final OperationCallable< + RebootPersistentResourceRequest, + PersistentResource, + RebootPersistentResourceOperationMetadata> + rebootPersistentResourceOperationCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; + private final UnaryCallable setIamPolicyCallable; + private final UnaryCallable getIamPolicyCallable; + private final UnaryCallable + testIamPermissionsCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcPersistentResourceServiceStub create( + PersistentResourceServiceStubSettings settings) throws IOException { + return new GrpcPersistentResourceServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcPersistentResourceServiceStub create(ClientContext clientContext) + throws IOException { + return new GrpcPersistentResourceServiceStub( + PersistentResourceServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcPersistentResourceServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcPersistentResourceServiceStub( + PersistentResourceServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcPersistentResourceServiceStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected GrpcPersistentResourceServiceStub( + PersistentResourceServiceStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcPersistentResourceServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcPersistentResourceServiceStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected GrpcPersistentResourceServiceStub( + PersistentResourceServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings + createPersistentResourceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createPersistentResourceMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings + getPersistentResourceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getPersistentResourceMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + listPersistentResourcesTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(listPersistentResourcesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings + deletePersistentResourceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deletePersistentResourceMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + updatePersistentResourceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updatePersistentResourceMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "persistent_resource.name", + String.valueOf(request.getPersistentResource().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + rebootPersistentResourceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(rebootPersistentResourceMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings listLocationsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings getLocationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings setIamPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(setIamPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("resource", String.valueOf(request.getResource())); + return builder.build(); + }) + .build(); + GrpcCallSettings getIamPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getIamPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("resource", String.valueOf(request.getResource())); + return builder.build(); + }) + .build(); + GrpcCallSettings + testIamPermissionsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(testIamPermissionsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("resource", String.valueOf(request.getResource())); + return builder.build(); + }) + .build(); + + this.createPersistentResourceCallable = + callableFactory.createUnaryCallable( + createPersistentResourceTransportSettings, + settings.createPersistentResourceSettings(), + clientContext); + this.createPersistentResourceOperationCallable = + callableFactory.createOperationCallable( + createPersistentResourceTransportSettings, + settings.createPersistentResourceOperationSettings(), + clientContext, + operationsStub); + this.getPersistentResourceCallable = + callableFactory.createUnaryCallable( + getPersistentResourceTransportSettings, + settings.getPersistentResourceSettings(), + clientContext); + this.listPersistentResourcesCallable = + callableFactory.createUnaryCallable( + listPersistentResourcesTransportSettings, + settings.listPersistentResourcesSettings(), + clientContext); + this.listPersistentResourcesPagedCallable = + callableFactory.createPagedCallable( + listPersistentResourcesTransportSettings, + settings.listPersistentResourcesSettings(), + clientContext); + this.deletePersistentResourceCallable = + callableFactory.createUnaryCallable( + deletePersistentResourceTransportSettings, + settings.deletePersistentResourceSettings(), + clientContext); + this.deletePersistentResourceOperationCallable = + callableFactory.createOperationCallable( + deletePersistentResourceTransportSettings, + settings.deletePersistentResourceOperationSettings(), + clientContext, + operationsStub); + this.updatePersistentResourceCallable = + callableFactory.createUnaryCallable( + updatePersistentResourceTransportSettings, + settings.updatePersistentResourceSettings(), + clientContext); + this.updatePersistentResourceOperationCallable = + callableFactory.createOperationCallable( + updatePersistentResourceTransportSettings, + settings.updatePersistentResourceOperationSettings(), + clientContext, + operationsStub); + this.rebootPersistentResourceCallable = + callableFactory.createUnaryCallable( + rebootPersistentResourceTransportSettings, + settings.rebootPersistentResourceSettings(), + clientContext); + this.rebootPersistentResourceOperationCallable = + callableFactory.createOperationCallable( + rebootPersistentResourceTransportSettings, + settings.rebootPersistentResourceOperationSettings(), + clientContext, + operationsStub); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); + this.setIamPolicyCallable = + callableFactory.createUnaryCallable( + setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext); + this.getIamPolicyCallable = + callableFactory.createUnaryCallable( + getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext); + this.testIamPermissionsCallable = + callableFactory.createUnaryCallable( + testIamPermissionsTransportSettings, + settings.testIamPermissionsSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable + createPersistentResourceCallable() { + return createPersistentResourceCallable; + } + + @Override + public OperationCallable< + CreatePersistentResourceRequest, + PersistentResource, + CreatePersistentResourceOperationMetadata> + createPersistentResourceOperationCallable() { + return createPersistentResourceOperationCallable; + } + + @Override + public UnaryCallable + getPersistentResourceCallable() { + return getPersistentResourceCallable; + } + + @Override + public UnaryCallable + listPersistentResourcesCallable() { + return listPersistentResourcesCallable; + } + + @Override + public UnaryCallable + listPersistentResourcesPagedCallable() { + return listPersistentResourcesPagedCallable; + } + + @Override + public UnaryCallable + deletePersistentResourceCallable() { + return deletePersistentResourceCallable; + } + + @Override + public OperationCallable + deletePersistentResourceOperationCallable() { + return deletePersistentResourceOperationCallable; + } + + @Override + public UnaryCallable + updatePersistentResourceCallable() { + return updatePersistentResourceCallable; + } + + @Override + public OperationCallable< + UpdatePersistentResourceRequest, + PersistentResource, + UpdatePersistentResourceOperationMetadata> + updatePersistentResourceOperationCallable() { + return updatePersistentResourceOperationCallable; + } + + @Override + public UnaryCallable + rebootPersistentResourceCallable() { + return rebootPersistentResourceCallable; + } + + @Override + public OperationCallable< + RebootPersistentResourceRequest, + PersistentResource, + RebootPersistentResourceOperationMetadata> + rebootPersistentResourceOperationCallable() { + return rebootPersistentResourceOperationCallable; + } + + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @Override + public UnaryCallable setIamPolicyCallable() { + return setIamPolicyCallable; + } + + @Override + public UnaryCallable getIamPolicyCallable() { + return getIamPolicyCallable; + } + + @Override + public UnaryCallable + testIamPermissionsCallable() { + return testIamPermissionsCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/NotebookServiceStub.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/NotebookServiceStub.java new file mode 100644 index 000000000000..a0905e31e6c1 --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/NotebookServiceStub.java @@ -0,0 +1,209 @@ +/* + * Copyright 2024 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.aiplatform.v1.stub; + +import static com.google.cloud.aiplatform.v1.NotebookServiceClient.ListLocationsPagedResponse; +import static com.google.cloud.aiplatform.v1.NotebookServiceClient.ListNotebookRuntimeTemplatesPagedResponse; +import static com.google.cloud.aiplatform.v1.NotebookServiceClient.ListNotebookRuntimesPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.aiplatform.v1.AssignNotebookRuntimeOperationMetadata; +import com.google.cloud.aiplatform.v1.AssignNotebookRuntimeRequest; +import com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateOperationMetadata; +import com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateRequest; +import com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeRequest; +import com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeTemplateRequest; +import com.google.cloud.aiplatform.v1.DeleteOperationMetadata; +import com.google.cloud.aiplatform.v1.GetNotebookRuntimeRequest; +import com.google.cloud.aiplatform.v1.GetNotebookRuntimeTemplateRequest; +import com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest; +import com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse; +import com.google.cloud.aiplatform.v1.ListNotebookRuntimesRequest; +import com.google.cloud.aiplatform.v1.ListNotebookRuntimesResponse; +import com.google.cloud.aiplatform.v1.NotebookRuntime; +import com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate; +import com.google.cloud.aiplatform.v1.StartNotebookRuntimeOperationMetadata; +import com.google.cloud.aiplatform.v1.StartNotebookRuntimeRequest; +import com.google.cloud.aiplatform.v1.StartNotebookRuntimeResponse; +import com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeOperationMetadata; +import com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeRequest; +import com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeResponse; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the NotebookService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class NotebookServiceStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + throw new UnsupportedOperationException("Not implemented: getOperationsStub()"); + } + + public OperationCallable< + CreateNotebookRuntimeTemplateRequest, + NotebookRuntimeTemplate, + CreateNotebookRuntimeTemplateOperationMetadata> + createNotebookRuntimeTemplateOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createNotebookRuntimeTemplateOperationCallable()"); + } + + public UnaryCallable + createNotebookRuntimeTemplateCallable() { + throw new UnsupportedOperationException( + "Not implemented: createNotebookRuntimeTemplateCallable()"); + } + + public UnaryCallable + getNotebookRuntimeTemplateCallable() { + throw new UnsupportedOperationException( + "Not implemented: getNotebookRuntimeTemplateCallable()"); + } + + public UnaryCallable< + ListNotebookRuntimeTemplatesRequest, ListNotebookRuntimeTemplatesPagedResponse> + listNotebookRuntimeTemplatesPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listNotebookRuntimeTemplatesPagedCallable()"); + } + + public UnaryCallable + listNotebookRuntimeTemplatesCallable() { + throw new UnsupportedOperationException( + "Not implemented: listNotebookRuntimeTemplatesCallable()"); + } + + public OperationCallable + deleteNotebookRuntimeTemplateOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteNotebookRuntimeTemplateOperationCallable()"); + } + + public UnaryCallable + deleteNotebookRuntimeTemplateCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteNotebookRuntimeTemplateCallable()"); + } + + public OperationCallable< + AssignNotebookRuntimeRequest, NotebookRuntime, AssignNotebookRuntimeOperationMetadata> + assignNotebookRuntimeOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: assignNotebookRuntimeOperationCallable()"); + } + + public UnaryCallable assignNotebookRuntimeCallable() { + throw new UnsupportedOperationException("Not implemented: assignNotebookRuntimeCallable()"); + } + + public UnaryCallable getNotebookRuntimeCallable() { + throw new UnsupportedOperationException("Not implemented: getNotebookRuntimeCallable()"); + } + + public UnaryCallable + listNotebookRuntimesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listNotebookRuntimesPagedCallable()"); + } + + public UnaryCallable + listNotebookRuntimesCallable() { + throw new UnsupportedOperationException("Not implemented: listNotebookRuntimesCallable()"); + } + + public OperationCallable + deleteNotebookRuntimeOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteNotebookRuntimeOperationCallable()"); + } + + public UnaryCallable deleteNotebookRuntimeCallable() { + throw new UnsupportedOperationException("Not implemented: deleteNotebookRuntimeCallable()"); + } + + public OperationCallable< + UpgradeNotebookRuntimeRequest, + UpgradeNotebookRuntimeResponse, + UpgradeNotebookRuntimeOperationMetadata> + upgradeNotebookRuntimeOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: upgradeNotebookRuntimeOperationCallable()"); + } + + public UnaryCallable upgradeNotebookRuntimeCallable() { + throw new UnsupportedOperationException("Not implemented: upgradeNotebookRuntimeCallable()"); + } + + public OperationCallable< + StartNotebookRuntimeRequest, + StartNotebookRuntimeResponse, + StartNotebookRuntimeOperationMetadata> + startNotebookRuntimeOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: startNotebookRuntimeOperationCallable()"); + } + + public UnaryCallable startNotebookRuntimeCallable() { + throw new UnsupportedOperationException("Not implemented: startNotebookRuntimeCallable()"); + } + + public UnaryCallable + listLocationsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()"); + } + + public UnaryCallable listLocationsCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsCallable()"); + } + + public UnaryCallable getLocationCallable() { + throw new UnsupportedOperationException("Not implemented: getLocationCallable()"); + } + + public UnaryCallable setIamPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: setIamPolicyCallable()"); + } + + public UnaryCallable getIamPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: getIamPolicyCallable()"); + } + + public UnaryCallable + testIamPermissionsCallable() { + throw new UnsupportedOperationException("Not implemented: testIamPermissionsCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/NotebookServiceStubSettings.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/NotebookServiceStubSettings.java new file mode 100644 index 000000000000..7ae5e888dab4 --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/NotebookServiceStubSettings.java @@ -0,0 +1,1249 @@ +/* + * Copyright 2024 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.aiplatform.v1.stub; + +import static com.google.cloud.aiplatform.v1.NotebookServiceClient.ListLocationsPagedResponse; +import static com.google.cloud.aiplatform.v1.NotebookServiceClient.ListNotebookRuntimeTemplatesPagedResponse; +import static com.google.cloud.aiplatform.v1.NotebookServiceClient.ListNotebookRuntimesPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.aiplatform.v1.AssignNotebookRuntimeOperationMetadata; +import com.google.cloud.aiplatform.v1.AssignNotebookRuntimeRequest; +import com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateOperationMetadata; +import com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateRequest; +import com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeRequest; +import com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeTemplateRequest; +import com.google.cloud.aiplatform.v1.DeleteOperationMetadata; +import com.google.cloud.aiplatform.v1.GetNotebookRuntimeRequest; +import com.google.cloud.aiplatform.v1.GetNotebookRuntimeTemplateRequest; +import com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest; +import com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse; +import com.google.cloud.aiplatform.v1.ListNotebookRuntimesRequest; +import com.google.cloud.aiplatform.v1.ListNotebookRuntimesResponse; +import com.google.cloud.aiplatform.v1.NotebookRuntime; +import com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate; +import com.google.cloud.aiplatform.v1.StartNotebookRuntimeOperationMetadata; +import com.google.cloud.aiplatform.v1.StartNotebookRuntimeRequest; +import com.google.cloud.aiplatform.v1.StartNotebookRuntimeResponse; +import com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeOperationMetadata; +import com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeRequest; +import com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeResponse; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link NotebookServiceStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (aiplatform.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of getNotebookRuntimeTemplate to 30 seconds: + * + *

{@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
+ * NotebookServiceStubSettings.Builder notebookServiceSettingsBuilder =
+ *     NotebookServiceStubSettings.newBuilder();
+ * notebookServiceSettingsBuilder
+ *     .getNotebookRuntimeTemplateSettings()
+ *     .setRetrySettings(
+ *         notebookServiceSettingsBuilder
+ *             .getNotebookRuntimeTemplateSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * NotebookServiceStubSettings notebookServiceSettings = notebookServiceSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class NotebookServiceStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final UnaryCallSettings + createNotebookRuntimeTemplateSettings; + private final OperationCallSettings< + CreateNotebookRuntimeTemplateRequest, + NotebookRuntimeTemplate, + CreateNotebookRuntimeTemplateOperationMetadata> + createNotebookRuntimeTemplateOperationSettings; + private final UnaryCallSettings + getNotebookRuntimeTemplateSettings; + private final PagedCallSettings< + ListNotebookRuntimeTemplatesRequest, + ListNotebookRuntimeTemplatesResponse, + ListNotebookRuntimeTemplatesPagedResponse> + listNotebookRuntimeTemplatesSettings; + private final UnaryCallSettings + deleteNotebookRuntimeTemplateSettings; + private final OperationCallSettings< + DeleteNotebookRuntimeTemplateRequest, Empty, DeleteOperationMetadata> + deleteNotebookRuntimeTemplateOperationSettings; + private final UnaryCallSettings + assignNotebookRuntimeSettings; + private final OperationCallSettings< + AssignNotebookRuntimeRequest, NotebookRuntime, AssignNotebookRuntimeOperationMetadata> + assignNotebookRuntimeOperationSettings; + private final UnaryCallSettings + getNotebookRuntimeSettings; + private final PagedCallSettings< + ListNotebookRuntimesRequest, + ListNotebookRuntimesResponse, + ListNotebookRuntimesPagedResponse> + listNotebookRuntimesSettings; + private final UnaryCallSettings + deleteNotebookRuntimeSettings; + private final OperationCallSettings + deleteNotebookRuntimeOperationSettings; + private final UnaryCallSettings + upgradeNotebookRuntimeSettings; + private final OperationCallSettings< + UpgradeNotebookRuntimeRequest, + UpgradeNotebookRuntimeResponse, + UpgradeNotebookRuntimeOperationMetadata> + upgradeNotebookRuntimeOperationSettings; + private final UnaryCallSettings + startNotebookRuntimeSettings; + private final OperationCallSettings< + StartNotebookRuntimeRequest, + StartNotebookRuntimeResponse, + StartNotebookRuntimeOperationMetadata> + startNotebookRuntimeOperationSettings; + private final PagedCallSettings< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings getLocationSettings; + private final UnaryCallSettings setIamPolicySettings; + private final UnaryCallSettings getIamPolicySettings; + private final UnaryCallSettings + testIamPermissionsSettings; + + private static final PagedListDescriptor< + ListNotebookRuntimeTemplatesRequest, + ListNotebookRuntimeTemplatesResponse, + NotebookRuntimeTemplate> + LIST_NOTEBOOK_RUNTIME_TEMPLATES_PAGE_STR_DESC = + new PagedListDescriptor< + ListNotebookRuntimeTemplatesRequest, + ListNotebookRuntimeTemplatesResponse, + NotebookRuntimeTemplate>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListNotebookRuntimeTemplatesRequest injectToken( + ListNotebookRuntimeTemplatesRequest payload, String token) { + return ListNotebookRuntimeTemplatesRequest.newBuilder(payload) + .setPageToken(token) + .build(); + } + + @Override + public ListNotebookRuntimeTemplatesRequest injectPageSize( + ListNotebookRuntimeTemplatesRequest payload, int pageSize) { + return ListNotebookRuntimeTemplatesRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(ListNotebookRuntimeTemplatesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListNotebookRuntimeTemplatesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListNotebookRuntimeTemplatesResponse payload) { + return payload.getNotebookRuntimeTemplatesList() == null + ? ImmutableList.of() + : payload.getNotebookRuntimeTemplatesList(); + } + }; + + private static final PagedListDescriptor< + ListNotebookRuntimesRequest, ListNotebookRuntimesResponse, NotebookRuntime> + LIST_NOTEBOOK_RUNTIMES_PAGE_STR_DESC = + new PagedListDescriptor< + ListNotebookRuntimesRequest, ListNotebookRuntimesResponse, NotebookRuntime>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListNotebookRuntimesRequest injectToken( + ListNotebookRuntimesRequest payload, String token) { + return ListNotebookRuntimesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListNotebookRuntimesRequest injectPageSize( + ListNotebookRuntimesRequest payload, int pageSize) { + return ListNotebookRuntimesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListNotebookRuntimesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListNotebookRuntimesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListNotebookRuntimesResponse payload) { + return payload.getNotebookRuntimesList() == null + ? ImmutableList.of() + : payload.getNotebookRuntimesList(); + } + }; + + private static final PagedListDescriptor + LIST_LOCATIONS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListLocationsRequest injectToken(ListLocationsRequest payload, String token) { + return ListLocationsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListLocationsRequest injectPageSize(ListLocationsRequest payload, int pageSize) { + return ListLocationsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListLocationsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListLocationsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListLocationsResponse payload) { + return payload.getLocationsList() == null + ? ImmutableList.of() + : payload.getLocationsList(); + } + }; + + private static final PagedListResponseFactory< + ListNotebookRuntimeTemplatesRequest, + ListNotebookRuntimeTemplatesResponse, + ListNotebookRuntimeTemplatesPagedResponse> + LIST_NOTEBOOK_RUNTIME_TEMPLATES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListNotebookRuntimeTemplatesRequest, + ListNotebookRuntimeTemplatesResponse, + ListNotebookRuntimeTemplatesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable< + ListNotebookRuntimeTemplatesRequest, ListNotebookRuntimeTemplatesResponse> + callable, + ListNotebookRuntimeTemplatesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListNotebookRuntimeTemplatesRequest, + ListNotebookRuntimeTemplatesResponse, + NotebookRuntimeTemplate> + pageContext = + PageContext.create( + callable, + LIST_NOTEBOOK_RUNTIME_TEMPLATES_PAGE_STR_DESC, + request, + context); + return ListNotebookRuntimeTemplatesPagedResponse.createAsync( + pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListNotebookRuntimesRequest, + ListNotebookRuntimesResponse, + ListNotebookRuntimesPagedResponse> + LIST_NOTEBOOK_RUNTIMES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListNotebookRuntimesRequest, + ListNotebookRuntimesResponse, + ListNotebookRuntimesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListNotebookRuntimesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListNotebookRuntimesRequest, ListNotebookRuntimesResponse, NotebookRuntime> + pageContext = + PageContext.create( + callable, LIST_NOTEBOOK_RUNTIMES_PAGE_STR_DESC, request, context); + return ListNotebookRuntimesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + LIST_LOCATIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListLocationsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_LOCATIONS_PAGE_STR_DESC, request, context); + return ListLocationsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to createNotebookRuntimeTemplate. */ + public UnaryCallSettings + createNotebookRuntimeTemplateSettings() { + return createNotebookRuntimeTemplateSettings; + } + + /** Returns the object with the settings used for calls to createNotebookRuntimeTemplate. */ + public OperationCallSettings< + CreateNotebookRuntimeTemplateRequest, + NotebookRuntimeTemplate, + CreateNotebookRuntimeTemplateOperationMetadata> + createNotebookRuntimeTemplateOperationSettings() { + return createNotebookRuntimeTemplateOperationSettings; + } + + /** Returns the object with the settings used for calls to getNotebookRuntimeTemplate. */ + public UnaryCallSettings + getNotebookRuntimeTemplateSettings() { + return getNotebookRuntimeTemplateSettings; + } + + /** Returns the object with the settings used for calls to listNotebookRuntimeTemplates. */ + public PagedCallSettings< + ListNotebookRuntimeTemplatesRequest, + ListNotebookRuntimeTemplatesResponse, + ListNotebookRuntimeTemplatesPagedResponse> + listNotebookRuntimeTemplatesSettings() { + return listNotebookRuntimeTemplatesSettings; + } + + /** Returns the object with the settings used for calls to deleteNotebookRuntimeTemplate. */ + public UnaryCallSettings + deleteNotebookRuntimeTemplateSettings() { + return deleteNotebookRuntimeTemplateSettings; + } + + /** Returns the object with the settings used for calls to deleteNotebookRuntimeTemplate. */ + public OperationCallSettings + deleteNotebookRuntimeTemplateOperationSettings() { + return deleteNotebookRuntimeTemplateOperationSettings; + } + + /** Returns the object with the settings used for calls to assignNotebookRuntime. */ + public UnaryCallSettings + assignNotebookRuntimeSettings() { + return assignNotebookRuntimeSettings; + } + + /** Returns the object with the settings used for calls to assignNotebookRuntime. */ + public OperationCallSettings< + AssignNotebookRuntimeRequest, NotebookRuntime, AssignNotebookRuntimeOperationMetadata> + assignNotebookRuntimeOperationSettings() { + return assignNotebookRuntimeOperationSettings; + } + + /** Returns the object with the settings used for calls to getNotebookRuntime. */ + public UnaryCallSettings + getNotebookRuntimeSettings() { + return getNotebookRuntimeSettings; + } + + /** Returns the object with the settings used for calls to listNotebookRuntimes. */ + public PagedCallSettings< + ListNotebookRuntimesRequest, + ListNotebookRuntimesResponse, + ListNotebookRuntimesPagedResponse> + listNotebookRuntimesSettings() { + return listNotebookRuntimesSettings; + } + + /** Returns the object with the settings used for calls to deleteNotebookRuntime. */ + public UnaryCallSettings + deleteNotebookRuntimeSettings() { + return deleteNotebookRuntimeSettings; + } + + /** Returns the object with the settings used for calls to deleteNotebookRuntime. */ + public OperationCallSettings + deleteNotebookRuntimeOperationSettings() { + return deleteNotebookRuntimeOperationSettings; + } + + /** Returns the object with the settings used for calls to upgradeNotebookRuntime. */ + public UnaryCallSettings + upgradeNotebookRuntimeSettings() { + return upgradeNotebookRuntimeSettings; + } + + /** Returns the object with the settings used for calls to upgradeNotebookRuntime. */ + public OperationCallSettings< + UpgradeNotebookRuntimeRequest, + UpgradeNotebookRuntimeResponse, + UpgradeNotebookRuntimeOperationMetadata> + upgradeNotebookRuntimeOperationSettings() { + return upgradeNotebookRuntimeOperationSettings; + } + + /** Returns the object with the settings used for calls to startNotebookRuntime. */ + public UnaryCallSettings startNotebookRuntimeSettings() { + return startNotebookRuntimeSettings; + } + + /** Returns the object with the settings used for calls to startNotebookRuntime. */ + public OperationCallSettings< + StartNotebookRuntimeRequest, + StartNotebookRuntimeResponse, + StartNotebookRuntimeOperationMetadata> + startNotebookRuntimeOperationSettings() { + return startNotebookRuntimeOperationSettings; + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return getLocationSettings; + } + + /** Returns the object with the settings used for calls to setIamPolicy. */ + public UnaryCallSettings setIamPolicySettings() { + return setIamPolicySettings; + } + + /** Returns the object with the settings used for calls to getIamPolicy. */ + public UnaryCallSettings getIamPolicySettings() { + return getIamPolicySettings; + } + + /** Returns the object with the settings used for calls to testIamPermissions. */ + public UnaryCallSettings + testIamPermissionsSettings() { + return testIamPermissionsSettings; + } + + public NotebookServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcNotebookServiceStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns the endpoint set by the user or the the service's default endpoint. */ + @Override + public String getEndpoint() { + if (super.getEndpoint() != null) { + return super.getEndpoint(); + } + return getDefaultEndpoint(); + } + + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "aiplatform"; + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "aiplatform.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "aiplatform.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(NotebookServiceStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected NotebookServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + createNotebookRuntimeTemplateSettings = + settingsBuilder.createNotebookRuntimeTemplateSettings().build(); + createNotebookRuntimeTemplateOperationSettings = + settingsBuilder.createNotebookRuntimeTemplateOperationSettings().build(); + getNotebookRuntimeTemplateSettings = + settingsBuilder.getNotebookRuntimeTemplateSettings().build(); + listNotebookRuntimeTemplatesSettings = + settingsBuilder.listNotebookRuntimeTemplatesSettings().build(); + deleteNotebookRuntimeTemplateSettings = + settingsBuilder.deleteNotebookRuntimeTemplateSettings().build(); + deleteNotebookRuntimeTemplateOperationSettings = + settingsBuilder.deleteNotebookRuntimeTemplateOperationSettings().build(); + assignNotebookRuntimeSettings = settingsBuilder.assignNotebookRuntimeSettings().build(); + assignNotebookRuntimeOperationSettings = + settingsBuilder.assignNotebookRuntimeOperationSettings().build(); + getNotebookRuntimeSettings = settingsBuilder.getNotebookRuntimeSettings().build(); + listNotebookRuntimesSettings = settingsBuilder.listNotebookRuntimesSettings().build(); + deleteNotebookRuntimeSettings = settingsBuilder.deleteNotebookRuntimeSettings().build(); + deleteNotebookRuntimeOperationSettings = + settingsBuilder.deleteNotebookRuntimeOperationSettings().build(); + upgradeNotebookRuntimeSettings = settingsBuilder.upgradeNotebookRuntimeSettings().build(); + upgradeNotebookRuntimeOperationSettings = + settingsBuilder.upgradeNotebookRuntimeOperationSettings().build(); + startNotebookRuntimeSettings = settingsBuilder.startNotebookRuntimeSettings().build(); + startNotebookRuntimeOperationSettings = + settingsBuilder.startNotebookRuntimeOperationSettings().build(); + listLocationsSettings = settingsBuilder.listLocationsSettings().build(); + getLocationSettings = settingsBuilder.getLocationSettings().build(); + setIamPolicySettings = settingsBuilder.setIamPolicySettings().build(); + getIamPolicySettings = settingsBuilder.getIamPolicySettings().build(); + testIamPermissionsSettings = settingsBuilder.testIamPermissionsSettings().build(); + } + + /** Builder for NotebookServiceStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder + createNotebookRuntimeTemplateSettings; + private final OperationCallSettings.Builder< + CreateNotebookRuntimeTemplateRequest, + NotebookRuntimeTemplate, + CreateNotebookRuntimeTemplateOperationMetadata> + createNotebookRuntimeTemplateOperationSettings; + private final UnaryCallSettings.Builder< + GetNotebookRuntimeTemplateRequest, NotebookRuntimeTemplate> + getNotebookRuntimeTemplateSettings; + private final PagedCallSettings.Builder< + ListNotebookRuntimeTemplatesRequest, + ListNotebookRuntimeTemplatesResponse, + ListNotebookRuntimeTemplatesPagedResponse> + listNotebookRuntimeTemplatesSettings; + private final UnaryCallSettings.Builder + deleteNotebookRuntimeTemplateSettings; + private final OperationCallSettings.Builder< + DeleteNotebookRuntimeTemplateRequest, Empty, DeleteOperationMetadata> + deleteNotebookRuntimeTemplateOperationSettings; + private final UnaryCallSettings.Builder + assignNotebookRuntimeSettings; + private final OperationCallSettings.Builder< + AssignNotebookRuntimeRequest, NotebookRuntime, AssignNotebookRuntimeOperationMetadata> + assignNotebookRuntimeOperationSettings; + private final UnaryCallSettings.Builder + getNotebookRuntimeSettings; + private final PagedCallSettings.Builder< + ListNotebookRuntimesRequest, + ListNotebookRuntimesResponse, + ListNotebookRuntimesPagedResponse> + listNotebookRuntimesSettings; + private final UnaryCallSettings.Builder + deleteNotebookRuntimeSettings; + private final OperationCallSettings.Builder< + DeleteNotebookRuntimeRequest, Empty, DeleteOperationMetadata> + deleteNotebookRuntimeOperationSettings; + private final UnaryCallSettings.Builder + upgradeNotebookRuntimeSettings; + private final OperationCallSettings.Builder< + UpgradeNotebookRuntimeRequest, + UpgradeNotebookRuntimeResponse, + UpgradeNotebookRuntimeOperationMetadata> + upgradeNotebookRuntimeOperationSettings; + private final UnaryCallSettings.Builder + startNotebookRuntimeSettings; + private final OperationCallSettings.Builder< + StartNotebookRuntimeRequest, + StartNotebookRuntimeResponse, + StartNotebookRuntimeOperationMetadata> + startNotebookRuntimeOperationSettings; + private final PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings.Builder getLocationSettings; + private final UnaryCallSettings.Builder setIamPolicySettings; + private final UnaryCallSettings.Builder getIamPolicySettings; + private final UnaryCallSettings.Builder + testIamPermissionsSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); + definitions.put("no_retry_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + createNotebookRuntimeTemplateSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createNotebookRuntimeTemplateOperationSettings = OperationCallSettings.newBuilder(); + getNotebookRuntimeTemplateSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listNotebookRuntimeTemplatesSettings = + PagedCallSettings.newBuilder(LIST_NOTEBOOK_RUNTIME_TEMPLATES_PAGE_STR_FACT); + deleteNotebookRuntimeTemplateSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteNotebookRuntimeTemplateOperationSettings = OperationCallSettings.newBuilder(); + assignNotebookRuntimeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + assignNotebookRuntimeOperationSettings = OperationCallSettings.newBuilder(); + getNotebookRuntimeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listNotebookRuntimesSettings = + PagedCallSettings.newBuilder(LIST_NOTEBOOK_RUNTIMES_PAGE_STR_FACT); + deleteNotebookRuntimeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteNotebookRuntimeOperationSettings = OperationCallSettings.newBuilder(); + upgradeNotebookRuntimeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + upgradeNotebookRuntimeOperationSettings = OperationCallSettings.newBuilder(); + startNotebookRuntimeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + startNotebookRuntimeOperationSettings = OperationCallSettings.newBuilder(); + listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); + getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + setIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + testIamPermissionsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createNotebookRuntimeTemplateSettings, + getNotebookRuntimeTemplateSettings, + listNotebookRuntimeTemplatesSettings, + deleteNotebookRuntimeTemplateSettings, + assignNotebookRuntimeSettings, + getNotebookRuntimeSettings, + listNotebookRuntimesSettings, + deleteNotebookRuntimeSettings, + upgradeNotebookRuntimeSettings, + startNotebookRuntimeSettings, + listLocationsSettings, + getLocationSettings, + setIamPolicySettings, + getIamPolicySettings, + testIamPermissionsSettings); + initDefaults(this); + } + + protected Builder(NotebookServiceStubSettings settings) { + super(settings); + + createNotebookRuntimeTemplateSettings = + settings.createNotebookRuntimeTemplateSettings.toBuilder(); + createNotebookRuntimeTemplateOperationSettings = + settings.createNotebookRuntimeTemplateOperationSettings.toBuilder(); + getNotebookRuntimeTemplateSettings = settings.getNotebookRuntimeTemplateSettings.toBuilder(); + listNotebookRuntimeTemplatesSettings = + settings.listNotebookRuntimeTemplatesSettings.toBuilder(); + deleteNotebookRuntimeTemplateSettings = + settings.deleteNotebookRuntimeTemplateSettings.toBuilder(); + deleteNotebookRuntimeTemplateOperationSettings = + settings.deleteNotebookRuntimeTemplateOperationSettings.toBuilder(); + assignNotebookRuntimeSettings = settings.assignNotebookRuntimeSettings.toBuilder(); + assignNotebookRuntimeOperationSettings = + settings.assignNotebookRuntimeOperationSettings.toBuilder(); + getNotebookRuntimeSettings = settings.getNotebookRuntimeSettings.toBuilder(); + listNotebookRuntimesSettings = settings.listNotebookRuntimesSettings.toBuilder(); + deleteNotebookRuntimeSettings = settings.deleteNotebookRuntimeSettings.toBuilder(); + deleteNotebookRuntimeOperationSettings = + settings.deleteNotebookRuntimeOperationSettings.toBuilder(); + upgradeNotebookRuntimeSettings = settings.upgradeNotebookRuntimeSettings.toBuilder(); + upgradeNotebookRuntimeOperationSettings = + settings.upgradeNotebookRuntimeOperationSettings.toBuilder(); + startNotebookRuntimeSettings = settings.startNotebookRuntimeSettings.toBuilder(); + startNotebookRuntimeOperationSettings = + settings.startNotebookRuntimeOperationSettings.toBuilder(); + listLocationsSettings = settings.listLocationsSettings.toBuilder(); + getLocationSettings = settings.getLocationSettings.toBuilder(); + setIamPolicySettings = settings.setIamPolicySettings.toBuilder(); + getIamPolicySettings = settings.getIamPolicySettings.toBuilder(); + testIamPermissionsSettings = settings.testIamPermissionsSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createNotebookRuntimeTemplateSettings, + getNotebookRuntimeTemplateSettings, + listNotebookRuntimeTemplatesSettings, + deleteNotebookRuntimeTemplateSettings, + assignNotebookRuntimeSettings, + getNotebookRuntimeSettings, + listNotebookRuntimesSettings, + deleteNotebookRuntimeSettings, + upgradeNotebookRuntimeSettings, + startNotebookRuntimeSettings, + listLocationsSettings, + getLocationSettings, + setIamPolicySettings, + getIamPolicySettings, + testIamPermissionsSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .createNotebookRuntimeTemplateSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getNotebookRuntimeTemplateSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listNotebookRuntimeTemplatesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .deleteNotebookRuntimeTemplateSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .assignNotebookRuntimeSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getNotebookRuntimeSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listNotebookRuntimesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .deleteNotebookRuntimeSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .upgradeNotebookRuntimeSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .startNotebookRuntimeSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listLocationsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getLocationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .setIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .testIamPermissionsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .createNotebookRuntimeTemplateOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + . + newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(NotebookRuntimeTemplate.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + CreateNotebookRuntimeTemplateOperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteNotebookRuntimeTemplateOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + . + newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(DeleteOperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .assignNotebookRuntimeOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(NotebookRuntime.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + AssignNotebookRuntimeOperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteNotebookRuntimeOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(DeleteOperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .upgradeNotebookRuntimeOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create( + UpgradeNotebookRuntimeResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + UpgradeNotebookRuntimeOperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .startNotebookRuntimeOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create( + StartNotebookRuntimeResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + StartNotebookRuntimeOperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to createNotebookRuntimeTemplate. */ + public UnaryCallSettings.Builder + createNotebookRuntimeTemplateSettings() { + return createNotebookRuntimeTemplateSettings; + } + + /** Returns the builder for the settings used for calls to createNotebookRuntimeTemplate. */ + public OperationCallSettings.Builder< + CreateNotebookRuntimeTemplateRequest, + NotebookRuntimeTemplate, + CreateNotebookRuntimeTemplateOperationMetadata> + createNotebookRuntimeTemplateOperationSettings() { + return createNotebookRuntimeTemplateOperationSettings; + } + + /** Returns the builder for the settings used for calls to getNotebookRuntimeTemplate. */ + public UnaryCallSettings.Builder + getNotebookRuntimeTemplateSettings() { + return getNotebookRuntimeTemplateSettings; + } + + /** Returns the builder for the settings used for calls to listNotebookRuntimeTemplates. */ + public PagedCallSettings.Builder< + ListNotebookRuntimeTemplatesRequest, + ListNotebookRuntimeTemplatesResponse, + ListNotebookRuntimeTemplatesPagedResponse> + listNotebookRuntimeTemplatesSettings() { + return listNotebookRuntimeTemplatesSettings; + } + + /** Returns the builder for the settings used for calls to deleteNotebookRuntimeTemplate. */ + public UnaryCallSettings.Builder + deleteNotebookRuntimeTemplateSettings() { + return deleteNotebookRuntimeTemplateSettings; + } + + /** Returns the builder for the settings used for calls to deleteNotebookRuntimeTemplate. */ + public OperationCallSettings.Builder< + DeleteNotebookRuntimeTemplateRequest, Empty, DeleteOperationMetadata> + deleteNotebookRuntimeTemplateOperationSettings() { + return deleteNotebookRuntimeTemplateOperationSettings; + } + + /** Returns the builder for the settings used for calls to assignNotebookRuntime. */ + public UnaryCallSettings.Builder + assignNotebookRuntimeSettings() { + return assignNotebookRuntimeSettings; + } + + /** Returns the builder for the settings used for calls to assignNotebookRuntime. */ + public OperationCallSettings.Builder< + AssignNotebookRuntimeRequest, NotebookRuntime, AssignNotebookRuntimeOperationMetadata> + assignNotebookRuntimeOperationSettings() { + return assignNotebookRuntimeOperationSettings; + } + + /** Returns the builder for the settings used for calls to getNotebookRuntime. */ + public UnaryCallSettings.Builder + getNotebookRuntimeSettings() { + return getNotebookRuntimeSettings; + } + + /** Returns the builder for the settings used for calls to listNotebookRuntimes. */ + public PagedCallSettings.Builder< + ListNotebookRuntimesRequest, + ListNotebookRuntimesResponse, + ListNotebookRuntimesPagedResponse> + listNotebookRuntimesSettings() { + return listNotebookRuntimesSettings; + } + + /** Returns the builder for the settings used for calls to deleteNotebookRuntime. */ + public UnaryCallSettings.Builder + deleteNotebookRuntimeSettings() { + return deleteNotebookRuntimeSettings; + } + + /** Returns the builder for the settings used for calls to deleteNotebookRuntime. */ + public OperationCallSettings.Builder< + DeleteNotebookRuntimeRequest, Empty, DeleteOperationMetadata> + deleteNotebookRuntimeOperationSettings() { + return deleteNotebookRuntimeOperationSettings; + } + + /** Returns the builder for the settings used for calls to upgradeNotebookRuntime. */ + public UnaryCallSettings.Builder + upgradeNotebookRuntimeSettings() { + return upgradeNotebookRuntimeSettings; + } + + /** Returns the builder for the settings used for calls to upgradeNotebookRuntime. */ + public OperationCallSettings.Builder< + UpgradeNotebookRuntimeRequest, + UpgradeNotebookRuntimeResponse, + UpgradeNotebookRuntimeOperationMetadata> + upgradeNotebookRuntimeOperationSettings() { + return upgradeNotebookRuntimeOperationSettings; + } + + /** Returns the builder for the settings used for calls to startNotebookRuntime. */ + public UnaryCallSettings.Builder + startNotebookRuntimeSettings() { + return startNotebookRuntimeSettings; + } + + /** Returns the builder for the settings used for calls to startNotebookRuntime. */ + public OperationCallSettings.Builder< + StartNotebookRuntimeRequest, + StartNotebookRuntimeResponse, + StartNotebookRuntimeOperationMetadata> + startNotebookRuntimeOperationSettings() { + return startNotebookRuntimeOperationSettings; + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getLocationSettings; + } + + /** Returns the builder for the settings used for calls to setIamPolicy. */ + public UnaryCallSettings.Builder setIamPolicySettings() { + return setIamPolicySettings; + } + + /** Returns the builder for the settings used for calls to getIamPolicy. */ + public UnaryCallSettings.Builder getIamPolicySettings() { + return getIamPolicySettings; + } + + /** Returns the builder for the settings used for calls to testIamPermissions. */ + public UnaryCallSettings.Builder + testIamPermissionsSettings() { + return testIamPermissionsSettings; + } + + /** Returns the endpoint set by the user or the the service's default endpoint. */ + @Override + public String getEndpoint() { + if (super.getEndpoint() != null) { + return super.getEndpoint(); + } + return getDefaultEndpoint(); + } + + @Override + public NotebookServiceStubSettings build() throws IOException { + return new NotebookServiceStubSettings(this); + } + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/PersistentResourceServiceStub.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/PersistentResourceServiceStub.java new file mode 100644 index 000000000000..8374bcb01e67 --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/PersistentResourceServiceStub.java @@ -0,0 +1,161 @@ +/* + * Copyright 2024 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.aiplatform.v1.stub; + +import static com.google.cloud.aiplatform.v1.PersistentResourceServiceClient.ListLocationsPagedResponse; +import static com.google.cloud.aiplatform.v1.PersistentResourceServiceClient.ListPersistentResourcesPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.aiplatform.v1.CreatePersistentResourceOperationMetadata; +import com.google.cloud.aiplatform.v1.CreatePersistentResourceRequest; +import com.google.cloud.aiplatform.v1.DeleteOperationMetadata; +import com.google.cloud.aiplatform.v1.DeletePersistentResourceRequest; +import com.google.cloud.aiplatform.v1.GetPersistentResourceRequest; +import com.google.cloud.aiplatform.v1.ListPersistentResourcesRequest; +import com.google.cloud.aiplatform.v1.ListPersistentResourcesResponse; +import com.google.cloud.aiplatform.v1.PersistentResource; +import com.google.cloud.aiplatform.v1.RebootPersistentResourceOperationMetadata; +import com.google.cloud.aiplatform.v1.RebootPersistentResourceRequest; +import com.google.cloud.aiplatform.v1.UpdatePersistentResourceOperationMetadata; +import com.google.cloud.aiplatform.v1.UpdatePersistentResourceRequest; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the PersistentResourceService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class PersistentResourceServiceStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + throw new UnsupportedOperationException("Not implemented: getOperationsStub()"); + } + + public OperationCallable< + CreatePersistentResourceRequest, + PersistentResource, + CreatePersistentResourceOperationMetadata> + createPersistentResourceOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createPersistentResourceOperationCallable()"); + } + + public UnaryCallable + createPersistentResourceCallable() { + throw new UnsupportedOperationException("Not implemented: createPersistentResourceCallable()"); + } + + public UnaryCallable + getPersistentResourceCallable() { + throw new UnsupportedOperationException("Not implemented: getPersistentResourceCallable()"); + } + + public UnaryCallable + listPersistentResourcesPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listPersistentResourcesPagedCallable()"); + } + + public UnaryCallable + listPersistentResourcesCallable() { + throw new UnsupportedOperationException("Not implemented: listPersistentResourcesCallable()"); + } + + public OperationCallable + deletePersistentResourceOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: deletePersistentResourceOperationCallable()"); + } + + public UnaryCallable + deletePersistentResourceCallable() { + throw new UnsupportedOperationException("Not implemented: deletePersistentResourceCallable()"); + } + + public OperationCallable< + UpdatePersistentResourceRequest, + PersistentResource, + UpdatePersistentResourceOperationMetadata> + updatePersistentResourceOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: updatePersistentResourceOperationCallable()"); + } + + public UnaryCallable + updatePersistentResourceCallable() { + throw new UnsupportedOperationException("Not implemented: updatePersistentResourceCallable()"); + } + + public OperationCallable< + RebootPersistentResourceRequest, + PersistentResource, + RebootPersistentResourceOperationMetadata> + rebootPersistentResourceOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: rebootPersistentResourceOperationCallable()"); + } + + public UnaryCallable + rebootPersistentResourceCallable() { + throw new UnsupportedOperationException("Not implemented: rebootPersistentResourceCallable()"); + } + + public UnaryCallable + listLocationsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()"); + } + + public UnaryCallable listLocationsCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsCallable()"); + } + + public UnaryCallable getLocationCallable() { + throw new UnsupportedOperationException("Not implemented: getLocationCallable()"); + } + + public UnaryCallable setIamPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: setIamPolicyCallable()"); + } + + public UnaryCallable getIamPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: getIamPolicyCallable()"); + } + + public UnaryCallable + testIamPermissionsCallable() { + throw new UnsupportedOperationException("Not implemented: testIamPermissionsCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/PersistentResourceServiceStubSettings.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/PersistentResourceServiceStubSettings.java new file mode 100644 index 000000000000..f5fd1356d09c --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/PersistentResourceServiceStubSettings.java @@ -0,0 +1,943 @@ +/* + * Copyright 2024 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.aiplatform.v1.stub; + +import static com.google.cloud.aiplatform.v1.PersistentResourceServiceClient.ListLocationsPagedResponse; +import static com.google.cloud.aiplatform.v1.PersistentResourceServiceClient.ListPersistentResourcesPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.aiplatform.v1.CreatePersistentResourceOperationMetadata; +import com.google.cloud.aiplatform.v1.CreatePersistentResourceRequest; +import com.google.cloud.aiplatform.v1.DeleteOperationMetadata; +import com.google.cloud.aiplatform.v1.DeletePersistentResourceRequest; +import com.google.cloud.aiplatform.v1.GetPersistentResourceRequest; +import com.google.cloud.aiplatform.v1.ListPersistentResourcesRequest; +import com.google.cloud.aiplatform.v1.ListPersistentResourcesResponse; +import com.google.cloud.aiplatform.v1.PersistentResource; +import com.google.cloud.aiplatform.v1.RebootPersistentResourceOperationMetadata; +import com.google.cloud.aiplatform.v1.RebootPersistentResourceRequest; +import com.google.cloud.aiplatform.v1.UpdatePersistentResourceOperationMetadata; +import com.google.cloud.aiplatform.v1.UpdatePersistentResourceRequest; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link PersistentResourceServiceStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (aiplatform.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of getPersistentResource to 30 seconds: + * + *

{@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
+ * PersistentResourceServiceStubSettings.Builder persistentResourceServiceSettingsBuilder =
+ *     PersistentResourceServiceStubSettings.newBuilder();
+ * persistentResourceServiceSettingsBuilder
+ *     .getPersistentResourceSettings()
+ *     .setRetrySettings(
+ *         persistentResourceServiceSettingsBuilder
+ *             .getPersistentResourceSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * PersistentResourceServiceStubSettings persistentResourceServiceSettings =
+ *     persistentResourceServiceSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class PersistentResourceServiceStubSettings + extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final UnaryCallSettings + createPersistentResourceSettings; + private final OperationCallSettings< + CreatePersistentResourceRequest, + PersistentResource, + CreatePersistentResourceOperationMetadata> + createPersistentResourceOperationSettings; + private final UnaryCallSettings + getPersistentResourceSettings; + private final PagedCallSettings< + ListPersistentResourcesRequest, + ListPersistentResourcesResponse, + ListPersistentResourcesPagedResponse> + listPersistentResourcesSettings; + private final UnaryCallSettings + deletePersistentResourceSettings; + private final OperationCallSettings< + DeletePersistentResourceRequest, Empty, DeleteOperationMetadata> + deletePersistentResourceOperationSettings; + private final UnaryCallSettings + updatePersistentResourceSettings; + private final OperationCallSettings< + UpdatePersistentResourceRequest, + PersistentResource, + UpdatePersistentResourceOperationMetadata> + updatePersistentResourceOperationSettings; + private final UnaryCallSettings + rebootPersistentResourceSettings; + private final OperationCallSettings< + RebootPersistentResourceRequest, + PersistentResource, + RebootPersistentResourceOperationMetadata> + rebootPersistentResourceOperationSettings; + private final PagedCallSettings< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings getLocationSettings; + private final UnaryCallSettings setIamPolicySettings; + private final UnaryCallSettings getIamPolicySettings; + private final UnaryCallSettings + testIamPermissionsSettings; + + private static final PagedListDescriptor< + ListPersistentResourcesRequest, ListPersistentResourcesResponse, PersistentResource> + LIST_PERSISTENT_RESOURCES_PAGE_STR_DESC = + new PagedListDescriptor< + ListPersistentResourcesRequest, + ListPersistentResourcesResponse, + PersistentResource>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListPersistentResourcesRequest injectToken( + ListPersistentResourcesRequest payload, String token) { + return ListPersistentResourcesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListPersistentResourcesRequest injectPageSize( + ListPersistentResourcesRequest payload, int pageSize) { + return ListPersistentResourcesRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(ListPersistentResourcesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListPersistentResourcesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListPersistentResourcesResponse payload) { + return payload.getPersistentResourcesList() == null + ? ImmutableList.of() + : payload.getPersistentResourcesList(); + } + }; + + private static final PagedListDescriptor + LIST_LOCATIONS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListLocationsRequest injectToken(ListLocationsRequest payload, String token) { + return ListLocationsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListLocationsRequest injectPageSize(ListLocationsRequest payload, int pageSize) { + return ListLocationsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListLocationsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListLocationsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListLocationsResponse payload) { + return payload.getLocationsList() == null + ? ImmutableList.of() + : payload.getLocationsList(); + } + }; + + private static final PagedListResponseFactory< + ListPersistentResourcesRequest, + ListPersistentResourcesResponse, + ListPersistentResourcesPagedResponse> + LIST_PERSISTENT_RESOURCES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListPersistentResourcesRequest, + ListPersistentResourcesResponse, + ListPersistentResourcesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable + callable, + ListPersistentResourcesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListPersistentResourcesRequest, + ListPersistentResourcesResponse, + PersistentResource> + pageContext = + PageContext.create( + callable, LIST_PERSISTENT_RESOURCES_PAGE_STR_DESC, request, context); + return ListPersistentResourcesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + LIST_LOCATIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListLocationsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_LOCATIONS_PAGE_STR_DESC, request, context); + return ListLocationsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to createPersistentResource. */ + public UnaryCallSettings + createPersistentResourceSettings() { + return createPersistentResourceSettings; + } + + /** Returns the object with the settings used for calls to createPersistentResource. */ + public OperationCallSettings< + CreatePersistentResourceRequest, + PersistentResource, + CreatePersistentResourceOperationMetadata> + createPersistentResourceOperationSettings() { + return createPersistentResourceOperationSettings; + } + + /** Returns the object with the settings used for calls to getPersistentResource. */ + public UnaryCallSettings + getPersistentResourceSettings() { + return getPersistentResourceSettings; + } + + /** Returns the object with the settings used for calls to listPersistentResources. */ + public PagedCallSettings< + ListPersistentResourcesRequest, + ListPersistentResourcesResponse, + ListPersistentResourcesPagedResponse> + listPersistentResourcesSettings() { + return listPersistentResourcesSettings; + } + + /** Returns the object with the settings used for calls to deletePersistentResource. */ + public UnaryCallSettings + deletePersistentResourceSettings() { + return deletePersistentResourceSettings; + } + + /** Returns the object with the settings used for calls to deletePersistentResource. */ + public OperationCallSettings + deletePersistentResourceOperationSettings() { + return deletePersistentResourceOperationSettings; + } + + /** Returns the object with the settings used for calls to updatePersistentResource. */ + public UnaryCallSettings + updatePersistentResourceSettings() { + return updatePersistentResourceSettings; + } + + /** Returns the object with the settings used for calls to updatePersistentResource. */ + public OperationCallSettings< + UpdatePersistentResourceRequest, + PersistentResource, + UpdatePersistentResourceOperationMetadata> + updatePersistentResourceOperationSettings() { + return updatePersistentResourceOperationSettings; + } + + /** Returns the object with the settings used for calls to rebootPersistentResource. */ + public UnaryCallSettings + rebootPersistentResourceSettings() { + return rebootPersistentResourceSettings; + } + + /** Returns the object with the settings used for calls to rebootPersistentResource. */ + public OperationCallSettings< + RebootPersistentResourceRequest, + PersistentResource, + RebootPersistentResourceOperationMetadata> + rebootPersistentResourceOperationSettings() { + return rebootPersistentResourceOperationSettings; + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return getLocationSettings; + } + + /** Returns the object with the settings used for calls to setIamPolicy. */ + public UnaryCallSettings setIamPolicySettings() { + return setIamPolicySettings; + } + + /** Returns the object with the settings used for calls to getIamPolicy. */ + public UnaryCallSettings getIamPolicySettings() { + return getIamPolicySettings; + } + + /** Returns the object with the settings used for calls to testIamPermissions. */ + public UnaryCallSettings + testIamPermissionsSettings() { + return testIamPermissionsSettings; + } + + public PersistentResourceServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcPersistentResourceServiceStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns the endpoint set by the user or the the service's default endpoint. */ + @Override + public String getEndpoint() { + if (super.getEndpoint() != null) { + return super.getEndpoint(); + } + return getDefaultEndpoint(); + } + + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "aiplatform"; + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "aiplatform.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "aiplatform.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(PersistentResourceServiceStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected PersistentResourceServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + createPersistentResourceSettings = settingsBuilder.createPersistentResourceSettings().build(); + createPersistentResourceOperationSettings = + settingsBuilder.createPersistentResourceOperationSettings().build(); + getPersistentResourceSettings = settingsBuilder.getPersistentResourceSettings().build(); + listPersistentResourcesSettings = settingsBuilder.listPersistentResourcesSettings().build(); + deletePersistentResourceSettings = settingsBuilder.deletePersistentResourceSettings().build(); + deletePersistentResourceOperationSettings = + settingsBuilder.deletePersistentResourceOperationSettings().build(); + updatePersistentResourceSettings = settingsBuilder.updatePersistentResourceSettings().build(); + updatePersistentResourceOperationSettings = + settingsBuilder.updatePersistentResourceOperationSettings().build(); + rebootPersistentResourceSettings = settingsBuilder.rebootPersistentResourceSettings().build(); + rebootPersistentResourceOperationSettings = + settingsBuilder.rebootPersistentResourceOperationSettings().build(); + listLocationsSettings = settingsBuilder.listLocationsSettings().build(); + getLocationSettings = settingsBuilder.getLocationSettings().build(); + setIamPolicySettings = settingsBuilder.setIamPolicySettings().build(); + getIamPolicySettings = settingsBuilder.getIamPolicySettings().build(); + testIamPermissionsSettings = settingsBuilder.testIamPermissionsSettings().build(); + } + + /** Builder for PersistentResourceServiceStubSettings. */ + public static class Builder + extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder + createPersistentResourceSettings; + private final OperationCallSettings.Builder< + CreatePersistentResourceRequest, + PersistentResource, + CreatePersistentResourceOperationMetadata> + createPersistentResourceOperationSettings; + private final UnaryCallSettings.Builder + getPersistentResourceSettings; + private final PagedCallSettings.Builder< + ListPersistentResourcesRequest, + ListPersistentResourcesResponse, + ListPersistentResourcesPagedResponse> + listPersistentResourcesSettings; + private final UnaryCallSettings.Builder + deletePersistentResourceSettings; + private final OperationCallSettings.Builder< + DeletePersistentResourceRequest, Empty, DeleteOperationMetadata> + deletePersistentResourceOperationSettings; + private final UnaryCallSettings.Builder + updatePersistentResourceSettings; + private final OperationCallSettings.Builder< + UpdatePersistentResourceRequest, + PersistentResource, + UpdatePersistentResourceOperationMetadata> + updatePersistentResourceOperationSettings; + private final UnaryCallSettings.Builder + rebootPersistentResourceSettings; + private final OperationCallSettings.Builder< + RebootPersistentResourceRequest, + PersistentResource, + RebootPersistentResourceOperationMetadata> + rebootPersistentResourceOperationSettings; + private final PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings.Builder getLocationSettings; + private final UnaryCallSettings.Builder setIamPolicySettings; + private final UnaryCallSettings.Builder getIamPolicySettings; + private final UnaryCallSettings.Builder + testIamPermissionsSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); + definitions.put("no_retry_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + createPersistentResourceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createPersistentResourceOperationSettings = OperationCallSettings.newBuilder(); + getPersistentResourceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listPersistentResourcesSettings = + PagedCallSettings.newBuilder(LIST_PERSISTENT_RESOURCES_PAGE_STR_FACT); + deletePersistentResourceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deletePersistentResourceOperationSettings = OperationCallSettings.newBuilder(); + updatePersistentResourceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updatePersistentResourceOperationSettings = OperationCallSettings.newBuilder(); + rebootPersistentResourceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + rebootPersistentResourceOperationSettings = OperationCallSettings.newBuilder(); + listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); + getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + setIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + testIamPermissionsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createPersistentResourceSettings, + getPersistentResourceSettings, + listPersistentResourcesSettings, + deletePersistentResourceSettings, + updatePersistentResourceSettings, + rebootPersistentResourceSettings, + listLocationsSettings, + getLocationSettings, + setIamPolicySettings, + getIamPolicySettings, + testIamPermissionsSettings); + initDefaults(this); + } + + protected Builder(PersistentResourceServiceStubSettings settings) { + super(settings); + + createPersistentResourceSettings = settings.createPersistentResourceSettings.toBuilder(); + createPersistentResourceOperationSettings = + settings.createPersistentResourceOperationSettings.toBuilder(); + getPersistentResourceSettings = settings.getPersistentResourceSettings.toBuilder(); + listPersistentResourcesSettings = settings.listPersistentResourcesSettings.toBuilder(); + deletePersistentResourceSettings = settings.deletePersistentResourceSettings.toBuilder(); + deletePersistentResourceOperationSettings = + settings.deletePersistentResourceOperationSettings.toBuilder(); + updatePersistentResourceSettings = settings.updatePersistentResourceSettings.toBuilder(); + updatePersistentResourceOperationSettings = + settings.updatePersistentResourceOperationSettings.toBuilder(); + rebootPersistentResourceSettings = settings.rebootPersistentResourceSettings.toBuilder(); + rebootPersistentResourceOperationSettings = + settings.rebootPersistentResourceOperationSettings.toBuilder(); + listLocationsSettings = settings.listLocationsSettings.toBuilder(); + getLocationSettings = settings.getLocationSettings.toBuilder(); + setIamPolicySettings = settings.setIamPolicySettings.toBuilder(); + getIamPolicySettings = settings.getIamPolicySettings.toBuilder(); + testIamPermissionsSettings = settings.testIamPermissionsSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createPersistentResourceSettings, + getPersistentResourceSettings, + listPersistentResourcesSettings, + deletePersistentResourceSettings, + updatePersistentResourceSettings, + rebootPersistentResourceSettings, + listLocationsSettings, + getLocationSettings, + setIamPolicySettings, + getIamPolicySettings, + testIamPermissionsSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .createPersistentResourceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getPersistentResourceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listPersistentResourcesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .deletePersistentResourceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .updatePersistentResourceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .rebootPersistentResourceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listLocationsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getLocationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .setIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .testIamPermissionsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .createPersistentResourceOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(PersistentResource.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + CreatePersistentResourceOperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .deletePersistentResourceOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(DeleteOperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .updatePersistentResourceOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(PersistentResource.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + UpdatePersistentResourceOperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .rebootPersistentResourceOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(PersistentResource.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + RebootPersistentResourceOperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to createPersistentResource. */ + public UnaryCallSettings.Builder + createPersistentResourceSettings() { + return createPersistentResourceSettings; + } + + /** Returns the builder for the settings used for calls to createPersistentResource. */ + public OperationCallSettings.Builder< + CreatePersistentResourceRequest, + PersistentResource, + CreatePersistentResourceOperationMetadata> + createPersistentResourceOperationSettings() { + return createPersistentResourceOperationSettings; + } + + /** Returns the builder for the settings used for calls to getPersistentResource. */ + public UnaryCallSettings.Builder + getPersistentResourceSettings() { + return getPersistentResourceSettings; + } + + /** Returns the builder for the settings used for calls to listPersistentResources. */ + public PagedCallSettings.Builder< + ListPersistentResourcesRequest, + ListPersistentResourcesResponse, + ListPersistentResourcesPagedResponse> + listPersistentResourcesSettings() { + return listPersistentResourcesSettings; + } + + /** Returns the builder for the settings used for calls to deletePersistentResource. */ + public UnaryCallSettings.Builder + deletePersistentResourceSettings() { + return deletePersistentResourceSettings; + } + + /** Returns the builder for the settings used for calls to deletePersistentResource. */ + public OperationCallSettings.Builder< + DeletePersistentResourceRequest, Empty, DeleteOperationMetadata> + deletePersistentResourceOperationSettings() { + return deletePersistentResourceOperationSettings; + } + + /** Returns the builder for the settings used for calls to updatePersistentResource. */ + public UnaryCallSettings.Builder + updatePersistentResourceSettings() { + return updatePersistentResourceSettings; + } + + /** Returns the builder for the settings used for calls to updatePersistentResource. */ + public OperationCallSettings.Builder< + UpdatePersistentResourceRequest, + PersistentResource, + UpdatePersistentResourceOperationMetadata> + updatePersistentResourceOperationSettings() { + return updatePersistentResourceOperationSettings; + } + + /** Returns the builder for the settings used for calls to rebootPersistentResource. */ + public UnaryCallSettings.Builder + rebootPersistentResourceSettings() { + return rebootPersistentResourceSettings; + } + + /** Returns the builder for the settings used for calls to rebootPersistentResource. */ + public OperationCallSettings.Builder< + RebootPersistentResourceRequest, + PersistentResource, + RebootPersistentResourceOperationMetadata> + rebootPersistentResourceOperationSettings() { + return rebootPersistentResourceOperationSettings; + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getLocationSettings; + } + + /** Returns the builder for the settings used for calls to setIamPolicy. */ + public UnaryCallSettings.Builder setIamPolicySettings() { + return setIamPolicySettings; + } + + /** Returns the builder for the settings used for calls to getIamPolicy. */ + public UnaryCallSettings.Builder getIamPolicySettings() { + return getIamPolicySettings; + } + + /** Returns the builder for the settings used for calls to testIamPermissions. */ + public UnaryCallSettings.Builder + testIamPermissionsSettings() { + return testIamPermissionsSettings; + } + + /** Returns the endpoint set by the user or the the service's default endpoint. */ + @Override + public String getEndpoint() { + if (super.getEndpoint() != null) { + return super.getEndpoint(); + } + return getDefaultEndpoint(); + } + + @Override + public PersistentResourceServiceStubSettings build() throws IOException { + return new PersistentResourceServiceStubSettings(this); + } + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/NotebookServiceClient.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/NotebookServiceClient.java new file mode 100644 index 000000000000..85abdb964e3c --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/NotebookServiceClient.java @@ -0,0 +1,2886 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.aiplatform.v1beta1.stub.NotebookServiceStub; +import com.google.cloud.aiplatform.v1beta1.stub.NotebookServiceStubSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.longrunning.OperationsClient; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: The interface for Vertex Notebook service (a.k.a. Colab on Workbench). + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

{@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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ *   NotebookRuntimeTemplateName name =
+ *       NotebookRuntimeTemplateName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]");
+ *   NotebookRuntimeTemplate response = notebookServiceClient.getNotebookRuntimeTemplate(name);
+ * }
+ * }
+ * + *

Note: close() needs to be called on the NotebookServiceClient object to clean up resources + * such as threads. In the example above, try-with-resources is used, which automatically calls + * close(). + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Methods
MethodDescriptionMethod Variants

CreateNotebookRuntimeTemplate

Creates a NotebookRuntimeTemplate.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createNotebookRuntimeTemplateAsync(CreateNotebookRuntimeTemplateRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • createNotebookRuntimeTemplateAsync(LocationName parent, NotebookRuntimeTemplate notebookRuntimeTemplate, String notebookRuntimeTemplateId) + *

  • createNotebookRuntimeTemplateAsync(String parent, NotebookRuntimeTemplate notebookRuntimeTemplate, String notebookRuntimeTemplateId) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createNotebookRuntimeTemplateOperationCallable() + *

  • createNotebookRuntimeTemplateCallable() + *

+ *

GetNotebookRuntimeTemplate

Gets a NotebookRuntimeTemplate.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getNotebookRuntimeTemplate(GetNotebookRuntimeTemplateRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getNotebookRuntimeTemplate(NotebookRuntimeTemplateName name) + *

  • getNotebookRuntimeTemplate(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getNotebookRuntimeTemplateCallable() + *

+ *

ListNotebookRuntimeTemplates

Lists NotebookRuntimeTemplates in a Location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listNotebookRuntimeTemplates(ListNotebookRuntimeTemplatesRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listNotebookRuntimeTemplates(LocationName parent) + *

  • listNotebookRuntimeTemplates(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listNotebookRuntimeTemplatesPagedCallable() + *

  • listNotebookRuntimeTemplatesCallable() + *

+ *

DeleteNotebookRuntimeTemplate

Deletes a NotebookRuntimeTemplate.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteNotebookRuntimeTemplateAsync(DeleteNotebookRuntimeTemplateRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • deleteNotebookRuntimeTemplateAsync(NotebookRuntimeTemplateName name) + *

  • deleteNotebookRuntimeTemplateAsync(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteNotebookRuntimeTemplateOperationCallable() + *

  • deleteNotebookRuntimeTemplateCallable() + *

+ *

AssignNotebookRuntime

Assigns a NotebookRuntime to a user for a particular Notebook file. This method will either returns an existing assignment or generates a new one.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • assignNotebookRuntimeAsync(AssignNotebookRuntimeRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • assignNotebookRuntimeAsync(LocationName parent, NotebookRuntimeTemplateName notebookRuntimeTemplate, NotebookRuntime notebookRuntime, String notebookRuntimeId) + *

  • assignNotebookRuntimeAsync(LocationName parent, String notebookRuntimeTemplate, NotebookRuntime notebookRuntime, String notebookRuntimeId) + *

  • assignNotebookRuntimeAsync(String parent, NotebookRuntimeTemplateName notebookRuntimeTemplate, NotebookRuntime notebookRuntime, String notebookRuntimeId) + *

  • assignNotebookRuntimeAsync(String parent, String notebookRuntimeTemplate, NotebookRuntime notebookRuntime, String notebookRuntimeId) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • assignNotebookRuntimeOperationCallable() + *

  • assignNotebookRuntimeCallable() + *

+ *

GetNotebookRuntime

Gets a NotebookRuntime.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getNotebookRuntime(GetNotebookRuntimeRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getNotebookRuntime(NotebookRuntimeName name) + *

  • getNotebookRuntime(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getNotebookRuntimeCallable() + *

+ *

ListNotebookRuntimes

Lists NotebookRuntimes in a Location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listNotebookRuntimes(ListNotebookRuntimesRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listNotebookRuntimes(LocationName parent) + *

  • listNotebookRuntimes(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listNotebookRuntimesPagedCallable() + *

  • listNotebookRuntimesCallable() + *

+ *

DeleteNotebookRuntime

Deletes a NotebookRuntime.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteNotebookRuntimeAsync(DeleteNotebookRuntimeRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • deleteNotebookRuntimeAsync(NotebookRuntimeName name) + *

  • deleteNotebookRuntimeAsync(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteNotebookRuntimeOperationCallable() + *

  • deleteNotebookRuntimeCallable() + *

+ *

UpgradeNotebookRuntime

Upgrades a NotebookRuntime.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • upgradeNotebookRuntimeAsync(UpgradeNotebookRuntimeRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • upgradeNotebookRuntimeAsync(NotebookRuntimeName name) + *

  • upgradeNotebookRuntimeAsync(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • upgradeNotebookRuntimeOperationCallable() + *

  • upgradeNotebookRuntimeCallable() + *

+ *

StartNotebookRuntime

Starts a NotebookRuntime.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • startNotebookRuntimeAsync(StartNotebookRuntimeRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • startNotebookRuntimeAsync(NotebookRuntimeName name) + *

  • startNotebookRuntimeAsync(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • startNotebookRuntimeOperationCallable() + *

  • startNotebookRuntimeCallable() + *

+ *

ListLocations

Lists information about the supported locations for this service.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listLocations(ListLocationsRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listLocationsPagedCallable() + *

  • listLocationsCallable() + *

+ *

GetLocation

Gets information about a location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getLocation(GetLocationRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getLocationCallable() + *

+ *

SetIamPolicy

Sets the access control policy on the specified resource. Replacesany existing policy. + *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • setIamPolicy(SetIamPolicyRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • setIamPolicyCallable() + *

+ *

GetIamPolicy

Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getIamPolicy(GetIamPolicyRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getIamPolicyCallable() + *

+ *

TestIamPermissions

Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a `NOT_FOUND` error. + *

Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • testIamPermissions(TestIamPermissionsRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • testIamPermissionsCallable() + *

+ *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of NotebookServiceSettings to + * create(). For example: + * + *

To customize credentials: + * + *

{@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
+ * NotebookServiceSettings notebookServiceSettings =
+ *     NotebookServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * NotebookServiceClient notebookServiceClient =
+ *     NotebookServiceClient.create(notebookServiceSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@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
+ * NotebookServiceSettings notebookServiceSettings =
+ *     NotebookServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * NotebookServiceClient notebookServiceClient =
+ *     NotebookServiceClient.create(notebookServiceSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class NotebookServiceClient implements BackgroundResource { + private final NotebookServiceSettings settings; + private final NotebookServiceStub stub; + private final OperationsClient operationsClient; + + /** Constructs an instance of NotebookServiceClient with default settings. */ + public static final NotebookServiceClient create() throws IOException { + return create(NotebookServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of NotebookServiceClient, using the given settings. The channels are + * created based on the settings passed in, or defaults for any settings that are not set. + */ + public static final NotebookServiceClient create(NotebookServiceSettings settings) + throws IOException { + return new NotebookServiceClient(settings); + } + + /** + * Constructs an instance of NotebookServiceClient, using the given stub for making calls. This is + * for advanced usage - prefer using create(NotebookServiceSettings). + */ + public static final NotebookServiceClient create(NotebookServiceStub stub) { + return new NotebookServiceClient(stub); + } + + /** + * Constructs an instance of NotebookServiceClient, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected NotebookServiceClient(NotebookServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((NotebookServiceStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + protected NotebookServiceClient(NotebookServiceStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + public final NotebookServiceSettings getSettings() { + return settings; + } + + public NotebookServiceStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final OperationsClient getOperationsClient() { + return operationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a NotebookRuntimeTemplate. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   NotebookRuntimeTemplate notebookRuntimeTemplate =
+   *       NotebookRuntimeTemplate.newBuilder().build();
+   *   String notebookRuntimeTemplateId = "notebookRuntimeTemplateId-633369454";
+   *   NotebookRuntimeTemplate response =
+   *       notebookServiceClient
+   *           .createNotebookRuntimeTemplateAsync(
+   *               parent, notebookRuntimeTemplate, notebookRuntimeTemplateId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The resource name of the Location to create the + * NotebookRuntimeTemplate. Format: `projects/{project}/locations/{location}` + * @param notebookRuntimeTemplate Required. The NotebookRuntimeTemplate to create. + * @param notebookRuntimeTemplateId Optional. User specified ID for the notebook runtime template. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture< + NotebookRuntimeTemplate, CreateNotebookRuntimeTemplateOperationMetadata> + createNotebookRuntimeTemplateAsync( + LocationName parent, + NotebookRuntimeTemplate notebookRuntimeTemplate, + String notebookRuntimeTemplateId) { + CreateNotebookRuntimeTemplateRequest request = + CreateNotebookRuntimeTemplateRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setNotebookRuntimeTemplate(notebookRuntimeTemplate) + .setNotebookRuntimeTemplateId(notebookRuntimeTemplateId) + .build(); + return createNotebookRuntimeTemplateAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a NotebookRuntimeTemplate. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   NotebookRuntimeTemplate notebookRuntimeTemplate =
+   *       NotebookRuntimeTemplate.newBuilder().build();
+   *   String notebookRuntimeTemplateId = "notebookRuntimeTemplateId-633369454";
+   *   NotebookRuntimeTemplate response =
+   *       notebookServiceClient
+   *           .createNotebookRuntimeTemplateAsync(
+   *               parent, notebookRuntimeTemplate, notebookRuntimeTemplateId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The resource name of the Location to create the + * NotebookRuntimeTemplate. Format: `projects/{project}/locations/{location}` + * @param notebookRuntimeTemplate Required. The NotebookRuntimeTemplate to create. + * @param notebookRuntimeTemplateId Optional. User specified ID for the notebook runtime template. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture< + NotebookRuntimeTemplate, CreateNotebookRuntimeTemplateOperationMetadata> + createNotebookRuntimeTemplateAsync( + String parent, + NotebookRuntimeTemplate notebookRuntimeTemplate, + String notebookRuntimeTemplateId) { + CreateNotebookRuntimeTemplateRequest request = + CreateNotebookRuntimeTemplateRequest.newBuilder() + .setParent(parent) + .setNotebookRuntimeTemplate(notebookRuntimeTemplate) + .setNotebookRuntimeTemplateId(notebookRuntimeTemplateId) + .build(); + return createNotebookRuntimeTemplateAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a NotebookRuntimeTemplate. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   CreateNotebookRuntimeTemplateRequest request =
+   *       CreateNotebookRuntimeTemplateRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setNotebookRuntimeTemplate(NotebookRuntimeTemplate.newBuilder().build())
+   *           .setNotebookRuntimeTemplateId("notebookRuntimeTemplateId-633369454")
+   *           .build();
+   *   NotebookRuntimeTemplate response =
+   *       notebookServiceClient.createNotebookRuntimeTemplateAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture< + NotebookRuntimeTemplate, CreateNotebookRuntimeTemplateOperationMetadata> + createNotebookRuntimeTemplateAsync(CreateNotebookRuntimeTemplateRequest request) { + return createNotebookRuntimeTemplateOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a NotebookRuntimeTemplate. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   CreateNotebookRuntimeTemplateRequest request =
+   *       CreateNotebookRuntimeTemplateRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setNotebookRuntimeTemplate(NotebookRuntimeTemplate.newBuilder().build())
+   *           .setNotebookRuntimeTemplateId("notebookRuntimeTemplateId-633369454")
+   *           .build();
+   *   OperationFuture
+   *       future =
+   *           notebookServiceClient
+   *               .createNotebookRuntimeTemplateOperationCallable()
+   *               .futureCall(request);
+   *   // Do something.
+   *   NotebookRuntimeTemplate response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + CreateNotebookRuntimeTemplateRequest, + NotebookRuntimeTemplate, + CreateNotebookRuntimeTemplateOperationMetadata> + createNotebookRuntimeTemplateOperationCallable() { + return stub.createNotebookRuntimeTemplateOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a NotebookRuntimeTemplate. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   CreateNotebookRuntimeTemplateRequest request =
+   *       CreateNotebookRuntimeTemplateRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setNotebookRuntimeTemplate(NotebookRuntimeTemplate.newBuilder().build())
+   *           .setNotebookRuntimeTemplateId("notebookRuntimeTemplateId-633369454")
+   *           .build();
+   *   ApiFuture future =
+   *       notebookServiceClient.createNotebookRuntimeTemplateCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + createNotebookRuntimeTemplateCallable() { + return stub.createNotebookRuntimeTemplateCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a NotebookRuntimeTemplate. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   NotebookRuntimeTemplateName name =
+   *       NotebookRuntimeTemplateName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]");
+   *   NotebookRuntimeTemplate response = notebookServiceClient.getNotebookRuntimeTemplate(name);
+   * }
+   * }
+ * + * @param name Required. The name of the NotebookRuntimeTemplate resource. Format: + * `projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final NotebookRuntimeTemplate getNotebookRuntimeTemplate( + NotebookRuntimeTemplateName name) { + GetNotebookRuntimeTemplateRequest request = + GetNotebookRuntimeTemplateRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getNotebookRuntimeTemplate(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a NotebookRuntimeTemplate. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   String name =
+   *       NotebookRuntimeTemplateName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]")
+   *           .toString();
+   *   NotebookRuntimeTemplate response = notebookServiceClient.getNotebookRuntimeTemplate(name);
+   * }
+   * }
+ * + * @param name Required. The name of the NotebookRuntimeTemplate resource. Format: + * `projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final NotebookRuntimeTemplate getNotebookRuntimeTemplate(String name) { + GetNotebookRuntimeTemplateRequest request = + GetNotebookRuntimeTemplateRequest.newBuilder().setName(name).build(); + return getNotebookRuntimeTemplate(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a NotebookRuntimeTemplate. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   GetNotebookRuntimeTemplateRequest request =
+   *       GetNotebookRuntimeTemplateRequest.newBuilder()
+   *           .setName(
+   *               NotebookRuntimeTemplateName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]")
+   *                   .toString())
+   *           .build();
+   *   NotebookRuntimeTemplate response = notebookServiceClient.getNotebookRuntimeTemplate(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final NotebookRuntimeTemplate getNotebookRuntimeTemplate( + GetNotebookRuntimeTemplateRequest request) { + return getNotebookRuntimeTemplateCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a NotebookRuntimeTemplate. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   GetNotebookRuntimeTemplateRequest request =
+   *       GetNotebookRuntimeTemplateRequest.newBuilder()
+   *           .setName(
+   *               NotebookRuntimeTemplateName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       notebookServiceClient.getNotebookRuntimeTemplateCallable().futureCall(request);
+   *   // Do something.
+   *   NotebookRuntimeTemplate response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + getNotebookRuntimeTemplateCallable() { + return stub.getNotebookRuntimeTemplateCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists NotebookRuntimeTemplates in a Location. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (NotebookRuntimeTemplate element :
+   *       notebookServiceClient.listNotebookRuntimeTemplates(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The resource name of the Location from which to list the + * NotebookRuntimeTemplates. Format: `projects/{project}/locations/{location}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListNotebookRuntimeTemplatesPagedResponse listNotebookRuntimeTemplates( + LocationName parent) { + ListNotebookRuntimeTemplatesRequest request = + ListNotebookRuntimeTemplatesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listNotebookRuntimeTemplates(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists NotebookRuntimeTemplates in a Location. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (NotebookRuntimeTemplate element :
+   *       notebookServiceClient.listNotebookRuntimeTemplates(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The resource name of the Location from which to list the + * NotebookRuntimeTemplates. Format: `projects/{project}/locations/{location}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListNotebookRuntimeTemplatesPagedResponse listNotebookRuntimeTemplates( + String parent) { + ListNotebookRuntimeTemplatesRequest request = + ListNotebookRuntimeTemplatesRequest.newBuilder().setParent(parent).build(); + return listNotebookRuntimeTemplates(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists NotebookRuntimeTemplates in a Location. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   ListNotebookRuntimeTemplatesRequest request =
+   *       ListNotebookRuntimeTemplatesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setReadMask(FieldMask.newBuilder().build())
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (NotebookRuntimeTemplate element :
+   *       notebookServiceClient.listNotebookRuntimeTemplates(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListNotebookRuntimeTemplatesPagedResponse listNotebookRuntimeTemplates( + ListNotebookRuntimeTemplatesRequest request) { + return listNotebookRuntimeTemplatesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists NotebookRuntimeTemplates in a Location. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   ListNotebookRuntimeTemplatesRequest request =
+   *       ListNotebookRuntimeTemplatesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setReadMask(FieldMask.newBuilder().build())
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       notebookServiceClient.listNotebookRuntimeTemplatesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (NotebookRuntimeTemplate element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable< + ListNotebookRuntimeTemplatesRequest, ListNotebookRuntimeTemplatesPagedResponse> + listNotebookRuntimeTemplatesPagedCallable() { + return stub.listNotebookRuntimeTemplatesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists NotebookRuntimeTemplates in a Location. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   ListNotebookRuntimeTemplatesRequest request =
+   *       ListNotebookRuntimeTemplatesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setReadMask(FieldMask.newBuilder().build())
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListNotebookRuntimeTemplatesResponse response =
+   *         notebookServiceClient.listNotebookRuntimeTemplatesCallable().call(request);
+   *     for (NotebookRuntimeTemplate element : response.getNotebookRuntimeTemplatesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable< + ListNotebookRuntimeTemplatesRequest, ListNotebookRuntimeTemplatesResponse> + listNotebookRuntimeTemplatesCallable() { + return stub.listNotebookRuntimeTemplatesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a NotebookRuntimeTemplate. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   NotebookRuntimeTemplateName name =
+   *       NotebookRuntimeTemplateName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]");
+   *   notebookServiceClient.deleteNotebookRuntimeTemplateAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the NotebookRuntimeTemplate resource to be deleted. Format: + * `projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteNotebookRuntimeTemplateAsync( + NotebookRuntimeTemplateName name) { + DeleteNotebookRuntimeTemplateRequest request = + DeleteNotebookRuntimeTemplateRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return deleteNotebookRuntimeTemplateAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a NotebookRuntimeTemplate. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   String name =
+   *       NotebookRuntimeTemplateName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]")
+   *           .toString();
+   *   notebookServiceClient.deleteNotebookRuntimeTemplateAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the NotebookRuntimeTemplate resource to be deleted. Format: + * `projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteNotebookRuntimeTemplateAsync( + String name) { + DeleteNotebookRuntimeTemplateRequest request = + DeleteNotebookRuntimeTemplateRequest.newBuilder().setName(name).build(); + return deleteNotebookRuntimeTemplateAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a NotebookRuntimeTemplate. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   DeleteNotebookRuntimeTemplateRequest request =
+   *       DeleteNotebookRuntimeTemplateRequest.newBuilder()
+   *           .setName(
+   *               NotebookRuntimeTemplateName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]")
+   *                   .toString())
+   *           .build();
+   *   notebookServiceClient.deleteNotebookRuntimeTemplateAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteNotebookRuntimeTemplateAsync( + DeleteNotebookRuntimeTemplateRequest request) { + return deleteNotebookRuntimeTemplateOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a NotebookRuntimeTemplate. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   DeleteNotebookRuntimeTemplateRequest request =
+   *       DeleteNotebookRuntimeTemplateRequest.newBuilder()
+   *           .setName(
+   *               NotebookRuntimeTemplateName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]")
+   *                   .toString())
+   *           .build();
+   *   OperationFuture future =
+   *       notebookServiceClient
+   *           .deleteNotebookRuntimeTemplateOperationCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + DeleteNotebookRuntimeTemplateRequest, Empty, DeleteOperationMetadata> + deleteNotebookRuntimeTemplateOperationCallable() { + return stub.deleteNotebookRuntimeTemplateOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a NotebookRuntimeTemplate. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   DeleteNotebookRuntimeTemplateRequest request =
+   *       DeleteNotebookRuntimeTemplateRequest.newBuilder()
+   *           .setName(
+   *               NotebookRuntimeTemplateName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       notebookServiceClient.deleteNotebookRuntimeTemplateCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + deleteNotebookRuntimeTemplateCallable() { + return stub.deleteNotebookRuntimeTemplateCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Assigns a NotebookRuntime to a user for a particular Notebook file. This method will either + * returns an existing assignment or generates a new one. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   NotebookRuntimeTemplateName notebookRuntimeTemplate =
+   *       NotebookRuntimeTemplateName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]");
+   *   NotebookRuntime notebookRuntime = NotebookRuntime.newBuilder().build();
+   *   String notebookRuntimeId = "notebookRuntimeId400795512";
+   *   NotebookRuntime response =
+   *       notebookServiceClient
+   *           .assignNotebookRuntimeAsync(
+   *               parent, notebookRuntimeTemplate, notebookRuntime, notebookRuntimeId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The resource name of the Location to get the NotebookRuntime + * assignment. Format: `projects/{project}/locations/{location}` + * @param notebookRuntimeTemplate Required. The resource name of the NotebookRuntimeTemplate based + * on which a NotebookRuntime will be assigned (reuse or create a new one). + * @param notebookRuntime Required. Provide runtime specific information (e.g. runtime owner, + * notebook id) used for NotebookRuntime assignment. + * @param notebookRuntimeId Optional. User specified ID for the notebook runtime. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + assignNotebookRuntimeAsync( + LocationName parent, + NotebookRuntimeTemplateName notebookRuntimeTemplate, + NotebookRuntime notebookRuntime, + String notebookRuntimeId) { + AssignNotebookRuntimeRequest request = + AssignNotebookRuntimeRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setNotebookRuntimeTemplate( + notebookRuntimeTemplate == null ? null : notebookRuntimeTemplate.toString()) + .setNotebookRuntime(notebookRuntime) + .setNotebookRuntimeId(notebookRuntimeId) + .build(); + return assignNotebookRuntimeAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Assigns a NotebookRuntime to a user for a particular Notebook file. This method will either + * returns an existing assignment or generates a new one. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   String notebookRuntimeTemplate =
+   *       NotebookRuntimeTemplateName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]")
+   *           .toString();
+   *   NotebookRuntime notebookRuntime = NotebookRuntime.newBuilder().build();
+   *   String notebookRuntimeId = "notebookRuntimeId400795512";
+   *   NotebookRuntime response =
+   *       notebookServiceClient
+   *           .assignNotebookRuntimeAsync(
+   *               parent, notebookRuntimeTemplate, notebookRuntime, notebookRuntimeId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The resource name of the Location to get the NotebookRuntime + * assignment. Format: `projects/{project}/locations/{location}` + * @param notebookRuntimeTemplate Required. The resource name of the NotebookRuntimeTemplate based + * on which a NotebookRuntime will be assigned (reuse or create a new one). + * @param notebookRuntime Required. Provide runtime specific information (e.g. runtime owner, + * notebook id) used for NotebookRuntime assignment. + * @param notebookRuntimeId Optional. User specified ID for the notebook runtime. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + assignNotebookRuntimeAsync( + LocationName parent, + String notebookRuntimeTemplate, + NotebookRuntime notebookRuntime, + String notebookRuntimeId) { + AssignNotebookRuntimeRequest request = + AssignNotebookRuntimeRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setNotebookRuntimeTemplate(notebookRuntimeTemplate) + .setNotebookRuntime(notebookRuntime) + .setNotebookRuntimeId(notebookRuntimeId) + .build(); + return assignNotebookRuntimeAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Assigns a NotebookRuntime to a user for a particular Notebook file. This method will either + * returns an existing assignment or generates a new one. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   NotebookRuntimeTemplateName notebookRuntimeTemplate =
+   *       NotebookRuntimeTemplateName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]");
+   *   NotebookRuntime notebookRuntime = NotebookRuntime.newBuilder().build();
+   *   String notebookRuntimeId = "notebookRuntimeId400795512";
+   *   NotebookRuntime response =
+   *       notebookServiceClient
+   *           .assignNotebookRuntimeAsync(
+   *               parent, notebookRuntimeTemplate, notebookRuntime, notebookRuntimeId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The resource name of the Location to get the NotebookRuntime + * assignment. Format: `projects/{project}/locations/{location}` + * @param notebookRuntimeTemplate Required. The resource name of the NotebookRuntimeTemplate based + * on which a NotebookRuntime will be assigned (reuse or create a new one). + * @param notebookRuntime Required. Provide runtime specific information (e.g. runtime owner, + * notebook id) used for NotebookRuntime assignment. + * @param notebookRuntimeId Optional. User specified ID for the notebook runtime. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + assignNotebookRuntimeAsync( + String parent, + NotebookRuntimeTemplateName notebookRuntimeTemplate, + NotebookRuntime notebookRuntime, + String notebookRuntimeId) { + AssignNotebookRuntimeRequest request = + AssignNotebookRuntimeRequest.newBuilder() + .setParent(parent) + .setNotebookRuntimeTemplate( + notebookRuntimeTemplate == null ? null : notebookRuntimeTemplate.toString()) + .setNotebookRuntime(notebookRuntime) + .setNotebookRuntimeId(notebookRuntimeId) + .build(); + return assignNotebookRuntimeAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Assigns a NotebookRuntime to a user for a particular Notebook file. This method will either + * returns an existing assignment or generates a new one. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   String notebookRuntimeTemplate =
+   *       NotebookRuntimeTemplateName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]")
+   *           .toString();
+   *   NotebookRuntime notebookRuntime = NotebookRuntime.newBuilder().build();
+   *   String notebookRuntimeId = "notebookRuntimeId400795512";
+   *   NotebookRuntime response =
+   *       notebookServiceClient
+   *           .assignNotebookRuntimeAsync(
+   *               parent, notebookRuntimeTemplate, notebookRuntime, notebookRuntimeId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The resource name of the Location to get the NotebookRuntime + * assignment. Format: `projects/{project}/locations/{location}` + * @param notebookRuntimeTemplate Required. The resource name of the NotebookRuntimeTemplate based + * on which a NotebookRuntime will be assigned (reuse or create a new one). + * @param notebookRuntime Required. Provide runtime specific information (e.g. runtime owner, + * notebook id) used for NotebookRuntime assignment. + * @param notebookRuntimeId Optional. User specified ID for the notebook runtime. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + assignNotebookRuntimeAsync( + String parent, + String notebookRuntimeTemplate, + NotebookRuntime notebookRuntime, + String notebookRuntimeId) { + AssignNotebookRuntimeRequest request = + AssignNotebookRuntimeRequest.newBuilder() + .setParent(parent) + .setNotebookRuntimeTemplate(notebookRuntimeTemplate) + .setNotebookRuntime(notebookRuntime) + .setNotebookRuntimeId(notebookRuntimeId) + .build(); + return assignNotebookRuntimeAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Assigns a NotebookRuntime to a user for a particular Notebook file. This method will either + * returns an existing assignment or generates a new one. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   AssignNotebookRuntimeRequest request =
+   *       AssignNotebookRuntimeRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setNotebookRuntimeTemplate(
+   *               NotebookRuntimeTemplateName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]")
+   *                   .toString())
+   *           .setNotebookRuntime(NotebookRuntime.newBuilder().build())
+   *           .setNotebookRuntimeId("notebookRuntimeId400795512")
+   *           .build();
+   *   NotebookRuntime response = notebookServiceClient.assignNotebookRuntimeAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + assignNotebookRuntimeAsync(AssignNotebookRuntimeRequest request) { + return assignNotebookRuntimeOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Assigns a NotebookRuntime to a user for a particular Notebook file. This method will either + * returns an existing assignment or generates a new one. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   AssignNotebookRuntimeRequest request =
+   *       AssignNotebookRuntimeRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setNotebookRuntimeTemplate(
+   *               NotebookRuntimeTemplateName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]")
+   *                   .toString())
+   *           .setNotebookRuntime(NotebookRuntime.newBuilder().build())
+   *           .setNotebookRuntimeId("notebookRuntimeId400795512")
+   *           .build();
+   *   OperationFuture future =
+   *       notebookServiceClient.assignNotebookRuntimeOperationCallable().futureCall(request);
+   *   // Do something.
+   *   NotebookRuntime response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + AssignNotebookRuntimeRequest, NotebookRuntime, AssignNotebookRuntimeOperationMetadata> + assignNotebookRuntimeOperationCallable() { + return stub.assignNotebookRuntimeOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Assigns a NotebookRuntime to a user for a particular Notebook file. This method will either + * returns an existing assignment or generates a new one. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   AssignNotebookRuntimeRequest request =
+   *       AssignNotebookRuntimeRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setNotebookRuntimeTemplate(
+   *               NotebookRuntimeTemplateName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]")
+   *                   .toString())
+   *           .setNotebookRuntime(NotebookRuntime.newBuilder().build())
+   *           .setNotebookRuntimeId("notebookRuntimeId400795512")
+   *           .build();
+   *   ApiFuture future =
+   *       notebookServiceClient.assignNotebookRuntimeCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + assignNotebookRuntimeCallable() { + return stub.assignNotebookRuntimeCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a NotebookRuntime. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   NotebookRuntimeName name =
+   *       NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]");
+   *   NotebookRuntime response = notebookServiceClient.getNotebookRuntime(name);
+   * }
+   * }
+ * + * @param name Required. The name of the NotebookRuntime resource. Instead of checking whether the + * name is in valid NotebookRuntime resource name format, directly throw NotFound exception if + * there is no such NotebookRuntime in spanner. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final NotebookRuntime getNotebookRuntime(NotebookRuntimeName name) { + GetNotebookRuntimeRequest request = + GetNotebookRuntimeRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getNotebookRuntime(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a NotebookRuntime. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   String name =
+   *       NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]").toString();
+   *   NotebookRuntime response = notebookServiceClient.getNotebookRuntime(name);
+   * }
+   * }
+ * + * @param name Required. The name of the NotebookRuntime resource. Instead of checking whether the + * name is in valid NotebookRuntime resource name format, directly throw NotFound exception if + * there is no such NotebookRuntime in spanner. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final NotebookRuntime getNotebookRuntime(String name) { + GetNotebookRuntimeRequest request = + GetNotebookRuntimeRequest.newBuilder().setName(name).build(); + return getNotebookRuntime(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a NotebookRuntime. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   GetNotebookRuntimeRequest request =
+   *       GetNotebookRuntimeRequest.newBuilder()
+   *           .setName(
+   *               NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]")
+   *                   .toString())
+   *           .build();
+   *   NotebookRuntime response = notebookServiceClient.getNotebookRuntime(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final NotebookRuntime getNotebookRuntime(GetNotebookRuntimeRequest request) { + return getNotebookRuntimeCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a NotebookRuntime. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   GetNotebookRuntimeRequest request =
+   *       GetNotebookRuntimeRequest.newBuilder()
+   *           .setName(
+   *               NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       notebookServiceClient.getNotebookRuntimeCallable().futureCall(request);
+   *   // Do something.
+   *   NotebookRuntime response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + getNotebookRuntimeCallable() { + return stub.getNotebookRuntimeCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists NotebookRuntimes in a Location. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (NotebookRuntime element :
+   *       notebookServiceClient.listNotebookRuntimes(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The resource name of the Location from which to list the + * NotebookRuntimes. Format: `projects/{project}/locations/{location}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListNotebookRuntimesPagedResponse listNotebookRuntimes(LocationName parent) { + ListNotebookRuntimesRequest request = + ListNotebookRuntimesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listNotebookRuntimes(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists NotebookRuntimes in a Location. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (NotebookRuntime element :
+   *       notebookServiceClient.listNotebookRuntimes(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The resource name of the Location from which to list the + * NotebookRuntimes. Format: `projects/{project}/locations/{location}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListNotebookRuntimesPagedResponse listNotebookRuntimes(String parent) { + ListNotebookRuntimesRequest request = + ListNotebookRuntimesRequest.newBuilder().setParent(parent).build(); + return listNotebookRuntimes(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists NotebookRuntimes in a Location. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   ListNotebookRuntimesRequest request =
+   *       ListNotebookRuntimesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setReadMask(FieldMask.newBuilder().build())
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (NotebookRuntime element :
+   *       notebookServiceClient.listNotebookRuntimes(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListNotebookRuntimesPagedResponse listNotebookRuntimes( + ListNotebookRuntimesRequest request) { + return listNotebookRuntimesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists NotebookRuntimes in a Location. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   ListNotebookRuntimesRequest request =
+   *       ListNotebookRuntimesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setReadMask(FieldMask.newBuilder().build())
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       notebookServiceClient.listNotebookRuntimesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (NotebookRuntime element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listNotebookRuntimesPagedCallable() { + return stub.listNotebookRuntimesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists NotebookRuntimes in a Location. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   ListNotebookRuntimesRequest request =
+   *       ListNotebookRuntimesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setReadMask(FieldMask.newBuilder().build())
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListNotebookRuntimesResponse response =
+   *         notebookServiceClient.listNotebookRuntimesCallable().call(request);
+   *     for (NotebookRuntime element : response.getNotebookRuntimesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listNotebookRuntimesCallable() { + return stub.listNotebookRuntimesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a NotebookRuntime. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   NotebookRuntimeName name =
+   *       NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]");
+   *   notebookServiceClient.deleteNotebookRuntimeAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the NotebookRuntime resource to be deleted. Instead of + * checking whether the name is in valid NotebookRuntime resource name format, directly throw + * NotFound exception if there is no such NotebookRuntime in spanner. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteNotebookRuntimeAsync( + NotebookRuntimeName name) { + DeleteNotebookRuntimeRequest request = + DeleteNotebookRuntimeRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return deleteNotebookRuntimeAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a NotebookRuntime. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   String name =
+   *       NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]").toString();
+   *   notebookServiceClient.deleteNotebookRuntimeAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the NotebookRuntime resource to be deleted. Instead of + * checking whether the name is in valid NotebookRuntime resource name format, directly throw + * NotFound exception if there is no such NotebookRuntime in spanner. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteNotebookRuntimeAsync( + String name) { + DeleteNotebookRuntimeRequest request = + DeleteNotebookRuntimeRequest.newBuilder().setName(name).build(); + return deleteNotebookRuntimeAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a NotebookRuntime. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   DeleteNotebookRuntimeRequest request =
+   *       DeleteNotebookRuntimeRequest.newBuilder()
+   *           .setName(
+   *               NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]")
+   *                   .toString())
+   *           .build();
+   *   notebookServiceClient.deleteNotebookRuntimeAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteNotebookRuntimeAsync( + DeleteNotebookRuntimeRequest request) { + return deleteNotebookRuntimeOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a NotebookRuntime. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   DeleteNotebookRuntimeRequest request =
+   *       DeleteNotebookRuntimeRequest.newBuilder()
+   *           .setName(
+   *               NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]")
+   *                   .toString())
+   *           .build();
+   *   OperationFuture future =
+   *       notebookServiceClient.deleteNotebookRuntimeOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteNotebookRuntimeOperationCallable() { + return stub.deleteNotebookRuntimeOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a NotebookRuntime. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   DeleteNotebookRuntimeRequest request =
+   *       DeleteNotebookRuntimeRequest.newBuilder()
+   *           .setName(
+   *               NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       notebookServiceClient.deleteNotebookRuntimeCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + deleteNotebookRuntimeCallable() { + return stub.deleteNotebookRuntimeCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Upgrades a NotebookRuntime. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   NotebookRuntimeName name =
+   *       NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]");
+   *   UpgradeNotebookRuntimeResponse response =
+   *       notebookServiceClient.upgradeNotebookRuntimeAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the NotebookRuntime resource to be upgrade. Instead of + * checking whether the name is in valid NotebookRuntime resource name format, directly throw + * NotFound exception if there is no such NotebookRuntime in spanner. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture< + UpgradeNotebookRuntimeResponse, UpgradeNotebookRuntimeOperationMetadata> + upgradeNotebookRuntimeAsync(NotebookRuntimeName name) { + UpgradeNotebookRuntimeRequest request = + UpgradeNotebookRuntimeRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return upgradeNotebookRuntimeAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Upgrades a NotebookRuntime. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   String name =
+   *       NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]").toString();
+   *   UpgradeNotebookRuntimeResponse response =
+   *       notebookServiceClient.upgradeNotebookRuntimeAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the NotebookRuntime resource to be upgrade. Instead of + * checking whether the name is in valid NotebookRuntime resource name format, directly throw + * NotFound exception if there is no such NotebookRuntime in spanner. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture< + UpgradeNotebookRuntimeResponse, UpgradeNotebookRuntimeOperationMetadata> + upgradeNotebookRuntimeAsync(String name) { + UpgradeNotebookRuntimeRequest request = + UpgradeNotebookRuntimeRequest.newBuilder().setName(name).build(); + return upgradeNotebookRuntimeAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Upgrades a NotebookRuntime. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   UpgradeNotebookRuntimeRequest request =
+   *       UpgradeNotebookRuntimeRequest.newBuilder()
+   *           .setName(
+   *               NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]")
+   *                   .toString())
+   *           .build();
+   *   UpgradeNotebookRuntimeResponse response =
+   *       notebookServiceClient.upgradeNotebookRuntimeAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture< + UpgradeNotebookRuntimeResponse, UpgradeNotebookRuntimeOperationMetadata> + upgradeNotebookRuntimeAsync(UpgradeNotebookRuntimeRequest request) { + return upgradeNotebookRuntimeOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Upgrades a NotebookRuntime. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   UpgradeNotebookRuntimeRequest request =
+   *       UpgradeNotebookRuntimeRequest.newBuilder()
+   *           .setName(
+   *               NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]")
+   *                   .toString())
+   *           .build();
+   *   OperationFuture
+   *       future =
+   *           notebookServiceClient.upgradeNotebookRuntimeOperationCallable().futureCall(request);
+   *   // Do something.
+   *   UpgradeNotebookRuntimeResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + UpgradeNotebookRuntimeRequest, + UpgradeNotebookRuntimeResponse, + UpgradeNotebookRuntimeOperationMetadata> + upgradeNotebookRuntimeOperationCallable() { + return stub.upgradeNotebookRuntimeOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Upgrades a NotebookRuntime. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   UpgradeNotebookRuntimeRequest request =
+   *       UpgradeNotebookRuntimeRequest.newBuilder()
+   *           .setName(
+   *               NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       notebookServiceClient.upgradeNotebookRuntimeCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + upgradeNotebookRuntimeCallable() { + return stub.upgradeNotebookRuntimeCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Starts a NotebookRuntime. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   NotebookRuntimeName name =
+   *       NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]");
+   *   StartNotebookRuntimeResponse response =
+   *       notebookServiceClient.startNotebookRuntimeAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the NotebookRuntime resource to be started. Instead of + * checking whether the name is in valid NotebookRuntime resource name format, directly throw + * NotFound exception if there is no such NotebookRuntime in spanner. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + startNotebookRuntimeAsync(NotebookRuntimeName name) { + StartNotebookRuntimeRequest request = + StartNotebookRuntimeRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return startNotebookRuntimeAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Starts a NotebookRuntime. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   String name =
+   *       NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]").toString();
+   *   StartNotebookRuntimeResponse response =
+   *       notebookServiceClient.startNotebookRuntimeAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the NotebookRuntime resource to be started. Instead of + * checking whether the name is in valid NotebookRuntime resource name format, directly throw + * NotFound exception if there is no such NotebookRuntime in spanner. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + startNotebookRuntimeAsync(String name) { + StartNotebookRuntimeRequest request = + StartNotebookRuntimeRequest.newBuilder().setName(name).build(); + return startNotebookRuntimeAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Starts a NotebookRuntime. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   StartNotebookRuntimeRequest request =
+   *       StartNotebookRuntimeRequest.newBuilder()
+   *           .setName(
+   *               NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]")
+   *                   .toString())
+   *           .build();
+   *   StartNotebookRuntimeResponse response =
+   *       notebookServiceClient.startNotebookRuntimeAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + startNotebookRuntimeAsync(StartNotebookRuntimeRequest request) { + return startNotebookRuntimeOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Starts a NotebookRuntime. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   StartNotebookRuntimeRequest request =
+   *       StartNotebookRuntimeRequest.newBuilder()
+   *           .setName(
+   *               NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]")
+   *                   .toString())
+   *           .build();
+   *   OperationFuture future =
+   *       notebookServiceClient.startNotebookRuntimeOperationCallable().futureCall(request);
+   *   // Do something.
+   *   StartNotebookRuntimeResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + StartNotebookRuntimeRequest, + StartNotebookRuntimeResponse, + StartNotebookRuntimeOperationMetadata> + startNotebookRuntimeOperationCallable() { + return stub.startNotebookRuntimeOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Starts a NotebookRuntime. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   StartNotebookRuntimeRequest request =
+   *       StartNotebookRuntimeRequest.newBuilder()
+   *           .setName(
+   *               NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       notebookServiceClient.startNotebookRuntimeCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + startNotebookRuntimeCallable() { + return stub.startNotebookRuntimeCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Location element : notebookServiceClient.listLocations(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListLocationsPagedResponse listLocations(ListLocationsRequest request) { + return listLocationsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       notebookServiceClient.listLocationsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Location element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listLocationsPagedCallable() { + return stub.listLocationsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListLocationsResponse response =
+   *         notebookServiceClient.listLocationsCallable().call(request);
+   *     for (Location element : response.getLocationsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listLocationsCallable() { + return stub.listLocationsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   Location response = notebookServiceClient.getLocation(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Location getLocation(GetLocationRequest request) { + return getLocationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future = notebookServiceClient.getLocationCallable().futureCall(request);
+   *   // Do something.
+   *   Location response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getLocationCallable() { + return stub.getLocationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the access control policy on the specified resource. Replacesany existing policy. + * + *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   SetIamPolicyRequest request =
+   *       SetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Policy response = notebookServiceClient.setIamPolicy(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Policy setIamPolicy(SetIamPolicyRequest request) { + return setIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the access control policy on the specified resource. Replacesany existing policy. + * + *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   SetIamPolicyRequest request =
+   *       SetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = notebookServiceClient.setIamPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Policy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable setIamPolicyCallable() { + return stub.setIamPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the access control policy for a resource. Returns an empty policyif the resource exists + * and does not have a policy set. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   GetIamPolicyRequest request =
+   *       GetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .setOptions(GetPolicyOptions.newBuilder().build())
+   *           .build();
+   *   Policy response = notebookServiceClient.getIamPolicy(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Policy getIamPolicy(GetIamPolicyRequest request) { + return getIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the access control policy for a resource. Returns an empty policyif the resource exists + * and does not have a policy set. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   GetIamPolicyRequest request =
+   *       GetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .setOptions(GetPolicyOptions.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = notebookServiceClient.getIamPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Policy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getIamPolicyCallable() { + return stub.getIamPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns permissions that a caller has on the specified resource. If theresource does not exist, + * this will return an empty set ofpermissions, not a `NOT_FOUND` error. + * + *

Note: This operation is designed to be used for buildingpermission-aware UIs and + * command-line tools, not for authorizationchecking. This operation may "fail open" without + * warning. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   TestIamPermissionsRequest request =
+   *       TestIamPermissionsRequest.newBuilder()
+   *           .setResource(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .addAllPermissions(new ArrayList())
+   *           .build();
+   *   TestIamPermissionsResponse response = notebookServiceClient.testIamPermissions(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) { + return testIamPermissionsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns permissions that a caller has on the specified resource. If theresource does not exist, + * this will return an empty set ofpermissions, not a `NOT_FOUND` error. + * + *

Note: This operation is designed to be used for buildingpermission-aware UIs and + * command-line tools, not for authorizationchecking. This operation may "fail open" without + * warning. + * + *

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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   TestIamPermissionsRequest request =
+   *       TestIamPermissionsRequest.newBuilder()
+   *           .setResource(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .addAllPermissions(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       notebookServiceClient.testIamPermissionsCallable().futureCall(request);
+   *   // Do something.
+   *   TestIamPermissionsResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + testIamPermissionsCallable() { + return stub.testIamPermissionsCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListNotebookRuntimeTemplatesPagedResponse + extends AbstractPagedListResponse< + ListNotebookRuntimeTemplatesRequest, + ListNotebookRuntimeTemplatesResponse, + NotebookRuntimeTemplate, + ListNotebookRuntimeTemplatesPage, + ListNotebookRuntimeTemplatesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + ListNotebookRuntimeTemplatesRequest, + ListNotebookRuntimeTemplatesResponse, + NotebookRuntimeTemplate> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListNotebookRuntimeTemplatesPage.createEmptyPage() + .createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListNotebookRuntimeTemplatesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListNotebookRuntimeTemplatesPagedResponse(ListNotebookRuntimeTemplatesPage page) { + super(page, ListNotebookRuntimeTemplatesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListNotebookRuntimeTemplatesPage + extends AbstractPage< + ListNotebookRuntimeTemplatesRequest, + ListNotebookRuntimeTemplatesResponse, + NotebookRuntimeTemplate, + ListNotebookRuntimeTemplatesPage> { + + private ListNotebookRuntimeTemplatesPage( + PageContext< + ListNotebookRuntimeTemplatesRequest, + ListNotebookRuntimeTemplatesResponse, + NotebookRuntimeTemplate> + context, + ListNotebookRuntimeTemplatesResponse response) { + super(context, response); + } + + private static ListNotebookRuntimeTemplatesPage createEmptyPage() { + return new ListNotebookRuntimeTemplatesPage(null, null); + } + + @Override + protected ListNotebookRuntimeTemplatesPage createPage( + PageContext< + ListNotebookRuntimeTemplatesRequest, + ListNotebookRuntimeTemplatesResponse, + NotebookRuntimeTemplate> + context, + ListNotebookRuntimeTemplatesResponse response) { + return new ListNotebookRuntimeTemplatesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext< + ListNotebookRuntimeTemplatesRequest, + ListNotebookRuntimeTemplatesResponse, + NotebookRuntimeTemplate> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListNotebookRuntimeTemplatesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListNotebookRuntimeTemplatesRequest, + ListNotebookRuntimeTemplatesResponse, + NotebookRuntimeTemplate, + ListNotebookRuntimeTemplatesPage, + ListNotebookRuntimeTemplatesFixedSizeCollection> { + + private ListNotebookRuntimeTemplatesFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListNotebookRuntimeTemplatesFixedSizeCollection createEmptyCollection() { + return new ListNotebookRuntimeTemplatesFixedSizeCollection(null, 0); + } + + @Override + protected ListNotebookRuntimeTemplatesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListNotebookRuntimeTemplatesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListNotebookRuntimesPagedResponse + extends AbstractPagedListResponse< + ListNotebookRuntimesRequest, + ListNotebookRuntimesResponse, + NotebookRuntime, + ListNotebookRuntimesPage, + ListNotebookRuntimesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListNotebookRuntimesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListNotebookRuntimesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListNotebookRuntimesPagedResponse(ListNotebookRuntimesPage page) { + super(page, ListNotebookRuntimesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListNotebookRuntimesPage + extends AbstractPage< + ListNotebookRuntimesRequest, + ListNotebookRuntimesResponse, + NotebookRuntime, + ListNotebookRuntimesPage> { + + private ListNotebookRuntimesPage( + PageContext + context, + ListNotebookRuntimesResponse response) { + super(context, response); + } + + private static ListNotebookRuntimesPage createEmptyPage() { + return new ListNotebookRuntimesPage(null, null); + } + + @Override + protected ListNotebookRuntimesPage createPage( + PageContext + context, + ListNotebookRuntimesResponse response) { + return new ListNotebookRuntimesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListNotebookRuntimesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListNotebookRuntimesRequest, + ListNotebookRuntimesResponse, + NotebookRuntime, + ListNotebookRuntimesPage, + ListNotebookRuntimesFixedSizeCollection> { + + private ListNotebookRuntimesFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListNotebookRuntimesFixedSizeCollection createEmptyCollection() { + return new ListNotebookRuntimesFixedSizeCollection(null, 0); + } + + @Override + protected ListNotebookRuntimesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListNotebookRuntimesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListLocationsPagedResponse + extends AbstractPagedListResponse< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListLocationsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListLocationsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListLocationsPagedResponse(ListLocationsPage page) { + super(page, ListLocationsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListLocationsPage + extends AbstractPage< + ListLocationsRequest, ListLocationsResponse, Location, ListLocationsPage> { + + private ListLocationsPage( + PageContext context, + ListLocationsResponse response) { + super(context, response); + } + + private static ListLocationsPage createEmptyPage() { + return new ListLocationsPage(null, null); + } + + @Override + protected ListLocationsPage createPage( + PageContext context, + ListLocationsResponse response) { + return new ListLocationsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListLocationsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + private ListLocationsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListLocationsFixedSizeCollection createEmptyCollection() { + return new ListLocationsFixedSizeCollection(null, 0); + } + + @Override + protected ListLocationsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListLocationsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/NotebookServiceSettings.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/NotebookServiceSettings.java new file mode 100644 index 000000000000..776c3bdb1af4 --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/NotebookServiceSettings.java @@ -0,0 +1,481 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1; + +import static com.google.cloud.aiplatform.v1beta1.NotebookServiceClient.ListLocationsPagedResponse; +import static com.google.cloud.aiplatform.v1beta1.NotebookServiceClient.ListNotebookRuntimeTemplatesPagedResponse; +import static com.google.cloud.aiplatform.v1beta1.NotebookServiceClient.ListNotebookRuntimesPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.aiplatform.v1beta1.stub.NotebookServiceStubSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link NotebookServiceClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (aiplatform.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of getNotebookRuntimeTemplate to 30 seconds: + * + *

{@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
+ * NotebookServiceSettings.Builder notebookServiceSettingsBuilder =
+ *     NotebookServiceSettings.newBuilder();
+ * notebookServiceSettingsBuilder
+ *     .getNotebookRuntimeTemplateSettings()
+ *     .setRetrySettings(
+ *         notebookServiceSettingsBuilder
+ *             .getNotebookRuntimeTemplateSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * NotebookServiceSettings notebookServiceSettings = notebookServiceSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class NotebookServiceSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to createNotebookRuntimeTemplate. */ + public UnaryCallSettings + createNotebookRuntimeTemplateSettings() { + return ((NotebookServiceStubSettings) getStubSettings()) + .createNotebookRuntimeTemplateSettings(); + } + + /** Returns the object with the settings used for calls to createNotebookRuntimeTemplate. */ + public OperationCallSettings< + CreateNotebookRuntimeTemplateRequest, + NotebookRuntimeTemplate, + CreateNotebookRuntimeTemplateOperationMetadata> + createNotebookRuntimeTemplateOperationSettings() { + return ((NotebookServiceStubSettings) getStubSettings()) + .createNotebookRuntimeTemplateOperationSettings(); + } + + /** Returns the object with the settings used for calls to getNotebookRuntimeTemplate. */ + public UnaryCallSettings + getNotebookRuntimeTemplateSettings() { + return ((NotebookServiceStubSettings) getStubSettings()).getNotebookRuntimeTemplateSettings(); + } + + /** Returns the object with the settings used for calls to listNotebookRuntimeTemplates. */ + public PagedCallSettings< + ListNotebookRuntimeTemplatesRequest, + ListNotebookRuntimeTemplatesResponse, + ListNotebookRuntimeTemplatesPagedResponse> + listNotebookRuntimeTemplatesSettings() { + return ((NotebookServiceStubSettings) getStubSettings()).listNotebookRuntimeTemplatesSettings(); + } + + /** Returns the object with the settings used for calls to deleteNotebookRuntimeTemplate. */ + public UnaryCallSettings + deleteNotebookRuntimeTemplateSettings() { + return ((NotebookServiceStubSettings) getStubSettings()) + .deleteNotebookRuntimeTemplateSettings(); + } + + /** Returns the object with the settings used for calls to deleteNotebookRuntimeTemplate. */ + public OperationCallSettings + deleteNotebookRuntimeTemplateOperationSettings() { + return ((NotebookServiceStubSettings) getStubSettings()) + .deleteNotebookRuntimeTemplateOperationSettings(); + } + + /** Returns the object with the settings used for calls to assignNotebookRuntime. */ + public UnaryCallSettings + assignNotebookRuntimeSettings() { + return ((NotebookServiceStubSettings) getStubSettings()).assignNotebookRuntimeSettings(); + } + + /** Returns the object with the settings used for calls to assignNotebookRuntime. */ + public OperationCallSettings< + AssignNotebookRuntimeRequest, NotebookRuntime, AssignNotebookRuntimeOperationMetadata> + assignNotebookRuntimeOperationSettings() { + return ((NotebookServiceStubSettings) getStubSettings()) + .assignNotebookRuntimeOperationSettings(); + } + + /** Returns the object with the settings used for calls to getNotebookRuntime. */ + public UnaryCallSettings + getNotebookRuntimeSettings() { + return ((NotebookServiceStubSettings) getStubSettings()).getNotebookRuntimeSettings(); + } + + /** Returns the object with the settings used for calls to listNotebookRuntimes. */ + public PagedCallSettings< + ListNotebookRuntimesRequest, + ListNotebookRuntimesResponse, + ListNotebookRuntimesPagedResponse> + listNotebookRuntimesSettings() { + return ((NotebookServiceStubSettings) getStubSettings()).listNotebookRuntimesSettings(); + } + + /** Returns the object with the settings used for calls to deleteNotebookRuntime. */ + public UnaryCallSettings + deleteNotebookRuntimeSettings() { + return ((NotebookServiceStubSettings) getStubSettings()).deleteNotebookRuntimeSettings(); + } + + /** Returns the object with the settings used for calls to deleteNotebookRuntime. */ + public OperationCallSettings + deleteNotebookRuntimeOperationSettings() { + return ((NotebookServiceStubSettings) getStubSettings()) + .deleteNotebookRuntimeOperationSettings(); + } + + /** Returns the object with the settings used for calls to upgradeNotebookRuntime. */ + public UnaryCallSettings + upgradeNotebookRuntimeSettings() { + return ((NotebookServiceStubSettings) getStubSettings()).upgradeNotebookRuntimeSettings(); + } + + /** Returns the object with the settings used for calls to upgradeNotebookRuntime. */ + public OperationCallSettings< + UpgradeNotebookRuntimeRequest, + UpgradeNotebookRuntimeResponse, + UpgradeNotebookRuntimeOperationMetadata> + upgradeNotebookRuntimeOperationSettings() { + return ((NotebookServiceStubSettings) getStubSettings()) + .upgradeNotebookRuntimeOperationSettings(); + } + + /** Returns the object with the settings used for calls to startNotebookRuntime. */ + public UnaryCallSettings startNotebookRuntimeSettings() { + return ((NotebookServiceStubSettings) getStubSettings()).startNotebookRuntimeSettings(); + } + + /** Returns the object with the settings used for calls to startNotebookRuntime. */ + public OperationCallSettings< + StartNotebookRuntimeRequest, + StartNotebookRuntimeResponse, + StartNotebookRuntimeOperationMetadata> + startNotebookRuntimeOperationSettings() { + return ((NotebookServiceStubSettings) getStubSettings()) + .startNotebookRuntimeOperationSettings(); + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return ((NotebookServiceStubSettings) getStubSettings()).listLocationsSettings(); + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return ((NotebookServiceStubSettings) getStubSettings()).getLocationSettings(); + } + + /** Returns the object with the settings used for calls to setIamPolicy. */ + public UnaryCallSettings setIamPolicySettings() { + return ((NotebookServiceStubSettings) getStubSettings()).setIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to getIamPolicy. */ + public UnaryCallSettings getIamPolicySettings() { + return ((NotebookServiceStubSettings) getStubSettings()).getIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to testIamPermissions. */ + public UnaryCallSettings + testIamPermissionsSettings() { + return ((NotebookServiceStubSettings) getStubSettings()).testIamPermissionsSettings(); + } + + public static final NotebookServiceSettings create(NotebookServiceStubSettings stub) + throws IOException { + return new NotebookServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return NotebookServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return NotebookServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return NotebookServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return NotebookServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return NotebookServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return NotebookServiceStubSettings.defaultTransportChannelProvider(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return NotebookServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected NotebookServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for NotebookServiceSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(NotebookServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(NotebookServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(NotebookServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(NotebookServiceStubSettings.newBuilder()); + } + + public NotebookServiceStubSettings.Builder getStubSettingsBuilder() { + return ((NotebookServiceStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to createNotebookRuntimeTemplate. */ + public UnaryCallSettings.Builder + createNotebookRuntimeTemplateSettings() { + return getStubSettingsBuilder().createNotebookRuntimeTemplateSettings(); + } + + /** Returns the builder for the settings used for calls to createNotebookRuntimeTemplate. */ + public OperationCallSettings.Builder< + CreateNotebookRuntimeTemplateRequest, + NotebookRuntimeTemplate, + CreateNotebookRuntimeTemplateOperationMetadata> + createNotebookRuntimeTemplateOperationSettings() { + return getStubSettingsBuilder().createNotebookRuntimeTemplateOperationSettings(); + } + + /** Returns the builder for the settings used for calls to getNotebookRuntimeTemplate. */ + public UnaryCallSettings.Builder + getNotebookRuntimeTemplateSettings() { + return getStubSettingsBuilder().getNotebookRuntimeTemplateSettings(); + } + + /** Returns the builder for the settings used for calls to listNotebookRuntimeTemplates. */ + public PagedCallSettings.Builder< + ListNotebookRuntimeTemplatesRequest, + ListNotebookRuntimeTemplatesResponse, + ListNotebookRuntimeTemplatesPagedResponse> + listNotebookRuntimeTemplatesSettings() { + return getStubSettingsBuilder().listNotebookRuntimeTemplatesSettings(); + } + + /** Returns the builder for the settings used for calls to deleteNotebookRuntimeTemplate. */ + public UnaryCallSettings.Builder + deleteNotebookRuntimeTemplateSettings() { + return getStubSettingsBuilder().deleteNotebookRuntimeTemplateSettings(); + } + + /** Returns the builder for the settings used for calls to deleteNotebookRuntimeTemplate. */ + public OperationCallSettings.Builder< + DeleteNotebookRuntimeTemplateRequest, Empty, DeleteOperationMetadata> + deleteNotebookRuntimeTemplateOperationSettings() { + return getStubSettingsBuilder().deleteNotebookRuntimeTemplateOperationSettings(); + } + + /** Returns the builder for the settings used for calls to assignNotebookRuntime. */ + public UnaryCallSettings.Builder + assignNotebookRuntimeSettings() { + return getStubSettingsBuilder().assignNotebookRuntimeSettings(); + } + + /** Returns the builder for the settings used for calls to assignNotebookRuntime. */ + public OperationCallSettings.Builder< + AssignNotebookRuntimeRequest, NotebookRuntime, AssignNotebookRuntimeOperationMetadata> + assignNotebookRuntimeOperationSettings() { + return getStubSettingsBuilder().assignNotebookRuntimeOperationSettings(); + } + + /** Returns the builder for the settings used for calls to getNotebookRuntime. */ + public UnaryCallSettings.Builder + getNotebookRuntimeSettings() { + return getStubSettingsBuilder().getNotebookRuntimeSettings(); + } + + /** Returns the builder for the settings used for calls to listNotebookRuntimes. */ + public PagedCallSettings.Builder< + ListNotebookRuntimesRequest, + ListNotebookRuntimesResponse, + ListNotebookRuntimesPagedResponse> + listNotebookRuntimesSettings() { + return getStubSettingsBuilder().listNotebookRuntimesSettings(); + } + + /** Returns the builder for the settings used for calls to deleteNotebookRuntime. */ + public UnaryCallSettings.Builder + deleteNotebookRuntimeSettings() { + return getStubSettingsBuilder().deleteNotebookRuntimeSettings(); + } + + /** Returns the builder for the settings used for calls to deleteNotebookRuntime. */ + public OperationCallSettings.Builder< + DeleteNotebookRuntimeRequest, Empty, DeleteOperationMetadata> + deleteNotebookRuntimeOperationSettings() { + return getStubSettingsBuilder().deleteNotebookRuntimeOperationSettings(); + } + + /** Returns the builder for the settings used for calls to upgradeNotebookRuntime. */ + public UnaryCallSettings.Builder + upgradeNotebookRuntimeSettings() { + return getStubSettingsBuilder().upgradeNotebookRuntimeSettings(); + } + + /** Returns the builder for the settings used for calls to upgradeNotebookRuntime. */ + public OperationCallSettings.Builder< + UpgradeNotebookRuntimeRequest, + UpgradeNotebookRuntimeResponse, + UpgradeNotebookRuntimeOperationMetadata> + upgradeNotebookRuntimeOperationSettings() { + return getStubSettingsBuilder().upgradeNotebookRuntimeOperationSettings(); + } + + /** Returns the builder for the settings used for calls to startNotebookRuntime. */ + public UnaryCallSettings.Builder + startNotebookRuntimeSettings() { + return getStubSettingsBuilder().startNotebookRuntimeSettings(); + } + + /** Returns the builder for the settings used for calls to startNotebookRuntime. */ + public OperationCallSettings.Builder< + StartNotebookRuntimeRequest, + StartNotebookRuntimeResponse, + StartNotebookRuntimeOperationMetadata> + startNotebookRuntimeOperationSettings() { + return getStubSettingsBuilder().startNotebookRuntimeOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return getStubSettingsBuilder().listLocationsSettings(); + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getStubSettingsBuilder().getLocationSettings(); + } + + /** Returns the builder for the settings used for calls to setIamPolicy. */ + public UnaryCallSettings.Builder setIamPolicySettings() { + return getStubSettingsBuilder().setIamPolicySettings(); + } + + /** Returns the builder for the settings used for calls to getIamPolicy. */ + public UnaryCallSettings.Builder getIamPolicySettings() { + return getStubSettingsBuilder().getIamPolicySettings(); + } + + /** Returns the builder for the settings used for calls to testIamPermissions. */ + public UnaryCallSettings.Builder + testIamPermissionsSettings() { + return getStubSettingsBuilder().testIamPermissionsSettings(); + } + + @Override + public NotebookServiceSettings build() throws IOException { + return new NotebookServiceSettings(this); + } + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/PersistentResourceServiceClient.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/PersistentResourceServiceClient.java index cd2c570e1c4d..1762a1902172 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/PersistentResourceServiceClient.java +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/PersistentResourceServiceClient.java @@ -179,6 +179,26 @@ * * * + *

RebootPersistentResource + *

Reboots a PersistentResource. + * + *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • rebootPersistentResourceAsync(RebootPersistentResourceRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • rebootPersistentResourceAsync(PersistentResourceName name) + *

  • rebootPersistentResourceAsync(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • rebootPersistentResourceOperationCallable() + *

  • rebootPersistentResourceCallable() + *

+ * + * + * *

ListLocations *

Lists information about the supported locations for this service. * @@ -1155,6 +1175,174 @@ public final OperationFuture deletePersistentRes return stub.updatePersistentResourceCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Reboots a PersistentResource. + * + *

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 (PersistentResourceServiceClient persistentResourceServiceClient =
+   *     PersistentResourceServiceClient.create()) {
+   *   PersistentResourceName name =
+   *       PersistentResourceName.of("[PROJECT]", "[LOCATION]", "[PERSISTENT_RESOURCE]");
+   *   PersistentResource response =
+   *       persistentResourceServiceClient.rebootPersistentResourceAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the PersistentResource resource. Format: + * `projects/{project_id_or_number}/locations/{location_id}/persistentResources/{persistent_resource_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + rebootPersistentResourceAsync(PersistentResourceName name) { + RebootPersistentResourceRequest request = + RebootPersistentResourceRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return rebootPersistentResourceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Reboots a PersistentResource. + * + *

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 (PersistentResourceServiceClient persistentResourceServiceClient =
+   *     PersistentResourceServiceClient.create()) {
+   *   String name =
+   *       PersistentResourceName.of("[PROJECT]", "[LOCATION]", "[PERSISTENT_RESOURCE]").toString();
+   *   PersistentResource response =
+   *       persistentResourceServiceClient.rebootPersistentResourceAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the PersistentResource resource. Format: + * `projects/{project_id_or_number}/locations/{location_id}/persistentResources/{persistent_resource_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + rebootPersistentResourceAsync(String name) { + RebootPersistentResourceRequest request = + RebootPersistentResourceRequest.newBuilder().setName(name).build(); + return rebootPersistentResourceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Reboots a PersistentResource. + * + *

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 (PersistentResourceServiceClient persistentResourceServiceClient =
+   *     PersistentResourceServiceClient.create()) {
+   *   RebootPersistentResourceRequest request =
+   *       RebootPersistentResourceRequest.newBuilder()
+   *           .setName(
+   *               PersistentResourceName.of("[PROJECT]", "[LOCATION]", "[PERSISTENT_RESOURCE]")
+   *                   .toString())
+   *           .build();
+   *   PersistentResource response =
+   *       persistentResourceServiceClient.rebootPersistentResourceAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + rebootPersistentResourceAsync(RebootPersistentResourceRequest request) { + return rebootPersistentResourceOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Reboots a PersistentResource. + * + *

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 (PersistentResourceServiceClient persistentResourceServiceClient =
+   *     PersistentResourceServiceClient.create()) {
+   *   RebootPersistentResourceRequest request =
+   *       RebootPersistentResourceRequest.newBuilder()
+   *           .setName(
+   *               PersistentResourceName.of("[PROJECT]", "[LOCATION]", "[PERSISTENT_RESOURCE]")
+   *                   .toString())
+   *           .build();
+   *   OperationFuture future =
+   *       persistentResourceServiceClient
+   *           .rebootPersistentResourceOperationCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   PersistentResource response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + RebootPersistentResourceRequest, + PersistentResource, + RebootPersistentResourceOperationMetadata> + rebootPersistentResourceOperationCallable() { + return stub.rebootPersistentResourceOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Reboots a PersistentResource. + * + *

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 (PersistentResourceServiceClient persistentResourceServiceClient =
+   *     PersistentResourceServiceClient.create()) {
+   *   RebootPersistentResourceRequest request =
+   *       RebootPersistentResourceRequest.newBuilder()
+   *           .setName(
+   *               PersistentResourceName.of("[PROJECT]", "[LOCATION]", "[PERSISTENT_RESOURCE]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       persistentResourceServiceClient.rebootPersistentResourceCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + rebootPersistentResourceCallable() { + return stub.rebootPersistentResourceCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists information about the supported locations for this service. diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/PersistentResourceServiceSettings.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/PersistentResourceServiceSettings.java index ae26aa74efed..0a0dff63829c 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/PersistentResourceServiceSettings.java +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/PersistentResourceServiceSettings.java @@ -155,6 +155,23 @@ public class PersistentResourceServiceSettings .updatePersistentResourceOperationSettings(); } + /** Returns the object with the settings used for calls to rebootPersistentResource. */ + public UnaryCallSettings + rebootPersistentResourceSettings() { + return ((PersistentResourceServiceStubSettings) getStubSettings()) + .rebootPersistentResourceSettings(); + } + + /** Returns the object with the settings used for calls to rebootPersistentResource. */ + public OperationCallSettings< + RebootPersistentResourceRequest, + PersistentResource, + RebootPersistentResourceOperationMetadata> + rebootPersistentResourceOperationSettings() { + return ((PersistentResourceServiceStubSettings) getStubSettings()) + .rebootPersistentResourceOperationSettings(); + } + /** Returns the object with the settings used for calls to listLocations. */ public PagedCallSettings listLocationsSettings() { @@ -337,6 +354,21 @@ public Builder applyToAllUnaryMethods( return getStubSettingsBuilder().updatePersistentResourceOperationSettings(); } + /** Returns the builder for the settings used for calls to rebootPersistentResource. */ + public UnaryCallSettings.Builder + rebootPersistentResourceSettings() { + return getStubSettingsBuilder().rebootPersistentResourceSettings(); + } + + /** Returns the builder for the settings used for calls to rebootPersistentResource. */ + public OperationCallSettings.Builder< + RebootPersistentResourceRequest, + PersistentResource, + RebootPersistentResourceOperationMetadata> + rebootPersistentResourceOperationSettings() { + return getStubSettingsBuilder().rebootPersistentResourceOperationSettings(); + } + /** Returns the builder for the settings used for calls to listLocations. */ public PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/PredictionServiceClient.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/PredictionServiceClient.java index 6d45592aa68a..54427662f314 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/PredictionServiceClient.java +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/PredictionServiceClient.java @@ -270,6 +270,16 @@ * * * + *

ChatCompletions + *

Exposes an OpenAI-compatible endpoint for chat completions. + * + *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • chatCompletionsCallable() + *

+ * + * + * *

ListLocations *

Lists information about the supported locations for this service. * @@ -1516,6 +1526,7 @@ public final GenerateContentResponse generateContent(String model, List * GenerateContentRequest.newBuilder() * .setModel("model104069929") * .addAllContents(new ArrayList()) + * .setSystemInstruction(Content.newBuilder().build()) * .addAllTools(new ArrayList()) * .setToolConfig(ToolConfig.newBuilder().build()) * .addAllSafetySettings(new ArrayList()) @@ -1549,6 +1560,7 @@ public final GenerateContentResponse generateContent(GenerateContentRequest requ * GenerateContentRequest.newBuilder() * .setModel("model104069929") * .addAllContents(new ArrayList()) + * .setSystemInstruction(Content.newBuilder().build()) * .addAllTools(new ArrayList()) * .setToolConfig(ToolConfig.newBuilder().build()) * .addAllSafetySettings(new ArrayList()) @@ -1583,6 +1595,7 @@ public final GenerateContentResponse generateContent(GenerateContentRequest requ * GenerateContentRequest.newBuilder() * .setModel("model104069929") * .addAllContents(new ArrayList()) + * .setSystemInstruction(Content.newBuilder().build()) * .addAllTools(new ArrayList()) * .setToolConfig(ToolConfig.newBuilder().build()) * .addAllSafetySettings(new ArrayList()) @@ -1601,6 +1614,39 @@ public final GenerateContentResponse generateContent(GenerateContentRequest requ return stub.streamGenerateContentCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Exposes an OpenAI-compatible endpoint for chat completions. + * + *

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 (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
+   *   ChatCompletionsRequest request =
+   *       ChatCompletionsRequest.newBuilder()
+   *           .setEndpoint(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .setHttpBody(HttpBody.newBuilder().build())
+   *           .build();
+   *   ServerStream stream =
+   *       predictionServiceClient.chatCompletionsCallable().call(request);
+   *   for (HttpBody response : stream) {
+   *     // Do something when a response is received.
+   *   }
+   * }
+   * }
+ */ + public final ServerStreamingCallable chatCompletionsCallable() { + return stub.chatCompletionsCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists information about the supported locations for this service. diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/PredictionServiceSettings.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/PredictionServiceSettings.java index 1ff8ee1b12cd..c4ec8956e7dc 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/PredictionServiceSettings.java +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/PredictionServiceSettings.java @@ -160,6 +160,11 @@ public UnaryCallSettings countTokensSet return ((PredictionServiceStubSettings) getStubSettings()).streamGenerateContentSettings(); } + /** Returns the object with the settings used for calls to chatCompletions. */ + public ServerStreamingCallSettings chatCompletionsSettings() { + return ((PredictionServiceStubSettings) getStubSettings()).chatCompletionsSettings(); + } + /** Returns the object with the settings used for calls to listLocations. */ public PagedCallSettings listLocationsSettings() { @@ -359,6 +364,12 @@ public UnaryCallSettings.Builder explainSetting return getStubSettingsBuilder().streamGenerateContentSettings(); } + /** Returns the builder for the settings used for calls to chatCompletions. */ + public ServerStreamingCallSettings.Builder + chatCompletionsSettings() { + return getStubSettingsBuilder().chatCompletionsSettings(); + } + /** Returns the builder for the settings used for calls to listLocations. */ public PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/VertexRagDataServiceClient.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/VertexRagDataServiceClient.java new file mode 100644 index 000000000000..f83c18237c0b --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/VertexRagDataServiceClient.java @@ -0,0 +1,2425 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.aiplatform.v1beta1.stub.VertexRagDataServiceStub; +import com.google.cloud.aiplatform.v1beta1.stub.VertexRagDataServiceStubSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.longrunning.OperationsClient; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: A service for managing user data for RAG. + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

{@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 (VertexRagDataServiceClient vertexRagDataServiceClient =
+ *     VertexRagDataServiceClient.create()) {
+ *   RagCorpusName name = RagCorpusName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]");
+ *   RagCorpus response = vertexRagDataServiceClient.getRagCorpus(name);
+ * }
+ * }
+ * + *

Note: close() needs to be called on the VertexRagDataServiceClient object to clean up + * resources such as threads. In the example above, try-with-resources is used, which automatically + * calls close(). + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Methods
MethodDescriptionMethod Variants

CreateRagCorpus

Creates a RagCorpus.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createRagCorpusAsync(CreateRagCorpusRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • createRagCorpusAsync(LocationName parent, RagCorpus ragCorpus) + *

  • createRagCorpusAsync(String parent, RagCorpus ragCorpus) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createRagCorpusOperationCallable() + *

  • createRagCorpusCallable() + *

+ *

GetRagCorpus

Gets a RagCorpus.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getRagCorpus(GetRagCorpusRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getRagCorpus(RagCorpusName name) + *

  • getRagCorpus(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getRagCorpusCallable() + *

+ *

ListRagCorpora

Lists RagCorpora in a Location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listRagCorpora(ListRagCorporaRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listRagCorpora(LocationName parent) + *

  • listRagCorpora(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listRagCorporaPagedCallable() + *

  • listRagCorporaCallable() + *

+ *

DeleteRagCorpus

Deletes a RagCorpus.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteRagCorpusAsync(DeleteRagCorpusRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • deleteRagCorpusAsync(RagCorpusName name) + *

  • deleteRagCorpusAsync(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteRagCorpusOperationCallable() + *

  • deleteRagCorpusCallable() + *

+ *

UploadRagFile

Upload a file into a RagCorpus.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • uploadRagFile(UploadRagFileRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • uploadRagFile(RagCorpusName parent, RagFile ragFile, UploadRagFileConfig uploadRagFileConfig) + *

  • uploadRagFile(String parent, RagFile ragFile, UploadRagFileConfig uploadRagFileConfig) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • uploadRagFileCallable() + *

+ *

ImportRagFiles

Import files from Google Cloud Storage or Google Drive into a RagCorpus.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • importRagFilesAsync(ImportRagFilesRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • importRagFilesAsync(RagCorpusName parent, ImportRagFilesConfig importRagFilesConfig) + *

  • importRagFilesAsync(String parent, ImportRagFilesConfig importRagFilesConfig) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • importRagFilesOperationCallable() + *

  • importRagFilesCallable() + *

+ *

GetRagFile

Gets a RagFile.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getRagFile(GetRagFileRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getRagFile(RagFileName name) + *

  • getRagFile(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getRagFileCallable() + *

+ *

ListRagFiles

Lists RagFiles in a RagCorpus.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listRagFiles(ListRagFilesRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listRagFiles(RagCorpusName parent) + *

  • listRagFiles(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listRagFilesPagedCallable() + *

  • listRagFilesCallable() + *

+ *

DeleteRagFile

Deletes a RagFile.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteRagFileAsync(DeleteRagFileRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • deleteRagFileAsync(RagFileName name) + *

  • deleteRagFileAsync(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteRagFileOperationCallable() + *

  • deleteRagFileCallable() + *

+ *

ListLocations

Lists information about the supported locations for this service.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listLocations(ListLocationsRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listLocationsPagedCallable() + *

  • listLocationsCallable() + *

+ *

GetLocation

Gets information about a location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getLocation(GetLocationRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getLocationCallable() + *

+ *

SetIamPolicy

Sets the access control policy on the specified resource. Replacesany existing policy. + *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • setIamPolicy(SetIamPolicyRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • setIamPolicyCallable() + *

+ *

GetIamPolicy

Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getIamPolicy(GetIamPolicyRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getIamPolicyCallable() + *

+ *

TestIamPermissions

Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a `NOT_FOUND` error. + *

Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • testIamPermissions(TestIamPermissionsRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • testIamPermissionsCallable() + *

+ *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of VertexRagDataServiceSettings + * to create(). For example: + * + *

To customize credentials: + * + *

{@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
+ * VertexRagDataServiceSettings vertexRagDataServiceSettings =
+ *     VertexRagDataServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * VertexRagDataServiceClient vertexRagDataServiceClient =
+ *     VertexRagDataServiceClient.create(vertexRagDataServiceSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@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
+ * VertexRagDataServiceSettings vertexRagDataServiceSettings =
+ *     VertexRagDataServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * VertexRagDataServiceClient vertexRagDataServiceClient =
+ *     VertexRagDataServiceClient.create(vertexRagDataServiceSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class VertexRagDataServiceClient implements BackgroundResource { + private final VertexRagDataServiceSettings settings; + private final VertexRagDataServiceStub stub; + private final OperationsClient operationsClient; + + /** Constructs an instance of VertexRagDataServiceClient with default settings. */ + public static final VertexRagDataServiceClient create() throws IOException { + return create(VertexRagDataServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of VertexRagDataServiceClient, using the given settings. The channels + * are created based on the settings passed in, or defaults for any settings that are not set. + */ + public static final VertexRagDataServiceClient create(VertexRagDataServiceSettings settings) + throws IOException { + return new VertexRagDataServiceClient(settings); + } + + /** + * Constructs an instance of VertexRagDataServiceClient, using the given stub for making calls. + * This is for advanced usage - prefer using create(VertexRagDataServiceSettings). + */ + public static final VertexRagDataServiceClient create(VertexRagDataServiceStub stub) { + return new VertexRagDataServiceClient(stub); + } + + /** + * Constructs an instance of VertexRagDataServiceClient, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected VertexRagDataServiceClient(VertexRagDataServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((VertexRagDataServiceStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + protected VertexRagDataServiceClient(VertexRagDataServiceStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + public final VertexRagDataServiceSettings getSettings() { + return settings; + } + + public VertexRagDataServiceStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final OperationsClient getOperationsClient() { + return operationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a RagCorpus. + * + *

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 (VertexRagDataServiceClient vertexRagDataServiceClient =
+   *     VertexRagDataServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   RagCorpus ragCorpus = RagCorpus.newBuilder().build();
+   *   RagCorpus response = vertexRagDataServiceClient.createRagCorpusAsync(parent, ragCorpus).get();
+   * }
+   * }
+ * + * @param parent Required. The resource name of the Location to create the RagCorpus in. Format: + * `projects/{project}/locations/{location}` + * @param ragCorpus Required. The RagCorpus to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createRagCorpusAsync( + LocationName parent, RagCorpus ragCorpus) { + CreateRagCorpusRequest request = + CreateRagCorpusRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setRagCorpus(ragCorpus) + .build(); + return createRagCorpusAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a RagCorpus. + * + *

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 (VertexRagDataServiceClient vertexRagDataServiceClient =
+   *     VertexRagDataServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   RagCorpus ragCorpus = RagCorpus.newBuilder().build();
+   *   RagCorpus response = vertexRagDataServiceClient.createRagCorpusAsync(parent, ragCorpus).get();
+   * }
+   * }
+ * + * @param parent Required. The resource name of the Location to create the RagCorpus in. Format: + * `projects/{project}/locations/{location}` + * @param ragCorpus Required. The RagCorpus to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createRagCorpusAsync( + String parent, RagCorpus ragCorpus) { + CreateRagCorpusRequest request = + CreateRagCorpusRequest.newBuilder().setParent(parent).setRagCorpus(ragCorpus).build(); + return createRagCorpusAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a RagCorpus. + * + *

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 (VertexRagDataServiceClient vertexRagDataServiceClient =
+   *     VertexRagDataServiceClient.create()) {
+   *   CreateRagCorpusRequest request =
+   *       CreateRagCorpusRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setRagCorpus(RagCorpus.newBuilder().build())
+   *           .build();
+   *   RagCorpus response = vertexRagDataServiceClient.createRagCorpusAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createRagCorpusAsync( + CreateRagCorpusRequest request) { + return createRagCorpusOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a RagCorpus. + * + *

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 (VertexRagDataServiceClient vertexRagDataServiceClient =
+   *     VertexRagDataServiceClient.create()) {
+   *   CreateRagCorpusRequest request =
+   *       CreateRagCorpusRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setRagCorpus(RagCorpus.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       vertexRagDataServiceClient.createRagCorpusOperationCallable().futureCall(request);
+   *   // Do something.
+   *   RagCorpus response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + CreateRagCorpusRequest, RagCorpus, CreateRagCorpusOperationMetadata> + createRagCorpusOperationCallable() { + return stub.createRagCorpusOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a RagCorpus. + * + *

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 (VertexRagDataServiceClient vertexRagDataServiceClient =
+   *     VertexRagDataServiceClient.create()) {
+   *   CreateRagCorpusRequest request =
+   *       CreateRagCorpusRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setRagCorpus(RagCorpus.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       vertexRagDataServiceClient.createRagCorpusCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createRagCorpusCallable() { + return stub.createRagCorpusCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a RagCorpus. + * + *

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 (VertexRagDataServiceClient vertexRagDataServiceClient =
+   *     VertexRagDataServiceClient.create()) {
+   *   RagCorpusName name = RagCorpusName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]");
+   *   RagCorpus response = vertexRagDataServiceClient.getRagCorpus(name);
+   * }
+   * }
+ * + * @param name Required. The name of the RagCorpus resource. Format: + * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final RagCorpus getRagCorpus(RagCorpusName name) { + GetRagCorpusRequest request = + GetRagCorpusRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getRagCorpus(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a RagCorpus. + * + *

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 (VertexRagDataServiceClient vertexRagDataServiceClient =
+   *     VertexRagDataServiceClient.create()) {
+   *   String name = RagCorpusName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]").toString();
+   *   RagCorpus response = vertexRagDataServiceClient.getRagCorpus(name);
+   * }
+   * }
+ * + * @param name Required. The name of the RagCorpus resource. Format: + * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final RagCorpus getRagCorpus(String name) { + GetRagCorpusRequest request = GetRagCorpusRequest.newBuilder().setName(name).build(); + return getRagCorpus(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a RagCorpus. + * + *

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 (VertexRagDataServiceClient vertexRagDataServiceClient =
+   *     VertexRagDataServiceClient.create()) {
+   *   GetRagCorpusRequest request =
+   *       GetRagCorpusRequest.newBuilder()
+   *           .setName(RagCorpusName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]").toString())
+   *           .build();
+   *   RagCorpus response = vertexRagDataServiceClient.getRagCorpus(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final RagCorpus getRagCorpus(GetRagCorpusRequest request) { + return getRagCorpusCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a RagCorpus. + * + *

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 (VertexRagDataServiceClient vertexRagDataServiceClient =
+   *     VertexRagDataServiceClient.create()) {
+   *   GetRagCorpusRequest request =
+   *       GetRagCorpusRequest.newBuilder()
+   *           .setName(RagCorpusName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       vertexRagDataServiceClient.getRagCorpusCallable().futureCall(request);
+   *   // Do something.
+   *   RagCorpus response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getRagCorpusCallable() { + return stub.getRagCorpusCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists RagCorpora in a Location. + * + *

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 (VertexRagDataServiceClient vertexRagDataServiceClient =
+   *     VertexRagDataServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (RagCorpus element : vertexRagDataServiceClient.listRagCorpora(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The resource name of the Location from which to list the RagCorpora. + * Format: `projects/{project}/locations/{location}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListRagCorporaPagedResponse listRagCorpora(LocationName parent) { + ListRagCorporaRequest request = + ListRagCorporaRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listRagCorpora(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists RagCorpora in a Location. + * + *

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 (VertexRagDataServiceClient vertexRagDataServiceClient =
+   *     VertexRagDataServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (RagCorpus element : vertexRagDataServiceClient.listRagCorpora(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The resource name of the Location from which to list the RagCorpora. + * Format: `projects/{project}/locations/{location}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListRagCorporaPagedResponse listRagCorpora(String parent) { + ListRagCorporaRequest request = ListRagCorporaRequest.newBuilder().setParent(parent).build(); + return listRagCorpora(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists RagCorpora in a Location. + * + *

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 (VertexRagDataServiceClient vertexRagDataServiceClient =
+   *     VertexRagDataServiceClient.create()) {
+   *   ListRagCorporaRequest request =
+   *       ListRagCorporaRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (RagCorpus element : vertexRagDataServiceClient.listRagCorpora(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListRagCorporaPagedResponse listRagCorpora(ListRagCorporaRequest request) { + return listRagCorporaPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists RagCorpora in a Location. + * + *

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 (VertexRagDataServiceClient vertexRagDataServiceClient =
+   *     VertexRagDataServiceClient.create()) {
+   *   ListRagCorporaRequest request =
+   *       ListRagCorporaRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       vertexRagDataServiceClient.listRagCorporaPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (RagCorpus element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listRagCorporaPagedCallable() { + return stub.listRagCorporaPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists RagCorpora in a Location. + * + *

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 (VertexRagDataServiceClient vertexRagDataServiceClient =
+   *     VertexRagDataServiceClient.create()) {
+   *   ListRagCorporaRequest request =
+   *       ListRagCorporaRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListRagCorporaResponse response =
+   *         vertexRagDataServiceClient.listRagCorporaCallable().call(request);
+   *     for (RagCorpus element : response.getRagCorporaList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listRagCorporaCallable() { + return stub.listRagCorporaCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a RagCorpus. + * + *

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 (VertexRagDataServiceClient vertexRagDataServiceClient =
+   *     VertexRagDataServiceClient.create()) {
+   *   RagCorpusName name = RagCorpusName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]");
+   *   vertexRagDataServiceClient.deleteRagCorpusAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the RagCorpus resource to be deleted. Format: + * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteRagCorpusAsync( + RagCorpusName name) { + DeleteRagCorpusRequest request = + DeleteRagCorpusRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return deleteRagCorpusAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a RagCorpus. + * + *

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 (VertexRagDataServiceClient vertexRagDataServiceClient =
+   *     VertexRagDataServiceClient.create()) {
+   *   String name = RagCorpusName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]").toString();
+   *   vertexRagDataServiceClient.deleteRagCorpusAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the RagCorpus resource to be deleted. Format: + * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteRagCorpusAsync(String name) { + DeleteRagCorpusRequest request = DeleteRagCorpusRequest.newBuilder().setName(name).build(); + return deleteRagCorpusAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a RagCorpus. + * + *

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 (VertexRagDataServiceClient vertexRagDataServiceClient =
+   *     VertexRagDataServiceClient.create()) {
+   *   DeleteRagCorpusRequest request =
+   *       DeleteRagCorpusRequest.newBuilder()
+   *           .setName(RagCorpusName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]").toString())
+   *           .setForce(true)
+   *           .build();
+   *   vertexRagDataServiceClient.deleteRagCorpusAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteRagCorpusAsync( + DeleteRagCorpusRequest request) { + return deleteRagCorpusOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a RagCorpus. + * + *

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 (VertexRagDataServiceClient vertexRagDataServiceClient =
+   *     VertexRagDataServiceClient.create()) {
+   *   DeleteRagCorpusRequest request =
+   *       DeleteRagCorpusRequest.newBuilder()
+   *           .setName(RagCorpusName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]").toString())
+   *           .setForce(true)
+   *           .build();
+   *   OperationFuture future =
+   *       vertexRagDataServiceClient.deleteRagCorpusOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteRagCorpusOperationCallable() { + return stub.deleteRagCorpusOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a RagCorpus. + * + *

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 (VertexRagDataServiceClient vertexRagDataServiceClient =
+   *     VertexRagDataServiceClient.create()) {
+   *   DeleteRagCorpusRequest request =
+   *       DeleteRagCorpusRequest.newBuilder()
+   *           .setName(RagCorpusName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]").toString())
+   *           .setForce(true)
+   *           .build();
+   *   ApiFuture future =
+   *       vertexRagDataServiceClient.deleteRagCorpusCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteRagCorpusCallable() { + return stub.deleteRagCorpusCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Upload a file into a RagCorpus. + * + *

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 (VertexRagDataServiceClient vertexRagDataServiceClient =
+   *     VertexRagDataServiceClient.create()) {
+   *   RagCorpusName parent = RagCorpusName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]");
+   *   RagFile ragFile = RagFile.newBuilder().build();
+   *   UploadRagFileConfig uploadRagFileConfig = UploadRagFileConfig.newBuilder().build();
+   *   UploadRagFileResponse response =
+   *       vertexRagDataServiceClient.uploadRagFile(parent, ragFile, uploadRagFileConfig);
+   * }
+   * }
+ * + * @param parent Required. The name of the RagCorpus resource into which to upload the file. + * Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` + * @param ragFile Required. The RagFile to upload. + * @param uploadRagFileConfig Required. The config for the RagFiles to be uploaded into the + * RagCorpus. + * [VertexRagDataService.UploadRagFile][google.cloud.aiplatform.v1beta1.VertexRagDataService.UploadRagFile]. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final UploadRagFileResponse uploadRagFile( + RagCorpusName parent, RagFile ragFile, UploadRagFileConfig uploadRagFileConfig) { + UploadRagFileRequest request = + UploadRagFileRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setRagFile(ragFile) + .setUploadRagFileConfig(uploadRagFileConfig) + .build(); + return uploadRagFile(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Upload a file into a RagCorpus. + * + *

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 (VertexRagDataServiceClient vertexRagDataServiceClient =
+   *     VertexRagDataServiceClient.create()) {
+   *   String parent = RagCorpusName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]").toString();
+   *   RagFile ragFile = RagFile.newBuilder().build();
+   *   UploadRagFileConfig uploadRagFileConfig = UploadRagFileConfig.newBuilder().build();
+   *   UploadRagFileResponse response =
+   *       vertexRagDataServiceClient.uploadRagFile(parent, ragFile, uploadRagFileConfig);
+   * }
+   * }
+ * + * @param parent Required. The name of the RagCorpus resource into which to upload the file. + * Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` + * @param ragFile Required. The RagFile to upload. + * @param uploadRagFileConfig Required. The config for the RagFiles to be uploaded into the + * RagCorpus. + * [VertexRagDataService.UploadRagFile][google.cloud.aiplatform.v1beta1.VertexRagDataService.UploadRagFile]. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final UploadRagFileResponse uploadRagFile( + String parent, RagFile ragFile, UploadRagFileConfig uploadRagFileConfig) { + UploadRagFileRequest request = + UploadRagFileRequest.newBuilder() + .setParent(parent) + .setRagFile(ragFile) + .setUploadRagFileConfig(uploadRagFileConfig) + .build(); + return uploadRagFile(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Upload a file into a RagCorpus. + * + *

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 (VertexRagDataServiceClient vertexRagDataServiceClient =
+   *     VertexRagDataServiceClient.create()) {
+   *   UploadRagFileRequest request =
+   *       UploadRagFileRequest.newBuilder()
+   *           .setParent(RagCorpusName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]").toString())
+   *           .setRagFile(RagFile.newBuilder().build())
+   *           .setUploadRagFileConfig(UploadRagFileConfig.newBuilder().build())
+   *           .build();
+   *   UploadRagFileResponse response = vertexRagDataServiceClient.uploadRagFile(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final UploadRagFileResponse uploadRagFile(UploadRagFileRequest request) { + return uploadRagFileCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Upload a file into a RagCorpus. + * + *

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 (VertexRagDataServiceClient vertexRagDataServiceClient =
+   *     VertexRagDataServiceClient.create()) {
+   *   UploadRagFileRequest request =
+   *       UploadRagFileRequest.newBuilder()
+   *           .setParent(RagCorpusName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]").toString())
+   *           .setRagFile(RagFile.newBuilder().build())
+   *           .setUploadRagFileConfig(UploadRagFileConfig.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       vertexRagDataServiceClient.uploadRagFileCallable().futureCall(request);
+   *   // Do something.
+   *   UploadRagFileResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable uploadRagFileCallable() { + return stub.uploadRagFileCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Import files from Google Cloud Storage or Google Drive into a RagCorpus. + * + *

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 (VertexRagDataServiceClient vertexRagDataServiceClient =
+   *     VertexRagDataServiceClient.create()) {
+   *   RagCorpusName parent = RagCorpusName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]");
+   *   ImportRagFilesConfig importRagFilesConfig = ImportRagFilesConfig.newBuilder().build();
+   *   ImportRagFilesResponse response =
+   *       vertexRagDataServiceClient.importRagFilesAsync(parent, importRagFilesConfig).get();
+   * }
+   * }
+ * + * @param parent Required. The name of the RagCorpus resource into which to import files. Format: + * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` + * @param importRagFilesConfig Required. The config for the RagFiles to be synced and imported + * into the RagCorpus. + * [VertexRagDataService.ImportRagFiles][google.cloud.aiplatform.v1beta1.VertexRagDataService.ImportRagFiles]. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + importRagFilesAsync(RagCorpusName parent, ImportRagFilesConfig importRagFilesConfig) { + ImportRagFilesRequest request = + ImportRagFilesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setImportRagFilesConfig(importRagFilesConfig) + .build(); + return importRagFilesAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Import files from Google Cloud Storage or Google Drive into a RagCorpus. + * + *

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 (VertexRagDataServiceClient vertexRagDataServiceClient =
+   *     VertexRagDataServiceClient.create()) {
+   *   String parent = RagCorpusName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]").toString();
+   *   ImportRagFilesConfig importRagFilesConfig = ImportRagFilesConfig.newBuilder().build();
+   *   ImportRagFilesResponse response =
+   *       vertexRagDataServiceClient.importRagFilesAsync(parent, importRagFilesConfig).get();
+   * }
+   * }
+ * + * @param parent Required. The name of the RagCorpus resource into which to import files. Format: + * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` + * @param importRagFilesConfig Required. The config for the RagFiles to be synced and imported + * into the RagCorpus. + * [VertexRagDataService.ImportRagFiles][google.cloud.aiplatform.v1beta1.VertexRagDataService.ImportRagFiles]. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + importRagFilesAsync(String parent, ImportRagFilesConfig importRagFilesConfig) { + ImportRagFilesRequest request = + ImportRagFilesRequest.newBuilder() + .setParent(parent) + .setImportRagFilesConfig(importRagFilesConfig) + .build(); + return importRagFilesAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Import files from Google Cloud Storage or Google Drive into a RagCorpus. + * + *

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 (VertexRagDataServiceClient vertexRagDataServiceClient =
+   *     VertexRagDataServiceClient.create()) {
+   *   ImportRagFilesRequest request =
+   *       ImportRagFilesRequest.newBuilder()
+   *           .setParent(RagCorpusName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]").toString())
+   *           .setImportRagFilesConfig(ImportRagFilesConfig.newBuilder().build())
+   *           .build();
+   *   ImportRagFilesResponse response =
+   *       vertexRagDataServiceClient.importRagFilesAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + importRagFilesAsync(ImportRagFilesRequest request) { + return importRagFilesOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Import files from Google Cloud Storage or Google Drive into a RagCorpus. + * + *

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 (VertexRagDataServiceClient vertexRagDataServiceClient =
+   *     VertexRagDataServiceClient.create()) {
+   *   ImportRagFilesRequest request =
+   *       ImportRagFilesRequest.newBuilder()
+   *           .setParent(RagCorpusName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]").toString())
+   *           .setImportRagFilesConfig(ImportRagFilesConfig.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       vertexRagDataServiceClient.importRagFilesOperationCallable().futureCall(request);
+   *   // Do something.
+   *   ImportRagFilesResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + ImportRagFilesRequest, ImportRagFilesResponse, ImportRagFilesOperationMetadata> + importRagFilesOperationCallable() { + return stub.importRagFilesOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Import files from Google Cloud Storage or Google Drive into a RagCorpus. + * + *

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 (VertexRagDataServiceClient vertexRagDataServiceClient =
+   *     VertexRagDataServiceClient.create()) {
+   *   ImportRagFilesRequest request =
+   *       ImportRagFilesRequest.newBuilder()
+   *           .setParent(RagCorpusName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]").toString())
+   *           .setImportRagFilesConfig(ImportRagFilesConfig.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       vertexRagDataServiceClient.importRagFilesCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable importRagFilesCallable() { + return stub.importRagFilesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a RagFile. + * + *

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 (VertexRagDataServiceClient vertexRagDataServiceClient =
+   *     VertexRagDataServiceClient.create()) {
+   *   RagFileName name = RagFileName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]", "[RAG_FILE]");
+   *   RagFile response = vertexRagDataServiceClient.getRagFile(name);
+   * }
+   * }
+ * + * @param name Required. The name of the RagFile resource. Format: + * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}/ragFiles/{rag_file}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final RagFile getRagFile(RagFileName name) { + GetRagFileRequest request = + GetRagFileRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getRagFile(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a RagFile. + * + *

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 (VertexRagDataServiceClient vertexRagDataServiceClient =
+   *     VertexRagDataServiceClient.create()) {
+   *   String name =
+   *       RagFileName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]", "[RAG_FILE]").toString();
+   *   RagFile response = vertexRagDataServiceClient.getRagFile(name);
+   * }
+   * }
+ * + * @param name Required. The name of the RagFile resource. Format: + * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}/ragFiles/{rag_file}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final RagFile getRagFile(String name) { + GetRagFileRequest request = GetRagFileRequest.newBuilder().setName(name).build(); + return getRagFile(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a RagFile. + * + *

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 (VertexRagDataServiceClient vertexRagDataServiceClient =
+   *     VertexRagDataServiceClient.create()) {
+   *   GetRagFileRequest request =
+   *       GetRagFileRequest.newBuilder()
+   *           .setName(
+   *               RagFileName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]", "[RAG_FILE]")
+   *                   .toString())
+   *           .build();
+   *   RagFile response = vertexRagDataServiceClient.getRagFile(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final RagFile getRagFile(GetRagFileRequest request) { + return getRagFileCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a RagFile. + * + *

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 (VertexRagDataServiceClient vertexRagDataServiceClient =
+   *     VertexRagDataServiceClient.create()) {
+   *   GetRagFileRequest request =
+   *       GetRagFileRequest.newBuilder()
+   *           .setName(
+   *               RagFileName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]", "[RAG_FILE]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       vertexRagDataServiceClient.getRagFileCallable().futureCall(request);
+   *   // Do something.
+   *   RagFile response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getRagFileCallable() { + return stub.getRagFileCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists RagFiles in a RagCorpus. + * + *

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 (VertexRagDataServiceClient vertexRagDataServiceClient =
+   *     VertexRagDataServiceClient.create()) {
+   *   RagCorpusName parent = RagCorpusName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]");
+   *   for (RagFile element : vertexRagDataServiceClient.listRagFiles(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The resource name of the RagCorpus from which to list the RagFiles. + * Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListRagFilesPagedResponse listRagFiles(RagCorpusName parent) { + ListRagFilesRequest request = + ListRagFilesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listRagFiles(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists RagFiles in a RagCorpus. + * + *

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 (VertexRagDataServiceClient vertexRagDataServiceClient =
+   *     VertexRagDataServiceClient.create()) {
+   *   String parent = RagCorpusName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]").toString();
+   *   for (RagFile element : vertexRagDataServiceClient.listRagFiles(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The resource name of the RagCorpus from which to list the RagFiles. + * Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListRagFilesPagedResponse listRagFiles(String parent) { + ListRagFilesRequest request = ListRagFilesRequest.newBuilder().setParent(parent).build(); + return listRagFiles(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists RagFiles in a RagCorpus. + * + *

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 (VertexRagDataServiceClient vertexRagDataServiceClient =
+   *     VertexRagDataServiceClient.create()) {
+   *   ListRagFilesRequest request =
+   *       ListRagFilesRequest.newBuilder()
+   *           .setParent(RagCorpusName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (RagFile element : vertexRagDataServiceClient.listRagFiles(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListRagFilesPagedResponse listRagFiles(ListRagFilesRequest request) { + return listRagFilesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists RagFiles in a RagCorpus. + * + *

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 (VertexRagDataServiceClient vertexRagDataServiceClient =
+   *     VertexRagDataServiceClient.create()) {
+   *   ListRagFilesRequest request =
+   *       ListRagFilesRequest.newBuilder()
+   *           .setParent(RagCorpusName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       vertexRagDataServiceClient.listRagFilesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (RagFile element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listRagFilesPagedCallable() { + return stub.listRagFilesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists RagFiles in a RagCorpus. + * + *

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 (VertexRagDataServiceClient vertexRagDataServiceClient =
+   *     VertexRagDataServiceClient.create()) {
+   *   ListRagFilesRequest request =
+   *       ListRagFilesRequest.newBuilder()
+   *           .setParent(RagCorpusName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListRagFilesResponse response =
+   *         vertexRagDataServiceClient.listRagFilesCallable().call(request);
+   *     for (RagFile element : response.getRagFilesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listRagFilesCallable() { + return stub.listRagFilesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a RagFile. + * + *

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 (VertexRagDataServiceClient vertexRagDataServiceClient =
+   *     VertexRagDataServiceClient.create()) {
+   *   RagFileName name = RagFileName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]", "[RAG_FILE]");
+   *   vertexRagDataServiceClient.deleteRagFileAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the RagFile resource to be deleted. Format: + * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}/ragFiles/{rag_file}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteRagFileAsync( + RagFileName name) { + DeleteRagFileRequest request = + DeleteRagFileRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return deleteRagFileAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a RagFile. + * + *

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 (VertexRagDataServiceClient vertexRagDataServiceClient =
+   *     VertexRagDataServiceClient.create()) {
+   *   String name =
+   *       RagFileName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]", "[RAG_FILE]").toString();
+   *   vertexRagDataServiceClient.deleteRagFileAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the RagFile resource to be deleted. Format: + * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}/ragFiles/{rag_file}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteRagFileAsync(String name) { + DeleteRagFileRequest request = DeleteRagFileRequest.newBuilder().setName(name).build(); + return deleteRagFileAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a RagFile. + * + *

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 (VertexRagDataServiceClient vertexRagDataServiceClient =
+   *     VertexRagDataServiceClient.create()) {
+   *   DeleteRagFileRequest request =
+   *       DeleteRagFileRequest.newBuilder()
+   *           .setName(
+   *               RagFileName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]", "[RAG_FILE]")
+   *                   .toString())
+   *           .build();
+   *   vertexRagDataServiceClient.deleteRagFileAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteRagFileAsync( + DeleteRagFileRequest request) { + return deleteRagFileOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a RagFile. + * + *

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 (VertexRagDataServiceClient vertexRagDataServiceClient =
+   *     VertexRagDataServiceClient.create()) {
+   *   DeleteRagFileRequest request =
+   *       DeleteRagFileRequest.newBuilder()
+   *           .setName(
+   *               RagFileName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]", "[RAG_FILE]")
+   *                   .toString())
+   *           .build();
+   *   OperationFuture future =
+   *       vertexRagDataServiceClient.deleteRagFileOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteRagFileOperationCallable() { + return stub.deleteRagFileOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a RagFile. + * + *

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 (VertexRagDataServiceClient vertexRagDataServiceClient =
+   *     VertexRagDataServiceClient.create()) {
+   *   DeleteRagFileRequest request =
+   *       DeleteRagFileRequest.newBuilder()
+   *           .setName(
+   *               RagFileName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]", "[RAG_FILE]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       vertexRagDataServiceClient.deleteRagFileCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteRagFileCallable() { + return stub.deleteRagFileCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

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 (VertexRagDataServiceClient vertexRagDataServiceClient =
+   *     VertexRagDataServiceClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Location element : vertexRagDataServiceClient.listLocations(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListLocationsPagedResponse listLocations(ListLocationsRequest request) { + return listLocationsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

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 (VertexRagDataServiceClient vertexRagDataServiceClient =
+   *     VertexRagDataServiceClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       vertexRagDataServiceClient.listLocationsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Location element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listLocationsPagedCallable() { + return stub.listLocationsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

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 (VertexRagDataServiceClient vertexRagDataServiceClient =
+   *     VertexRagDataServiceClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListLocationsResponse response =
+   *         vertexRagDataServiceClient.listLocationsCallable().call(request);
+   *     for (Location element : response.getLocationsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listLocationsCallable() { + return stub.listLocationsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

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 (VertexRagDataServiceClient vertexRagDataServiceClient =
+   *     VertexRagDataServiceClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   Location response = vertexRagDataServiceClient.getLocation(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Location getLocation(GetLocationRequest request) { + return getLocationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

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 (VertexRagDataServiceClient vertexRagDataServiceClient =
+   *     VertexRagDataServiceClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future =
+   *       vertexRagDataServiceClient.getLocationCallable().futureCall(request);
+   *   // Do something.
+   *   Location response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getLocationCallable() { + return stub.getLocationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the access control policy on the specified resource. Replacesany existing policy. + * + *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. + * + *

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 (VertexRagDataServiceClient vertexRagDataServiceClient =
+   *     VertexRagDataServiceClient.create()) {
+   *   SetIamPolicyRequest request =
+   *       SetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Policy response = vertexRagDataServiceClient.setIamPolicy(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Policy setIamPolicy(SetIamPolicyRequest request) { + return setIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the access control policy on the specified resource. Replacesany existing policy. + * + *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. + * + *

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 (VertexRagDataServiceClient vertexRagDataServiceClient =
+   *     VertexRagDataServiceClient.create()) {
+   *   SetIamPolicyRequest request =
+   *       SetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       vertexRagDataServiceClient.setIamPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Policy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable setIamPolicyCallable() { + return stub.setIamPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the access control policy for a resource. Returns an empty policyif the resource exists + * and does not have a policy set. + * + *

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 (VertexRagDataServiceClient vertexRagDataServiceClient =
+   *     VertexRagDataServiceClient.create()) {
+   *   GetIamPolicyRequest request =
+   *       GetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .setOptions(GetPolicyOptions.newBuilder().build())
+   *           .build();
+   *   Policy response = vertexRagDataServiceClient.getIamPolicy(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Policy getIamPolicy(GetIamPolicyRequest request) { + return getIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the access control policy for a resource. Returns an empty policyif the resource exists + * and does not have a policy set. + * + *

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 (VertexRagDataServiceClient vertexRagDataServiceClient =
+   *     VertexRagDataServiceClient.create()) {
+   *   GetIamPolicyRequest request =
+   *       GetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .setOptions(GetPolicyOptions.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       vertexRagDataServiceClient.getIamPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Policy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getIamPolicyCallable() { + return stub.getIamPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns permissions that a caller has on the specified resource. If theresource does not exist, + * this will return an empty set ofpermissions, not a `NOT_FOUND` error. + * + *

Note: This operation is designed to be used for buildingpermission-aware UIs and + * command-line tools, not for authorizationchecking. This operation may "fail open" without + * warning. + * + *

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 (VertexRagDataServiceClient vertexRagDataServiceClient =
+   *     VertexRagDataServiceClient.create()) {
+   *   TestIamPermissionsRequest request =
+   *       TestIamPermissionsRequest.newBuilder()
+   *           .setResource(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .addAllPermissions(new ArrayList())
+   *           .build();
+   *   TestIamPermissionsResponse response = vertexRagDataServiceClient.testIamPermissions(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) { + return testIamPermissionsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns permissions that a caller has on the specified resource. If theresource does not exist, + * this will return an empty set ofpermissions, not a `NOT_FOUND` error. + * + *

Note: This operation is designed to be used for buildingpermission-aware UIs and + * command-line tools, not for authorizationchecking. This operation may "fail open" without + * warning. + * + *

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 (VertexRagDataServiceClient vertexRagDataServiceClient =
+   *     VertexRagDataServiceClient.create()) {
+   *   TestIamPermissionsRequest request =
+   *       TestIamPermissionsRequest.newBuilder()
+   *           .setResource(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .addAllPermissions(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       vertexRagDataServiceClient.testIamPermissionsCallable().futureCall(request);
+   *   // Do something.
+   *   TestIamPermissionsResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + testIamPermissionsCallable() { + return stub.testIamPermissionsCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListRagCorporaPagedResponse + extends AbstractPagedListResponse< + ListRagCorporaRequest, + ListRagCorporaResponse, + RagCorpus, + ListRagCorporaPage, + ListRagCorporaFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListRagCorporaPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListRagCorporaPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListRagCorporaPagedResponse(ListRagCorporaPage page) { + super(page, ListRagCorporaFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListRagCorporaPage + extends AbstractPage< + ListRagCorporaRequest, ListRagCorporaResponse, RagCorpus, ListRagCorporaPage> { + + private ListRagCorporaPage( + PageContext context, + ListRagCorporaResponse response) { + super(context, response); + } + + private static ListRagCorporaPage createEmptyPage() { + return new ListRagCorporaPage(null, null); + } + + @Override + protected ListRagCorporaPage createPage( + PageContext context, + ListRagCorporaResponse response) { + return new ListRagCorporaPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListRagCorporaFixedSizeCollection + extends AbstractFixedSizeCollection< + ListRagCorporaRequest, + ListRagCorporaResponse, + RagCorpus, + ListRagCorporaPage, + ListRagCorporaFixedSizeCollection> { + + private ListRagCorporaFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListRagCorporaFixedSizeCollection createEmptyCollection() { + return new ListRagCorporaFixedSizeCollection(null, 0); + } + + @Override + protected ListRagCorporaFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListRagCorporaFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListRagFilesPagedResponse + extends AbstractPagedListResponse< + ListRagFilesRequest, + ListRagFilesResponse, + RagFile, + ListRagFilesPage, + ListRagFilesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListRagFilesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListRagFilesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListRagFilesPagedResponse(ListRagFilesPage page) { + super(page, ListRagFilesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListRagFilesPage + extends AbstractPage { + + private ListRagFilesPage( + PageContext context, + ListRagFilesResponse response) { + super(context, response); + } + + private static ListRagFilesPage createEmptyPage() { + return new ListRagFilesPage(null, null); + } + + @Override + protected ListRagFilesPage createPage( + PageContext context, + ListRagFilesResponse response) { + return new ListRagFilesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListRagFilesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListRagFilesRequest, + ListRagFilesResponse, + RagFile, + ListRagFilesPage, + ListRagFilesFixedSizeCollection> { + + private ListRagFilesFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListRagFilesFixedSizeCollection createEmptyCollection() { + return new ListRagFilesFixedSizeCollection(null, 0); + } + + @Override + protected ListRagFilesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListRagFilesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListLocationsPagedResponse + extends AbstractPagedListResponse< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListLocationsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListLocationsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListLocationsPagedResponse(ListLocationsPage page) { + super(page, ListLocationsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListLocationsPage + extends AbstractPage< + ListLocationsRequest, ListLocationsResponse, Location, ListLocationsPage> { + + private ListLocationsPage( + PageContext context, + ListLocationsResponse response) { + super(context, response); + } + + private static ListLocationsPage createEmptyPage() { + return new ListLocationsPage(null, null); + } + + @Override + protected ListLocationsPage createPage( + PageContext context, + ListLocationsResponse response) { + return new ListLocationsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListLocationsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + private ListLocationsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListLocationsFixedSizeCollection createEmptyCollection() { + return new ListLocationsFixedSizeCollection(null, 0); + } + + @Override + protected ListLocationsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListLocationsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/VertexRagDataServiceSettings.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/VertexRagDataServiceSettings.java new file mode 100644 index 000000000000..5af3cdd3ede3 --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/VertexRagDataServiceSettings.java @@ -0,0 +1,401 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1; + +import static com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceClient.ListLocationsPagedResponse; +import static com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceClient.ListRagCorporaPagedResponse; +import static com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceClient.ListRagFilesPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.aiplatform.v1beta1.stub.VertexRagDataServiceStubSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link VertexRagDataServiceClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (aiplatform.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of getRagCorpus to 30 seconds: + * + *

{@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
+ * VertexRagDataServiceSettings.Builder vertexRagDataServiceSettingsBuilder =
+ *     VertexRagDataServiceSettings.newBuilder();
+ * vertexRagDataServiceSettingsBuilder
+ *     .getRagCorpusSettings()
+ *     .setRetrySettings(
+ *         vertexRagDataServiceSettingsBuilder
+ *             .getRagCorpusSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * VertexRagDataServiceSettings vertexRagDataServiceSettings =
+ *     vertexRagDataServiceSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class VertexRagDataServiceSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to createRagCorpus. */ + public UnaryCallSettings createRagCorpusSettings() { + return ((VertexRagDataServiceStubSettings) getStubSettings()).createRagCorpusSettings(); + } + + /** Returns the object with the settings used for calls to createRagCorpus. */ + public OperationCallSettings + createRagCorpusOperationSettings() { + return ((VertexRagDataServiceStubSettings) getStubSettings()) + .createRagCorpusOperationSettings(); + } + + /** Returns the object with the settings used for calls to getRagCorpus. */ + public UnaryCallSettings getRagCorpusSettings() { + return ((VertexRagDataServiceStubSettings) getStubSettings()).getRagCorpusSettings(); + } + + /** Returns the object with the settings used for calls to listRagCorpora. */ + public PagedCallSettings< + ListRagCorporaRequest, ListRagCorporaResponse, ListRagCorporaPagedResponse> + listRagCorporaSettings() { + return ((VertexRagDataServiceStubSettings) getStubSettings()).listRagCorporaSettings(); + } + + /** Returns the object with the settings used for calls to deleteRagCorpus. */ + public UnaryCallSettings deleteRagCorpusSettings() { + return ((VertexRagDataServiceStubSettings) getStubSettings()).deleteRagCorpusSettings(); + } + + /** Returns the object with the settings used for calls to deleteRagCorpus. */ + public OperationCallSettings + deleteRagCorpusOperationSettings() { + return ((VertexRagDataServiceStubSettings) getStubSettings()) + .deleteRagCorpusOperationSettings(); + } + + /** Returns the object with the settings used for calls to uploadRagFile. */ + public UnaryCallSettings uploadRagFileSettings() { + return ((VertexRagDataServiceStubSettings) getStubSettings()).uploadRagFileSettings(); + } + + /** Returns the object with the settings used for calls to importRagFiles. */ + public UnaryCallSettings importRagFilesSettings() { + return ((VertexRagDataServiceStubSettings) getStubSettings()).importRagFilesSettings(); + } + + /** Returns the object with the settings used for calls to importRagFiles. */ + public OperationCallSettings< + ImportRagFilesRequest, ImportRagFilesResponse, ImportRagFilesOperationMetadata> + importRagFilesOperationSettings() { + return ((VertexRagDataServiceStubSettings) getStubSettings()).importRagFilesOperationSettings(); + } + + /** Returns the object with the settings used for calls to getRagFile. */ + public UnaryCallSettings getRagFileSettings() { + return ((VertexRagDataServiceStubSettings) getStubSettings()).getRagFileSettings(); + } + + /** Returns the object with the settings used for calls to listRagFiles. */ + public PagedCallSettings + listRagFilesSettings() { + return ((VertexRagDataServiceStubSettings) getStubSettings()).listRagFilesSettings(); + } + + /** Returns the object with the settings used for calls to deleteRagFile. */ + public UnaryCallSettings deleteRagFileSettings() { + return ((VertexRagDataServiceStubSettings) getStubSettings()).deleteRagFileSettings(); + } + + /** Returns the object with the settings used for calls to deleteRagFile. */ + public OperationCallSettings + deleteRagFileOperationSettings() { + return ((VertexRagDataServiceStubSettings) getStubSettings()).deleteRagFileOperationSettings(); + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return ((VertexRagDataServiceStubSettings) getStubSettings()).listLocationsSettings(); + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return ((VertexRagDataServiceStubSettings) getStubSettings()).getLocationSettings(); + } + + /** Returns the object with the settings used for calls to setIamPolicy. */ + public UnaryCallSettings setIamPolicySettings() { + return ((VertexRagDataServiceStubSettings) getStubSettings()).setIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to getIamPolicy. */ + public UnaryCallSettings getIamPolicySettings() { + return ((VertexRagDataServiceStubSettings) getStubSettings()).getIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to testIamPermissions. */ + public UnaryCallSettings + testIamPermissionsSettings() { + return ((VertexRagDataServiceStubSettings) getStubSettings()).testIamPermissionsSettings(); + } + + public static final VertexRagDataServiceSettings create(VertexRagDataServiceStubSettings stub) + throws IOException { + return new VertexRagDataServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return VertexRagDataServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return VertexRagDataServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return VertexRagDataServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return VertexRagDataServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return VertexRagDataServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return VertexRagDataServiceStubSettings.defaultTransportChannelProvider(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return VertexRagDataServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected VertexRagDataServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for VertexRagDataServiceSettings. */ + public static class Builder + extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(VertexRagDataServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(VertexRagDataServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(VertexRagDataServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(VertexRagDataServiceStubSettings.newBuilder()); + } + + public VertexRagDataServiceStubSettings.Builder getStubSettingsBuilder() { + return ((VertexRagDataServiceStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to createRagCorpus. */ + public UnaryCallSettings.Builder createRagCorpusSettings() { + return getStubSettingsBuilder().createRagCorpusSettings(); + } + + /** Returns the builder for the settings used for calls to createRagCorpus. */ + public OperationCallSettings.Builder< + CreateRagCorpusRequest, RagCorpus, CreateRagCorpusOperationMetadata> + createRagCorpusOperationSettings() { + return getStubSettingsBuilder().createRagCorpusOperationSettings(); + } + + /** Returns the builder for the settings used for calls to getRagCorpus. */ + public UnaryCallSettings.Builder getRagCorpusSettings() { + return getStubSettingsBuilder().getRagCorpusSettings(); + } + + /** Returns the builder for the settings used for calls to listRagCorpora. */ + public PagedCallSettings.Builder< + ListRagCorporaRequest, ListRagCorporaResponse, ListRagCorporaPagedResponse> + listRagCorporaSettings() { + return getStubSettingsBuilder().listRagCorporaSettings(); + } + + /** Returns the builder for the settings used for calls to deleteRagCorpus. */ + public UnaryCallSettings.Builder deleteRagCorpusSettings() { + return getStubSettingsBuilder().deleteRagCorpusSettings(); + } + + /** Returns the builder for the settings used for calls to deleteRagCorpus. */ + public OperationCallSettings.Builder + deleteRagCorpusOperationSettings() { + return getStubSettingsBuilder().deleteRagCorpusOperationSettings(); + } + + /** Returns the builder for the settings used for calls to uploadRagFile. */ + public UnaryCallSettings.Builder + uploadRagFileSettings() { + return getStubSettingsBuilder().uploadRagFileSettings(); + } + + /** Returns the builder for the settings used for calls to importRagFiles. */ + public UnaryCallSettings.Builder importRagFilesSettings() { + return getStubSettingsBuilder().importRagFilesSettings(); + } + + /** Returns the builder for the settings used for calls to importRagFiles. */ + public OperationCallSettings.Builder< + ImportRagFilesRequest, ImportRagFilesResponse, ImportRagFilesOperationMetadata> + importRagFilesOperationSettings() { + return getStubSettingsBuilder().importRagFilesOperationSettings(); + } + + /** Returns the builder for the settings used for calls to getRagFile. */ + public UnaryCallSettings.Builder getRagFileSettings() { + return getStubSettingsBuilder().getRagFileSettings(); + } + + /** Returns the builder for the settings used for calls to listRagFiles. */ + public PagedCallSettings.Builder< + ListRagFilesRequest, ListRagFilesResponse, ListRagFilesPagedResponse> + listRagFilesSettings() { + return getStubSettingsBuilder().listRagFilesSettings(); + } + + /** Returns the builder for the settings used for calls to deleteRagFile. */ + public UnaryCallSettings.Builder deleteRagFileSettings() { + return getStubSettingsBuilder().deleteRagFileSettings(); + } + + /** Returns the builder for the settings used for calls to deleteRagFile. */ + public OperationCallSettings.Builder + deleteRagFileOperationSettings() { + return getStubSettingsBuilder().deleteRagFileOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return getStubSettingsBuilder().listLocationsSettings(); + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getStubSettingsBuilder().getLocationSettings(); + } + + /** Returns the builder for the settings used for calls to setIamPolicy. */ + public UnaryCallSettings.Builder setIamPolicySettings() { + return getStubSettingsBuilder().setIamPolicySettings(); + } + + /** Returns the builder for the settings used for calls to getIamPolicy. */ + public UnaryCallSettings.Builder getIamPolicySettings() { + return getStubSettingsBuilder().getIamPolicySettings(); + } + + /** Returns the builder for the settings used for calls to testIamPermissions. */ + public UnaryCallSettings.Builder + testIamPermissionsSettings() { + return getStubSettingsBuilder().testIamPermissionsSettings(); + } + + @Override + public VertexRagDataServiceSettings build() throws IOException { + return new VertexRagDataServiceSettings(this); + } + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/VertexRagServiceClient.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/VertexRagServiceClient.java new file mode 100644 index 000000000000..739b857512fb --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/VertexRagServiceClient.java @@ -0,0 +1,856 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.aiplatform.v1beta1.stub.VertexRagServiceStub; +import com.google.cloud.aiplatform.v1beta1.stub.VertexRagServiceStubSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: A service for retrieving relevant contexts. + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

{@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 (VertexRagServiceClient vertexRagServiceClient = VertexRagServiceClient.create()) {
+ *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ *   RagQuery query = RagQuery.newBuilder().build();
+ *   RetrieveContextsResponse response = vertexRagServiceClient.retrieveContexts(parent, query);
+ * }
+ * }
+ * + *

Note: close() needs to be called on the VertexRagServiceClient object to clean up resources + * such as threads. In the example above, try-with-resources is used, which automatically calls + * close(). + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Methods
MethodDescriptionMethod Variants

RetrieveContexts

Retrieves relevant contexts for a query.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • retrieveContexts(RetrieveContextsRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • retrieveContexts(LocationName parent, RagQuery query) + *

  • retrieveContexts(String parent, RagQuery query) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • retrieveContextsCallable() + *

+ *

ListLocations

Lists information about the supported locations for this service.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listLocations(ListLocationsRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listLocationsPagedCallable() + *

  • listLocationsCallable() + *

+ *

GetLocation

Gets information about a location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getLocation(GetLocationRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getLocationCallable() + *

+ *

SetIamPolicy

Sets the access control policy on the specified resource. Replacesany existing policy. + *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • setIamPolicy(SetIamPolicyRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • setIamPolicyCallable() + *

+ *

GetIamPolicy

Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getIamPolicy(GetIamPolicyRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getIamPolicyCallable() + *

+ *

TestIamPermissions

Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a `NOT_FOUND` error. + *

Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • testIamPermissions(TestIamPermissionsRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • testIamPermissionsCallable() + *

+ *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of VertexRagServiceSettings to + * create(). For example: + * + *

To customize credentials: + * + *

{@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
+ * VertexRagServiceSettings vertexRagServiceSettings =
+ *     VertexRagServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * VertexRagServiceClient vertexRagServiceClient =
+ *     VertexRagServiceClient.create(vertexRagServiceSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@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
+ * VertexRagServiceSettings vertexRagServiceSettings =
+ *     VertexRagServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * VertexRagServiceClient vertexRagServiceClient =
+ *     VertexRagServiceClient.create(vertexRagServiceSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class VertexRagServiceClient implements BackgroundResource { + private final VertexRagServiceSettings settings; + private final VertexRagServiceStub stub; + + /** Constructs an instance of VertexRagServiceClient with default settings. */ + public static final VertexRagServiceClient create() throws IOException { + return create(VertexRagServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of VertexRagServiceClient, using the given settings. The channels are + * created based on the settings passed in, or defaults for any settings that are not set. + */ + public static final VertexRagServiceClient create(VertexRagServiceSettings settings) + throws IOException { + return new VertexRagServiceClient(settings); + } + + /** + * Constructs an instance of VertexRagServiceClient, using the given stub for making calls. This + * is for advanced usage - prefer using create(VertexRagServiceSettings). + */ + public static final VertexRagServiceClient create(VertexRagServiceStub stub) { + return new VertexRagServiceClient(stub); + } + + /** + * Constructs an instance of VertexRagServiceClient, using the given settings. This is protected + * so that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected VertexRagServiceClient(VertexRagServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((VertexRagServiceStubSettings) settings.getStubSettings()).createStub(); + } + + protected VertexRagServiceClient(VertexRagServiceStub stub) { + this.settings = null; + this.stub = stub; + } + + public final VertexRagServiceSettings getSettings() { + return settings; + } + + public VertexRagServiceStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves relevant contexts for a query. + * + *

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 (VertexRagServiceClient vertexRagServiceClient = VertexRagServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   RagQuery query = RagQuery.newBuilder().build();
+   *   RetrieveContextsResponse response = vertexRagServiceClient.retrieveContexts(parent, query);
+   * }
+   * }
+ * + * @param parent Required. The resource name of the Location from which to retrieve RagContexts. + * The users must have permission to make a call in the project. Format: + * `projects/{project}/locations/{location}`. + * @param query Required. Single RAG retrieve query. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final RetrieveContextsResponse retrieveContexts(LocationName parent, RagQuery query) { + RetrieveContextsRequest request = + RetrieveContextsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setQuery(query) + .build(); + return retrieveContexts(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves relevant contexts for a query. + * + *

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 (VertexRagServiceClient vertexRagServiceClient = VertexRagServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   RagQuery query = RagQuery.newBuilder().build();
+   *   RetrieveContextsResponse response = vertexRagServiceClient.retrieveContexts(parent, query);
+   * }
+   * }
+ * + * @param parent Required. The resource name of the Location from which to retrieve RagContexts. + * The users must have permission to make a call in the project. Format: + * `projects/{project}/locations/{location}`. + * @param query Required. Single RAG retrieve query. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final RetrieveContextsResponse retrieveContexts(String parent, RagQuery query) { + RetrieveContextsRequest request = + RetrieveContextsRequest.newBuilder().setParent(parent).setQuery(query).build(); + return retrieveContexts(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves relevant contexts for a query. + * + *

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 (VertexRagServiceClient vertexRagServiceClient = VertexRagServiceClient.create()) {
+   *   RetrieveContextsRequest request =
+   *       RetrieveContextsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setQuery(RagQuery.newBuilder().build())
+   *           .build();
+   *   RetrieveContextsResponse response = vertexRagServiceClient.retrieveContexts(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final RetrieveContextsResponse retrieveContexts(RetrieveContextsRequest request) { + return retrieveContextsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves relevant contexts for a query. + * + *

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 (VertexRagServiceClient vertexRagServiceClient = VertexRagServiceClient.create()) {
+   *   RetrieveContextsRequest request =
+   *       RetrieveContextsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setQuery(RagQuery.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       vertexRagServiceClient.retrieveContextsCallable().futureCall(request);
+   *   // Do something.
+   *   RetrieveContextsResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + retrieveContextsCallable() { + return stub.retrieveContextsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

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 (VertexRagServiceClient vertexRagServiceClient = VertexRagServiceClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Location element : vertexRagServiceClient.listLocations(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListLocationsPagedResponse listLocations(ListLocationsRequest request) { + return listLocationsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

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 (VertexRagServiceClient vertexRagServiceClient = VertexRagServiceClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       vertexRagServiceClient.listLocationsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Location element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listLocationsPagedCallable() { + return stub.listLocationsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

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 (VertexRagServiceClient vertexRagServiceClient = VertexRagServiceClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListLocationsResponse response =
+   *         vertexRagServiceClient.listLocationsCallable().call(request);
+   *     for (Location element : response.getLocationsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listLocationsCallable() { + return stub.listLocationsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

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 (VertexRagServiceClient vertexRagServiceClient = VertexRagServiceClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   Location response = vertexRagServiceClient.getLocation(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Location getLocation(GetLocationRequest request) { + return getLocationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

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 (VertexRagServiceClient vertexRagServiceClient = VertexRagServiceClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future = vertexRagServiceClient.getLocationCallable().futureCall(request);
+   *   // Do something.
+   *   Location response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getLocationCallable() { + return stub.getLocationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the access control policy on the specified resource. Replacesany existing policy. + * + *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. + * + *

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 (VertexRagServiceClient vertexRagServiceClient = VertexRagServiceClient.create()) {
+   *   SetIamPolicyRequest request =
+   *       SetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Policy response = vertexRagServiceClient.setIamPolicy(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Policy setIamPolicy(SetIamPolicyRequest request) { + return setIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the access control policy on the specified resource. Replacesany existing policy. + * + *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. + * + *

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 (VertexRagServiceClient vertexRagServiceClient = VertexRagServiceClient.create()) {
+   *   SetIamPolicyRequest request =
+   *       SetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = vertexRagServiceClient.setIamPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Policy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable setIamPolicyCallable() { + return stub.setIamPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the access control policy for a resource. Returns an empty policyif the resource exists + * and does not have a policy set. + * + *

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 (VertexRagServiceClient vertexRagServiceClient = VertexRagServiceClient.create()) {
+   *   GetIamPolicyRequest request =
+   *       GetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .setOptions(GetPolicyOptions.newBuilder().build())
+   *           .build();
+   *   Policy response = vertexRagServiceClient.getIamPolicy(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Policy getIamPolicy(GetIamPolicyRequest request) { + return getIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the access control policy for a resource. Returns an empty policyif the resource exists + * and does not have a policy set. + * + *

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 (VertexRagServiceClient vertexRagServiceClient = VertexRagServiceClient.create()) {
+   *   GetIamPolicyRequest request =
+   *       GetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .setOptions(GetPolicyOptions.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = vertexRagServiceClient.getIamPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Policy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getIamPolicyCallable() { + return stub.getIamPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns permissions that a caller has on the specified resource. If theresource does not exist, + * this will return an empty set ofpermissions, not a `NOT_FOUND` error. + * + *

Note: This operation is designed to be used for buildingpermission-aware UIs and + * command-line tools, not for authorizationchecking. This operation may "fail open" without + * warning. + * + *

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 (VertexRagServiceClient vertexRagServiceClient = VertexRagServiceClient.create()) {
+   *   TestIamPermissionsRequest request =
+   *       TestIamPermissionsRequest.newBuilder()
+   *           .setResource(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .addAllPermissions(new ArrayList())
+   *           .build();
+   *   TestIamPermissionsResponse response = vertexRagServiceClient.testIamPermissions(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) { + return testIamPermissionsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns permissions that a caller has on the specified resource. If theresource does not exist, + * this will return an empty set ofpermissions, not a `NOT_FOUND` error. + * + *

Note: This operation is designed to be used for buildingpermission-aware UIs and + * command-line tools, not for authorizationchecking. This operation may "fail open" without + * warning. + * + *

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 (VertexRagServiceClient vertexRagServiceClient = VertexRagServiceClient.create()) {
+   *   TestIamPermissionsRequest request =
+   *       TestIamPermissionsRequest.newBuilder()
+   *           .setResource(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .addAllPermissions(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       vertexRagServiceClient.testIamPermissionsCallable().futureCall(request);
+   *   // Do something.
+   *   TestIamPermissionsResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + testIamPermissionsCallable() { + return stub.testIamPermissionsCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListLocationsPagedResponse + extends AbstractPagedListResponse< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListLocationsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListLocationsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListLocationsPagedResponse(ListLocationsPage page) { + super(page, ListLocationsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListLocationsPage + extends AbstractPage< + ListLocationsRequest, ListLocationsResponse, Location, ListLocationsPage> { + + private ListLocationsPage( + PageContext context, + ListLocationsResponse response) { + super(context, response); + } + + private static ListLocationsPage createEmptyPage() { + return new ListLocationsPage(null, null); + } + + @Override + protected ListLocationsPage createPage( + PageContext context, + ListLocationsResponse response) { + return new ListLocationsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListLocationsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + private ListLocationsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListLocationsFixedSizeCollection createEmptyCollection() { + return new ListLocationsFixedSizeCollection(null, 0); + } + + @Override + protected ListLocationsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListLocationsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/VertexRagServiceSettings.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/VertexRagServiceSettings.java new file mode 100644 index 000000000000..965cc1d6caa9 --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/VertexRagServiceSettings.java @@ -0,0 +1,255 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1; + +import static com.google.cloud.aiplatform.v1beta1.VertexRagServiceClient.ListLocationsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.aiplatform.v1beta1.stub.VertexRagServiceStubSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link VertexRagServiceClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (aiplatform.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of retrieveContexts to 30 seconds: + * + *

{@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
+ * VertexRagServiceSettings.Builder vertexRagServiceSettingsBuilder =
+ *     VertexRagServiceSettings.newBuilder();
+ * vertexRagServiceSettingsBuilder
+ *     .retrieveContextsSettings()
+ *     .setRetrySettings(
+ *         vertexRagServiceSettingsBuilder
+ *             .retrieveContextsSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * VertexRagServiceSettings vertexRagServiceSettings = vertexRagServiceSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class VertexRagServiceSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to retrieveContexts. */ + public UnaryCallSettings + retrieveContextsSettings() { + return ((VertexRagServiceStubSettings) getStubSettings()).retrieveContextsSettings(); + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return ((VertexRagServiceStubSettings) getStubSettings()).listLocationsSettings(); + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return ((VertexRagServiceStubSettings) getStubSettings()).getLocationSettings(); + } + + /** Returns the object with the settings used for calls to setIamPolicy. */ + public UnaryCallSettings setIamPolicySettings() { + return ((VertexRagServiceStubSettings) getStubSettings()).setIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to getIamPolicy. */ + public UnaryCallSettings getIamPolicySettings() { + return ((VertexRagServiceStubSettings) getStubSettings()).getIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to testIamPermissions. */ + public UnaryCallSettings + testIamPermissionsSettings() { + return ((VertexRagServiceStubSettings) getStubSettings()).testIamPermissionsSettings(); + } + + public static final VertexRagServiceSettings create(VertexRagServiceStubSettings stub) + throws IOException { + return new VertexRagServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return VertexRagServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return VertexRagServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return VertexRagServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return VertexRagServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return VertexRagServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return VertexRagServiceStubSettings.defaultTransportChannelProvider(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return VertexRagServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected VertexRagServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for VertexRagServiceSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(VertexRagServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(VertexRagServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(VertexRagServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(VertexRagServiceStubSettings.newBuilder()); + } + + public VertexRagServiceStubSettings.Builder getStubSettingsBuilder() { + return ((VertexRagServiceStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to retrieveContexts. */ + public UnaryCallSettings.Builder + retrieveContextsSettings() { + return getStubSettingsBuilder().retrieveContextsSettings(); + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return getStubSettingsBuilder().listLocationsSettings(); + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getStubSettingsBuilder().getLocationSettings(); + } + + /** Returns the builder for the settings used for calls to setIamPolicy. */ + public UnaryCallSettings.Builder setIamPolicySettings() { + return getStubSettingsBuilder().setIamPolicySettings(); + } + + /** Returns the builder for the settings used for calls to getIamPolicy. */ + public UnaryCallSettings.Builder getIamPolicySettings() { + return getStubSettingsBuilder().getIamPolicySettings(); + } + + /** Returns the builder for the settings used for calls to testIamPermissions. */ + public UnaryCallSettings.Builder + testIamPermissionsSettings() { + return getStubSettingsBuilder().testIamPermissionsSettings(); + } + + @Override + public VertexRagServiceSettings build() throws IOException { + return new VertexRagServiceSettings(this); + } + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/gapic_metadata.json b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/gapic_metadata.json index 9e6f94a58334..9e5bcdf36960 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/gapic_metadata.json +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/gapic_metadata.json @@ -1073,6 +1073,60 @@ } } }, + "NotebookService": { + "clients": { + "grpc": { + "libraryClient": "NotebookServiceClient", + "rpcs": { + "AssignNotebookRuntime": { + "methods": ["assignNotebookRuntimeAsync", "assignNotebookRuntimeAsync", "assignNotebookRuntimeAsync", "assignNotebookRuntimeAsync", "assignNotebookRuntimeAsync", "assignNotebookRuntimeOperationCallable", "assignNotebookRuntimeCallable"] + }, + "CreateNotebookRuntimeTemplate": { + "methods": ["createNotebookRuntimeTemplateAsync", "createNotebookRuntimeTemplateAsync", "createNotebookRuntimeTemplateAsync", "createNotebookRuntimeTemplateOperationCallable", "createNotebookRuntimeTemplateCallable"] + }, + "DeleteNotebookRuntime": { + "methods": ["deleteNotebookRuntimeAsync", "deleteNotebookRuntimeAsync", "deleteNotebookRuntimeAsync", "deleteNotebookRuntimeOperationCallable", "deleteNotebookRuntimeCallable"] + }, + "DeleteNotebookRuntimeTemplate": { + "methods": ["deleteNotebookRuntimeTemplateAsync", "deleteNotebookRuntimeTemplateAsync", "deleteNotebookRuntimeTemplateAsync", "deleteNotebookRuntimeTemplateOperationCallable", "deleteNotebookRuntimeTemplateCallable"] + }, + "GetIamPolicy": { + "methods": ["getIamPolicy", "getIamPolicyCallable"] + }, + "GetLocation": { + "methods": ["getLocation", "getLocationCallable"] + }, + "GetNotebookRuntime": { + "methods": ["getNotebookRuntime", "getNotebookRuntime", "getNotebookRuntime", "getNotebookRuntimeCallable"] + }, + "GetNotebookRuntimeTemplate": { + "methods": ["getNotebookRuntimeTemplate", "getNotebookRuntimeTemplate", "getNotebookRuntimeTemplate", "getNotebookRuntimeTemplateCallable"] + }, + "ListLocations": { + "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"] + }, + "ListNotebookRuntimeTemplates": { + "methods": ["listNotebookRuntimeTemplates", "listNotebookRuntimeTemplates", "listNotebookRuntimeTemplates", "listNotebookRuntimeTemplatesPagedCallable", "listNotebookRuntimeTemplatesCallable"] + }, + "ListNotebookRuntimes": { + "methods": ["listNotebookRuntimes", "listNotebookRuntimes", "listNotebookRuntimes", "listNotebookRuntimesPagedCallable", "listNotebookRuntimesCallable"] + }, + "SetIamPolicy": { + "methods": ["setIamPolicy", "setIamPolicyCallable"] + }, + "StartNotebookRuntime": { + "methods": ["startNotebookRuntimeAsync", "startNotebookRuntimeAsync", "startNotebookRuntimeAsync", "startNotebookRuntimeOperationCallable", "startNotebookRuntimeCallable"] + }, + "TestIamPermissions": { + "methods": ["testIamPermissions", "testIamPermissionsCallable"] + }, + "UpgradeNotebookRuntime": { + "methods": ["upgradeNotebookRuntimeAsync", "upgradeNotebookRuntimeAsync", "upgradeNotebookRuntimeAsync", "upgradeNotebookRuntimeOperationCallable", "upgradeNotebookRuntimeCallable"] + } + } + } + } + }, "PersistentResourceService": { "clients": { "grpc": { @@ -1099,6 +1153,9 @@ "ListPersistentResources": { "methods": ["listPersistentResources", "listPersistentResources", "listPersistentResources", "listPersistentResourcesPagedCallable", "listPersistentResourcesCallable"] }, + "RebootPersistentResource": { + "methods": ["rebootPersistentResourceAsync", "rebootPersistentResourceAsync", "rebootPersistentResourceAsync", "rebootPersistentResourceOperationCallable", "rebootPersistentResourceCallable"] + }, "SetIamPolicy": { "methods": ["setIamPolicy", "setIamPolicyCallable"] }, @@ -1177,6 +1234,9 @@ "grpc": { "libraryClient": "PredictionServiceClient", "rpcs": { + "ChatCompletions": { + "methods": ["chatCompletionsCallable"] + }, "CountTokens": { "methods": ["countTokens", "countTokens", "countTokens", "countTokensCallable"] }, @@ -1496,6 +1556,84 @@ } } }, + "VertexRagDataService": { + "clients": { + "grpc": { + "libraryClient": "VertexRagDataServiceClient", + "rpcs": { + "CreateRagCorpus": { + "methods": ["createRagCorpusAsync", "createRagCorpusAsync", "createRagCorpusAsync", "createRagCorpusOperationCallable", "createRagCorpusCallable"] + }, + "DeleteRagCorpus": { + "methods": ["deleteRagCorpusAsync", "deleteRagCorpusAsync", "deleteRagCorpusAsync", "deleteRagCorpusOperationCallable", "deleteRagCorpusCallable"] + }, + "DeleteRagFile": { + "methods": ["deleteRagFileAsync", "deleteRagFileAsync", "deleteRagFileAsync", "deleteRagFileOperationCallable", "deleteRagFileCallable"] + }, + "GetIamPolicy": { + "methods": ["getIamPolicy", "getIamPolicyCallable"] + }, + "GetLocation": { + "methods": ["getLocation", "getLocationCallable"] + }, + "GetRagCorpus": { + "methods": ["getRagCorpus", "getRagCorpus", "getRagCorpus", "getRagCorpusCallable"] + }, + "GetRagFile": { + "methods": ["getRagFile", "getRagFile", "getRagFile", "getRagFileCallable"] + }, + "ImportRagFiles": { + "methods": ["importRagFilesAsync", "importRagFilesAsync", "importRagFilesAsync", "importRagFilesOperationCallable", "importRagFilesCallable"] + }, + "ListLocations": { + "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"] + }, + "ListRagCorpora": { + "methods": ["listRagCorpora", "listRagCorpora", "listRagCorpora", "listRagCorporaPagedCallable", "listRagCorporaCallable"] + }, + "ListRagFiles": { + "methods": ["listRagFiles", "listRagFiles", "listRagFiles", "listRagFilesPagedCallable", "listRagFilesCallable"] + }, + "SetIamPolicy": { + "methods": ["setIamPolicy", "setIamPolicyCallable"] + }, + "TestIamPermissions": { + "methods": ["testIamPermissions", "testIamPermissionsCallable"] + }, + "UploadRagFile": { + "methods": ["uploadRagFile", "uploadRagFile", "uploadRagFile", "uploadRagFileCallable"] + } + } + } + } + }, + "VertexRagService": { + "clients": { + "grpc": { + "libraryClient": "VertexRagServiceClient", + "rpcs": { + "GetIamPolicy": { + "methods": ["getIamPolicy", "getIamPolicyCallable"] + }, + "GetLocation": { + "methods": ["getLocation", "getLocationCallable"] + }, + "ListLocations": { + "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"] + }, + "RetrieveContexts": { + "methods": ["retrieveContexts", "retrieveContexts", "retrieveContexts", "retrieveContextsCallable"] + }, + "SetIamPolicy": { + "methods": ["setIamPolicy", "setIamPolicyCallable"] + }, + "TestIamPermissions": { + "methods": ["testIamPermissions", "testIamPermissionsCallable"] + } + } + } + } + }, "VizierService": { "clients": { "grpc": { diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/package-info.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/package-info.java index d3dd5bfcbeb5..4be914e4cee9 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/package-info.java +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/package-info.java @@ -415,6 +415,25 @@ * } * } * + *

======================= NotebookServiceClient ======================= + * + *

Service Description: The interface for Vertex Notebook service (a.k.a. Colab on Workbench). + * + *

Sample for NotebookServiceClient: + * + *

{@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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ *   NotebookRuntimeTemplateName name =
+ *       NotebookRuntimeTemplateName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]");
+ *   NotebookRuntimeTemplate response = notebookServiceClient.getNotebookRuntimeTemplate(name);
+ * }
+ * }
+ * *

======================= PersistentResourceServiceClient ======================= * *

Service Description: A service for managing Vertex AI's machine learning PersistentResource. @@ -586,6 +605,44 @@ * } * } * + *

======================= VertexRagDataServiceClient ======================= + * + *

Service Description: A service for managing user data for RAG. + * + *

Sample for VertexRagDataServiceClient: + * + *

{@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 (VertexRagDataServiceClient vertexRagDataServiceClient =
+ *     VertexRagDataServiceClient.create()) {
+ *   RagCorpusName name = RagCorpusName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]");
+ *   RagCorpus response = vertexRagDataServiceClient.getRagCorpus(name);
+ * }
+ * }
+ * + *

======================= VertexRagServiceClient ======================= + * + *

Service Description: A service for retrieving relevant contexts. + * + *

Sample for VertexRagServiceClient: + * + *

{@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 (VertexRagServiceClient vertexRagServiceClient = VertexRagServiceClient.create()) {
+ *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ *   RagQuery query = RagQuery.newBuilder().build();
+ *   RetrieveContextsResponse response = vertexRagServiceClient.retrieveContexts(parent, query);
+ * }
+ * }
+ * *

======================= VizierServiceClient ======================= * *

Service Description: Vertex AI Vizier API. diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/EvaluationServiceStubSettings.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/EvaluationServiceStubSettings.java index b2614f5ea6fb..30240dbe1c07 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/EvaluationServiceStubSettings.java +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/EvaluationServiceStubSettings.java @@ -58,6 +58,7 @@ import java.io.IOException; import java.util.List; import javax.annotation.Generated; +import org.threeten.bp.Duration; // AUTO-GENERATED DOCUMENTATION AND CLASS. /** @@ -317,6 +318,8 @@ public static class Builder extends StubSettings.Builder> definitions = ImmutableMap.builder(); + definitions.put( + "no_retry_15_codes", ImmutableSet.copyOf(Lists.newArrayList())); definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); RETRYABLE_CODE_DEFINITIONS = definitions.build(); } @@ -326,6 +329,14 @@ public static class Builder extends StubSettings.Builder definitions = ImmutableMap.builder(); RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRpcTimeout(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(60000L)) + .setTotalTimeout(Duration.ofMillis(60000L)) + .build(); + definitions.put("no_retry_15_params", settings); settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); definitions.put("no_retry_params", settings); RETRY_PARAM_DEFINITIONS = definitions.build(); @@ -391,8 +402,8 @@ private static Builder createDefault() { private static Builder initDefaults(Builder builder) { builder .evaluateInstancesSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_15_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_15_params")); builder .listLocationsSettings() diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcNotebookServiceCallableFactory.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcNotebookServiceCallableFactory.java new file mode 100644 index 000000000000..f25327c25b93 --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcNotebookServiceCallableFactory.java @@ -0,0 +1,115 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the NotebookService service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcNotebookServiceCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcNotebookServiceStub.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcNotebookServiceStub.java new file mode 100644 index 000000000000..80974944ed62 --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcNotebookServiceStub.java @@ -0,0 +1,813 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.stub; + +import static com.google.cloud.aiplatform.v1beta1.NotebookServiceClient.ListLocationsPagedResponse; +import static com.google.cloud.aiplatform.v1beta1.NotebookServiceClient.ListNotebookRuntimeTemplatesPagedResponse; +import static com.google.cloud.aiplatform.v1beta1.NotebookServiceClient.ListNotebookRuntimesPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeOperationMetadata; +import com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeRequest; +import com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateOperationMetadata; +import com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateRequest; +import com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeRequest; +import com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeTemplateRequest; +import com.google.cloud.aiplatform.v1beta1.DeleteOperationMetadata; +import com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeRequest; +import com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeTemplateRequest; +import com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesRequest; +import com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesResponse; +import com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesRequest; +import com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesResponse; +import com.google.cloud.aiplatform.v1beta1.NotebookRuntime; +import com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate; +import com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeOperationMetadata; +import com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeRequest; +import com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeResponse; +import com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeOperationMetadata; +import com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeRequest; +import com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeResponse; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the NotebookService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcNotebookServiceStub extends NotebookServiceStub { + private static final MethodDescriptor + createNotebookRuntimeTemplateMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.aiplatform.v1beta1.NotebookService/CreateNotebookRuntimeTemplate") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateNotebookRuntimeTemplateRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getNotebookRuntimeTemplateMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.aiplatform.v1beta1.NotebookService/GetNotebookRuntimeTemplate") + .setRequestMarshaller( + ProtoUtils.marshaller(GetNotebookRuntimeTemplateRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(NotebookRuntimeTemplate.getDefaultInstance())) + .build(); + + private static final MethodDescriptor< + ListNotebookRuntimeTemplatesRequest, ListNotebookRuntimeTemplatesResponse> + listNotebookRuntimeTemplatesMethodDescriptor = + MethodDescriptor + . + newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.aiplatform.v1beta1.NotebookService/ListNotebookRuntimeTemplates") + .setRequestMarshaller( + ProtoUtils.marshaller(ListNotebookRuntimeTemplatesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListNotebookRuntimeTemplatesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteNotebookRuntimeTemplateMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.aiplatform.v1beta1.NotebookService/DeleteNotebookRuntimeTemplate") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteNotebookRuntimeTemplateRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + assignNotebookRuntimeMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.aiplatform.v1beta1.NotebookService/AssignNotebookRuntime") + .setRequestMarshaller( + ProtoUtils.marshaller(AssignNotebookRuntimeRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getNotebookRuntimeMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.aiplatform.v1beta1.NotebookService/GetNotebookRuntime") + .setRequestMarshaller( + ProtoUtils.marshaller(GetNotebookRuntimeRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(NotebookRuntime.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listNotebookRuntimesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.aiplatform.v1beta1.NotebookService/ListNotebookRuntimes") + .setRequestMarshaller( + ProtoUtils.marshaller(ListNotebookRuntimesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListNotebookRuntimesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteNotebookRuntimeMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.aiplatform.v1beta1.NotebookService/DeleteNotebookRuntime") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteNotebookRuntimeRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + upgradeNotebookRuntimeMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.aiplatform.v1beta1.NotebookService/UpgradeNotebookRuntime") + .setRequestMarshaller( + ProtoUtils.marshaller(UpgradeNotebookRuntimeRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + startNotebookRuntimeMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.aiplatform.v1beta1.NotebookService/StartNotebookRuntime") + .setRequestMarshaller( + ProtoUtils.marshaller(StartNotebookRuntimeRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listLocationsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setRequestMarshaller( + ProtoUtils.marshaller(ListLocationsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListLocationsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getLocationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setRequestMarshaller(ProtoUtils.marshaller(GetLocationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Location.getDefaultInstance())) + .build(); + + private static final MethodDescriptor setIamPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/SetIamPolicy") + .setRequestMarshaller(ProtoUtils.marshaller(SetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getIamPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/GetIamPolicy") + .setRequestMarshaller(ProtoUtils.marshaller(GetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + testIamPermissionsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/TestIamPermissions") + .setRequestMarshaller( + ProtoUtils.marshaller(TestIamPermissionsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(TestIamPermissionsResponse.getDefaultInstance())) + .build(); + + private final UnaryCallable + createNotebookRuntimeTemplateCallable; + private final OperationCallable< + CreateNotebookRuntimeTemplateRequest, + NotebookRuntimeTemplate, + CreateNotebookRuntimeTemplateOperationMetadata> + createNotebookRuntimeTemplateOperationCallable; + private final UnaryCallable + getNotebookRuntimeTemplateCallable; + private final UnaryCallable< + ListNotebookRuntimeTemplatesRequest, ListNotebookRuntimeTemplatesResponse> + listNotebookRuntimeTemplatesCallable; + private final UnaryCallable< + ListNotebookRuntimeTemplatesRequest, ListNotebookRuntimeTemplatesPagedResponse> + listNotebookRuntimeTemplatesPagedCallable; + private final UnaryCallable + deleteNotebookRuntimeTemplateCallable; + private final OperationCallable< + DeleteNotebookRuntimeTemplateRequest, Empty, DeleteOperationMetadata> + deleteNotebookRuntimeTemplateOperationCallable; + private final UnaryCallable + assignNotebookRuntimeCallable; + private final OperationCallable< + AssignNotebookRuntimeRequest, NotebookRuntime, AssignNotebookRuntimeOperationMetadata> + assignNotebookRuntimeOperationCallable; + private final UnaryCallable + getNotebookRuntimeCallable; + private final UnaryCallable + listNotebookRuntimesCallable; + private final UnaryCallable + listNotebookRuntimesPagedCallable; + private final UnaryCallable + deleteNotebookRuntimeCallable; + private final OperationCallable + deleteNotebookRuntimeOperationCallable; + private final UnaryCallable + upgradeNotebookRuntimeCallable; + private final OperationCallable< + UpgradeNotebookRuntimeRequest, + UpgradeNotebookRuntimeResponse, + UpgradeNotebookRuntimeOperationMetadata> + upgradeNotebookRuntimeOperationCallable; + private final UnaryCallable startNotebookRuntimeCallable; + private final OperationCallable< + StartNotebookRuntimeRequest, + StartNotebookRuntimeResponse, + StartNotebookRuntimeOperationMetadata> + startNotebookRuntimeOperationCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; + private final UnaryCallable setIamPolicyCallable; + private final UnaryCallable getIamPolicyCallable; + private final UnaryCallable + testIamPermissionsCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcNotebookServiceStub create(NotebookServiceStubSettings settings) + throws IOException { + return new GrpcNotebookServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcNotebookServiceStub create(ClientContext clientContext) + throws IOException { + return new GrpcNotebookServiceStub( + NotebookServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcNotebookServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcNotebookServiceStub( + NotebookServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcNotebookServiceStub, using the given settings. This is protected + * so that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcNotebookServiceStub( + NotebookServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new GrpcNotebookServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcNotebookServiceStub, using the given settings. This is protected + * so that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcNotebookServiceStub( + NotebookServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings + createNotebookRuntimeTemplateTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createNotebookRuntimeTemplateMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings + getNotebookRuntimeTemplateTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(getNotebookRuntimeTemplateMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + listNotebookRuntimeTemplatesTransportSettings = + GrpcCallSettings + . + newBuilder() + .setMethodDescriptor(listNotebookRuntimeTemplatesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings + deleteNotebookRuntimeTemplateTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteNotebookRuntimeTemplateMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + assignNotebookRuntimeTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(assignNotebookRuntimeMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings + getNotebookRuntimeTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getNotebookRuntimeMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + listNotebookRuntimesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listNotebookRuntimesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings + deleteNotebookRuntimeTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteNotebookRuntimeMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + upgradeNotebookRuntimeTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(upgradeNotebookRuntimeMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings startNotebookRuntimeTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(startNotebookRuntimeMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings listLocationsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings getLocationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings setIamPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(setIamPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("resource", String.valueOf(request.getResource())); + return builder.build(); + }) + .build(); + GrpcCallSettings getIamPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getIamPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("resource", String.valueOf(request.getResource())); + return builder.build(); + }) + .build(); + GrpcCallSettings + testIamPermissionsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(testIamPermissionsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("resource", String.valueOf(request.getResource())); + return builder.build(); + }) + .build(); + + this.createNotebookRuntimeTemplateCallable = + callableFactory.createUnaryCallable( + createNotebookRuntimeTemplateTransportSettings, + settings.createNotebookRuntimeTemplateSettings(), + clientContext); + this.createNotebookRuntimeTemplateOperationCallable = + callableFactory.createOperationCallable( + createNotebookRuntimeTemplateTransportSettings, + settings.createNotebookRuntimeTemplateOperationSettings(), + clientContext, + operationsStub); + this.getNotebookRuntimeTemplateCallable = + callableFactory.createUnaryCallable( + getNotebookRuntimeTemplateTransportSettings, + settings.getNotebookRuntimeTemplateSettings(), + clientContext); + this.listNotebookRuntimeTemplatesCallable = + callableFactory.createUnaryCallable( + listNotebookRuntimeTemplatesTransportSettings, + settings.listNotebookRuntimeTemplatesSettings(), + clientContext); + this.listNotebookRuntimeTemplatesPagedCallable = + callableFactory.createPagedCallable( + listNotebookRuntimeTemplatesTransportSettings, + settings.listNotebookRuntimeTemplatesSettings(), + clientContext); + this.deleteNotebookRuntimeTemplateCallable = + callableFactory.createUnaryCallable( + deleteNotebookRuntimeTemplateTransportSettings, + settings.deleteNotebookRuntimeTemplateSettings(), + clientContext); + this.deleteNotebookRuntimeTemplateOperationCallable = + callableFactory.createOperationCallable( + deleteNotebookRuntimeTemplateTransportSettings, + settings.deleteNotebookRuntimeTemplateOperationSettings(), + clientContext, + operationsStub); + this.assignNotebookRuntimeCallable = + callableFactory.createUnaryCallable( + assignNotebookRuntimeTransportSettings, + settings.assignNotebookRuntimeSettings(), + clientContext); + this.assignNotebookRuntimeOperationCallable = + callableFactory.createOperationCallable( + assignNotebookRuntimeTransportSettings, + settings.assignNotebookRuntimeOperationSettings(), + clientContext, + operationsStub); + this.getNotebookRuntimeCallable = + callableFactory.createUnaryCallable( + getNotebookRuntimeTransportSettings, + settings.getNotebookRuntimeSettings(), + clientContext); + this.listNotebookRuntimesCallable = + callableFactory.createUnaryCallable( + listNotebookRuntimesTransportSettings, + settings.listNotebookRuntimesSettings(), + clientContext); + this.listNotebookRuntimesPagedCallable = + callableFactory.createPagedCallable( + listNotebookRuntimesTransportSettings, + settings.listNotebookRuntimesSettings(), + clientContext); + this.deleteNotebookRuntimeCallable = + callableFactory.createUnaryCallable( + deleteNotebookRuntimeTransportSettings, + settings.deleteNotebookRuntimeSettings(), + clientContext); + this.deleteNotebookRuntimeOperationCallable = + callableFactory.createOperationCallable( + deleteNotebookRuntimeTransportSettings, + settings.deleteNotebookRuntimeOperationSettings(), + clientContext, + operationsStub); + this.upgradeNotebookRuntimeCallable = + callableFactory.createUnaryCallable( + upgradeNotebookRuntimeTransportSettings, + settings.upgradeNotebookRuntimeSettings(), + clientContext); + this.upgradeNotebookRuntimeOperationCallable = + callableFactory.createOperationCallable( + upgradeNotebookRuntimeTransportSettings, + settings.upgradeNotebookRuntimeOperationSettings(), + clientContext, + operationsStub); + this.startNotebookRuntimeCallable = + callableFactory.createUnaryCallable( + startNotebookRuntimeTransportSettings, + settings.startNotebookRuntimeSettings(), + clientContext); + this.startNotebookRuntimeOperationCallable = + callableFactory.createOperationCallable( + startNotebookRuntimeTransportSettings, + settings.startNotebookRuntimeOperationSettings(), + clientContext, + operationsStub); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); + this.setIamPolicyCallable = + callableFactory.createUnaryCallable( + setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext); + this.getIamPolicyCallable = + callableFactory.createUnaryCallable( + getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext); + this.testIamPermissionsCallable = + callableFactory.createUnaryCallable( + testIamPermissionsTransportSettings, + settings.testIamPermissionsSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable + createNotebookRuntimeTemplateCallable() { + return createNotebookRuntimeTemplateCallable; + } + + @Override + public OperationCallable< + CreateNotebookRuntimeTemplateRequest, + NotebookRuntimeTemplate, + CreateNotebookRuntimeTemplateOperationMetadata> + createNotebookRuntimeTemplateOperationCallable() { + return createNotebookRuntimeTemplateOperationCallable; + } + + @Override + public UnaryCallable + getNotebookRuntimeTemplateCallable() { + return getNotebookRuntimeTemplateCallable; + } + + @Override + public UnaryCallable + listNotebookRuntimeTemplatesCallable() { + return listNotebookRuntimeTemplatesCallable; + } + + @Override + public UnaryCallable< + ListNotebookRuntimeTemplatesRequest, ListNotebookRuntimeTemplatesPagedResponse> + listNotebookRuntimeTemplatesPagedCallable() { + return listNotebookRuntimeTemplatesPagedCallable; + } + + @Override + public UnaryCallable + deleteNotebookRuntimeTemplateCallable() { + return deleteNotebookRuntimeTemplateCallable; + } + + @Override + public OperationCallable + deleteNotebookRuntimeTemplateOperationCallable() { + return deleteNotebookRuntimeTemplateOperationCallable; + } + + @Override + public UnaryCallable assignNotebookRuntimeCallable() { + return assignNotebookRuntimeCallable; + } + + @Override + public OperationCallable< + AssignNotebookRuntimeRequest, NotebookRuntime, AssignNotebookRuntimeOperationMetadata> + assignNotebookRuntimeOperationCallable() { + return assignNotebookRuntimeOperationCallable; + } + + @Override + public UnaryCallable getNotebookRuntimeCallable() { + return getNotebookRuntimeCallable; + } + + @Override + public UnaryCallable + listNotebookRuntimesCallable() { + return listNotebookRuntimesCallable; + } + + @Override + public UnaryCallable + listNotebookRuntimesPagedCallable() { + return listNotebookRuntimesPagedCallable; + } + + @Override + public UnaryCallable deleteNotebookRuntimeCallable() { + return deleteNotebookRuntimeCallable; + } + + @Override + public OperationCallable + deleteNotebookRuntimeOperationCallable() { + return deleteNotebookRuntimeOperationCallable; + } + + @Override + public UnaryCallable upgradeNotebookRuntimeCallable() { + return upgradeNotebookRuntimeCallable; + } + + @Override + public OperationCallable< + UpgradeNotebookRuntimeRequest, + UpgradeNotebookRuntimeResponse, + UpgradeNotebookRuntimeOperationMetadata> + upgradeNotebookRuntimeOperationCallable() { + return upgradeNotebookRuntimeOperationCallable; + } + + @Override + public UnaryCallable startNotebookRuntimeCallable() { + return startNotebookRuntimeCallable; + } + + @Override + public OperationCallable< + StartNotebookRuntimeRequest, + StartNotebookRuntimeResponse, + StartNotebookRuntimeOperationMetadata> + startNotebookRuntimeOperationCallable() { + return startNotebookRuntimeOperationCallable; + } + + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @Override + public UnaryCallable setIamPolicyCallable() { + return setIamPolicyCallable; + } + + @Override + public UnaryCallable getIamPolicyCallable() { + return getIamPolicyCallable; + } + + @Override + public UnaryCallable + testIamPermissionsCallable() { + return testIamPermissionsCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcPersistentResourceServiceStub.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcPersistentResourceServiceStub.java index de31c2a33132..f05381673ddd 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcPersistentResourceServiceStub.java +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcPersistentResourceServiceStub.java @@ -36,6 +36,8 @@ import com.google.cloud.aiplatform.v1beta1.ListPersistentResourcesRequest; import com.google.cloud.aiplatform.v1beta1.ListPersistentResourcesResponse; import com.google.cloud.aiplatform.v1beta1.PersistentResource; +import com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceOperationMetadata; +import com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceRequest; import com.google.cloud.aiplatform.v1beta1.UpdatePersistentResourceOperationMetadata; import com.google.cloud.aiplatform.v1beta1.UpdatePersistentResourceRequest; import com.google.cloud.location.GetLocationRequest; @@ -123,6 +125,17 @@ public class GrpcPersistentResourceServiceStub extends PersistentResourceService .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); + private static final MethodDescriptor + rebootPersistentResourceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.aiplatform.v1beta1.PersistentResourceService/RebootPersistentResource") + .setRequestMarshaller( + ProtoUtils.marshaller(RebootPersistentResourceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + private static final MethodDescriptor listLocationsMethodDescriptor = MethodDescriptor.newBuilder() @@ -193,6 +206,13 @@ public class GrpcPersistentResourceServiceStub extends PersistentResourceService PersistentResource, UpdatePersistentResourceOperationMetadata> updatePersistentResourceOperationCallable; + private final UnaryCallable + rebootPersistentResourceCallable; + private final OperationCallable< + RebootPersistentResourceRequest, + PersistentResource, + RebootPersistentResourceOperationMetadata> + rebootPersistentResourceOperationCallable; private final UnaryCallable listLocationsCallable; private final UnaryCallable listLocationsPagedCallable; @@ -305,6 +325,17 @@ protected GrpcPersistentResourceServiceStub( return builder.build(); }) .build(); + GrpcCallSettings + rebootPersistentResourceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(rebootPersistentResourceMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); GrpcCallSettings listLocationsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listLocationsMethodDescriptor) @@ -405,6 +436,17 @@ protected GrpcPersistentResourceServiceStub( settings.updatePersistentResourceOperationSettings(), clientContext, operationsStub); + this.rebootPersistentResourceCallable = + callableFactory.createUnaryCallable( + rebootPersistentResourceTransportSettings, + settings.rebootPersistentResourceSettings(), + clientContext); + this.rebootPersistentResourceOperationCallable = + callableFactory.createOperationCallable( + rebootPersistentResourceTransportSettings, + settings.rebootPersistentResourceOperationSettings(), + clientContext, + operationsStub); this.listLocationsCallable = callableFactory.createUnaryCallable( listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); @@ -494,6 +536,21 @@ public GrpcOperationsStub getOperationsStub() { return updatePersistentResourceOperationCallable; } + @Override + public UnaryCallable + rebootPersistentResourceCallable() { + return rebootPersistentResourceCallable; + } + + @Override + public OperationCallable< + RebootPersistentResourceRequest, + PersistentResource, + RebootPersistentResourceOperationMetadata> + rebootPersistentResourceOperationCallable() { + return rebootPersistentResourceOperationCallable; + } + @Override public UnaryCallable listLocationsCallable() { return listLocationsCallable; diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcPredictionServiceStub.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcPredictionServiceStub.java index 1830aae093b2..01a2e235f83e 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcPredictionServiceStub.java +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcPredictionServiceStub.java @@ -29,6 +29,7 @@ import com.google.api.gax.rpc.RequestParamsBuilder; import com.google.api.gax.rpc.ServerStreamingCallable; import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.aiplatform.v1beta1.ChatCompletionsRequest; import com.google.cloud.aiplatform.v1beta1.CountTokensRequest; import com.google.cloud.aiplatform.v1beta1.CountTokensResponse; import com.google.cloud.aiplatform.v1beta1.DirectPredictRequest; @@ -218,6 +219,17 @@ public class GrpcPredictionServiceStub extends PredictionServiceStub { ProtoUtils.marshaller(GenerateContentResponse.getDefaultInstance())) .build(); + private static final MethodDescriptor + chatCompletionsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.SERVER_STREAMING) + .setFullMethodName( + "google.cloud.aiplatform.v1beta1.PredictionService/ChatCompletions") + .setRequestMarshaller( + ProtoUtils.marshaller(ChatCompletionsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(HttpBody.getDefaultInstance())) + .build(); + private static final MethodDescriptor listLocationsMethodDescriptor = MethodDescriptor.newBuilder() @@ -285,6 +297,7 @@ public class GrpcPredictionServiceStub extends PredictionServiceStub { generateContentCallable; private final ServerStreamingCallable streamGenerateContentCallable; + private final ServerStreamingCallable chatCompletionsCallable; private final UnaryCallable listLocationsCallable; private final UnaryCallable listLocationsPagedCallable; @@ -453,6 +466,16 @@ protected GrpcPredictionServiceStub( return builder.build(); }) .build(); + GrpcCallSettings chatCompletionsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(chatCompletionsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("endpoint", String.valueOf(request.getEndpoint())); + return builder.build(); + }) + .build(); GrpcCallSettings listLocationsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listLocationsMethodDescriptor) @@ -554,6 +577,9 @@ protected GrpcPredictionServiceStub( streamGenerateContentTransportSettings, settings.streamGenerateContentSettings(), clientContext); + this.chatCompletionsCallable = + callableFactory.createServerStreamingCallable( + chatCompletionsTransportSettings, settings.chatCompletionsSettings(), clientContext); this.listLocationsCallable = callableFactory.createUnaryCallable( listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); @@ -655,6 +681,11 @@ public UnaryCallable generateCo return streamGenerateContentCallable; } + @Override + public ServerStreamingCallable chatCompletionsCallable() { + return chatCompletionsCallable; + } + @Override public UnaryCallable listLocationsCallable() { return listLocationsCallable; diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcVertexRagDataServiceCallableFactory.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcVertexRagDataServiceCallableFactory.java new file mode 100644 index 000000000000..7739a4a79a6e --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcVertexRagDataServiceCallableFactory.java @@ -0,0 +1,115 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the VertexRagDataService service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcVertexRagDataServiceCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcVertexRagDataServiceStub.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcVertexRagDataServiceStub.java new file mode 100644 index 000000000000..3f1f834ac4d7 --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcVertexRagDataServiceStub.java @@ -0,0 +1,673 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.stub; + +import static com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceClient.ListLocationsPagedResponse; +import static com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceClient.ListRagCorporaPagedResponse; +import static com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceClient.ListRagFilesPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.aiplatform.v1beta1.CreateRagCorpusOperationMetadata; +import com.google.cloud.aiplatform.v1beta1.CreateRagCorpusRequest; +import com.google.cloud.aiplatform.v1beta1.DeleteOperationMetadata; +import com.google.cloud.aiplatform.v1beta1.DeleteRagCorpusRequest; +import com.google.cloud.aiplatform.v1beta1.DeleteRagFileRequest; +import com.google.cloud.aiplatform.v1beta1.GetRagCorpusRequest; +import com.google.cloud.aiplatform.v1beta1.GetRagFileRequest; +import com.google.cloud.aiplatform.v1beta1.ImportRagFilesOperationMetadata; +import com.google.cloud.aiplatform.v1beta1.ImportRagFilesRequest; +import com.google.cloud.aiplatform.v1beta1.ImportRagFilesResponse; +import com.google.cloud.aiplatform.v1beta1.ListRagCorporaRequest; +import com.google.cloud.aiplatform.v1beta1.ListRagCorporaResponse; +import com.google.cloud.aiplatform.v1beta1.ListRagFilesRequest; +import com.google.cloud.aiplatform.v1beta1.ListRagFilesResponse; +import com.google.cloud.aiplatform.v1beta1.RagCorpus; +import com.google.cloud.aiplatform.v1beta1.RagFile; +import com.google.cloud.aiplatform.v1beta1.UploadRagFileRequest; +import com.google.cloud.aiplatform.v1beta1.UploadRagFileResponse; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the VertexRagDataService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcVertexRagDataServiceStub extends VertexRagDataServiceStub { + private static final MethodDescriptor + createRagCorpusMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.aiplatform.v1beta1.VertexRagDataService/CreateRagCorpus") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateRagCorpusRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getRagCorpusMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.aiplatform.v1beta1.VertexRagDataService/GetRagCorpus") + .setRequestMarshaller(ProtoUtils.marshaller(GetRagCorpusRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(RagCorpus.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listRagCorporaMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.aiplatform.v1beta1.VertexRagDataService/ListRagCorpora") + .setRequestMarshaller( + ProtoUtils.marshaller(ListRagCorporaRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListRagCorporaResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteRagCorpusMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.aiplatform.v1beta1.VertexRagDataService/DeleteRagCorpus") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteRagCorpusRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + uploadRagFileMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.aiplatform.v1beta1.VertexRagDataService/UploadRagFile") + .setRequestMarshaller( + ProtoUtils.marshaller(UploadRagFileRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(UploadRagFileResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + importRagFilesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.aiplatform.v1beta1.VertexRagDataService/ImportRagFiles") + .setRequestMarshaller( + ProtoUtils.marshaller(ImportRagFilesRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getRagFileMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1beta1.VertexRagDataService/GetRagFile") + .setRequestMarshaller(ProtoUtils.marshaller(GetRagFileRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(RagFile.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listRagFilesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.aiplatform.v1beta1.VertexRagDataService/ListRagFiles") + .setRequestMarshaller(ProtoUtils.marshaller(ListRagFilesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListRagFilesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteRagFileMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.aiplatform.v1beta1.VertexRagDataService/DeleteRagFile") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteRagFileRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listLocationsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setRequestMarshaller( + ProtoUtils.marshaller(ListLocationsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListLocationsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getLocationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setRequestMarshaller(ProtoUtils.marshaller(GetLocationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Location.getDefaultInstance())) + .build(); + + private static final MethodDescriptor setIamPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/SetIamPolicy") + .setRequestMarshaller(ProtoUtils.marshaller(SetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getIamPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/GetIamPolicy") + .setRequestMarshaller(ProtoUtils.marshaller(GetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + testIamPermissionsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/TestIamPermissions") + .setRequestMarshaller( + ProtoUtils.marshaller(TestIamPermissionsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(TestIamPermissionsResponse.getDefaultInstance())) + .build(); + + private final UnaryCallable createRagCorpusCallable; + private final OperationCallable< + CreateRagCorpusRequest, RagCorpus, CreateRagCorpusOperationMetadata> + createRagCorpusOperationCallable; + private final UnaryCallable getRagCorpusCallable; + private final UnaryCallable listRagCorporaCallable; + private final UnaryCallable + listRagCorporaPagedCallable; + private final UnaryCallable deleteRagCorpusCallable; + private final OperationCallable + deleteRagCorpusOperationCallable; + private final UnaryCallable uploadRagFileCallable; + private final UnaryCallable importRagFilesCallable; + private final OperationCallable< + ImportRagFilesRequest, ImportRagFilesResponse, ImportRagFilesOperationMetadata> + importRagFilesOperationCallable; + private final UnaryCallable getRagFileCallable; + private final UnaryCallable listRagFilesCallable; + private final UnaryCallable + listRagFilesPagedCallable; + private final UnaryCallable deleteRagFileCallable; + private final OperationCallable + deleteRagFileOperationCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; + private final UnaryCallable setIamPolicyCallable; + private final UnaryCallable getIamPolicyCallable; + private final UnaryCallable + testIamPermissionsCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcVertexRagDataServiceStub create(VertexRagDataServiceStubSettings settings) + throws IOException { + return new GrpcVertexRagDataServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcVertexRagDataServiceStub create(ClientContext clientContext) + throws IOException { + return new GrpcVertexRagDataServiceStub( + VertexRagDataServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcVertexRagDataServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcVertexRagDataServiceStub( + VertexRagDataServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcVertexRagDataServiceStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected GrpcVertexRagDataServiceStub( + VertexRagDataServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new GrpcVertexRagDataServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcVertexRagDataServiceStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected GrpcVertexRagDataServiceStub( + VertexRagDataServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings createRagCorpusTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createRagCorpusMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getRagCorpusTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getRagCorpusMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + listRagCorporaTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listRagCorporaMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteRagCorpusTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteRagCorpusMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings uploadRagFileTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(uploadRagFileMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings importRagFilesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(importRagFilesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getRagFileTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getRagFileMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings listRagFilesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listRagFilesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteRagFileTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteRagFileMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings listLocationsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings getLocationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings setIamPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(setIamPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("resource", String.valueOf(request.getResource())); + return builder.build(); + }) + .build(); + GrpcCallSettings getIamPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getIamPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("resource", String.valueOf(request.getResource())); + return builder.build(); + }) + .build(); + GrpcCallSettings + testIamPermissionsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(testIamPermissionsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("resource", String.valueOf(request.getResource())); + return builder.build(); + }) + .build(); + + this.createRagCorpusCallable = + callableFactory.createUnaryCallable( + createRagCorpusTransportSettings, settings.createRagCorpusSettings(), clientContext); + this.createRagCorpusOperationCallable = + callableFactory.createOperationCallable( + createRagCorpusTransportSettings, + settings.createRagCorpusOperationSettings(), + clientContext, + operationsStub); + this.getRagCorpusCallable = + callableFactory.createUnaryCallable( + getRagCorpusTransportSettings, settings.getRagCorpusSettings(), clientContext); + this.listRagCorporaCallable = + callableFactory.createUnaryCallable( + listRagCorporaTransportSettings, settings.listRagCorporaSettings(), clientContext); + this.listRagCorporaPagedCallable = + callableFactory.createPagedCallable( + listRagCorporaTransportSettings, settings.listRagCorporaSettings(), clientContext); + this.deleteRagCorpusCallable = + callableFactory.createUnaryCallable( + deleteRagCorpusTransportSettings, settings.deleteRagCorpusSettings(), clientContext); + this.deleteRagCorpusOperationCallable = + callableFactory.createOperationCallable( + deleteRagCorpusTransportSettings, + settings.deleteRagCorpusOperationSettings(), + clientContext, + operationsStub); + this.uploadRagFileCallable = + callableFactory.createUnaryCallable( + uploadRagFileTransportSettings, settings.uploadRagFileSettings(), clientContext); + this.importRagFilesCallable = + callableFactory.createUnaryCallable( + importRagFilesTransportSettings, settings.importRagFilesSettings(), clientContext); + this.importRagFilesOperationCallable = + callableFactory.createOperationCallable( + importRagFilesTransportSettings, + settings.importRagFilesOperationSettings(), + clientContext, + operationsStub); + this.getRagFileCallable = + callableFactory.createUnaryCallable( + getRagFileTransportSettings, settings.getRagFileSettings(), clientContext); + this.listRagFilesCallable = + callableFactory.createUnaryCallable( + listRagFilesTransportSettings, settings.listRagFilesSettings(), clientContext); + this.listRagFilesPagedCallable = + callableFactory.createPagedCallable( + listRagFilesTransportSettings, settings.listRagFilesSettings(), clientContext); + this.deleteRagFileCallable = + callableFactory.createUnaryCallable( + deleteRagFileTransportSettings, settings.deleteRagFileSettings(), clientContext); + this.deleteRagFileOperationCallable = + callableFactory.createOperationCallable( + deleteRagFileTransportSettings, + settings.deleteRagFileOperationSettings(), + clientContext, + operationsStub); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); + this.setIamPolicyCallable = + callableFactory.createUnaryCallable( + setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext); + this.getIamPolicyCallable = + callableFactory.createUnaryCallable( + getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext); + this.testIamPermissionsCallable = + callableFactory.createUnaryCallable( + testIamPermissionsTransportSettings, + settings.testIamPermissionsSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable createRagCorpusCallable() { + return createRagCorpusCallable; + } + + @Override + public OperationCallable + createRagCorpusOperationCallable() { + return createRagCorpusOperationCallable; + } + + @Override + public UnaryCallable getRagCorpusCallable() { + return getRagCorpusCallable; + } + + @Override + public UnaryCallable listRagCorporaCallable() { + return listRagCorporaCallable; + } + + @Override + public UnaryCallable + listRagCorporaPagedCallable() { + return listRagCorporaPagedCallable; + } + + @Override + public UnaryCallable deleteRagCorpusCallable() { + return deleteRagCorpusCallable; + } + + @Override + public OperationCallable + deleteRagCorpusOperationCallable() { + return deleteRagCorpusOperationCallable; + } + + @Override + public UnaryCallable uploadRagFileCallable() { + return uploadRagFileCallable; + } + + @Override + public UnaryCallable importRagFilesCallable() { + return importRagFilesCallable; + } + + @Override + public OperationCallable< + ImportRagFilesRequest, ImportRagFilesResponse, ImportRagFilesOperationMetadata> + importRagFilesOperationCallable() { + return importRagFilesOperationCallable; + } + + @Override + public UnaryCallable getRagFileCallable() { + return getRagFileCallable; + } + + @Override + public UnaryCallable listRagFilesCallable() { + return listRagFilesCallable; + } + + @Override + public UnaryCallable listRagFilesPagedCallable() { + return listRagFilesPagedCallable; + } + + @Override + public UnaryCallable deleteRagFileCallable() { + return deleteRagFileCallable; + } + + @Override + public OperationCallable + deleteRagFileOperationCallable() { + return deleteRagFileOperationCallable; + } + + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @Override + public UnaryCallable setIamPolicyCallable() { + return setIamPolicyCallable; + } + + @Override + public UnaryCallable getIamPolicyCallable() { + return getIamPolicyCallable; + } + + @Override + public UnaryCallable + testIamPermissionsCallable() { + return testIamPermissionsCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcVertexRagServiceCallableFactory.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcVertexRagServiceCallableFactory.java new file mode 100644 index 000000000000..966ecd6dabab --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcVertexRagServiceCallableFactory.java @@ -0,0 +1,115 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the VertexRagService service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcVertexRagServiceCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcVertexRagServiceStub.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcVertexRagServiceStub.java new file mode 100644 index 000000000000..7f0d34fb799d --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcVertexRagServiceStub.java @@ -0,0 +1,337 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.stub; + +import static com.google.cloud.aiplatform.v1beta1.VertexRagServiceClient.ListLocationsPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest; +import com.google.cloud.aiplatform.v1beta1.RetrieveContextsResponse; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.stub.GrpcOperationsStub; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the VertexRagService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcVertexRagServiceStub extends VertexRagServiceStub { + private static final MethodDescriptor + retrieveContextsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.aiplatform.v1beta1.VertexRagService/RetrieveContexts") + .setRequestMarshaller( + ProtoUtils.marshaller(RetrieveContextsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(RetrieveContextsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listLocationsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setRequestMarshaller( + ProtoUtils.marshaller(ListLocationsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListLocationsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getLocationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setRequestMarshaller(ProtoUtils.marshaller(GetLocationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Location.getDefaultInstance())) + .build(); + + private static final MethodDescriptor setIamPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/SetIamPolicy") + .setRequestMarshaller(ProtoUtils.marshaller(SetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getIamPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/GetIamPolicy") + .setRequestMarshaller(ProtoUtils.marshaller(GetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + testIamPermissionsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/TestIamPermissions") + .setRequestMarshaller( + ProtoUtils.marshaller(TestIamPermissionsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(TestIamPermissionsResponse.getDefaultInstance())) + .build(); + + private final UnaryCallable + retrieveContextsCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; + private final UnaryCallable setIamPolicyCallable; + private final UnaryCallable getIamPolicyCallable; + private final UnaryCallable + testIamPermissionsCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcVertexRagServiceStub create(VertexRagServiceStubSettings settings) + throws IOException { + return new GrpcVertexRagServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcVertexRagServiceStub create(ClientContext clientContext) + throws IOException { + return new GrpcVertexRagServiceStub( + VertexRagServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcVertexRagServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcVertexRagServiceStub( + VertexRagServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcVertexRagServiceStub, using the given settings. This is protected + * so that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcVertexRagServiceStub( + VertexRagServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new GrpcVertexRagServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcVertexRagServiceStub, using the given settings. This is protected + * so that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcVertexRagServiceStub( + VertexRagServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings + retrieveContextsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(retrieveContextsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings listLocationsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings getLocationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings setIamPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(setIamPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("resource", String.valueOf(request.getResource())); + return builder.build(); + }) + .build(); + GrpcCallSettings getIamPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getIamPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("resource", String.valueOf(request.getResource())); + return builder.build(); + }) + .build(); + GrpcCallSettings + testIamPermissionsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(testIamPermissionsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("resource", String.valueOf(request.getResource())); + return builder.build(); + }) + .build(); + + this.retrieveContextsCallable = + callableFactory.createUnaryCallable( + retrieveContextsTransportSettings, settings.retrieveContextsSettings(), clientContext); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); + this.setIamPolicyCallable = + callableFactory.createUnaryCallable( + setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext); + this.getIamPolicyCallable = + callableFactory.createUnaryCallable( + getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext); + this.testIamPermissionsCallable = + callableFactory.createUnaryCallable( + testIamPermissionsTransportSettings, + settings.testIamPermissionsSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable + retrieveContextsCallable() { + return retrieveContextsCallable; + } + + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @Override + public UnaryCallable setIamPolicyCallable() { + return setIamPolicyCallable; + } + + @Override + public UnaryCallable getIamPolicyCallable() { + return getIamPolicyCallable; + } + + @Override + public UnaryCallable + testIamPermissionsCallable() { + return testIamPermissionsCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/NotebookServiceStub.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/NotebookServiceStub.java new file mode 100644 index 000000000000..9f484224927a --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/NotebookServiceStub.java @@ -0,0 +1,211 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.stub; + +import static com.google.cloud.aiplatform.v1beta1.NotebookServiceClient.ListLocationsPagedResponse; +import static com.google.cloud.aiplatform.v1beta1.NotebookServiceClient.ListNotebookRuntimeTemplatesPagedResponse; +import static com.google.cloud.aiplatform.v1beta1.NotebookServiceClient.ListNotebookRuntimesPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeOperationMetadata; +import com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeRequest; +import com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateOperationMetadata; +import com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateRequest; +import com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeRequest; +import com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeTemplateRequest; +import com.google.cloud.aiplatform.v1beta1.DeleteOperationMetadata; +import com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeRequest; +import com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeTemplateRequest; +import com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesRequest; +import com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesResponse; +import com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesRequest; +import com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesResponse; +import com.google.cloud.aiplatform.v1beta1.NotebookRuntime; +import com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate; +import com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeOperationMetadata; +import com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeRequest; +import com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeResponse; +import com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeOperationMetadata; +import com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeRequest; +import com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeResponse; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the NotebookService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public abstract class NotebookServiceStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + throw new UnsupportedOperationException("Not implemented: getOperationsStub()"); + } + + public OperationCallable< + CreateNotebookRuntimeTemplateRequest, + NotebookRuntimeTemplate, + CreateNotebookRuntimeTemplateOperationMetadata> + createNotebookRuntimeTemplateOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createNotebookRuntimeTemplateOperationCallable()"); + } + + public UnaryCallable + createNotebookRuntimeTemplateCallable() { + throw new UnsupportedOperationException( + "Not implemented: createNotebookRuntimeTemplateCallable()"); + } + + public UnaryCallable + getNotebookRuntimeTemplateCallable() { + throw new UnsupportedOperationException( + "Not implemented: getNotebookRuntimeTemplateCallable()"); + } + + public UnaryCallable< + ListNotebookRuntimeTemplatesRequest, ListNotebookRuntimeTemplatesPagedResponse> + listNotebookRuntimeTemplatesPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listNotebookRuntimeTemplatesPagedCallable()"); + } + + public UnaryCallable + listNotebookRuntimeTemplatesCallable() { + throw new UnsupportedOperationException( + "Not implemented: listNotebookRuntimeTemplatesCallable()"); + } + + public OperationCallable + deleteNotebookRuntimeTemplateOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteNotebookRuntimeTemplateOperationCallable()"); + } + + public UnaryCallable + deleteNotebookRuntimeTemplateCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteNotebookRuntimeTemplateCallable()"); + } + + public OperationCallable< + AssignNotebookRuntimeRequest, NotebookRuntime, AssignNotebookRuntimeOperationMetadata> + assignNotebookRuntimeOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: assignNotebookRuntimeOperationCallable()"); + } + + public UnaryCallable assignNotebookRuntimeCallable() { + throw new UnsupportedOperationException("Not implemented: assignNotebookRuntimeCallable()"); + } + + public UnaryCallable getNotebookRuntimeCallable() { + throw new UnsupportedOperationException("Not implemented: getNotebookRuntimeCallable()"); + } + + public UnaryCallable + listNotebookRuntimesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listNotebookRuntimesPagedCallable()"); + } + + public UnaryCallable + listNotebookRuntimesCallable() { + throw new UnsupportedOperationException("Not implemented: listNotebookRuntimesCallable()"); + } + + public OperationCallable + deleteNotebookRuntimeOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteNotebookRuntimeOperationCallable()"); + } + + public UnaryCallable deleteNotebookRuntimeCallable() { + throw new UnsupportedOperationException("Not implemented: deleteNotebookRuntimeCallable()"); + } + + public OperationCallable< + UpgradeNotebookRuntimeRequest, + UpgradeNotebookRuntimeResponse, + UpgradeNotebookRuntimeOperationMetadata> + upgradeNotebookRuntimeOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: upgradeNotebookRuntimeOperationCallable()"); + } + + public UnaryCallable upgradeNotebookRuntimeCallable() { + throw new UnsupportedOperationException("Not implemented: upgradeNotebookRuntimeCallable()"); + } + + public OperationCallable< + StartNotebookRuntimeRequest, + StartNotebookRuntimeResponse, + StartNotebookRuntimeOperationMetadata> + startNotebookRuntimeOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: startNotebookRuntimeOperationCallable()"); + } + + public UnaryCallable startNotebookRuntimeCallable() { + throw new UnsupportedOperationException("Not implemented: startNotebookRuntimeCallable()"); + } + + public UnaryCallable + listLocationsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()"); + } + + public UnaryCallable listLocationsCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsCallable()"); + } + + public UnaryCallable getLocationCallable() { + throw new UnsupportedOperationException("Not implemented: getLocationCallable()"); + } + + public UnaryCallable setIamPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: setIamPolicyCallable()"); + } + + public UnaryCallable getIamPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: getIamPolicyCallable()"); + } + + public UnaryCallable + testIamPermissionsCallable() { + throw new UnsupportedOperationException("Not implemented: testIamPermissionsCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/NotebookServiceStubSettings.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/NotebookServiceStubSettings.java new file mode 100644 index 000000000000..6050f463e255 --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/NotebookServiceStubSettings.java @@ -0,0 +1,1251 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.stub; + +import static com.google.cloud.aiplatform.v1beta1.NotebookServiceClient.ListLocationsPagedResponse; +import static com.google.cloud.aiplatform.v1beta1.NotebookServiceClient.ListNotebookRuntimeTemplatesPagedResponse; +import static com.google.cloud.aiplatform.v1beta1.NotebookServiceClient.ListNotebookRuntimesPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeOperationMetadata; +import com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeRequest; +import com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateOperationMetadata; +import com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateRequest; +import com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeRequest; +import com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeTemplateRequest; +import com.google.cloud.aiplatform.v1beta1.DeleteOperationMetadata; +import com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeRequest; +import com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeTemplateRequest; +import com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesRequest; +import com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesResponse; +import com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesRequest; +import com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesResponse; +import com.google.cloud.aiplatform.v1beta1.NotebookRuntime; +import com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate; +import com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeOperationMetadata; +import com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeRequest; +import com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeResponse; +import com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeOperationMetadata; +import com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeRequest; +import com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeResponse; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link NotebookServiceStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (aiplatform.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of getNotebookRuntimeTemplate to 30 seconds: + * + *

{@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
+ * NotebookServiceStubSettings.Builder notebookServiceSettingsBuilder =
+ *     NotebookServiceStubSettings.newBuilder();
+ * notebookServiceSettingsBuilder
+ *     .getNotebookRuntimeTemplateSettings()
+ *     .setRetrySettings(
+ *         notebookServiceSettingsBuilder
+ *             .getNotebookRuntimeTemplateSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * NotebookServiceStubSettings notebookServiceSettings = notebookServiceSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class NotebookServiceStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final UnaryCallSettings + createNotebookRuntimeTemplateSettings; + private final OperationCallSettings< + CreateNotebookRuntimeTemplateRequest, + NotebookRuntimeTemplate, + CreateNotebookRuntimeTemplateOperationMetadata> + createNotebookRuntimeTemplateOperationSettings; + private final UnaryCallSettings + getNotebookRuntimeTemplateSettings; + private final PagedCallSettings< + ListNotebookRuntimeTemplatesRequest, + ListNotebookRuntimeTemplatesResponse, + ListNotebookRuntimeTemplatesPagedResponse> + listNotebookRuntimeTemplatesSettings; + private final UnaryCallSettings + deleteNotebookRuntimeTemplateSettings; + private final OperationCallSettings< + DeleteNotebookRuntimeTemplateRequest, Empty, DeleteOperationMetadata> + deleteNotebookRuntimeTemplateOperationSettings; + private final UnaryCallSettings + assignNotebookRuntimeSettings; + private final OperationCallSettings< + AssignNotebookRuntimeRequest, NotebookRuntime, AssignNotebookRuntimeOperationMetadata> + assignNotebookRuntimeOperationSettings; + private final UnaryCallSettings + getNotebookRuntimeSettings; + private final PagedCallSettings< + ListNotebookRuntimesRequest, + ListNotebookRuntimesResponse, + ListNotebookRuntimesPagedResponse> + listNotebookRuntimesSettings; + private final UnaryCallSettings + deleteNotebookRuntimeSettings; + private final OperationCallSettings + deleteNotebookRuntimeOperationSettings; + private final UnaryCallSettings + upgradeNotebookRuntimeSettings; + private final OperationCallSettings< + UpgradeNotebookRuntimeRequest, + UpgradeNotebookRuntimeResponse, + UpgradeNotebookRuntimeOperationMetadata> + upgradeNotebookRuntimeOperationSettings; + private final UnaryCallSettings + startNotebookRuntimeSettings; + private final OperationCallSettings< + StartNotebookRuntimeRequest, + StartNotebookRuntimeResponse, + StartNotebookRuntimeOperationMetadata> + startNotebookRuntimeOperationSettings; + private final PagedCallSettings< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings getLocationSettings; + private final UnaryCallSettings setIamPolicySettings; + private final UnaryCallSettings getIamPolicySettings; + private final UnaryCallSettings + testIamPermissionsSettings; + + private static final PagedListDescriptor< + ListNotebookRuntimeTemplatesRequest, + ListNotebookRuntimeTemplatesResponse, + NotebookRuntimeTemplate> + LIST_NOTEBOOK_RUNTIME_TEMPLATES_PAGE_STR_DESC = + new PagedListDescriptor< + ListNotebookRuntimeTemplatesRequest, + ListNotebookRuntimeTemplatesResponse, + NotebookRuntimeTemplate>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListNotebookRuntimeTemplatesRequest injectToken( + ListNotebookRuntimeTemplatesRequest payload, String token) { + return ListNotebookRuntimeTemplatesRequest.newBuilder(payload) + .setPageToken(token) + .build(); + } + + @Override + public ListNotebookRuntimeTemplatesRequest injectPageSize( + ListNotebookRuntimeTemplatesRequest payload, int pageSize) { + return ListNotebookRuntimeTemplatesRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(ListNotebookRuntimeTemplatesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListNotebookRuntimeTemplatesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListNotebookRuntimeTemplatesResponse payload) { + return payload.getNotebookRuntimeTemplatesList() == null + ? ImmutableList.of() + : payload.getNotebookRuntimeTemplatesList(); + } + }; + + private static final PagedListDescriptor< + ListNotebookRuntimesRequest, ListNotebookRuntimesResponse, NotebookRuntime> + LIST_NOTEBOOK_RUNTIMES_PAGE_STR_DESC = + new PagedListDescriptor< + ListNotebookRuntimesRequest, ListNotebookRuntimesResponse, NotebookRuntime>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListNotebookRuntimesRequest injectToken( + ListNotebookRuntimesRequest payload, String token) { + return ListNotebookRuntimesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListNotebookRuntimesRequest injectPageSize( + ListNotebookRuntimesRequest payload, int pageSize) { + return ListNotebookRuntimesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListNotebookRuntimesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListNotebookRuntimesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListNotebookRuntimesResponse payload) { + return payload.getNotebookRuntimesList() == null + ? ImmutableList.of() + : payload.getNotebookRuntimesList(); + } + }; + + private static final PagedListDescriptor + LIST_LOCATIONS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListLocationsRequest injectToken(ListLocationsRequest payload, String token) { + return ListLocationsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListLocationsRequest injectPageSize(ListLocationsRequest payload, int pageSize) { + return ListLocationsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListLocationsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListLocationsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListLocationsResponse payload) { + return payload.getLocationsList() == null + ? ImmutableList.of() + : payload.getLocationsList(); + } + }; + + private static final PagedListResponseFactory< + ListNotebookRuntimeTemplatesRequest, + ListNotebookRuntimeTemplatesResponse, + ListNotebookRuntimeTemplatesPagedResponse> + LIST_NOTEBOOK_RUNTIME_TEMPLATES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListNotebookRuntimeTemplatesRequest, + ListNotebookRuntimeTemplatesResponse, + ListNotebookRuntimeTemplatesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable< + ListNotebookRuntimeTemplatesRequest, ListNotebookRuntimeTemplatesResponse> + callable, + ListNotebookRuntimeTemplatesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListNotebookRuntimeTemplatesRequest, + ListNotebookRuntimeTemplatesResponse, + NotebookRuntimeTemplate> + pageContext = + PageContext.create( + callable, + LIST_NOTEBOOK_RUNTIME_TEMPLATES_PAGE_STR_DESC, + request, + context); + return ListNotebookRuntimeTemplatesPagedResponse.createAsync( + pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListNotebookRuntimesRequest, + ListNotebookRuntimesResponse, + ListNotebookRuntimesPagedResponse> + LIST_NOTEBOOK_RUNTIMES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListNotebookRuntimesRequest, + ListNotebookRuntimesResponse, + ListNotebookRuntimesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListNotebookRuntimesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListNotebookRuntimesRequest, ListNotebookRuntimesResponse, NotebookRuntime> + pageContext = + PageContext.create( + callable, LIST_NOTEBOOK_RUNTIMES_PAGE_STR_DESC, request, context); + return ListNotebookRuntimesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + LIST_LOCATIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListLocationsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_LOCATIONS_PAGE_STR_DESC, request, context); + return ListLocationsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to createNotebookRuntimeTemplate. */ + public UnaryCallSettings + createNotebookRuntimeTemplateSettings() { + return createNotebookRuntimeTemplateSettings; + } + + /** Returns the object with the settings used for calls to createNotebookRuntimeTemplate. */ + public OperationCallSettings< + CreateNotebookRuntimeTemplateRequest, + NotebookRuntimeTemplate, + CreateNotebookRuntimeTemplateOperationMetadata> + createNotebookRuntimeTemplateOperationSettings() { + return createNotebookRuntimeTemplateOperationSettings; + } + + /** Returns the object with the settings used for calls to getNotebookRuntimeTemplate. */ + public UnaryCallSettings + getNotebookRuntimeTemplateSettings() { + return getNotebookRuntimeTemplateSettings; + } + + /** Returns the object with the settings used for calls to listNotebookRuntimeTemplates. */ + public PagedCallSettings< + ListNotebookRuntimeTemplatesRequest, + ListNotebookRuntimeTemplatesResponse, + ListNotebookRuntimeTemplatesPagedResponse> + listNotebookRuntimeTemplatesSettings() { + return listNotebookRuntimeTemplatesSettings; + } + + /** Returns the object with the settings used for calls to deleteNotebookRuntimeTemplate. */ + public UnaryCallSettings + deleteNotebookRuntimeTemplateSettings() { + return deleteNotebookRuntimeTemplateSettings; + } + + /** Returns the object with the settings used for calls to deleteNotebookRuntimeTemplate. */ + public OperationCallSettings + deleteNotebookRuntimeTemplateOperationSettings() { + return deleteNotebookRuntimeTemplateOperationSettings; + } + + /** Returns the object with the settings used for calls to assignNotebookRuntime. */ + public UnaryCallSettings + assignNotebookRuntimeSettings() { + return assignNotebookRuntimeSettings; + } + + /** Returns the object with the settings used for calls to assignNotebookRuntime. */ + public OperationCallSettings< + AssignNotebookRuntimeRequest, NotebookRuntime, AssignNotebookRuntimeOperationMetadata> + assignNotebookRuntimeOperationSettings() { + return assignNotebookRuntimeOperationSettings; + } + + /** Returns the object with the settings used for calls to getNotebookRuntime. */ + public UnaryCallSettings + getNotebookRuntimeSettings() { + return getNotebookRuntimeSettings; + } + + /** Returns the object with the settings used for calls to listNotebookRuntimes. */ + public PagedCallSettings< + ListNotebookRuntimesRequest, + ListNotebookRuntimesResponse, + ListNotebookRuntimesPagedResponse> + listNotebookRuntimesSettings() { + return listNotebookRuntimesSettings; + } + + /** Returns the object with the settings used for calls to deleteNotebookRuntime. */ + public UnaryCallSettings + deleteNotebookRuntimeSettings() { + return deleteNotebookRuntimeSettings; + } + + /** Returns the object with the settings used for calls to deleteNotebookRuntime. */ + public OperationCallSettings + deleteNotebookRuntimeOperationSettings() { + return deleteNotebookRuntimeOperationSettings; + } + + /** Returns the object with the settings used for calls to upgradeNotebookRuntime. */ + public UnaryCallSettings + upgradeNotebookRuntimeSettings() { + return upgradeNotebookRuntimeSettings; + } + + /** Returns the object with the settings used for calls to upgradeNotebookRuntime. */ + public OperationCallSettings< + UpgradeNotebookRuntimeRequest, + UpgradeNotebookRuntimeResponse, + UpgradeNotebookRuntimeOperationMetadata> + upgradeNotebookRuntimeOperationSettings() { + return upgradeNotebookRuntimeOperationSettings; + } + + /** Returns the object with the settings used for calls to startNotebookRuntime. */ + public UnaryCallSettings startNotebookRuntimeSettings() { + return startNotebookRuntimeSettings; + } + + /** Returns the object with the settings used for calls to startNotebookRuntime. */ + public OperationCallSettings< + StartNotebookRuntimeRequest, + StartNotebookRuntimeResponse, + StartNotebookRuntimeOperationMetadata> + startNotebookRuntimeOperationSettings() { + return startNotebookRuntimeOperationSettings; + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return getLocationSettings; + } + + /** Returns the object with the settings used for calls to setIamPolicy. */ + public UnaryCallSettings setIamPolicySettings() { + return setIamPolicySettings; + } + + /** Returns the object with the settings used for calls to getIamPolicy. */ + public UnaryCallSettings getIamPolicySettings() { + return getIamPolicySettings; + } + + /** Returns the object with the settings used for calls to testIamPermissions. */ + public UnaryCallSettings + testIamPermissionsSettings() { + return testIamPermissionsSettings; + } + + public NotebookServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcNotebookServiceStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns the endpoint set by the user or the the service's default endpoint. */ + @Override + public String getEndpoint() { + if (super.getEndpoint() != null) { + return super.getEndpoint(); + } + return getDefaultEndpoint(); + } + + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "aiplatform"; + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "aiplatform.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "aiplatform.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(NotebookServiceStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected NotebookServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + createNotebookRuntimeTemplateSettings = + settingsBuilder.createNotebookRuntimeTemplateSettings().build(); + createNotebookRuntimeTemplateOperationSettings = + settingsBuilder.createNotebookRuntimeTemplateOperationSettings().build(); + getNotebookRuntimeTemplateSettings = + settingsBuilder.getNotebookRuntimeTemplateSettings().build(); + listNotebookRuntimeTemplatesSettings = + settingsBuilder.listNotebookRuntimeTemplatesSettings().build(); + deleteNotebookRuntimeTemplateSettings = + settingsBuilder.deleteNotebookRuntimeTemplateSettings().build(); + deleteNotebookRuntimeTemplateOperationSettings = + settingsBuilder.deleteNotebookRuntimeTemplateOperationSettings().build(); + assignNotebookRuntimeSettings = settingsBuilder.assignNotebookRuntimeSettings().build(); + assignNotebookRuntimeOperationSettings = + settingsBuilder.assignNotebookRuntimeOperationSettings().build(); + getNotebookRuntimeSettings = settingsBuilder.getNotebookRuntimeSettings().build(); + listNotebookRuntimesSettings = settingsBuilder.listNotebookRuntimesSettings().build(); + deleteNotebookRuntimeSettings = settingsBuilder.deleteNotebookRuntimeSettings().build(); + deleteNotebookRuntimeOperationSettings = + settingsBuilder.deleteNotebookRuntimeOperationSettings().build(); + upgradeNotebookRuntimeSettings = settingsBuilder.upgradeNotebookRuntimeSettings().build(); + upgradeNotebookRuntimeOperationSettings = + settingsBuilder.upgradeNotebookRuntimeOperationSettings().build(); + startNotebookRuntimeSettings = settingsBuilder.startNotebookRuntimeSettings().build(); + startNotebookRuntimeOperationSettings = + settingsBuilder.startNotebookRuntimeOperationSettings().build(); + listLocationsSettings = settingsBuilder.listLocationsSettings().build(); + getLocationSettings = settingsBuilder.getLocationSettings().build(); + setIamPolicySettings = settingsBuilder.setIamPolicySettings().build(); + getIamPolicySettings = settingsBuilder.getIamPolicySettings().build(); + testIamPermissionsSettings = settingsBuilder.testIamPermissionsSettings().build(); + } + + /** Builder for NotebookServiceStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder + createNotebookRuntimeTemplateSettings; + private final OperationCallSettings.Builder< + CreateNotebookRuntimeTemplateRequest, + NotebookRuntimeTemplate, + CreateNotebookRuntimeTemplateOperationMetadata> + createNotebookRuntimeTemplateOperationSettings; + private final UnaryCallSettings.Builder< + GetNotebookRuntimeTemplateRequest, NotebookRuntimeTemplate> + getNotebookRuntimeTemplateSettings; + private final PagedCallSettings.Builder< + ListNotebookRuntimeTemplatesRequest, + ListNotebookRuntimeTemplatesResponse, + ListNotebookRuntimeTemplatesPagedResponse> + listNotebookRuntimeTemplatesSettings; + private final UnaryCallSettings.Builder + deleteNotebookRuntimeTemplateSettings; + private final OperationCallSettings.Builder< + DeleteNotebookRuntimeTemplateRequest, Empty, DeleteOperationMetadata> + deleteNotebookRuntimeTemplateOperationSettings; + private final UnaryCallSettings.Builder + assignNotebookRuntimeSettings; + private final OperationCallSettings.Builder< + AssignNotebookRuntimeRequest, NotebookRuntime, AssignNotebookRuntimeOperationMetadata> + assignNotebookRuntimeOperationSettings; + private final UnaryCallSettings.Builder + getNotebookRuntimeSettings; + private final PagedCallSettings.Builder< + ListNotebookRuntimesRequest, + ListNotebookRuntimesResponse, + ListNotebookRuntimesPagedResponse> + listNotebookRuntimesSettings; + private final UnaryCallSettings.Builder + deleteNotebookRuntimeSettings; + private final OperationCallSettings.Builder< + DeleteNotebookRuntimeRequest, Empty, DeleteOperationMetadata> + deleteNotebookRuntimeOperationSettings; + private final UnaryCallSettings.Builder + upgradeNotebookRuntimeSettings; + private final OperationCallSettings.Builder< + UpgradeNotebookRuntimeRequest, + UpgradeNotebookRuntimeResponse, + UpgradeNotebookRuntimeOperationMetadata> + upgradeNotebookRuntimeOperationSettings; + private final UnaryCallSettings.Builder + startNotebookRuntimeSettings; + private final OperationCallSettings.Builder< + StartNotebookRuntimeRequest, + StartNotebookRuntimeResponse, + StartNotebookRuntimeOperationMetadata> + startNotebookRuntimeOperationSettings; + private final PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings.Builder getLocationSettings; + private final UnaryCallSettings.Builder setIamPolicySettings; + private final UnaryCallSettings.Builder getIamPolicySettings; + private final UnaryCallSettings.Builder + testIamPermissionsSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); + definitions.put("no_retry_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + createNotebookRuntimeTemplateSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createNotebookRuntimeTemplateOperationSettings = OperationCallSettings.newBuilder(); + getNotebookRuntimeTemplateSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listNotebookRuntimeTemplatesSettings = + PagedCallSettings.newBuilder(LIST_NOTEBOOK_RUNTIME_TEMPLATES_PAGE_STR_FACT); + deleteNotebookRuntimeTemplateSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteNotebookRuntimeTemplateOperationSettings = OperationCallSettings.newBuilder(); + assignNotebookRuntimeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + assignNotebookRuntimeOperationSettings = OperationCallSettings.newBuilder(); + getNotebookRuntimeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listNotebookRuntimesSettings = + PagedCallSettings.newBuilder(LIST_NOTEBOOK_RUNTIMES_PAGE_STR_FACT); + deleteNotebookRuntimeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteNotebookRuntimeOperationSettings = OperationCallSettings.newBuilder(); + upgradeNotebookRuntimeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + upgradeNotebookRuntimeOperationSettings = OperationCallSettings.newBuilder(); + startNotebookRuntimeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + startNotebookRuntimeOperationSettings = OperationCallSettings.newBuilder(); + listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); + getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + setIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + testIamPermissionsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createNotebookRuntimeTemplateSettings, + getNotebookRuntimeTemplateSettings, + listNotebookRuntimeTemplatesSettings, + deleteNotebookRuntimeTemplateSettings, + assignNotebookRuntimeSettings, + getNotebookRuntimeSettings, + listNotebookRuntimesSettings, + deleteNotebookRuntimeSettings, + upgradeNotebookRuntimeSettings, + startNotebookRuntimeSettings, + listLocationsSettings, + getLocationSettings, + setIamPolicySettings, + getIamPolicySettings, + testIamPermissionsSettings); + initDefaults(this); + } + + protected Builder(NotebookServiceStubSettings settings) { + super(settings); + + createNotebookRuntimeTemplateSettings = + settings.createNotebookRuntimeTemplateSettings.toBuilder(); + createNotebookRuntimeTemplateOperationSettings = + settings.createNotebookRuntimeTemplateOperationSettings.toBuilder(); + getNotebookRuntimeTemplateSettings = settings.getNotebookRuntimeTemplateSettings.toBuilder(); + listNotebookRuntimeTemplatesSettings = + settings.listNotebookRuntimeTemplatesSettings.toBuilder(); + deleteNotebookRuntimeTemplateSettings = + settings.deleteNotebookRuntimeTemplateSettings.toBuilder(); + deleteNotebookRuntimeTemplateOperationSettings = + settings.deleteNotebookRuntimeTemplateOperationSettings.toBuilder(); + assignNotebookRuntimeSettings = settings.assignNotebookRuntimeSettings.toBuilder(); + assignNotebookRuntimeOperationSettings = + settings.assignNotebookRuntimeOperationSettings.toBuilder(); + getNotebookRuntimeSettings = settings.getNotebookRuntimeSettings.toBuilder(); + listNotebookRuntimesSettings = settings.listNotebookRuntimesSettings.toBuilder(); + deleteNotebookRuntimeSettings = settings.deleteNotebookRuntimeSettings.toBuilder(); + deleteNotebookRuntimeOperationSettings = + settings.deleteNotebookRuntimeOperationSettings.toBuilder(); + upgradeNotebookRuntimeSettings = settings.upgradeNotebookRuntimeSettings.toBuilder(); + upgradeNotebookRuntimeOperationSettings = + settings.upgradeNotebookRuntimeOperationSettings.toBuilder(); + startNotebookRuntimeSettings = settings.startNotebookRuntimeSettings.toBuilder(); + startNotebookRuntimeOperationSettings = + settings.startNotebookRuntimeOperationSettings.toBuilder(); + listLocationsSettings = settings.listLocationsSettings.toBuilder(); + getLocationSettings = settings.getLocationSettings.toBuilder(); + setIamPolicySettings = settings.setIamPolicySettings.toBuilder(); + getIamPolicySettings = settings.getIamPolicySettings.toBuilder(); + testIamPermissionsSettings = settings.testIamPermissionsSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createNotebookRuntimeTemplateSettings, + getNotebookRuntimeTemplateSettings, + listNotebookRuntimeTemplatesSettings, + deleteNotebookRuntimeTemplateSettings, + assignNotebookRuntimeSettings, + getNotebookRuntimeSettings, + listNotebookRuntimesSettings, + deleteNotebookRuntimeSettings, + upgradeNotebookRuntimeSettings, + startNotebookRuntimeSettings, + listLocationsSettings, + getLocationSettings, + setIamPolicySettings, + getIamPolicySettings, + testIamPermissionsSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .createNotebookRuntimeTemplateSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getNotebookRuntimeTemplateSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listNotebookRuntimeTemplatesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .deleteNotebookRuntimeTemplateSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .assignNotebookRuntimeSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getNotebookRuntimeSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listNotebookRuntimesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .deleteNotebookRuntimeSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .upgradeNotebookRuntimeSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .startNotebookRuntimeSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listLocationsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getLocationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .setIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .testIamPermissionsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .createNotebookRuntimeTemplateOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + . + newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(NotebookRuntimeTemplate.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + CreateNotebookRuntimeTemplateOperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteNotebookRuntimeTemplateOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + . + newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(DeleteOperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .assignNotebookRuntimeOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(NotebookRuntime.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + AssignNotebookRuntimeOperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteNotebookRuntimeOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(DeleteOperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .upgradeNotebookRuntimeOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create( + UpgradeNotebookRuntimeResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + UpgradeNotebookRuntimeOperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .startNotebookRuntimeOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create( + StartNotebookRuntimeResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + StartNotebookRuntimeOperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to createNotebookRuntimeTemplate. */ + public UnaryCallSettings.Builder + createNotebookRuntimeTemplateSettings() { + return createNotebookRuntimeTemplateSettings; + } + + /** Returns the builder for the settings used for calls to createNotebookRuntimeTemplate. */ + public OperationCallSettings.Builder< + CreateNotebookRuntimeTemplateRequest, + NotebookRuntimeTemplate, + CreateNotebookRuntimeTemplateOperationMetadata> + createNotebookRuntimeTemplateOperationSettings() { + return createNotebookRuntimeTemplateOperationSettings; + } + + /** Returns the builder for the settings used for calls to getNotebookRuntimeTemplate. */ + public UnaryCallSettings.Builder + getNotebookRuntimeTemplateSettings() { + return getNotebookRuntimeTemplateSettings; + } + + /** Returns the builder for the settings used for calls to listNotebookRuntimeTemplates. */ + public PagedCallSettings.Builder< + ListNotebookRuntimeTemplatesRequest, + ListNotebookRuntimeTemplatesResponse, + ListNotebookRuntimeTemplatesPagedResponse> + listNotebookRuntimeTemplatesSettings() { + return listNotebookRuntimeTemplatesSettings; + } + + /** Returns the builder for the settings used for calls to deleteNotebookRuntimeTemplate. */ + public UnaryCallSettings.Builder + deleteNotebookRuntimeTemplateSettings() { + return deleteNotebookRuntimeTemplateSettings; + } + + /** Returns the builder for the settings used for calls to deleteNotebookRuntimeTemplate. */ + public OperationCallSettings.Builder< + DeleteNotebookRuntimeTemplateRequest, Empty, DeleteOperationMetadata> + deleteNotebookRuntimeTemplateOperationSettings() { + return deleteNotebookRuntimeTemplateOperationSettings; + } + + /** Returns the builder for the settings used for calls to assignNotebookRuntime. */ + public UnaryCallSettings.Builder + assignNotebookRuntimeSettings() { + return assignNotebookRuntimeSettings; + } + + /** Returns the builder for the settings used for calls to assignNotebookRuntime. */ + public OperationCallSettings.Builder< + AssignNotebookRuntimeRequest, NotebookRuntime, AssignNotebookRuntimeOperationMetadata> + assignNotebookRuntimeOperationSettings() { + return assignNotebookRuntimeOperationSettings; + } + + /** Returns the builder for the settings used for calls to getNotebookRuntime. */ + public UnaryCallSettings.Builder + getNotebookRuntimeSettings() { + return getNotebookRuntimeSettings; + } + + /** Returns the builder for the settings used for calls to listNotebookRuntimes. */ + public PagedCallSettings.Builder< + ListNotebookRuntimesRequest, + ListNotebookRuntimesResponse, + ListNotebookRuntimesPagedResponse> + listNotebookRuntimesSettings() { + return listNotebookRuntimesSettings; + } + + /** Returns the builder for the settings used for calls to deleteNotebookRuntime. */ + public UnaryCallSettings.Builder + deleteNotebookRuntimeSettings() { + return deleteNotebookRuntimeSettings; + } + + /** Returns the builder for the settings used for calls to deleteNotebookRuntime. */ + public OperationCallSettings.Builder< + DeleteNotebookRuntimeRequest, Empty, DeleteOperationMetadata> + deleteNotebookRuntimeOperationSettings() { + return deleteNotebookRuntimeOperationSettings; + } + + /** Returns the builder for the settings used for calls to upgradeNotebookRuntime. */ + public UnaryCallSettings.Builder + upgradeNotebookRuntimeSettings() { + return upgradeNotebookRuntimeSettings; + } + + /** Returns the builder for the settings used for calls to upgradeNotebookRuntime. */ + public OperationCallSettings.Builder< + UpgradeNotebookRuntimeRequest, + UpgradeNotebookRuntimeResponse, + UpgradeNotebookRuntimeOperationMetadata> + upgradeNotebookRuntimeOperationSettings() { + return upgradeNotebookRuntimeOperationSettings; + } + + /** Returns the builder for the settings used for calls to startNotebookRuntime. */ + public UnaryCallSettings.Builder + startNotebookRuntimeSettings() { + return startNotebookRuntimeSettings; + } + + /** Returns the builder for the settings used for calls to startNotebookRuntime. */ + public OperationCallSettings.Builder< + StartNotebookRuntimeRequest, + StartNotebookRuntimeResponse, + StartNotebookRuntimeOperationMetadata> + startNotebookRuntimeOperationSettings() { + return startNotebookRuntimeOperationSettings; + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getLocationSettings; + } + + /** Returns the builder for the settings used for calls to setIamPolicy. */ + public UnaryCallSettings.Builder setIamPolicySettings() { + return setIamPolicySettings; + } + + /** Returns the builder for the settings used for calls to getIamPolicy. */ + public UnaryCallSettings.Builder getIamPolicySettings() { + return getIamPolicySettings; + } + + /** Returns the builder for the settings used for calls to testIamPermissions. */ + public UnaryCallSettings.Builder + testIamPermissionsSettings() { + return testIamPermissionsSettings; + } + + /** Returns the endpoint set by the user or the the service's default endpoint. */ + @Override + public String getEndpoint() { + if (super.getEndpoint() != null) { + return super.getEndpoint(); + } + return getDefaultEndpoint(); + } + + @Override + public NotebookServiceStubSettings build() throws IOException { + return new NotebookServiceStubSettings(this); + } + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/PersistentResourceServiceStub.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/PersistentResourceServiceStub.java index 9f32d779eb7e..6c84274bfb4c 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/PersistentResourceServiceStub.java +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/PersistentResourceServiceStub.java @@ -31,6 +31,8 @@ import com.google.cloud.aiplatform.v1beta1.ListPersistentResourcesRequest; import com.google.cloud.aiplatform.v1beta1.ListPersistentResourcesResponse; import com.google.cloud.aiplatform.v1beta1.PersistentResource; +import com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceOperationMetadata; +import com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceRequest; import com.google.cloud.aiplatform.v1beta1.UpdatePersistentResourceOperationMetadata; import com.google.cloud.aiplatform.v1beta1.UpdatePersistentResourceRequest; import com.google.cloud.location.GetLocationRequest; @@ -116,6 +118,20 @@ public OperationsStub getOperationsStub() { throw new UnsupportedOperationException("Not implemented: updatePersistentResourceCallable()"); } + public OperationCallable< + RebootPersistentResourceRequest, + PersistentResource, + RebootPersistentResourceOperationMetadata> + rebootPersistentResourceOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: rebootPersistentResourceOperationCallable()"); + } + + public UnaryCallable + rebootPersistentResourceCallable() { + throw new UnsupportedOperationException("Not implemented: rebootPersistentResourceCallable()"); + } + public UnaryCallable listLocationsPagedCallable() { throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()"); diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/PersistentResourceServiceStubSettings.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/PersistentResourceServiceStubSettings.java index 35195e9d3677..e15eedc609ea 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/PersistentResourceServiceStubSettings.java +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/PersistentResourceServiceStubSettings.java @@ -53,6 +53,8 @@ import com.google.cloud.aiplatform.v1beta1.ListPersistentResourcesRequest; import com.google.cloud.aiplatform.v1beta1.ListPersistentResourcesResponse; import com.google.cloud.aiplatform.v1beta1.PersistentResource; +import com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceOperationMetadata; +import com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceRequest; import com.google.cloud.aiplatform.v1beta1.UpdatePersistentResourceOperationMetadata; import com.google.cloud.aiplatform.v1beta1.UpdatePersistentResourceRequest; import com.google.cloud.location.GetLocationRequest; @@ -147,6 +149,13 @@ public class PersistentResourceServiceStubSettings PersistentResource, UpdatePersistentResourceOperationMetadata> updatePersistentResourceOperationSettings; + private final UnaryCallSettings + rebootPersistentResourceSettings; + private final OperationCallSettings< + RebootPersistentResourceRequest, + PersistentResource, + RebootPersistentResourceOperationMetadata> + rebootPersistentResourceOperationSettings; private final PagedCallSettings< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> listLocationsSettings; @@ -338,6 +347,21 @@ public ApiFuture getFuturePagedResponse( return updatePersistentResourceOperationSettings; } + /** Returns the object with the settings used for calls to rebootPersistentResource. */ + public UnaryCallSettings + rebootPersistentResourceSettings() { + return rebootPersistentResourceSettings; + } + + /** Returns the object with the settings used for calls to rebootPersistentResource. */ + public OperationCallSettings< + RebootPersistentResourceRequest, + PersistentResource, + RebootPersistentResourceOperationMetadata> + rebootPersistentResourceOperationSettings() { + return rebootPersistentResourceOperationSettings; + } + /** Returns the object with the settings used for calls to listLocations. */ public PagedCallSettings listLocationsSettings() { @@ -465,6 +489,9 @@ protected PersistentResourceServiceStubSettings(Builder settingsBuilder) throws updatePersistentResourceSettings = settingsBuilder.updatePersistentResourceSettings().build(); updatePersistentResourceOperationSettings = settingsBuilder.updatePersistentResourceOperationSettings().build(); + rebootPersistentResourceSettings = settingsBuilder.rebootPersistentResourceSettings().build(); + rebootPersistentResourceOperationSettings = + settingsBuilder.rebootPersistentResourceOperationSettings().build(); listLocationsSettings = settingsBuilder.listLocationsSettings().build(); getLocationSettings = settingsBuilder.getLocationSettings().build(); setIamPolicySettings = settingsBuilder.setIamPolicySettings().build(); @@ -502,6 +529,13 @@ public static class Builder PersistentResource, UpdatePersistentResourceOperationMetadata> updatePersistentResourceOperationSettings; + private final UnaryCallSettings.Builder + rebootPersistentResourceSettings; + private final OperationCallSettings.Builder< + RebootPersistentResourceRequest, + PersistentResource, + RebootPersistentResourceOperationMetadata> + rebootPersistentResourceOperationSettings; private final PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> listLocationsSettings; @@ -546,6 +580,8 @@ protected Builder(ClientContext clientContext) { deletePersistentResourceOperationSettings = OperationCallSettings.newBuilder(); updatePersistentResourceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); updatePersistentResourceOperationSettings = OperationCallSettings.newBuilder(); + rebootPersistentResourceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + rebootPersistentResourceOperationSettings = OperationCallSettings.newBuilder(); listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); setIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); @@ -559,6 +595,7 @@ protected Builder(ClientContext clientContext) { listPersistentResourcesSettings, deletePersistentResourceSettings, updatePersistentResourceSettings, + rebootPersistentResourceSettings, listLocationsSettings, getLocationSettings, setIamPolicySettings, @@ -581,6 +618,9 @@ protected Builder(PersistentResourceServiceStubSettings settings) { updatePersistentResourceSettings = settings.updatePersistentResourceSettings.toBuilder(); updatePersistentResourceOperationSettings = settings.updatePersistentResourceOperationSettings.toBuilder(); + rebootPersistentResourceSettings = settings.rebootPersistentResourceSettings.toBuilder(); + rebootPersistentResourceOperationSettings = + settings.rebootPersistentResourceOperationSettings.toBuilder(); listLocationsSettings = settings.listLocationsSettings.toBuilder(); getLocationSettings = settings.getLocationSettings.toBuilder(); setIamPolicySettings = settings.setIamPolicySettings.toBuilder(); @@ -594,6 +634,7 @@ protected Builder(PersistentResourceServiceStubSettings settings) { listPersistentResourcesSettings, deletePersistentResourceSettings, updatePersistentResourceSettings, + rebootPersistentResourceSettings, listLocationsSettings, getLocationSettings, setIamPolicySettings, @@ -639,6 +680,11 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + builder + .rebootPersistentResourceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + builder .listLocationsSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) @@ -738,6 +784,31 @@ private static Builder initDefaults(Builder builder) { .setTotalTimeout(Duration.ofMillis(300000L)) .build())); + builder + .rebootPersistentResourceOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(PersistentResource.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + RebootPersistentResourceOperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + return builder; } @@ -814,6 +885,21 @@ public Builder applyToAllUnaryMethods( return updatePersistentResourceOperationSettings; } + /** Returns the builder for the settings used for calls to rebootPersistentResource. */ + public UnaryCallSettings.Builder + rebootPersistentResourceSettings() { + return rebootPersistentResourceSettings; + } + + /** Returns the builder for the settings used for calls to rebootPersistentResource. */ + public OperationCallSettings.Builder< + RebootPersistentResourceRequest, + PersistentResource, + RebootPersistentResourceOperationMetadata> + rebootPersistentResourceOperationSettings() { + return rebootPersistentResourceOperationSettings; + } + /** Returns the builder for the settings used for calls to listLocations. */ public PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/PredictionServiceStub.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/PredictionServiceStub.java index ed3c1f5cbcad..c2b8f4733fa0 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/PredictionServiceStub.java +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/PredictionServiceStub.java @@ -24,6 +24,7 @@ import com.google.api.gax.rpc.BidiStreamingCallable; import com.google.api.gax.rpc.ServerStreamingCallable; import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.aiplatform.v1beta1.ChatCompletionsRequest; import com.google.cloud.aiplatform.v1beta1.CountTokensRequest; import com.google.cloud.aiplatform.v1beta1.CountTokensResponse; import com.google.cloud.aiplatform.v1beta1.DirectPredictRequest; @@ -125,6 +126,10 @@ public UnaryCallable generateCo throw new UnsupportedOperationException("Not implemented: streamGenerateContentCallable()"); } + public ServerStreamingCallable chatCompletionsCallable() { + throw new UnsupportedOperationException("Not implemented: chatCompletionsCallable()"); + } + public UnaryCallable listLocationsPagedCallable() { throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()"); diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/PredictionServiceStubSettings.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/PredictionServiceStubSettings.java index c72dcc54c831..8142ec1c9ae1 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/PredictionServiceStubSettings.java +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/PredictionServiceStubSettings.java @@ -43,6 +43,7 @@ import com.google.api.gax.rpc.TransportChannelProvider; import com.google.api.gax.rpc.UnaryCallSettings; import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.aiplatform.v1beta1.ChatCompletionsRequest; import com.google.cloud.aiplatform.v1beta1.CountTokensRequest; import com.google.cloud.aiplatform.v1beta1.CountTokensResponse; import com.google.cloud.aiplatform.v1beta1.DirectPredictRequest; @@ -149,6 +150,8 @@ public class PredictionServiceStubSettings extends StubSettings streamGenerateContentSettings; + private final ServerStreamingCallSettings + chatCompletionsSettings; private final PagedCallSettings< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> listLocationsSettings; @@ -284,6 +287,11 @@ public UnaryCallSettings countTokensSet return streamGenerateContentSettings; } + /** Returns the object with the settings used for calls to chatCompletions. */ + public ServerStreamingCallSettings chatCompletionsSettings() { + return chatCompletionsSettings; + } + /** Returns the object with the settings used for calls to listLocations. */ public PagedCallSettings listLocationsSettings() { @@ -413,6 +421,7 @@ protected PredictionServiceStubSettings(Builder settingsBuilder) throws IOExcept countTokensSettings = settingsBuilder.countTokensSettings().build(); generateContentSettings = settingsBuilder.generateContentSettings().build(); streamGenerateContentSettings = settingsBuilder.streamGenerateContentSettings().build(); + chatCompletionsSettings = settingsBuilder.chatCompletionsSettings().build(); listLocationsSettings = settingsBuilder.listLocationsSettings().build(); getLocationSettings = settingsBuilder.getLocationSettings().build(); setIamPolicySettings = settingsBuilder.setIamPolicySettings().build(); @@ -451,6 +460,8 @@ public static class Builder extends StubSettings.Builder streamGenerateContentSettings; + private final ServerStreamingCallSettings.Builder + chatCompletionsSettings; private final PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> listLocationsSettings; @@ -509,6 +520,7 @@ protected Builder(ClientContext clientContext) { countTokensSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); generateContentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); streamGenerateContentSettings = ServerStreamingCallSettings.newBuilder(); + chatCompletionsSettings = ServerStreamingCallSettings.newBuilder(); listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); setIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); @@ -548,6 +560,7 @@ protected Builder(PredictionServiceStubSettings settings) { countTokensSettings = settings.countTokensSettings.toBuilder(); generateContentSettings = settings.generateContentSettings.toBuilder(); streamGenerateContentSettings = settings.streamGenerateContentSettings.toBuilder(); + chatCompletionsSettings = settings.chatCompletionsSettings.toBuilder(); listLocationsSettings = settings.listLocationsSettings.toBuilder(); getLocationSettings = settings.getLocationSettings.toBuilder(); setIamPolicySettings = settings.setIamPolicySettings.toBuilder(); @@ -628,6 +641,11 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + builder + .chatCompletionsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + builder .listLocationsSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) @@ -747,6 +765,12 @@ public UnaryCallSettings.Builder explainSetting return streamGenerateContentSettings; } + /** Returns the builder for the settings used for calls to chatCompletions. */ + public ServerStreamingCallSettings.Builder + chatCompletionsSettings() { + return chatCompletionsSettings; + } + /** Returns the builder for the settings used for calls to listLocations. */ public PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/VertexRagDataServiceStub.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/VertexRagDataServiceStub.java new file mode 100644 index 000000000000..593b7241f006 --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/VertexRagDataServiceStub.java @@ -0,0 +1,167 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.stub; + +import static com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceClient.ListLocationsPagedResponse; +import static com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceClient.ListRagCorporaPagedResponse; +import static com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceClient.ListRagFilesPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.aiplatform.v1beta1.CreateRagCorpusOperationMetadata; +import com.google.cloud.aiplatform.v1beta1.CreateRagCorpusRequest; +import com.google.cloud.aiplatform.v1beta1.DeleteOperationMetadata; +import com.google.cloud.aiplatform.v1beta1.DeleteRagCorpusRequest; +import com.google.cloud.aiplatform.v1beta1.DeleteRagFileRequest; +import com.google.cloud.aiplatform.v1beta1.GetRagCorpusRequest; +import com.google.cloud.aiplatform.v1beta1.GetRagFileRequest; +import com.google.cloud.aiplatform.v1beta1.ImportRagFilesOperationMetadata; +import com.google.cloud.aiplatform.v1beta1.ImportRagFilesRequest; +import com.google.cloud.aiplatform.v1beta1.ImportRagFilesResponse; +import com.google.cloud.aiplatform.v1beta1.ListRagCorporaRequest; +import com.google.cloud.aiplatform.v1beta1.ListRagCorporaResponse; +import com.google.cloud.aiplatform.v1beta1.ListRagFilesRequest; +import com.google.cloud.aiplatform.v1beta1.ListRagFilesResponse; +import com.google.cloud.aiplatform.v1beta1.RagCorpus; +import com.google.cloud.aiplatform.v1beta1.RagFile; +import com.google.cloud.aiplatform.v1beta1.UploadRagFileRequest; +import com.google.cloud.aiplatform.v1beta1.UploadRagFileResponse; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the VertexRagDataService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public abstract class VertexRagDataServiceStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + throw new UnsupportedOperationException("Not implemented: getOperationsStub()"); + } + + public OperationCallable + createRagCorpusOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createRagCorpusOperationCallable()"); + } + + public UnaryCallable createRagCorpusCallable() { + throw new UnsupportedOperationException("Not implemented: createRagCorpusCallable()"); + } + + public UnaryCallable getRagCorpusCallable() { + throw new UnsupportedOperationException("Not implemented: getRagCorpusCallable()"); + } + + public UnaryCallable + listRagCorporaPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listRagCorporaPagedCallable()"); + } + + public UnaryCallable listRagCorporaCallable() { + throw new UnsupportedOperationException("Not implemented: listRagCorporaCallable()"); + } + + public OperationCallable + deleteRagCorpusOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteRagCorpusOperationCallable()"); + } + + public UnaryCallable deleteRagCorpusCallable() { + throw new UnsupportedOperationException("Not implemented: deleteRagCorpusCallable()"); + } + + public UnaryCallable uploadRagFileCallable() { + throw new UnsupportedOperationException("Not implemented: uploadRagFileCallable()"); + } + + public OperationCallable< + ImportRagFilesRequest, ImportRagFilesResponse, ImportRagFilesOperationMetadata> + importRagFilesOperationCallable() { + throw new UnsupportedOperationException("Not implemented: importRagFilesOperationCallable()"); + } + + public UnaryCallable importRagFilesCallable() { + throw new UnsupportedOperationException("Not implemented: importRagFilesCallable()"); + } + + public UnaryCallable getRagFileCallable() { + throw new UnsupportedOperationException("Not implemented: getRagFileCallable()"); + } + + public UnaryCallable listRagFilesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listRagFilesPagedCallable()"); + } + + public UnaryCallable listRagFilesCallable() { + throw new UnsupportedOperationException("Not implemented: listRagFilesCallable()"); + } + + public OperationCallable + deleteRagFileOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteRagFileOperationCallable()"); + } + + public UnaryCallable deleteRagFileCallable() { + throw new UnsupportedOperationException("Not implemented: deleteRagFileCallable()"); + } + + public UnaryCallable + listLocationsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()"); + } + + public UnaryCallable listLocationsCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsCallable()"); + } + + public UnaryCallable getLocationCallable() { + throw new UnsupportedOperationException("Not implemented: getLocationCallable()"); + } + + public UnaryCallable setIamPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: setIamPolicyCallable()"); + } + + public UnaryCallable getIamPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: getIamPolicyCallable()"); + } + + public UnaryCallable + testIamPermissionsCallable() { + throw new UnsupportedOperationException("Not implemented: testIamPermissionsCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/VertexRagDataServiceStubSettings.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/VertexRagDataServiceStubSettings.java new file mode 100644 index 000000000000..45fa36f27ff8 --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/VertexRagDataServiceStubSettings.java @@ -0,0 +1,998 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.stub; + +import static com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceClient.ListLocationsPagedResponse; +import static com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceClient.ListRagCorporaPagedResponse; +import static com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceClient.ListRagFilesPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.aiplatform.v1beta1.CreateRagCorpusOperationMetadata; +import com.google.cloud.aiplatform.v1beta1.CreateRagCorpusRequest; +import com.google.cloud.aiplatform.v1beta1.DeleteOperationMetadata; +import com.google.cloud.aiplatform.v1beta1.DeleteRagCorpusRequest; +import com.google.cloud.aiplatform.v1beta1.DeleteRagFileRequest; +import com.google.cloud.aiplatform.v1beta1.GetRagCorpusRequest; +import com.google.cloud.aiplatform.v1beta1.GetRagFileRequest; +import com.google.cloud.aiplatform.v1beta1.ImportRagFilesOperationMetadata; +import com.google.cloud.aiplatform.v1beta1.ImportRagFilesRequest; +import com.google.cloud.aiplatform.v1beta1.ImportRagFilesResponse; +import com.google.cloud.aiplatform.v1beta1.ListRagCorporaRequest; +import com.google.cloud.aiplatform.v1beta1.ListRagCorporaResponse; +import com.google.cloud.aiplatform.v1beta1.ListRagFilesRequest; +import com.google.cloud.aiplatform.v1beta1.ListRagFilesResponse; +import com.google.cloud.aiplatform.v1beta1.RagCorpus; +import com.google.cloud.aiplatform.v1beta1.RagFile; +import com.google.cloud.aiplatform.v1beta1.UploadRagFileRequest; +import com.google.cloud.aiplatform.v1beta1.UploadRagFileResponse; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link VertexRagDataServiceStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (aiplatform.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of getRagCorpus to 30 seconds: + * + *

{@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
+ * VertexRagDataServiceStubSettings.Builder vertexRagDataServiceSettingsBuilder =
+ *     VertexRagDataServiceStubSettings.newBuilder();
+ * vertexRagDataServiceSettingsBuilder
+ *     .getRagCorpusSettings()
+ *     .setRetrySettings(
+ *         vertexRagDataServiceSettingsBuilder
+ *             .getRagCorpusSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * VertexRagDataServiceStubSettings vertexRagDataServiceSettings =
+ *     vertexRagDataServiceSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class VertexRagDataServiceStubSettings + extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final UnaryCallSettings createRagCorpusSettings; + private final OperationCallSettings< + CreateRagCorpusRequest, RagCorpus, CreateRagCorpusOperationMetadata> + createRagCorpusOperationSettings; + private final UnaryCallSettings getRagCorpusSettings; + private final PagedCallSettings< + ListRagCorporaRequest, ListRagCorporaResponse, ListRagCorporaPagedResponse> + listRagCorporaSettings; + private final UnaryCallSettings deleteRagCorpusSettings; + private final OperationCallSettings + deleteRagCorpusOperationSettings; + private final UnaryCallSettings + uploadRagFileSettings; + private final UnaryCallSettings importRagFilesSettings; + private final OperationCallSettings< + ImportRagFilesRequest, ImportRagFilesResponse, ImportRagFilesOperationMetadata> + importRagFilesOperationSettings; + private final UnaryCallSettings getRagFileSettings; + private final PagedCallSettings< + ListRagFilesRequest, ListRagFilesResponse, ListRagFilesPagedResponse> + listRagFilesSettings; + private final UnaryCallSettings deleteRagFileSettings; + private final OperationCallSettings + deleteRagFileOperationSettings; + private final PagedCallSettings< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings getLocationSettings; + private final UnaryCallSettings setIamPolicySettings; + private final UnaryCallSettings getIamPolicySettings; + private final UnaryCallSettings + testIamPermissionsSettings; + + private static final PagedListDescriptor + LIST_RAG_CORPORA_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListRagCorporaRequest injectToken(ListRagCorporaRequest payload, String token) { + return ListRagCorporaRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListRagCorporaRequest injectPageSize( + ListRagCorporaRequest payload, int pageSize) { + return ListRagCorporaRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListRagCorporaRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListRagCorporaResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListRagCorporaResponse payload) { + return payload.getRagCorporaList() == null + ? ImmutableList.of() + : payload.getRagCorporaList(); + } + }; + + private static final PagedListDescriptor + LIST_RAG_FILES_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListRagFilesRequest injectToken(ListRagFilesRequest payload, String token) { + return ListRagFilesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListRagFilesRequest injectPageSize(ListRagFilesRequest payload, int pageSize) { + return ListRagFilesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListRagFilesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListRagFilesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListRagFilesResponse payload) { + return payload.getRagFilesList() == null + ? ImmutableList.of() + : payload.getRagFilesList(); + } + }; + + private static final PagedListDescriptor + LIST_LOCATIONS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListLocationsRequest injectToken(ListLocationsRequest payload, String token) { + return ListLocationsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListLocationsRequest injectPageSize(ListLocationsRequest payload, int pageSize) { + return ListLocationsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListLocationsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListLocationsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListLocationsResponse payload) { + return payload.getLocationsList() == null + ? ImmutableList.of() + : payload.getLocationsList(); + } + }; + + private static final PagedListResponseFactory< + ListRagCorporaRequest, ListRagCorporaResponse, ListRagCorporaPagedResponse> + LIST_RAG_CORPORA_PAGE_STR_FACT = + new PagedListResponseFactory< + ListRagCorporaRequest, ListRagCorporaResponse, ListRagCorporaPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListRagCorporaRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_RAG_CORPORA_PAGE_STR_DESC, request, context); + return ListRagCorporaPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListRagFilesRequest, ListRagFilesResponse, ListRagFilesPagedResponse> + LIST_RAG_FILES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListRagFilesRequest, ListRagFilesResponse, ListRagFilesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListRagFilesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_RAG_FILES_PAGE_STR_DESC, request, context); + return ListRagFilesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + LIST_LOCATIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListLocationsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_LOCATIONS_PAGE_STR_DESC, request, context); + return ListLocationsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to createRagCorpus. */ + public UnaryCallSettings createRagCorpusSettings() { + return createRagCorpusSettings; + } + + /** Returns the object with the settings used for calls to createRagCorpus. */ + public OperationCallSettings + createRagCorpusOperationSettings() { + return createRagCorpusOperationSettings; + } + + /** Returns the object with the settings used for calls to getRagCorpus. */ + public UnaryCallSettings getRagCorpusSettings() { + return getRagCorpusSettings; + } + + /** Returns the object with the settings used for calls to listRagCorpora. */ + public PagedCallSettings< + ListRagCorporaRequest, ListRagCorporaResponse, ListRagCorporaPagedResponse> + listRagCorporaSettings() { + return listRagCorporaSettings; + } + + /** Returns the object with the settings used for calls to deleteRagCorpus. */ + public UnaryCallSettings deleteRagCorpusSettings() { + return deleteRagCorpusSettings; + } + + /** Returns the object with the settings used for calls to deleteRagCorpus. */ + public OperationCallSettings + deleteRagCorpusOperationSettings() { + return deleteRagCorpusOperationSettings; + } + + /** Returns the object with the settings used for calls to uploadRagFile. */ + public UnaryCallSettings uploadRagFileSettings() { + return uploadRagFileSettings; + } + + /** Returns the object with the settings used for calls to importRagFiles. */ + public UnaryCallSettings importRagFilesSettings() { + return importRagFilesSettings; + } + + /** Returns the object with the settings used for calls to importRagFiles. */ + public OperationCallSettings< + ImportRagFilesRequest, ImportRagFilesResponse, ImportRagFilesOperationMetadata> + importRagFilesOperationSettings() { + return importRagFilesOperationSettings; + } + + /** Returns the object with the settings used for calls to getRagFile. */ + public UnaryCallSettings getRagFileSettings() { + return getRagFileSettings; + } + + /** Returns the object with the settings used for calls to listRagFiles. */ + public PagedCallSettings + listRagFilesSettings() { + return listRagFilesSettings; + } + + /** Returns the object with the settings used for calls to deleteRagFile. */ + public UnaryCallSettings deleteRagFileSettings() { + return deleteRagFileSettings; + } + + /** Returns the object with the settings used for calls to deleteRagFile. */ + public OperationCallSettings + deleteRagFileOperationSettings() { + return deleteRagFileOperationSettings; + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return getLocationSettings; + } + + /** Returns the object with the settings used for calls to setIamPolicy. */ + public UnaryCallSettings setIamPolicySettings() { + return setIamPolicySettings; + } + + /** Returns the object with the settings used for calls to getIamPolicy. */ + public UnaryCallSettings getIamPolicySettings() { + return getIamPolicySettings; + } + + /** Returns the object with the settings used for calls to testIamPermissions. */ + public UnaryCallSettings + testIamPermissionsSettings() { + return testIamPermissionsSettings; + } + + public VertexRagDataServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcVertexRagDataServiceStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns the endpoint set by the user or the the service's default endpoint. */ + @Override + public String getEndpoint() { + if (super.getEndpoint() != null) { + return super.getEndpoint(); + } + return getDefaultEndpoint(); + } + + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "aiplatform"; + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "aiplatform.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "aiplatform.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(VertexRagDataServiceStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected VertexRagDataServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + createRagCorpusSettings = settingsBuilder.createRagCorpusSettings().build(); + createRagCorpusOperationSettings = settingsBuilder.createRagCorpusOperationSettings().build(); + getRagCorpusSettings = settingsBuilder.getRagCorpusSettings().build(); + listRagCorporaSettings = settingsBuilder.listRagCorporaSettings().build(); + deleteRagCorpusSettings = settingsBuilder.deleteRagCorpusSettings().build(); + deleteRagCorpusOperationSettings = settingsBuilder.deleteRagCorpusOperationSettings().build(); + uploadRagFileSettings = settingsBuilder.uploadRagFileSettings().build(); + importRagFilesSettings = settingsBuilder.importRagFilesSettings().build(); + importRagFilesOperationSettings = settingsBuilder.importRagFilesOperationSettings().build(); + getRagFileSettings = settingsBuilder.getRagFileSettings().build(); + listRagFilesSettings = settingsBuilder.listRagFilesSettings().build(); + deleteRagFileSettings = settingsBuilder.deleteRagFileSettings().build(); + deleteRagFileOperationSettings = settingsBuilder.deleteRagFileOperationSettings().build(); + listLocationsSettings = settingsBuilder.listLocationsSettings().build(); + getLocationSettings = settingsBuilder.getLocationSettings().build(); + setIamPolicySettings = settingsBuilder.setIamPolicySettings().build(); + getIamPolicySettings = settingsBuilder.getIamPolicySettings().build(); + testIamPermissionsSettings = settingsBuilder.testIamPermissionsSettings().build(); + } + + /** Builder for VertexRagDataServiceStubSettings. */ + public static class Builder + extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder + createRagCorpusSettings; + private final OperationCallSettings.Builder< + CreateRagCorpusRequest, RagCorpus, CreateRagCorpusOperationMetadata> + createRagCorpusOperationSettings; + private final UnaryCallSettings.Builder getRagCorpusSettings; + private final PagedCallSettings.Builder< + ListRagCorporaRequest, ListRagCorporaResponse, ListRagCorporaPagedResponse> + listRagCorporaSettings; + private final UnaryCallSettings.Builder + deleteRagCorpusSettings; + private final OperationCallSettings.Builder< + DeleteRagCorpusRequest, Empty, DeleteOperationMetadata> + deleteRagCorpusOperationSettings; + private final UnaryCallSettings.Builder + uploadRagFileSettings; + private final UnaryCallSettings.Builder + importRagFilesSettings; + private final OperationCallSettings.Builder< + ImportRagFilesRequest, ImportRagFilesResponse, ImportRagFilesOperationMetadata> + importRagFilesOperationSettings; + private final UnaryCallSettings.Builder getRagFileSettings; + private final PagedCallSettings.Builder< + ListRagFilesRequest, ListRagFilesResponse, ListRagFilesPagedResponse> + listRagFilesSettings; + private final UnaryCallSettings.Builder deleteRagFileSettings; + private final OperationCallSettings.Builder< + DeleteRagFileRequest, Empty, DeleteOperationMetadata> + deleteRagFileOperationSettings; + private final PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings.Builder getLocationSettings; + private final UnaryCallSettings.Builder setIamPolicySettings; + private final UnaryCallSettings.Builder getIamPolicySettings; + private final UnaryCallSettings.Builder + testIamPermissionsSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); + definitions.put("no_retry_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + createRagCorpusSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createRagCorpusOperationSettings = OperationCallSettings.newBuilder(); + getRagCorpusSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listRagCorporaSettings = PagedCallSettings.newBuilder(LIST_RAG_CORPORA_PAGE_STR_FACT); + deleteRagCorpusSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteRagCorpusOperationSettings = OperationCallSettings.newBuilder(); + uploadRagFileSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + importRagFilesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + importRagFilesOperationSettings = OperationCallSettings.newBuilder(); + getRagFileSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listRagFilesSettings = PagedCallSettings.newBuilder(LIST_RAG_FILES_PAGE_STR_FACT); + deleteRagFileSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteRagFileOperationSettings = OperationCallSettings.newBuilder(); + listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); + getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + setIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + testIamPermissionsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createRagCorpusSettings, + getRagCorpusSettings, + listRagCorporaSettings, + deleteRagCorpusSettings, + uploadRagFileSettings, + importRagFilesSettings, + getRagFileSettings, + listRagFilesSettings, + deleteRagFileSettings, + listLocationsSettings, + getLocationSettings, + setIamPolicySettings, + getIamPolicySettings, + testIamPermissionsSettings); + initDefaults(this); + } + + protected Builder(VertexRagDataServiceStubSettings settings) { + super(settings); + + createRagCorpusSettings = settings.createRagCorpusSettings.toBuilder(); + createRagCorpusOperationSettings = settings.createRagCorpusOperationSettings.toBuilder(); + getRagCorpusSettings = settings.getRagCorpusSettings.toBuilder(); + listRagCorporaSettings = settings.listRagCorporaSettings.toBuilder(); + deleteRagCorpusSettings = settings.deleteRagCorpusSettings.toBuilder(); + deleteRagCorpusOperationSettings = settings.deleteRagCorpusOperationSettings.toBuilder(); + uploadRagFileSettings = settings.uploadRagFileSettings.toBuilder(); + importRagFilesSettings = settings.importRagFilesSettings.toBuilder(); + importRagFilesOperationSettings = settings.importRagFilesOperationSettings.toBuilder(); + getRagFileSettings = settings.getRagFileSettings.toBuilder(); + listRagFilesSettings = settings.listRagFilesSettings.toBuilder(); + deleteRagFileSettings = settings.deleteRagFileSettings.toBuilder(); + deleteRagFileOperationSettings = settings.deleteRagFileOperationSettings.toBuilder(); + listLocationsSettings = settings.listLocationsSettings.toBuilder(); + getLocationSettings = settings.getLocationSettings.toBuilder(); + setIamPolicySettings = settings.setIamPolicySettings.toBuilder(); + getIamPolicySettings = settings.getIamPolicySettings.toBuilder(); + testIamPermissionsSettings = settings.testIamPermissionsSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createRagCorpusSettings, + getRagCorpusSettings, + listRagCorporaSettings, + deleteRagCorpusSettings, + uploadRagFileSettings, + importRagFilesSettings, + getRagFileSettings, + listRagFilesSettings, + deleteRagFileSettings, + listLocationsSettings, + getLocationSettings, + setIamPolicySettings, + getIamPolicySettings, + testIamPermissionsSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .createRagCorpusSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getRagCorpusSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listRagCorporaSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .deleteRagCorpusSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .uploadRagFileSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .importRagFilesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getRagFileSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listRagFilesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .deleteRagFileSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listLocationsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getLocationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .setIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .testIamPermissionsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .createRagCorpusOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(RagCorpus.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + CreateRagCorpusOperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteRagCorpusOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(DeleteOperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .importRagFilesOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(ImportRagFilesResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + ImportRagFilesOperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteRagFileOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(DeleteOperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to createRagCorpus. */ + public UnaryCallSettings.Builder createRagCorpusSettings() { + return createRagCorpusSettings; + } + + /** Returns the builder for the settings used for calls to createRagCorpus. */ + public OperationCallSettings.Builder< + CreateRagCorpusRequest, RagCorpus, CreateRagCorpusOperationMetadata> + createRagCorpusOperationSettings() { + return createRagCorpusOperationSettings; + } + + /** Returns the builder for the settings used for calls to getRagCorpus. */ + public UnaryCallSettings.Builder getRagCorpusSettings() { + return getRagCorpusSettings; + } + + /** Returns the builder for the settings used for calls to listRagCorpora. */ + public PagedCallSettings.Builder< + ListRagCorporaRequest, ListRagCorporaResponse, ListRagCorporaPagedResponse> + listRagCorporaSettings() { + return listRagCorporaSettings; + } + + /** Returns the builder for the settings used for calls to deleteRagCorpus. */ + public UnaryCallSettings.Builder deleteRagCorpusSettings() { + return deleteRagCorpusSettings; + } + + /** Returns the builder for the settings used for calls to deleteRagCorpus. */ + public OperationCallSettings.Builder + deleteRagCorpusOperationSettings() { + return deleteRagCorpusOperationSettings; + } + + /** Returns the builder for the settings used for calls to uploadRagFile. */ + public UnaryCallSettings.Builder + uploadRagFileSettings() { + return uploadRagFileSettings; + } + + /** Returns the builder for the settings used for calls to importRagFiles. */ + public UnaryCallSettings.Builder importRagFilesSettings() { + return importRagFilesSettings; + } + + /** Returns the builder for the settings used for calls to importRagFiles. */ + public OperationCallSettings.Builder< + ImportRagFilesRequest, ImportRagFilesResponse, ImportRagFilesOperationMetadata> + importRagFilesOperationSettings() { + return importRagFilesOperationSettings; + } + + /** Returns the builder for the settings used for calls to getRagFile. */ + public UnaryCallSettings.Builder getRagFileSettings() { + return getRagFileSettings; + } + + /** Returns the builder for the settings used for calls to listRagFiles. */ + public PagedCallSettings.Builder< + ListRagFilesRequest, ListRagFilesResponse, ListRagFilesPagedResponse> + listRagFilesSettings() { + return listRagFilesSettings; + } + + /** Returns the builder for the settings used for calls to deleteRagFile. */ + public UnaryCallSettings.Builder deleteRagFileSettings() { + return deleteRagFileSettings; + } + + /** Returns the builder for the settings used for calls to deleteRagFile. */ + public OperationCallSettings.Builder + deleteRagFileOperationSettings() { + return deleteRagFileOperationSettings; + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getLocationSettings; + } + + /** Returns the builder for the settings used for calls to setIamPolicy. */ + public UnaryCallSettings.Builder setIamPolicySettings() { + return setIamPolicySettings; + } + + /** Returns the builder for the settings used for calls to getIamPolicy. */ + public UnaryCallSettings.Builder getIamPolicySettings() { + return getIamPolicySettings; + } + + /** Returns the builder for the settings used for calls to testIamPermissions. */ + public UnaryCallSettings.Builder + testIamPermissionsSettings() { + return testIamPermissionsSettings; + } + + /** Returns the endpoint set by the user or the the service's default endpoint. */ + @Override + public String getEndpoint() { + if (super.getEndpoint() != null) { + return super.getEndpoint(); + } + return getDefaultEndpoint(); + } + + @Override + public VertexRagDataServiceStubSettings build() throws IOException { + return new VertexRagDataServiceStubSettings(this); + } + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/VertexRagServiceStub.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/VertexRagServiceStub.java new file mode 100644 index 000000000000..f80e67b210a7 --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/VertexRagServiceStub.java @@ -0,0 +1,80 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.stub; + +import static com.google.cloud.aiplatform.v1beta1.VertexRagServiceClient.ListLocationsPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest; +import com.google.cloud.aiplatform.v1beta1.RetrieveContextsResponse; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the VertexRagService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public abstract class VertexRagServiceStub implements BackgroundResource { + + public UnaryCallable + retrieveContextsCallable() { + throw new UnsupportedOperationException("Not implemented: retrieveContextsCallable()"); + } + + public UnaryCallable + listLocationsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()"); + } + + public UnaryCallable listLocationsCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsCallable()"); + } + + public UnaryCallable getLocationCallable() { + throw new UnsupportedOperationException("Not implemented: getLocationCallable()"); + } + + public UnaryCallable setIamPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: setIamPolicyCallable()"); + } + + public UnaryCallable getIamPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: getIamPolicyCallable()"); + } + + public UnaryCallable + testIamPermissionsCallable() { + throw new UnsupportedOperationException("Not implemented: testIamPermissionsCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/VertexRagServiceStubSettings.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/VertexRagServiceStubSettings.java new file mode 100644 index 000000000000..57502cd89b4c --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/VertexRagServiceStubSettings.java @@ -0,0 +1,487 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.stub; + +import static com.google.cloud.aiplatform.v1beta1.VertexRagServiceClient.ListLocationsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest; +import com.google.cloud.aiplatform.v1beta1.RetrieveContextsResponse; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link VertexRagServiceStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (aiplatform.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of retrieveContexts to 30 seconds: + * + *

{@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
+ * VertexRagServiceStubSettings.Builder vertexRagServiceSettingsBuilder =
+ *     VertexRagServiceStubSettings.newBuilder();
+ * vertexRagServiceSettingsBuilder
+ *     .retrieveContextsSettings()
+ *     .setRetrySettings(
+ *         vertexRagServiceSettingsBuilder
+ *             .retrieveContextsSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * VertexRagServiceStubSettings vertexRagServiceSettings = vertexRagServiceSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class VertexRagServiceStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final UnaryCallSettings + retrieveContextsSettings; + private final PagedCallSettings< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings getLocationSettings; + private final UnaryCallSettings setIamPolicySettings; + private final UnaryCallSettings getIamPolicySettings; + private final UnaryCallSettings + testIamPermissionsSettings; + + private static final PagedListDescriptor + LIST_LOCATIONS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListLocationsRequest injectToken(ListLocationsRequest payload, String token) { + return ListLocationsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListLocationsRequest injectPageSize(ListLocationsRequest payload, int pageSize) { + return ListLocationsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListLocationsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListLocationsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListLocationsResponse payload) { + return payload.getLocationsList() == null + ? ImmutableList.of() + : payload.getLocationsList(); + } + }; + + private static final PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + LIST_LOCATIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListLocationsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_LOCATIONS_PAGE_STR_DESC, request, context); + return ListLocationsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to retrieveContexts. */ + public UnaryCallSettings + retrieveContextsSettings() { + return retrieveContextsSettings; + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return getLocationSettings; + } + + /** Returns the object with the settings used for calls to setIamPolicy. */ + public UnaryCallSettings setIamPolicySettings() { + return setIamPolicySettings; + } + + /** Returns the object with the settings used for calls to getIamPolicy. */ + public UnaryCallSettings getIamPolicySettings() { + return getIamPolicySettings; + } + + /** Returns the object with the settings used for calls to testIamPermissions. */ + public UnaryCallSettings + testIamPermissionsSettings() { + return testIamPermissionsSettings; + } + + public VertexRagServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcVertexRagServiceStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns the endpoint set by the user or the the service's default endpoint. */ + @Override + public String getEndpoint() { + if (super.getEndpoint() != null) { + return super.getEndpoint(); + } + return getDefaultEndpoint(); + } + + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "aiplatform"; + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "aiplatform.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "aiplatform.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(VertexRagServiceStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected VertexRagServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + retrieveContextsSettings = settingsBuilder.retrieveContextsSettings().build(); + listLocationsSettings = settingsBuilder.listLocationsSettings().build(); + getLocationSettings = settingsBuilder.getLocationSettings().build(); + setIamPolicySettings = settingsBuilder.setIamPolicySettings().build(); + getIamPolicySettings = settingsBuilder.getIamPolicySettings().build(); + testIamPermissionsSettings = settingsBuilder.testIamPermissionsSettings().build(); + } + + /** Builder for VertexRagServiceStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder + retrieveContextsSettings; + private final PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings.Builder getLocationSettings; + private final UnaryCallSettings.Builder setIamPolicySettings; + private final UnaryCallSettings.Builder getIamPolicySettings; + private final UnaryCallSettings.Builder + testIamPermissionsSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); + definitions.put("no_retry_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + retrieveContextsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); + getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + setIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + testIamPermissionsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + retrieveContextsSettings, + listLocationsSettings, + getLocationSettings, + setIamPolicySettings, + getIamPolicySettings, + testIamPermissionsSettings); + initDefaults(this); + } + + protected Builder(VertexRagServiceStubSettings settings) { + super(settings); + + retrieveContextsSettings = settings.retrieveContextsSettings.toBuilder(); + listLocationsSettings = settings.listLocationsSettings.toBuilder(); + getLocationSettings = settings.getLocationSettings.toBuilder(); + setIamPolicySettings = settings.setIamPolicySettings.toBuilder(); + getIamPolicySettings = settings.getIamPolicySettings.toBuilder(); + testIamPermissionsSettings = settings.testIamPermissionsSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + retrieveContextsSettings, + listLocationsSettings, + getLocationSettings, + setIamPolicySettings, + getIamPolicySettings, + testIamPermissionsSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .retrieveContextsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listLocationsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getLocationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .setIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .testIamPermissionsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to retrieveContexts. */ + public UnaryCallSettings.Builder + retrieveContextsSettings() { + return retrieveContextsSettings; + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getLocationSettings; + } + + /** Returns the builder for the settings used for calls to setIamPolicy. */ + public UnaryCallSettings.Builder setIamPolicySettings() { + return setIamPolicySettings; + } + + /** Returns the builder for the settings used for calls to getIamPolicy. */ + public UnaryCallSettings.Builder getIamPolicySettings() { + return getIamPolicySettings; + } + + /** Returns the builder for the settings used for calls to testIamPermissions. */ + public UnaryCallSettings.Builder + testIamPermissionsSettings() { + return testIamPermissionsSettings; + } + + /** Returns the endpoint set by the user or the the service's default endpoint. */ + @Override + public String getEndpoint() { + if (super.getEndpoint() != null) { + return super.getEndpoint(); + } + return getDefaultEndpoint(); + } + + @Override + public VertexRagServiceStubSettings build() throws IOException { + return new VertexRagServiceStubSettings(this); + } + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/resources/META-INF/native-image/com.google.cloud.aiplatform.v1/reflect-config.json b/java-aiplatform/google-cloud-aiplatform/src/main/resources/META-INF/native-image/com.google.cloud.aiplatform.v1/reflect-config.json index f946caa0d7c0..e134817b64d3 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/resources/META-INF/native-image/com.google.cloud.aiplatform.v1/reflect-config.json +++ b/java-aiplatform/google-cloud-aiplatform/src/main/resources/META-INF/native-image/com.google.cloud.aiplatform.v1/reflect-config.json @@ -611,6 +611,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1.AssignNotebookRuntimeOperationMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.AssignNotebookRuntimeOperationMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.AssignNotebookRuntimeRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.AssignNotebookRuntimeRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1.Attribution", "queryAllDeclaredConstructors": true, @@ -1493,6 +1529,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1.CancelTuningJobRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.CancelTuningJobRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1.Candidate", "queryAllDeclaredConstructors": true, @@ -2492,6 +2546,78 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateOperationMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateOperationMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.CreatePersistentResourceOperationMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.CreatePersistentResourceOperationMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.CreatePersistentResourceRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.CreatePersistentResourceRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1.CreatePipelineJobRequest", "queryAllDeclaredConstructors": true, @@ -2726,6 +2852,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1.CreateTuningJobRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.CreateTuningJobRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1.CsvDestination", "queryAllDeclaredConstructors": true, @@ -3482,6 +3626,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeTemplateRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeTemplateRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1.DeleteOperationMetadata", "queryAllDeclaredConstructors": true, @@ -3500,6 +3680,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1.DeletePersistentResourceRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.DeletePersistentResourceRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1.DeletePipelineJobRequest", "queryAllDeclaredConstructors": true, @@ -6677,6 +6875,60 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1.GetNotebookRuntimeRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.GetNotebookRuntimeRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.GetNotebookRuntimeTemplateRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.GetNotebookRuntimeTemplateRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.GetPersistentResourceRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.GetPersistentResourceRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1.GetPipelineJobRequest", "queryAllDeclaredConstructors": true, @@ -6875,6 +7127,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1.GetTuningJobRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.GetTuningJobRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1.GoogleSearchRetrieval", "queryAllDeclaredConstructors": true, @@ -8532,7 +8802,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.ListOptimalTrialsRequest", + "name": "com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -8541,7 +8811,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.ListOptimalTrialsRequest$Builder", + "name": "com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -8550,7 +8820,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.ListOptimalTrialsResponse", + "name": "com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -8559,7 +8829,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.ListOptimalTrialsResponse$Builder", + "name": "com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -8568,7 +8838,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.ListPipelineJobsRequest", + "name": "com.google.cloud.aiplatform.v1.ListNotebookRuntimesRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -8577,7 +8847,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.ListPipelineJobsRequest$Builder", + "name": "com.google.cloud.aiplatform.v1.ListNotebookRuntimesRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -8586,7 +8856,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.ListPipelineJobsResponse", + "name": "com.google.cloud.aiplatform.v1.ListNotebookRuntimesResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -8595,7 +8865,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.ListPipelineJobsResponse$Builder", + "name": "com.google.cloud.aiplatform.v1.ListNotebookRuntimesResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -8604,7 +8874,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.ListSavedQueriesRequest", + "name": "com.google.cloud.aiplatform.v1.ListOptimalTrialsRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -8613,7 +8883,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.ListSavedQueriesRequest$Builder", + "name": "com.google.cloud.aiplatform.v1.ListOptimalTrialsRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -8622,7 +8892,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.ListSavedQueriesResponse", + "name": "com.google.cloud.aiplatform.v1.ListOptimalTrialsResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -8631,7 +8901,115 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.ListSavedQueriesResponse$Builder", + "name": "com.google.cloud.aiplatform.v1.ListOptimalTrialsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.ListPersistentResourcesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.ListPersistentResourcesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.ListPersistentResourcesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.ListPersistentResourcesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.ListPipelineJobsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.ListPipelineJobsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.ListPipelineJobsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.ListPipelineJobsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.ListSavedQueriesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.ListSavedQueriesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.ListSavedQueriesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.ListSavedQueriesResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -8963,6 +9341,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1.ListTuningJobsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.ListTuningJobsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.ListTuningJobsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.ListTuningJobsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1.LookupStudyRequest", "queryAllDeclaredConstructors": true, @@ -10521,7 +10935,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.NfsMount", + "name": "com.google.cloud.aiplatform.v1.NetworkSpec", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -10530,7 +10944,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.NfsMount$Builder", + "name": "com.google.cloud.aiplatform.v1.NetworkSpec$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -10539,7 +10953,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.Part", + "name": "com.google.cloud.aiplatform.v1.NfsMount", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -10548,7 +10962,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.Part$Builder", + "name": "com.google.cloud.aiplatform.v1.NfsMount$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -10557,7 +10971,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.PauseModelDeploymentMonitoringJobRequest", + "name": "com.google.cloud.aiplatform.v1.NotebookEucConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -10566,7 +10980,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.PauseModelDeploymentMonitoringJobRequest$Builder", + "name": "com.google.cloud.aiplatform.v1.NotebookEucConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -10575,7 +10989,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.PauseScheduleRequest", + "name": "com.google.cloud.aiplatform.v1.NotebookIdleShutdownConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -10584,7 +10998,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.PauseScheduleRequest$Builder", + "name": "com.google.cloud.aiplatform.v1.NotebookIdleShutdownConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -10593,7 +11007,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.PersistentDiskSpec", + "name": "com.google.cloud.aiplatform.v1.NotebookRuntime", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -10602,7 +11016,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.PersistentDiskSpec$Builder", + "name": "com.google.cloud.aiplatform.v1.NotebookRuntime$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -10611,7 +11025,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.PipelineFailurePolicy", + "name": "com.google.cloud.aiplatform.v1.NotebookRuntime$HealthState", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -10620,7 +11034,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.PipelineJob", + "name": "com.google.cloud.aiplatform.v1.NotebookRuntime$RuntimeState", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -10629,7 +11043,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.PipelineJob$Builder", + "name": "com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -10638,7 +11052,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.PipelineJob$RuntimeConfig", + "name": "com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -10647,7 +11061,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.PipelineJob$RuntimeConfig$Builder", + "name": "com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -10656,7 +11070,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.PipelineJob$RuntimeConfig$InputArtifact", + "name": "com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -10665,7 +11079,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.PipelineJob$RuntimeConfig$InputArtifact$Builder", + "name": "com.google.cloud.aiplatform.v1.NotebookRuntimeType", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -10674,7 +11088,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.PipelineJobDetail", + "name": "com.google.cloud.aiplatform.v1.Part", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -10683,7 +11097,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.PipelineJobDetail$Builder", + "name": "com.google.cloud.aiplatform.v1.Part$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -10692,7 +11106,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.PipelineState", + "name": "com.google.cloud.aiplatform.v1.PauseModelDeploymentMonitoringJobRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -10701,7 +11115,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.PipelineTaskDetail", + "name": "com.google.cloud.aiplatform.v1.PauseModelDeploymentMonitoringJobRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -10710,7 +11124,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.PipelineTaskDetail$ArtifactList", + "name": "com.google.cloud.aiplatform.v1.PauseScheduleRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -10719,7 +11133,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.PipelineTaskDetail$ArtifactList$Builder", + "name": "com.google.cloud.aiplatform.v1.PauseScheduleRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -10728,7 +11142,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.PipelineTaskDetail$Builder", + "name": "com.google.cloud.aiplatform.v1.PersistentDiskSpec", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -10737,7 +11151,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.PipelineTaskDetail$PipelineTaskStatus", + "name": "com.google.cloud.aiplatform.v1.PersistentDiskSpec$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -10746,7 +11160,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.PipelineTaskDetail$PipelineTaskStatus$Builder", + "name": "com.google.cloud.aiplatform.v1.PersistentResource", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -10755,7 +11169,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.PipelineTaskDetail$State", + "name": "com.google.cloud.aiplatform.v1.PersistentResource$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -10764,7 +11178,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.PipelineTaskExecutorDetail", + "name": "com.google.cloud.aiplatform.v1.PersistentResource$State", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -10773,7 +11187,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.PipelineTaskExecutorDetail$Builder", + "name": "com.google.cloud.aiplatform.v1.PipelineFailurePolicy", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -10782,7 +11196,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.PipelineTaskExecutorDetail$ContainerDetail", + "name": "com.google.cloud.aiplatform.v1.PipelineJob", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -10791,7 +11205,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.PipelineTaskExecutorDetail$ContainerDetail$Builder", + "name": "com.google.cloud.aiplatform.v1.PipelineJob$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -10800,7 +11214,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.PipelineTaskExecutorDetail$CustomJobDetail", + "name": "com.google.cloud.aiplatform.v1.PipelineJob$RuntimeConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -10809,7 +11223,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.PipelineTaskExecutorDetail$CustomJobDetail$Builder", + "name": "com.google.cloud.aiplatform.v1.PipelineJob$RuntimeConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -10818,7 +11232,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.PipelineTemplateMetadata", + "name": "com.google.cloud.aiplatform.v1.PipelineJob$RuntimeConfig$InputArtifact", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -10827,7 +11241,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.PipelineTemplateMetadata$Builder", + "name": "com.google.cloud.aiplatform.v1.PipelineJob$RuntimeConfig$InputArtifact$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -10836,7 +11250,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.Port", + "name": "com.google.cloud.aiplatform.v1.PipelineJobDetail", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -10845,7 +11259,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.Port$Builder", + "name": "com.google.cloud.aiplatform.v1.PipelineJobDetail$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -10854,7 +11268,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.PredefinedSplit", + "name": "com.google.cloud.aiplatform.v1.PipelineState", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -10863,7 +11277,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.PredefinedSplit$Builder", + "name": "com.google.cloud.aiplatform.v1.PipelineTaskDetail", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -10872,7 +11286,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.PredictRequest", + "name": "com.google.cloud.aiplatform.v1.PipelineTaskDetail$ArtifactList", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -10881,7 +11295,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.PredictRequest$Builder", + "name": "com.google.cloud.aiplatform.v1.PipelineTaskDetail$ArtifactList$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -10890,7 +11304,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.PredictRequestResponseLoggingConfig", + "name": "com.google.cloud.aiplatform.v1.PipelineTaskDetail$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -10899,7 +11313,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.PredictRequestResponseLoggingConfig$Builder", + "name": "com.google.cloud.aiplatform.v1.PipelineTaskDetail$PipelineTaskStatus", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -10908,7 +11322,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.PredictResponse", + "name": "com.google.cloud.aiplatform.v1.PipelineTaskDetail$PipelineTaskStatus$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -10917,7 +11331,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.PredictResponse$Builder", + "name": "com.google.cloud.aiplatform.v1.PipelineTaskDetail$State", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -10926,7 +11340,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.PredictSchemata", + "name": "com.google.cloud.aiplatform.v1.PipelineTaskExecutorDetail", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -10935,7 +11349,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.PredictSchemata$Builder", + "name": "com.google.cloud.aiplatform.v1.PipelineTaskExecutorDetail$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -10944,7 +11358,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.Presets", + "name": "com.google.cloud.aiplatform.v1.PipelineTaskExecutorDetail$ContainerDetail", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -10953,7 +11367,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.Presets$Builder", + "name": "com.google.cloud.aiplatform.v1.PipelineTaskExecutorDetail$ContainerDetail$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -10962,7 +11376,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.Presets$Modality", + "name": "com.google.cloud.aiplatform.v1.PipelineTaskExecutorDetail$CustomJobDetail", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -10971,7 +11385,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.Presets$Query", + "name": "com.google.cloud.aiplatform.v1.PipelineTaskExecutorDetail$CustomJobDetail$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -10980,7 +11394,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.PrivateEndpoints", + "name": "com.google.cloud.aiplatform.v1.PipelineTemplateMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -10989,7 +11403,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.PrivateEndpoints$Builder", + "name": "com.google.cloud.aiplatform.v1.PipelineTemplateMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -10998,7 +11412,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.PrivateServiceConnectConfig", + "name": "com.google.cloud.aiplatform.v1.Port", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -11007,7 +11421,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.PrivateServiceConnectConfig$Builder", + "name": "com.google.cloud.aiplatform.v1.Port$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -11016,7 +11430,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.Probe", + "name": "com.google.cloud.aiplatform.v1.PredefinedSplit", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -11025,7 +11439,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.Probe$Builder", + "name": "com.google.cloud.aiplatform.v1.PredefinedSplit$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -11034,7 +11448,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.Probe$ExecAction", + "name": "com.google.cloud.aiplatform.v1.PredictRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -11043,7 +11457,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.Probe$ExecAction$Builder", + "name": "com.google.cloud.aiplatform.v1.PredictRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -11052,7 +11466,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.PscAutomatedEndpoints", + "name": "com.google.cloud.aiplatform.v1.PredictRequestResponseLoggingConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -11061,7 +11475,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.PscAutomatedEndpoints$Builder", + "name": "com.google.cloud.aiplatform.v1.PredictRequestResponseLoggingConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -11070,7 +11484,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.PublisherModel", + "name": "com.google.cloud.aiplatform.v1.PredictResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -11079,7 +11493,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.PublisherModel$Builder", + "name": "com.google.cloud.aiplatform.v1.PredictResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -11088,7 +11502,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.PublisherModel$CallToAction", + "name": "com.google.cloud.aiplatform.v1.PredictSchemata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -11097,7 +11511,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.PublisherModel$CallToAction$Builder", + "name": "com.google.cloud.aiplatform.v1.PredictSchemata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -11106,7 +11520,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.PublisherModel$CallToAction$Deploy", + "name": "com.google.cloud.aiplatform.v1.Presets", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -11115,7 +11529,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.PublisherModel$CallToAction$Deploy$Builder", + "name": "com.google.cloud.aiplatform.v1.Presets$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -11124,7 +11538,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.PublisherModel$CallToAction$DeployGke", + "name": "com.google.cloud.aiplatform.v1.Presets$Modality", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -11133,7 +11547,169 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.PublisherModel$CallToAction$DeployGke$Builder", + "name": "com.google.cloud.aiplatform.v1.Presets$Query", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.PrivateEndpoints", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.PrivateEndpoints$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.PrivateServiceConnectConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.PrivateServiceConnectConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.Probe", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.Probe$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.Probe$ExecAction", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.Probe$ExecAction$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.PscAutomatedEndpoints", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.PscAutomatedEndpoints$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.PublisherModel", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.PublisherModel$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.PublisherModel$CallToAction", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.PublisherModel$CallToAction$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.PublisherModel$CallToAction$Deploy", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.PublisherModel$CallToAction$Deploy$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.PublisherModel$CallToAction$DeployGke", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.PublisherModel$CallToAction$DeployGke$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -11573,6 +12149,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1.RaySpec", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.RaySpec$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1.ReadFeatureValuesRequest", "queryAllDeclaredConstructors": true, @@ -11897,6 +12491,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1.RebootPersistentResourceOperationMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.RebootPersistentResourceOperationMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.RebootPersistentResourceRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.RebootPersistentResourceRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1.RemoveContextChildrenRequest", "queryAllDeclaredConstructors": true, @@ -11969,6 +12599,78 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1.ResourcePool", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.ResourcePool$AutoscalingSpec", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.ResourcePool$AutoscalingSpec$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.ResourcePool$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.ResourceRuntime", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.ResourceRuntime$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.ResourceRuntimeSpec", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.ResourceRuntimeSpec$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1.ResourcesConsumed", "queryAllDeclaredConstructors": true, @@ -12131,6 +12833,15 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1.SafetySetting$HarmBlockMethod", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1.SafetySetting$HarmBlockThreshold", "queryAllDeclaredConstructors": true, @@ -12384,7 +13095,97 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.SearchDataItemsResponse$Builder", + "name": "com.google.cloud.aiplatform.v1.SearchDataItemsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.SearchFeaturesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.SearchFeaturesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.SearchFeaturesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.SearchFeaturesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.SearchMigratableResourcesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.SearchMigratableResourcesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.SearchMigratableResourcesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.SearchMigratableResourcesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.SearchModelDeploymentMonitoringStatsAnomaliesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.SearchModelDeploymentMonitoringStatsAnomaliesRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -12393,7 +13194,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.SearchFeaturesRequest", + "name": "com.google.cloud.aiplatform.v1.SearchModelDeploymentMonitoringStatsAnomaliesRequest$StatsAnomaliesObjective", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -12402,7 +13203,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.SearchFeaturesRequest$Builder", + "name": "com.google.cloud.aiplatform.v1.SearchModelDeploymentMonitoringStatsAnomaliesRequest$StatsAnomaliesObjective$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -12411,7 +13212,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.SearchFeaturesResponse", + "name": "com.google.cloud.aiplatform.v1.SearchModelDeploymentMonitoringStatsAnomaliesResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -12420,7 +13221,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.SearchFeaturesResponse$Builder", + "name": "com.google.cloud.aiplatform.v1.SearchModelDeploymentMonitoringStatsAnomaliesResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -12429,7 +13230,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.SearchMigratableResourcesRequest", + "name": "com.google.cloud.aiplatform.v1.SearchNearestEntitiesRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -12438,7 +13239,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.SearchMigratableResourcesRequest$Builder", + "name": "com.google.cloud.aiplatform.v1.SearchNearestEntitiesRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -12447,7 +13248,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.SearchMigratableResourcesResponse", + "name": "com.google.cloud.aiplatform.v1.SearchNearestEntitiesResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -12456,7 +13257,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.SearchMigratableResourcesResponse$Builder", + "name": "com.google.cloud.aiplatform.v1.SearchNearestEntitiesResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -12465,7 +13266,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.SearchModelDeploymentMonitoringStatsAnomaliesRequest", + "name": "com.google.cloud.aiplatform.v1.Segment", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -12474,7 +13275,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.SearchModelDeploymentMonitoringStatsAnomaliesRequest$Builder", + "name": "com.google.cloud.aiplatform.v1.Segment$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -12483,7 +13284,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.SearchModelDeploymentMonitoringStatsAnomaliesRequest$StatsAnomaliesObjective", + "name": "com.google.cloud.aiplatform.v1.ServiceAccountSpec", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -12492,7 +13293,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.SearchModelDeploymentMonitoringStatsAnomaliesRequest$StatsAnomaliesObjective$Builder", + "name": "com.google.cloud.aiplatform.v1.ServiceAccountSpec$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -12501,7 +13302,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.SearchModelDeploymentMonitoringStatsAnomaliesResponse", + "name": "com.google.cloud.aiplatform.v1.ShieldedVmConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -12510,7 +13311,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.SearchModelDeploymentMonitoringStatsAnomaliesResponse$Builder", + "name": "com.google.cloud.aiplatform.v1.ShieldedVmConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -12519,7 +13320,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.SearchNearestEntitiesRequest", + "name": "com.google.cloud.aiplatform.v1.SmoothGradConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -12528,7 +13329,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.SearchNearestEntitiesRequest$Builder", + "name": "com.google.cloud.aiplatform.v1.SmoothGradConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -12537,7 +13338,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.SearchNearestEntitiesResponse", + "name": "com.google.cloud.aiplatform.v1.SpecialistPool", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -12546,7 +13347,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.SearchNearestEntitiesResponse$Builder", + "name": "com.google.cloud.aiplatform.v1.SpecialistPool$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -12555,7 +13356,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.Segment", + "name": "com.google.cloud.aiplatform.v1.StartNotebookRuntimeOperationMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -12564,7 +13365,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.Segment$Builder", + "name": "com.google.cloud.aiplatform.v1.StartNotebookRuntimeOperationMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -12573,7 +13374,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.SmoothGradConfig", + "name": "com.google.cloud.aiplatform.v1.StartNotebookRuntimeRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -12582,7 +13383,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.SmoothGradConfig$Builder", + "name": "com.google.cloud.aiplatform.v1.StartNotebookRuntimeRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -12591,7 +13392,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.SpecialistPool", + "name": "com.google.cloud.aiplatform.v1.StartNotebookRuntimeResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -12600,7 +13401,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1.SpecialistPool$Builder", + "name": "com.google.cloud.aiplatform.v1.StartNotebookRuntimeResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -13274,6 +14075,105 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1.SupervisedHyperParameters", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.SupervisedHyperParameters$AdapterSize", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.SupervisedHyperParameters$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.SupervisedTuningDataStats", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.SupervisedTuningDataStats$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution$DatasetBucket", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution$DatasetBucket$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.SupervisedTuningSpec", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.SupervisedTuningSpec$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1.SyncFeatureViewRequest", "queryAllDeclaredConstructors": true, @@ -13715,6 +14615,60 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1.TunedModel", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.TunedModel$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.TuningDataStats", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.TuningDataStats$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.TuningJob", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.TuningJob$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1.Type", "queryAllDeclaredConstructors": true, @@ -14318,6 +15272,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1.UpdatePersistentResourceOperationMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.UpdatePersistentResourceOperationMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.UpdatePersistentResourceRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.UpdatePersistentResourceRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1.UpdateScheduleRequest", "queryAllDeclaredConstructors": true, @@ -14462,6 +15452,60 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeOperationMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeOperationMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1.UploadModelOperationMetadata", "queryAllDeclaredConstructors": true, diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/resources/META-INF/native-image/com.google.cloud.aiplatform.v1beta1/reflect-config.json b/java-aiplatform/google-cloud-aiplatform/src/main/resources/META-INF/native-image/com.google.cloud.aiplatform.v1beta1/reflect-config.json index 18cb7aa5825d..d87ddf319549 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/resources/META-INF/native-image/com.google.cloud.aiplatform.v1beta1/reflect-config.json +++ b/java-aiplatform/google-cloud-aiplatform/src/main/resources/META-INF/native-image/com.google.cloud.aiplatform.v1beta1/reflect-config.json @@ -612,7 +612,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1beta1.Attribution", + "name": "com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeOperationMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -621,7 +621,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1beta1.Attribution$Builder", + "name": "com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeOperationMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -630,7 +630,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1beta1.AuthConfig", + "name": "com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -639,7 +639,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1beta1.AuthConfig$ApiKeyConfig", + "name": "com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -648,7 +648,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1beta1.AuthConfig$ApiKeyConfig$Builder", + "name": "com.google.cloud.aiplatform.v1beta1.Attribution", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -657,7 +657,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1beta1.AuthConfig$Builder", + "name": "com.google.cloud.aiplatform.v1beta1.Attribution$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -666,7 +666,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1beta1.AuthConfig$GoogleServiceAccountConfig", + "name": "com.google.cloud.aiplatform.v1beta1.AuthConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -675,7 +675,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1beta1.AuthConfig$GoogleServiceAccountConfig$Builder", + "name": "com.google.cloud.aiplatform.v1beta1.AuthConfig$ApiKeyConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -684,7 +684,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1beta1.AuthConfig$HttpBasicAuthConfig", + "name": "com.google.cloud.aiplatform.v1beta1.AuthConfig$ApiKeyConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -693,7 +693,25 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1beta1.AuthConfig$HttpBasicAuthConfig$Builder", + "name": "com.google.cloud.aiplatform.v1beta1.AuthConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.AuthConfig$GoogleServiceAccountConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.AuthConfig$GoogleServiceAccountConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -702,7 +720,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1beta1.AuthConfig$NoAuth", + "name": "com.google.cloud.aiplatform.v1beta1.AuthConfig$HttpBasicAuthConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -711,7 +729,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1beta1.AuthConfig$NoAuth$Builder", + "name": "com.google.cloud.aiplatform.v1beta1.AuthConfig$HttpBasicAuthConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1745,6 +1763,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1beta1.ChatCompletionsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.ChatCompletionsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1beta1.CheckTrialEarlyStoppingStateMetatdata", "queryAllDeclaredConstructors": true, @@ -2789,6 +2825,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateOperationMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateOperationMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1beta1.CreatePersistentResourceOperationMetadata", "queryAllDeclaredConstructors": true, @@ -2843,6 +2915,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1beta1.CreateRagCorpusOperationMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.CreateRagCorpusOperationMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.CreateRagCorpusRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.CreateRagCorpusRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1beta1.CreateReasoningEngineOperationMetadata", "queryAllDeclaredConstructors": true, @@ -3869,6 +3977,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeTemplateRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeTemplateRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1beta1.DeleteOperationMetadata", "queryAllDeclaredConstructors": true, @@ -3923,6 +4067,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1beta1.DeleteRagCorpusRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.DeleteRagCorpusRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.DeleteRagFileRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.DeleteRagFileRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1beta1.DeleteReasoningEngineRequest", "queryAllDeclaredConstructors": true, @@ -4445,6 +4625,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1beta1.DirectUploadSource", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.DirectUploadSource$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1beta1.DiskSpec", "queryAllDeclaredConstructors": true, @@ -6083,6 +6281,69 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1beta1.FeatureView$IndexConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.FeatureView$IndexConfig$BruteForceConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.FeatureView$IndexConfig$BruteForceConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.FeatureView$IndexConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.FeatureView$IndexConfig$DistanceMeasureType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.FeatureView$IndexConfig$TreeAHConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.FeatureView$IndexConfig$TreeAHConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1beta1.FeatureView$ServiceAgentType", "queryAllDeclaredConstructors": true, @@ -7569,7 +7830,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1beta1.GetPersistentResourceRequest", + "name": "com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7578,7 +7839,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1beta1.GetPersistentResourceRequest$Builder", + "name": "com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7587,7 +7848,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1beta1.GetPipelineJobRequest", + "name": "com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeTemplateRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7596,7 +7857,43 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1beta1.GetPipelineJobRequest$Builder", + "name": "com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeTemplateRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.GetPersistentResourceRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.GetPersistentResourceRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.GetPipelineJobRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.GetPipelineJobRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7622,6 +7919,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1beta1.GetRagCorpusRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.GetRagCorpusRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.GetRagFileRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.GetRagFileRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1beta1.GetReasoningEngineRequest", "queryAllDeclaredConstructors": true, @@ -7802,6 +8135,51 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1beta1.GoogleDriveSource", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.GoogleDriveSource$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.GoogleDriveSource$ResourceId", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.GoogleDriveSource$ResourceId$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.GoogleDriveSource$ResourceId$ResourceType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1beta1.GoogleSearchRetrieval", "queryAllDeclaredConstructors": true, @@ -7910,6 +8288,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1beta1.GroundingAttribution$RetrievedContext", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.GroundingAttribution$RetrievedContext$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1beta1.GroundingAttribution$Web", "queryAllDeclaredConstructors": true, @@ -8198,6 +8594,78 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1beta1.ImportRagFilesConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.ImportRagFilesConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.ImportRagFilesOperationMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.ImportRagFilesOperationMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.ImportRagFilesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.ImportRagFilesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.ImportRagFilesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.ImportRagFilesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1beta1.Index", "queryAllDeclaredConstructors": true, @@ -9611,6 +10079,78 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1beta1.ListOptimalTrialsRequest", "queryAllDeclaredConstructors": true, @@ -9755,6 +10295,78 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1beta1.ListRagCorporaRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.ListRagCorporaRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.ListRagCorporaResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.ListRagCorporaResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.ListRagFilesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.ListRagFilesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.ListRagFilesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.ListRagFilesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1beta1.ListReasoningEnginesRequest", "queryAllDeclaredConstructors": true, @@ -11726,6 +12338,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1beta1.NetworkSpec", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.NetworkSpec$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1beta1.NfsMount", "queryAllDeclaredConstructors": true, @@ -11744,6 +12374,123 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1beta1.NotebookEucConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.NotebookEucConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.NotebookRuntime", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.NotebookRuntime$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.NotebookRuntime$HealthState", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.NotebookRuntime$RuntimeState", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.NotebookRuntimeType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1beta1.PairwiseChoice", "queryAllDeclaredConstructors": true, @@ -13284,7 +14031,52 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceResult", + "name": "com.google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceResult", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceResult$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceSpec", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceSpec$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.RagContexts", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.RagContexts$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -13293,7 +14085,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceResult$Builder", + "name": "com.google.cloud.aiplatform.v1beta1.RagContexts$Context", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -13302,7 +14094,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceSpec", + "name": "com.google.cloud.aiplatform.v1beta1.RagContexts$Context$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -13311,7 +14103,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceSpec$Builder", + "name": "com.google.cloud.aiplatform.v1beta1.RagCorpus", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -13320,7 +14112,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1beta1.RagContextRecallInput", + "name": "com.google.cloud.aiplatform.v1beta1.RagCorpus$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -13329,7 +14121,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1beta1.RagContextRecallInput$Builder", + "name": "com.google.cloud.aiplatform.v1beta1.RagFile", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -13338,7 +14130,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1beta1.RagContextRecallInstance", + "name": "com.google.cloud.aiplatform.v1beta1.RagFile$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -13347,7 +14139,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1beta1.RagContextRecallInstance$Builder", + "name": "com.google.cloud.aiplatform.v1beta1.RagFile$RagFileType", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -13356,7 +14148,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1beta1.RagContextRecallResult", + "name": "com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -13365,7 +14157,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1beta1.RagContextRecallResult$Builder", + "name": "com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -13374,7 +14166,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1beta1.RagContextRecallSpec", + "name": "com.google.cloud.aiplatform.v1beta1.RagQuery", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -13383,7 +14175,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1beta1.RagContextRecallSpec$Builder", + "name": "com.google.cloud.aiplatform.v1beta1.RagQuery$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -13823,6 +14615,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceOperationMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceOperationMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1beta1.RemoveContextChildrenRequest", "queryAllDeclaredConstructors": true, @@ -13986,25 +14814,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1beta1.ResponseRecallInput", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.aiplatform.v1beta1.ResponseRecallInput$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.aiplatform.v1beta1.ResponseRecallInstance", + "name": "com.google.cloud.aiplatform.v1beta1.RestoreDatasetVersionOperationMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -14013,7 +14823,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1beta1.ResponseRecallInstance$Builder", + "name": "com.google.cloud.aiplatform.v1beta1.RestoreDatasetVersionOperationMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -14022,7 +14832,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1beta1.ResponseRecallResult", + "name": "com.google.cloud.aiplatform.v1beta1.RestoreDatasetVersionRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -14031,7 +14841,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1beta1.ResponseRecallResult$Builder", + "name": "com.google.cloud.aiplatform.v1beta1.RestoreDatasetVersionRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -14040,7 +14850,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1beta1.ResponseRecallSpec", + "name": "com.google.cloud.aiplatform.v1beta1.ResumeModelDeploymentMonitoringJobRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -14049,7 +14859,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1beta1.ResponseRecallSpec$Builder", + "name": "com.google.cloud.aiplatform.v1beta1.ResumeModelDeploymentMonitoringJobRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -14058,7 +14868,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1beta1.RestoreDatasetVersionOperationMetadata", + "name": "com.google.cloud.aiplatform.v1beta1.ResumeScheduleRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -14067,7 +14877,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1beta1.RestoreDatasetVersionOperationMetadata$Builder", + "name": "com.google.cloud.aiplatform.v1beta1.ResumeScheduleRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -14076,7 +14886,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1beta1.RestoreDatasetVersionRequest", + "name": "com.google.cloud.aiplatform.v1beta1.Retrieval", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -14085,7 +14895,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1beta1.RestoreDatasetVersionRequest$Builder", + "name": "com.google.cloud.aiplatform.v1beta1.Retrieval$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -14094,7 +14904,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1beta1.ResumeModelDeploymentMonitoringJobRequest", + "name": "com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -14103,7 +14913,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1beta1.ResumeModelDeploymentMonitoringJobRequest$Builder", + "name": "com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -14112,7 +14922,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1beta1.ResumeScheduleRequest", + "name": "com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest$VertexRagStore", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -14121,7 +14931,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1beta1.ResumeScheduleRequest$Builder", + "name": "com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest$VertexRagStore$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -14130,7 +14940,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1beta1.Retrieval", + "name": "com.google.cloud.aiplatform.v1beta1.RetrieveContextsResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -14139,7 +14949,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.aiplatform.v1beta1.Retrieval$Builder", + "name": "com.google.cloud.aiplatform.v1beta1.RetrieveContextsResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -14399,6 +15209,15 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1beta1.SafetySetting$HarmBlockMethod", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1beta1.SafetySetting$HarmBlockThreshold", "queryAllDeclaredConstructors": true, @@ -14876,6 +15695,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1beta1.ShieldedVmConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.ShieldedVmConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1beta1.SmoothGradConfig", "queryAllDeclaredConstructors": true, @@ -14912,6 +15749,60 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeOperationMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeOperationMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1beta1.StopTrialRequest", "queryAllDeclaredConstructors": true, @@ -17504,6 +18395,60 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeOperationMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeOperationMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1beta1.UploadModelOperationMetadata", "queryAllDeclaredConstructors": true, @@ -17558,6 +18503,60 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1beta1.UploadRagFileConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.UploadRagFileConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.UploadRagFileRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.UploadRagFileRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.UploadRagFileResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.UploadRagFileResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1beta1.UpsertDatapointsRequest", "queryAllDeclaredConstructors": true, @@ -17648,6 +18647,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1beta1.VertexRagStore", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.VertexRagStore$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1beta1.VideoMetadata", "queryAllDeclaredConstructors": true, diff --git a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/GenAiTuningServiceClientTest.java b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/GenAiTuningServiceClientTest.java new file mode 100644 index 000000000000..0a8b1843e1fe --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/GenAiTuningServiceClientTest.java @@ -0,0 +1,740 @@ +/* + * Copyright 2024 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.aiplatform.v1; + +import static com.google.cloud.aiplatform.v1.GenAiTuningServiceClient.ListLocationsPagedResponse; +import static com.google.cloud.aiplatform.v1.GenAiTuningServiceClient.ListTuningJobsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.collect.Lists; +import com.google.iam.v1.AuditConfig; +import com.google.iam.v1.Binding; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.ByteString; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import com.google.rpc.Status; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.UUID; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class GenAiTuningServiceClientTest { + private static MockGenAiTuningService mockGenAiTuningService; + private static MockIAMPolicy mockIAMPolicy; + private static MockLocations mockLocations; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private GenAiTuningServiceClient client; + + @BeforeClass + public static void startStaticServer() { + mockGenAiTuningService = new MockGenAiTuningService(); + mockLocations = new MockLocations(); + mockIAMPolicy = new MockIAMPolicy(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList(mockGenAiTuningService, mockLocations, mockIAMPolicy)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + GenAiTuningServiceSettings settings = + GenAiTuningServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = GenAiTuningServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void createTuningJobTest() throws Exception { + TuningJob expectedResponse = + TuningJob.newBuilder() + .setName(TuningJobName.of("[PROJECT]", "[LOCATION]", "[TUNING_JOB]").toString()) + .setTunedModelDisplayName("tunedModelDisplayName759401232") + .setDescription("description-1724546052") + .setState(JobState.forNumber(0)) + .setCreateTime(Timestamp.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setError(Status.newBuilder().build()) + .putAllLabels(new HashMap()) + .setExperiment( + ContextName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[CONTEXT]") + .toString()) + .setTunedModel(TunedModel.newBuilder().build()) + .setTuningDataStats(TuningDataStats.newBuilder().build()) + .build(); + mockGenAiTuningService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + TuningJob tuningJob = TuningJob.newBuilder().build(); + + TuningJob actualResponse = client.createTuningJob(parent, tuningJob); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGenAiTuningService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateTuningJobRequest actualRequest = ((CreateTuningJobRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(tuningJob, actualRequest.getTuningJob()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createTuningJobExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGenAiTuningService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + TuningJob tuningJob = TuningJob.newBuilder().build(); + client.createTuningJob(parent, tuningJob); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createTuningJobTest2() throws Exception { + TuningJob expectedResponse = + TuningJob.newBuilder() + .setName(TuningJobName.of("[PROJECT]", "[LOCATION]", "[TUNING_JOB]").toString()) + .setTunedModelDisplayName("tunedModelDisplayName759401232") + .setDescription("description-1724546052") + .setState(JobState.forNumber(0)) + .setCreateTime(Timestamp.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setError(Status.newBuilder().build()) + .putAllLabels(new HashMap()) + .setExperiment( + ContextName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[CONTEXT]") + .toString()) + .setTunedModel(TunedModel.newBuilder().build()) + .setTuningDataStats(TuningDataStats.newBuilder().build()) + .build(); + mockGenAiTuningService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + TuningJob tuningJob = TuningJob.newBuilder().build(); + + TuningJob actualResponse = client.createTuningJob(parent, tuningJob); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGenAiTuningService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateTuningJobRequest actualRequest = ((CreateTuningJobRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(tuningJob, actualRequest.getTuningJob()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createTuningJobExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGenAiTuningService.addException(exception); + + try { + String parent = "parent-995424086"; + TuningJob tuningJob = TuningJob.newBuilder().build(); + client.createTuningJob(parent, tuningJob); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getTuningJobTest() throws Exception { + TuningJob expectedResponse = + TuningJob.newBuilder() + .setName(TuningJobName.of("[PROJECT]", "[LOCATION]", "[TUNING_JOB]").toString()) + .setTunedModelDisplayName("tunedModelDisplayName759401232") + .setDescription("description-1724546052") + .setState(JobState.forNumber(0)) + .setCreateTime(Timestamp.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setError(Status.newBuilder().build()) + .putAllLabels(new HashMap()) + .setExperiment( + ContextName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[CONTEXT]") + .toString()) + .setTunedModel(TunedModel.newBuilder().build()) + .setTuningDataStats(TuningDataStats.newBuilder().build()) + .build(); + mockGenAiTuningService.addResponse(expectedResponse); + + TuningJobName name = TuningJobName.of("[PROJECT]", "[LOCATION]", "[TUNING_JOB]"); + + TuningJob actualResponse = client.getTuningJob(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGenAiTuningService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetTuningJobRequest actualRequest = ((GetTuningJobRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getTuningJobExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGenAiTuningService.addException(exception); + + try { + TuningJobName name = TuningJobName.of("[PROJECT]", "[LOCATION]", "[TUNING_JOB]"); + client.getTuningJob(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getTuningJobTest2() throws Exception { + TuningJob expectedResponse = + TuningJob.newBuilder() + .setName(TuningJobName.of("[PROJECT]", "[LOCATION]", "[TUNING_JOB]").toString()) + .setTunedModelDisplayName("tunedModelDisplayName759401232") + .setDescription("description-1724546052") + .setState(JobState.forNumber(0)) + .setCreateTime(Timestamp.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setError(Status.newBuilder().build()) + .putAllLabels(new HashMap()) + .setExperiment( + ContextName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[CONTEXT]") + .toString()) + .setTunedModel(TunedModel.newBuilder().build()) + .setTuningDataStats(TuningDataStats.newBuilder().build()) + .build(); + mockGenAiTuningService.addResponse(expectedResponse); + + String name = "name3373707"; + + TuningJob actualResponse = client.getTuningJob(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGenAiTuningService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetTuningJobRequest actualRequest = ((GetTuningJobRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getTuningJobExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGenAiTuningService.addException(exception); + + try { + String name = "name3373707"; + client.getTuningJob(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listTuningJobsTest() throws Exception { + TuningJob responsesElement = TuningJob.newBuilder().build(); + ListTuningJobsResponse expectedResponse = + ListTuningJobsResponse.newBuilder() + .setNextPageToken("") + .addAllTuningJobs(Arrays.asList(responsesElement)) + .build(); + mockGenAiTuningService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListTuningJobsPagedResponse pagedListResponse = client.listTuningJobs(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getTuningJobsList().get(0), resources.get(0)); + + List actualRequests = mockGenAiTuningService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListTuningJobsRequest actualRequest = ((ListTuningJobsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listTuningJobsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGenAiTuningService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listTuningJobs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listTuningJobsTest2() throws Exception { + TuningJob responsesElement = TuningJob.newBuilder().build(); + ListTuningJobsResponse expectedResponse = + ListTuningJobsResponse.newBuilder() + .setNextPageToken("") + .addAllTuningJobs(Arrays.asList(responsesElement)) + .build(); + mockGenAiTuningService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListTuningJobsPagedResponse pagedListResponse = client.listTuningJobs(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getTuningJobsList().get(0), resources.get(0)); + + List actualRequests = mockGenAiTuningService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListTuningJobsRequest actualRequest = ((ListTuningJobsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listTuningJobsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGenAiTuningService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listTuningJobs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void cancelTuningJobTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockGenAiTuningService.addResponse(expectedResponse); + + TuningJobName name = TuningJobName.of("[PROJECT]", "[LOCATION]", "[TUNING_JOB]"); + + client.cancelTuningJob(name); + + List actualRequests = mockGenAiTuningService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CancelTuningJobRequest actualRequest = ((CancelTuningJobRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void cancelTuningJobExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGenAiTuningService.addException(exception); + + try { + TuningJobName name = TuningJobName.of("[PROJECT]", "[LOCATION]", "[TUNING_JOB]"); + client.cancelTuningJob(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void cancelTuningJobTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockGenAiTuningService.addResponse(expectedResponse); + + String name = "name3373707"; + + client.cancelTuningJob(name); + + List actualRequests = mockGenAiTuningService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CancelTuningJobRequest actualRequest = ((CancelTuningJobRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void cancelTuningJobExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGenAiTuningService.addException(exception); + + try { + String name = "name3373707"; + client.cancelTuningJob(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockLocations.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLocationsPagedResponse pagedListResponse = client.listLocations(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLocationsList().get(0), resources.get(0)); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListLocationsRequest actualRequest = ((ListLocationsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getFilter(), actualRequest.getFilter()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listLocationsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLocations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLocationTest() throws Exception { + Location expectedResponse = + Location.newBuilder() + .setName("name3373707") + .setLocationId("locationId1541836720") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setMetadata(Any.newBuilder().build()) + .build(); + mockLocations.addResponse(expectedResponse); + + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + + Location actualResponse = client.getLocation(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetLocationRequest actualRequest = ((GetLocationRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getLocationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void setIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockIAMPolicy.addResponse(expectedResponse); + + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + + Policy actualResponse = client.setIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SetIamPolicyRequest actualRequest = ((SetIamPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getPolicy(), actualRequest.getPolicy()); + Assert.assertEquals(request.getUpdateMask(), actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void setIamPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + client.setIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockIAMPolicy.addResponse(expectedResponse); + + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + + Policy actualResponse = client.getIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetIamPolicyRequest actualRequest = ((GetIamPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getOptions(), actualRequest.getOptions()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getIamPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + client.getIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void testIamPermissionsTest() throws Exception { + TestIamPermissionsResponse expectedResponse = + TestIamPermissionsResponse.newBuilder().addAllPermissions(new ArrayList()).build(); + mockIAMPolicy.addResponse(expectedResponse); + + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .addAllPermissions(new ArrayList()) + .build(); + + TestIamPermissionsResponse actualResponse = client.testIamPermissions(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + TestIamPermissionsRequest actualRequest = ((TestIamPermissionsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getPermissionsList(), actualRequest.getPermissionsList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void testIamPermissionsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .addAllPermissions(new ArrayList()) + .build(); + client.testIamPermissions(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockGenAiTuningService.java b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockGenAiTuningService.java new file mode 100644 index 000000000000..fd5ebe65b907 --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockGenAiTuningService.java @@ -0,0 +1,59 @@ +/* + * Copyright 2024 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.aiplatform.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockGenAiTuningService implements MockGrpcService { + private final MockGenAiTuningServiceImpl serviceImpl; + + public MockGenAiTuningService() { + serviceImpl = new MockGenAiTuningServiceImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockGenAiTuningServiceImpl.java b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockGenAiTuningServiceImpl.java new file mode 100644 index 000000000000..d14790657a22 --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockGenAiTuningServiceImpl.java @@ -0,0 +1,145 @@ +/* + * Copyright 2024 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.aiplatform.v1; + +import com.google.api.core.BetaApi; +import com.google.cloud.aiplatform.v1.GenAiTuningServiceGrpc.GenAiTuningServiceImplBase; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Empty; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockGenAiTuningServiceImpl extends GenAiTuningServiceImplBase { + private List requests; + private Queue responses; + + public MockGenAiTuningServiceImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void createTuningJob( + CreateTuningJobRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof TuningJob) { + requests.add(request); + responseObserver.onNext(((TuningJob) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateTuningJob, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + TuningJob.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getTuningJob( + GetTuningJobRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof TuningJob) { + requests.add(request); + responseObserver.onNext(((TuningJob) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetTuningJob, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + TuningJob.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listTuningJobs( + ListTuningJobsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListTuningJobsResponse) { + requests.add(request); + responseObserver.onNext(((ListTuningJobsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListTuningJobs, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListTuningJobsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void cancelTuningJob( + CancelTuningJobRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CancelTuningJob, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockNotebookService.java b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockNotebookService.java new file mode 100644 index 000000000000..03313f47f580 --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockNotebookService.java @@ -0,0 +1,59 @@ +/* + * Copyright 2024 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.aiplatform.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockNotebookService implements MockGrpcService { + private final MockNotebookServiceImpl serviceImpl; + + public MockNotebookService() { + serviceImpl = new MockNotebookServiceImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockNotebookServiceImpl.java b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockNotebookServiceImpl.java new file mode 100644 index 000000000000..9ee6e79db916 --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockNotebookServiceImpl.java @@ -0,0 +1,274 @@ +/* + * Copyright 2024 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.aiplatform.v1; + +import com.google.api.core.BetaApi; +import com.google.cloud.aiplatform.v1.NotebookServiceGrpc.NotebookServiceImplBase; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockNotebookServiceImpl extends NotebookServiceImplBase { + private List requests; + private Queue responses; + + public MockNotebookServiceImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void createNotebookRuntimeTemplate( + CreateNotebookRuntimeTemplateRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateNotebookRuntimeTemplate, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getNotebookRuntimeTemplate( + GetNotebookRuntimeTemplateRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof NotebookRuntimeTemplate) { + requests.add(request); + responseObserver.onNext(((NotebookRuntimeTemplate) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetNotebookRuntimeTemplate, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + NotebookRuntimeTemplate.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listNotebookRuntimeTemplates( + ListNotebookRuntimeTemplatesRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListNotebookRuntimeTemplatesResponse) { + requests.add(request); + responseObserver.onNext(((ListNotebookRuntimeTemplatesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListNotebookRuntimeTemplates, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListNotebookRuntimeTemplatesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteNotebookRuntimeTemplate( + DeleteNotebookRuntimeTemplateRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteNotebookRuntimeTemplate, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void assignNotebookRuntime( + AssignNotebookRuntimeRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method AssignNotebookRuntime, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getNotebookRuntime( + GetNotebookRuntimeRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof NotebookRuntime) { + requests.add(request); + responseObserver.onNext(((NotebookRuntime) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetNotebookRuntime, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + NotebookRuntime.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listNotebookRuntimes( + ListNotebookRuntimesRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListNotebookRuntimesResponse) { + requests.add(request); + responseObserver.onNext(((ListNotebookRuntimesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListNotebookRuntimes, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListNotebookRuntimesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteNotebookRuntime( + DeleteNotebookRuntimeRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteNotebookRuntime, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void upgradeNotebookRuntime( + UpgradeNotebookRuntimeRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpgradeNotebookRuntime, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void startNotebookRuntime( + StartNotebookRuntimeRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method StartNotebookRuntime, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockPersistentResourceService.java b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockPersistentResourceService.java new file mode 100644 index 000000000000..b79eec890fe7 --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockPersistentResourceService.java @@ -0,0 +1,59 @@ +/* + * Copyright 2024 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.aiplatform.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockPersistentResourceService implements MockGrpcService { + private final MockPersistentResourceServiceImpl serviceImpl; + + public MockPersistentResourceService() { + serviceImpl = new MockPersistentResourceServiceImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockPersistentResourceServiceImpl.java b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockPersistentResourceServiceImpl.java new file mode 100644 index 000000000000..fca83cb84c95 --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockPersistentResourceServiceImpl.java @@ -0,0 +1,188 @@ +/* + * Copyright 2024 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.aiplatform.v1; + +import com.google.api.core.BetaApi; +import com.google.cloud.aiplatform.v1.PersistentResourceServiceGrpc.PersistentResourceServiceImplBase; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockPersistentResourceServiceImpl extends PersistentResourceServiceImplBase { + private List requests; + private Queue responses; + + public MockPersistentResourceServiceImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void createPersistentResource( + CreatePersistentResourceRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreatePersistentResource, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getPersistentResource( + GetPersistentResourceRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof PersistentResource) { + requests.add(request); + responseObserver.onNext(((PersistentResource) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetPersistentResource, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + PersistentResource.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listPersistentResources( + ListPersistentResourcesRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListPersistentResourcesResponse) { + requests.add(request); + responseObserver.onNext(((ListPersistentResourcesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListPersistentResources, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListPersistentResourcesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deletePersistentResource( + DeletePersistentResourceRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeletePersistentResource, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updatePersistentResource( + UpdatePersistentResourceRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdatePersistentResource, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void rebootPersistentResource( + RebootPersistentResourceRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method RebootPersistentResource, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/NotebookServiceClientTest.java b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/NotebookServiceClientTest.java new file mode 100644 index 000000000000..016456bbefec --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/NotebookServiceClientTest.java @@ -0,0 +1,1621 @@ +/* + * Copyright 2024 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.aiplatform.v1; + +import static com.google.cloud.aiplatform.v1.NotebookServiceClient.ListLocationsPagedResponse; +import static com.google.cloud.aiplatform.v1.NotebookServiceClient.ListNotebookRuntimeTemplatesPagedResponse; +import static com.google.cloud.aiplatform.v1.NotebookServiceClient.ListNotebookRuntimesPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.collect.Lists; +import com.google.iam.v1.AuditConfig; +import com.google.iam.v1.Binding; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.ByteString; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class NotebookServiceClientTest { + private static MockIAMPolicy mockIAMPolicy; + private static MockLocations mockLocations; + private static MockNotebookService mockNotebookService; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private NotebookServiceClient client; + + @BeforeClass + public static void startStaticServer() { + mockNotebookService = new MockNotebookService(); + mockLocations = new MockLocations(); + mockIAMPolicy = new MockIAMPolicy(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList(mockNotebookService, mockLocations, mockIAMPolicy)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + NotebookServiceSettings settings = + NotebookServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = NotebookServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void createNotebookRuntimeTemplateTest() throws Exception { + NotebookRuntimeTemplate expectedResponse = + NotebookRuntimeTemplate.newBuilder() + .setName( + NotebookRuntimeTemplateName.of( + "[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setIsDefault(true) + .setMachineSpec(MachineSpec.newBuilder().build()) + .setDataPersistentDiskSpec(PersistentDiskSpec.newBuilder().build()) + .setNetworkSpec(NetworkSpec.newBuilder().build()) + .setServiceAccount("serviceAccount1079137720") + .setEtag("etag3123477") + .putAllLabels(new HashMap()) + .setIdleShutdownConfig(NotebookIdleShutdownConfig.newBuilder().build()) + .setEucConfig(NotebookEucConfig.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setNotebookRuntimeType(NotebookRuntimeType.forNumber(0)) + .setShieldedVmConfig(ShieldedVmConfig.newBuilder().build()) + .addAllNetworkTags(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createNotebookRuntimeTemplateTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNotebookService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + NotebookRuntimeTemplate notebookRuntimeTemplate = NotebookRuntimeTemplate.newBuilder().build(); + String notebookRuntimeTemplateId = "notebookRuntimeTemplateId-633369454"; + + NotebookRuntimeTemplate actualResponse = + client + .createNotebookRuntimeTemplateAsync( + parent, notebookRuntimeTemplate, notebookRuntimeTemplateId) + .get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateNotebookRuntimeTemplateRequest actualRequest = + ((CreateNotebookRuntimeTemplateRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(notebookRuntimeTemplate, actualRequest.getNotebookRuntimeTemplate()); + Assert.assertEquals(notebookRuntimeTemplateId, actualRequest.getNotebookRuntimeTemplateId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createNotebookRuntimeTemplateExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + NotebookRuntimeTemplate notebookRuntimeTemplate = + NotebookRuntimeTemplate.newBuilder().build(); + String notebookRuntimeTemplateId = "notebookRuntimeTemplateId-633369454"; + client + .createNotebookRuntimeTemplateAsync( + parent, notebookRuntimeTemplate, notebookRuntimeTemplateId) + .get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createNotebookRuntimeTemplateTest2() throws Exception { + NotebookRuntimeTemplate expectedResponse = + NotebookRuntimeTemplate.newBuilder() + .setName( + NotebookRuntimeTemplateName.of( + "[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setIsDefault(true) + .setMachineSpec(MachineSpec.newBuilder().build()) + .setDataPersistentDiskSpec(PersistentDiskSpec.newBuilder().build()) + .setNetworkSpec(NetworkSpec.newBuilder().build()) + .setServiceAccount("serviceAccount1079137720") + .setEtag("etag3123477") + .putAllLabels(new HashMap()) + .setIdleShutdownConfig(NotebookIdleShutdownConfig.newBuilder().build()) + .setEucConfig(NotebookEucConfig.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setNotebookRuntimeType(NotebookRuntimeType.forNumber(0)) + .setShieldedVmConfig(ShieldedVmConfig.newBuilder().build()) + .addAllNetworkTags(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createNotebookRuntimeTemplateTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNotebookService.addResponse(resultOperation); + + String parent = "parent-995424086"; + NotebookRuntimeTemplate notebookRuntimeTemplate = NotebookRuntimeTemplate.newBuilder().build(); + String notebookRuntimeTemplateId = "notebookRuntimeTemplateId-633369454"; + + NotebookRuntimeTemplate actualResponse = + client + .createNotebookRuntimeTemplateAsync( + parent, notebookRuntimeTemplate, notebookRuntimeTemplateId) + .get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateNotebookRuntimeTemplateRequest actualRequest = + ((CreateNotebookRuntimeTemplateRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(notebookRuntimeTemplate, actualRequest.getNotebookRuntimeTemplate()); + Assert.assertEquals(notebookRuntimeTemplateId, actualRequest.getNotebookRuntimeTemplateId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createNotebookRuntimeTemplateExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + String parent = "parent-995424086"; + NotebookRuntimeTemplate notebookRuntimeTemplate = + NotebookRuntimeTemplate.newBuilder().build(); + String notebookRuntimeTemplateId = "notebookRuntimeTemplateId-633369454"; + client + .createNotebookRuntimeTemplateAsync( + parent, notebookRuntimeTemplate, notebookRuntimeTemplateId) + .get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void getNotebookRuntimeTemplateTest() throws Exception { + NotebookRuntimeTemplate expectedResponse = + NotebookRuntimeTemplate.newBuilder() + .setName( + NotebookRuntimeTemplateName.of( + "[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setIsDefault(true) + .setMachineSpec(MachineSpec.newBuilder().build()) + .setDataPersistentDiskSpec(PersistentDiskSpec.newBuilder().build()) + .setNetworkSpec(NetworkSpec.newBuilder().build()) + .setServiceAccount("serviceAccount1079137720") + .setEtag("etag3123477") + .putAllLabels(new HashMap()) + .setIdleShutdownConfig(NotebookIdleShutdownConfig.newBuilder().build()) + .setEucConfig(NotebookEucConfig.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setNotebookRuntimeType(NotebookRuntimeType.forNumber(0)) + .setShieldedVmConfig(ShieldedVmConfig.newBuilder().build()) + .addAllNetworkTags(new ArrayList()) + .build(); + mockNotebookService.addResponse(expectedResponse); + + NotebookRuntimeTemplateName name = + NotebookRuntimeTemplateName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]"); + + NotebookRuntimeTemplate actualResponse = client.getNotebookRuntimeTemplate(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetNotebookRuntimeTemplateRequest actualRequest = + ((GetNotebookRuntimeTemplateRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getNotebookRuntimeTemplateExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + NotebookRuntimeTemplateName name = + NotebookRuntimeTemplateName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]"); + client.getNotebookRuntimeTemplate(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getNotebookRuntimeTemplateTest2() throws Exception { + NotebookRuntimeTemplate expectedResponse = + NotebookRuntimeTemplate.newBuilder() + .setName( + NotebookRuntimeTemplateName.of( + "[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setIsDefault(true) + .setMachineSpec(MachineSpec.newBuilder().build()) + .setDataPersistentDiskSpec(PersistentDiskSpec.newBuilder().build()) + .setNetworkSpec(NetworkSpec.newBuilder().build()) + .setServiceAccount("serviceAccount1079137720") + .setEtag("etag3123477") + .putAllLabels(new HashMap()) + .setIdleShutdownConfig(NotebookIdleShutdownConfig.newBuilder().build()) + .setEucConfig(NotebookEucConfig.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setNotebookRuntimeType(NotebookRuntimeType.forNumber(0)) + .setShieldedVmConfig(ShieldedVmConfig.newBuilder().build()) + .addAllNetworkTags(new ArrayList()) + .build(); + mockNotebookService.addResponse(expectedResponse); + + String name = "name3373707"; + + NotebookRuntimeTemplate actualResponse = client.getNotebookRuntimeTemplate(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetNotebookRuntimeTemplateRequest actualRequest = + ((GetNotebookRuntimeTemplateRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getNotebookRuntimeTemplateExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + String name = "name3373707"; + client.getNotebookRuntimeTemplate(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listNotebookRuntimeTemplatesTest() throws Exception { + NotebookRuntimeTemplate responsesElement = NotebookRuntimeTemplate.newBuilder().build(); + ListNotebookRuntimeTemplatesResponse expectedResponse = + ListNotebookRuntimeTemplatesResponse.newBuilder() + .setNextPageToken("") + .addAllNotebookRuntimeTemplates(Arrays.asList(responsesElement)) + .build(); + mockNotebookService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListNotebookRuntimeTemplatesPagedResponse pagedListResponse = + client.listNotebookRuntimeTemplates(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals( + expectedResponse.getNotebookRuntimeTemplatesList().get(0), resources.get(0)); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListNotebookRuntimeTemplatesRequest actualRequest = + ((ListNotebookRuntimeTemplatesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listNotebookRuntimeTemplatesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listNotebookRuntimeTemplates(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listNotebookRuntimeTemplatesTest2() throws Exception { + NotebookRuntimeTemplate responsesElement = NotebookRuntimeTemplate.newBuilder().build(); + ListNotebookRuntimeTemplatesResponse expectedResponse = + ListNotebookRuntimeTemplatesResponse.newBuilder() + .setNextPageToken("") + .addAllNotebookRuntimeTemplates(Arrays.asList(responsesElement)) + .build(); + mockNotebookService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListNotebookRuntimeTemplatesPagedResponse pagedListResponse = + client.listNotebookRuntimeTemplates(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals( + expectedResponse.getNotebookRuntimeTemplatesList().get(0), resources.get(0)); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListNotebookRuntimeTemplatesRequest actualRequest = + ((ListNotebookRuntimeTemplatesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listNotebookRuntimeTemplatesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listNotebookRuntimeTemplates(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteNotebookRuntimeTemplateTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteNotebookRuntimeTemplateTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNotebookService.addResponse(resultOperation); + + NotebookRuntimeTemplateName name = + NotebookRuntimeTemplateName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]"); + + client.deleteNotebookRuntimeTemplateAsync(name).get(); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteNotebookRuntimeTemplateRequest actualRequest = + ((DeleteNotebookRuntimeTemplateRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteNotebookRuntimeTemplateExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + NotebookRuntimeTemplateName name = + NotebookRuntimeTemplateName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]"); + client.deleteNotebookRuntimeTemplateAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteNotebookRuntimeTemplateTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteNotebookRuntimeTemplateTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNotebookService.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteNotebookRuntimeTemplateAsync(name).get(); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteNotebookRuntimeTemplateRequest actualRequest = + ((DeleteNotebookRuntimeTemplateRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteNotebookRuntimeTemplateExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + String name = "name3373707"; + client.deleteNotebookRuntimeTemplateAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void assignNotebookRuntimeTest() throws Exception { + NotebookRuntime expectedResponse = + NotebookRuntime.newBuilder() + .setName( + NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]").toString()) + .setRuntimeUser("runtimeUser754877379") + .setNotebookRuntimeTemplateRef(NotebookRuntimeTemplateRef.newBuilder().build()) + .setProxyUri("proxyUri-985185250") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setServiceAccount("serviceAccount1079137720") + .setIsUpgradable(true) + .putAllLabels(new HashMap()) + .setExpirationTime(Timestamp.newBuilder().build()) + .setVersion("version351608024") + .setNotebookRuntimeType(NotebookRuntimeType.forNumber(0)) + .addAllNetworkTags(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("assignNotebookRuntimeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNotebookService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + NotebookRuntimeTemplateName notebookRuntimeTemplate = + NotebookRuntimeTemplateName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]"); + NotebookRuntime notebookRuntime = NotebookRuntime.newBuilder().build(); + String notebookRuntimeId = "notebookRuntimeId400795512"; + + NotebookRuntime actualResponse = + client + .assignNotebookRuntimeAsync( + parent, notebookRuntimeTemplate, notebookRuntime, notebookRuntimeId) + .get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + AssignNotebookRuntimeRequest actualRequest = + ((AssignNotebookRuntimeRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals( + notebookRuntimeTemplate.toString(), actualRequest.getNotebookRuntimeTemplate()); + Assert.assertEquals(notebookRuntime, actualRequest.getNotebookRuntime()); + Assert.assertEquals(notebookRuntimeId, actualRequest.getNotebookRuntimeId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void assignNotebookRuntimeExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + NotebookRuntimeTemplateName notebookRuntimeTemplate = + NotebookRuntimeTemplateName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]"); + NotebookRuntime notebookRuntime = NotebookRuntime.newBuilder().build(); + String notebookRuntimeId = "notebookRuntimeId400795512"; + client + .assignNotebookRuntimeAsync( + parent, notebookRuntimeTemplate, notebookRuntime, notebookRuntimeId) + .get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void assignNotebookRuntimeTest2() throws Exception { + NotebookRuntime expectedResponse = + NotebookRuntime.newBuilder() + .setName( + NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]").toString()) + .setRuntimeUser("runtimeUser754877379") + .setNotebookRuntimeTemplateRef(NotebookRuntimeTemplateRef.newBuilder().build()) + .setProxyUri("proxyUri-985185250") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setServiceAccount("serviceAccount1079137720") + .setIsUpgradable(true) + .putAllLabels(new HashMap()) + .setExpirationTime(Timestamp.newBuilder().build()) + .setVersion("version351608024") + .setNotebookRuntimeType(NotebookRuntimeType.forNumber(0)) + .addAllNetworkTags(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("assignNotebookRuntimeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNotebookService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + String notebookRuntimeTemplate = "notebookRuntimeTemplate-903451369"; + NotebookRuntime notebookRuntime = NotebookRuntime.newBuilder().build(); + String notebookRuntimeId = "notebookRuntimeId400795512"; + + NotebookRuntime actualResponse = + client + .assignNotebookRuntimeAsync( + parent, notebookRuntimeTemplate, notebookRuntime, notebookRuntimeId) + .get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + AssignNotebookRuntimeRequest actualRequest = + ((AssignNotebookRuntimeRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(notebookRuntimeTemplate, actualRequest.getNotebookRuntimeTemplate()); + Assert.assertEquals(notebookRuntime, actualRequest.getNotebookRuntime()); + Assert.assertEquals(notebookRuntimeId, actualRequest.getNotebookRuntimeId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void assignNotebookRuntimeExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + String notebookRuntimeTemplate = "notebookRuntimeTemplate-903451369"; + NotebookRuntime notebookRuntime = NotebookRuntime.newBuilder().build(); + String notebookRuntimeId = "notebookRuntimeId400795512"; + client + .assignNotebookRuntimeAsync( + parent, notebookRuntimeTemplate, notebookRuntime, notebookRuntimeId) + .get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void assignNotebookRuntimeTest3() throws Exception { + NotebookRuntime expectedResponse = + NotebookRuntime.newBuilder() + .setName( + NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]").toString()) + .setRuntimeUser("runtimeUser754877379") + .setNotebookRuntimeTemplateRef(NotebookRuntimeTemplateRef.newBuilder().build()) + .setProxyUri("proxyUri-985185250") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setServiceAccount("serviceAccount1079137720") + .setIsUpgradable(true) + .putAllLabels(new HashMap()) + .setExpirationTime(Timestamp.newBuilder().build()) + .setVersion("version351608024") + .setNotebookRuntimeType(NotebookRuntimeType.forNumber(0)) + .addAllNetworkTags(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("assignNotebookRuntimeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNotebookService.addResponse(resultOperation); + + String parent = "parent-995424086"; + NotebookRuntimeTemplateName notebookRuntimeTemplate = + NotebookRuntimeTemplateName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]"); + NotebookRuntime notebookRuntime = NotebookRuntime.newBuilder().build(); + String notebookRuntimeId = "notebookRuntimeId400795512"; + + NotebookRuntime actualResponse = + client + .assignNotebookRuntimeAsync( + parent, notebookRuntimeTemplate, notebookRuntime, notebookRuntimeId) + .get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + AssignNotebookRuntimeRequest actualRequest = + ((AssignNotebookRuntimeRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals( + notebookRuntimeTemplate.toString(), actualRequest.getNotebookRuntimeTemplate()); + Assert.assertEquals(notebookRuntime, actualRequest.getNotebookRuntime()); + Assert.assertEquals(notebookRuntimeId, actualRequest.getNotebookRuntimeId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void assignNotebookRuntimeExceptionTest3() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + String parent = "parent-995424086"; + NotebookRuntimeTemplateName notebookRuntimeTemplate = + NotebookRuntimeTemplateName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]"); + NotebookRuntime notebookRuntime = NotebookRuntime.newBuilder().build(); + String notebookRuntimeId = "notebookRuntimeId400795512"; + client + .assignNotebookRuntimeAsync( + parent, notebookRuntimeTemplate, notebookRuntime, notebookRuntimeId) + .get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void assignNotebookRuntimeTest4() throws Exception { + NotebookRuntime expectedResponse = + NotebookRuntime.newBuilder() + .setName( + NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]").toString()) + .setRuntimeUser("runtimeUser754877379") + .setNotebookRuntimeTemplateRef(NotebookRuntimeTemplateRef.newBuilder().build()) + .setProxyUri("proxyUri-985185250") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setServiceAccount("serviceAccount1079137720") + .setIsUpgradable(true) + .putAllLabels(new HashMap()) + .setExpirationTime(Timestamp.newBuilder().build()) + .setVersion("version351608024") + .setNotebookRuntimeType(NotebookRuntimeType.forNumber(0)) + .addAllNetworkTags(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("assignNotebookRuntimeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNotebookService.addResponse(resultOperation); + + String parent = "parent-995424086"; + String notebookRuntimeTemplate = "notebookRuntimeTemplate-903451369"; + NotebookRuntime notebookRuntime = NotebookRuntime.newBuilder().build(); + String notebookRuntimeId = "notebookRuntimeId400795512"; + + NotebookRuntime actualResponse = + client + .assignNotebookRuntimeAsync( + parent, notebookRuntimeTemplate, notebookRuntime, notebookRuntimeId) + .get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + AssignNotebookRuntimeRequest actualRequest = + ((AssignNotebookRuntimeRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(notebookRuntimeTemplate, actualRequest.getNotebookRuntimeTemplate()); + Assert.assertEquals(notebookRuntime, actualRequest.getNotebookRuntime()); + Assert.assertEquals(notebookRuntimeId, actualRequest.getNotebookRuntimeId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void assignNotebookRuntimeExceptionTest4() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + String parent = "parent-995424086"; + String notebookRuntimeTemplate = "notebookRuntimeTemplate-903451369"; + NotebookRuntime notebookRuntime = NotebookRuntime.newBuilder().build(); + String notebookRuntimeId = "notebookRuntimeId400795512"; + client + .assignNotebookRuntimeAsync( + parent, notebookRuntimeTemplate, notebookRuntime, notebookRuntimeId) + .get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void getNotebookRuntimeTest() throws Exception { + NotebookRuntime expectedResponse = + NotebookRuntime.newBuilder() + .setName( + NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]").toString()) + .setRuntimeUser("runtimeUser754877379") + .setNotebookRuntimeTemplateRef(NotebookRuntimeTemplateRef.newBuilder().build()) + .setProxyUri("proxyUri-985185250") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setServiceAccount("serviceAccount1079137720") + .setIsUpgradable(true) + .putAllLabels(new HashMap()) + .setExpirationTime(Timestamp.newBuilder().build()) + .setVersion("version351608024") + .setNotebookRuntimeType(NotebookRuntimeType.forNumber(0)) + .addAllNetworkTags(new ArrayList()) + .build(); + mockNotebookService.addResponse(expectedResponse); + + NotebookRuntimeName name = + NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]"); + + NotebookRuntime actualResponse = client.getNotebookRuntime(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetNotebookRuntimeRequest actualRequest = ((GetNotebookRuntimeRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getNotebookRuntimeExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + NotebookRuntimeName name = + NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]"); + client.getNotebookRuntime(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getNotebookRuntimeTest2() throws Exception { + NotebookRuntime expectedResponse = + NotebookRuntime.newBuilder() + .setName( + NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]").toString()) + .setRuntimeUser("runtimeUser754877379") + .setNotebookRuntimeTemplateRef(NotebookRuntimeTemplateRef.newBuilder().build()) + .setProxyUri("proxyUri-985185250") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setServiceAccount("serviceAccount1079137720") + .setIsUpgradable(true) + .putAllLabels(new HashMap()) + .setExpirationTime(Timestamp.newBuilder().build()) + .setVersion("version351608024") + .setNotebookRuntimeType(NotebookRuntimeType.forNumber(0)) + .addAllNetworkTags(new ArrayList()) + .build(); + mockNotebookService.addResponse(expectedResponse); + + String name = "name3373707"; + + NotebookRuntime actualResponse = client.getNotebookRuntime(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetNotebookRuntimeRequest actualRequest = ((GetNotebookRuntimeRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getNotebookRuntimeExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + String name = "name3373707"; + client.getNotebookRuntime(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listNotebookRuntimesTest() throws Exception { + NotebookRuntime responsesElement = NotebookRuntime.newBuilder().build(); + ListNotebookRuntimesResponse expectedResponse = + ListNotebookRuntimesResponse.newBuilder() + .setNextPageToken("") + .addAllNotebookRuntimes(Arrays.asList(responsesElement)) + .build(); + mockNotebookService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListNotebookRuntimesPagedResponse pagedListResponse = client.listNotebookRuntimes(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getNotebookRuntimesList().get(0), resources.get(0)); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListNotebookRuntimesRequest actualRequest = + ((ListNotebookRuntimesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listNotebookRuntimesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listNotebookRuntimes(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listNotebookRuntimesTest2() throws Exception { + NotebookRuntime responsesElement = NotebookRuntime.newBuilder().build(); + ListNotebookRuntimesResponse expectedResponse = + ListNotebookRuntimesResponse.newBuilder() + .setNextPageToken("") + .addAllNotebookRuntimes(Arrays.asList(responsesElement)) + .build(); + mockNotebookService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListNotebookRuntimesPagedResponse pagedListResponse = client.listNotebookRuntimes(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getNotebookRuntimesList().get(0), resources.get(0)); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListNotebookRuntimesRequest actualRequest = + ((ListNotebookRuntimesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listNotebookRuntimesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listNotebookRuntimes(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteNotebookRuntimeTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteNotebookRuntimeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNotebookService.addResponse(resultOperation); + + NotebookRuntimeName name = + NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]"); + + client.deleteNotebookRuntimeAsync(name).get(); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteNotebookRuntimeRequest actualRequest = + ((DeleteNotebookRuntimeRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteNotebookRuntimeExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + NotebookRuntimeName name = + NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]"); + client.deleteNotebookRuntimeAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteNotebookRuntimeTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteNotebookRuntimeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNotebookService.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteNotebookRuntimeAsync(name).get(); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteNotebookRuntimeRequest actualRequest = + ((DeleteNotebookRuntimeRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteNotebookRuntimeExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + String name = "name3373707"; + client.deleteNotebookRuntimeAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void upgradeNotebookRuntimeTest() throws Exception { + UpgradeNotebookRuntimeResponse expectedResponse = + UpgradeNotebookRuntimeResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("upgradeNotebookRuntimeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNotebookService.addResponse(resultOperation); + + NotebookRuntimeName name = + NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]"); + + UpgradeNotebookRuntimeResponse actualResponse = client.upgradeNotebookRuntimeAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpgradeNotebookRuntimeRequest actualRequest = + ((UpgradeNotebookRuntimeRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void upgradeNotebookRuntimeExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + NotebookRuntimeName name = + NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]"); + client.upgradeNotebookRuntimeAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void upgradeNotebookRuntimeTest2() throws Exception { + UpgradeNotebookRuntimeResponse expectedResponse = + UpgradeNotebookRuntimeResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("upgradeNotebookRuntimeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNotebookService.addResponse(resultOperation); + + String name = "name3373707"; + + UpgradeNotebookRuntimeResponse actualResponse = client.upgradeNotebookRuntimeAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpgradeNotebookRuntimeRequest actualRequest = + ((UpgradeNotebookRuntimeRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void upgradeNotebookRuntimeExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + String name = "name3373707"; + client.upgradeNotebookRuntimeAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void startNotebookRuntimeTest() throws Exception { + StartNotebookRuntimeResponse expectedResponse = + StartNotebookRuntimeResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("startNotebookRuntimeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNotebookService.addResponse(resultOperation); + + NotebookRuntimeName name = + NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]"); + + StartNotebookRuntimeResponse actualResponse = client.startNotebookRuntimeAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + StartNotebookRuntimeRequest actualRequest = + ((StartNotebookRuntimeRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void startNotebookRuntimeExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + NotebookRuntimeName name = + NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]"); + client.startNotebookRuntimeAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void startNotebookRuntimeTest2() throws Exception { + StartNotebookRuntimeResponse expectedResponse = + StartNotebookRuntimeResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("startNotebookRuntimeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNotebookService.addResponse(resultOperation); + + String name = "name3373707"; + + StartNotebookRuntimeResponse actualResponse = client.startNotebookRuntimeAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + StartNotebookRuntimeRequest actualRequest = + ((StartNotebookRuntimeRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void startNotebookRuntimeExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + String name = "name3373707"; + client.startNotebookRuntimeAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockLocations.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLocationsPagedResponse pagedListResponse = client.listLocations(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLocationsList().get(0), resources.get(0)); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListLocationsRequest actualRequest = ((ListLocationsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getFilter(), actualRequest.getFilter()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listLocationsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLocations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLocationTest() throws Exception { + Location expectedResponse = + Location.newBuilder() + .setName("name3373707") + .setLocationId("locationId1541836720") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setMetadata(Any.newBuilder().build()) + .build(); + mockLocations.addResponse(expectedResponse); + + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + + Location actualResponse = client.getLocation(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetLocationRequest actualRequest = ((GetLocationRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getLocationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void setIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockIAMPolicy.addResponse(expectedResponse); + + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + + Policy actualResponse = client.setIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SetIamPolicyRequest actualRequest = ((SetIamPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getPolicy(), actualRequest.getPolicy()); + Assert.assertEquals(request.getUpdateMask(), actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void setIamPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + client.setIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockIAMPolicy.addResponse(expectedResponse); + + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + + Policy actualResponse = client.getIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetIamPolicyRequest actualRequest = ((GetIamPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getOptions(), actualRequest.getOptions()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getIamPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + client.getIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void testIamPermissionsTest() throws Exception { + TestIamPermissionsResponse expectedResponse = + TestIamPermissionsResponse.newBuilder().addAllPermissions(new ArrayList()).build(); + mockIAMPolicy.addResponse(expectedResponse); + + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .addAllPermissions(new ArrayList()) + .build(); + + TestIamPermissionsResponse actualResponse = client.testIamPermissions(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + TestIamPermissionsRequest actualRequest = ((TestIamPermissionsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getPermissionsList(), actualRequest.getPermissionsList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void testIamPermissionsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .addAllPermissions(new ArrayList()) + .build(); + client.testIamPermissions(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/PersistentResourceServiceClientTest.java b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/PersistentResourceServiceClientTest.java new file mode 100644 index 000000000000..b0c4ccf3ca0f --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/PersistentResourceServiceClientTest.java @@ -0,0 +1,989 @@ +/* + * Copyright 2024 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.aiplatform.v1; + +import static com.google.cloud.aiplatform.v1.PersistentResourceServiceClient.ListLocationsPagedResponse; +import static com.google.cloud.aiplatform.v1.PersistentResourceServiceClient.ListPersistentResourcesPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.collect.Lists; +import com.google.iam.v1.AuditConfig; +import com.google.iam.v1.Binding; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.ByteString; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import com.google.rpc.Status; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class PersistentResourceServiceClientTest { + private static MockIAMPolicy mockIAMPolicy; + private static MockLocations mockLocations; + private static MockPersistentResourceService mockPersistentResourceService; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private PersistentResourceServiceClient client; + + @BeforeClass + public static void startStaticServer() { + mockPersistentResourceService = new MockPersistentResourceService(); + mockLocations = new MockLocations(); + mockIAMPolicy = new MockIAMPolicy(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList( + mockPersistentResourceService, mockLocations, mockIAMPolicy)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + PersistentResourceServiceSettings settings = + PersistentResourceServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = PersistentResourceServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void createPersistentResourceTest() throws Exception { + PersistentResource expectedResponse = + PersistentResource.newBuilder() + .setName( + PersistentResourceName.of("[PROJECT]", "[LOCATION]", "[PERSISTENT_RESOURCE]") + .toString()) + .setDisplayName("displayName1714148973") + .addAllResourcePools(new ArrayList()) + .setError(Status.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setNetwork("network1843485230") + .setEncryptionSpec(EncryptionSpec.newBuilder().build()) + .setResourceRuntimeSpec(ResourceRuntimeSpec.newBuilder().build()) + .setResourceRuntime(ResourceRuntime.newBuilder().build()) + .addAllReservedIpRanges(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createPersistentResourceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockPersistentResourceService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + PersistentResource persistentResource = PersistentResource.newBuilder().build(); + String persistentResourceId = "persistentResourceId-2123080768"; + + PersistentResource actualResponse = + client + .createPersistentResourceAsync(parent, persistentResource, persistentResourceId) + .get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPersistentResourceService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreatePersistentResourceRequest actualRequest = + ((CreatePersistentResourceRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(persistentResource, actualRequest.getPersistentResource()); + Assert.assertEquals(persistentResourceId, actualRequest.getPersistentResourceId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createPersistentResourceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPersistentResourceService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + PersistentResource persistentResource = PersistentResource.newBuilder().build(); + String persistentResourceId = "persistentResourceId-2123080768"; + client.createPersistentResourceAsync(parent, persistentResource, persistentResourceId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createPersistentResourceTest2() throws Exception { + PersistentResource expectedResponse = + PersistentResource.newBuilder() + .setName( + PersistentResourceName.of("[PROJECT]", "[LOCATION]", "[PERSISTENT_RESOURCE]") + .toString()) + .setDisplayName("displayName1714148973") + .addAllResourcePools(new ArrayList()) + .setError(Status.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setNetwork("network1843485230") + .setEncryptionSpec(EncryptionSpec.newBuilder().build()) + .setResourceRuntimeSpec(ResourceRuntimeSpec.newBuilder().build()) + .setResourceRuntime(ResourceRuntime.newBuilder().build()) + .addAllReservedIpRanges(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createPersistentResourceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockPersistentResourceService.addResponse(resultOperation); + + String parent = "parent-995424086"; + PersistentResource persistentResource = PersistentResource.newBuilder().build(); + String persistentResourceId = "persistentResourceId-2123080768"; + + PersistentResource actualResponse = + client + .createPersistentResourceAsync(parent, persistentResource, persistentResourceId) + .get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPersistentResourceService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreatePersistentResourceRequest actualRequest = + ((CreatePersistentResourceRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(persistentResource, actualRequest.getPersistentResource()); + Assert.assertEquals(persistentResourceId, actualRequest.getPersistentResourceId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createPersistentResourceExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPersistentResourceService.addException(exception); + + try { + String parent = "parent-995424086"; + PersistentResource persistentResource = PersistentResource.newBuilder().build(); + String persistentResourceId = "persistentResourceId-2123080768"; + client.createPersistentResourceAsync(parent, persistentResource, persistentResourceId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void getPersistentResourceTest() throws Exception { + PersistentResource expectedResponse = + PersistentResource.newBuilder() + .setName( + PersistentResourceName.of("[PROJECT]", "[LOCATION]", "[PERSISTENT_RESOURCE]") + .toString()) + .setDisplayName("displayName1714148973") + .addAllResourcePools(new ArrayList()) + .setError(Status.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setNetwork("network1843485230") + .setEncryptionSpec(EncryptionSpec.newBuilder().build()) + .setResourceRuntimeSpec(ResourceRuntimeSpec.newBuilder().build()) + .setResourceRuntime(ResourceRuntime.newBuilder().build()) + .addAllReservedIpRanges(new ArrayList()) + .build(); + mockPersistentResourceService.addResponse(expectedResponse); + + PersistentResourceName name = + PersistentResourceName.of("[PROJECT]", "[LOCATION]", "[PERSISTENT_RESOURCE]"); + + PersistentResource actualResponse = client.getPersistentResource(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPersistentResourceService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetPersistentResourceRequest actualRequest = + ((GetPersistentResourceRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getPersistentResourceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPersistentResourceService.addException(exception); + + try { + PersistentResourceName name = + PersistentResourceName.of("[PROJECT]", "[LOCATION]", "[PERSISTENT_RESOURCE]"); + client.getPersistentResource(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getPersistentResourceTest2() throws Exception { + PersistentResource expectedResponse = + PersistentResource.newBuilder() + .setName( + PersistentResourceName.of("[PROJECT]", "[LOCATION]", "[PERSISTENT_RESOURCE]") + .toString()) + .setDisplayName("displayName1714148973") + .addAllResourcePools(new ArrayList()) + .setError(Status.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setNetwork("network1843485230") + .setEncryptionSpec(EncryptionSpec.newBuilder().build()) + .setResourceRuntimeSpec(ResourceRuntimeSpec.newBuilder().build()) + .setResourceRuntime(ResourceRuntime.newBuilder().build()) + .addAllReservedIpRanges(new ArrayList()) + .build(); + mockPersistentResourceService.addResponse(expectedResponse); + + String name = "name3373707"; + + PersistentResource actualResponse = client.getPersistentResource(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPersistentResourceService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetPersistentResourceRequest actualRequest = + ((GetPersistentResourceRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getPersistentResourceExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPersistentResourceService.addException(exception); + + try { + String name = "name3373707"; + client.getPersistentResource(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listPersistentResourcesTest() throws Exception { + PersistentResource responsesElement = PersistentResource.newBuilder().build(); + ListPersistentResourcesResponse expectedResponse = + ListPersistentResourcesResponse.newBuilder() + .setNextPageToken("") + .addAllPersistentResources(Arrays.asList(responsesElement)) + .build(); + mockPersistentResourceService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListPersistentResourcesPagedResponse pagedListResponse = client.listPersistentResources(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPersistentResourcesList().get(0), resources.get(0)); + + List actualRequests = mockPersistentResourceService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListPersistentResourcesRequest actualRequest = + ((ListPersistentResourcesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listPersistentResourcesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPersistentResourceService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listPersistentResources(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listPersistentResourcesTest2() throws Exception { + PersistentResource responsesElement = PersistentResource.newBuilder().build(); + ListPersistentResourcesResponse expectedResponse = + ListPersistentResourcesResponse.newBuilder() + .setNextPageToken("") + .addAllPersistentResources(Arrays.asList(responsesElement)) + .build(); + mockPersistentResourceService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListPersistentResourcesPagedResponse pagedListResponse = client.listPersistentResources(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPersistentResourcesList().get(0), resources.get(0)); + + List actualRequests = mockPersistentResourceService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListPersistentResourcesRequest actualRequest = + ((ListPersistentResourcesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listPersistentResourcesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPersistentResourceService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listPersistentResources(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deletePersistentResourceTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deletePersistentResourceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockPersistentResourceService.addResponse(resultOperation); + + PersistentResourceName name = + PersistentResourceName.of("[PROJECT]", "[LOCATION]", "[PERSISTENT_RESOURCE]"); + + client.deletePersistentResourceAsync(name).get(); + + List actualRequests = mockPersistentResourceService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeletePersistentResourceRequest actualRequest = + ((DeletePersistentResourceRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deletePersistentResourceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPersistentResourceService.addException(exception); + + try { + PersistentResourceName name = + PersistentResourceName.of("[PROJECT]", "[LOCATION]", "[PERSISTENT_RESOURCE]"); + client.deletePersistentResourceAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deletePersistentResourceTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deletePersistentResourceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockPersistentResourceService.addResponse(resultOperation); + + String name = "name3373707"; + + client.deletePersistentResourceAsync(name).get(); + + List actualRequests = mockPersistentResourceService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeletePersistentResourceRequest actualRequest = + ((DeletePersistentResourceRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deletePersistentResourceExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPersistentResourceService.addException(exception); + + try { + String name = "name3373707"; + client.deletePersistentResourceAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void updatePersistentResourceTest() throws Exception { + PersistentResource expectedResponse = + PersistentResource.newBuilder() + .setName( + PersistentResourceName.of("[PROJECT]", "[LOCATION]", "[PERSISTENT_RESOURCE]") + .toString()) + .setDisplayName("displayName1714148973") + .addAllResourcePools(new ArrayList()) + .setError(Status.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setNetwork("network1843485230") + .setEncryptionSpec(EncryptionSpec.newBuilder().build()) + .setResourceRuntimeSpec(ResourceRuntimeSpec.newBuilder().build()) + .setResourceRuntime(ResourceRuntime.newBuilder().build()) + .addAllReservedIpRanges(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updatePersistentResourceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockPersistentResourceService.addResponse(resultOperation); + + PersistentResource persistentResource = PersistentResource.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + PersistentResource actualResponse = + client.updatePersistentResourceAsync(persistentResource, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPersistentResourceService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdatePersistentResourceRequest actualRequest = + ((UpdatePersistentResourceRequest) actualRequests.get(0)); + + Assert.assertEquals(persistentResource, actualRequest.getPersistentResource()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updatePersistentResourceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPersistentResourceService.addException(exception); + + try { + PersistentResource persistentResource = PersistentResource.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updatePersistentResourceAsync(persistentResource, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void rebootPersistentResourceTest() throws Exception { + PersistentResource expectedResponse = + PersistentResource.newBuilder() + .setName( + PersistentResourceName.of("[PROJECT]", "[LOCATION]", "[PERSISTENT_RESOURCE]") + .toString()) + .setDisplayName("displayName1714148973") + .addAllResourcePools(new ArrayList()) + .setError(Status.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setNetwork("network1843485230") + .setEncryptionSpec(EncryptionSpec.newBuilder().build()) + .setResourceRuntimeSpec(ResourceRuntimeSpec.newBuilder().build()) + .setResourceRuntime(ResourceRuntime.newBuilder().build()) + .addAllReservedIpRanges(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("rebootPersistentResourceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockPersistentResourceService.addResponse(resultOperation); + + PersistentResourceName name = + PersistentResourceName.of("[PROJECT]", "[LOCATION]", "[PERSISTENT_RESOURCE]"); + + PersistentResource actualResponse = client.rebootPersistentResourceAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPersistentResourceService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RebootPersistentResourceRequest actualRequest = + ((RebootPersistentResourceRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void rebootPersistentResourceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPersistentResourceService.addException(exception); + + try { + PersistentResourceName name = + PersistentResourceName.of("[PROJECT]", "[LOCATION]", "[PERSISTENT_RESOURCE]"); + client.rebootPersistentResourceAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void rebootPersistentResourceTest2() throws Exception { + PersistentResource expectedResponse = + PersistentResource.newBuilder() + .setName( + PersistentResourceName.of("[PROJECT]", "[LOCATION]", "[PERSISTENT_RESOURCE]") + .toString()) + .setDisplayName("displayName1714148973") + .addAllResourcePools(new ArrayList()) + .setError(Status.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setNetwork("network1843485230") + .setEncryptionSpec(EncryptionSpec.newBuilder().build()) + .setResourceRuntimeSpec(ResourceRuntimeSpec.newBuilder().build()) + .setResourceRuntime(ResourceRuntime.newBuilder().build()) + .addAllReservedIpRanges(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("rebootPersistentResourceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockPersistentResourceService.addResponse(resultOperation); + + String name = "name3373707"; + + PersistentResource actualResponse = client.rebootPersistentResourceAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPersistentResourceService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RebootPersistentResourceRequest actualRequest = + ((RebootPersistentResourceRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void rebootPersistentResourceExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPersistentResourceService.addException(exception); + + try { + String name = "name3373707"; + client.rebootPersistentResourceAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockLocations.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLocationsPagedResponse pagedListResponse = client.listLocations(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLocationsList().get(0), resources.get(0)); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListLocationsRequest actualRequest = ((ListLocationsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getFilter(), actualRequest.getFilter()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listLocationsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLocations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLocationTest() throws Exception { + Location expectedResponse = + Location.newBuilder() + .setName("name3373707") + .setLocationId("locationId1541836720") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setMetadata(Any.newBuilder().build()) + .build(); + mockLocations.addResponse(expectedResponse); + + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + + Location actualResponse = client.getLocation(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetLocationRequest actualRequest = ((GetLocationRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getLocationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void setIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockIAMPolicy.addResponse(expectedResponse); + + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + + Policy actualResponse = client.setIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SetIamPolicyRequest actualRequest = ((SetIamPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getPolicy(), actualRequest.getPolicy()); + Assert.assertEquals(request.getUpdateMask(), actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void setIamPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + client.setIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockIAMPolicy.addResponse(expectedResponse); + + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + + Policy actualResponse = client.getIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetIamPolicyRequest actualRequest = ((GetIamPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getOptions(), actualRequest.getOptions()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getIamPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + client.getIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void testIamPermissionsTest() throws Exception { + TestIamPermissionsResponse expectedResponse = + TestIamPermissionsResponse.newBuilder().addAllPermissions(new ArrayList()).build(); + mockIAMPolicy.addResponse(expectedResponse); + + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .addAllPermissions(new ArrayList()) + .build(); + + TestIamPermissionsResponse actualResponse = client.testIamPermissions(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + TestIamPermissionsRequest actualRequest = ((TestIamPermissionsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getPermissionsList(), actualRequest.getPermissionsList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void testIamPermissionsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .addAllPermissions(new ArrayList()) + .build(); + client.testIamPermissions(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/PredictionServiceClientTest.java b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/PredictionServiceClientTest.java index 75bb103c4c3a..ca5bbf7e8445 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/PredictionServiceClientTest.java +++ b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/PredictionServiceClientTest.java @@ -928,6 +928,7 @@ public void streamGenerateContentTest() throws Exception { GenerateContentRequest.newBuilder() .setModel("model104069929") .addAllContents(new ArrayList()) + .setSystemInstruction(Content.newBuilder().build()) .addAllTools(new ArrayList()) .addAllSafetySettings(new ArrayList()) .setGenerationConfig(GenerationConfig.newBuilder().build()) @@ -952,6 +953,7 @@ public void streamGenerateContentExceptionTest() throws Exception { GenerateContentRequest.newBuilder() .setModel("model104069929") .addAllContents(new ArrayList()) + .setSystemInstruction(Content.newBuilder().build()) .addAllTools(new ArrayList()) .addAllSafetySettings(new ArrayList()) .setGenerationConfig(GenerationConfig.newBuilder().build()) diff --git a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/EvaluationServiceClientTest.java b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/EvaluationServiceClientTest.java index d004782fde4c..59ee7225f6a4 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/EvaluationServiceClientTest.java +++ b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/EvaluationServiceClientTest.java @@ -125,7 +125,6 @@ public void evaluateInstancesTest() throws Exception { Assert.assertEquals(request.getSafetyInput(), actualRequest.getSafetyInput()); Assert.assertEquals(request.getGroundednessInput(), actualRequest.getGroundednessInput()); Assert.assertEquals(request.getFulfillmentInput(), actualRequest.getFulfillmentInput()); - Assert.assertEquals(request.getResponseRecallInput(), actualRequest.getResponseRecallInput()); Assert.assertEquals( request.getSummarizationQualityInput(), actualRequest.getSummarizationQualityInput()); Assert.assertEquals( @@ -151,8 +150,6 @@ public void evaluateInstancesTest() throws Exception { Assert.assertEquals( request.getQuestionAnsweringCorrectnessInput(), actualRequest.getQuestionAnsweringCorrectnessInput()); - Assert.assertEquals( - request.getRagContextRecallInput(), actualRequest.getRagContextRecallInput()); Assert.assertEquals(request.getToolCallValidInput(), actualRequest.getToolCallValidInput()); Assert.assertEquals(request.getToolNameMatchInput(), actualRequest.getToolNameMatchInput()); Assert.assertEquals( diff --git a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/FeatureOnlineStoreAdminServiceClientTest.java b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/FeatureOnlineStoreAdminServiceClientTest.java index f2704b2b5304..142584261d31 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/FeatureOnlineStoreAdminServiceClientTest.java +++ b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/FeatureOnlineStoreAdminServiceClientTest.java @@ -597,6 +597,7 @@ public void createFeatureViewTest() throws Exception { .putAllLabels(new HashMap()) .setSyncConfig(FeatureView.SyncConfig.newBuilder().build()) .setVectorSearchConfig(FeatureView.VectorSearchConfig.newBuilder().build()) + .setIndexConfig(FeatureView.IndexConfig.newBuilder().build()) .setServiceAccountEmail("serviceAccountEmail1825953988") .build(); Operation resultOperation = @@ -662,6 +663,7 @@ public void createFeatureViewTest2() throws Exception { .putAllLabels(new HashMap()) .setSyncConfig(FeatureView.SyncConfig.newBuilder().build()) .setVectorSearchConfig(FeatureView.VectorSearchConfig.newBuilder().build()) + .setIndexConfig(FeatureView.IndexConfig.newBuilder().build()) .setServiceAccountEmail("serviceAccountEmail1825953988") .build(); Operation resultOperation = @@ -725,6 +727,7 @@ public void getFeatureViewTest() throws Exception { .putAllLabels(new HashMap()) .setSyncConfig(FeatureView.SyncConfig.newBuilder().build()) .setVectorSearchConfig(FeatureView.VectorSearchConfig.newBuilder().build()) + .setIndexConfig(FeatureView.IndexConfig.newBuilder().build()) .setServiceAccountEmail("serviceAccountEmail1825953988") .build(); mockFeatureOnlineStoreAdminService.addResponse(expectedResponse); @@ -775,6 +778,7 @@ public void getFeatureViewTest2() throws Exception { .putAllLabels(new HashMap()) .setSyncConfig(FeatureView.SyncConfig.newBuilder().build()) .setVectorSearchConfig(FeatureView.VectorSearchConfig.newBuilder().build()) + .setIndexConfig(FeatureView.IndexConfig.newBuilder().build()) .setServiceAccountEmail("serviceAccountEmail1825953988") .build(); mockFeatureOnlineStoreAdminService.addResponse(expectedResponse); @@ -913,6 +917,7 @@ public void updateFeatureViewTest() throws Exception { .putAllLabels(new HashMap()) .setSyncConfig(FeatureView.SyncConfig.newBuilder().build()) .setVectorSearchConfig(FeatureView.VectorSearchConfig.newBuilder().build()) + .setIndexConfig(FeatureView.IndexConfig.newBuilder().build()) .setServiceAccountEmail("serviceAccountEmail1825953988") .build(); Operation resultOperation = diff --git a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockNotebookService.java b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockNotebookService.java new file mode 100644 index 000000000000..6e550206f6a9 --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockNotebookService.java @@ -0,0 +1,59 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockNotebookService implements MockGrpcService { + private final MockNotebookServiceImpl serviceImpl; + + public MockNotebookService() { + serviceImpl = new MockNotebookServiceImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockNotebookServiceImpl.java b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockNotebookServiceImpl.java new file mode 100644 index 000000000000..54dbe76956d8 --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockNotebookServiceImpl.java @@ -0,0 +1,274 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1; + +import com.google.api.core.BetaApi; +import com.google.cloud.aiplatform.v1beta1.NotebookServiceGrpc.NotebookServiceImplBase; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockNotebookServiceImpl extends NotebookServiceImplBase { + private List requests; + private Queue responses; + + public MockNotebookServiceImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void createNotebookRuntimeTemplate( + CreateNotebookRuntimeTemplateRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateNotebookRuntimeTemplate, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getNotebookRuntimeTemplate( + GetNotebookRuntimeTemplateRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof NotebookRuntimeTemplate) { + requests.add(request); + responseObserver.onNext(((NotebookRuntimeTemplate) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetNotebookRuntimeTemplate, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + NotebookRuntimeTemplate.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listNotebookRuntimeTemplates( + ListNotebookRuntimeTemplatesRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListNotebookRuntimeTemplatesResponse) { + requests.add(request); + responseObserver.onNext(((ListNotebookRuntimeTemplatesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListNotebookRuntimeTemplates, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListNotebookRuntimeTemplatesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteNotebookRuntimeTemplate( + DeleteNotebookRuntimeTemplateRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteNotebookRuntimeTemplate, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void assignNotebookRuntime( + AssignNotebookRuntimeRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method AssignNotebookRuntime, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getNotebookRuntime( + GetNotebookRuntimeRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof NotebookRuntime) { + requests.add(request); + responseObserver.onNext(((NotebookRuntime) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetNotebookRuntime, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + NotebookRuntime.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listNotebookRuntimes( + ListNotebookRuntimesRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListNotebookRuntimesResponse) { + requests.add(request); + responseObserver.onNext(((ListNotebookRuntimesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListNotebookRuntimes, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListNotebookRuntimesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteNotebookRuntime( + DeleteNotebookRuntimeRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteNotebookRuntime, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void upgradeNotebookRuntime( + UpgradeNotebookRuntimeRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpgradeNotebookRuntime, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void startNotebookRuntime( + StartNotebookRuntimeRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method StartNotebookRuntime, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockPersistentResourceServiceImpl.java b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockPersistentResourceServiceImpl.java index 5bdb0bfedbdf..47c2620d8735 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockPersistentResourceServiceImpl.java +++ b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockPersistentResourceServiceImpl.java @@ -164,4 +164,25 @@ public void updatePersistentResource( Exception.class.getName()))); } } + + @Override + public void rebootPersistentResource( + RebootPersistentResourceRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method RebootPersistentResource, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } } diff --git a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockPredictionServiceImpl.java b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockPredictionServiceImpl.java index d49f6f419d0b..ec218ac285eb 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockPredictionServiceImpl.java +++ b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockPredictionServiceImpl.java @@ -392,4 +392,25 @@ public void streamGenerateContent( Exception.class.getName()))); } } + + @Override + public void chatCompletions( + ChatCompletionsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof HttpBody) { + requests.add(request); + responseObserver.onNext(((HttpBody) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ChatCompletions, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + HttpBody.class.getName(), + Exception.class.getName()))); + } + } } diff --git a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockVertexRagDataService.java b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockVertexRagDataService.java new file mode 100644 index 000000000000..cf8290a81ebc --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockVertexRagDataService.java @@ -0,0 +1,59 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockVertexRagDataService implements MockGrpcService { + private final MockVertexRagDataServiceImpl serviceImpl; + + public MockVertexRagDataService() { + serviceImpl = new MockVertexRagDataServiceImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockVertexRagDataServiceImpl.java b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockVertexRagDataServiceImpl.java new file mode 100644 index 000000000000..f8b48f0ecd4e --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockVertexRagDataServiceImpl.java @@ -0,0 +1,249 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1; + +import com.google.api.core.BetaApi; +import com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceGrpc.VertexRagDataServiceImplBase; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockVertexRagDataServiceImpl extends VertexRagDataServiceImplBase { + private List requests; + private Queue responses; + + public MockVertexRagDataServiceImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void createRagCorpus( + CreateRagCorpusRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateRagCorpus, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getRagCorpus( + GetRagCorpusRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof RagCorpus) { + requests.add(request); + responseObserver.onNext(((RagCorpus) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetRagCorpus, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + RagCorpus.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listRagCorpora( + ListRagCorporaRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListRagCorporaResponse) { + requests.add(request); + responseObserver.onNext(((ListRagCorporaResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListRagCorpora, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListRagCorporaResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteRagCorpus( + DeleteRagCorpusRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteRagCorpus, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void uploadRagFile( + UploadRagFileRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof UploadRagFileResponse) { + requests.add(request); + responseObserver.onNext(((UploadRagFileResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UploadRagFile, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + UploadRagFileResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void importRagFiles( + ImportRagFilesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ImportRagFiles, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getRagFile(GetRagFileRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof RagFile) { + requests.add(request); + responseObserver.onNext(((RagFile) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetRagFile, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + RagFile.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listRagFiles( + ListRagFilesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListRagFilesResponse) { + requests.add(request); + responseObserver.onNext(((ListRagFilesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListRagFiles, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListRagFilesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteRagFile( + DeleteRagFileRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteRagFile, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockVertexRagService.java b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockVertexRagService.java new file mode 100644 index 000000000000..bcb443c33357 --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockVertexRagService.java @@ -0,0 +1,59 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockVertexRagService implements MockGrpcService { + private final MockVertexRagServiceImpl serviceImpl; + + public MockVertexRagService() { + serviceImpl = new MockVertexRagServiceImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockVertexRagServiceImpl.java b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockVertexRagServiceImpl.java new file mode 100644 index 000000000000..ee287fad1bcf --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockVertexRagServiceImpl.java @@ -0,0 +1,81 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1; + +import com.google.api.core.BetaApi; +import com.google.cloud.aiplatform.v1beta1.VertexRagServiceGrpc.VertexRagServiceImplBase; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockVertexRagServiceImpl extends VertexRagServiceImplBase { + private List requests; + private Queue responses; + + public MockVertexRagServiceImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void retrieveContexts( + RetrieveContextsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof RetrieveContextsResponse) { + requests.add(request); + responseObserver.onNext(((RetrieveContextsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method RetrieveContexts, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + RetrieveContextsResponse.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/NotebookServiceClientTest.java b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/NotebookServiceClientTest.java new file mode 100644 index 000000000000..dd7b1b7ac4d2 --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/NotebookServiceClientTest.java @@ -0,0 +1,1621 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1; + +import static com.google.cloud.aiplatform.v1beta1.NotebookServiceClient.ListLocationsPagedResponse; +import static com.google.cloud.aiplatform.v1beta1.NotebookServiceClient.ListNotebookRuntimeTemplatesPagedResponse; +import static com.google.cloud.aiplatform.v1beta1.NotebookServiceClient.ListNotebookRuntimesPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.collect.Lists; +import com.google.iam.v1.AuditConfig; +import com.google.iam.v1.Binding; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.ByteString; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class NotebookServiceClientTest { + private static MockIAMPolicy mockIAMPolicy; + private static MockLocations mockLocations; + private static MockNotebookService mockNotebookService; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private NotebookServiceClient client; + + @BeforeClass + public static void startStaticServer() { + mockNotebookService = new MockNotebookService(); + mockLocations = new MockLocations(); + mockIAMPolicy = new MockIAMPolicy(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList(mockNotebookService, mockLocations, mockIAMPolicy)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + NotebookServiceSettings settings = + NotebookServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = NotebookServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void createNotebookRuntimeTemplateTest() throws Exception { + NotebookRuntimeTemplate expectedResponse = + NotebookRuntimeTemplate.newBuilder() + .setName( + NotebookRuntimeTemplateName.of( + "[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setIsDefault(true) + .setMachineSpec(MachineSpec.newBuilder().build()) + .setDataPersistentDiskSpec(PersistentDiskSpec.newBuilder().build()) + .setNetworkSpec(NetworkSpec.newBuilder().build()) + .setServiceAccount("serviceAccount1079137720") + .setEtag("etag3123477") + .putAllLabels(new HashMap()) + .setIdleShutdownConfig(NotebookIdleShutdownConfig.newBuilder().build()) + .setEucConfig(NotebookEucConfig.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setNotebookRuntimeType(NotebookRuntimeType.forNumber(0)) + .setShieldedVmConfig(ShieldedVmConfig.newBuilder().build()) + .addAllNetworkTags(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createNotebookRuntimeTemplateTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNotebookService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + NotebookRuntimeTemplate notebookRuntimeTemplate = NotebookRuntimeTemplate.newBuilder().build(); + String notebookRuntimeTemplateId = "notebookRuntimeTemplateId-633369454"; + + NotebookRuntimeTemplate actualResponse = + client + .createNotebookRuntimeTemplateAsync( + parent, notebookRuntimeTemplate, notebookRuntimeTemplateId) + .get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateNotebookRuntimeTemplateRequest actualRequest = + ((CreateNotebookRuntimeTemplateRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(notebookRuntimeTemplate, actualRequest.getNotebookRuntimeTemplate()); + Assert.assertEquals(notebookRuntimeTemplateId, actualRequest.getNotebookRuntimeTemplateId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createNotebookRuntimeTemplateExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + NotebookRuntimeTemplate notebookRuntimeTemplate = + NotebookRuntimeTemplate.newBuilder().build(); + String notebookRuntimeTemplateId = "notebookRuntimeTemplateId-633369454"; + client + .createNotebookRuntimeTemplateAsync( + parent, notebookRuntimeTemplate, notebookRuntimeTemplateId) + .get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createNotebookRuntimeTemplateTest2() throws Exception { + NotebookRuntimeTemplate expectedResponse = + NotebookRuntimeTemplate.newBuilder() + .setName( + NotebookRuntimeTemplateName.of( + "[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setIsDefault(true) + .setMachineSpec(MachineSpec.newBuilder().build()) + .setDataPersistentDiskSpec(PersistentDiskSpec.newBuilder().build()) + .setNetworkSpec(NetworkSpec.newBuilder().build()) + .setServiceAccount("serviceAccount1079137720") + .setEtag("etag3123477") + .putAllLabels(new HashMap()) + .setIdleShutdownConfig(NotebookIdleShutdownConfig.newBuilder().build()) + .setEucConfig(NotebookEucConfig.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setNotebookRuntimeType(NotebookRuntimeType.forNumber(0)) + .setShieldedVmConfig(ShieldedVmConfig.newBuilder().build()) + .addAllNetworkTags(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createNotebookRuntimeTemplateTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNotebookService.addResponse(resultOperation); + + String parent = "parent-995424086"; + NotebookRuntimeTemplate notebookRuntimeTemplate = NotebookRuntimeTemplate.newBuilder().build(); + String notebookRuntimeTemplateId = "notebookRuntimeTemplateId-633369454"; + + NotebookRuntimeTemplate actualResponse = + client + .createNotebookRuntimeTemplateAsync( + parent, notebookRuntimeTemplate, notebookRuntimeTemplateId) + .get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateNotebookRuntimeTemplateRequest actualRequest = + ((CreateNotebookRuntimeTemplateRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(notebookRuntimeTemplate, actualRequest.getNotebookRuntimeTemplate()); + Assert.assertEquals(notebookRuntimeTemplateId, actualRequest.getNotebookRuntimeTemplateId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createNotebookRuntimeTemplateExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + String parent = "parent-995424086"; + NotebookRuntimeTemplate notebookRuntimeTemplate = + NotebookRuntimeTemplate.newBuilder().build(); + String notebookRuntimeTemplateId = "notebookRuntimeTemplateId-633369454"; + client + .createNotebookRuntimeTemplateAsync( + parent, notebookRuntimeTemplate, notebookRuntimeTemplateId) + .get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void getNotebookRuntimeTemplateTest() throws Exception { + NotebookRuntimeTemplate expectedResponse = + NotebookRuntimeTemplate.newBuilder() + .setName( + NotebookRuntimeTemplateName.of( + "[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setIsDefault(true) + .setMachineSpec(MachineSpec.newBuilder().build()) + .setDataPersistentDiskSpec(PersistentDiskSpec.newBuilder().build()) + .setNetworkSpec(NetworkSpec.newBuilder().build()) + .setServiceAccount("serviceAccount1079137720") + .setEtag("etag3123477") + .putAllLabels(new HashMap()) + .setIdleShutdownConfig(NotebookIdleShutdownConfig.newBuilder().build()) + .setEucConfig(NotebookEucConfig.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setNotebookRuntimeType(NotebookRuntimeType.forNumber(0)) + .setShieldedVmConfig(ShieldedVmConfig.newBuilder().build()) + .addAllNetworkTags(new ArrayList()) + .build(); + mockNotebookService.addResponse(expectedResponse); + + NotebookRuntimeTemplateName name = + NotebookRuntimeTemplateName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]"); + + NotebookRuntimeTemplate actualResponse = client.getNotebookRuntimeTemplate(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetNotebookRuntimeTemplateRequest actualRequest = + ((GetNotebookRuntimeTemplateRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getNotebookRuntimeTemplateExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + NotebookRuntimeTemplateName name = + NotebookRuntimeTemplateName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]"); + client.getNotebookRuntimeTemplate(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getNotebookRuntimeTemplateTest2() throws Exception { + NotebookRuntimeTemplate expectedResponse = + NotebookRuntimeTemplate.newBuilder() + .setName( + NotebookRuntimeTemplateName.of( + "[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setIsDefault(true) + .setMachineSpec(MachineSpec.newBuilder().build()) + .setDataPersistentDiskSpec(PersistentDiskSpec.newBuilder().build()) + .setNetworkSpec(NetworkSpec.newBuilder().build()) + .setServiceAccount("serviceAccount1079137720") + .setEtag("etag3123477") + .putAllLabels(new HashMap()) + .setIdleShutdownConfig(NotebookIdleShutdownConfig.newBuilder().build()) + .setEucConfig(NotebookEucConfig.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setNotebookRuntimeType(NotebookRuntimeType.forNumber(0)) + .setShieldedVmConfig(ShieldedVmConfig.newBuilder().build()) + .addAllNetworkTags(new ArrayList()) + .build(); + mockNotebookService.addResponse(expectedResponse); + + String name = "name3373707"; + + NotebookRuntimeTemplate actualResponse = client.getNotebookRuntimeTemplate(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetNotebookRuntimeTemplateRequest actualRequest = + ((GetNotebookRuntimeTemplateRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getNotebookRuntimeTemplateExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + String name = "name3373707"; + client.getNotebookRuntimeTemplate(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listNotebookRuntimeTemplatesTest() throws Exception { + NotebookRuntimeTemplate responsesElement = NotebookRuntimeTemplate.newBuilder().build(); + ListNotebookRuntimeTemplatesResponse expectedResponse = + ListNotebookRuntimeTemplatesResponse.newBuilder() + .setNextPageToken("") + .addAllNotebookRuntimeTemplates(Arrays.asList(responsesElement)) + .build(); + mockNotebookService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListNotebookRuntimeTemplatesPagedResponse pagedListResponse = + client.listNotebookRuntimeTemplates(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals( + expectedResponse.getNotebookRuntimeTemplatesList().get(0), resources.get(0)); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListNotebookRuntimeTemplatesRequest actualRequest = + ((ListNotebookRuntimeTemplatesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listNotebookRuntimeTemplatesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listNotebookRuntimeTemplates(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listNotebookRuntimeTemplatesTest2() throws Exception { + NotebookRuntimeTemplate responsesElement = NotebookRuntimeTemplate.newBuilder().build(); + ListNotebookRuntimeTemplatesResponse expectedResponse = + ListNotebookRuntimeTemplatesResponse.newBuilder() + .setNextPageToken("") + .addAllNotebookRuntimeTemplates(Arrays.asList(responsesElement)) + .build(); + mockNotebookService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListNotebookRuntimeTemplatesPagedResponse pagedListResponse = + client.listNotebookRuntimeTemplates(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals( + expectedResponse.getNotebookRuntimeTemplatesList().get(0), resources.get(0)); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListNotebookRuntimeTemplatesRequest actualRequest = + ((ListNotebookRuntimeTemplatesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listNotebookRuntimeTemplatesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listNotebookRuntimeTemplates(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteNotebookRuntimeTemplateTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteNotebookRuntimeTemplateTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNotebookService.addResponse(resultOperation); + + NotebookRuntimeTemplateName name = + NotebookRuntimeTemplateName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]"); + + client.deleteNotebookRuntimeTemplateAsync(name).get(); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteNotebookRuntimeTemplateRequest actualRequest = + ((DeleteNotebookRuntimeTemplateRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteNotebookRuntimeTemplateExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + NotebookRuntimeTemplateName name = + NotebookRuntimeTemplateName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]"); + client.deleteNotebookRuntimeTemplateAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteNotebookRuntimeTemplateTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteNotebookRuntimeTemplateTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNotebookService.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteNotebookRuntimeTemplateAsync(name).get(); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteNotebookRuntimeTemplateRequest actualRequest = + ((DeleteNotebookRuntimeTemplateRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteNotebookRuntimeTemplateExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + String name = "name3373707"; + client.deleteNotebookRuntimeTemplateAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void assignNotebookRuntimeTest() throws Exception { + NotebookRuntime expectedResponse = + NotebookRuntime.newBuilder() + .setName( + NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]").toString()) + .setRuntimeUser("runtimeUser754877379") + .setNotebookRuntimeTemplateRef(NotebookRuntimeTemplateRef.newBuilder().build()) + .setProxyUri("proxyUri-985185250") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setServiceAccount("serviceAccount1079137720") + .setIsUpgradable(true) + .putAllLabels(new HashMap()) + .setExpirationTime(Timestamp.newBuilder().build()) + .setVersion("version351608024") + .setNotebookRuntimeType(NotebookRuntimeType.forNumber(0)) + .addAllNetworkTags(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("assignNotebookRuntimeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNotebookService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + NotebookRuntimeTemplateName notebookRuntimeTemplate = + NotebookRuntimeTemplateName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]"); + NotebookRuntime notebookRuntime = NotebookRuntime.newBuilder().build(); + String notebookRuntimeId = "notebookRuntimeId400795512"; + + NotebookRuntime actualResponse = + client + .assignNotebookRuntimeAsync( + parent, notebookRuntimeTemplate, notebookRuntime, notebookRuntimeId) + .get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + AssignNotebookRuntimeRequest actualRequest = + ((AssignNotebookRuntimeRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals( + notebookRuntimeTemplate.toString(), actualRequest.getNotebookRuntimeTemplate()); + Assert.assertEquals(notebookRuntime, actualRequest.getNotebookRuntime()); + Assert.assertEquals(notebookRuntimeId, actualRequest.getNotebookRuntimeId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void assignNotebookRuntimeExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + NotebookRuntimeTemplateName notebookRuntimeTemplate = + NotebookRuntimeTemplateName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]"); + NotebookRuntime notebookRuntime = NotebookRuntime.newBuilder().build(); + String notebookRuntimeId = "notebookRuntimeId400795512"; + client + .assignNotebookRuntimeAsync( + parent, notebookRuntimeTemplate, notebookRuntime, notebookRuntimeId) + .get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void assignNotebookRuntimeTest2() throws Exception { + NotebookRuntime expectedResponse = + NotebookRuntime.newBuilder() + .setName( + NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]").toString()) + .setRuntimeUser("runtimeUser754877379") + .setNotebookRuntimeTemplateRef(NotebookRuntimeTemplateRef.newBuilder().build()) + .setProxyUri("proxyUri-985185250") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setServiceAccount("serviceAccount1079137720") + .setIsUpgradable(true) + .putAllLabels(new HashMap()) + .setExpirationTime(Timestamp.newBuilder().build()) + .setVersion("version351608024") + .setNotebookRuntimeType(NotebookRuntimeType.forNumber(0)) + .addAllNetworkTags(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("assignNotebookRuntimeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNotebookService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + String notebookRuntimeTemplate = "notebookRuntimeTemplate-903451369"; + NotebookRuntime notebookRuntime = NotebookRuntime.newBuilder().build(); + String notebookRuntimeId = "notebookRuntimeId400795512"; + + NotebookRuntime actualResponse = + client + .assignNotebookRuntimeAsync( + parent, notebookRuntimeTemplate, notebookRuntime, notebookRuntimeId) + .get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + AssignNotebookRuntimeRequest actualRequest = + ((AssignNotebookRuntimeRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(notebookRuntimeTemplate, actualRequest.getNotebookRuntimeTemplate()); + Assert.assertEquals(notebookRuntime, actualRequest.getNotebookRuntime()); + Assert.assertEquals(notebookRuntimeId, actualRequest.getNotebookRuntimeId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void assignNotebookRuntimeExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + String notebookRuntimeTemplate = "notebookRuntimeTemplate-903451369"; + NotebookRuntime notebookRuntime = NotebookRuntime.newBuilder().build(); + String notebookRuntimeId = "notebookRuntimeId400795512"; + client + .assignNotebookRuntimeAsync( + parent, notebookRuntimeTemplate, notebookRuntime, notebookRuntimeId) + .get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void assignNotebookRuntimeTest3() throws Exception { + NotebookRuntime expectedResponse = + NotebookRuntime.newBuilder() + .setName( + NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]").toString()) + .setRuntimeUser("runtimeUser754877379") + .setNotebookRuntimeTemplateRef(NotebookRuntimeTemplateRef.newBuilder().build()) + .setProxyUri("proxyUri-985185250") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setServiceAccount("serviceAccount1079137720") + .setIsUpgradable(true) + .putAllLabels(new HashMap()) + .setExpirationTime(Timestamp.newBuilder().build()) + .setVersion("version351608024") + .setNotebookRuntimeType(NotebookRuntimeType.forNumber(0)) + .addAllNetworkTags(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("assignNotebookRuntimeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNotebookService.addResponse(resultOperation); + + String parent = "parent-995424086"; + NotebookRuntimeTemplateName notebookRuntimeTemplate = + NotebookRuntimeTemplateName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]"); + NotebookRuntime notebookRuntime = NotebookRuntime.newBuilder().build(); + String notebookRuntimeId = "notebookRuntimeId400795512"; + + NotebookRuntime actualResponse = + client + .assignNotebookRuntimeAsync( + parent, notebookRuntimeTemplate, notebookRuntime, notebookRuntimeId) + .get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + AssignNotebookRuntimeRequest actualRequest = + ((AssignNotebookRuntimeRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals( + notebookRuntimeTemplate.toString(), actualRequest.getNotebookRuntimeTemplate()); + Assert.assertEquals(notebookRuntime, actualRequest.getNotebookRuntime()); + Assert.assertEquals(notebookRuntimeId, actualRequest.getNotebookRuntimeId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void assignNotebookRuntimeExceptionTest3() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + String parent = "parent-995424086"; + NotebookRuntimeTemplateName notebookRuntimeTemplate = + NotebookRuntimeTemplateName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]"); + NotebookRuntime notebookRuntime = NotebookRuntime.newBuilder().build(); + String notebookRuntimeId = "notebookRuntimeId400795512"; + client + .assignNotebookRuntimeAsync( + parent, notebookRuntimeTemplate, notebookRuntime, notebookRuntimeId) + .get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void assignNotebookRuntimeTest4() throws Exception { + NotebookRuntime expectedResponse = + NotebookRuntime.newBuilder() + .setName( + NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]").toString()) + .setRuntimeUser("runtimeUser754877379") + .setNotebookRuntimeTemplateRef(NotebookRuntimeTemplateRef.newBuilder().build()) + .setProxyUri("proxyUri-985185250") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setServiceAccount("serviceAccount1079137720") + .setIsUpgradable(true) + .putAllLabels(new HashMap()) + .setExpirationTime(Timestamp.newBuilder().build()) + .setVersion("version351608024") + .setNotebookRuntimeType(NotebookRuntimeType.forNumber(0)) + .addAllNetworkTags(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("assignNotebookRuntimeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNotebookService.addResponse(resultOperation); + + String parent = "parent-995424086"; + String notebookRuntimeTemplate = "notebookRuntimeTemplate-903451369"; + NotebookRuntime notebookRuntime = NotebookRuntime.newBuilder().build(); + String notebookRuntimeId = "notebookRuntimeId400795512"; + + NotebookRuntime actualResponse = + client + .assignNotebookRuntimeAsync( + parent, notebookRuntimeTemplate, notebookRuntime, notebookRuntimeId) + .get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + AssignNotebookRuntimeRequest actualRequest = + ((AssignNotebookRuntimeRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(notebookRuntimeTemplate, actualRequest.getNotebookRuntimeTemplate()); + Assert.assertEquals(notebookRuntime, actualRequest.getNotebookRuntime()); + Assert.assertEquals(notebookRuntimeId, actualRequest.getNotebookRuntimeId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void assignNotebookRuntimeExceptionTest4() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + String parent = "parent-995424086"; + String notebookRuntimeTemplate = "notebookRuntimeTemplate-903451369"; + NotebookRuntime notebookRuntime = NotebookRuntime.newBuilder().build(); + String notebookRuntimeId = "notebookRuntimeId400795512"; + client + .assignNotebookRuntimeAsync( + parent, notebookRuntimeTemplate, notebookRuntime, notebookRuntimeId) + .get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void getNotebookRuntimeTest() throws Exception { + NotebookRuntime expectedResponse = + NotebookRuntime.newBuilder() + .setName( + NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]").toString()) + .setRuntimeUser("runtimeUser754877379") + .setNotebookRuntimeTemplateRef(NotebookRuntimeTemplateRef.newBuilder().build()) + .setProxyUri("proxyUri-985185250") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setServiceAccount("serviceAccount1079137720") + .setIsUpgradable(true) + .putAllLabels(new HashMap()) + .setExpirationTime(Timestamp.newBuilder().build()) + .setVersion("version351608024") + .setNotebookRuntimeType(NotebookRuntimeType.forNumber(0)) + .addAllNetworkTags(new ArrayList()) + .build(); + mockNotebookService.addResponse(expectedResponse); + + NotebookRuntimeName name = + NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]"); + + NotebookRuntime actualResponse = client.getNotebookRuntime(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetNotebookRuntimeRequest actualRequest = ((GetNotebookRuntimeRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getNotebookRuntimeExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + NotebookRuntimeName name = + NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]"); + client.getNotebookRuntime(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getNotebookRuntimeTest2() throws Exception { + NotebookRuntime expectedResponse = + NotebookRuntime.newBuilder() + .setName( + NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]").toString()) + .setRuntimeUser("runtimeUser754877379") + .setNotebookRuntimeTemplateRef(NotebookRuntimeTemplateRef.newBuilder().build()) + .setProxyUri("proxyUri-985185250") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setServiceAccount("serviceAccount1079137720") + .setIsUpgradable(true) + .putAllLabels(new HashMap()) + .setExpirationTime(Timestamp.newBuilder().build()) + .setVersion("version351608024") + .setNotebookRuntimeType(NotebookRuntimeType.forNumber(0)) + .addAllNetworkTags(new ArrayList()) + .build(); + mockNotebookService.addResponse(expectedResponse); + + String name = "name3373707"; + + NotebookRuntime actualResponse = client.getNotebookRuntime(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetNotebookRuntimeRequest actualRequest = ((GetNotebookRuntimeRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getNotebookRuntimeExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + String name = "name3373707"; + client.getNotebookRuntime(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listNotebookRuntimesTest() throws Exception { + NotebookRuntime responsesElement = NotebookRuntime.newBuilder().build(); + ListNotebookRuntimesResponse expectedResponse = + ListNotebookRuntimesResponse.newBuilder() + .setNextPageToken("") + .addAllNotebookRuntimes(Arrays.asList(responsesElement)) + .build(); + mockNotebookService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListNotebookRuntimesPagedResponse pagedListResponse = client.listNotebookRuntimes(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getNotebookRuntimesList().get(0), resources.get(0)); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListNotebookRuntimesRequest actualRequest = + ((ListNotebookRuntimesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listNotebookRuntimesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listNotebookRuntimes(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listNotebookRuntimesTest2() throws Exception { + NotebookRuntime responsesElement = NotebookRuntime.newBuilder().build(); + ListNotebookRuntimesResponse expectedResponse = + ListNotebookRuntimesResponse.newBuilder() + .setNextPageToken("") + .addAllNotebookRuntimes(Arrays.asList(responsesElement)) + .build(); + mockNotebookService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListNotebookRuntimesPagedResponse pagedListResponse = client.listNotebookRuntimes(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getNotebookRuntimesList().get(0), resources.get(0)); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListNotebookRuntimesRequest actualRequest = + ((ListNotebookRuntimesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listNotebookRuntimesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listNotebookRuntimes(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteNotebookRuntimeTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteNotebookRuntimeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNotebookService.addResponse(resultOperation); + + NotebookRuntimeName name = + NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]"); + + client.deleteNotebookRuntimeAsync(name).get(); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteNotebookRuntimeRequest actualRequest = + ((DeleteNotebookRuntimeRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteNotebookRuntimeExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + NotebookRuntimeName name = + NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]"); + client.deleteNotebookRuntimeAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteNotebookRuntimeTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteNotebookRuntimeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNotebookService.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteNotebookRuntimeAsync(name).get(); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteNotebookRuntimeRequest actualRequest = + ((DeleteNotebookRuntimeRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteNotebookRuntimeExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + String name = "name3373707"; + client.deleteNotebookRuntimeAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void upgradeNotebookRuntimeTest() throws Exception { + UpgradeNotebookRuntimeResponse expectedResponse = + UpgradeNotebookRuntimeResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("upgradeNotebookRuntimeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNotebookService.addResponse(resultOperation); + + NotebookRuntimeName name = + NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]"); + + UpgradeNotebookRuntimeResponse actualResponse = client.upgradeNotebookRuntimeAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpgradeNotebookRuntimeRequest actualRequest = + ((UpgradeNotebookRuntimeRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void upgradeNotebookRuntimeExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + NotebookRuntimeName name = + NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]"); + client.upgradeNotebookRuntimeAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void upgradeNotebookRuntimeTest2() throws Exception { + UpgradeNotebookRuntimeResponse expectedResponse = + UpgradeNotebookRuntimeResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("upgradeNotebookRuntimeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNotebookService.addResponse(resultOperation); + + String name = "name3373707"; + + UpgradeNotebookRuntimeResponse actualResponse = client.upgradeNotebookRuntimeAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpgradeNotebookRuntimeRequest actualRequest = + ((UpgradeNotebookRuntimeRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void upgradeNotebookRuntimeExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + String name = "name3373707"; + client.upgradeNotebookRuntimeAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void startNotebookRuntimeTest() throws Exception { + StartNotebookRuntimeResponse expectedResponse = + StartNotebookRuntimeResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("startNotebookRuntimeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNotebookService.addResponse(resultOperation); + + NotebookRuntimeName name = + NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]"); + + StartNotebookRuntimeResponse actualResponse = client.startNotebookRuntimeAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + StartNotebookRuntimeRequest actualRequest = + ((StartNotebookRuntimeRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void startNotebookRuntimeExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + NotebookRuntimeName name = + NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]"); + client.startNotebookRuntimeAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void startNotebookRuntimeTest2() throws Exception { + StartNotebookRuntimeResponse expectedResponse = + StartNotebookRuntimeResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("startNotebookRuntimeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNotebookService.addResponse(resultOperation); + + String name = "name3373707"; + + StartNotebookRuntimeResponse actualResponse = client.startNotebookRuntimeAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + StartNotebookRuntimeRequest actualRequest = + ((StartNotebookRuntimeRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void startNotebookRuntimeExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + String name = "name3373707"; + client.startNotebookRuntimeAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockLocations.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLocationsPagedResponse pagedListResponse = client.listLocations(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLocationsList().get(0), resources.get(0)); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListLocationsRequest actualRequest = ((ListLocationsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getFilter(), actualRequest.getFilter()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listLocationsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLocations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLocationTest() throws Exception { + Location expectedResponse = + Location.newBuilder() + .setName("name3373707") + .setLocationId("locationId1541836720") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setMetadata(Any.newBuilder().build()) + .build(); + mockLocations.addResponse(expectedResponse); + + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + + Location actualResponse = client.getLocation(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetLocationRequest actualRequest = ((GetLocationRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getLocationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void setIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockIAMPolicy.addResponse(expectedResponse); + + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + + Policy actualResponse = client.setIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SetIamPolicyRequest actualRequest = ((SetIamPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getPolicy(), actualRequest.getPolicy()); + Assert.assertEquals(request.getUpdateMask(), actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void setIamPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + client.setIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockIAMPolicy.addResponse(expectedResponse); + + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + + Policy actualResponse = client.getIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetIamPolicyRequest actualRequest = ((GetIamPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getOptions(), actualRequest.getOptions()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getIamPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + client.getIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void testIamPermissionsTest() throws Exception { + TestIamPermissionsResponse expectedResponse = + TestIamPermissionsResponse.newBuilder().addAllPermissions(new ArrayList()).build(); + mockIAMPolicy.addResponse(expectedResponse); + + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .addAllPermissions(new ArrayList()) + .build(); + + TestIamPermissionsResponse actualResponse = client.testIamPermissions(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + TestIamPermissionsRequest actualRequest = ((TestIamPermissionsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getPermissionsList(), actualRequest.getPermissionsList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void testIamPermissionsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .addAllPermissions(new ArrayList()) + .build(); + client.testIamPermissions(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/PersistentResourceServiceClientTest.java b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/PersistentResourceServiceClientTest.java index f1bc2afbb88d..edc4c5b6e6c1 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/PersistentResourceServiceClientTest.java +++ b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/PersistentResourceServiceClientTest.java @@ -599,6 +599,130 @@ public void updatePersistentResourceExceptionTest() throws Exception { } } + @Test + public void rebootPersistentResourceTest() throws Exception { + PersistentResource expectedResponse = + PersistentResource.newBuilder() + .setName( + PersistentResourceName.of("[PROJECT]", "[LOCATION]", "[PERSISTENT_RESOURCE]") + .toString()) + .setDisplayName("displayName1714148973") + .addAllResourcePools(new ArrayList()) + .setError(Status.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setNetwork("network1843485230") + .setEncryptionSpec(EncryptionSpec.newBuilder().build()) + .setResourceRuntimeSpec(ResourceRuntimeSpec.newBuilder().build()) + .setResourceRuntime(ResourceRuntime.newBuilder().build()) + .addAllReservedIpRanges(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("rebootPersistentResourceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockPersistentResourceService.addResponse(resultOperation); + + PersistentResourceName name = + PersistentResourceName.of("[PROJECT]", "[LOCATION]", "[PERSISTENT_RESOURCE]"); + + PersistentResource actualResponse = client.rebootPersistentResourceAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPersistentResourceService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RebootPersistentResourceRequest actualRequest = + ((RebootPersistentResourceRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void rebootPersistentResourceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPersistentResourceService.addException(exception); + + try { + PersistentResourceName name = + PersistentResourceName.of("[PROJECT]", "[LOCATION]", "[PERSISTENT_RESOURCE]"); + client.rebootPersistentResourceAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void rebootPersistentResourceTest2() throws Exception { + PersistentResource expectedResponse = + PersistentResource.newBuilder() + .setName( + PersistentResourceName.of("[PROJECT]", "[LOCATION]", "[PERSISTENT_RESOURCE]") + .toString()) + .setDisplayName("displayName1714148973") + .addAllResourcePools(new ArrayList()) + .setError(Status.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setNetwork("network1843485230") + .setEncryptionSpec(EncryptionSpec.newBuilder().build()) + .setResourceRuntimeSpec(ResourceRuntimeSpec.newBuilder().build()) + .setResourceRuntime(ResourceRuntime.newBuilder().build()) + .addAllReservedIpRanges(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("rebootPersistentResourceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockPersistentResourceService.addResponse(resultOperation); + + String name = "name3373707"; + + PersistentResource actualResponse = client.rebootPersistentResourceAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPersistentResourceService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RebootPersistentResourceRequest actualRequest = + ((RebootPersistentResourceRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void rebootPersistentResourceExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPersistentResourceService.addException(exception); + + try { + String name = "name3373707"; + client.rebootPersistentResourceAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + @Test public void listLocationsTest() throws Exception { Location responsesElement = Location.newBuilder().build(); diff --git a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/PredictionServiceClientTest.java b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/PredictionServiceClientTest.java index a9282ad98b84..9493cf88091d 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/PredictionServiceClientTest.java +++ b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/PredictionServiceClientTest.java @@ -962,6 +962,7 @@ public void streamGenerateContentTest() throws Exception { GenerateContentRequest.newBuilder() .setModel("model104069929") .addAllContents(new ArrayList()) + .setSystemInstruction(Content.newBuilder().build()) .addAllTools(new ArrayList()) .setToolConfig(ToolConfig.newBuilder().build()) .addAllSafetySettings(new ArrayList()) @@ -987,6 +988,7 @@ public void streamGenerateContentExceptionTest() throws Exception { GenerateContentRequest.newBuilder() .setModel("model104069929") .addAllContents(new ArrayList()) + .setSystemInstruction(Content.newBuilder().build()) .addAllTools(new ArrayList()) .setToolConfig(ToolConfig.newBuilder().build()) .addAllSafetySettings(new ArrayList()) @@ -1009,6 +1011,62 @@ public void streamGenerateContentExceptionTest() throws Exception { } } + @Test + public void chatCompletionsTest() throws Exception { + HttpBody expectedResponse = + HttpBody.newBuilder() + .setContentType("contentType-389131437") + .setData(ByteString.EMPTY) + .addAllExtensions(new ArrayList()) + .build(); + mockPredictionService.addResponse(expectedResponse); + ChatCompletionsRequest request = + ChatCompletionsRequest.newBuilder() + .setEndpoint( + EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setHttpBody(HttpBody.newBuilder().build()) + .build(); + + MockStreamObserver responseObserver = new MockStreamObserver<>(); + + ServerStreamingCallable callable = + client.chatCompletionsCallable(); + callable.serverStreamingCall(request, responseObserver); + + List actualResponses = responseObserver.future().get(); + Assert.assertEquals(1, actualResponses.size()); + Assert.assertEquals(expectedResponse, actualResponses.get(0)); + } + + @Test + public void chatCompletionsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPredictionService.addException(exception); + ChatCompletionsRequest request = + ChatCompletionsRequest.newBuilder() + .setEndpoint( + EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setHttpBody(HttpBody.newBuilder().build()) + .build(); + + MockStreamObserver responseObserver = new MockStreamObserver<>(); + + ServerStreamingCallable callable = + client.chatCompletionsCallable(); + callable.serverStreamingCall(request, responseObserver); + + try { + List actualResponses = responseObserver.future().get(); + Assert.fail("No exception thrown"); + } catch (ExecutionException e) { + Assert.assertTrue(e.getCause() instanceof InvalidArgumentException); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + @Test public void listLocationsTest() throws Exception { Location responsesElement = Location.newBuilder().build(); diff --git a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/VertexRagDataServiceClientTest.java b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/VertexRagDataServiceClientTest.java new file mode 100644 index 000000000000..bd64ab59b050 --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/VertexRagDataServiceClientTest.java @@ -0,0 +1,1175 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1; + +import static com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceClient.ListLocationsPagedResponse; +import static com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceClient.ListRagCorporaPagedResponse; +import static com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceClient.ListRagFilesPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.collect.Lists; +import com.google.iam.v1.AuditConfig; +import com.google.iam.v1.Binding; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.ByteString; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class VertexRagDataServiceClientTest { + private static MockIAMPolicy mockIAMPolicy; + private static MockLocations mockLocations; + private static MockServiceHelper mockServiceHelper; + private static MockVertexRagDataService mockVertexRagDataService; + private LocalChannelProvider channelProvider; + private VertexRagDataServiceClient client; + + @BeforeClass + public static void startStaticServer() { + mockVertexRagDataService = new MockVertexRagDataService(); + mockLocations = new MockLocations(); + mockIAMPolicy = new MockIAMPolicy(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList(mockVertexRagDataService, mockLocations, mockIAMPolicy)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + VertexRagDataServiceSettings settings = + VertexRagDataServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = VertexRagDataServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void createRagCorpusTest() throws Exception { + RagCorpus expectedResponse = + RagCorpus.newBuilder() + .setName(RagCorpusName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createRagCorpusTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockVertexRagDataService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + RagCorpus ragCorpus = RagCorpus.newBuilder().build(); + + RagCorpus actualResponse = client.createRagCorpusAsync(parent, ragCorpus).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockVertexRagDataService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateRagCorpusRequest actualRequest = ((CreateRagCorpusRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(ragCorpus, actualRequest.getRagCorpus()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createRagCorpusExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockVertexRagDataService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + RagCorpus ragCorpus = RagCorpus.newBuilder().build(); + client.createRagCorpusAsync(parent, ragCorpus).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createRagCorpusTest2() throws Exception { + RagCorpus expectedResponse = + RagCorpus.newBuilder() + .setName(RagCorpusName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createRagCorpusTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockVertexRagDataService.addResponse(resultOperation); + + String parent = "parent-995424086"; + RagCorpus ragCorpus = RagCorpus.newBuilder().build(); + + RagCorpus actualResponse = client.createRagCorpusAsync(parent, ragCorpus).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockVertexRagDataService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateRagCorpusRequest actualRequest = ((CreateRagCorpusRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(ragCorpus, actualRequest.getRagCorpus()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createRagCorpusExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockVertexRagDataService.addException(exception); + + try { + String parent = "parent-995424086"; + RagCorpus ragCorpus = RagCorpus.newBuilder().build(); + client.createRagCorpusAsync(parent, ragCorpus).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void getRagCorpusTest() throws Exception { + RagCorpus expectedResponse = + RagCorpus.newBuilder() + .setName(RagCorpusName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockVertexRagDataService.addResponse(expectedResponse); + + RagCorpusName name = RagCorpusName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]"); + + RagCorpus actualResponse = client.getRagCorpus(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockVertexRagDataService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetRagCorpusRequest actualRequest = ((GetRagCorpusRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getRagCorpusExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockVertexRagDataService.addException(exception); + + try { + RagCorpusName name = RagCorpusName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]"); + client.getRagCorpus(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getRagCorpusTest2() throws Exception { + RagCorpus expectedResponse = + RagCorpus.newBuilder() + .setName(RagCorpusName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockVertexRagDataService.addResponse(expectedResponse); + + String name = "name3373707"; + + RagCorpus actualResponse = client.getRagCorpus(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockVertexRagDataService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetRagCorpusRequest actualRequest = ((GetRagCorpusRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getRagCorpusExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockVertexRagDataService.addException(exception); + + try { + String name = "name3373707"; + client.getRagCorpus(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listRagCorporaTest() throws Exception { + RagCorpus responsesElement = RagCorpus.newBuilder().build(); + ListRagCorporaResponse expectedResponse = + ListRagCorporaResponse.newBuilder() + .setNextPageToken("") + .addAllRagCorpora(Arrays.asList(responsesElement)) + .build(); + mockVertexRagDataService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListRagCorporaPagedResponse pagedListResponse = client.listRagCorpora(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getRagCorporaList().get(0), resources.get(0)); + + List actualRequests = mockVertexRagDataService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListRagCorporaRequest actualRequest = ((ListRagCorporaRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listRagCorporaExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockVertexRagDataService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listRagCorpora(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listRagCorporaTest2() throws Exception { + RagCorpus responsesElement = RagCorpus.newBuilder().build(); + ListRagCorporaResponse expectedResponse = + ListRagCorporaResponse.newBuilder() + .setNextPageToken("") + .addAllRagCorpora(Arrays.asList(responsesElement)) + .build(); + mockVertexRagDataService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListRagCorporaPagedResponse pagedListResponse = client.listRagCorpora(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getRagCorporaList().get(0), resources.get(0)); + + List actualRequests = mockVertexRagDataService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListRagCorporaRequest actualRequest = ((ListRagCorporaRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listRagCorporaExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockVertexRagDataService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listRagCorpora(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteRagCorpusTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteRagCorpusTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockVertexRagDataService.addResponse(resultOperation); + + RagCorpusName name = RagCorpusName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]"); + + client.deleteRagCorpusAsync(name).get(); + + List actualRequests = mockVertexRagDataService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteRagCorpusRequest actualRequest = ((DeleteRagCorpusRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteRagCorpusExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockVertexRagDataService.addException(exception); + + try { + RagCorpusName name = RagCorpusName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]"); + client.deleteRagCorpusAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteRagCorpusTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteRagCorpusTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockVertexRagDataService.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteRagCorpusAsync(name).get(); + + List actualRequests = mockVertexRagDataService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteRagCorpusRequest actualRequest = ((DeleteRagCorpusRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteRagCorpusExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockVertexRagDataService.addException(exception); + + try { + String name = "name3373707"; + client.deleteRagCorpusAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void uploadRagFileTest() throws Exception { + UploadRagFileResponse expectedResponse = UploadRagFileResponse.newBuilder().build(); + mockVertexRagDataService.addResponse(expectedResponse); + + RagCorpusName parent = RagCorpusName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]"); + RagFile ragFile = RagFile.newBuilder().build(); + UploadRagFileConfig uploadRagFileConfig = UploadRagFileConfig.newBuilder().build(); + + UploadRagFileResponse actualResponse = + client.uploadRagFile(parent, ragFile, uploadRagFileConfig); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockVertexRagDataService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UploadRagFileRequest actualRequest = ((UploadRagFileRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(ragFile, actualRequest.getRagFile()); + Assert.assertEquals(uploadRagFileConfig, actualRequest.getUploadRagFileConfig()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void uploadRagFileExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockVertexRagDataService.addException(exception); + + try { + RagCorpusName parent = RagCorpusName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]"); + RagFile ragFile = RagFile.newBuilder().build(); + UploadRagFileConfig uploadRagFileConfig = UploadRagFileConfig.newBuilder().build(); + client.uploadRagFile(parent, ragFile, uploadRagFileConfig); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void uploadRagFileTest2() throws Exception { + UploadRagFileResponse expectedResponse = UploadRagFileResponse.newBuilder().build(); + mockVertexRagDataService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + RagFile ragFile = RagFile.newBuilder().build(); + UploadRagFileConfig uploadRagFileConfig = UploadRagFileConfig.newBuilder().build(); + + UploadRagFileResponse actualResponse = + client.uploadRagFile(parent, ragFile, uploadRagFileConfig); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockVertexRagDataService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UploadRagFileRequest actualRequest = ((UploadRagFileRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(ragFile, actualRequest.getRagFile()); + Assert.assertEquals(uploadRagFileConfig, actualRequest.getUploadRagFileConfig()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void uploadRagFileExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockVertexRagDataService.addException(exception); + + try { + String parent = "parent-995424086"; + RagFile ragFile = RagFile.newBuilder().build(); + UploadRagFileConfig uploadRagFileConfig = UploadRagFileConfig.newBuilder().build(); + client.uploadRagFile(parent, ragFile, uploadRagFileConfig); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void importRagFilesTest() throws Exception { + ImportRagFilesResponse expectedResponse = + ImportRagFilesResponse.newBuilder().setImportedRagFilesCount(1148003429).build(); + Operation resultOperation = + Operation.newBuilder() + .setName("importRagFilesTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockVertexRagDataService.addResponse(resultOperation); + + RagCorpusName parent = RagCorpusName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]"); + ImportRagFilesConfig importRagFilesConfig = ImportRagFilesConfig.newBuilder().build(); + + ImportRagFilesResponse actualResponse = + client.importRagFilesAsync(parent, importRagFilesConfig).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockVertexRagDataService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ImportRagFilesRequest actualRequest = ((ImportRagFilesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(importRagFilesConfig, actualRequest.getImportRagFilesConfig()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void importRagFilesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockVertexRagDataService.addException(exception); + + try { + RagCorpusName parent = RagCorpusName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]"); + ImportRagFilesConfig importRagFilesConfig = ImportRagFilesConfig.newBuilder().build(); + client.importRagFilesAsync(parent, importRagFilesConfig).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void importRagFilesTest2() throws Exception { + ImportRagFilesResponse expectedResponse = + ImportRagFilesResponse.newBuilder().setImportedRagFilesCount(1148003429).build(); + Operation resultOperation = + Operation.newBuilder() + .setName("importRagFilesTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockVertexRagDataService.addResponse(resultOperation); + + String parent = "parent-995424086"; + ImportRagFilesConfig importRagFilesConfig = ImportRagFilesConfig.newBuilder().build(); + + ImportRagFilesResponse actualResponse = + client.importRagFilesAsync(parent, importRagFilesConfig).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockVertexRagDataService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ImportRagFilesRequest actualRequest = ((ImportRagFilesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(importRagFilesConfig, actualRequest.getImportRagFilesConfig()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void importRagFilesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockVertexRagDataService.addException(exception); + + try { + String parent = "parent-995424086"; + ImportRagFilesConfig importRagFilesConfig = ImportRagFilesConfig.newBuilder().build(); + client.importRagFilesAsync(parent, importRagFilesConfig).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void getRagFileTest() throws Exception { + RagFile expectedResponse = + RagFile.newBuilder() + .setName( + RagFileName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]", "[RAG_FILE]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setSizeBytes(-1796325715) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockVertexRagDataService.addResponse(expectedResponse); + + RagFileName name = RagFileName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]", "[RAG_FILE]"); + + RagFile actualResponse = client.getRagFile(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockVertexRagDataService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetRagFileRequest actualRequest = ((GetRagFileRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getRagFileExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockVertexRagDataService.addException(exception); + + try { + RagFileName name = RagFileName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]", "[RAG_FILE]"); + client.getRagFile(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getRagFileTest2() throws Exception { + RagFile expectedResponse = + RagFile.newBuilder() + .setName( + RagFileName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]", "[RAG_FILE]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setSizeBytes(-1796325715) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockVertexRagDataService.addResponse(expectedResponse); + + String name = "name3373707"; + + RagFile actualResponse = client.getRagFile(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockVertexRagDataService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetRagFileRequest actualRequest = ((GetRagFileRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getRagFileExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockVertexRagDataService.addException(exception); + + try { + String name = "name3373707"; + client.getRagFile(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listRagFilesTest() throws Exception { + RagFile responsesElement = RagFile.newBuilder().build(); + ListRagFilesResponse expectedResponse = + ListRagFilesResponse.newBuilder() + .setNextPageToken("") + .addAllRagFiles(Arrays.asList(responsesElement)) + .build(); + mockVertexRagDataService.addResponse(expectedResponse); + + RagCorpusName parent = RagCorpusName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]"); + + ListRagFilesPagedResponse pagedListResponse = client.listRagFiles(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getRagFilesList().get(0), resources.get(0)); + + List actualRequests = mockVertexRagDataService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListRagFilesRequest actualRequest = ((ListRagFilesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listRagFilesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockVertexRagDataService.addException(exception); + + try { + RagCorpusName parent = RagCorpusName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]"); + client.listRagFiles(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listRagFilesTest2() throws Exception { + RagFile responsesElement = RagFile.newBuilder().build(); + ListRagFilesResponse expectedResponse = + ListRagFilesResponse.newBuilder() + .setNextPageToken("") + .addAllRagFiles(Arrays.asList(responsesElement)) + .build(); + mockVertexRagDataService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListRagFilesPagedResponse pagedListResponse = client.listRagFiles(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getRagFilesList().get(0), resources.get(0)); + + List actualRequests = mockVertexRagDataService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListRagFilesRequest actualRequest = ((ListRagFilesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listRagFilesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockVertexRagDataService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listRagFiles(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteRagFileTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteRagFileTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockVertexRagDataService.addResponse(resultOperation); + + RagFileName name = RagFileName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]", "[RAG_FILE]"); + + client.deleteRagFileAsync(name).get(); + + List actualRequests = mockVertexRagDataService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteRagFileRequest actualRequest = ((DeleteRagFileRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteRagFileExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockVertexRagDataService.addException(exception); + + try { + RagFileName name = RagFileName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]", "[RAG_FILE]"); + client.deleteRagFileAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteRagFileTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteRagFileTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockVertexRagDataService.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteRagFileAsync(name).get(); + + List actualRequests = mockVertexRagDataService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteRagFileRequest actualRequest = ((DeleteRagFileRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteRagFileExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockVertexRagDataService.addException(exception); + + try { + String name = "name3373707"; + client.deleteRagFileAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockLocations.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLocationsPagedResponse pagedListResponse = client.listLocations(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLocationsList().get(0), resources.get(0)); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListLocationsRequest actualRequest = ((ListLocationsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getFilter(), actualRequest.getFilter()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listLocationsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLocations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLocationTest() throws Exception { + Location expectedResponse = + Location.newBuilder() + .setName("name3373707") + .setLocationId("locationId1541836720") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setMetadata(Any.newBuilder().build()) + .build(); + mockLocations.addResponse(expectedResponse); + + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + + Location actualResponse = client.getLocation(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetLocationRequest actualRequest = ((GetLocationRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getLocationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void setIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockIAMPolicy.addResponse(expectedResponse); + + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + + Policy actualResponse = client.setIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SetIamPolicyRequest actualRequest = ((SetIamPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getPolicy(), actualRequest.getPolicy()); + Assert.assertEquals(request.getUpdateMask(), actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void setIamPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + client.setIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockIAMPolicy.addResponse(expectedResponse); + + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + + Policy actualResponse = client.getIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetIamPolicyRequest actualRequest = ((GetIamPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getOptions(), actualRequest.getOptions()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getIamPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + client.getIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void testIamPermissionsTest() throws Exception { + TestIamPermissionsResponse expectedResponse = + TestIamPermissionsResponse.newBuilder().addAllPermissions(new ArrayList()).build(); + mockIAMPolicy.addResponse(expectedResponse); + + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .addAllPermissions(new ArrayList()) + .build(); + + TestIamPermissionsResponse actualResponse = client.testIamPermissions(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + TestIamPermissionsRequest actualRequest = ((TestIamPermissionsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getPermissionsList(), actualRequest.getPermissionsList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void testIamPermissionsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .addAllPermissions(new ArrayList()) + .build(); + client.testIamPermissions(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/VertexRagServiceClientTest.java b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/VertexRagServiceClientTest.java new file mode 100644 index 000000000000..141343c0a769 --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/VertexRagServiceClientTest.java @@ -0,0 +1,444 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1; + +import static com.google.cloud.aiplatform.v1beta1.VertexRagServiceClient.ListLocationsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.collect.Lists; +import com.google.iam.v1.AuditConfig; +import com.google.iam.v1.Binding; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.ByteString; +import com.google.protobuf.FieldMask; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.UUID; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class VertexRagServiceClientTest { + private static MockIAMPolicy mockIAMPolicy; + private static MockLocations mockLocations; + private static MockServiceHelper mockServiceHelper; + private static MockVertexRagService mockVertexRagService; + private LocalChannelProvider channelProvider; + private VertexRagServiceClient client; + + @BeforeClass + public static void startStaticServer() { + mockVertexRagService = new MockVertexRagService(); + mockLocations = new MockLocations(); + mockIAMPolicy = new MockIAMPolicy(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList(mockVertexRagService, mockLocations, mockIAMPolicy)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + VertexRagServiceSettings settings = + VertexRagServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = VertexRagServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void retrieveContextsTest() throws Exception { + RetrieveContextsResponse expectedResponse = + RetrieveContextsResponse.newBuilder().setContexts(RagContexts.newBuilder().build()).build(); + mockVertexRagService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + RagQuery query = RagQuery.newBuilder().build(); + + RetrieveContextsResponse actualResponse = client.retrieveContexts(parent, query); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockVertexRagService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RetrieveContextsRequest actualRequest = ((RetrieveContextsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(query, actualRequest.getQuery()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void retrieveContextsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockVertexRagService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + RagQuery query = RagQuery.newBuilder().build(); + client.retrieveContexts(parent, query); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void retrieveContextsTest2() throws Exception { + RetrieveContextsResponse expectedResponse = + RetrieveContextsResponse.newBuilder().setContexts(RagContexts.newBuilder().build()).build(); + mockVertexRagService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + RagQuery query = RagQuery.newBuilder().build(); + + RetrieveContextsResponse actualResponse = client.retrieveContexts(parent, query); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockVertexRagService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RetrieveContextsRequest actualRequest = ((RetrieveContextsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(query, actualRequest.getQuery()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void retrieveContextsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockVertexRagService.addException(exception); + + try { + String parent = "parent-995424086"; + RagQuery query = RagQuery.newBuilder().build(); + client.retrieveContexts(parent, query); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockLocations.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLocationsPagedResponse pagedListResponse = client.listLocations(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLocationsList().get(0), resources.get(0)); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListLocationsRequest actualRequest = ((ListLocationsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getFilter(), actualRequest.getFilter()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listLocationsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLocations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLocationTest() throws Exception { + Location expectedResponse = + Location.newBuilder() + .setName("name3373707") + .setLocationId("locationId1541836720") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setMetadata(Any.newBuilder().build()) + .build(); + mockLocations.addResponse(expectedResponse); + + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + + Location actualResponse = client.getLocation(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetLocationRequest actualRequest = ((GetLocationRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getLocationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void setIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockIAMPolicy.addResponse(expectedResponse); + + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + + Policy actualResponse = client.setIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SetIamPolicyRequest actualRequest = ((SetIamPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getPolicy(), actualRequest.getPolicy()); + Assert.assertEquals(request.getUpdateMask(), actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void setIamPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + client.setIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockIAMPolicy.addResponse(expectedResponse); + + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + + Policy actualResponse = client.getIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetIamPolicyRequest actualRequest = ((GetIamPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getOptions(), actualRequest.getOptions()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getIamPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + client.getIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void testIamPermissionsTest() throws Exception { + TestIamPermissionsResponse expectedResponse = + TestIamPermissionsResponse.newBuilder().addAllPermissions(new ArrayList()).build(); + mockIAMPolicy.addResponse(expectedResponse); + + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .addAllPermissions(new ArrayList()) + .build(); + + TestIamPermissionsResponse actualResponse = client.testIamPermissions(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + TestIamPermissionsRequest actualRequest = ((TestIamPermissionsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getPermissionsList(), actualRequest.getPermissionsList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void testIamPermissionsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .addAllPermissions(new ArrayList()) + .build(); + client.testIamPermissions(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-aiplatform/grpc-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GenAiTuningServiceGrpc.java b/java-aiplatform/grpc-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GenAiTuningServiceGrpc.java new file mode 100644 index 000000000000..c774c3b5d83b --- /dev/null +++ b/java-aiplatform/grpc-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GenAiTuningServiceGrpc.java @@ -0,0 +1,775 @@ +/* + * Copyright 2024 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.aiplatform.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * A service for creating and managing GenAI Tuning Jobs.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/aiplatform/v1/genai_tuning_service.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class GenAiTuningServiceGrpc { + + private GenAiTuningServiceGrpc() {} + + public static final java.lang.String SERVICE_NAME = + "google.cloud.aiplatform.v1.GenAiTuningService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.CreateTuningJobRequest, + com.google.cloud.aiplatform.v1.TuningJob> + getCreateTuningJobMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateTuningJob", + requestType = com.google.cloud.aiplatform.v1.CreateTuningJobRequest.class, + responseType = com.google.cloud.aiplatform.v1.TuningJob.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.CreateTuningJobRequest, + com.google.cloud.aiplatform.v1.TuningJob> + getCreateTuningJobMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.CreateTuningJobRequest, + com.google.cloud.aiplatform.v1.TuningJob> + getCreateTuningJobMethod; + if ((getCreateTuningJobMethod = GenAiTuningServiceGrpc.getCreateTuningJobMethod) == null) { + synchronized (GenAiTuningServiceGrpc.class) { + if ((getCreateTuningJobMethod = GenAiTuningServiceGrpc.getCreateTuningJobMethod) == null) { + GenAiTuningServiceGrpc.getCreateTuningJobMethod = + getCreateTuningJobMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateTuningJob")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.CreateTuningJobRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.TuningJob.getDefaultInstance())) + .setSchemaDescriptor( + new GenAiTuningServiceMethodDescriptorSupplier("CreateTuningJob")) + .build(); + } + } + } + return getCreateTuningJobMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.GetTuningJobRequest, + com.google.cloud.aiplatform.v1.TuningJob> + getGetTuningJobMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetTuningJob", + requestType = com.google.cloud.aiplatform.v1.GetTuningJobRequest.class, + responseType = com.google.cloud.aiplatform.v1.TuningJob.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.GetTuningJobRequest, + com.google.cloud.aiplatform.v1.TuningJob> + getGetTuningJobMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.GetTuningJobRequest, + com.google.cloud.aiplatform.v1.TuningJob> + getGetTuningJobMethod; + if ((getGetTuningJobMethod = GenAiTuningServiceGrpc.getGetTuningJobMethod) == null) { + synchronized (GenAiTuningServiceGrpc.class) { + if ((getGetTuningJobMethod = GenAiTuningServiceGrpc.getGetTuningJobMethod) == null) { + GenAiTuningServiceGrpc.getGetTuningJobMethod = + getGetTuningJobMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetTuningJob")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.GetTuningJobRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.TuningJob.getDefaultInstance())) + .setSchemaDescriptor( + new GenAiTuningServiceMethodDescriptorSupplier("GetTuningJob")) + .build(); + } + } + } + return getGetTuningJobMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ListTuningJobsRequest, + com.google.cloud.aiplatform.v1.ListTuningJobsResponse> + getListTuningJobsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListTuningJobs", + requestType = com.google.cloud.aiplatform.v1.ListTuningJobsRequest.class, + responseType = com.google.cloud.aiplatform.v1.ListTuningJobsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ListTuningJobsRequest, + com.google.cloud.aiplatform.v1.ListTuningJobsResponse> + getListTuningJobsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ListTuningJobsRequest, + com.google.cloud.aiplatform.v1.ListTuningJobsResponse> + getListTuningJobsMethod; + if ((getListTuningJobsMethod = GenAiTuningServiceGrpc.getListTuningJobsMethod) == null) { + synchronized (GenAiTuningServiceGrpc.class) { + if ((getListTuningJobsMethod = GenAiTuningServiceGrpc.getListTuningJobsMethod) == null) { + GenAiTuningServiceGrpc.getListTuningJobsMethod = + getListTuningJobsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListTuningJobs")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.ListTuningJobsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.ListTuningJobsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new GenAiTuningServiceMethodDescriptorSupplier("ListTuningJobs")) + .build(); + } + } + } + return getListTuningJobsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.CancelTuningJobRequest, com.google.protobuf.Empty> + getCancelTuningJobMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CancelTuningJob", + requestType = com.google.cloud.aiplatform.v1.CancelTuningJobRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.CancelTuningJobRequest, com.google.protobuf.Empty> + getCancelTuningJobMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.CancelTuningJobRequest, com.google.protobuf.Empty> + getCancelTuningJobMethod; + if ((getCancelTuningJobMethod = GenAiTuningServiceGrpc.getCancelTuningJobMethod) == null) { + synchronized (GenAiTuningServiceGrpc.class) { + if ((getCancelTuningJobMethod = GenAiTuningServiceGrpc.getCancelTuningJobMethod) == null) { + GenAiTuningServiceGrpc.getCancelTuningJobMethod = + getCancelTuningJobMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CancelTuningJob")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.CancelTuningJobRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new GenAiTuningServiceMethodDescriptorSupplier("CancelTuningJob")) + .build(); + } + } + } + return getCancelTuningJobMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static GenAiTuningServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public GenAiTuningServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new GenAiTuningServiceStub(channel, callOptions); + } + }; + return GenAiTuningServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static GenAiTuningServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public GenAiTuningServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new GenAiTuningServiceBlockingStub(channel, callOptions); + } + }; + return GenAiTuningServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static GenAiTuningServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public GenAiTuningServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new GenAiTuningServiceFutureStub(channel, callOptions); + } + }; + return GenAiTuningServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * A service for creating and managing GenAI Tuning Jobs.
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Creates a TuningJob. A created TuningJob right away will be attempted to
+     * be run.
+     * 
+ */ + default void createTuningJob( + com.google.cloud.aiplatform.v1.CreateTuningJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateTuningJobMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets a TuningJob.
+     * 
+ */ + default void getTuningJob( + com.google.cloud.aiplatform.v1.GetTuningJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetTuningJobMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists TuningJobs in a Location.
+     * 
+ */ + default void listTuningJobs( + com.google.cloud.aiplatform.v1.ListTuningJobsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListTuningJobsMethod(), responseObserver); + } + + /** + * + * + *
+     * Cancels a TuningJob.
+     * Starts asynchronous cancellation on the TuningJob. The server makes a best
+     * effort to cancel the job, but success is not guaranteed. Clients can use
+     * [GenAiTuningService.GetTuningJob][google.cloud.aiplatform.v1.GenAiTuningService.GetTuningJob]
+     * or other methods to check whether the cancellation succeeded or whether the
+     * job completed despite cancellation. On successful cancellation, the
+     * TuningJob is not deleted; instead it becomes a job with a
+     * [TuningJob.error][google.cloud.aiplatform.v1.TuningJob.error] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+     * `Code.CANCELLED`, and
+     * [TuningJob.state][google.cloud.aiplatform.v1.TuningJob.state] is set to
+     * `CANCELLED`.
+     * 
+ */ + default void cancelTuningJob( + com.google.cloud.aiplatform.v1.CancelTuningJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCancelTuningJobMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service GenAiTuningService. + * + *
+   * A service for creating and managing GenAI Tuning Jobs.
+   * 
+ */ + public abstract static class GenAiTuningServiceImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return GenAiTuningServiceGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service GenAiTuningService. + * + *
+   * A service for creating and managing GenAI Tuning Jobs.
+   * 
+ */ + public static final class GenAiTuningServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private GenAiTuningServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected GenAiTuningServiceStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new GenAiTuningServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a TuningJob. A created TuningJob right away will be attempted to
+     * be run.
+     * 
+ */ + public void createTuningJob( + com.google.cloud.aiplatform.v1.CreateTuningJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateTuningJobMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets a TuningJob.
+     * 
+ */ + public void getTuningJob( + com.google.cloud.aiplatform.v1.GetTuningJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetTuningJobMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists TuningJobs in a Location.
+     * 
+ */ + public void listTuningJobs( + com.google.cloud.aiplatform.v1.ListTuningJobsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListTuningJobsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Cancels a TuningJob.
+     * Starts asynchronous cancellation on the TuningJob. The server makes a best
+     * effort to cancel the job, but success is not guaranteed. Clients can use
+     * [GenAiTuningService.GetTuningJob][google.cloud.aiplatform.v1.GenAiTuningService.GetTuningJob]
+     * or other methods to check whether the cancellation succeeded or whether the
+     * job completed despite cancellation. On successful cancellation, the
+     * TuningJob is not deleted; instead it becomes a job with a
+     * [TuningJob.error][google.cloud.aiplatform.v1.TuningJob.error] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+     * `Code.CANCELLED`, and
+     * [TuningJob.state][google.cloud.aiplatform.v1.TuningJob.state] is set to
+     * `CANCELLED`.
+     * 
+ */ + public void cancelTuningJob( + com.google.cloud.aiplatform.v1.CancelTuningJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCancelTuningJobMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service GenAiTuningService. + * + *
+   * A service for creating and managing GenAI Tuning Jobs.
+   * 
+ */ + public static final class GenAiTuningServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private GenAiTuningServiceBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected GenAiTuningServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new GenAiTuningServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a TuningJob. A created TuningJob right away will be attempted to
+     * be run.
+     * 
+ */ + public com.google.cloud.aiplatform.v1.TuningJob createTuningJob( + com.google.cloud.aiplatform.v1.CreateTuningJobRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateTuningJobMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets a TuningJob.
+     * 
+ */ + public com.google.cloud.aiplatform.v1.TuningJob getTuningJob( + com.google.cloud.aiplatform.v1.GetTuningJobRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetTuningJobMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists TuningJobs in a Location.
+     * 
+ */ + public com.google.cloud.aiplatform.v1.ListTuningJobsResponse listTuningJobs( + com.google.cloud.aiplatform.v1.ListTuningJobsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListTuningJobsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Cancels a TuningJob.
+     * Starts asynchronous cancellation on the TuningJob. The server makes a best
+     * effort to cancel the job, but success is not guaranteed. Clients can use
+     * [GenAiTuningService.GetTuningJob][google.cloud.aiplatform.v1.GenAiTuningService.GetTuningJob]
+     * or other methods to check whether the cancellation succeeded or whether the
+     * job completed despite cancellation. On successful cancellation, the
+     * TuningJob is not deleted; instead it becomes a job with a
+     * [TuningJob.error][google.cloud.aiplatform.v1.TuningJob.error] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+     * `Code.CANCELLED`, and
+     * [TuningJob.state][google.cloud.aiplatform.v1.TuningJob.state] is set to
+     * `CANCELLED`.
+     * 
+ */ + public com.google.protobuf.Empty cancelTuningJob( + com.google.cloud.aiplatform.v1.CancelTuningJobRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCancelTuningJobMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service GenAiTuningService. + * + *
+   * A service for creating and managing GenAI Tuning Jobs.
+   * 
+ */ + public static final class GenAiTuningServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private GenAiTuningServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected GenAiTuningServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new GenAiTuningServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a TuningJob. A created TuningJob right away will be attempted to
+     * be run.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1.TuningJob> + createTuningJob(com.google.cloud.aiplatform.v1.CreateTuningJobRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateTuningJobMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets a TuningJob.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1.TuningJob> + getTuningJob(com.google.cloud.aiplatform.v1.GetTuningJobRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetTuningJobMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists TuningJobs in a Location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1.ListTuningJobsResponse> + listTuningJobs(com.google.cloud.aiplatform.v1.ListTuningJobsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListTuningJobsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Cancels a TuningJob.
+     * Starts asynchronous cancellation on the TuningJob. The server makes a best
+     * effort to cancel the job, but success is not guaranteed. Clients can use
+     * [GenAiTuningService.GetTuningJob][google.cloud.aiplatform.v1.GenAiTuningService.GetTuningJob]
+     * or other methods to check whether the cancellation succeeded or whether the
+     * job completed despite cancellation. On successful cancellation, the
+     * TuningJob is not deleted; instead it becomes a job with a
+     * [TuningJob.error][google.cloud.aiplatform.v1.TuningJob.error] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+     * `Code.CANCELLED`, and
+     * [TuningJob.state][google.cloud.aiplatform.v1.TuningJob.state] is set to
+     * `CANCELLED`.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + cancelTuningJob(com.google.cloud.aiplatform.v1.CancelTuningJobRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCancelTuningJobMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_CREATE_TUNING_JOB = 0; + private static final int METHODID_GET_TUNING_JOB = 1; + private static final int METHODID_LIST_TUNING_JOBS = 2; + private static final int METHODID_CANCEL_TUNING_JOB = 3; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_CREATE_TUNING_JOB: + serviceImpl.createTuningJob( + (com.google.cloud.aiplatform.v1.CreateTuningJobRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_TUNING_JOB: + serviceImpl.getTuningJob( + (com.google.cloud.aiplatform.v1.GetTuningJobRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_TUNING_JOBS: + serviceImpl.listTuningJobs( + (com.google.cloud.aiplatform.v1.ListTuningJobsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CANCEL_TUNING_JOB: + serviceImpl.cancelTuningJob( + (com.google.cloud.aiplatform.v1.CancelTuningJobRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getCreateTuningJobMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.CreateTuningJobRequest, + com.google.cloud.aiplatform.v1.TuningJob>(service, METHODID_CREATE_TUNING_JOB))) + .addMethod( + getGetTuningJobMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.GetTuningJobRequest, + com.google.cloud.aiplatform.v1.TuningJob>(service, METHODID_GET_TUNING_JOB))) + .addMethod( + getListTuningJobsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.ListTuningJobsRequest, + com.google.cloud.aiplatform.v1.ListTuningJobsResponse>( + service, METHODID_LIST_TUNING_JOBS))) + .addMethod( + getCancelTuningJobMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.CancelTuningJobRequest, + com.google.protobuf.Empty>(service, METHODID_CANCEL_TUNING_JOB))) + .build(); + } + + private abstract static class GenAiTuningServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + GenAiTuningServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.aiplatform.v1.GenAiTuningServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("GenAiTuningService"); + } + } + + private static final class GenAiTuningServiceFileDescriptorSupplier + extends GenAiTuningServiceBaseDescriptorSupplier { + GenAiTuningServiceFileDescriptorSupplier() {} + } + + private static final class GenAiTuningServiceMethodDescriptorSupplier + extends GenAiTuningServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + GenAiTuningServiceMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (GenAiTuningServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new GenAiTuningServiceFileDescriptorSupplier()) + .addMethod(getCreateTuningJobMethod()) + .addMethod(getGetTuningJobMethod()) + .addMethod(getListTuningJobsMethod()) + .addMethod(getCancelTuningJobMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-aiplatform/grpc-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NotebookServiceGrpc.java b/java-aiplatform/grpc-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NotebookServiceGrpc.java new file mode 100644 index 000000000000..b4f0ea509d55 --- /dev/null +++ b/java-aiplatform/grpc-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NotebookServiceGrpc.java @@ -0,0 +1,1487 @@ +/* + * Copyright 2024 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.aiplatform.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * The interface for Vertex Notebook service (a.k.a. Colab on Workbench).
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/aiplatform/v1/notebook_service.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class NotebookServiceGrpc { + + private NotebookServiceGrpc() {} + + public static final java.lang.String SERVICE_NAME = "google.cloud.aiplatform.v1.NotebookService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateRequest, + com.google.longrunning.Operation> + getCreateNotebookRuntimeTemplateMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateNotebookRuntimeTemplate", + requestType = com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateRequest, + com.google.longrunning.Operation> + getCreateNotebookRuntimeTemplateMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateRequest, + com.google.longrunning.Operation> + getCreateNotebookRuntimeTemplateMethod; + if ((getCreateNotebookRuntimeTemplateMethod = + NotebookServiceGrpc.getCreateNotebookRuntimeTemplateMethod) + == null) { + synchronized (NotebookServiceGrpc.class) { + if ((getCreateNotebookRuntimeTemplateMethod = + NotebookServiceGrpc.getCreateNotebookRuntimeTemplateMethod) + == null) { + NotebookServiceGrpc.getCreateNotebookRuntimeTemplateMethod = + getCreateNotebookRuntimeTemplateMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreateNotebookRuntimeTemplate")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new NotebookServiceMethodDescriptorSupplier( + "CreateNotebookRuntimeTemplate")) + .build(); + } + } + } + return getCreateNotebookRuntimeTemplateMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.GetNotebookRuntimeTemplateRequest, + com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate> + getGetNotebookRuntimeTemplateMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetNotebookRuntimeTemplate", + requestType = com.google.cloud.aiplatform.v1.GetNotebookRuntimeTemplateRequest.class, + responseType = com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.GetNotebookRuntimeTemplateRequest, + com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate> + getGetNotebookRuntimeTemplateMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.GetNotebookRuntimeTemplateRequest, + com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate> + getGetNotebookRuntimeTemplateMethod; + if ((getGetNotebookRuntimeTemplateMethod = + NotebookServiceGrpc.getGetNotebookRuntimeTemplateMethod) + == null) { + synchronized (NotebookServiceGrpc.class) { + if ((getGetNotebookRuntimeTemplateMethod = + NotebookServiceGrpc.getGetNotebookRuntimeTemplateMethod) + == null) { + NotebookServiceGrpc.getGetNotebookRuntimeTemplateMethod = + getGetNotebookRuntimeTemplateMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GetNotebookRuntimeTemplate")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.GetNotebookRuntimeTemplateRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate + .getDefaultInstance())) + .setSchemaDescriptor( + new NotebookServiceMethodDescriptorSupplier("GetNotebookRuntimeTemplate")) + .build(); + } + } + } + return getGetNotebookRuntimeTemplateMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest, + com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse> + getListNotebookRuntimeTemplatesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListNotebookRuntimeTemplates", + requestType = com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest.class, + responseType = com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest, + com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse> + getListNotebookRuntimeTemplatesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest, + com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse> + getListNotebookRuntimeTemplatesMethod; + if ((getListNotebookRuntimeTemplatesMethod = + NotebookServiceGrpc.getListNotebookRuntimeTemplatesMethod) + == null) { + synchronized (NotebookServiceGrpc.class) { + if ((getListNotebookRuntimeTemplatesMethod = + NotebookServiceGrpc.getListNotebookRuntimeTemplatesMethod) + == null) { + NotebookServiceGrpc.getListNotebookRuntimeTemplatesMethod = + getListNotebookRuntimeTemplatesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListNotebookRuntimeTemplates")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new NotebookServiceMethodDescriptorSupplier( + "ListNotebookRuntimeTemplates")) + .build(); + } + } + } + return getListNotebookRuntimeTemplatesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeTemplateRequest, + com.google.longrunning.Operation> + getDeleteNotebookRuntimeTemplateMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteNotebookRuntimeTemplate", + requestType = com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeTemplateRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeTemplateRequest, + com.google.longrunning.Operation> + getDeleteNotebookRuntimeTemplateMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeTemplateRequest, + com.google.longrunning.Operation> + getDeleteNotebookRuntimeTemplateMethod; + if ((getDeleteNotebookRuntimeTemplateMethod = + NotebookServiceGrpc.getDeleteNotebookRuntimeTemplateMethod) + == null) { + synchronized (NotebookServiceGrpc.class) { + if ((getDeleteNotebookRuntimeTemplateMethod = + NotebookServiceGrpc.getDeleteNotebookRuntimeTemplateMethod) + == null) { + NotebookServiceGrpc.getDeleteNotebookRuntimeTemplateMethod = + getDeleteNotebookRuntimeTemplateMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "DeleteNotebookRuntimeTemplate")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeTemplateRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new NotebookServiceMethodDescriptorSupplier( + "DeleteNotebookRuntimeTemplate")) + .build(); + } + } + } + return getDeleteNotebookRuntimeTemplateMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.AssignNotebookRuntimeRequest, + com.google.longrunning.Operation> + getAssignNotebookRuntimeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "AssignNotebookRuntime", + requestType = com.google.cloud.aiplatform.v1.AssignNotebookRuntimeRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.AssignNotebookRuntimeRequest, + com.google.longrunning.Operation> + getAssignNotebookRuntimeMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.AssignNotebookRuntimeRequest, + com.google.longrunning.Operation> + getAssignNotebookRuntimeMethod; + if ((getAssignNotebookRuntimeMethod = NotebookServiceGrpc.getAssignNotebookRuntimeMethod) + == null) { + synchronized (NotebookServiceGrpc.class) { + if ((getAssignNotebookRuntimeMethod = NotebookServiceGrpc.getAssignNotebookRuntimeMethod) + == null) { + NotebookServiceGrpc.getAssignNotebookRuntimeMethod = + getAssignNotebookRuntimeMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "AssignNotebookRuntime")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.AssignNotebookRuntimeRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new NotebookServiceMethodDescriptorSupplier("AssignNotebookRuntime")) + .build(); + } + } + } + return getAssignNotebookRuntimeMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.GetNotebookRuntimeRequest, + com.google.cloud.aiplatform.v1.NotebookRuntime> + getGetNotebookRuntimeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetNotebookRuntime", + requestType = com.google.cloud.aiplatform.v1.GetNotebookRuntimeRequest.class, + responseType = com.google.cloud.aiplatform.v1.NotebookRuntime.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.GetNotebookRuntimeRequest, + com.google.cloud.aiplatform.v1.NotebookRuntime> + getGetNotebookRuntimeMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.GetNotebookRuntimeRequest, + com.google.cloud.aiplatform.v1.NotebookRuntime> + getGetNotebookRuntimeMethod; + if ((getGetNotebookRuntimeMethod = NotebookServiceGrpc.getGetNotebookRuntimeMethod) == null) { + synchronized (NotebookServiceGrpc.class) { + if ((getGetNotebookRuntimeMethod = NotebookServiceGrpc.getGetNotebookRuntimeMethod) + == null) { + NotebookServiceGrpc.getGetNotebookRuntimeMethod = + getGetNotebookRuntimeMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetNotebookRuntime")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.GetNotebookRuntimeRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.NotebookRuntime.getDefaultInstance())) + .setSchemaDescriptor( + new NotebookServiceMethodDescriptorSupplier("GetNotebookRuntime")) + .build(); + } + } + } + return getGetNotebookRuntimeMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ListNotebookRuntimesRequest, + com.google.cloud.aiplatform.v1.ListNotebookRuntimesResponse> + getListNotebookRuntimesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListNotebookRuntimes", + requestType = com.google.cloud.aiplatform.v1.ListNotebookRuntimesRequest.class, + responseType = com.google.cloud.aiplatform.v1.ListNotebookRuntimesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ListNotebookRuntimesRequest, + com.google.cloud.aiplatform.v1.ListNotebookRuntimesResponse> + getListNotebookRuntimesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ListNotebookRuntimesRequest, + com.google.cloud.aiplatform.v1.ListNotebookRuntimesResponse> + getListNotebookRuntimesMethod; + if ((getListNotebookRuntimesMethod = NotebookServiceGrpc.getListNotebookRuntimesMethod) + == null) { + synchronized (NotebookServiceGrpc.class) { + if ((getListNotebookRuntimesMethod = NotebookServiceGrpc.getListNotebookRuntimesMethod) + == null) { + NotebookServiceGrpc.getListNotebookRuntimesMethod = + getListNotebookRuntimesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListNotebookRuntimes")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.ListNotebookRuntimesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.ListNotebookRuntimesResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new NotebookServiceMethodDescriptorSupplier("ListNotebookRuntimes")) + .build(); + } + } + } + return getListNotebookRuntimesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeRequest, + com.google.longrunning.Operation> + getDeleteNotebookRuntimeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteNotebookRuntime", + requestType = com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeRequest, + com.google.longrunning.Operation> + getDeleteNotebookRuntimeMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeRequest, + com.google.longrunning.Operation> + getDeleteNotebookRuntimeMethod; + if ((getDeleteNotebookRuntimeMethod = NotebookServiceGrpc.getDeleteNotebookRuntimeMethod) + == null) { + synchronized (NotebookServiceGrpc.class) { + if ((getDeleteNotebookRuntimeMethod = NotebookServiceGrpc.getDeleteNotebookRuntimeMethod) + == null) { + NotebookServiceGrpc.getDeleteNotebookRuntimeMethod = + getDeleteNotebookRuntimeMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "DeleteNotebookRuntime")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new NotebookServiceMethodDescriptorSupplier("DeleteNotebookRuntime")) + .build(); + } + } + } + return getDeleteNotebookRuntimeMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeRequest, + com.google.longrunning.Operation> + getUpgradeNotebookRuntimeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpgradeNotebookRuntime", + requestType = com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeRequest, + com.google.longrunning.Operation> + getUpgradeNotebookRuntimeMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeRequest, + com.google.longrunning.Operation> + getUpgradeNotebookRuntimeMethod; + if ((getUpgradeNotebookRuntimeMethod = NotebookServiceGrpc.getUpgradeNotebookRuntimeMethod) + == null) { + synchronized (NotebookServiceGrpc.class) { + if ((getUpgradeNotebookRuntimeMethod = NotebookServiceGrpc.getUpgradeNotebookRuntimeMethod) + == null) { + NotebookServiceGrpc.getUpgradeNotebookRuntimeMethod = + getUpgradeNotebookRuntimeMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "UpgradeNotebookRuntime")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new NotebookServiceMethodDescriptorSupplier("UpgradeNotebookRuntime")) + .build(); + } + } + } + return getUpgradeNotebookRuntimeMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.StartNotebookRuntimeRequest, + com.google.longrunning.Operation> + getStartNotebookRuntimeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "StartNotebookRuntime", + requestType = com.google.cloud.aiplatform.v1.StartNotebookRuntimeRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.StartNotebookRuntimeRequest, + com.google.longrunning.Operation> + getStartNotebookRuntimeMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.StartNotebookRuntimeRequest, + com.google.longrunning.Operation> + getStartNotebookRuntimeMethod; + if ((getStartNotebookRuntimeMethod = NotebookServiceGrpc.getStartNotebookRuntimeMethod) + == null) { + synchronized (NotebookServiceGrpc.class) { + if ((getStartNotebookRuntimeMethod = NotebookServiceGrpc.getStartNotebookRuntimeMethod) + == null) { + NotebookServiceGrpc.getStartNotebookRuntimeMethod = + getStartNotebookRuntimeMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "StartNotebookRuntime")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.StartNotebookRuntimeRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new NotebookServiceMethodDescriptorSupplier("StartNotebookRuntime")) + .build(); + } + } + } + return getStartNotebookRuntimeMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static NotebookServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public NotebookServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new NotebookServiceStub(channel, callOptions); + } + }; + return NotebookServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static NotebookServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public NotebookServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new NotebookServiceBlockingStub(channel, callOptions); + } + }; + return NotebookServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static NotebookServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public NotebookServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new NotebookServiceFutureStub(channel, callOptions); + } + }; + return NotebookServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * The interface for Vertex Notebook service (a.k.a. Colab on Workbench).
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Creates a NotebookRuntimeTemplate.
+     * 
+ */ + default void createNotebookRuntimeTemplate( + com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateNotebookRuntimeTemplateMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets a NotebookRuntimeTemplate.
+     * 
+ */ + default void getNotebookRuntimeTemplate( + com.google.cloud.aiplatform.v1.GetNotebookRuntimeTemplateRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetNotebookRuntimeTemplateMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists NotebookRuntimeTemplates in a Location.
+     * 
+ */ + default void listNotebookRuntimeTemplates( + com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListNotebookRuntimeTemplatesMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a NotebookRuntimeTemplate.
+     * 
+ */ + default void deleteNotebookRuntimeTemplate( + com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeTemplateRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteNotebookRuntimeTemplateMethod(), responseObserver); + } + + /** + * + * + *
+     * Assigns a NotebookRuntime to a user for a particular Notebook file. This
+     * method will either returns an existing assignment or generates a new one.
+     * 
+ */ + default void assignNotebookRuntime( + com.google.cloud.aiplatform.v1.AssignNotebookRuntimeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getAssignNotebookRuntimeMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets a NotebookRuntime.
+     * 
+ */ + default void getNotebookRuntime( + com.google.cloud.aiplatform.v1.GetNotebookRuntimeRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetNotebookRuntimeMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists NotebookRuntimes in a Location.
+     * 
+ */ + default void listNotebookRuntimes( + com.google.cloud.aiplatform.v1.ListNotebookRuntimesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListNotebookRuntimesMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a NotebookRuntime.
+     * 
+ */ + default void deleteNotebookRuntime( + com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteNotebookRuntimeMethod(), responseObserver); + } + + /** + * + * + *
+     * Upgrades a NotebookRuntime.
+     * 
+ */ + default void upgradeNotebookRuntime( + com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpgradeNotebookRuntimeMethod(), responseObserver); + } + + /** + * + * + *
+     * Starts a NotebookRuntime.
+     * 
+ */ + default void startNotebookRuntime( + com.google.cloud.aiplatform.v1.StartNotebookRuntimeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getStartNotebookRuntimeMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service NotebookService. + * + *
+   * The interface for Vertex Notebook service (a.k.a. Colab on Workbench).
+   * 
+ */ + public abstract static class NotebookServiceImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return NotebookServiceGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service NotebookService. + * + *
+   * The interface for Vertex Notebook service (a.k.a. Colab on Workbench).
+   * 
+ */ + public static final class NotebookServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private NotebookServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected NotebookServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new NotebookServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a NotebookRuntimeTemplate.
+     * 
+ */ + public void createNotebookRuntimeTemplate( + com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateNotebookRuntimeTemplateMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets a NotebookRuntimeTemplate.
+     * 
+ */ + public void getNotebookRuntimeTemplate( + com.google.cloud.aiplatform.v1.GetNotebookRuntimeTemplateRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetNotebookRuntimeTemplateMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists NotebookRuntimeTemplates in a Location.
+     * 
+ */ + public void listNotebookRuntimeTemplates( + com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListNotebookRuntimeTemplatesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a NotebookRuntimeTemplate.
+     * 
+ */ + public void deleteNotebookRuntimeTemplate( + com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeTemplateRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteNotebookRuntimeTemplateMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Assigns a NotebookRuntime to a user for a particular Notebook file. This
+     * method will either returns an existing assignment or generates a new one.
+     * 
+ */ + public void assignNotebookRuntime( + com.google.cloud.aiplatform.v1.AssignNotebookRuntimeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getAssignNotebookRuntimeMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets a NotebookRuntime.
+     * 
+ */ + public void getNotebookRuntime( + com.google.cloud.aiplatform.v1.GetNotebookRuntimeRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetNotebookRuntimeMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists NotebookRuntimes in a Location.
+     * 
+ */ + public void listNotebookRuntimes( + com.google.cloud.aiplatform.v1.ListNotebookRuntimesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListNotebookRuntimesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a NotebookRuntime.
+     * 
+ */ + public void deleteNotebookRuntime( + com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteNotebookRuntimeMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Upgrades a NotebookRuntime.
+     * 
+ */ + public void upgradeNotebookRuntime( + com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpgradeNotebookRuntimeMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Starts a NotebookRuntime.
+     * 
+ */ + public void startNotebookRuntime( + com.google.cloud.aiplatform.v1.StartNotebookRuntimeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getStartNotebookRuntimeMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service NotebookService. + * + *
+   * The interface for Vertex Notebook service (a.k.a. Colab on Workbench).
+   * 
+ */ + public static final class NotebookServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private NotebookServiceBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected NotebookServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new NotebookServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a NotebookRuntimeTemplate.
+     * 
+ */ + public com.google.longrunning.Operation createNotebookRuntimeTemplate( + com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateNotebookRuntimeTemplateMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets a NotebookRuntimeTemplate.
+     * 
+ */ + public com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate getNotebookRuntimeTemplate( + com.google.cloud.aiplatform.v1.GetNotebookRuntimeTemplateRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetNotebookRuntimeTemplateMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists NotebookRuntimeTemplates in a Location.
+     * 
+ */ + public com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse + listNotebookRuntimeTemplates( + com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListNotebookRuntimeTemplatesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a NotebookRuntimeTemplate.
+     * 
+ */ + public com.google.longrunning.Operation deleteNotebookRuntimeTemplate( + com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeTemplateRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteNotebookRuntimeTemplateMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Assigns a NotebookRuntime to a user for a particular Notebook file. This
+     * method will either returns an existing assignment or generates a new one.
+     * 
+ */ + public com.google.longrunning.Operation assignNotebookRuntime( + com.google.cloud.aiplatform.v1.AssignNotebookRuntimeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getAssignNotebookRuntimeMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets a NotebookRuntime.
+     * 
+ */ + public com.google.cloud.aiplatform.v1.NotebookRuntime getNotebookRuntime( + com.google.cloud.aiplatform.v1.GetNotebookRuntimeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetNotebookRuntimeMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists NotebookRuntimes in a Location.
+     * 
+ */ + public com.google.cloud.aiplatform.v1.ListNotebookRuntimesResponse listNotebookRuntimes( + com.google.cloud.aiplatform.v1.ListNotebookRuntimesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListNotebookRuntimesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a NotebookRuntime.
+     * 
+ */ + public com.google.longrunning.Operation deleteNotebookRuntime( + com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteNotebookRuntimeMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Upgrades a NotebookRuntime.
+     * 
+ */ + public com.google.longrunning.Operation upgradeNotebookRuntime( + com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpgradeNotebookRuntimeMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Starts a NotebookRuntime.
+     * 
+ */ + public com.google.longrunning.Operation startNotebookRuntime( + com.google.cloud.aiplatform.v1.StartNotebookRuntimeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getStartNotebookRuntimeMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service NotebookService. + * + *
+   * The interface for Vertex Notebook service (a.k.a. Colab on Workbench).
+   * 
+ */ + public static final class NotebookServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private NotebookServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected NotebookServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new NotebookServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a NotebookRuntimeTemplate.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createNotebookRuntimeTemplate( + com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateNotebookRuntimeTemplateMethod(), getCallOptions()), + request); + } + + /** + * + * + *
+     * Gets a NotebookRuntimeTemplate.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate> + getNotebookRuntimeTemplate( + com.google.cloud.aiplatform.v1.GetNotebookRuntimeTemplateRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetNotebookRuntimeTemplateMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists NotebookRuntimeTemplates in a Location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse> + listNotebookRuntimeTemplates( + com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListNotebookRuntimeTemplatesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a NotebookRuntimeTemplate.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteNotebookRuntimeTemplate( + com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeTemplateRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteNotebookRuntimeTemplateMethod(), getCallOptions()), + request); + } + + /** + * + * + *
+     * Assigns a NotebookRuntime to a user for a particular Notebook file. This
+     * method will either returns an existing assignment or generates a new one.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + assignNotebookRuntime(com.google.cloud.aiplatform.v1.AssignNotebookRuntimeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getAssignNotebookRuntimeMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets a NotebookRuntime.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1.NotebookRuntime> + getNotebookRuntime(com.google.cloud.aiplatform.v1.GetNotebookRuntimeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetNotebookRuntimeMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists NotebookRuntimes in a Location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1.ListNotebookRuntimesResponse> + listNotebookRuntimes(com.google.cloud.aiplatform.v1.ListNotebookRuntimesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListNotebookRuntimesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a NotebookRuntime.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteNotebookRuntime(com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteNotebookRuntimeMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Upgrades a NotebookRuntime.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + upgradeNotebookRuntime( + com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpgradeNotebookRuntimeMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Starts a NotebookRuntime.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + startNotebookRuntime(com.google.cloud.aiplatform.v1.StartNotebookRuntimeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getStartNotebookRuntimeMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_CREATE_NOTEBOOK_RUNTIME_TEMPLATE = 0; + private static final int METHODID_GET_NOTEBOOK_RUNTIME_TEMPLATE = 1; + private static final int METHODID_LIST_NOTEBOOK_RUNTIME_TEMPLATES = 2; + private static final int METHODID_DELETE_NOTEBOOK_RUNTIME_TEMPLATE = 3; + private static final int METHODID_ASSIGN_NOTEBOOK_RUNTIME = 4; + private static final int METHODID_GET_NOTEBOOK_RUNTIME = 5; + private static final int METHODID_LIST_NOTEBOOK_RUNTIMES = 6; + private static final int METHODID_DELETE_NOTEBOOK_RUNTIME = 7; + private static final int METHODID_UPGRADE_NOTEBOOK_RUNTIME = 8; + private static final int METHODID_START_NOTEBOOK_RUNTIME = 9; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_CREATE_NOTEBOOK_RUNTIME_TEMPLATE: + serviceImpl.createNotebookRuntimeTemplate( + (com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_NOTEBOOK_RUNTIME_TEMPLATE: + serviceImpl.getNotebookRuntimeTemplate( + (com.google.cloud.aiplatform.v1.GetNotebookRuntimeTemplateRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_NOTEBOOK_RUNTIME_TEMPLATES: + serviceImpl.listNotebookRuntimeTemplates( + (com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse>) + responseObserver); + break; + case METHODID_DELETE_NOTEBOOK_RUNTIME_TEMPLATE: + serviceImpl.deleteNotebookRuntimeTemplate( + (com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeTemplateRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_ASSIGN_NOTEBOOK_RUNTIME: + serviceImpl.assignNotebookRuntime( + (com.google.cloud.aiplatform.v1.AssignNotebookRuntimeRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_NOTEBOOK_RUNTIME: + serviceImpl.getNotebookRuntime( + (com.google.cloud.aiplatform.v1.GetNotebookRuntimeRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_NOTEBOOK_RUNTIMES: + serviceImpl.listNotebookRuntimes( + (com.google.cloud.aiplatform.v1.ListNotebookRuntimesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.aiplatform.v1.ListNotebookRuntimesResponse>) + responseObserver); + break; + case METHODID_DELETE_NOTEBOOK_RUNTIME: + serviceImpl.deleteNotebookRuntime( + (com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPGRADE_NOTEBOOK_RUNTIME: + serviceImpl.upgradeNotebookRuntime( + (com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_START_NOTEBOOK_RUNTIME: + serviceImpl.startNotebookRuntime( + (com.google.cloud.aiplatform.v1.StartNotebookRuntimeRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getCreateNotebookRuntimeTemplateMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateRequest, + com.google.longrunning.Operation>( + service, METHODID_CREATE_NOTEBOOK_RUNTIME_TEMPLATE))) + .addMethod( + getGetNotebookRuntimeTemplateMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.GetNotebookRuntimeTemplateRequest, + com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate>( + service, METHODID_GET_NOTEBOOK_RUNTIME_TEMPLATE))) + .addMethod( + getListNotebookRuntimeTemplatesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest, + com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse>( + service, METHODID_LIST_NOTEBOOK_RUNTIME_TEMPLATES))) + .addMethod( + getDeleteNotebookRuntimeTemplateMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeTemplateRequest, + com.google.longrunning.Operation>( + service, METHODID_DELETE_NOTEBOOK_RUNTIME_TEMPLATE))) + .addMethod( + getAssignNotebookRuntimeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.AssignNotebookRuntimeRequest, + com.google.longrunning.Operation>(service, METHODID_ASSIGN_NOTEBOOK_RUNTIME))) + .addMethod( + getGetNotebookRuntimeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.GetNotebookRuntimeRequest, + com.google.cloud.aiplatform.v1.NotebookRuntime>( + service, METHODID_GET_NOTEBOOK_RUNTIME))) + .addMethod( + getListNotebookRuntimesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.ListNotebookRuntimesRequest, + com.google.cloud.aiplatform.v1.ListNotebookRuntimesResponse>( + service, METHODID_LIST_NOTEBOOK_RUNTIMES))) + .addMethod( + getDeleteNotebookRuntimeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeRequest, + com.google.longrunning.Operation>(service, METHODID_DELETE_NOTEBOOK_RUNTIME))) + .addMethod( + getUpgradeNotebookRuntimeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeRequest, + com.google.longrunning.Operation>(service, METHODID_UPGRADE_NOTEBOOK_RUNTIME))) + .addMethod( + getStartNotebookRuntimeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.StartNotebookRuntimeRequest, + com.google.longrunning.Operation>(service, METHODID_START_NOTEBOOK_RUNTIME))) + .build(); + } + + private abstract static class NotebookServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + NotebookServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("NotebookService"); + } + } + + private static final class NotebookServiceFileDescriptorSupplier + extends NotebookServiceBaseDescriptorSupplier { + NotebookServiceFileDescriptorSupplier() {} + } + + private static final class NotebookServiceMethodDescriptorSupplier + extends NotebookServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + NotebookServiceMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (NotebookServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new NotebookServiceFileDescriptorSupplier()) + .addMethod(getCreateNotebookRuntimeTemplateMethod()) + .addMethod(getGetNotebookRuntimeTemplateMethod()) + .addMethod(getListNotebookRuntimeTemplatesMethod()) + .addMethod(getDeleteNotebookRuntimeTemplateMethod()) + .addMethod(getAssignNotebookRuntimeMethod()) + .addMethod(getGetNotebookRuntimeMethod()) + .addMethod(getListNotebookRuntimesMethod()) + .addMethod(getDeleteNotebookRuntimeMethod()) + .addMethod(getUpgradeNotebookRuntimeMethod()) + .addMethod(getStartNotebookRuntimeMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-aiplatform/grpc-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PersistentResourceServiceGrpc.java b/java-aiplatform/grpc-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PersistentResourceServiceGrpc.java new file mode 100644 index 000000000000..bdf5f4f40f20 --- /dev/null +++ b/java-aiplatform/grpc-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PersistentResourceServiceGrpc.java @@ -0,0 +1,1011 @@ +/* + * Copyright 2024 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.aiplatform.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * A service for managing Vertex AI's machine learning PersistentResource.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/aiplatform/v1/persistent_resource_service.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class PersistentResourceServiceGrpc { + + private PersistentResourceServiceGrpc() {} + + public static final java.lang.String SERVICE_NAME = + "google.cloud.aiplatform.v1.PersistentResourceService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.CreatePersistentResourceRequest, + com.google.longrunning.Operation> + getCreatePersistentResourceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreatePersistentResource", + requestType = com.google.cloud.aiplatform.v1.CreatePersistentResourceRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.CreatePersistentResourceRequest, + com.google.longrunning.Operation> + getCreatePersistentResourceMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.CreatePersistentResourceRequest, + com.google.longrunning.Operation> + getCreatePersistentResourceMethod; + if ((getCreatePersistentResourceMethod = + PersistentResourceServiceGrpc.getCreatePersistentResourceMethod) + == null) { + synchronized (PersistentResourceServiceGrpc.class) { + if ((getCreatePersistentResourceMethod = + PersistentResourceServiceGrpc.getCreatePersistentResourceMethod) + == null) { + PersistentResourceServiceGrpc.getCreatePersistentResourceMethod = + getCreatePersistentResourceMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreatePersistentResource")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.CreatePersistentResourceRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new PersistentResourceServiceMethodDescriptorSupplier( + "CreatePersistentResource")) + .build(); + } + } + } + return getCreatePersistentResourceMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.GetPersistentResourceRequest, + com.google.cloud.aiplatform.v1.PersistentResource> + getGetPersistentResourceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetPersistentResource", + requestType = com.google.cloud.aiplatform.v1.GetPersistentResourceRequest.class, + responseType = com.google.cloud.aiplatform.v1.PersistentResource.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.GetPersistentResourceRequest, + com.google.cloud.aiplatform.v1.PersistentResource> + getGetPersistentResourceMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.GetPersistentResourceRequest, + com.google.cloud.aiplatform.v1.PersistentResource> + getGetPersistentResourceMethod; + if ((getGetPersistentResourceMethod = + PersistentResourceServiceGrpc.getGetPersistentResourceMethod) + == null) { + synchronized (PersistentResourceServiceGrpc.class) { + if ((getGetPersistentResourceMethod = + PersistentResourceServiceGrpc.getGetPersistentResourceMethod) + == null) { + PersistentResourceServiceGrpc.getGetPersistentResourceMethod = + getGetPersistentResourceMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GetPersistentResource")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.GetPersistentResourceRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.PersistentResource + .getDefaultInstance())) + .setSchemaDescriptor( + new PersistentResourceServiceMethodDescriptorSupplier( + "GetPersistentResource")) + .build(); + } + } + } + return getGetPersistentResourceMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ListPersistentResourcesRequest, + com.google.cloud.aiplatform.v1.ListPersistentResourcesResponse> + getListPersistentResourcesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListPersistentResources", + requestType = com.google.cloud.aiplatform.v1.ListPersistentResourcesRequest.class, + responseType = com.google.cloud.aiplatform.v1.ListPersistentResourcesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ListPersistentResourcesRequest, + com.google.cloud.aiplatform.v1.ListPersistentResourcesResponse> + getListPersistentResourcesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ListPersistentResourcesRequest, + com.google.cloud.aiplatform.v1.ListPersistentResourcesResponse> + getListPersistentResourcesMethod; + if ((getListPersistentResourcesMethod = + PersistentResourceServiceGrpc.getListPersistentResourcesMethod) + == null) { + synchronized (PersistentResourceServiceGrpc.class) { + if ((getListPersistentResourcesMethod = + PersistentResourceServiceGrpc.getListPersistentResourcesMethod) + == null) { + PersistentResourceServiceGrpc.getListPersistentResourcesMethod = + getListPersistentResourcesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListPersistentResources")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.ListPersistentResourcesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.ListPersistentResourcesResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new PersistentResourceServiceMethodDescriptorSupplier( + "ListPersistentResources")) + .build(); + } + } + } + return getListPersistentResourcesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.DeletePersistentResourceRequest, + com.google.longrunning.Operation> + getDeletePersistentResourceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeletePersistentResource", + requestType = com.google.cloud.aiplatform.v1.DeletePersistentResourceRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.DeletePersistentResourceRequest, + com.google.longrunning.Operation> + getDeletePersistentResourceMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.DeletePersistentResourceRequest, + com.google.longrunning.Operation> + getDeletePersistentResourceMethod; + if ((getDeletePersistentResourceMethod = + PersistentResourceServiceGrpc.getDeletePersistentResourceMethod) + == null) { + synchronized (PersistentResourceServiceGrpc.class) { + if ((getDeletePersistentResourceMethod = + PersistentResourceServiceGrpc.getDeletePersistentResourceMethod) + == null) { + PersistentResourceServiceGrpc.getDeletePersistentResourceMethod = + getDeletePersistentResourceMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "DeletePersistentResource")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.DeletePersistentResourceRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new PersistentResourceServiceMethodDescriptorSupplier( + "DeletePersistentResource")) + .build(); + } + } + } + return getDeletePersistentResourceMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.UpdatePersistentResourceRequest, + com.google.longrunning.Operation> + getUpdatePersistentResourceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdatePersistentResource", + requestType = com.google.cloud.aiplatform.v1.UpdatePersistentResourceRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.UpdatePersistentResourceRequest, + com.google.longrunning.Operation> + getUpdatePersistentResourceMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.UpdatePersistentResourceRequest, + com.google.longrunning.Operation> + getUpdatePersistentResourceMethod; + if ((getUpdatePersistentResourceMethod = + PersistentResourceServiceGrpc.getUpdatePersistentResourceMethod) + == null) { + synchronized (PersistentResourceServiceGrpc.class) { + if ((getUpdatePersistentResourceMethod = + PersistentResourceServiceGrpc.getUpdatePersistentResourceMethod) + == null) { + PersistentResourceServiceGrpc.getUpdatePersistentResourceMethod = + getUpdatePersistentResourceMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "UpdatePersistentResource")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.UpdatePersistentResourceRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new PersistentResourceServiceMethodDescriptorSupplier( + "UpdatePersistentResource")) + .build(); + } + } + } + return getUpdatePersistentResourceMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.RebootPersistentResourceRequest, + com.google.longrunning.Operation> + getRebootPersistentResourceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "RebootPersistentResource", + requestType = com.google.cloud.aiplatform.v1.RebootPersistentResourceRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.RebootPersistentResourceRequest, + com.google.longrunning.Operation> + getRebootPersistentResourceMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.RebootPersistentResourceRequest, + com.google.longrunning.Operation> + getRebootPersistentResourceMethod; + if ((getRebootPersistentResourceMethod = + PersistentResourceServiceGrpc.getRebootPersistentResourceMethod) + == null) { + synchronized (PersistentResourceServiceGrpc.class) { + if ((getRebootPersistentResourceMethod = + PersistentResourceServiceGrpc.getRebootPersistentResourceMethod) + == null) { + PersistentResourceServiceGrpc.getRebootPersistentResourceMethod = + getRebootPersistentResourceMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "RebootPersistentResource")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.RebootPersistentResourceRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new PersistentResourceServiceMethodDescriptorSupplier( + "RebootPersistentResource")) + .build(); + } + } + } + return getRebootPersistentResourceMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static PersistentResourceServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public PersistentResourceServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PersistentResourceServiceStub(channel, callOptions); + } + }; + return PersistentResourceServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static PersistentResourceServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public PersistentResourceServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PersistentResourceServiceBlockingStub(channel, callOptions); + } + }; + return PersistentResourceServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static PersistentResourceServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public PersistentResourceServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PersistentResourceServiceFutureStub(channel, callOptions); + } + }; + return PersistentResourceServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * A service for managing Vertex AI's machine learning PersistentResource.
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Creates a PersistentResource.
+     * 
+ */ + default void createPersistentResource( + com.google.cloud.aiplatform.v1.CreatePersistentResourceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreatePersistentResourceMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets a PersistentResource.
+     * 
+ */ + default void getPersistentResource( + com.google.cloud.aiplatform.v1.GetPersistentResourceRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetPersistentResourceMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists PersistentResources in a Location.
+     * 
+ */ + default void listPersistentResources( + com.google.cloud.aiplatform.v1.ListPersistentResourcesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListPersistentResourcesMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a PersistentResource.
+     * 
+ */ + default void deletePersistentResource( + com.google.cloud.aiplatform.v1.DeletePersistentResourceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeletePersistentResourceMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates a PersistentResource.
+     * 
+ */ + default void updatePersistentResource( + com.google.cloud.aiplatform.v1.UpdatePersistentResourceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdatePersistentResourceMethod(), responseObserver); + } + + /** + * + * + *
+     * Reboots a PersistentResource.
+     * 
+ */ + default void rebootPersistentResource( + com.google.cloud.aiplatform.v1.RebootPersistentResourceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getRebootPersistentResourceMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service PersistentResourceService. + * + *
+   * A service for managing Vertex AI's machine learning PersistentResource.
+   * 
+ */ + public abstract static class PersistentResourceServiceImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return PersistentResourceServiceGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service PersistentResourceService. + * + *
+   * A service for managing Vertex AI's machine learning PersistentResource.
+   * 
+ */ + public static final class PersistentResourceServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private PersistentResourceServiceStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected PersistentResourceServiceStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PersistentResourceServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a PersistentResource.
+     * 
+ */ + public void createPersistentResource( + com.google.cloud.aiplatform.v1.CreatePersistentResourceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreatePersistentResourceMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets a PersistentResource.
+     * 
+ */ + public void getPersistentResource( + com.google.cloud.aiplatform.v1.GetPersistentResourceRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetPersistentResourceMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists PersistentResources in a Location.
+     * 
+ */ + public void listPersistentResources( + com.google.cloud.aiplatform.v1.ListPersistentResourcesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListPersistentResourcesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a PersistentResource.
+     * 
+ */ + public void deletePersistentResource( + com.google.cloud.aiplatform.v1.DeletePersistentResourceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeletePersistentResourceMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates a PersistentResource.
+     * 
+ */ + public void updatePersistentResource( + com.google.cloud.aiplatform.v1.UpdatePersistentResourceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdatePersistentResourceMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Reboots a PersistentResource.
+     * 
+ */ + public void rebootPersistentResource( + com.google.cloud.aiplatform.v1.RebootPersistentResourceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getRebootPersistentResourceMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service PersistentResourceService. + * + *
+   * A service for managing Vertex AI's machine learning PersistentResource.
+   * 
+ */ + public static final class PersistentResourceServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private PersistentResourceServiceBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected PersistentResourceServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PersistentResourceServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a PersistentResource.
+     * 
+ */ + public com.google.longrunning.Operation createPersistentResource( + com.google.cloud.aiplatform.v1.CreatePersistentResourceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreatePersistentResourceMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets a PersistentResource.
+     * 
+ */ + public com.google.cloud.aiplatform.v1.PersistentResource getPersistentResource( + com.google.cloud.aiplatform.v1.GetPersistentResourceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetPersistentResourceMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists PersistentResources in a Location.
+     * 
+ */ + public com.google.cloud.aiplatform.v1.ListPersistentResourcesResponse listPersistentResources( + com.google.cloud.aiplatform.v1.ListPersistentResourcesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListPersistentResourcesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a PersistentResource.
+     * 
+ */ + public com.google.longrunning.Operation deletePersistentResource( + com.google.cloud.aiplatform.v1.DeletePersistentResourceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeletePersistentResourceMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates a PersistentResource.
+     * 
+ */ + public com.google.longrunning.Operation updatePersistentResource( + com.google.cloud.aiplatform.v1.UpdatePersistentResourceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdatePersistentResourceMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Reboots a PersistentResource.
+     * 
+ */ + public com.google.longrunning.Operation rebootPersistentResource( + com.google.cloud.aiplatform.v1.RebootPersistentResourceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getRebootPersistentResourceMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service + * PersistentResourceService. + * + *
+   * A service for managing Vertex AI's machine learning PersistentResource.
+   * 
+ */ + public static final class PersistentResourceServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private PersistentResourceServiceFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected PersistentResourceServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PersistentResourceServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a PersistentResource.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createPersistentResource( + com.google.cloud.aiplatform.v1.CreatePersistentResourceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreatePersistentResourceMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets a PersistentResource.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1.PersistentResource> + getPersistentResource(com.google.cloud.aiplatform.v1.GetPersistentResourceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetPersistentResourceMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists PersistentResources in a Location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1.ListPersistentResourcesResponse> + listPersistentResources( + com.google.cloud.aiplatform.v1.ListPersistentResourcesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListPersistentResourcesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a PersistentResource.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deletePersistentResource( + com.google.cloud.aiplatform.v1.DeletePersistentResourceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeletePersistentResourceMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates a PersistentResource.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updatePersistentResource( + com.google.cloud.aiplatform.v1.UpdatePersistentResourceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdatePersistentResourceMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Reboots a PersistentResource.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + rebootPersistentResource( + com.google.cloud.aiplatform.v1.RebootPersistentResourceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getRebootPersistentResourceMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_CREATE_PERSISTENT_RESOURCE = 0; + private static final int METHODID_GET_PERSISTENT_RESOURCE = 1; + private static final int METHODID_LIST_PERSISTENT_RESOURCES = 2; + private static final int METHODID_DELETE_PERSISTENT_RESOURCE = 3; + private static final int METHODID_UPDATE_PERSISTENT_RESOURCE = 4; + private static final int METHODID_REBOOT_PERSISTENT_RESOURCE = 5; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_CREATE_PERSISTENT_RESOURCE: + serviceImpl.createPersistentResource( + (com.google.cloud.aiplatform.v1.CreatePersistentResourceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_PERSISTENT_RESOURCE: + serviceImpl.getPersistentResource( + (com.google.cloud.aiplatform.v1.GetPersistentResourceRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_PERSISTENT_RESOURCES: + serviceImpl.listPersistentResources( + (com.google.cloud.aiplatform.v1.ListPersistentResourcesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.aiplatform.v1.ListPersistentResourcesResponse>) + responseObserver); + break; + case METHODID_DELETE_PERSISTENT_RESOURCE: + serviceImpl.deletePersistentResource( + (com.google.cloud.aiplatform.v1.DeletePersistentResourceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_PERSISTENT_RESOURCE: + serviceImpl.updatePersistentResource( + (com.google.cloud.aiplatform.v1.UpdatePersistentResourceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_REBOOT_PERSISTENT_RESOURCE: + serviceImpl.rebootPersistentResource( + (com.google.cloud.aiplatform.v1.RebootPersistentResourceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getCreatePersistentResourceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.CreatePersistentResourceRequest, + com.google.longrunning.Operation>( + service, METHODID_CREATE_PERSISTENT_RESOURCE))) + .addMethod( + getGetPersistentResourceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.GetPersistentResourceRequest, + com.google.cloud.aiplatform.v1.PersistentResource>( + service, METHODID_GET_PERSISTENT_RESOURCE))) + .addMethod( + getListPersistentResourcesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.ListPersistentResourcesRequest, + com.google.cloud.aiplatform.v1.ListPersistentResourcesResponse>( + service, METHODID_LIST_PERSISTENT_RESOURCES))) + .addMethod( + getDeletePersistentResourceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.DeletePersistentResourceRequest, + com.google.longrunning.Operation>( + service, METHODID_DELETE_PERSISTENT_RESOURCE))) + .addMethod( + getUpdatePersistentResourceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.UpdatePersistentResourceRequest, + com.google.longrunning.Operation>( + service, METHODID_UPDATE_PERSISTENT_RESOURCE))) + .addMethod( + getRebootPersistentResourceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.RebootPersistentResourceRequest, + com.google.longrunning.Operation>( + service, METHODID_REBOOT_PERSISTENT_RESOURCE))) + .build(); + } + + private abstract static class PersistentResourceServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + PersistentResourceServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.aiplatform.v1.PersistentResourceServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("PersistentResourceService"); + } + } + + private static final class PersistentResourceServiceFileDescriptorSupplier + extends PersistentResourceServiceBaseDescriptorSupplier { + PersistentResourceServiceFileDescriptorSupplier() {} + } + + private static final class PersistentResourceServiceMethodDescriptorSupplier + extends PersistentResourceServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + PersistentResourceServiceMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (PersistentResourceServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new PersistentResourceServiceFileDescriptorSupplier()) + .addMethod(getCreatePersistentResourceMethod()) + .addMethod(getGetPersistentResourceMethod()) + .addMethod(getListPersistentResourcesMethod()) + .addMethod(getDeletePersistentResourceMethod()) + .addMethod(getUpdatePersistentResourceMethod()) + .addMethod(getRebootPersistentResourceMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-aiplatform/grpc-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NotebookServiceGrpc.java b/java-aiplatform/grpc-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NotebookServiceGrpc.java new file mode 100644 index 000000000000..c2d8be3da1a4 --- /dev/null +++ b/java-aiplatform/grpc-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NotebookServiceGrpc.java @@ -0,0 +1,1496 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * The interface for Vertex Notebook service (a.k.a. Colab on Workbench).
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/aiplatform/v1beta1/notebook_service.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class NotebookServiceGrpc { + + private NotebookServiceGrpc() {} + + public static final java.lang.String SERVICE_NAME = + "google.cloud.aiplatform.v1beta1.NotebookService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateRequest, + com.google.longrunning.Operation> + getCreateNotebookRuntimeTemplateMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateNotebookRuntimeTemplate", + requestType = com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateRequest, + com.google.longrunning.Operation> + getCreateNotebookRuntimeTemplateMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateRequest, + com.google.longrunning.Operation> + getCreateNotebookRuntimeTemplateMethod; + if ((getCreateNotebookRuntimeTemplateMethod = + NotebookServiceGrpc.getCreateNotebookRuntimeTemplateMethod) + == null) { + synchronized (NotebookServiceGrpc.class) { + if ((getCreateNotebookRuntimeTemplateMethod = + NotebookServiceGrpc.getCreateNotebookRuntimeTemplateMethod) + == null) { + NotebookServiceGrpc.getCreateNotebookRuntimeTemplateMethod = + getCreateNotebookRuntimeTemplateMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreateNotebookRuntimeTemplate")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1beta1 + .CreateNotebookRuntimeTemplateRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new NotebookServiceMethodDescriptorSupplier( + "CreateNotebookRuntimeTemplate")) + .build(); + } + } + } + return getCreateNotebookRuntimeTemplateMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeTemplateRequest, + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate> + getGetNotebookRuntimeTemplateMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetNotebookRuntimeTemplate", + requestType = com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeTemplateRequest.class, + responseType = com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeTemplateRequest, + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate> + getGetNotebookRuntimeTemplateMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeTemplateRequest, + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate> + getGetNotebookRuntimeTemplateMethod; + if ((getGetNotebookRuntimeTemplateMethod = + NotebookServiceGrpc.getGetNotebookRuntimeTemplateMethod) + == null) { + synchronized (NotebookServiceGrpc.class) { + if ((getGetNotebookRuntimeTemplateMethod = + NotebookServiceGrpc.getGetNotebookRuntimeTemplateMethod) + == null) { + NotebookServiceGrpc.getGetNotebookRuntimeTemplateMethod = + getGetNotebookRuntimeTemplateMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GetNotebookRuntimeTemplate")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeTemplateRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate + .getDefaultInstance())) + .setSchemaDescriptor( + new NotebookServiceMethodDescriptorSupplier("GetNotebookRuntimeTemplate")) + .build(); + } + } + } + return getGetNotebookRuntimeTemplateMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesRequest, + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesResponse> + getListNotebookRuntimeTemplatesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListNotebookRuntimeTemplates", + requestType = com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesRequest.class, + responseType = com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesRequest, + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesResponse> + getListNotebookRuntimeTemplatesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesRequest, + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesResponse> + getListNotebookRuntimeTemplatesMethod; + if ((getListNotebookRuntimeTemplatesMethod = + NotebookServiceGrpc.getListNotebookRuntimeTemplatesMethod) + == null) { + synchronized (NotebookServiceGrpc.class) { + if ((getListNotebookRuntimeTemplatesMethod = + NotebookServiceGrpc.getListNotebookRuntimeTemplatesMethod) + == null) { + NotebookServiceGrpc.getListNotebookRuntimeTemplatesMethod = + getListNotebookRuntimeTemplatesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListNotebookRuntimeTemplates")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1beta1 + .ListNotebookRuntimeTemplatesRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1beta1 + .ListNotebookRuntimeTemplatesResponse.getDefaultInstance())) + .setSchemaDescriptor( + new NotebookServiceMethodDescriptorSupplier( + "ListNotebookRuntimeTemplates")) + .build(); + } + } + } + return getListNotebookRuntimeTemplatesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeTemplateRequest, + com.google.longrunning.Operation> + getDeleteNotebookRuntimeTemplateMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteNotebookRuntimeTemplate", + requestType = com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeTemplateRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeTemplateRequest, + com.google.longrunning.Operation> + getDeleteNotebookRuntimeTemplateMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeTemplateRequest, + com.google.longrunning.Operation> + getDeleteNotebookRuntimeTemplateMethod; + if ((getDeleteNotebookRuntimeTemplateMethod = + NotebookServiceGrpc.getDeleteNotebookRuntimeTemplateMethod) + == null) { + synchronized (NotebookServiceGrpc.class) { + if ((getDeleteNotebookRuntimeTemplateMethod = + NotebookServiceGrpc.getDeleteNotebookRuntimeTemplateMethod) + == null) { + NotebookServiceGrpc.getDeleteNotebookRuntimeTemplateMethod = + getDeleteNotebookRuntimeTemplateMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "DeleteNotebookRuntimeTemplate")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1beta1 + .DeleteNotebookRuntimeTemplateRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new NotebookServiceMethodDescriptorSupplier( + "DeleteNotebookRuntimeTemplate")) + .build(); + } + } + } + return getDeleteNotebookRuntimeTemplateMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeRequest, + com.google.longrunning.Operation> + getAssignNotebookRuntimeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "AssignNotebookRuntime", + requestType = com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeRequest, + com.google.longrunning.Operation> + getAssignNotebookRuntimeMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeRequest, + com.google.longrunning.Operation> + getAssignNotebookRuntimeMethod; + if ((getAssignNotebookRuntimeMethod = NotebookServiceGrpc.getAssignNotebookRuntimeMethod) + == null) { + synchronized (NotebookServiceGrpc.class) { + if ((getAssignNotebookRuntimeMethod = NotebookServiceGrpc.getAssignNotebookRuntimeMethod) + == null) { + NotebookServiceGrpc.getAssignNotebookRuntimeMethod = + getAssignNotebookRuntimeMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "AssignNotebookRuntime")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new NotebookServiceMethodDescriptorSupplier("AssignNotebookRuntime")) + .build(); + } + } + } + return getAssignNotebookRuntimeMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeRequest, + com.google.cloud.aiplatform.v1beta1.NotebookRuntime> + getGetNotebookRuntimeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetNotebookRuntime", + requestType = com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeRequest.class, + responseType = com.google.cloud.aiplatform.v1beta1.NotebookRuntime.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeRequest, + com.google.cloud.aiplatform.v1beta1.NotebookRuntime> + getGetNotebookRuntimeMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeRequest, + com.google.cloud.aiplatform.v1beta1.NotebookRuntime> + getGetNotebookRuntimeMethod; + if ((getGetNotebookRuntimeMethod = NotebookServiceGrpc.getGetNotebookRuntimeMethod) == null) { + synchronized (NotebookServiceGrpc.class) { + if ((getGetNotebookRuntimeMethod = NotebookServiceGrpc.getGetNotebookRuntimeMethod) + == null) { + NotebookServiceGrpc.getGetNotebookRuntimeMethod = + getGetNotebookRuntimeMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetNotebookRuntime")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1beta1.NotebookRuntime + .getDefaultInstance())) + .setSchemaDescriptor( + new NotebookServiceMethodDescriptorSupplier("GetNotebookRuntime")) + .build(); + } + } + } + return getGetNotebookRuntimeMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesRequest, + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesResponse> + getListNotebookRuntimesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListNotebookRuntimes", + requestType = com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesRequest.class, + responseType = com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesRequest, + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesResponse> + getListNotebookRuntimesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesRequest, + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesResponse> + getListNotebookRuntimesMethod; + if ((getListNotebookRuntimesMethod = NotebookServiceGrpc.getListNotebookRuntimesMethod) + == null) { + synchronized (NotebookServiceGrpc.class) { + if ((getListNotebookRuntimesMethod = NotebookServiceGrpc.getListNotebookRuntimesMethod) + == null) { + NotebookServiceGrpc.getListNotebookRuntimesMethod = + getListNotebookRuntimesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListNotebookRuntimes")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new NotebookServiceMethodDescriptorSupplier("ListNotebookRuntimes")) + .build(); + } + } + } + return getListNotebookRuntimesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeRequest, + com.google.longrunning.Operation> + getDeleteNotebookRuntimeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteNotebookRuntime", + requestType = com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeRequest, + com.google.longrunning.Operation> + getDeleteNotebookRuntimeMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeRequest, + com.google.longrunning.Operation> + getDeleteNotebookRuntimeMethod; + if ((getDeleteNotebookRuntimeMethod = NotebookServiceGrpc.getDeleteNotebookRuntimeMethod) + == null) { + synchronized (NotebookServiceGrpc.class) { + if ((getDeleteNotebookRuntimeMethod = NotebookServiceGrpc.getDeleteNotebookRuntimeMethod) + == null) { + NotebookServiceGrpc.getDeleteNotebookRuntimeMethod = + getDeleteNotebookRuntimeMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "DeleteNotebookRuntime")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new NotebookServiceMethodDescriptorSupplier("DeleteNotebookRuntime")) + .build(); + } + } + } + return getDeleteNotebookRuntimeMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeRequest, + com.google.longrunning.Operation> + getUpgradeNotebookRuntimeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpgradeNotebookRuntime", + requestType = com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeRequest, + com.google.longrunning.Operation> + getUpgradeNotebookRuntimeMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeRequest, + com.google.longrunning.Operation> + getUpgradeNotebookRuntimeMethod; + if ((getUpgradeNotebookRuntimeMethod = NotebookServiceGrpc.getUpgradeNotebookRuntimeMethod) + == null) { + synchronized (NotebookServiceGrpc.class) { + if ((getUpgradeNotebookRuntimeMethod = NotebookServiceGrpc.getUpgradeNotebookRuntimeMethod) + == null) { + NotebookServiceGrpc.getUpgradeNotebookRuntimeMethod = + getUpgradeNotebookRuntimeMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "UpgradeNotebookRuntime")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new NotebookServiceMethodDescriptorSupplier("UpgradeNotebookRuntime")) + .build(); + } + } + } + return getUpgradeNotebookRuntimeMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeRequest, + com.google.longrunning.Operation> + getStartNotebookRuntimeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "StartNotebookRuntime", + requestType = com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeRequest, + com.google.longrunning.Operation> + getStartNotebookRuntimeMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeRequest, + com.google.longrunning.Operation> + getStartNotebookRuntimeMethod; + if ((getStartNotebookRuntimeMethod = NotebookServiceGrpc.getStartNotebookRuntimeMethod) + == null) { + synchronized (NotebookServiceGrpc.class) { + if ((getStartNotebookRuntimeMethod = NotebookServiceGrpc.getStartNotebookRuntimeMethod) + == null) { + NotebookServiceGrpc.getStartNotebookRuntimeMethod = + getStartNotebookRuntimeMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "StartNotebookRuntime")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new NotebookServiceMethodDescriptorSupplier("StartNotebookRuntime")) + .build(); + } + } + } + return getStartNotebookRuntimeMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static NotebookServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public NotebookServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new NotebookServiceStub(channel, callOptions); + } + }; + return NotebookServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static NotebookServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public NotebookServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new NotebookServiceBlockingStub(channel, callOptions); + } + }; + return NotebookServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static NotebookServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public NotebookServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new NotebookServiceFutureStub(channel, callOptions); + } + }; + return NotebookServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * The interface for Vertex Notebook service (a.k.a. Colab on Workbench).
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Creates a NotebookRuntimeTemplate.
+     * 
+ */ + default void createNotebookRuntimeTemplate( + com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateNotebookRuntimeTemplateMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets a NotebookRuntimeTemplate.
+     * 
+ */ + default void getNotebookRuntimeTemplate( + com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeTemplateRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetNotebookRuntimeTemplateMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists NotebookRuntimeTemplates in a Location.
+     * 
+ */ + default void listNotebookRuntimeTemplates( + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListNotebookRuntimeTemplatesMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a NotebookRuntimeTemplate.
+     * 
+ */ + default void deleteNotebookRuntimeTemplate( + com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeTemplateRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteNotebookRuntimeTemplateMethod(), responseObserver); + } + + /** + * + * + *
+     * Assigns a NotebookRuntime to a user for a particular Notebook file. This
+     * method will either returns an existing assignment or generates a new one.
+     * 
+ */ + default void assignNotebookRuntime( + com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getAssignNotebookRuntimeMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets a NotebookRuntime.
+     * 
+ */ + default void getNotebookRuntime( + com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetNotebookRuntimeMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists NotebookRuntimes in a Location.
+     * 
+ */ + default void listNotebookRuntimes( + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListNotebookRuntimesMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a NotebookRuntime.
+     * 
+ */ + default void deleteNotebookRuntime( + com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteNotebookRuntimeMethod(), responseObserver); + } + + /** + * + * + *
+     * Upgrades a NotebookRuntime.
+     * 
+ */ + default void upgradeNotebookRuntime( + com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpgradeNotebookRuntimeMethod(), responseObserver); + } + + /** + * + * + *
+     * Starts a NotebookRuntime.
+     * 
+ */ + default void startNotebookRuntime( + com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getStartNotebookRuntimeMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service NotebookService. + * + *
+   * The interface for Vertex Notebook service (a.k.a. Colab on Workbench).
+   * 
+ */ + public abstract static class NotebookServiceImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return NotebookServiceGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service NotebookService. + * + *
+   * The interface for Vertex Notebook service (a.k.a. Colab on Workbench).
+   * 
+ */ + public static final class NotebookServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private NotebookServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected NotebookServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new NotebookServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a NotebookRuntimeTemplate.
+     * 
+ */ + public void createNotebookRuntimeTemplate( + com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateNotebookRuntimeTemplateMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets a NotebookRuntimeTemplate.
+     * 
+ */ + public void getNotebookRuntimeTemplate( + com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeTemplateRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetNotebookRuntimeTemplateMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists NotebookRuntimeTemplates in a Location.
+     * 
+ */ + public void listNotebookRuntimeTemplates( + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListNotebookRuntimeTemplatesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a NotebookRuntimeTemplate.
+     * 
+ */ + public void deleteNotebookRuntimeTemplate( + com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeTemplateRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteNotebookRuntimeTemplateMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Assigns a NotebookRuntime to a user for a particular Notebook file. This
+     * method will either returns an existing assignment or generates a new one.
+     * 
+ */ + public void assignNotebookRuntime( + com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getAssignNotebookRuntimeMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets a NotebookRuntime.
+     * 
+ */ + public void getNotebookRuntime( + com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetNotebookRuntimeMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists NotebookRuntimes in a Location.
+     * 
+ */ + public void listNotebookRuntimes( + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListNotebookRuntimesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a NotebookRuntime.
+     * 
+ */ + public void deleteNotebookRuntime( + com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteNotebookRuntimeMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Upgrades a NotebookRuntime.
+     * 
+ */ + public void upgradeNotebookRuntime( + com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpgradeNotebookRuntimeMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Starts a NotebookRuntime.
+     * 
+ */ + public void startNotebookRuntime( + com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getStartNotebookRuntimeMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service NotebookService. + * + *
+   * The interface for Vertex Notebook service (a.k.a. Colab on Workbench).
+   * 
+ */ + public static final class NotebookServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private NotebookServiceBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected NotebookServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new NotebookServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a NotebookRuntimeTemplate.
+     * 
+ */ + public com.google.longrunning.Operation createNotebookRuntimeTemplate( + com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateNotebookRuntimeTemplateMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets a NotebookRuntimeTemplate.
+     * 
+ */ + public com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate getNotebookRuntimeTemplate( + com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeTemplateRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetNotebookRuntimeTemplateMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists NotebookRuntimeTemplates in a Location.
+     * 
+ */ + public com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesResponse + listNotebookRuntimeTemplates( + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListNotebookRuntimeTemplatesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a NotebookRuntimeTemplate.
+     * 
+ */ + public com.google.longrunning.Operation deleteNotebookRuntimeTemplate( + com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeTemplateRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteNotebookRuntimeTemplateMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Assigns a NotebookRuntime to a user for a particular Notebook file. This
+     * method will either returns an existing assignment or generates a new one.
+     * 
+ */ + public com.google.longrunning.Operation assignNotebookRuntime( + com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getAssignNotebookRuntimeMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets a NotebookRuntime.
+     * 
+ */ + public com.google.cloud.aiplatform.v1beta1.NotebookRuntime getNotebookRuntime( + com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetNotebookRuntimeMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists NotebookRuntimes in a Location.
+     * 
+ */ + public com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesResponse listNotebookRuntimes( + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListNotebookRuntimesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a NotebookRuntime.
+     * 
+ */ + public com.google.longrunning.Operation deleteNotebookRuntime( + com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteNotebookRuntimeMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Upgrades a NotebookRuntime.
+     * 
+ */ + public com.google.longrunning.Operation upgradeNotebookRuntime( + com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpgradeNotebookRuntimeMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Starts a NotebookRuntime.
+     * 
+ */ + public com.google.longrunning.Operation startNotebookRuntime( + com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getStartNotebookRuntimeMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service NotebookService. + * + *
+   * The interface for Vertex Notebook service (a.k.a. Colab on Workbench).
+   * 
+ */ + public static final class NotebookServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private NotebookServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected NotebookServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new NotebookServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a NotebookRuntimeTemplate.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createNotebookRuntimeTemplate( + com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateNotebookRuntimeTemplateMethod(), getCallOptions()), + request); + } + + /** + * + * + *
+     * Gets a NotebookRuntimeTemplate.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate> + getNotebookRuntimeTemplate( + com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeTemplateRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetNotebookRuntimeTemplateMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists NotebookRuntimeTemplates in a Location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesResponse> + listNotebookRuntimeTemplates( + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListNotebookRuntimeTemplatesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a NotebookRuntimeTemplate.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteNotebookRuntimeTemplate( + com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeTemplateRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteNotebookRuntimeTemplateMethod(), getCallOptions()), + request); + } + + /** + * + * + *
+     * Assigns a NotebookRuntime to a user for a particular Notebook file. This
+     * method will either returns an existing assignment or generates a new one.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + assignNotebookRuntime( + com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getAssignNotebookRuntimeMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets a NotebookRuntime.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1beta1.NotebookRuntime> + getNotebookRuntime(com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetNotebookRuntimeMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists NotebookRuntimes in a Location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesResponse> + listNotebookRuntimes( + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListNotebookRuntimesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a NotebookRuntime.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteNotebookRuntime( + com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteNotebookRuntimeMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Upgrades a NotebookRuntime.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + upgradeNotebookRuntime( + com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpgradeNotebookRuntimeMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Starts a NotebookRuntime.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + startNotebookRuntime( + com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getStartNotebookRuntimeMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_CREATE_NOTEBOOK_RUNTIME_TEMPLATE = 0; + private static final int METHODID_GET_NOTEBOOK_RUNTIME_TEMPLATE = 1; + private static final int METHODID_LIST_NOTEBOOK_RUNTIME_TEMPLATES = 2; + private static final int METHODID_DELETE_NOTEBOOK_RUNTIME_TEMPLATE = 3; + private static final int METHODID_ASSIGN_NOTEBOOK_RUNTIME = 4; + private static final int METHODID_GET_NOTEBOOK_RUNTIME = 5; + private static final int METHODID_LIST_NOTEBOOK_RUNTIMES = 6; + private static final int METHODID_DELETE_NOTEBOOK_RUNTIME = 7; + private static final int METHODID_UPGRADE_NOTEBOOK_RUNTIME = 8; + private static final int METHODID_START_NOTEBOOK_RUNTIME = 9; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_CREATE_NOTEBOOK_RUNTIME_TEMPLATE: + serviceImpl.createNotebookRuntimeTemplate( + (com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_NOTEBOOK_RUNTIME_TEMPLATE: + serviceImpl.getNotebookRuntimeTemplate( + (com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeTemplateRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate>) + responseObserver); + break; + case METHODID_LIST_NOTEBOOK_RUNTIME_TEMPLATES: + serviceImpl.listNotebookRuntimeTemplates( + (com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesResponse>) + responseObserver); + break; + case METHODID_DELETE_NOTEBOOK_RUNTIME_TEMPLATE: + serviceImpl.deleteNotebookRuntimeTemplate( + (com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeTemplateRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_ASSIGN_NOTEBOOK_RUNTIME: + serviceImpl.assignNotebookRuntime( + (com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_NOTEBOOK_RUNTIME: + serviceImpl.getNotebookRuntime( + (com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_NOTEBOOK_RUNTIMES: + serviceImpl.listNotebookRuntimes( + (com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesResponse>) + responseObserver); + break; + case METHODID_DELETE_NOTEBOOK_RUNTIME: + serviceImpl.deleteNotebookRuntime( + (com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPGRADE_NOTEBOOK_RUNTIME: + serviceImpl.upgradeNotebookRuntime( + (com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_START_NOTEBOOK_RUNTIME: + serviceImpl.startNotebookRuntime( + (com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getCreateNotebookRuntimeTemplateMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateRequest, + com.google.longrunning.Operation>( + service, METHODID_CREATE_NOTEBOOK_RUNTIME_TEMPLATE))) + .addMethod( + getGetNotebookRuntimeTemplateMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeTemplateRequest, + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate>( + service, METHODID_GET_NOTEBOOK_RUNTIME_TEMPLATE))) + .addMethod( + getListNotebookRuntimeTemplatesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesRequest, + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesResponse>( + service, METHODID_LIST_NOTEBOOK_RUNTIME_TEMPLATES))) + .addMethod( + getDeleteNotebookRuntimeTemplateMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeTemplateRequest, + com.google.longrunning.Operation>( + service, METHODID_DELETE_NOTEBOOK_RUNTIME_TEMPLATE))) + .addMethod( + getAssignNotebookRuntimeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeRequest, + com.google.longrunning.Operation>(service, METHODID_ASSIGN_NOTEBOOK_RUNTIME))) + .addMethod( + getGetNotebookRuntimeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeRequest, + com.google.cloud.aiplatform.v1beta1.NotebookRuntime>( + service, METHODID_GET_NOTEBOOK_RUNTIME))) + .addMethod( + getListNotebookRuntimesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesRequest, + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesResponse>( + service, METHODID_LIST_NOTEBOOK_RUNTIMES))) + .addMethod( + getDeleteNotebookRuntimeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeRequest, + com.google.longrunning.Operation>(service, METHODID_DELETE_NOTEBOOK_RUNTIME))) + .addMethod( + getUpgradeNotebookRuntimeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeRequest, + com.google.longrunning.Operation>(service, METHODID_UPGRADE_NOTEBOOK_RUNTIME))) + .addMethod( + getStartNotebookRuntimeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeRequest, + com.google.longrunning.Operation>(service, METHODID_START_NOTEBOOK_RUNTIME))) + .build(); + } + + private abstract static class NotebookServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + NotebookServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("NotebookService"); + } + } + + private static final class NotebookServiceFileDescriptorSupplier + extends NotebookServiceBaseDescriptorSupplier { + NotebookServiceFileDescriptorSupplier() {} + } + + private static final class NotebookServiceMethodDescriptorSupplier + extends NotebookServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + NotebookServiceMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (NotebookServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new NotebookServiceFileDescriptorSupplier()) + .addMethod(getCreateNotebookRuntimeTemplateMethod()) + .addMethod(getGetNotebookRuntimeTemplateMethod()) + .addMethod(getListNotebookRuntimeTemplatesMethod()) + .addMethod(getDeleteNotebookRuntimeTemplateMethod()) + .addMethod(getAssignNotebookRuntimeMethod()) + .addMethod(getGetNotebookRuntimeMethod()) + .addMethod(getListNotebookRuntimesMethod()) + .addMethod(getDeleteNotebookRuntimeMethod()) + .addMethod(getUpgradeNotebookRuntimeMethod()) + .addMethod(getStartNotebookRuntimeMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-aiplatform/grpc-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/PersistentResourceServiceGrpc.java b/java-aiplatform/grpc-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/PersistentResourceServiceGrpc.java index 331051abc2b5..0cfadfb40d56 100644 --- a/java-aiplatform/grpc-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/PersistentResourceServiceGrpc.java +++ b/java-aiplatform/grpc-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/PersistentResourceServiceGrpc.java @@ -298,6 +298,58 @@ private PersistentResourceServiceGrpc() {} return getUpdatePersistentResourceMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceRequest, + com.google.longrunning.Operation> + getRebootPersistentResourceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "RebootPersistentResource", + requestType = com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceRequest, + com.google.longrunning.Operation> + getRebootPersistentResourceMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceRequest, + com.google.longrunning.Operation> + getRebootPersistentResourceMethod; + if ((getRebootPersistentResourceMethod = + PersistentResourceServiceGrpc.getRebootPersistentResourceMethod) + == null) { + synchronized (PersistentResourceServiceGrpc.class) { + if ((getRebootPersistentResourceMethod = + PersistentResourceServiceGrpc.getRebootPersistentResourceMethod) + == null) { + PersistentResourceServiceGrpc.getRebootPersistentResourceMethod = + getRebootPersistentResourceMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "RebootPersistentResource")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new PersistentResourceServiceMethodDescriptorSupplier( + "RebootPersistentResource")) + .build(); + } + } + } + return getRebootPersistentResourceMethod; + } + /** Creates a new async stub that supports all call types for the service */ public static PersistentResourceServiceStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = @@ -420,6 +472,20 @@ default void updatePersistentResource( io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( getUpdatePersistentResourceMethod(), responseObserver); } + + /** + * + * + *
+     * Reboots a PersistentResource.
+     * 
+ */ + default void rebootPersistentResource( + com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getRebootPersistentResourceMethod(), responseObserver); + } } /** @@ -540,6 +606,22 @@ public void updatePersistentResource( request, responseObserver); } + + /** + * + * + *
+     * Reboots a PersistentResource.
+     * 
+ */ + public void rebootPersistentResource( + com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getRebootPersistentResourceMethod(), getCallOptions()), + request, + responseObserver); + } } /** @@ -627,6 +709,19 @@ public com.google.longrunning.Operation updatePersistentResource( return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getUpdatePersistentResourceMethod(), getCallOptions(), request); } + + /** + * + * + *
+     * Reboots a PersistentResource.
+     * 
+ */ + public com.google.longrunning.Operation rebootPersistentResource( + com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getRebootPersistentResourceMethod(), getCallOptions(), request); + } } /** @@ -721,6 +816,20 @@ protected PersistentResourceServiceFutureStub build( return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getUpdatePersistentResourceMethod(), getCallOptions()), request); } + + /** + * + * + *
+     * Reboots a PersistentResource.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + rebootPersistentResource( + com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getRebootPersistentResourceMethod(), getCallOptions()), request); + } } private static final int METHODID_CREATE_PERSISTENT_RESOURCE = 0; @@ -728,6 +837,7 @@ protected PersistentResourceServiceFutureStub build( private static final int METHODID_LIST_PERSISTENT_RESOURCES = 2; private static final int METHODID_DELETE_PERSISTENT_RESOURCE = 3; private static final int METHODID_UPDATE_PERSISTENT_RESOURCE = 4; + private static final int METHODID_REBOOT_PERSISTENT_RESOURCE = 5; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -774,6 +884,11 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (com.google.cloud.aiplatform.v1beta1.UpdatePersistentResourceRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_REBOOT_PERSISTENT_RESOURCE: + serviceImpl.rebootPersistentResource( + (com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; default: throw new AssertionError(); } @@ -827,6 +942,13 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser com.google.cloud.aiplatform.v1beta1.UpdatePersistentResourceRequest, com.google.longrunning.Operation>( service, METHODID_UPDATE_PERSISTENT_RESOURCE))) + .addMethod( + getRebootPersistentResourceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceRequest, + com.google.longrunning.Operation>( + service, METHODID_REBOOT_PERSISTENT_RESOURCE))) .build(); } @@ -883,6 +1005,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getListPersistentResourcesMethod()) .addMethod(getDeletePersistentResourceMethod()) .addMethod(getUpdatePersistentResourceMethod()) + .addMethod(getRebootPersistentResourceMethod()) .build(); } } diff --git a/java-aiplatform/grpc-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/PredictionServiceGrpc.java b/java-aiplatform/grpc-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/PredictionServiceGrpc.java index eb59392d4170..74e47ceb1e8c 100644 --- a/java-aiplatform/grpc-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/PredictionServiceGrpc.java +++ b/java-aiplatform/grpc-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/PredictionServiceGrpc.java @@ -658,6 +658,49 @@ private PredictionServiceGrpc() {} return getStreamGenerateContentMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.ChatCompletionsRequest, com.google.api.HttpBody> + getChatCompletionsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ChatCompletions", + requestType = com.google.cloud.aiplatform.v1beta1.ChatCompletionsRequest.class, + responseType = com.google.api.HttpBody.class, + methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.ChatCompletionsRequest, com.google.api.HttpBody> + getChatCompletionsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.ChatCompletionsRequest, com.google.api.HttpBody> + getChatCompletionsMethod; + if ((getChatCompletionsMethod = PredictionServiceGrpc.getChatCompletionsMethod) == null) { + synchronized (PredictionServiceGrpc.class) { + if ((getChatCompletionsMethod = PredictionServiceGrpc.getChatCompletionsMethod) == null) { + PredictionServiceGrpc.getChatCompletionsMethod = + getChatCompletionsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ChatCompletions")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1beta1.ChatCompletionsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.api.HttpBody.getDefaultInstance())) + .setSchemaDescriptor( + new PredictionServiceMethodDescriptorSupplier("ChatCompletions")) + .build(); + } + } + } + return getChatCompletionsMethod; + } + /** Creates a new async stub that supports all call types for the service */ public static PredictionServiceStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = @@ -927,6 +970,20 @@ default void streamGenerateContent( io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( getStreamGenerateContentMethod(), responseObserver); } + + /** + * + * + *
+     * Exposes an OpenAI-compatible endpoint for chat completions.
+     * 
+ */ + default void chatCompletions( + com.google.cloud.aiplatform.v1beta1.ChatCompletionsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getChatCompletionsMethod(), responseObserver); + } } /** @@ -1199,6 +1256,22 @@ public void streamGenerateContent( request, responseObserver); } + + /** + * + * + *
+     * Exposes an OpenAI-compatible endpoint for chat completions.
+     * 
+ */ + public void chatCompletions( + com.google.cloud.aiplatform.v1beta1.ChatCompletionsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncServerStreamingCall( + getChannel().newCall(getChatCompletionsMethod(), getCallOptions()), + request, + responseObserver); + } } /** @@ -1357,6 +1430,19 @@ public com.google.cloud.aiplatform.v1beta1.GenerateContentResponse generateConte return io.grpc.stub.ClientCalls.blockingServerStreamingCall( getChannel(), getStreamGenerateContentMethod(), getCallOptions(), request); } + + /** + * + * + *
+     * Exposes an OpenAI-compatible endpoint for chat completions.
+     * 
+ */ + public java.util.Iterator chatCompletions( + com.google.cloud.aiplatform.v1beta1.ChatCompletionsRequest request) { + return io.grpc.stub.ClientCalls.blockingServerStreamingCall( + getChannel(), getChatCompletionsMethod(), getCallOptions(), request); + } } /** @@ -1503,10 +1589,11 @@ public com.google.common.util.concurrent.ListenableFuture implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -1583,6 +1670,11 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv com.google.cloud.aiplatform.v1beta1.GenerateContentResponse>) responseObserver); break; + case METHODID_CHAT_COMPLETIONS: + serviceImpl.chatCompletions( + (com.google.cloud.aiplatform.v1beta1.ChatCompletionsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; default: throw new AssertionError(); } @@ -1715,6 +1807,12 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser com.google.cloud.aiplatform.v1beta1.GenerateContentRequest, com.google.cloud.aiplatform.v1beta1.GenerateContentResponse>( service, METHODID_STREAM_GENERATE_CONTENT))) + .addMethod( + getChatCompletionsMethod(), + io.grpc.stub.ServerCalls.asyncServerStreamingCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1beta1.ChatCompletionsRequest, + com.google.api.HttpBody>(service, METHODID_CHAT_COMPLETIONS))) .build(); } @@ -1779,6 +1877,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getCountTokensMethod()) .addMethod(getGenerateContentMethod()) .addMethod(getStreamGenerateContentMethod()) + .addMethod(getChatCompletionsMethod()) .build(); } } diff --git a/java-aiplatform/grpc-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/VertexRagDataServiceGrpc.java b/java-aiplatform/grpc-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/VertexRagDataServiceGrpc.java new file mode 100644 index 000000000000..a03503432e60 --- /dev/null +++ b/java-aiplatform/grpc-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/VertexRagDataServiceGrpc.java @@ -0,0 +1,1323 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * A service for managing user data for RAG.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/aiplatform/v1beta1/vertex_rag_data_service.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class VertexRagDataServiceGrpc { + + private VertexRagDataServiceGrpc() {} + + public static final java.lang.String SERVICE_NAME = + "google.cloud.aiplatform.v1beta1.VertexRagDataService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.CreateRagCorpusRequest, + com.google.longrunning.Operation> + getCreateRagCorpusMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateRagCorpus", + requestType = com.google.cloud.aiplatform.v1beta1.CreateRagCorpusRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.CreateRagCorpusRequest, + com.google.longrunning.Operation> + getCreateRagCorpusMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.CreateRagCorpusRequest, + com.google.longrunning.Operation> + getCreateRagCorpusMethod; + if ((getCreateRagCorpusMethod = VertexRagDataServiceGrpc.getCreateRagCorpusMethod) == null) { + synchronized (VertexRagDataServiceGrpc.class) { + if ((getCreateRagCorpusMethod = VertexRagDataServiceGrpc.getCreateRagCorpusMethod) + == null) { + VertexRagDataServiceGrpc.getCreateRagCorpusMethod = + getCreateRagCorpusMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateRagCorpus")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1beta1.CreateRagCorpusRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new VertexRagDataServiceMethodDescriptorSupplier("CreateRagCorpus")) + .build(); + } + } + } + return getCreateRagCorpusMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.GetRagCorpusRequest, + com.google.cloud.aiplatform.v1beta1.RagCorpus> + getGetRagCorpusMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetRagCorpus", + requestType = com.google.cloud.aiplatform.v1beta1.GetRagCorpusRequest.class, + responseType = com.google.cloud.aiplatform.v1beta1.RagCorpus.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.GetRagCorpusRequest, + com.google.cloud.aiplatform.v1beta1.RagCorpus> + getGetRagCorpusMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.GetRagCorpusRequest, + com.google.cloud.aiplatform.v1beta1.RagCorpus> + getGetRagCorpusMethod; + if ((getGetRagCorpusMethod = VertexRagDataServiceGrpc.getGetRagCorpusMethod) == null) { + synchronized (VertexRagDataServiceGrpc.class) { + if ((getGetRagCorpusMethod = VertexRagDataServiceGrpc.getGetRagCorpusMethod) == null) { + VertexRagDataServiceGrpc.getGetRagCorpusMethod = + getGetRagCorpusMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetRagCorpus")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1beta1.GetRagCorpusRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1beta1.RagCorpus.getDefaultInstance())) + .setSchemaDescriptor( + new VertexRagDataServiceMethodDescriptorSupplier("GetRagCorpus")) + .build(); + } + } + } + return getGetRagCorpusMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.ListRagCorporaRequest, + com.google.cloud.aiplatform.v1beta1.ListRagCorporaResponse> + getListRagCorporaMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListRagCorpora", + requestType = com.google.cloud.aiplatform.v1beta1.ListRagCorporaRequest.class, + responseType = com.google.cloud.aiplatform.v1beta1.ListRagCorporaResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.ListRagCorporaRequest, + com.google.cloud.aiplatform.v1beta1.ListRagCorporaResponse> + getListRagCorporaMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.ListRagCorporaRequest, + com.google.cloud.aiplatform.v1beta1.ListRagCorporaResponse> + getListRagCorporaMethod; + if ((getListRagCorporaMethod = VertexRagDataServiceGrpc.getListRagCorporaMethod) == null) { + synchronized (VertexRagDataServiceGrpc.class) { + if ((getListRagCorporaMethod = VertexRagDataServiceGrpc.getListRagCorporaMethod) == null) { + VertexRagDataServiceGrpc.getListRagCorporaMethod = + getListRagCorporaMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListRagCorpora")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1beta1.ListRagCorporaRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1beta1.ListRagCorporaResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new VertexRagDataServiceMethodDescriptorSupplier("ListRagCorpora")) + .build(); + } + } + } + return getListRagCorporaMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.DeleteRagCorpusRequest, + com.google.longrunning.Operation> + getDeleteRagCorpusMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteRagCorpus", + requestType = com.google.cloud.aiplatform.v1beta1.DeleteRagCorpusRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.DeleteRagCorpusRequest, + com.google.longrunning.Operation> + getDeleteRagCorpusMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.DeleteRagCorpusRequest, + com.google.longrunning.Operation> + getDeleteRagCorpusMethod; + if ((getDeleteRagCorpusMethod = VertexRagDataServiceGrpc.getDeleteRagCorpusMethod) == null) { + synchronized (VertexRagDataServiceGrpc.class) { + if ((getDeleteRagCorpusMethod = VertexRagDataServiceGrpc.getDeleteRagCorpusMethod) + == null) { + VertexRagDataServiceGrpc.getDeleteRagCorpusMethod = + getDeleteRagCorpusMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteRagCorpus")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1beta1.DeleteRagCorpusRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new VertexRagDataServiceMethodDescriptorSupplier("DeleteRagCorpus")) + .build(); + } + } + } + return getDeleteRagCorpusMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.UploadRagFileRequest, + com.google.cloud.aiplatform.v1beta1.UploadRagFileResponse> + getUploadRagFileMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UploadRagFile", + requestType = com.google.cloud.aiplatform.v1beta1.UploadRagFileRequest.class, + responseType = com.google.cloud.aiplatform.v1beta1.UploadRagFileResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.UploadRagFileRequest, + com.google.cloud.aiplatform.v1beta1.UploadRagFileResponse> + getUploadRagFileMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.UploadRagFileRequest, + com.google.cloud.aiplatform.v1beta1.UploadRagFileResponse> + getUploadRagFileMethod; + if ((getUploadRagFileMethod = VertexRagDataServiceGrpc.getUploadRagFileMethod) == null) { + synchronized (VertexRagDataServiceGrpc.class) { + if ((getUploadRagFileMethod = VertexRagDataServiceGrpc.getUploadRagFileMethod) == null) { + VertexRagDataServiceGrpc.getUploadRagFileMethod = + getUploadRagFileMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UploadRagFile")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1beta1.UploadRagFileRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1beta1.UploadRagFileResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new VertexRagDataServiceMethodDescriptorSupplier("UploadRagFile")) + .build(); + } + } + } + return getUploadRagFileMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.ImportRagFilesRequest, + com.google.longrunning.Operation> + getImportRagFilesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ImportRagFiles", + requestType = com.google.cloud.aiplatform.v1beta1.ImportRagFilesRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.ImportRagFilesRequest, + com.google.longrunning.Operation> + getImportRagFilesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.ImportRagFilesRequest, + com.google.longrunning.Operation> + getImportRagFilesMethod; + if ((getImportRagFilesMethod = VertexRagDataServiceGrpc.getImportRagFilesMethod) == null) { + synchronized (VertexRagDataServiceGrpc.class) { + if ((getImportRagFilesMethod = VertexRagDataServiceGrpc.getImportRagFilesMethod) == null) { + VertexRagDataServiceGrpc.getImportRagFilesMethod = + getImportRagFilesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ImportRagFiles")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1beta1.ImportRagFilesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new VertexRagDataServiceMethodDescriptorSupplier("ImportRagFiles")) + .build(); + } + } + } + return getImportRagFilesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.GetRagFileRequest, + com.google.cloud.aiplatform.v1beta1.RagFile> + getGetRagFileMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetRagFile", + requestType = com.google.cloud.aiplatform.v1beta1.GetRagFileRequest.class, + responseType = com.google.cloud.aiplatform.v1beta1.RagFile.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.GetRagFileRequest, + com.google.cloud.aiplatform.v1beta1.RagFile> + getGetRagFileMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.GetRagFileRequest, + com.google.cloud.aiplatform.v1beta1.RagFile> + getGetRagFileMethod; + if ((getGetRagFileMethod = VertexRagDataServiceGrpc.getGetRagFileMethod) == null) { + synchronized (VertexRagDataServiceGrpc.class) { + if ((getGetRagFileMethod = VertexRagDataServiceGrpc.getGetRagFileMethod) == null) { + VertexRagDataServiceGrpc.getGetRagFileMethod = + getGetRagFileMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetRagFile")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1beta1.GetRagFileRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1beta1.RagFile.getDefaultInstance())) + .setSchemaDescriptor( + new VertexRagDataServiceMethodDescriptorSupplier("GetRagFile")) + .build(); + } + } + } + return getGetRagFileMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.ListRagFilesRequest, + com.google.cloud.aiplatform.v1beta1.ListRagFilesResponse> + getListRagFilesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListRagFiles", + requestType = com.google.cloud.aiplatform.v1beta1.ListRagFilesRequest.class, + responseType = com.google.cloud.aiplatform.v1beta1.ListRagFilesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.ListRagFilesRequest, + com.google.cloud.aiplatform.v1beta1.ListRagFilesResponse> + getListRagFilesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.ListRagFilesRequest, + com.google.cloud.aiplatform.v1beta1.ListRagFilesResponse> + getListRagFilesMethod; + if ((getListRagFilesMethod = VertexRagDataServiceGrpc.getListRagFilesMethod) == null) { + synchronized (VertexRagDataServiceGrpc.class) { + if ((getListRagFilesMethod = VertexRagDataServiceGrpc.getListRagFilesMethod) == null) { + VertexRagDataServiceGrpc.getListRagFilesMethod = + getListRagFilesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListRagFiles")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1beta1.ListRagFilesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1beta1.ListRagFilesResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new VertexRagDataServiceMethodDescriptorSupplier("ListRagFiles")) + .build(); + } + } + } + return getListRagFilesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.DeleteRagFileRequest, + com.google.longrunning.Operation> + getDeleteRagFileMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteRagFile", + requestType = com.google.cloud.aiplatform.v1beta1.DeleteRagFileRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.DeleteRagFileRequest, + com.google.longrunning.Operation> + getDeleteRagFileMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.DeleteRagFileRequest, + com.google.longrunning.Operation> + getDeleteRagFileMethod; + if ((getDeleteRagFileMethod = VertexRagDataServiceGrpc.getDeleteRagFileMethod) == null) { + synchronized (VertexRagDataServiceGrpc.class) { + if ((getDeleteRagFileMethod = VertexRagDataServiceGrpc.getDeleteRagFileMethod) == null) { + VertexRagDataServiceGrpc.getDeleteRagFileMethod = + getDeleteRagFileMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteRagFile")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1beta1.DeleteRagFileRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new VertexRagDataServiceMethodDescriptorSupplier("DeleteRagFile")) + .build(); + } + } + } + return getDeleteRagFileMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static VertexRagDataServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public VertexRagDataServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new VertexRagDataServiceStub(channel, callOptions); + } + }; + return VertexRagDataServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static VertexRagDataServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public VertexRagDataServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new VertexRagDataServiceBlockingStub(channel, callOptions); + } + }; + return VertexRagDataServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static VertexRagDataServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public VertexRagDataServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new VertexRagDataServiceFutureStub(channel, callOptions); + } + }; + return VertexRagDataServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * A service for managing user data for RAG.
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Creates a RagCorpus.
+     * 
+ */ + default void createRagCorpus( + com.google.cloud.aiplatform.v1beta1.CreateRagCorpusRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateRagCorpusMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets a RagCorpus.
+     * 
+ */ + default void getRagCorpus( + com.google.cloud.aiplatform.v1beta1.GetRagCorpusRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetRagCorpusMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists RagCorpora in a Location.
+     * 
+ */ + default void listRagCorpora( + com.google.cloud.aiplatform.v1beta1.ListRagCorporaRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListRagCorporaMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a RagCorpus.
+     * 
+ */ + default void deleteRagCorpus( + com.google.cloud.aiplatform.v1beta1.DeleteRagCorpusRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteRagCorpusMethod(), responseObserver); + } + + /** + * + * + *
+     * Upload a file into a RagCorpus.
+     * 
+ */ + default void uploadRagFile( + com.google.cloud.aiplatform.v1beta1.UploadRagFileRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUploadRagFileMethod(), responseObserver); + } + + /** + * + * + *
+     * Import files from Google Cloud Storage or Google Drive into a RagCorpus.
+     * 
+ */ + default void importRagFiles( + com.google.cloud.aiplatform.v1beta1.ImportRagFilesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getImportRagFilesMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets a RagFile.
+     * 
+ */ + default void getRagFile( + com.google.cloud.aiplatform.v1beta1.GetRagFileRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetRagFileMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists RagFiles in a RagCorpus.
+     * 
+ */ + default void listRagFiles( + com.google.cloud.aiplatform.v1beta1.ListRagFilesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListRagFilesMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a RagFile.
+     * 
+ */ + default void deleteRagFile( + com.google.cloud.aiplatform.v1beta1.DeleteRagFileRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteRagFileMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service VertexRagDataService. + * + *
+   * A service for managing user data for RAG.
+   * 
+ */ + public abstract static class VertexRagDataServiceImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return VertexRagDataServiceGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service VertexRagDataService. + * + *
+   * A service for managing user data for RAG.
+   * 
+ */ + public static final class VertexRagDataServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private VertexRagDataServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected VertexRagDataServiceStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new VertexRagDataServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a RagCorpus.
+     * 
+ */ + public void createRagCorpus( + com.google.cloud.aiplatform.v1beta1.CreateRagCorpusRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateRagCorpusMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets a RagCorpus.
+     * 
+ */ + public void getRagCorpus( + com.google.cloud.aiplatform.v1beta1.GetRagCorpusRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetRagCorpusMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists RagCorpora in a Location.
+     * 
+ */ + public void listRagCorpora( + com.google.cloud.aiplatform.v1beta1.ListRagCorporaRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListRagCorporaMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a RagCorpus.
+     * 
+ */ + public void deleteRagCorpus( + com.google.cloud.aiplatform.v1beta1.DeleteRagCorpusRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteRagCorpusMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Upload a file into a RagCorpus.
+     * 
+ */ + public void uploadRagFile( + com.google.cloud.aiplatform.v1beta1.UploadRagFileRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUploadRagFileMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Import files from Google Cloud Storage or Google Drive into a RagCorpus.
+     * 
+ */ + public void importRagFiles( + com.google.cloud.aiplatform.v1beta1.ImportRagFilesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getImportRagFilesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets a RagFile.
+     * 
+ */ + public void getRagFile( + com.google.cloud.aiplatform.v1beta1.GetRagFileRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetRagFileMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Lists RagFiles in a RagCorpus.
+     * 
+ */ + public void listRagFiles( + com.google.cloud.aiplatform.v1beta1.ListRagFilesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListRagFilesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a RagFile.
+     * 
+ */ + public void deleteRagFile( + com.google.cloud.aiplatform.v1beta1.DeleteRagFileRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteRagFileMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service VertexRagDataService. + * + *
+   * A service for managing user data for RAG.
+   * 
+ */ + public static final class VertexRagDataServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private VertexRagDataServiceBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected VertexRagDataServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new VertexRagDataServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a RagCorpus.
+     * 
+ */ + public com.google.longrunning.Operation createRagCorpus( + com.google.cloud.aiplatform.v1beta1.CreateRagCorpusRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateRagCorpusMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets a RagCorpus.
+     * 
+ */ + public com.google.cloud.aiplatform.v1beta1.RagCorpus getRagCorpus( + com.google.cloud.aiplatform.v1beta1.GetRagCorpusRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetRagCorpusMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists RagCorpora in a Location.
+     * 
+ */ + public com.google.cloud.aiplatform.v1beta1.ListRagCorporaResponse listRagCorpora( + com.google.cloud.aiplatform.v1beta1.ListRagCorporaRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListRagCorporaMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a RagCorpus.
+     * 
+ */ + public com.google.longrunning.Operation deleteRagCorpus( + com.google.cloud.aiplatform.v1beta1.DeleteRagCorpusRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteRagCorpusMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Upload a file into a RagCorpus.
+     * 
+ */ + public com.google.cloud.aiplatform.v1beta1.UploadRagFileResponse uploadRagFile( + com.google.cloud.aiplatform.v1beta1.UploadRagFileRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUploadRagFileMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Import files from Google Cloud Storage or Google Drive into a RagCorpus.
+     * 
+ */ + public com.google.longrunning.Operation importRagFiles( + com.google.cloud.aiplatform.v1beta1.ImportRagFilesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getImportRagFilesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets a RagFile.
+     * 
+ */ + public com.google.cloud.aiplatform.v1beta1.RagFile getRagFile( + com.google.cloud.aiplatform.v1beta1.GetRagFileRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetRagFileMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists RagFiles in a RagCorpus.
+     * 
+ */ + public com.google.cloud.aiplatform.v1beta1.ListRagFilesResponse listRagFiles( + com.google.cloud.aiplatform.v1beta1.ListRagFilesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListRagFilesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a RagFile.
+     * 
+ */ + public com.google.longrunning.Operation deleteRagFile( + com.google.cloud.aiplatform.v1beta1.DeleteRagFileRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteRagFileMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service VertexRagDataService. + * + *
+   * A service for managing user data for RAG.
+   * 
+ */ + public static final class VertexRagDataServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private VertexRagDataServiceFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected VertexRagDataServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new VertexRagDataServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a RagCorpus.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createRagCorpus(com.google.cloud.aiplatform.v1beta1.CreateRagCorpusRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateRagCorpusMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets a RagCorpus.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1beta1.RagCorpus> + getRagCorpus(com.google.cloud.aiplatform.v1beta1.GetRagCorpusRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetRagCorpusMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists RagCorpora in a Location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1beta1.ListRagCorporaResponse> + listRagCorpora(com.google.cloud.aiplatform.v1beta1.ListRagCorporaRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListRagCorporaMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a RagCorpus.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteRagCorpus(com.google.cloud.aiplatform.v1beta1.DeleteRagCorpusRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteRagCorpusMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Upload a file into a RagCorpus.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1beta1.UploadRagFileResponse> + uploadRagFile(com.google.cloud.aiplatform.v1beta1.UploadRagFileRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUploadRagFileMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Import files from Google Cloud Storage or Google Drive into a RagCorpus.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + importRagFiles(com.google.cloud.aiplatform.v1beta1.ImportRagFilesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getImportRagFilesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets a RagFile.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1beta1.RagFile> + getRagFile(com.google.cloud.aiplatform.v1beta1.GetRagFileRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetRagFileMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists RagFiles in a RagCorpus.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1beta1.ListRagFilesResponse> + listRagFiles(com.google.cloud.aiplatform.v1beta1.ListRagFilesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListRagFilesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a RagFile.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteRagFile(com.google.cloud.aiplatform.v1beta1.DeleteRagFileRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteRagFileMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_CREATE_RAG_CORPUS = 0; + private static final int METHODID_GET_RAG_CORPUS = 1; + private static final int METHODID_LIST_RAG_CORPORA = 2; + private static final int METHODID_DELETE_RAG_CORPUS = 3; + private static final int METHODID_UPLOAD_RAG_FILE = 4; + private static final int METHODID_IMPORT_RAG_FILES = 5; + private static final int METHODID_GET_RAG_FILE = 6; + private static final int METHODID_LIST_RAG_FILES = 7; + private static final int METHODID_DELETE_RAG_FILE = 8; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_CREATE_RAG_CORPUS: + serviceImpl.createRagCorpus( + (com.google.cloud.aiplatform.v1beta1.CreateRagCorpusRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_RAG_CORPUS: + serviceImpl.getRagCorpus( + (com.google.cloud.aiplatform.v1beta1.GetRagCorpusRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_RAG_CORPORA: + serviceImpl.listRagCorpora( + (com.google.cloud.aiplatform.v1beta1.ListRagCorporaRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.aiplatform.v1beta1.ListRagCorporaResponse>) + responseObserver); + break; + case METHODID_DELETE_RAG_CORPUS: + serviceImpl.deleteRagCorpus( + (com.google.cloud.aiplatform.v1beta1.DeleteRagCorpusRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPLOAD_RAG_FILE: + serviceImpl.uploadRagFile( + (com.google.cloud.aiplatform.v1beta1.UploadRagFileRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.aiplatform.v1beta1.UploadRagFileResponse>) + responseObserver); + break; + case METHODID_IMPORT_RAG_FILES: + serviceImpl.importRagFiles( + (com.google.cloud.aiplatform.v1beta1.ImportRagFilesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_RAG_FILE: + serviceImpl.getRagFile( + (com.google.cloud.aiplatform.v1beta1.GetRagFileRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_RAG_FILES: + serviceImpl.listRagFiles( + (com.google.cloud.aiplatform.v1beta1.ListRagFilesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.aiplatform.v1beta1.ListRagFilesResponse>) + responseObserver); + break; + case METHODID_DELETE_RAG_FILE: + serviceImpl.deleteRagFile( + (com.google.cloud.aiplatform.v1beta1.DeleteRagFileRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getCreateRagCorpusMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1beta1.CreateRagCorpusRequest, + com.google.longrunning.Operation>(service, METHODID_CREATE_RAG_CORPUS))) + .addMethod( + getGetRagCorpusMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1beta1.GetRagCorpusRequest, + com.google.cloud.aiplatform.v1beta1.RagCorpus>( + service, METHODID_GET_RAG_CORPUS))) + .addMethod( + getListRagCorporaMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1beta1.ListRagCorporaRequest, + com.google.cloud.aiplatform.v1beta1.ListRagCorporaResponse>( + service, METHODID_LIST_RAG_CORPORA))) + .addMethod( + getDeleteRagCorpusMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1beta1.DeleteRagCorpusRequest, + com.google.longrunning.Operation>(service, METHODID_DELETE_RAG_CORPUS))) + .addMethod( + getUploadRagFileMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1beta1.UploadRagFileRequest, + com.google.cloud.aiplatform.v1beta1.UploadRagFileResponse>( + service, METHODID_UPLOAD_RAG_FILE))) + .addMethod( + getImportRagFilesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1beta1.ImportRagFilesRequest, + com.google.longrunning.Operation>(service, METHODID_IMPORT_RAG_FILES))) + .addMethod( + getGetRagFileMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1beta1.GetRagFileRequest, + com.google.cloud.aiplatform.v1beta1.RagFile>(service, METHODID_GET_RAG_FILE))) + .addMethod( + getListRagFilesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1beta1.ListRagFilesRequest, + com.google.cloud.aiplatform.v1beta1.ListRagFilesResponse>( + service, METHODID_LIST_RAG_FILES))) + .addMethod( + getDeleteRagFileMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1beta1.DeleteRagFileRequest, + com.google.longrunning.Operation>(service, METHODID_DELETE_RAG_FILE))) + .build(); + } + + private abstract static class VertexRagDataServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + VertexRagDataServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("VertexRagDataService"); + } + } + + private static final class VertexRagDataServiceFileDescriptorSupplier + extends VertexRagDataServiceBaseDescriptorSupplier { + VertexRagDataServiceFileDescriptorSupplier() {} + } + + private static final class VertexRagDataServiceMethodDescriptorSupplier + extends VertexRagDataServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + VertexRagDataServiceMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (VertexRagDataServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new VertexRagDataServiceFileDescriptorSupplier()) + .addMethod(getCreateRagCorpusMethod()) + .addMethod(getGetRagCorpusMethod()) + .addMethod(getListRagCorporaMethod()) + .addMethod(getDeleteRagCorpusMethod()) + .addMethod(getUploadRagFileMethod()) + .addMethod(getImportRagFilesMethod()) + .addMethod(getGetRagFileMethod()) + .addMethod(getListRagFilesMethod()) + .addMethod(getDeleteRagFileMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-aiplatform/grpc-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/VertexRagServiceGrpc.java b/java-aiplatform/grpc-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/VertexRagServiceGrpc.java new file mode 100644 index 000000000000..6284ba263f9a --- /dev/null +++ b/java-aiplatform/grpc-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/VertexRagServiceGrpc.java @@ -0,0 +1,380 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * A service for retrieving relevant contexts.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/aiplatform/v1beta1/vertex_rag_service.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class VertexRagServiceGrpc { + + private VertexRagServiceGrpc() {} + + public static final java.lang.String SERVICE_NAME = + "google.cloud.aiplatform.v1beta1.VertexRagService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest, + com.google.cloud.aiplatform.v1beta1.RetrieveContextsResponse> + getRetrieveContextsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "RetrieveContexts", + requestType = com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.class, + responseType = com.google.cloud.aiplatform.v1beta1.RetrieveContextsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest, + com.google.cloud.aiplatform.v1beta1.RetrieveContextsResponse> + getRetrieveContextsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest, + com.google.cloud.aiplatform.v1beta1.RetrieveContextsResponse> + getRetrieveContextsMethod; + if ((getRetrieveContextsMethod = VertexRagServiceGrpc.getRetrieveContextsMethod) == null) { + synchronized (VertexRagServiceGrpc.class) { + if ((getRetrieveContextsMethod = VertexRagServiceGrpc.getRetrieveContextsMethod) == null) { + VertexRagServiceGrpc.getRetrieveContextsMethod = + getRetrieveContextsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RetrieveContexts")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1beta1.RetrieveContextsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new VertexRagServiceMethodDescriptorSupplier("RetrieveContexts")) + .build(); + } + } + } + return getRetrieveContextsMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static VertexRagServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public VertexRagServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new VertexRagServiceStub(channel, callOptions); + } + }; + return VertexRagServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static VertexRagServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public VertexRagServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new VertexRagServiceBlockingStub(channel, callOptions); + } + }; + return VertexRagServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static VertexRagServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public VertexRagServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new VertexRagServiceFutureStub(channel, callOptions); + } + }; + return VertexRagServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * A service for retrieving relevant contexts.
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Retrieves relevant contexts for a query.
+     * 
+ */ + default void retrieveContexts( + com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getRetrieveContextsMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service VertexRagService. + * + *
+   * A service for retrieving relevant contexts.
+   * 
+ */ + public abstract static class VertexRagServiceImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return VertexRagServiceGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service VertexRagService. + * + *
+   * A service for retrieving relevant contexts.
+   * 
+ */ + public static final class VertexRagServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private VertexRagServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected VertexRagServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new VertexRagServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * Retrieves relevant contexts for a query.
+     * 
+ */ + public void retrieveContexts( + com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getRetrieveContextsMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service VertexRagService. + * + *
+   * A service for retrieving relevant contexts.
+   * 
+ */ + public static final class VertexRagServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private VertexRagServiceBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected VertexRagServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new VertexRagServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Retrieves relevant contexts for a query.
+     * 
+ */ + public com.google.cloud.aiplatform.v1beta1.RetrieveContextsResponse retrieveContexts( + com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getRetrieveContextsMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service VertexRagService. + * + *
+   * A service for retrieving relevant contexts.
+   * 
+ */ + public static final class VertexRagServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private VertexRagServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected VertexRagServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new VertexRagServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Retrieves relevant contexts for a query.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1beta1.RetrieveContextsResponse> + retrieveContexts(com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getRetrieveContextsMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_RETRIEVE_CONTEXTS = 0; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_RETRIEVE_CONTEXTS: + serviceImpl.retrieveContexts( + (com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.aiplatform.v1beta1.RetrieveContextsResponse>) + responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getRetrieveContextsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest, + com.google.cloud.aiplatform.v1beta1.RetrieveContextsResponse>( + service, METHODID_RETRIEVE_CONTEXTS))) + .build(); + } + + private abstract static class VertexRagServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + VertexRagServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.aiplatform.v1beta1.VertexRagServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("VertexRagService"); + } + } + + private static final class VertexRagServiceFileDescriptorSupplier + extends VertexRagServiceBaseDescriptorSupplier { + VertexRagServiceFileDescriptorSupplier() {} + } + + private static final class VertexRagServiceMethodDescriptorSupplier + extends VertexRagServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + VertexRagServiceMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (VertexRagServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new VertexRagServiceFileDescriptorSupplier()) + .addMethod(getRetrieveContextsMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/AssignNotebookRuntimeOperationMetadata.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/AssignNotebookRuntimeOperationMetadata.java new file mode 100644 index 000000000000..f63078d0ac15 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/AssignNotebookRuntimeOperationMetadata.java @@ -0,0 +1,935 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/notebook_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Metadata information for
+ * [NotebookService.AssignNotebookRuntime][google.cloud.aiplatform.v1.NotebookService.AssignNotebookRuntime].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.AssignNotebookRuntimeOperationMetadata} + */ +public final class AssignNotebookRuntimeOperationMetadata + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.AssignNotebookRuntimeOperationMetadata) + AssignNotebookRuntimeOperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use AssignNotebookRuntimeOperationMetadata.newBuilder() to construct. + private AssignNotebookRuntimeOperationMetadata( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AssignNotebookRuntimeOperationMetadata() { + progressMessage_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AssignNotebookRuntimeOperationMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_AssignNotebookRuntimeOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_AssignNotebookRuntimeOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.AssignNotebookRuntimeOperationMetadata.class, + com.google.cloud.aiplatform.v1.AssignNotebookRuntimeOperationMetadata.Builder.class); + } + + private int bitField0_; + public static final int GENERIC_METADATA_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1.GenericOperationMetadata genericMetadata_; + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + @java.lang.Override + public boolean hasGenericMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata() { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder() { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + + public static final int PROGRESS_MESSAGE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object progressMessage_ = ""; + /** + * + * + *
+   * A human-readable message that shows the intermediate progress details of
+   * NotebookRuntime.
+   * 
+ * + * string progress_message = 2; + * + * @return The progressMessage. + */ + @java.lang.Override + public java.lang.String getProgressMessage() { + java.lang.Object ref = progressMessage_; + 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(); + progressMessage_ = s; + return s; + } + } + /** + * + * + *
+   * A human-readable message that shows the intermediate progress details of
+   * NotebookRuntime.
+   * 
+ * + * string progress_message = 2; + * + * @return The bytes for progressMessage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProgressMessageBytes() { + java.lang.Object ref = progressMessage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + progressMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getGenericMetadata()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(progressMessage_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, progressMessage_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getGenericMetadata()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(progressMessage_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, progressMessage_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.AssignNotebookRuntimeOperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.AssignNotebookRuntimeOperationMetadata other = + (com.google.cloud.aiplatform.v1.AssignNotebookRuntimeOperationMetadata) obj; + + if (hasGenericMetadata() != other.hasGenericMetadata()) return false; + if (hasGenericMetadata()) { + if (!getGenericMetadata().equals(other.getGenericMetadata())) return false; + } + if (!getProgressMessage().equals(other.getProgressMessage())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasGenericMetadata()) { + hash = (37 * hash) + GENERIC_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getGenericMetadata().hashCode(); + } + hash = (37 * hash) + PROGRESS_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getProgressMessage().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.AssignNotebookRuntimeOperationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.AssignNotebookRuntimeOperationMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.AssignNotebookRuntimeOperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.AssignNotebookRuntimeOperationMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.AssignNotebookRuntimeOperationMetadata parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.AssignNotebookRuntimeOperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.AssignNotebookRuntimeOperationMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.AssignNotebookRuntimeOperationMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.AssignNotebookRuntimeOperationMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.AssignNotebookRuntimeOperationMetadata + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.AssignNotebookRuntimeOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.AssignNotebookRuntimeOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.AssignNotebookRuntimeOperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Metadata information for
+   * [NotebookService.AssignNotebookRuntime][google.cloud.aiplatform.v1.NotebookService.AssignNotebookRuntime].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.AssignNotebookRuntimeOperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.AssignNotebookRuntimeOperationMetadata) + com.google.cloud.aiplatform.v1.AssignNotebookRuntimeOperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_AssignNotebookRuntimeOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_AssignNotebookRuntimeOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.AssignNotebookRuntimeOperationMetadata.class, + com.google.cloud.aiplatform.v1.AssignNotebookRuntimeOperationMetadata.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.AssignNotebookRuntimeOperationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getGenericMetadataFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + genericMetadata_ = null; + if (genericMetadataBuilder_ != null) { + genericMetadataBuilder_.dispose(); + genericMetadataBuilder_ = null; + } + progressMessage_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_AssignNotebookRuntimeOperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.AssignNotebookRuntimeOperationMetadata + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.AssignNotebookRuntimeOperationMetadata + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.AssignNotebookRuntimeOperationMetadata build() { + com.google.cloud.aiplatform.v1.AssignNotebookRuntimeOperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.AssignNotebookRuntimeOperationMetadata buildPartial() { + com.google.cloud.aiplatform.v1.AssignNotebookRuntimeOperationMetadata result = + new com.google.cloud.aiplatform.v1.AssignNotebookRuntimeOperationMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1.AssignNotebookRuntimeOperationMetadata result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.genericMetadata_ = + genericMetadataBuilder_ == null ? genericMetadata_ : genericMetadataBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.progressMessage_ = progressMessage_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.AssignNotebookRuntimeOperationMetadata) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.AssignNotebookRuntimeOperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.AssignNotebookRuntimeOperationMetadata other) { + if (other + == com.google.cloud.aiplatform.v1.AssignNotebookRuntimeOperationMetadata + .getDefaultInstance()) return this; + if (other.hasGenericMetadata()) { + mergeGenericMetadata(other.getGenericMetadata()); + } + if (!other.getProgressMessage().isEmpty()) { + progressMessage_ = other.progressMessage_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getGenericMetadataFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + progressMessage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.aiplatform.v1.GenericOperationMetadata genericMetadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder> + genericMetadataBuilder_; + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + public boolean hasGenericMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata() { + if (genericMetadataBuilder_ == null) { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } else { + return genericMetadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder setGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata value) { + if (genericMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + genericMetadata_ = value; + } else { + genericMetadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder setGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder builderForValue) { + if (genericMetadataBuilder_ == null) { + genericMetadata_ = builderForValue.build(); + } else { + genericMetadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder mergeGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata value) { + if (genericMetadataBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && genericMetadata_ != null + && genericMetadata_ + != com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance()) { + getGenericMetadataBuilder().mergeFrom(value); + } else { + genericMetadata_ = value; + } + } else { + genericMetadataBuilder_.mergeFrom(value); + } + if (genericMetadata_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder clearGenericMetadata() { + bitField0_ = (bitField0_ & ~0x00000001); + genericMetadata_ = null; + if (genericMetadataBuilder_ != null) { + genericMetadataBuilder_.dispose(); + genericMetadataBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder + getGenericMetadataBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getGenericMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder() { + if (genericMetadataBuilder_ != null) { + return genericMetadataBuilder_.getMessageOrBuilder(); + } else { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder> + getGenericMetadataFieldBuilder() { + if (genericMetadataBuilder_ == null) { + genericMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder>( + getGenericMetadata(), getParentForChildren(), isClean()); + genericMetadata_ = null; + } + return genericMetadataBuilder_; + } + + private java.lang.Object progressMessage_ = ""; + /** + * + * + *
+     * A human-readable message that shows the intermediate progress details of
+     * NotebookRuntime.
+     * 
+ * + * string progress_message = 2; + * + * @return The progressMessage. + */ + public java.lang.String getProgressMessage() { + java.lang.Object ref = progressMessage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + progressMessage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A human-readable message that shows the intermediate progress details of
+     * NotebookRuntime.
+     * 
+ * + * string progress_message = 2; + * + * @return The bytes for progressMessage. + */ + public com.google.protobuf.ByteString getProgressMessageBytes() { + java.lang.Object ref = progressMessage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + progressMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A human-readable message that shows the intermediate progress details of
+     * NotebookRuntime.
+     * 
+ * + * string progress_message = 2; + * + * @param value The progressMessage to set. + * @return This builder for chaining. + */ + public Builder setProgressMessage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + progressMessage_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * A human-readable message that shows the intermediate progress details of
+     * NotebookRuntime.
+     * 
+ * + * string progress_message = 2; + * + * @return This builder for chaining. + */ + public Builder clearProgressMessage() { + progressMessage_ = getDefaultInstance().getProgressMessage(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A human-readable message that shows the intermediate progress details of
+     * NotebookRuntime.
+     * 
+ * + * string progress_message = 2; + * + * @param value The bytes for progressMessage to set. + * @return This builder for chaining. + */ + public Builder setProgressMessageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + progressMessage_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.AssignNotebookRuntimeOperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.AssignNotebookRuntimeOperationMetadata) + private static final com.google.cloud.aiplatform.v1.AssignNotebookRuntimeOperationMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.AssignNotebookRuntimeOperationMetadata(); + } + + public static com.google.cloud.aiplatform.v1.AssignNotebookRuntimeOperationMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AssignNotebookRuntimeOperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.AssignNotebookRuntimeOperationMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/AssignNotebookRuntimeOperationMetadataOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/AssignNotebookRuntimeOperationMetadataOrBuilder.java new file mode 100644 index 000000000000..f8cf00d059e6 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/AssignNotebookRuntimeOperationMetadataOrBuilder.java @@ -0,0 +1,88 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/notebook_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +public interface AssignNotebookRuntimeOperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.AssignNotebookRuntimeOperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + boolean hasGenericMetadata(); + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata(); + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder getGenericMetadataOrBuilder(); + + /** + * + * + *
+   * A human-readable message that shows the intermediate progress details of
+   * NotebookRuntime.
+   * 
+ * + * string progress_message = 2; + * + * @return The progressMessage. + */ + java.lang.String getProgressMessage(); + /** + * + * + *
+   * A human-readable message that shows the intermediate progress details of
+   * NotebookRuntime.
+   * 
+ * + * string progress_message = 2; + * + * @return The bytes for progressMessage. + */ + com.google.protobuf.ByteString getProgressMessageBytes(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/AssignNotebookRuntimeRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/AssignNotebookRuntimeRequest.java new file mode 100644 index 000000000000..88b3088c49f9 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/AssignNotebookRuntimeRequest.java @@ -0,0 +1,1352 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/notebook_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for
+ * [NotebookService.AssignNotebookRuntime][google.cloud.aiplatform.v1.NotebookService.AssignNotebookRuntime].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.AssignNotebookRuntimeRequest} + */ +public final class AssignNotebookRuntimeRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.AssignNotebookRuntimeRequest) + AssignNotebookRuntimeRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use AssignNotebookRuntimeRequest.newBuilder() to construct. + private AssignNotebookRuntimeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AssignNotebookRuntimeRequest() { + parent_ = ""; + notebookRuntimeTemplate_ = ""; + notebookRuntimeId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AssignNotebookRuntimeRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_AssignNotebookRuntimeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_AssignNotebookRuntimeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.AssignNotebookRuntimeRequest.class, + com.google.cloud.aiplatform.v1.AssignNotebookRuntimeRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The resource name of the Location to get the NotebookRuntime
+   * assignment. Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the Location to get the NotebookRuntime
+   * assignment. Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NOTEBOOK_RUNTIME_TEMPLATE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object notebookRuntimeTemplate_ = ""; + /** + * + * + *
+   * Required. The resource name of the NotebookRuntimeTemplate based on which a
+   * NotebookRuntime will be assigned (reuse or create a new one).
+   * 
+ * + * + * string notebook_runtime_template = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The notebookRuntimeTemplate. + */ + @java.lang.Override + public java.lang.String getNotebookRuntimeTemplate() { + java.lang.Object ref = notebookRuntimeTemplate_; + 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(); + notebookRuntimeTemplate_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the NotebookRuntimeTemplate based on which a
+   * NotebookRuntime will be assigned (reuse or create a new one).
+   * 
+ * + * + * string notebook_runtime_template = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for notebookRuntimeTemplate. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNotebookRuntimeTemplateBytes() { + java.lang.Object ref = notebookRuntimeTemplate_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + notebookRuntimeTemplate_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NOTEBOOK_RUNTIME_FIELD_NUMBER = 3; + private com.google.cloud.aiplatform.v1.NotebookRuntime notebookRuntime_; + /** + * + * + *
+   * Required. Provide runtime specific information (e.g. runtime owner,
+   * notebook id) used for NotebookRuntime assignment.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntime notebook_runtime = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the notebookRuntime field is set. + */ + @java.lang.Override + public boolean hasNotebookRuntime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. Provide runtime specific information (e.g. runtime owner,
+   * notebook id) used for NotebookRuntime assignment.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntime notebook_runtime = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The notebookRuntime. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.NotebookRuntime getNotebookRuntime() { + return notebookRuntime_ == null + ? com.google.cloud.aiplatform.v1.NotebookRuntime.getDefaultInstance() + : notebookRuntime_; + } + /** + * + * + *
+   * Required. Provide runtime specific information (e.g. runtime owner,
+   * notebook id) used for NotebookRuntime assignment.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntime notebook_runtime = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.NotebookRuntimeOrBuilder getNotebookRuntimeOrBuilder() { + return notebookRuntime_ == null + ? com.google.cloud.aiplatform.v1.NotebookRuntime.getDefaultInstance() + : notebookRuntime_; + } + + public static final int NOTEBOOK_RUNTIME_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object notebookRuntimeId_ = ""; + /** + * + * + *
+   * Optional. User specified ID for the notebook runtime.
+   * 
+ * + * string notebook_runtime_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The notebookRuntimeId. + */ + @java.lang.Override + public java.lang.String getNotebookRuntimeId() { + java.lang.Object ref = notebookRuntimeId_; + 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(); + notebookRuntimeId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. User specified ID for the notebook runtime.
+   * 
+ * + * string notebook_runtime_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for notebookRuntimeId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNotebookRuntimeIdBytes() { + java.lang.Object ref = notebookRuntimeId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + notebookRuntimeId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(notebookRuntimeTemplate_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, notebookRuntimeTemplate_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getNotebookRuntime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(notebookRuntimeId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, notebookRuntimeId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(notebookRuntimeTemplate_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, notebookRuntimeTemplate_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getNotebookRuntime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(notebookRuntimeId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, notebookRuntimeId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.AssignNotebookRuntimeRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.AssignNotebookRuntimeRequest other = + (com.google.cloud.aiplatform.v1.AssignNotebookRuntimeRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getNotebookRuntimeTemplate().equals(other.getNotebookRuntimeTemplate())) return false; + if (hasNotebookRuntime() != other.hasNotebookRuntime()) return false; + if (hasNotebookRuntime()) { + if (!getNotebookRuntime().equals(other.getNotebookRuntime())) return false; + } + if (!getNotebookRuntimeId().equals(other.getNotebookRuntimeId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + NOTEBOOK_RUNTIME_TEMPLATE_FIELD_NUMBER; + hash = (53 * hash) + getNotebookRuntimeTemplate().hashCode(); + if (hasNotebookRuntime()) { + hash = (37 * hash) + NOTEBOOK_RUNTIME_FIELD_NUMBER; + hash = (53 * hash) + getNotebookRuntime().hashCode(); + } + hash = (37 * hash) + NOTEBOOK_RUNTIME_ID_FIELD_NUMBER; + hash = (53 * hash) + getNotebookRuntimeId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.AssignNotebookRuntimeRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.AssignNotebookRuntimeRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.AssignNotebookRuntimeRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.AssignNotebookRuntimeRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.AssignNotebookRuntimeRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.AssignNotebookRuntimeRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.AssignNotebookRuntimeRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.AssignNotebookRuntimeRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.AssignNotebookRuntimeRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.AssignNotebookRuntimeRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.AssignNotebookRuntimeRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.AssignNotebookRuntimeRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.AssignNotebookRuntimeRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for
+   * [NotebookService.AssignNotebookRuntime][google.cloud.aiplatform.v1.NotebookService.AssignNotebookRuntime].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.AssignNotebookRuntimeRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.AssignNotebookRuntimeRequest) + com.google.cloud.aiplatform.v1.AssignNotebookRuntimeRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_AssignNotebookRuntimeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_AssignNotebookRuntimeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.AssignNotebookRuntimeRequest.class, + com.google.cloud.aiplatform.v1.AssignNotebookRuntimeRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.AssignNotebookRuntimeRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getNotebookRuntimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + notebookRuntimeTemplate_ = ""; + notebookRuntime_ = null; + if (notebookRuntimeBuilder_ != null) { + notebookRuntimeBuilder_.dispose(); + notebookRuntimeBuilder_ = null; + } + notebookRuntimeId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_AssignNotebookRuntimeRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.AssignNotebookRuntimeRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.AssignNotebookRuntimeRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.AssignNotebookRuntimeRequest build() { + com.google.cloud.aiplatform.v1.AssignNotebookRuntimeRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.AssignNotebookRuntimeRequest buildPartial() { + com.google.cloud.aiplatform.v1.AssignNotebookRuntimeRequest result = + new com.google.cloud.aiplatform.v1.AssignNotebookRuntimeRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.AssignNotebookRuntimeRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.notebookRuntimeTemplate_ = notebookRuntimeTemplate_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.notebookRuntime_ = + notebookRuntimeBuilder_ == null ? notebookRuntime_ : notebookRuntimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.notebookRuntimeId_ = notebookRuntimeId_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.AssignNotebookRuntimeRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.AssignNotebookRuntimeRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.AssignNotebookRuntimeRequest other) { + if (other == com.google.cloud.aiplatform.v1.AssignNotebookRuntimeRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getNotebookRuntimeTemplate().isEmpty()) { + notebookRuntimeTemplate_ = other.notebookRuntimeTemplate_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasNotebookRuntime()) { + mergeNotebookRuntime(other.getNotebookRuntime()); + } + if (!other.getNotebookRuntimeId().isEmpty()) { + notebookRuntimeId_ = other.notebookRuntimeId_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + notebookRuntimeTemplate_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getNotebookRuntimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + notebookRuntimeId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of the Location to get the NotebookRuntime
+     * assignment. Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Location to get the NotebookRuntime
+     * assignment. Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Location to get the NotebookRuntime
+     * assignment. Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Location to get the NotebookRuntime
+     * assignment. Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Location to get the NotebookRuntime
+     * assignment. Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object notebookRuntimeTemplate_ = ""; + /** + * + * + *
+     * Required. The resource name of the NotebookRuntimeTemplate based on which a
+     * NotebookRuntime will be assigned (reuse or create a new one).
+     * 
+ * + * + * string notebook_runtime_template = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The notebookRuntimeTemplate. + */ + public java.lang.String getNotebookRuntimeTemplate() { + java.lang.Object ref = notebookRuntimeTemplate_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + notebookRuntimeTemplate_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the NotebookRuntimeTemplate based on which a
+     * NotebookRuntime will be assigned (reuse or create a new one).
+     * 
+ * + * + * string notebook_runtime_template = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for notebookRuntimeTemplate. + */ + public com.google.protobuf.ByteString getNotebookRuntimeTemplateBytes() { + java.lang.Object ref = notebookRuntimeTemplate_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + notebookRuntimeTemplate_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the NotebookRuntimeTemplate based on which a
+     * NotebookRuntime will be assigned (reuse or create a new one).
+     * 
+ * + * + * string notebook_runtime_template = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The notebookRuntimeTemplate to set. + * @return This builder for chaining. + */ + public Builder setNotebookRuntimeTemplate(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + notebookRuntimeTemplate_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the NotebookRuntimeTemplate based on which a
+     * NotebookRuntime will be assigned (reuse or create a new one).
+     * 
+ * + * + * string notebook_runtime_template = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearNotebookRuntimeTemplate() { + notebookRuntimeTemplate_ = getDefaultInstance().getNotebookRuntimeTemplate(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the NotebookRuntimeTemplate based on which a
+     * NotebookRuntime will be assigned (reuse or create a new one).
+     * 
+ * + * + * string notebook_runtime_template = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for notebookRuntimeTemplate to set. + * @return This builder for chaining. + */ + public Builder setNotebookRuntimeTemplateBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + notebookRuntimeTemplate_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.aiplatform.v1.NotebookRuntime notebookRuntime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.NotebookRuntime, + com.google.cloud.aiplatform.v1.NotebookRuntime.Builder, + com.google.cloud.aiplatform.v1.NotebookRuntimeOrBuilder> + notebookRuntimeBuilder_; + /** + * + * + *
+     * Required. Provide runtime specific information (e.g. runtime owner,
+     * notebook id) used for NotebookRuntime assignment.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntime notebook_runtime = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the notebookRuntime field is set. + */ + public boolean hasNotebookRuntime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Required. Provide runtime specific information (e.g. runtime owner,
+     * notebook id) used for NotebookRuntime assignment.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntime notebook_runtime = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The notebookRuntime. + */ + public com.google.cloud.aiplatform.v1.NotebookRuntime getNotebookRuntime() { + if (notebookRuntimeBuilder_ == null) { + return notebookRuntime_ == null + ? com.google.cloud.aiplatform.v1.NotebookRuntime.getDefaultInstance() + : notebookRuntime_; + } else { + return notebookRuntimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Provide runtime specific information (e.g. runtime owner,
+     * notebook id) used for NotebookRuntime assignment.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntime notebook_runtime = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setNotebookRuntime(com.google.cloud.aiplatform.v1.NotebookRuntime value) { + if (notebookRuntimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + notebookRuntime_ = value; + } else { + notebookRuntimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Provide runtime specific information (e.g. runtime owner,
+     * notebook id) used for NotebookRuntime assignment.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntime notebook_runtime = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setNotebookRuntime( + com.google.cloud.aiplatform.v1.NotebookRuntime.Builder builderForValue) { + if (notebookRuntimeBuilder_ == null) { + notebookRuntime_ = builderForValue.build(); + } else { + notebookRuntimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Provide runtime specific information (e.g. runtime owner,
+     * notebook id) used for NotebookRuntime assignment.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntime notebook_runtime = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeNotebookRuntime(com.google.cloud.aiplatform.v1.NotebookRuntime value) { + if (notebookRuntimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && notebookRuntime_ != null + && notebookRuntime_ + != com.google.cloud.aiplatform.v1.NotebookRuntime.getDefaultInstance()) { + getNotebookRuntimeBuilder().mergeFrom(value); + } else { + notebookRuntime_ = value; + } + } else { + notebookRuntimeBuilder_.mergeFrom(value); + } + if (notebookRuntime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. Provide runtime specific information (e.g. runtime owner,
+     * notebook id) used for NotebookRuntime assignment.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntime notebook_runtime = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearNotebookRuntime() { + bitField0_ = (bitField0_ & ~0x00000004); + notebookRuntime_ = null; + if (notebookRuntimeBuilder_ != null) { + notebookRuntimeBuilder_.dispose(); + notebookRuntimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Provide runtime specific information (e.g. runtime owner,
+     * notebook id) used for NotebookRuntime assignment.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntime notebook_runtime = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.NotebookRuntime.Builder getNotebookRuntimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getNotebookRuntimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Provide runtime specific information (e.g. runtime owner,
+     * notebook id) used for NotebookRuntime assignment.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntime notebook_runtime = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.NotebookRuntimeOrBuilder getNotebookRuntimeOrBuilder() { + if (notebookRuntimeBuilder_ != null) { + return notebookRuntimeBuilder_.getMessageOrBuilder(); + } else { + return notebookRuntime_ == null + ? com.google.cloud.aiplatform.v1.NotebookRuntime.getDefaultInstance() + : notebookRuntime_; + } + } + /** + * + * + *
+     * Required. Provide runtime specific information (e.g. runtime owner,
+     * notebook id) used for NotebookRuntime assignment.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntime notebook_runtime = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.NotebookRuntime, + com.google.cloud.aiplatform.v1.NotebookRuntime.Builder, + com.google.cloud.aiplatform.v1.NotebookRuntimeOrBuilder> + getNotebookRuntimeFieldBuilder() { + if (notebookRuntimeBuilder_ == null) { + notebookRuntimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.NotebookRuntime, + com.google.cloud.aiplatform.v1.NotebookRuntime.Builder, + com.google.cloud.aiplatform.v1.NotebookRuntimeOrBuilder>( + getNotebookRuntime(), getParentForChildren(), isClean()); + notebookRuntime_ = null; + } + return notebookRuntimeBuilder_; + } + + private java.lang.Object notebookRuntimeId_ = ""; + /** + * + * + *
+     * Optional. User specified ID for the notebook runtime.
+     * 
+ * + * string notebook_runtime_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The notebookRuntimeId. + */ + public java.lang.String getNotebookRuntimeId() { + java.lang.Object ref = notebookRuntimeId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + notebookRuntimeId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. User specified ID for the notebook runtime.
+     * 
+ * + * string notebook_runtime_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for notebookRuntimeId. + */ + public com.google.protobuf.ByteString getNotebookRuntimeIdBytes() { + java.lang.Object ref = notebookRuntimeId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + notebookRuntimeId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. User specified ID for the notebook runtime.
+     * 
+ * + * string notebook_runtime_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The notebookRuntimeId to set. + * @return This builder for chaining. + */ + public Builder setNotebookRuntimeId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + notebookRuntimeId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. User specified ID for the notebook runtime.
+     * 
+ * + * string notebook_runtime_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearNotebookRuntimeId() { + notebookRuntimeId_ = getDefaultInstance().getNotebookRuntimeId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. User specified ID for the notebook runtime.
+     * 
+ * + * string notebook_runtime_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for notebookRuntimeId to set. + * @return This builder for chaining. + */ + public Builder setNotebookRuntimeIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + notebookRuntimeId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.AssignNotebookRuntimeRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.AssignNotebookRuntimeRequest) + private static final com.google.cloud.aiplatform.v1.AssignNotebookRuntimeRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.AssignNotebookRuntimeRequest(); + } + + public static com.google.cloud.aiplatform.v1.AssignNotebookRuntimeRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AssignNotebookRuntimeRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.AssignNotebookRuntimeRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/AssignNotebookRuntimeRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/AssignNotebookRuntimeRequestOrBuilder.java new file mode 100644 index 000000000000..2edaba256eae --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/AssignNotebookRuntimeRequestOrBuilder.java @@ -0,0 +1,157 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/notebook_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +public interface AssignNotebookRuntimeRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.AssignNotebookRuntimeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the Location to get the NotebookRuntime
+   * assignment. Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The resource name of the Location to get the NotebookRuntime
+   * assignment. Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The resource name of the NotebookRuntimeTemplate based on which a
+   * NotebookRuntime will be assigned (reuse or create a new one).
+   * 
+ * + * + * string notebook_runtime_template = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The notebookRuntimeTemplate. + */ + java.lang.String getNotebookRuntimeTemplate(); + /** + * + * + *
+   * Required. The resource name of the NotebookRuntimeTemplate based on which a
+   * NotebookRuntime will be assigned (reuse or create a new one).
+   * 
+ * + * + * string notebook_runtime_template = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for notebookRuntimeTemplate. + */ + com.google.protobuf.ByteString getNotebookRuntimeTemplateBytes(); + + /** + * + * + *
+   * Required. Provide runtime specific information (e.g. runtime owner,
+   * notebook id) used for NotebookRuntime assignment.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntime notebook_runtime = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the notebookRuntime field is set. + */ + boolean hasNotebookRuntime(); + /** + * + * + *
+   * Required. Provide runtime specific information (e.g. runtime owner,
+   * notebook id) used for NotebookRuntime assignment.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntime notebook_runtime = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The notebookRuntime. + */ + com.google.cloud.aiplatform.v1.NotebookRuntime getNotebookRuntime(); + /** + * + * + *
+   * Required. Provide runtime specific information (e.g. runtime owner,
+   * notebook id) used for NotebookRuntime assignment.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntime notebook_runtime = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1.NotebookRuntimeOrBuilder getNotebookRuntimeOrBuilder(); + + /** + * + * + *
+   * Optional. User specified ID for the notebook runtime.
+   * 
+ * + * string notebook_runtime_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The notebookRuntimeId. + */ + java.lang.String getNotebookRuntimeId(); + /** + * + * + *
+   * Optional. User specified ID for the notebook runtime.
+   * 
+ * + * string notebook_runtime_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for notebookRuntimeId. + */ + com.google.protobuf.ByteString getNotebookRuntimeIdBytes(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/Blob.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/Blob.java index 8a6db83d361a..6ac60412382e 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/Blob.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/Blob.java @@ -23,9 +23,10 @@ * * *
- * Raw media bytes.
+ * Content blob.
  *
- * Text should not be sent as raw bytes, use the 'text' field.
+ * It's preferred to send as [text][google.cloud.aiplatform.v1.Part.text]
+ * directly rather than raw bytes.
  * 
* * Protobuf type {@code google.cloud.aiplatform.v1.Blob} @@ -123,7 +124,7 @@ public com.google.protobuf.ByteString getMimeTypeBytes() { * * *
-   * Required. Raw bytes for media formats.
+   * Required. Raw bytes.
    * 
* * bytes data = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -305,9 +306,10 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Raw media bytes.
+   * Content blob.
    *
-   * Text should not be sent as raw bytes, use the 'text' field.
+   * It's preferred to send as [text][google.cloud.aiplatform.v1.Part.text]
+   * directly rather than raw bytes.
    * 
* * Protobuf type {@code google.cloud.aiplatform.v1.Blob} @@ -608,7 +610,7 @@ public Builder setMimeTypeBytes(com.google.protobuf.ByteString value) { * * *
-     * Required. Raw bytes for media formats.
+     * Required. Raw bytes.
      * 
* * bytes data = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -623,7 +625,7 @@ public com.google.protobuf.ByteString getData() { * * *
-     * Required. Raw bytes for media formats.
+     * Required. Raw bytes.
      * 
* * bytes data = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -644,7 +646,7 @@ public Builder setData(com.google.protobuf.ByteString value) { * * *
-     * Required. Raw bytes for media formats.
+     * Required. Raw bytes.
      * 
* * bytes data = 2 [(.google.api.field_behavior) = REQUIRED]; diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BlobOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BlobOrBuilder.java index 14faf3128e74..c49300c4ba17 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BlobOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BlobOrBuilder.java @@ -53,7 +53,7 @@ public interface BlobOrBuilder * * *
-   * Required. Raw bytes for media formats.
+   * Required. Raw bytes.
    * 
* * bytes data = 2 [(.google.api.field_behavior) = REQUIRED]; diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CancelTuningJobRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CancelTuningJobRequest.java new file mode 100644 index 000000000000..639ae2f13cf8 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CancelTuningJobRequest.java @@ -0,0 +1,649 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/genai_tuning_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for
+ * [GenAiTuningService.CancelTuningJob][google.cloud.aiplatform.v1.GenAiTuningService.CancelTuningJob].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CancelTuningJobRequest} + */ +public final class CancelTuningJobRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.CancelTuningJobRequest) + CancelTuningJobRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CancelTuningJobRequest.newBuilder() to construct. + private CancelTuningJobRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CancelTuningJobRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CancelTuningJobRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.GenAiTuningServiceProto + .internal_static_google_cloud_aiplatform_v1_CancelTuningJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.GenAiTuningServiceProto + .internal_static_google_cloud_aiplatform_v1_CancelTuningJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CancelTuningJobRequest.class, + com.google.cloud.aiplatform.v1.CancelTuningJobRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the TuningJob to cancel. Format:
+   * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the TuningJob to cancel. Format:
+   * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.CancelTuningJobRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.CancelTuningJobRequest other = + (com.google.cloud.aiplatform.v1.CancelTuningJobRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.CancelTuningJobRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CancelTuningJobRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CancelTuningJobRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CancelTuningJobRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CancelTuningJobRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CancelTuningJobRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CancelTuningJobRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CancelTuningJobRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CancelTuningJobRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CancelTuningJobRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CancelTuningJobRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CancelTuningJobRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.CancelTuningJobRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for
+   * [GenAiTuningService.CancelTuningJob][google.cloud.aiplatform.v1.GenAiTuningService.CancelTuningJob].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CancelTuningJobRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.CancelTuningJobRequest) + com.google.cloud.aiplatform.v1.CancelTuningJobRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.GenAiTuningServiceProto + .internal_static_google_cloud_aiplatform_v1_CancelTuningJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.GenAiTuningServiceProto + .internal_static_google_cloud_aiplatform_v1_CancelTuningJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CancelTuningJobRequest.class, + com.google.cloud.aiplatform.v1.CancelTuningJobRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.CancelTuningJobRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.GenAiTuningServiceProto + .internal_static_google_cloud_aiplatform_v1_CancelTuningJobRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CancelTuningJobRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.CancelTuningJobRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CancelTuningJobRequest build() { + com.google.cloud.aiplatform.v1.CancelTuningJobRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CancelTuningJobRequest buildPartial() { + com.google.cloud.aiplatform.v1.CancelTuningJobRequest result = + new com.google.cloud.aiplatform.v1.CancelTuningJobRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.CancelTuningJobRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.CancelTuningJobRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.CancelTuningJobRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.CancelTuningJobRequest other) { + if (other == com.google.cloud.aiplatform.v1.CancelTuningJobRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the TuningJob to cancel. Format:
+     * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the TuningJob to cancel. Format:
+     * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the TuningJob to cancel. Format:
+     * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the TuningJob to cancel. Format:
+     * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the TuningJob to cancel. Format:
+     * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}`
+     * 
+ * + * + * 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. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.CancelTuningJobRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.CancelTuningJobRequest) + private static final com.google.cloud.aiplatform.v1.CancelTuningJobRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.CancelTuningJobRequest(); + } + + public static com.google.cloud.aiplatform.v1.CancelTuningJobRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CancelTuningJobRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CancelTuningJobRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CancelTuningJobRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CancelTuningJobRequestOrBuilder.java new file mode 100644 index 000000000000..641728c3b0d4 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CancelTuningJobRequestOrBuilder.java @@ -0,0 +1,57 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/genai_tuning_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +public interface CancelTuningJobRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.CancelTuningJobRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the TuningJob to cancel. Format:
+   * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the TuningJob to cancel. Format:
+   * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ContentProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ContentProto.java index 91066f8a080e..4019bfdfe440 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ContentProto.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ContentProto.java @@ -119,81 +119,89 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\030\001 \001(\tB\003\340A\002\022\025\n\010file_uri\030\002 \001(\tB\003\340A\002\"y\n\rVi" + "deoMetadata\0224\n\014start_offset\030\001 \001(\0132\031.goog" + "le.protobuf.DurationB\003\340A\001\0222\n\nend_offset\030" - + "\002 \001(\0132\031.google.protobuf.DurationB\003\340A\001\"\226\002" + + "\002 \001(\0132\031.google.protobuf.DurationB\003\340A\001\"\253\003" + "\n\020GenerationConfig\022\035\n\013temperature\030\001 \001(\002B" + "\003\340A\001H\000\210\001\001\022\027\n\005top_p\030\002 \001(\002B\003\340A\001H\001\210\001\001\022\027\n\005to" + "p_k\030\003 \001(\002B\003\340A\001H\002\210\001\001\022!\n\017candidate_count\030\004" + " \001(\005B\003\340A\001H\003\210\001\001\022#\n\021max_output_tokens\030\005 \001(" + "\005B\003\340A\001H\004\210\001\001\022\033\n\016stop_sequences\030\006 \003(\tB\003\340A\001" - + "B\016\n\014_temperatureB\010\n\006_top_pB\010\n\006_top_kB\022\n\020" - + "_candidate_countB\024\n\022_max_output_tokens\"\275" - + "\002\n\rSafetySetting\022?\n\010category\030\001 \001(\0162(.goo" - + "gle.cloud.aiplatform.v1.HarmCategoryB\003\340A" - + "\002\022T\n\tthreshold\030\002 \001(\0162<.google.cloud.aipl" - + "atform.v1.SafetySetting.HarmBlockThresho" - + "ldB\003\340A\002\"\224\001\n\022HarmBlockThreshold\022$\n HARM_B" - + "LOCK_THRESHOLD_UNSPECIFIED\020\000\022\027\n\023BLOCK_LO" - + "W_AND_ABOVE\020\001\022\032\n\026BLOCK_MEDIUM_AND_ABOVE\020" - + "\002\022\023\n\017BLOCK_ONLY_HIGH\020\003\022\016\n\nBLOCK_NONE\020\004\"\277" - + "\004\n\014SafetyRating\022?\n\010category\030\001 \001(\0162(.goog" - + "le.cloud.aiplatform.v1.HarmCategoryB\003\340A\003" - + "\022R\n\013probability\030\002 \001(\01628.google.cloud.aip" - + "latform.v1.SafetyRating.HarmProbabilityB" - + "\003\340A\003\022\036\n\021probability_score\030\005 \001(\002B\003\340A\003\022L\n\010" - + "severity\030\006 \001(\01625.google.cloud.aiplatform" - + ".v1.SafetyRating.HarmSeverityB\003\340A\003\022\033\n\016se" - + "verity_score\030\007 \001(\002B\003\340A\003\022\024\n\007blocked\030\003 \001(\010" - + "B\003\340A\003\"b\n\017HarmProbability\022 \n\034HARM_PROBABI" - + "LITY_UNSPECIFIED\020\000\022\016\n\nNEGLIGIBLE\020\001\022\007\n\003LO" - + "W\020\002\022\n\n\006MEDIUM\020\003\022\010\n\004HIGH\020\004\"\224\001\n\014HarmSeveri" - + "ty\022\035\n\031HARM_SEVERITY_UNSPECIFIED\020\000\022\034\n\030HAR" - + "M_SEVERITY_NEGLIGIBLE\020\001\022\025\n\021HARM_SEVERITY" - + "_LOW\020\002\022\030\n\024HARM_SEVERITY_MEDIUM\020\003\022\026\n\022HARM" - + "_SEVERITY_HIGH\020\004\"P\n\020CitationMetadata\022<\n\t" - + "citations\030\001 \003(\0132$.google.cloud.aiplatfor" - + "m.v1.CitationB\003\340A\003\"\252\001\n\010Citation\022\030\n\013start" - + "_index\030\001 \001(\005B\003\340A\003\022\026\n\tend_index\030\002 \001(\005B\003\340A" - + "\003\022\020\n\003uri\030\003 \001(\tB\003\340A\003\022\022\n\005title\030\004 \001(\tB\003\340A\003\022" - + "\024\n\007license\030\005 \001(\tB\003\340A\003\0220\n\020publication_dat" - + "e\030\006 \001(\0132\021.google.type.DateB\003\340A\003\"\346\004\n\tCand" - + "idate\022\022\n\005index\030\001 \001(\005B\003\340A\003\0229\n\007content\030\002 \001" - + "(\0132#.google.cloud.aiplatform.v1.ContentB" - + "\003\340A\003\022N\n\rfinish_reason\030\003 \001(\01622.google.clo" - + "ud.aiplatform.v1.Candidate.FinishReasonB" - + "\003\340A\003\022E\n\016safety_ratings\030\004 \003(\0132(.google.cl" - + "oud.aiplatform.v1.SafetyRatingB\003\340A\003\022 \n\016f" - + "inish_message\030\005 \001(\tB\003\340A\003H\000\210\001\001\022L\n\021citatio" - + "n_metadata\030\006 \001(\0132,.google.cloud.aiplatfo" - + "rm.v1.CitationMetadataB\003\340A\003\022N\n\022grounding" - + "_metadata\030\007 \001(\0132-.google.cloud.aiplatfor" - + "m.v1.GroundingMetadataB\003\340A\003\"\237\001\n\014FinishRe" - + "ason\022\035\n\031FINISH_REASON_UNSPECIFIED\020\000\022\010\n\004S" - + "TOP\020\001\022\016\n\nMAX_TOKENS\020\002\022\n\n\006SAFETY\020\003\022\016\n\nREC" - + "ITATION\020\004\022\t\n\005OTHER\020\005\022\r\n\tBLOCKLIST\020\006\022\026\n\022P" - + "ROHIBITED_CONTENT\020\007\022\010\n\004SPII\020\010B\021\n\017_finish" - + "_message\"T\n\007Segment\022\027\n\npart_index\030\001 \001(\005B" - + "\003\340A\003\022\030\n\013start_index\030\002 \001(\005B\003\340A\003\022\026\n\tend_in" - + "dex\030\003 \001(\005B\003\340A\003\"\221\002\n\024GroundingAttribution\022" - + "H\n\003web\030\003 \001(\01324.google.cloud.aiplatform.v" - + "1.GroundingAttribution.WebB\003\340A\001H\000\0229\n\007seg" - + "ment\030\001 \001(\0132#.google.cloud.aiplatform.v1." - + "SegmentB\003\340A\003\022%\n\020confidence_score\030\002 \001(\002B\006" - + "\340A\001\340A\003H\001\210\001\001\032+\n\003Web\022\020\n\003uri\030\001 \001(\tB\003\340A\003\022\022\n\005" - + "title\030\002 \001(\tB\003\340A\003B\013\n\treferenceB\023\n\021_confid" - + "ence_score\"\213\001\n\021GroundingMetadata\022\037\n\022web_" - + "search_queries\030\001 \003(\tB\003\340A\001\022U\n\026grounding_a" - + "ttributions\030\002 \003(\01320.google.cloud.aiplatf" - + "orm.v1.GroundingAttributionB\003\340A\001*\264\001\n\014Har" - + "mCategory\022\035\n\031HARM_CATEGORY_UNSPECIFIED\020\000" - + "\022\035\n\031HARM_CATEGORY_HATE_SPEECH\020\001\022#\n\037HARM_" - + "CATEGORY_DANGEROUS_CONTENT\020\002\022\034\n\030HARM_CAT" - + "EGORY_HARASSMENT\020\003\022#\n\037HARM_CATEGORY_SEXU" - + "ALLY_EXPLICIT\020\004B\312\001\n\036com.google.cloud.aip" - + "latform.v1B\014ContentProtoP\001Z>cloud.google" - + ".com/go/aiplatform/apiv1/aiplatformpb;ai" - + "platformpb\252\002\032Google.Cloud.AIPlatform.V1\312" - + "\002\032Google\\Cloud\\AIPlatform\\V1\352\002\035Google::C" - + "loud::AIPlatform::V1b\006proto3" + + "\022\"\n\020presence_penalty\030\010 \001(\002B\003\340A\001H\005\210\001\001\022#\n\021" + + "frequency_penalty\030\t \001(\002B\003\340A\001H\006\210\001\001\022\037\n\022res" + + "ponse_mime_type\030\r \001(\tB\003\340A\001B\016\n\014_temperatu" + + "reB\010\n\006_top_pB\010\n\006_top_kB\022\n\020_candidate_cou" + + "ntB\024\n\022_max_output_tokensB\023\n\021_presence_pe" + + "naltyB\024\n\022_frequency_penalty\"\342\003\n\rSafetySe" + + "tting\022?\n\010category\030\001 \001(\0162(.google.cloud.a" + + "iplatform.v1.HarmCategoryB\003\340A\002\022T\n\tthresh" + + "old\030\002 \001(\0162<.google.cloud.aiplatform.v1.S" + + "afetySetting.HarmBlockThresholdB\003\340A\002\022N\n\006" + + "method\030\004 \001(\01629.google.cloud.aiplatform.v" + + "1.SafetySetting.HarmBlockMethodB\003\340A\001\"\224\001\n" + + "\022HarmBlockThreshold\022$\n HARM_BLOCK_THRESH" + + "OLD_UNSPECIFIED\020\000\022\027\n\023BLOCK_LOW_AND_ABOVE" + + "\020\001\022\032\n\026BLOCK_MEDIUM_AND_ABOVE\020\002\022\023\n\017BLOCK_" + + "ONLY_HIGH\020\003\022\016\n\nBLOCK_NONE\020\004\"S\n\017HarmBlock" + + "Method\022!\n\035HARM_BLOCK_METHOD_UNSPECIFIED\020" + + "\000\022\014\n\010SEVERITY\020\001\022\017\n\013PROBABILITY\020\002\"\277\004\n\014Saf" + + "etyRating\022?\n\010category\030\001 \001(\0162(.google.clo" + + "ud.aiplatform.v1.HarmCategoryB\003\340A\003\022R\n\013pr" + + "obability\030\002 \001(\01628.google.cloud.aiplatfor" + + "m.v1.SafetyRating.HarmProbabilityB\003\340A\003\022\036" + + "\n\021probability_score\030\005 \001(\002B\003\340A\003\022L\n\010severi" + + "ty\030\006 \001(\01625.google.cloud.aiplatform.v1.Sa" + + "fetyRating.HarmSeverityB\003\340A\003\022\033\n\016severity" + + "_score\030\007 \001(\002B\003\340A\003\022\024\n\007blocked\030\003 \001(\010B\003\340A\003\"" + + "b\n\017HarmProbability\022 \n\034HARM_PROBABILITY_U" + + "NSPECIFIED\020\000\022\016\n\nNEGLIGIBLE\020\001\022\007\n\003LOW\020\002\022\n\n" + + "\006MEDIUM\020\003\022\010\n\004HIGH\020\004\"\224\001\n\014HarmSeverity\022\035\n\031" + + "HARM_SEVERITY_UNSPECIFIED\020\000\022\034\n\030HARM_SEVE" + + "RITY_NEGLIGIBLE\020\001\022\025\n\021HARM_SEVERITY_LOW\020\002" + + "\022\030\n\024HARM_SEVERITY_MEDIUM\020\003\022\026\n\022HARM_SEVER" + + "ITY_HIGH\020\004\"P\n\020CitationMetadata\022<\n\tcitati" + + "ons\030\001 \003(\0132$.google.cloud.aiplatform.v1.C" + + "itationB\003\340A\003\"\252\001\n\010Citation\022\030\n\013start_index" + + "\030\001 \001(\005B\003\340A\003\022\026\n\tend_index\030\002 \001(\005B\003\340A\003\022\020\n\003u" + + "ri\030\003 \001(\tB\003\340A\003\022\022\n\005title\030\004 \001(\tB\003\340A\003\022\024\n\007lic" + + "ense\030\005 \001(\tB\003\340A\003\0220\n\020publication_date\030\006 \001(" + + "\0132\021.google.type.DateB\003\340A\003\"\346\004\n\tCandidate\022" + + "\022\n\005index\030\001 \001(\005B\003\340A\003\0229\n\007content\030\002 \001(\0132#.g" + + "oogle.cloud.aiplatform.v1.ContentB\003\340A\003\022N" + + "\n\rfinish_reason\030\003 \001(\01622.google.cloud.aip" + + "latform.v1.Candidate.FinishReasonB\003\340A\003\022E" + + "\n\016safety_ratings\030\004 \003(\0132(.google.cloud.ai" + + "platform.v1.SafetyRatingB\003\340A\003\022 \n\016finish_" + + "message\030\005 \001(\tB\003\340A\003H\000\210\001\001\022L\n\021citation_meta" + + "data\030\006 \001(\0132,.google.cloud.aiplatform.v1." + + "CitationMetadataB\003\340A\003\022N\n\022grounding_metad" + + "ata\030\007 \001(\0132-.google.cloud.aiplatform.v1.G" + + "roundingMetadataB\003\340A\003\"\237\001\n\014FinishReason\022\035" + + "\n\031FINISH_REASON_UNSPECIFIED\020\000\022\010\n\004STOP\020\001\022" + + "\016\n\nMAX_TOKENS\020\002\022\n\n\006SAFETY\020\003\022\016\n\nRECITATIO" + + "N\020\004\022\t\n\005OTHER\020\005\022\r\n\tBLOCKLIST\020\006\022\026\n\022PROHIBI" + + "TED_CONTENT\020\007\022\010\n\004SPII\020\010B\021\n\017_finish_messa" + + "ge\"T\n\007Segment\022\027\n\npart_index\030\001 \001(\005B\003\340A\003\022\030" + + "\n\013start_index\030\002 \001(\005B\003\340A\003\022\026\n\tend_index\030\003 " + + "\001(\005B\003\340A\003\"\221\002\n\024GroundingAttribution\022H\n\003web" + + "\030\003 \001(\01324.google.cloud.aiplatform.v1.Grou" + + "ndingAttribution.WebB\003\340A\001H\000\0229\n\007segment\030\001" + + " \001(\0132#.google.cloud.aiplatform.v1.Segmen" + + "tB\003\340A\003\022%\n\020confidence_score\030\002 \001(\002B\006\340A\001\340A\003" + + "H\001\210\001\001\032+\n\003Web\022\020\n\003uri\030\001 \001(\tB\003\340A\003\022\022\n\005title\030" + + "\002 \001(\tB\003\340A\003B\013\n\treferenceB\023\n\021_confidence_s" + + "core\"\213\001\n\021GroundingMetadata\022\037\n\022web_search" + + "_queries\030\001 \003(\tB\003\340A\001\022U\n\026grounding_attribu" + + "tions\030\002 \003(\01320.google.cloud.aiplatform.v1" + + ".GroundingAttributionB\003\340A\001*\264\001\n\014HarmCateg" + + "ory\022\035\n\031HARM_CATEGORY_UNSPECIFIED\020\000\022\035\n\031HA" + + "RM_CATEGORY_HATE_SPEECH\020\001\022#\n\037HARM_CATEGO" + + "RY_DANGEROUS_CONTENT\020\002\022\034\n\030HARM_CATEGORY_" + + "HARASSMENT\020\003\022#\n\037HARM_CATEGORY_SEXUALLY_E" + + "XPLICIT\020\004B\312\001\n\036com.google.cloud.aiplatfor" + + "m.v1B\014ContentProtoP\001Z>cloud.google.com/g" + + "o/aiplatform/apiv1/aiplatformpb;aiplatfo" + + "rmpb\252\002\032Google.Cloud.AIPlatform.V1\312\002\032Goog" + + "le\\Cloud\\AIPlatform\\V1\352\002\035Google::Cloud::" + + "AIPlatform::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -257,7 +265,15 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_GenerationConfig_descriptor, new java.lang.String[] { - "Temperature", "TopP", "TopK", "CandidateCount", "MaxOutputTokens", "StopSequences", + "Temperature", + "TopP", + "TopK", + "CandidateCount", + "MaxOutputTokens", + "StopSequences", + "PresencePenalty", + "FrequencyPenalty", + "ResponseMimeType", }); internal_static_google_cloud_aiplatform_v1_SafetySetting_descriptor = getDescriptor().getMessageTypes().get(6); @@ -265,7 +281,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_SafetySetting_descriptor, new java.lang.String[] { - "Category", "Threshold", + "Category", "Threshold", "Method", }); internal_static_google_cloud_aiplatform_v1_SafetyRating_descriptor = getDescriptor().getMessageTypes().get(7); diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateNotebookRuntimeTemplateOperationMetadata.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateNotebookRuntimeTemplateOperationMetadata.java new file mode 100644 index 000000000000..cde1145afd74 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateNotebookRuntimeTemplateOperationMetadata.java @@ -0,0 +1,762 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/notebook_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Metadata information for
+ * [NotebookService.CreateNotebookRuntimeTemplate][google.cloud.aiplatform.v1.NotebookService.CreateNotebookRuntimeTemplate].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateOperationMetadata} + */ +public final class CreateNotebookRuntimeTemplateOperationMetadata + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateOperationMetadata) + CreateNotebookRuntimeTemplateOperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateNotebookRuntimeTemplateOperationMetadata.newBuilder() to construct. + private CreateNotebookRuntimeTemplateOperationMetadata( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateNotebookRuntimeTemplateOperationMetadata() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateNotebookRuntimeTemplateOperationMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateNotebookRuntimeTemplateOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateNotebookRuntimeTemplateOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateOperationMetadata.class, + com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateOperationMetadata.Builder + .class); + } + + private int bitField0_; + public static final int GENERIC_METADATA_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1.GenericOperationMetadata genericMetadata_; + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + @java.lang.Override + public boolean hasGenericMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata() { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder() { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getGenericMetadata()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getGenericMetadata()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateOperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateOperationMetadata other = + (com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateOperationMetadata) obj; + + if (hasGenericMetadata() != other.hasGenericMetadata()) return false; + if (hasGenericMetadata()) { + if (!getGenericMetadata().equals(other.getGenericMetadata())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasGenericMetadata()) { + hash = (37 * hash) + GENERIC_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getGenericMetadata().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateOperationMetadata + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateOperationMetadata + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateOperationMetadata + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateOperationMetadata + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateOperationMetadata + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateOperationMetadata + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateOperationMetadata + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateOperationMetadata + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateOperationMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateOperationMetadata + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateOperationMetadata + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateOperationMetadata + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateOperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Metadata information for
+   * [NotebookService.CreateNotebookRuntimeTemplate][google.cloud.aiplatform.v1.NotebookService.CreateNotebookRuntimeTemplate].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateOperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateOperationMetadata) + com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateOperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateNotebookRuntimeTemplateOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateNotebookRuntimeTemplateOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateOperationMetadata.class, + com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateOperationMetadata.Builder + .class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateOperationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getGenericMetadataFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + genericMetadata_ = null; + if (genericMetadataBuilder_ != null) { + genericMetadataBuilder_.dispose(); + genericMetadataBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateNotebookRuntimeTemplateOperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateOperationMetadata + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateOperationMetadata + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateOperationMetadata build() { + com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateOperationMetadata result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateOperationMetadata + buildPartial() { + com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateOperationMetadata result = + new com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateOperationMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateOperationMetadata result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.genericMetadata_ = + genericMetadataBuilder_ == null ? genericMetadata_ : genericMetadataBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateOperationMetadata) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateOperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateOperationMetadata other) { + if (other + == com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateOperationMetadata + .getDefaultInstance()) return this; + if (other.hasGenericMetadata()) { + mergeGenericMetadata(other.getGenericMetadata()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getGenericMetadataFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.aiplatform.v1.GenericOperationMetadata genericMetadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder> + genericMetadataBuilder_; + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + public boolean hasGenericMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata() { + if (genericMetadataBuilder_ == null) { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } else { + return genericMetadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder setGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata value) { + if (genericMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + genericMetadata_ = value; + } else { + genericMetadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder setGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder builderForValue) { + if (genericMetadataBuilder_ == null) { + genericMetadata_ = builderForValue.build(); + } else { + genericMetadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder mergeGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata value) { + if (genericMetadataBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && genericMetadata_ != null + && genericMetadata_ + != com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance()) { + getGenericMetadataBuilder().mergeFrom(value); + } else { + genericMetadata_ = value; + } + } else { + genericMetadataBuilder_.mergeFrom(value); + } + if (genericMetadata_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder clearGenericMetadata() { + bitField0_ = (bitField0_ & ~0x00000001); + genericMetadata_ = null; + if (genericMetadataBuilder_ != null) { + genericMetadataBuilder_.dispose(); + genericMetadataBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder + getGenericMetadataBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getGenericMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder() { + if (genericMetadataBuilder_ != null) { + return genericMetadataBuilder_.getMessageOrBuilder(); + } else { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder> + getGenericMetadataFieldBuilder() { + if (genericMetadataBuilder_ == null) { + genericMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder>( + getGenericMetadata(), getParentForChildren(), isClean()); + genericMetadata_ = null; + } + return genericMetadataBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateOperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateOperationMetadata) + private static final com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateOperationMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateOperationMetadata(); + } + + public static com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateOperationMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateNotebookRuntimeTemplateOperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser + parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser + getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateOperationMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateNotebookRuntimeTemplateOperationMetadataOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateNotebookRuntimeTemplateOperationMetadataOrBuilder.java new file mode 100644 index 000000000000..b5c87dba3aa0 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateNotebookRuntimeTemplateOperationMetadataOrBuilder.java @@ -0,0 +1,61 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/notebook_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +public interface CreateNotebookRuntimeTemplateOperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateOperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + boolean hasGenericMetadata(); + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata(); + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder getGenericMetadataOrBuilder(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateNotebookRuntimeTemplateRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateNotebookRuntimeTemplateRequest.java new file mode 100644 index 000000000000..a8f7bb4404e1 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateNotebookRuntimeTemplateRequest.java @@ -0,0 +1,1165 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/notebook_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for
+ * [NotebookService.CreateNotebookRuntimeTemplate][google.cloud.aiplatform.v1.NotebookService.CreateNotebookRuntimeTemplate].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateRequest} + */ +public final class CreateNotebookRuntimeTemplateRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateRequest) + CreateNotebookRuntimeTemplateRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateNotebookRuntimeTemplateRequest.newBuilder() to construct. + private CreateNotebookRuntimeTemplateRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateNotebookRuntimeTemplateRequest() { + parent_ = ""; + notebookRuntimeTemplateId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateNotebookRuntimeTemplateRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateNotebookRuntimeTemplateRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateNotebookRuntimeTemplateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateRequest.class, + com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The resource name of the Location to create the
+   * NotebookRuntimeTemplate. Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the Location to create the
+   * NotebookRuntimeTemplate. Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NOTEBOOK_RUNTIME_TEMPLATE_FIELD_NUMBER = 2; + private com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate notebookRuntimeTemplate_; + /** + * + * + *
+   * Required. The NotebookRuntimeTemplate to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntimeTemplate notebook_runtime_template = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the notebookRuntimeTemplate field is set. + */ + @java.lang.Override + public boolean hasNotebookRuntimeTemplate() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. The NotebookRuntimeTemplate to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntimeTemplate notebook_runtime_template = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The notebookRuntimeTemplate. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate getNotebookRuntimeTemplate() { + return notebookRuntimeTemplate_ == null + ? com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate.getDefaultInstance() + : notebookRuntimeTemplate_; + } + /** + * + * + *
+   * Required. The NotebookRuntimeTemplate to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntimeTemplate notebook_runtime_template = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateOrBuilder + getNotebookRuntimeTemplateOrBuilder() { + return notebookRuntimeTemplate_ == null + ? com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate.getDefaultInstance() + : notebookRuntimeTemplate_; + } + + public static final int NOTEBOOK_RUNTIME_TEMPLATE_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object notebookRuntimeTemplateId_ = ""; + /** + * + * + *
+   * Optional. User specified ID for the notebook runtime template.
+   * 
+ * + * string notebook_runtime_template_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The notebookRuntimeTemplateId. + */ + @java.lang.Override + public java.lang.String getNotebookRuntimeTemplateId() { + java.lang.Object ref = notebookRuntimeTemplateId_; + 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(); + notebookRuntimeTemplateId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. User specified ID for the notebook runtime template.
+   * 
+ * + * string notebook_runtime_template_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for notebookRuntimeTemplateId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNotebookRuntimeTemplateIdBytes() { + java.lang.Object ref = notebookRuntimeTemplateId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + notebookRuntimeTemplateId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getNotebookRuntimeTemplate()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(notebookRuntimeTemplateId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, notebookRuntimeTemplateId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(2, getNotebookRuntimeTemplate()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(notebookRuntimeTemplateId_)) { + size += + com.google.protobuf.GeneratedMessageV3.computeStringSize(3, notebookRuntimeTemplateId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateRequest other = + (com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasNotebookRuntimeTemplate() != other.hasNotebookRuntimeTemplate()) return false; + if (hasNotebookRuntimeTemplate()) { + if (!getNotebookRuntimeTemplate().equals(other.getNotebookRuntimeTemplate())) return false; + } + if (!getNotebookRuntimeTemplateId().equals(other.getNotebookRuntimeTemplateId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasNotebookRuntimeTemplate()) { + hash = (37 * hash) + NOTEBOOK_RUNTIME_TEMPLATE_FIELD_NUMBER; + hash = (53 * hash) + getNotebookRuntimeTemplate().hashCode(); + } + hash = (37 * hash) + NOTEBOOK_RUNTIME_TEMPLATE_ID_FIELD_NUMBER; + hash = (53 * hash) + getNotebookRuntimeTemplateId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for
+   * [NotebookService.CreateNotebookRuntimeTemplate][google.cloud.aiplatform.v1.NotebookService.CreateNotebookRuntimeTemplate].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateRequest) + com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateNotebookRuntimeTemplateRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateNotebookRuntimeTemplateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateRequest.class, + com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateRequest.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getNotebookRuntimeTemplateFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + notebookRuntimeTemplate_ = null; + if (notebookRuntimeTemplateBuilder_ != null) { + notebookRuntimeTemplateBuilder_.dispose(); + notebookRuntimeTemplateBuilder_ = null; + } + notebookRuntimeTemplateId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateNotebookRuntimeTemplateRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateRequest + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateRequest build() { + com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateRequest buildPartial() { + com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateRequest result = + new com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.notebookRuntimeTemplate_ = + notebookRuntimeTemplateBuilder_ == null + ? notebookRuntimeTemplate_ + : notebookRuntimeTemplateBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.notebookRuntimeTemplateId_ = notebookRuntimeTemplateId_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateRequest) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateRequest other) { + if (other + == com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasNotebookRuntimeTemplate()) { + mergeNotebookRuntimeTemplate(other.getNotebookRuntimeTemplate()); + } + if (!other.getNotebookRuntimeTemplateId().isEmpty()) { + notebookRuntimeTemplateId_ = other.notebookRuntimeTemplateId_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + getNotebookRuntimeTemplateFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + notebookRuntimeTemplateId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of the Location to create the
+     * NotebookRuntimeTemplate. Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Location to create the
+     * NotebookRuntimeTemplate. Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Location to create the
+     * NotebookRuntimeTemplate. Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Location to create the
+     * NotebookRuntimeTemplate. Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Location to create the
+     * NotebookRuntimeTemplate. Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate notebookRuntimeTemplate_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate, + com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate.Builder, + com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateOrBuilder> + notebookRuntimeTemplateBuilder_; + /** + * + * + *
+     * Required. The NotebookRuntimeTemplate to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntimeTemplate notebook_runtime_template = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the notebookRuntimeTemplate field is set. + */ + public boolean hasNotebookRuntimeTemplate() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. The NotebookRuntimeTemplate to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntimeTemplate notebook_runtime_template = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The notebookRuntimeTemplate. + */ + public com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate getNotebookRuntimeTemplate() { + if (notebookRuntimeTemplateBuilder_ == null) { + return notebookRuntimeTemplate_ == null + ? com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate.getDefaultInstance() + : notebookRuntimeTemplate_; + } else { + return notebookRuntimeTemplateBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The NotebookRuntimeTemplate to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntimeTemplate notebook_runtime_template = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setNotebookRuntimeTemplate( + com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate value) { + if (notebookRuntimeTemplateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + notebookRuntimeTemplate_ = value; + } else { + notebookRuntimeTemplateBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The NotebookRuntimeTemplate to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntimeTemplate notebook_runtime_template = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setNotebookRuntimeTemplate( + com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate.Builder builderForValue) { + if (notebookRuntimeTemplateBuilder_ == null) { + notebookRuntimeTemplate_ = builderForValue.build(); + } else { + notebookRuntimeTemplateBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The NotebookRuntimeTemplate to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntimeTemplate notebook_runtime_template = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeNotebookRuntimeTemplate( + com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate value) { + if (notebookRuntimeTemplateBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && notebookRuntimeTemplate_ != null + && notebookRuntimeTemplate_ + != com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate.getDefaultInstance()) { + getNotebookRuntimeTemplateBuilder().mergeFrom(value); + } else { + notebookRuntimeTemplate_ = value; + } + } else { + notebookRuntimeTemplateBuilder_.mergeFrom(value); + } + if (notebookRuntimeTemplate_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. The NotebookRuntimeTemplate to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntimeTemplate notebook_runtime_template = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearNotebookRuntimeTemplate() { + bitField0_ = (bitField0_ & ~0x00000002); + notebookRuntimeTemplate_ = null; + if (notebookRuntimeTemplateBuilder_ != null) { + notebookRuntimeTemplateBuilder_.dispose(); + notebookRuntimeTemplateBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The NotebookRuntimeTemplate to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntimeTemplate notebook_runtime_template = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate.Builder + getNotebookRuntimeTemplateBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getNotebookRuntimeTemplateFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The NotebookRuntimeTemplate to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntimeTemplate notebook_runtime_template = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateOrBuilder + getNotebookRuntimeTemplateOrBuilder() { + if (notebookRuntimeTemplateBuilder_ != null) { + return notebookRuntimeTemplateBuilder_.getMessageOrBuilder(); + } else { + return notebookRuntimeTemplate_ == null + ? com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate.getDefaultInstance() + : notebookRuntimeTemplate_; + } + } + /** + * + * + *
+     * Required. The NotebookRuntimeTemplate to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntimeTemplate notebook_runtime_template = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate, + com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate.Builder, + com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateOrBuilder> + getNotebookRuntimeTemplateFieldBuilder() { + if (notebookRuntimeTemplateBuilder_ == null) { + notebookRuntimeTemplateBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate, + com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate.Builder, + com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateOrBuilder>( + getNotebookRuntimeTemplate(), getParentForChildren(), isClean()); + notebookRuntimeTemplate_ = null; + } + return notebookRuntimeTemplateBuilder_; + } + + private java.lang.Object notebookRuntimeTemplateId_ = ""; + /** + * + * + *
+     * Optional. User specified ID for the notebook runtime template.
+     * 
+ * + * string notebook_runtime_template_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The notebookRuntimeTemplateId. + */ + public java.lang.String getNotebookRuntimeTemplateId() { + java.lang.Object ref = notebookRuntimeTemplateId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + notebookRuntimeTemplateId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. User specified ID for the notebook runtime template.
+     * 
+ * + * string notebook_runtime_template_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The bytes for notebookRuntimeTemplateId. + */ + public com.google.protobuf.ByteString getNotebookRuntimeTemplateIdBytes() { + java.lang.Object ref = notebookRuntimeTemplateId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + notebookRuntimeTemplateId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. User specified ID for the notebook runtime template.
+     * 
+ * + * string notebook_runtime_template_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The notebookRuntimeTemplateId to set. + * @return This builder for chaining. + */ + public Builder setNotebookRuntimeTemplateId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + notebookRuntimeTemplateId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. User specified ID for the notebook runtime template.
+     * 
+ * + * string notebook_runtime_template_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearNotebookRuntimeTemplateId() { + notebookRuntimeTemplateId_ = getDefaultInstance().getNotebookRuntimeTemplateId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. User specified ID for the notebook runtime template.
+     * 
+ * + * string notebook_runtime_template_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes for notebookRuntimeTemplateId to set. + * @return This builder for chaining. + */ + public Builder setNotebookRuntimeTemplateIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + notebookRuntimeTemplateId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateRequest) + private static final com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateRequest(); + } + + public static com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateNotebookRuntimeTemplateRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateNotebookRuntimeTemplateRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateNotebookRuntimeTemplateRequestOrBuilder.java new file mode 100644 index 000000000000..076d1f2fc6b2 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateNotebookRuntimeTemplateRequestOrBuilder.java @@ -0,0 +1,124 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/notebook_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +public interface CreateNotebookRuntimeTemplateRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the Location to create the
+   * NotebookRuntimeTemplate. Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The resource name of the Location to create the
+   * NotebookRuntimeTemplate. Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The NotebookRuntimeTemplate to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntimeTemplate notebook_runtime_template = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the notebookRuntimeTemplate field is set. + */ + boolean hasNotebookRuntimeTemplate(); + /** + * + * + *
+   * Required. The NotebookRuntimeTemplate to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntimeTemplate notebook_runtime_template = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The notebookRuntimeTemplate. + */ + com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate getNotebookRuntimeTemplate(); + /** + * + * + *
+   * Required. The NotebookRuntimeTemplate to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntimeTemplate notebook_runtime_template = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateOrBuilder + getNotebookRuntimeTemplateOrBuilder(); + + /** + * + * + *
+   * Optional. User specified ID for the notebook runtime template.
+   * 
+ * + * string notebook_runtime_template_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The notebookRuntimeTemplateId. + */ + java.lang.String getNotebookRuntimeTemplateId(); + /** + * + * + *
+   * Optional. User specified ID for the notebook runtime template.
+   * 
+ * + * string notebook_runtime_template_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for notebookRuntimeTemplateId. + */ + com.google.protobuf.ByteString getNotebookRuntimeTemplateIdBytes(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreatePersistentResourceOperationMetadata.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreatePersistentResourceOperationMetadata.java new file mode 100644 index 000000000000..a0d13f745608 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreatePersistentResourceOperationMetadata.java @@ -0,0 +1,933 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/persistent_resource_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Details of operations that perform create PersistentResource.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CreatePersistentResourceOperationMetadata} + */ +public final class CreatePersistentResourceOperationMetadata + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.CreatePersistentResourceOperationMetadata) + CreatePersistentResourceOperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreatePersistentResourceOperationMetadata.newBuilder() to construct. + private CreatePersistentResourceOperationMetadata( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreatePersistentResourceOperationMetadata() { + progressMessage_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreatePersistentResourceOperationMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.PersistentResourceServiceProto + .internal_static_google_cloud_aiplatform_v1_CreatePersistentResourceOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.PersistentResourceServiceProto + .internal_static_google_cloud_aiplatform_v1_CreatePersistentResourceOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CreatePersistentResourceOperationMetadata.class, + com.google.cloud.aiplatform.v1.CreatePersistentResourceOperationMetadata.Builder.class); + } + + private int bitField0_; + public static final int GENERIC_METADATA_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1.GenericOperationMetadata genericMetadata_; + /** + * + * + *
+   * Operation metadata for PersistentResource.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + @java.lang.Override + public boolean hasGenericMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Operation metadata for PersistentResource.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata() { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + /** + * + * + *
+   * Operation metadata for PersistentResource.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder() { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + + public static final int PROGRESS_MESSAGE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object progressMessage_ = ""; + /** + * + * + *
+   * Progress Message for Create LRO
+   * 
+ * + * string progress_message = 2; + * + * @return The progressMessage. + */ + @java.lang.Override + public java.lang.String getProgressMessage() { + java.lang.Object ref = progressMessage_; + 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(); + progressMessage_ = s; + return s; + } + } + /** + * + * + *
+   * Progress Message for Create LRO
+   * 
+ * + * string progress_message = 2; + * + * @return The bytes for progressMessage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProgressMessageBytes() { + java.lang.Object ref = progressMessage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + progressMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getGenericMetadata()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(progressMessage_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, progressMessage_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getGenericMetadata()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(progressMessage_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, progressMessage_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.aiplatform.v1.CreatePersistentResourceOperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.CreatePersistentResourceOperationMetadata other = + (com.google.cloud.aiplatform.v1.CreatePersistentResourceOperationMetadata) obj; + + if (hasGenericMetadata() != other.hasGenericMetadata()) return false; + if (hasGenericMetadata()) { + if (!getGenericMetadata().equals(other.getGenericMetadata())) return false; + } + if (!getProgressMessage().equals(other.getProgressMessage())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasGenericMetadata()) { + hash = (37 * hash) + GENERIC_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getGenericMetadata().hashCode(); + } + hash = (37 * hash) + PROGRESS_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getProgressMessage().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.CreatePersistentResourceOperationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CreatePersistentResourceOperationMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CreatePersistentResourceOperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CreatePersistentResourceOperationMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CreatePersistentResourceOperationMetadata parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CreatePersistentResourceOperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CreatePersistentResourceOperationMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CreatePersistentResourceOperationMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CreatePersistentResourceOperationMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CreatePersistentResourceOperationMetadata + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CreatePersistentResourceOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CreatePersistentResourceOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.CreatePersistentResourceOperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Details of operations that perform create PersistentResource.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CreatePersistentResourceOperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.CreatePersistentResourceOperationMetadata) + com.google.cloud.aiplatform.v1.CreatePersistentResourceOperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.PersistentResourceServiceProto + .internal_static_google_cloud_aiplatform_v1_CreatePersistentResourceOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.PersistentResourceServiceProto + .internal_static_google_cloud_aiplatform_v1_CreatePersistentResourceOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CreatePersistentResourceOperationMetadata.class, + com.google.cloud.aiplatform.v1.CreatePersistentResourceOperationMetadata.Builder + .class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.CreatePersistentResourceOperationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getGenericMetadataFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + genericMetadata_ = null; + if (genericMetadataBuilder_ != null) { + genericMetadataBuilder_.dispose(); + genericMetadataBuilder_ = null; + } + progressMessage_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.PersistentResourceServiceProto + .internal_static_google_cloud_aiplatform_v1_CreatePersistentResourceOperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreatePersistentResourceOperationMetadata + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.CreatePersistentResourceOperationMetadata + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreatePersistentResourceOperationMetadata build() { + com.google.cloud.aiplatform.v1.CreatePersistentResourceOperationMetadata result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreatePersistentResourceOperationMetadata buildPartial() { + com.google.cloud.aiplatform.v1.CreatePersistentResourceOperationMetadata result = + new com.google.cloud.aiplatform.v1.CreatePersistentResourceOperationMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1.CreatePersistentResourceOperationMetadata result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.genericMetadata_ = + genericMetadataBuilder_ == null ? genericMetadata_ : genericMetadataBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.progressMessage_ = progressMessage_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.aiplatform.v1.CreatePersistentResourceOperationMetadata) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.CreatePersistentResourceOperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.CreatePersistentResourceOperationMetadata other) { + if (other + == com.google.cloud.aiplatform.v1.CreatePersistentResourceOperationMetadata + .getDefaultInstance()) return this; + if (other.hasGenericMetadata()) { + mergeGenericMetadata(other.getGenericMetadata()); + } + if (!other.getProgressMessage().isEmpty()) { + progressMessage_ = other.progressMessage_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getGenericMetadataFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + progressMessage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.aiplatform.v1.GenericOperationMetadata genericMetadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder> + genericMetadataBuilder_; + /** + * + * + *
+     * Operation metadata for PersistentResource.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + public boolean hasGenericMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Operation metadata for PersistentResource.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata() { + if (genericMetadataBuilder_ == null) { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } else { + return genericMetadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Operation metadata for PersistentResource.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder setGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata value) { + if (genericMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + genericMetadata_ = value; + } else { + genericMetadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation metadata for PersistentResource.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder setGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder builderForValue) { + if (genericMetadataBuilder_ == null) { + genericMetadata_ = builderForValue.build(); + } else { + genericMetadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation metadata for PersistentResource.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder mergeGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata value) { + if (genericMetadataBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && genericMetadata_ != null + && genericMetadata_ + != com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance()) { + getGenericMetadataBuilder().mergeFrom(value); + } else { + genericMetadata_ = value; + } + } else { + genericMetadataBuilder_.mergeFrom(value); + } + if (genericMetadata_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Operation metadata for PersistentResource.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder clearGenericMetadata() { + bitField0_ = (bitField0_ & ~0x00000001); + genericMetadata_ = null; + if (genericMetadataBuilder_ != null) { + genericMetadataBuilder_.dispose(); + genericMetadataBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Operation metadata for PersistentResource.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder + getGenericMetadataBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getGenericMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Operation metadata for PersistentResource.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder() { + if (genericMetadataBuilder_ != null) { + return genericMetadataBuilder_.getMessageOrBuilder(); + } else { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + } + /** + * + * + *
+     * Operation metadata for PersistentResource.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder> + getGenericMetadataFieldBuilder() { + if (genericMetadataBuilder_ == null) { + genericMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder>( + getGenericMetadata(), getParentForChildren(), isClean()); + genericMetadata_ = null; + } + return genericMetadataBuilder_; + } + + private java.lang.Object progressMessage_ = ""; + /** + * + * + *
+     * Progress Message for Create LRO
+     * 
+ * + * string progress_message = 2; + * + * @return The progressMessage. + */ + public java.lang.String getProgressMessage() { + java.lang.Object ref = progressMessage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + progressMessage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Progress Message for Create LRO
+     * 
+ * + * string progress_message = 2; + * + * @return The bytes for progressMessage. + */ + public com.google.protobuf.ByteString getProgressMessageBytes() { + java.lang.Object ref = progressMessage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + progressMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Progress Message for Create LRO
+     * 
+ * + * string progress_message = 2; + * + * @param value The progressMessage to set. + * @return This builder for chaining. + */ + public Builder setProgressMessage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + progressMessage_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Progress Message for Create LRO
+     * 
+ * + * string progress_message = 2; + * + * @return This builder for chaining. + */ + public Builder clearProgressMessage() { + progressMessage_ = getDefaultInstance().getProgressMessage(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Progress Message for Create LRO
+     * 
+ * + * string progress_message = 2; + * + * @param value The bytes for progressMessage to set. + * @return This builder for chaining. + */ + public Builder setProgressMessageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + progressMessage_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.CreatePersistentResourceOperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.CreatePersistentResourceOperationMetadata) + private static final com.google.cloud.aiplatform.v1.CreatePersistentResourceOperationMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.CreatePersistentResourceOperationMetadata(); + } + + public static com.google.cloud.aiplatform.v1.CreatePersistentResourceOperationMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreatePersistentResourceOperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreatePersistentResourceOperationMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreatePersistentResourceOperationMetadataOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreatePersistentResourceOperationMetadataOrBuilder.java new file mode 100644 index 000000000000..c5c249b3a2f5 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreatePersistentResourceOperationMetadataOrBuilder.java @@ -0,0 +1,86 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/persistent_resource_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +public interface CreatePersistentResourceOperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.CreatePersistentResourceOperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Operation metadata for PersistentResource.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + boolean hasGenericMetadata(); + /** + * + * + *
+   * Operation metadata for PersistentResource.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata(); + /** + * + * + *
+   * Operation metadata for PersistentResource.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder getGenericMetadataOrBuilder(); + + /** + * + * + *
+   * Progress Message for Create LRO
+   * 
+ * + * string progress_message = 2; + * + * @return The progressMessage. + */ + java.lang.String getProgressMessage(); + /** + * + * + *
+   * Progress Message for Create LRO
+   * 
+ * + * string progress_message = 2; + * + * @return The bytes for progressMessage. + */ + com.google.protobuf.ByteString getProgressMessageBytes(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreatePersistentResourceRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreatePersistentResourceRequest.java new file mode 100644 index 000000000000..2ad37bdff001 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreatePersistentResourceRequest.java @@ -0,0 +1,1179 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/persistent_resource_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for
+ * [PersistentResourceService.CreatePersistentResource][google.cloud.aiplatform.v1.PersistentResourceService.CreatePersistentResource].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CreatePersistentResourceRequest} + */ +public final class CreatePersistentResourceRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.CreatePersistentResourceRequest) + CreatePersistentResourceRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreatePersistentResourceRequest.newBuilder() to construct. + private CreatePersistentResourceRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreatePersistentResourceRequest() { + parent_ = ""; + persistentResourceId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreatePersistentResourceRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.PersistentResourceServiceProto + .internal_static_google_cloud_aiplatform_v1_CreatePersistentResourceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.PersistentResourceServiceProto + .internal_static_google_cloud_aiplatform_v1_CreatePersistentResourceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CreatePersistentResourceRequest.class, + com.google.cloud.aiplatform.v1.CreatePersistentResourceRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The resource name of the Location to create the
+   * PersistentResource in. Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the Location to create the
+   * PersistentResource in. Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PERSISTENT_RESOURCE_FIELD_NUMBER = 2; + private com.google.cloud.aiplatform.v1.PersistentResource persistentResource_; + /** + * + * + *
+   * Required. The PersistentResource to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.PersistentResource persistent_resource = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the persistentResource field is set. + */ + @java.lang.Override + public boolean hasPersistentResource() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. The PersistentResource to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.PersistentResource persistent_resource = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The persistentResource. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.PersistentResource getPersistentResource() { + return persistentResource_ == null + ? com.google.cloud.aiplatform.v1.PersistentResource.getDefaultInstance() + : persistentResource_; + } + /** + * + * + *
+   * Required. The PersistentResource to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.PersistentResource persistent_resource = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.PersistentResourceOrBuilder + getPersistentResourceOrBuilder() { + return persistentResource_ == null + ? com.google.cloud.aiplatform.v1.PersistentResource.getDefaultInstance() + : persistentResource_; + } + + public static final int PERSISTENT_RESOURCE_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object persistentResourceId_ = ""; + /** + * + * + *
+   * Required. The ID to use for the PersistentResource, which become the final
+   * component of the PersistentResource's resource name.
+   *
+   * The maximum length is 63 characters, and valid characters
+   * are `/^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$/`.
+   * 
+ * + * string persistent_resource_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The persistentResourceId. + */ + @java.lang.Override + public java.lang.String getPersistentResourceId() { + java.lang.Object ref = persistentResourceId_; + 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(); + persistentResourceId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The ID to use for the PersistentResource, which become the final
+   * component of the PersistentResource's resource name.
+   *
+   * The maximum length is 63 characters, and valid characters
+   * are `/^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$/`.
+   * 
+ * + * string persistent_resource_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for persistentResourceId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPersistentResourceIdBytes() { + java.lang.Object ref = persistentResourceId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + persistentResourceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getPersistentResource()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(persistentResourceId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, persistentResourceId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getPersistentResource()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(persistentResourceId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, persistentResourceId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.CreatePersistentResourceRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.CreatePersistentResourceRequest other = + (com.google.cloud.aiplatform.v1.CreatePersistentResourceRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasPersistentResource() != other.hasPersistentResource()) return false; + if (hasPersistentResource()) { + if (!getPersistentResource().equals(other.getPersistentResource())) return false; + } + if (!getPersistentResourceId().equals(other.getPersistentResourceId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasPersistentResource()) { + hash = (37 * hash) + PERSISTENT_RESOURCE_FIELD_NUMBER; + hash = (53 * hash) + getPersistentResource().hashCode(); + } + hash = (37 * hash) + PERSISTENT_RESOURCE_ID_FIELD_NUMBER; + hash = (53 * hash) + getPersistentResourceId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.CreatePersistentResourceRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CreatePersistentResourceRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CreatePersistentResourceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CreatePersistentResourceRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CreatePersistentResourceRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CreatePersistentResourceRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CreatePersistentResourceRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CreatePersistentResourceRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CreatePersistentResourceRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CreatePersistentResourceRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CreatePersistentResourceRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CreatePersistentResourceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.CreatePersistentResourceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for
+   * [PersistentResourceService.CreatePersistentResource][google.cloud.aiplatform.v1.PersistentResourceService.CreatePersistentResource].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CreatePersistentResourceRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.CreatePersistentResourceRequest) + com.google.cloud.aiplatform.v1.CreatePersistentResourceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.PersistentResourceServiceProto + .internal_static_google_cloud_aiplatform_v1_CreatePersistentResourceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.PersistentResourceServiceProto + .internal_static_google_cloud_aiplatform_v1_CreatePersistentResourceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CreatePersistentResourceRequest.class, + com.google.cloud.aiplatform.v1.CreatePersistentResourceRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.CreatePersistentResourceRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPersistentResourceFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + persistentResource_ = null; + if (persistentResourceBuilder_ != null) { + persistentResourceBuilder_.dispose(); + persistentResourceBuilder_ = null; + } + persistentResourceId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.PersistentResourceServiceProto + .internal_static_google_cloud_aiplatform_v1_CreatePersistentResourceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreatePersistentResourceRequest + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.CreatePersistentResourceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreatePersistentResourceRequest build() { + com.google.cloud.aiplatform.v1.CreatePersistentResourceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreatePersistentResourceRequest buildPartial() { + com.google.cloud.aiplatform.v1.CreatePersistentResourceRequest result = + new com.google.cloud.aiplatform.v1.CreatePersistentResourceRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1.CreatePersistentResourceRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.persistentResource_ = + persistentResourceBuilder_ == null + ? persistentResource_ + : persistentResourceBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.persistentResourceId_ = persistentResourceId_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.CreatePersistentResourceRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.CreatePersistentResourceRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.CreatePersistentResourceRequest other) { + if (other + == com.google.cloud.aiplatform.v1.CreatePersistentResourceRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasPersistentResource()) { + mergePersistentResource(other.getPersistentResource()); + } + if (!other.getPersistentResourceId().isEmpty()) { + persistentResourceId_ = other.persistentResourceId_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + getPersistentResourceFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + persistentResourceId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of the Location to create the
+     * PersistentResource in. Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Location to create the
+     * PersistentResource in. Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Location to create the
+     * PersistentResource in. Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Location to create the
+     * PersistentResource in. Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Location to create the
+     * PersistentResource in. Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.cloud.aiplatform.v1.PersistentResource persistentResource_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.PersistentResource, + com.google.cloud.aiplatform.v1.PersistentResource.Builder, + com.google.cloud.aiplatform.v1.PersistentResourceOrBuilder> + persistentResourceBuilder_; + /** + * + * + *
+     * Required. The PersistentResource to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.PersistentResource persistent_resource = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the persistentResource field is set. + */ + public boolean hasPersistentResource() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. The PersistentResource to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.PersistentResource persistent_resource = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The persistentResource. + */ + public com.google.cloud.aiplatform.v1.PersistentResource getPersistentResource() { + if (persistentResourceBuilder_ == null) { + return persistentResource_ == null + ? com.google.cloud.aiplatform.v1.PersistentResource.getDefaultInstance() + : persistentResource_; + } else { + return persistentResourceBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The PersistentResource to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.PersistentResource persistent_resource = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPersistentResource(com.google.cloud.aiplatform.v1.PersistentResource value) { + if (persistentResourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + persistentResource_ = value; + } else { + persistentResourceBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The PersistentResource to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.PersistentResource persistent_resource = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPersistentResource( + com.google.cloud.aiplatform.v1.PersistentResource.Builder builderForValue) { + if (persistentResourceBuilder_ == null) { + persistentResource_ = builderForValue.build(); + } else { + persistentResourceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The PersistentResource to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.PersistentResource persistent_resource = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergePersistentResource( + com.google.cloud.aiplatform.v1.PersistentResource value) { + if (persistentResourceBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && persistentResource_ != null + && persistentResource_ + != com.google.cloud.aiplatform.v1.PersistentResource.getDefaultInstance()) { + getPersistentResourceBuilder().mergeFrom(value); + } else { + persistentResource_ = value; + } + } else { + persistentResourceBuilder_.mergeFrom(value); + } + if (persistentResource_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. The PersistentResource to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.PersistentResource persistent_resource = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearPersistentResource() { + bitField0_ = (bitField0_ & ~0x00000002); + persistentResource_ = null; + if (persistentResourceBuilder_ != null) { + persistentResourceBuilder_.dispose(); + persistentResourceBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The PersistentResource to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.PersistentResource persistent_resource = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.PersistentResource.Builder + getPersistentResourceBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getPersistentResourceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The PersistentResource to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.PersistentResource persistent_resource = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.PersistentResourceOrBuilder + getPersistentResourceOrBuilder() { + if (persistentResourceBuilder_ != null) { + return persistentResourceBuilder_.getMessageOrBuilder(); + } else { + return persistentResource_ == null + ? com.google.cloud.aiplatform.v1.PersistentResource.getDefaultInstance() + : persistentResource_; + } + } + /** + * + * + *
+     * Required. The PersistentResource to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.PersistentResource persistent_resource = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.PersistentResource, + com.google.cloud.aiplatform.v1.PersistentResource.Builder, + com.google.cloud.aiplatform.v1.PersistentResourceOrBuilder> + getPersistentResourceFieldBuilder() { + if (persistentResourceBuilder_ == null) { + persistentResourceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.PersistentResource, + com.google.cloud.aiplatform.v1.PersistentResource.Builder, + com.google.cloud.aiplatform.v1.PersistentResourceOrBuilder>( + getPersistentResource(), getParentForChildren(), isClean()); + persistentResource_ = null; + } + return persistentResourceBuilder_; + } + + private java.lang.Object persistentResourceId_ = ""; + /** + * + * + *
+     * Required. The ID to use for the PersistentResource, which become the final
+     * component of the PersistentResource's resource name.
+     *
+     * The maximum length is 63 characters, and valid characters
+     * are `/^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$/`.
+     * 
+ * + * string persistent_resource_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The persistentResourceId. + */ + public java.lang.String getPersistentResourceId() { + java.lang.Object ref = persistentResourceId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + persistentResourceId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The ID to use for the PersistentResource, which become the final
+     * component of the PersistentResource's resource name.
+     *
+     * The maximum length is 63 characters, and valid characters
+     * are `/^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$/`.
+     * 
+ * + * string persistent_resource_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for persistentResourceId. + */ + public com.google.protobuf.ByteString getPersistentResourceIdBytes() { + java.lang.Object ref = persistentResourceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + persistentResourceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The ID to use for the PersistentResource, which become the final
+     * component of the PersistentResource's resource name.
+     *
+     * The maximum length is 63 characters, and valid characters
+     * are `/^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$/`.
+     * 
+ * + * string persistent_resource_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The persistentResourceId to set. + * @return This builder for chaining. + */ + public Builder setPersistentResourceId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + persistentResourceId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The ID to use for the PersistentResource, which become the final
+     * component of the PersistentResource's resource name.
+     *
+     * The maximum length is 63 characters, and valid characters
+     * are `/^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$/`.
+     * 
+ * + * string persistent_resource_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearPersistentResourceId() { + persistentResourceId_ = getDefaultInstance().getPersistentResourceId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The ID to use for the PersistentResource, which become the final
+     * component of the PersistentResource's resource name.
+     *
+     * The maximum length is 63 characters, and valid characters
+     * are `/^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$/`.
+     * 
+ * + * string persistent_resource_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for persistentResourceId to set. + * @return This builder for chaining. + */ + public Builder setPersistentResourceIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + persistentResourceId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.CreatePersistentResourceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.CreatePersistentResourceRequest) + private static final com.google.cloud.aiplatform.v1.CreatePersistentResourceRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.CreatePersistentResourceRequest(); + } + + public static com.google.cloud.aiplatform.v1.CreatePersistentResourceRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreatePersistentResourceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreatePersistentResourceRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreatePersistentResourceRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreatePersistentResourceRequestOrBuilder.java new file mode 100644 index 000000000000..39dc30217d22 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreatePersistentResourceRequestOrBuilder.java @@ -0,0 +1,131 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/persistent_resource_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +public interface CreatePersistentResourceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.CreatePersistentResourceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the Location to create the
+   * PersistentResource in. Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The resource name of the Location to create the
+   * PersistentResource in. Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The PersistentResource to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.PersistentResource persistent_resource = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the persistentResource field is set. + */ + boolean hasPersistentResource(); + /** + * + * + *
+   * Required. The PersistentResource to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.PersistentResource persistent_resource = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The persistentResource. + */ + com.google.cloud.aiplatform.v1.PersistentResource getPersistentResource(); + /** + * + * + *
+   * Required. The PersistentResource to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.PersistentResource persistent_resource = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1.PersistentResourceOrBuilder getPersistentResourceOrBuilder(); + + /** + * + * + *
+   * Required. The ID to use for the PersistentResource, which become the final
+   * component of the PersistentResource's resource name.
+   *
+   * The maximum length is 63 characters, and valid characters
+   * are `/^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$/`.
+   * 
+ * + * string persistent_resource_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The persistentResourceId. + */ + java.lang.String getPersistentResourceId(); + /** + * + * + *
+   * Required. The ID to use for the PersistentResource, which become the final
+   * component of the PersistentResource's resource name.
+   *
+   * The maximum length is 63 characters, and valid characters
+   * are `/^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$/`.
+   * 
+ * + * string persistent_resource_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for persistentResourceId. + */ + com.google.protobuf.ByteString getPersistentResourceIdBytes(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateTuningJobRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateTuningJobRequest.java new file mode 100644 index 000000000000..9c868479490a --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateTuningJobRequest.java @@ -0,0 +1,952 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/genai_tuning_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for
+ * [GenAiTuningService.CreateTuningJob][google.cloud.aiplatform.v1.GenAiTuningService.CreateTuningJob].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CreateTuningJobRequest} + */ +public final class CreateTuningJobRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.CreateTuningJobRequest) + CreateTuningJobRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateTuningJobRequest.newBuilder() to construct. + private CreateTuningJobRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateTuningJobRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateTuningJobRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.GenAiTuningServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateTuningJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.GenAiTuningServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateTuningJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CreateTuningJobRequest.class, + com.google.cloud.aiplatform.v1.CreateTuningJobRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The resource name of the Location to create the TuningJob in.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the Location to create the TuningJob in.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TUNING_JOB_FIELD_NUMBER = 2; + private com.google.cloud.aiplatform.v1.TuningJob tuningJob_; + /** + * + * + *
+   * Required. The TuningJob to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.TuningJob tuning_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the tuningJob field is set. + */ + @java.lang.Override + public boolean hasTuningJob() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. The TuningJob to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.TuningJob tuning_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The tuningJob. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.TuningJob getTuningJob() { + return tuningJob_ == null + ? com.google.cloud.aiplatform.v1.TuningJob.getDefaultInstance() + : tuningJob_; + } + /** + * + * + *
+   * Required. The TuningJob to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.TuningJob tuning_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.TuningJobOrBuilder getTuningJobOrBuilder() { + return tuningJob_ == null + ? com.google.cloud.aiplatform.v1.TuningJob.getDefaultInstance() + : tuningJob_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getTuningJob()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getTuningJob()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.CreateTuningJobRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.CreateTuningJobRequest other = + (com.google.cloud.aiplatform.v1.CreateTuningJobRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasTuningJob() != other.hasTuningJob()) return false; + if (hasTuningJob()) { + if (!getTuningJob().equals(other.getTuningJob())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasTuningJob()) { + hash = (37 * hash) + TUNING_JOB_FIELD_NUMBER; + hash = (53 * hash) + getTuningJob().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.CreateTuningJobRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CreateTuningJobRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CreateTuningJobRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CreateTuningJobRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CreateTuningJobRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CreateTuningJobRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CreateTuningJobRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CreateTuningJobRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CreateTuningJobRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CreateTuningJobRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CreateTuningJobRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CreateTuningJobRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.CreateTuningJobRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for
+   * [GenAiTuningService.CreateTuningJob][google.cloud.aiplatform.v1.GenAiTuningService.CreateTuningJob].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CreateTuningJobRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.CreateTuningJobRequest) + com.google.cloud.aiplatform.v1.CreateTuningJobRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.GenAiTuningServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateTuningJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.GenAiTuningServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateTuningJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CreateTuningJobRequest.class, + com.google.cloud.aiplatform.v1.CreateTuningJobRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.CreateTuningJobRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getTuningJobFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + tuningJob_ = null; + if (tuningJobBuilder_ != null) { + tuningJobBuilder_.dispose(); + tuningJobBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.GenAiTuningServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateTuningJobRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreateTuningJobRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.CreateTuningJobRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreateTuningJobRequest build() { + com.google.cloud.aiplatform.v1.CreateTuningJobRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreateTuningJobRequest buildPartial() { + com.google.cloud.aiplatform.v1.CreateTuningJobRequest result = + new com.google.cloud.aiplatform.v1.CreateTuningJobRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.CreateTuningJobRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.tuningJob_ = tuningJobBuilder_ == null ? tuningJob_ : tuningJobBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.CreateTuningJobRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.CreateTuningJobRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.CreateTuningJobRequest other) { + if (other == com.google.cloud.aiplatform.v1.CreateTuningJobRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasTuningJob()) { + mergeTuningJob(other.getTuningJob()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getTuningJobFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of the Location to create the TuningJob in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Location to create the TuningJob in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Location to create the TuningJob in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Location to create the TuningJob in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Location to create the TuningJob in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.cloud.aiplatform.v1.TuningJob tuningJob_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.TuningJob, + com.google.cloud.aiplatform.v1.TuningJob.Builder, + com.google.cloud.aiplatform.v1.TuningJobOrBuilder> + tuningJobBuilder_; + /** + * + * + *
+     * Required. The TuningJob to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.TuningJob tuning_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the tuningJob field is set. + */ + public boolean hasTuningJob() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. The TuningJob to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.TuningJob tuning_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The tuningJob. + */ + public com.google.cloud.aiplatform.v1.TuningJob getTuningJob() { + if (tuningJobBuilder_ == null) { + return tuningJob_ == null + ? com.google.cloud.aiplatform.v1.TuningJob.getDefaultInstance() + : tuningJob_; + } else { + return tuningJobBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The TuningJob to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.TuningJob tuning_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTuningJob(com.google.cloud.aiplatform.v1.TuningJob value) { + if (tuningJobBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + tuningJob_ = value; + } else { + tuningJobBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The TuningJob to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.TuningJob tuning_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTuningJob(com.google.cloud.aiplatform.v1.TuningJob.Builder builderForValue) { + if (tuningJobBuilder_ == null) { + tuningJob_ = builderForValue.build(); + } else { + tuningJobBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The TuningJob to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.TuningJob tuning_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeTuningJob(com.google.cloud.aiplatform.v1.TuningJob value) { + if (tuningJobBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && tuningJob_ != null + && tuningJob_ != com.google.cloud.aiplatform.v1.TuningJob.getDefaultInstance()) { + getTuningJobBuilder().mergeFrom(value); + } else { + tuningJob_ = value; + } + } else { + tuningJobBuilder_.mergeFrom(value); + } + if (tuningJob_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. The TuningJob to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.TuningJob tuning_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearTuningJob() { + bitField0_ = (bitField0_ & ~0x00000002); + tuningJob_ = null; + if (tuningJobBuilder_ != null) { + tuningJobBuilder_.dispose(); + tuningJobBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The TuningJob to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.TuningJob tuning_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.TuningJob.Builder getTuningJobBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getTuningJobFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The TuningJob to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.TuningJob tuning_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.TuningJobOrBuilder getTuningJobOrBuilder() { + if (tuningJobBuilder_ != null) { + return tuningJobBuilder_.getMessageOrBuilder(); + } else { + return tuningJob_ == null + ? com.google.cloud.aiplatform.v1.TuningJob.getDefaultInstance() + : tuningJob_; + } + } + /** + * + * + *
+     * Required. The TuningJob to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.TuningJob tuning_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.TuningJob, + com.google.cloud.aiplatform.v1.TuningJob.Builder, + com.google.cloud.aiplatform.v1.TuningJobOrBuilder> + getTuningJobFieldBuilder() { + if (tuningJobBuilder_ == null) { + tuningJobBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.TuningJob, + com.google.cloud.aiplatform.v1.TuningJob.Builder, + com.google.cloud.aiplatform.v1.TuningJobOrBuilder>( + getTuningJob(), getParentForChildren(), isClean()); + tuningJob_ = null; + } + return tuningJobBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.CreateTuningJobRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.CreateTuningJobRequest) + private static final com.google.cloud.aiplatform.v1.CreateTuningJobRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.CreateTuningJobRequest(); + } + + public static com.google.cloud.aiplatform.v1.CreateTuningJobRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateTuningJobRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreateTuningJobRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateTuningJobRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateTuningJobRequestOrBuilder.java new file mode 100644 index 000000000000..e2c38c3eab66 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateTuningJobRequestOrBuilder.java @@ -0,0 +1,98 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/genai_tuning_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +public interface CreateTuningJobRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.CreateTuningJobRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the Location to create the TuningJob in.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The resource name of the Location to create the TuningJob in.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The TuningJob to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.TuningJob tuning_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the tuningJob field is set. + */ + boolean hasTuningJob(); + /** + * + * + *
+   * Required. The TuningJob to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.TuningJob tuning_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The tuningJob. + */ + com.google.cloud.aiplatform.v1.TuningJob getTuningJob(); + /** + * + * + *
+   * Required. The TuningJob to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.TuningJob tuning_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1.TuningJobOrBuilder getTuningJobOrBuilder(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CustomJobProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CustomJobProto.java index 7816f45984ac..e25d54517e34 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CustomJobProto.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CustomJobProto.java @@ -101,51 +101,53 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ebAccessUrisEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030" + "\002 \001(\t:\0028\001:i\352Af\n#aiplatform.googleapis.co" + "m/CustomJob\022?projects/{project}/location" - + "s/{location}/customJobs/{custom_job}\"\302\005\n" - + "\rCustomJobSpec\022J\n\021worker_pool_specs\030\001 \003(" - + "\0132*.google.cloud.aiplatform.v1.WorkerPoo" - + "lSpecB\003\340A\002\022:\n\nscheduling\030\003 \001(\0132&.google." - + "cloud.aiplatform.v1.Scheduling\022\027\n\017servic" - + "e_account\030\004 \001(\t\0227\n\007network\030\005 \001(\tB&\340A\001\372A " - + "\n\036compute.googleapis.com/Network\022\037\n\022rese" - + "rved_ip_ranges\030\r \003(\tB\003\340A\001\022I\n\025base_output" - + "_directory\030\006 \001(\0132*.google.cloud.aiplatfo" - + "rm.v1.GcsDestination\022&\n\036protected_artifa" - + "ct_location_id\030\023 \001(\t\022B\n\013tensorboard\030\007 \001(" - + "\tB-\340A\001\372A\'\n%aiplatform.googleapis.com/Ten" - + "sorboard\022\036\n\021enable_web_access\030\n \001(\010B\003\340A\001" - + "\022$\n\027enable_dashboard_access\030\020 \001(\010B\003\340A\001\022=" - + "\n\nexperiment\030\021 \001(\tB)\340A\001\372A#\n!aiplatform.g" - + "oogleapis.com/Context\022A\n\016experiment_run\030" - + "\022 \001(\tB)\340A\001\372A#\n!aiplatform.googleapis.com" - + "/Context\0227\n\006models\030\024 \003(\tB\'\340A\001\372A!\n\037aiplat" - + "form.googleapis.com/Model\"\206\003\n\016WorkerPool" - + "Spec\022C\n\016container_spec\030\006 \001(\0132).google.cl" - + "oud.aiplatform.v1.ContainerSpecH\000\022L\n\023pyt" - + "hon_package_spec\030\007 \001(\0132-.google.cloud.ai" - + "platform.v1.PythonPackageSpecH\000\022E\n\014machi" - + "ne_spec\030\001 \001(\0132\'.google.cloud.aiplatform." - + "v1.MachineSpecB\006\340A\001\340A\005\022\032\n\rreplica_count\030" - + "\002 \001(\003B\003\340A\001\022=\n\nnfs_mounts\030\004 \003(\0132$.google." - + "cloud.aiplatform.v1.NfsMountB\003\340A\001\0227\n\tdis" - + "k_spec\030\005 \001(\0132$.google.cloud.aiplatform.v" - + "1.DiskSpecB\006\n\004task\"w\n\rContainerSpec\022\026\n\ti" - + "mage_uri\030\001 \001(\tB\003\340A\002\022\017\n\007command\030\002 \003(\t\022\014\n\004" - + "args\030\003 \003(\t\022/\n\003env\030\004 \003(\0132\".google.cloud.a" - + "iplatform.v1.EnvVar\"\252\001\n\021PythonPackageSpe" - + "c\022\037\n\022executor_image_uri\030\001 \001(\tB\003\340A\002\022\031\n\014pa" - + "ckage_uris\030\002 \003(\tB\003\340A\002\022\032\n\rpython_module\030\003" - + " \001(\tB\003\340A\002\022\014\n\004args\030\004 \003(\t\022/\n\003env\030\005 \003(\0132\".g" - + "oogle.cloud.aiplatform.v1.EnvVar\"}\n\nSche" - + "duling\022*\n\007timeout\030\001 \001(\0132\031.google.protobu" - + "f.Duration\022%\n\035restart_job_on_worker_rest" - + "art\030\003 \001(\010\022\034\n\017disable_retries\030\005 \001(\010B\003\340A\001B" - + "\314\001\n\036com.google.cloud.aiplatform.v1B\016Cust" - + "omJobProtoP\001Z>cloud.google.com/go/aiplat" - + "form/apiv1/aiplatformpb;aiplatformpb\252\002\032G" - + "oogle.Cloud.AIPlatform.V1\312\002\032Google\\Cloud" - + "\\AIPlatform\\V1\352\002\035Google::Cloud::AIPlatfo" - + "rm::V1b\006proto3" + + "s/{location}/customJobs/{custom_job}\"\230\006\n" + + "\rCustomJobSpec\022T\n\026persistent_resource_id" + + "\030\016 \001(\tB4\340A\001\372A.\n,aiplatform.googleapis.co" + + "m/PersistentResource\022J\n\021worker_pool_spec" + + "s\030\001 \003(\0132*.google.cloud.aiplatform.v1.Wor" + + "kerPoolSpecB\003\340A\002\022:\n\nscheduling\030\003 \001(\0132&.g" + + "oogle.cloud.aiplatform.v1.Scheduling\022\027\n\017" + + "service_account\030\004 \001(\t\0227\n\007network\030\005 \001(\tB&" + + "\340A\001\372A \n\036compute.googleapis.com/Network\022\037" + + "\n\022reserved_ip_ranges\030\r \003(\tB\003\340A\001\022I\n\025base_" + + "output_directory\030\006 \001(\0132*.google.cloud.ai" + + "platform.v1.GcsDestination\022&\n\036protected_" + + "artifact_location_id\030\023 \001(\t\022B\n\013tensorboar" + + "d\030\007 \001(\tB-\340A\001\372A\'\n%aiplatform.googleapis.c" + + "om/Tensorboard\022\036\n\021enable_web_access\030\n \001(" + + "\010B\003\340A\001\022$\n\027enable_dashboard_access\030\020 \001(\010B" + + "\003\340A\001\022=\n\nexperiment\030\021 \001(\tB)\340A\001\372A#\n!aiplat" + + "form.googleapis.com/Context\022A\n\016experimen" + + "t_run\030\022 \001(\tB)\340A\001\372A#\n!aiplatform.googleap" + + "is.com/Context\0227\n\006models\030\024 \003(\tB\'\340A\001\372A!\n\037" + + "aiplatform.googleapis.com/Model\"\206\003\n\016Work" + + "erPoolSpec\022C\n\016container_spec\030\006 \001(\0132).goo" + + "gle.cloud.aiplatform.v1.ContainerSpecH\000\022" + + "L\n\023python_package_spec\030\007 \001(\0132-.google.cl" + + "oud.aiplatform.v1.PythonPackageSpecH\000\022E\n" + + "\014machine_spec\030\001 \001(\0132\'.google.cloud.aipla" + + "tform.v1.MachineSpecB\006\340A\001\340A\005\022\032\n\rreplica_" + + "count\030\002 \001(\003B\003\340A\001\022=\n\nnfs_mounts\030\004 \003(\0132$.g" + + "oogle.cloud.aiplatform.v1.NfsMountB\003\340A\001\022" + + "7\n\tdisk_spec\030\005 \001(\0132$.google.cloud.aiplat" + + "form.v1.DiskSpecB\006\n\004task\"w\n\rContainerSpe" + + "c\022\026\n\timage_uri\030\001 \001(\tB\003\340A\002\022\017\n\007command\030\002 \003" + + "(\t\022\014\n\004args\030\003 \003(\t\022/\n\003env\030\004 \003(\0132\".google.c" + + "loud.aiplatform.v1.EnvVar\"\252\001\n\021PythonPack" + + "ageSpec\022\037\n\022executor_image_uri\030\001 \001(\tB\003\340A\002" + + "\022\031\n\014package_uris\030\002 \003(\tB\003\340A\002\022\032\n\rpython_mo" + + "dule\030\003 \001(\tB\003\340A\002\022\014\n\004args\030\004 \003(\t\022/\n\003env\030\005 \003" + + "(\0132\".google.cloud.aiplatform.v1.EnvVar\"}" + + "\n\nScheduling\022*\n\007timeout\030\001 \001(\0132\031.google.p" + + "rotobuf.Duration\022%\n\035restart_job_on_worke" + + "r_restart\030\003 \001(\010\022\034\n\017disable_retries\030\005 \001(\010" + + "B\003\340A\001B\314\001\n\036com.google.cloud.aiplatform.v1" + + "B\016CustomJobProtoP\001Z>cloud.google.com/go/" + + "aiplatform/apiv1/aiplatformpb;aiplatform" + + "pb\252\002\032Google.Cloud.AIPlatform.V1\312\002\032Google" + + "\\Cloud\\AIPlatform\\V1\352\002\035Google::Cloud::AI" + + "Platform::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -203,6 +205,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_CustomJobSpec_descriptor, new java.lang.String[] { + "PersistentResourceId", "WorkerPoolSpecs", "Scheduling", "ServiceAccount", diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CustomJobSpec.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CustomJobSpec.java index 62663e3f9a4a..ffc77e8d47e5 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CustomJobSpec.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CustomJobSpec.java @@ -39,6 +39,7 @@ private CustomJobSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) } private CustomJobSpec() { + persistentResourceId_ = ""; workerPoolSpecs_ = java.util.Collections.emptyList(); serviceAccount_ = ""; network_ = ""; @@ -72,6 +73,73 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } private int bitField0_; + public static final int PERSISTENT_RESOURCE_ID_FIELD_NUMBER = 14; + + @SuppressWarnings("serial") + private volatile java.lang.Object persistentResourceId_ = ""; + /** + * + * + *
+   * Optional. The ID of the PersistentResource in the same Project and Location
+   * which to run
+   *
+   * If this is specified, the job will be run on existing machines held by the
+   * PersistentResource instead of on-demand short-live machines.
+   * The network and CMEK configs on the job should be consistent with those on
+   * the PersistentResource, otherwise, the job will be rejected.
+   * 
+ * + * + * string persistent_resource_id = 14 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The persistentResourceId. + */ + @java.lang.Override + public java.lang.String getPersistentResourceId() { + java.lang.Object ref = persistentResourceId_; + 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(); + persistentResourceId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The ID of the PersistentResource in the same Project and Location
+   * which to run
+   *
+   * If this is specified, the job will be run on existing machines held by the
+   * PersistentResource instead of on-demand short-live machines.
+   * The network and CMEK configs on the job should be consistent with those on
+   * the PersistentResource, otherwise, the job will be rejected.
+   * 
+ * + * + * string persistent_resource_id = 14 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for persistentResourceId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPersistentResourceIdBytes() { + java.lang.Object ref = persistentResourceId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + persistentResourceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + public static final int WORKER_POOL_SPECS_FIELD_NUMBER = 1; @SuppressWarnings("serial") @@ -1003,6 +1071,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < reservedIpRanges_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 13, reservedIpRanges_.getRaw(i)); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(persistentResourceId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 14, persistentResourceId_); + } if (enableDashboardAccess_ != false) { output.writeBool(16, enableDashboardAccess_); } @@ -1056,6 +1127,9 @@ public int getSerializedSize() { size += dataSize; size += 1 * getReservedIpRangesList().size(); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(persistentResourceId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(14, persistentResourceId_); + } if (enableDashboardAccess_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(16, enableDashboardAccess_); } @@ -1094,6 +1168,7 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.aiplatform.v1.CustomJobSpec other = (com.google.cloud.aiplatform.v1.CustomJobSpec) obj; + if (!getPersistentResourceId().equals(other.getPersistentResourceId())) return false; if (!getWorkerPoolSpecsList().equals(other.getWorkerPoolSpecsList())) return false; if (hasScheduling() != other.hasScheduling()) return false; if (hasScheduling()) { @@ -1125,6 +1200,8 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PERSISTENT_RESOURCE_ID_FIELD_NUMBER; + hash = (53 * hash) + getPersistentResourceId().hashCode(); if (getWorkerPoolSpecsCount() > 0) { hash = (37 * hash) + WORKER_POOL_SPECS_FIELD_NUMBER; hash = (53 * hash) + getWorkerPoolSpecsList().hashCode(); @@ -1311,13 +1388,14 @@ private void maybeForceBuilderInitialization() { public Builder clear() { super.clear(); bitField0_ = 0; + persistentResourceId_ = ""; if (workerPoolSpecsBuilder_ == null) { workerPoolSpecs_ = java.util.Collections.emptyList(); } else { workerPoolSpecs_ = null; workerPoolSpecsBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000002); scheduling_ = null; if (schedulingBuilder_ != null) { schedulingBuilder_.dispose(); @@ -1375,9 +1453,9 @@ public com.google.cloud.aiplatform.v1.CustomJobSpec buildPartial() { private void buildPartialRepeatedFields(com.google.cloud.aiplatform.v1.CustomJobSpec result) { if (workerPoolSpecsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { + if (((bitField0_ & 0x00000002) != 0)) { workerPoolSpecs_ = java.util.Collections.unmodifiableList(workerPoolSpecs_); - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000002); } result.workerPoolSpecs_ = workerPoolSpecs_; } else { @@ -1387,47 +1465,50 @@ private void buildPartialRepeatedFields(com.google.cloud.aiplatform.v1.CustomJob private void buildPartial0(com.google.cloud.aiplatform.v1.CustomJobSpec result) { int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.persistentResourceId_ = persistentResourceId_; + } int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000002) != 0)) { + if (((from_bitField0_ & 0x00000004) != 0)) { result.scheduling_ = schedulingBuilder_ == null ? scheduling_ : schedulingBuilder_.build(); to_bitField0_ |= 0x00000001; } - if (((from_bitField0_ & 0x00000004) != 0)) { + if (((from_bitField0_ & 0x00000008) != 0)) { result.serviceAccount_ = serviceAccount_; } - if (((from_bitField0_ & 0x00000008) != 0)) { + if (((from_bitField0_ & 0x00000010) != 0)) { result.network_ = network_; } - if (((from_bitField0_ & 0x00000010) != 0)) { + if (((from_bitField0_ & 0x00000020) != 0)) { reservedIpRanges_.makeImmutable(); result.reservedIpRanges_ = reservedIpRanges_; } - if (((from_bitField0_ & 0x00000020) != 0)) { + if (((from_bitField0_ & 0x00000040) != 0)) { result.baseOutputDirectory_ = baseOutputDirectoryBuilder_ == null ? baseOutputDirectory_ : baseOutputDirectoryBuilder_.build(); to_bitField0_ |= 0x00000002; } - if (((from_bitField0_ & 0x00000040) != 0)) { + if (((from_bitField0_ & 0x00000080) != 0)) { result.protectedArtifactLocationId_ = protectedArtifactLocationId_; } - if (((from_bitField0_ & 0x00000080) != 0)) { + if (((from_bitField0_ & 0x00000100) != 0)) { result.tensorboard_ = tensorboard_; } - if (((from_bitField0_ & 0x00000100) != 0)) { + if (((from_bitField0_ & 0x00000200) != 0)) { result.enableWebAccess_ = enableWebAccess_; } - if (((from_bitField0_ & 0x00000200) != 0)) { + if (((from_bitField0_ & 0x00000400) != 0)) { result.enableDashboardAccess_ = enableDashboardAccess_; } - if (((from_bitField0_ & 0x00000400) != 0)) { + if (((from_bitField0_ & 0x00000800) != 0)) { result.experiment_ = experiment_; } - if (((from_bitField0_ & 0x00000800) != 0)) { + if (((from_bitField0_ & 0x00001000) != 0)) { result.experimentRun_ = experimentRun_; } - if (((from_bitField0_ & 0x00001000) != 0)) { + if (((from_bitField0_ & 0x00002000) != 0)) { models_.makeImmutable(); result.models_ = models_; } @@ -1479,11 +1560,16 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(com.google.cloud.aiplatform.v1.CustomJobSpec other) { if (other == com.google.cloud.aiplatform.v1.CustomJobSpec.getDefaultInstance()) return this; + if (!other.getPersistentResourceId().isEmpty()) { + persistentResourceId_ = other.persistentResourceId_; + bitField0_ |= 0x00000001; + onChanged(); + } if (workerPoolSpecsBuilder_ == null) { if (!other.workerPoolSpecs_.isEmpty()) { if (workerPoolSpecs_.isEmpty()) { workerPoolSpecs_ = other.workerPoolSpecs_; - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000002); } else { ensureWorkerPoolSpecsIsMutable(); workerPoolSpecs_.addAll(other.workerPoolSpecs_); @@ -1496,7 +1582,7 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1.CustomJobSpec other) { workerPoolSpecsBuilder_.dispose(); workerPoolSpecsBuilder_ = null; workerPoolSpecs_ = other.workerPoolSpecs_; - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000002); workerPoolSpecsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getWorkerPoolSpecsFieldBuilder() @@ -1511,18 +1597,18 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1.CustomJobSpec other) { } if (!other.getServiceAccount().isEmpty()) { serviceAccount_ = other.serviceAccount_; - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); } if (!other.getNetwork().isEmpty()) { network_ = other.network_; - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); } if (!other.reservedIpRanges_.isEmpty()) { if (reservedIpRanges_.isEmpty()) { reservedIpRanges_ = other.reservedIpRanges_; - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; } else { ensureReservedIpRangesIsMutable(); reservedIpRanges_.addAll(other.reservedIpRanges_); @@ -1534,12 +1620,12 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1.CustomJobSpec other) { } if (!other.getProtectedArtifactLocationId().isEmpty()) { protectedArtifactLocationId_ = other.protectedArtifactLocationId_; - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; onChanged(); } if (!other.getTensorboard().isEmpty()) { tensorboard_ = other.tensorboard_; - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; onChanged(); } if (other.getEnableWebAccess() != false) { @@ -1550,18 +1636,18 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1.CustomJobSpec other) { } if (!other.getExperiment().isEmpty()) { experiment_ = other.experiment_; - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000800; onChanged(); } if (!other.getExperimentRun().isEmpty()) { experimentRun_ = other.experimentRun_; - bitField0_ |= 0x00000800; + bitField0_ |= 0x00001000; onChanged(); } if (!other.models_.isEmpty()) { if (models_.isEmpty()) { models_ = other.models_; - bitField0_ |= 0x00001000; + bitField0_ |= 0x00002000; } else { ensureModelsIsMutable(); models_.addAll(other.models_); @@ -1610,38 +1696,38 @@ public Builder mergeFrom( case 26: { input.readMessage(getSchedulingFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000004; break; } // case 26 case 34: { serviceAccount_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; break; } // case 34 case 42: { network_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; break; } // case 42 case 50: { input.readMessage( getBaseOutputDirectoryFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; break; } // case 50 case 58: { tensorboard_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; break; } // case 58 case 80: { enableWebAccess_ = input.readBool(); - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; break; } // case 80 case 106: @@ -1651,28 +1737,34 @@ public Builder mergeFrom( reservedIpRanges_.add(s); break; } // case 106 + case 114: + { + persistentResourceId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 114 case 128: { enableDashboardAccess_ = input.readBool(); - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; break; } // case 128 case 138: { experiment_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000800; break; } // case 138 case 146: { experimentRun_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000800; + bitField0_ |= 0x00001000; break; } // case 146 case 154: { protectedArtifactLocationId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; break; } // case 154 case 162: @@ -1701,15 +1793,161 @@ public Builder mergeFrom( private int bitField0_; + private java.lang.Object persistentResourceId_ = ""; + /** + * + * + *
+     * Optional. The ID of the PersistentResource in the same Project and Location
+     * which to run
+     *
+     * If this is specified, the job will be run on existing machines held by the
+     * PersistentResource instead of on-demand short-live machines.
+     * The network and CMEK configs on the job should be consistent with those on
+     * the PersistentResource, otherwise, the job will be rejected.
+     * 
+ * + * + * string persistent_resource_id = 14 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The persistentResourceId. + */ + public java.lang.String getPersistentResourceId() { + java.lang.Object ref = persistentResourceId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + persistentResourceId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The ID of the PersistentResource in the same Project and Location
+     * which to run
+     *
+     * If this is specified, the job will be run on existing machines held by the
+     * PersistentResource instead of on-demand short-live machines.
+     * The network and CMEK configs on the job should be consistent with those on
+     * the PersistentResource, otherwise, the job will be rejected.
+     * 
+ * + * + * string persistent_resource_id = 14 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for persistentResourceId. + */ + public com.google.protobuf.ByteString getPersistentResourceIdBytes() { + java.lang.Object ref = persistentResourceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + persistentResourceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The ID of the PersistentResource in the same Project and Location
+     * which to run
+     *
+     * If this is specified, the job will be run on existing machines held by the
+     * PersistentResource instead of on-demand short-live machines.
+     * The network and CMEK configs on the job should be consistent with those on
+     * the PersistentResource, otherwise, the job will be rejected.
+     * 
+ * + * + * string persistent_resource_id = 14 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The persistentResourceId to set. + * @return This builder for chaining. + */ + public Builder setPersistentResourceId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + persistentResourceId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The ID of the PersistentResource in the same Project and Location
+     * which to run
+     *
+     * If this is specified, the job will be run on existing machines held by the
+     * PersistentResource instead of on-demand short-live machines.
+     * The network and CMEK configs on the job should be consistent with those on
+     * the PersistentResource, otherwise, the job will be rejected.
+     * 
+ * + * + * string persistent_resource_id = 14 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearPersistentResourceId() { + persistentResourceId_ = getDefaultInstance().getPersistentResourceId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The ID of the PersistentResource in the same Project and Location
+     * which to run
+     *
+     * If this is specified, the job will be run on existing machines held by the
+     * PersistentResource instead of on-demand short-live machines.
+     * The network and CMEK configs on the job should be consistent with those on
+     * the PersistentResource, otherwise, the job will be rejected.
+     * 
+ * + * + * string persistent_resource_id = 14 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for persistentResourceId to set. + * @return This builder for chaining. + */ + public Builder setPersistentResourceIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + persistentResourceId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + private java.util.List workerPoolSpecs_ = java.util.Collections.emptyList(); private void ensureWorkerPoolSpecsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { + if (!((bitField0_ & 0x00000002) != 0)) { workerPoolSpecs_ = new java.util.ArrayList( workerPoolSpecs_); - bitField0_ |= 0x00000001; + bitField0_ |= 0x00000002; } } @@ -1971,7 +2209,7 @@ public Builder addAllWorkerPoolSpecs( public Builder clearWorkerPoolSpecs() { if (workerPoolSpecsBuilder_ == null) { workerPoolSpecs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); } else { workerPoolSpecsBuilder_.clear(); @@ -2125,7 +2363,7 @@ public com.google.cloud.aiplatform.v1.WorkerPoolSpec.Builder addWorkerPoolSpecsB com.google.cloud.aiplatform.v1.WorkerPoolSpec.Builder, com.google.cloud.aiplatform.v1.WorkerPoolSpecOrBuilder>( workerPoolSpecs_, - ((bitField0_ & 0x00000001) != 0), + ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); workerPoolSpecs_ = null; @@ -2151,7 +2389,7 @@ public com.google.cloud.aiplatform.v1.WorkerPoolSpec.Builder addWorkerPoolSpecsB * @return Whether the scheduling field is set. */ public boolean hasScheduling() { - return ((bitField0_ & 0x00000002) != 0); + return ((bitField0_ & 0x00000004) != 0); } /** * @@ -2191,7 +2429,7 @@ public Builder setScheduling(com.google.cloud.aiplatform.v1.Scheduling value) { } else { schedulingBuilder_.setMessage(value); } - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -2211,7 +2449,7 @@ public Builder setScheduling( } else { schedulingBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -2226,7 +2464,7 @@ public Builder setScheduling( */ public Builder mergeScheduling(com.google.cloud.aiplatform.v1.Scheduling value) { if (schedulingBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) + if (((bitField0_ & 0x00000004) != 0) && scheduling_ != null && scheduling_ != com.google.cloud.aiplatform.v1.Scheduling.getDefaultInstance()) { getSchedulingBuilder().mergeFrom(value); @@ -2237,7 +2475,7 @@ public Builder mergeScheduling(com.google.cloud.aiplatform.v1.Scheduling value) schedulingBuilder_.mergeFrom(value); } if (scheduling_ != null) { - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000004; onChanged(); } return this; @@ -2252,7 +2490,7 @@ public Builder mergeScheduling(com.google.cloud.aiplatform.v1.Scheduling value) * .google.cloud.aiplatform.v1.Scheduling scheduling = 3; */ public Builder clearScheduling() { - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000004); scheduling_ = null; if (schedulingBuilder_ != null) { schedulingBuilder_.dispose(); @@ -2271,7 +2509,7 @@ public Builder clearScheduling() { * .google.cloud.aiplatform.v1.Scheduling scheduling = 3; */ public com.google.cloud.aiplatform.v1.Scheduling.Builder getSchedulingBuilder() { - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000004; onChanged(); return getSchedulingFieldBuilder().getBuilder(); } @@ -2393,7 +2631,7 @@ public Builder setServiceAccount(java.lang.String value) { throw new NullPointerException(); } serviceAccount_ = value; - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -2414,7 +2652,7 @@ public Builder setServiceAccount(java.lang.String value) { */ public Builder clearServiceAccount() { serviceAccount_ = getDefaultInstance().getServiceAccount(); - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000008); onChanged(); return this; } @@ -2440,7 +2678,7 @@ public Builder setServiceAccountBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); serviceAccount_ = value; - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -2549,7 +2787,7 @@ public Builder setNetwork(java.lang.String value) { throw new NullPointerException(); } network_ = value; - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -2580,7 +2818,7 @@ public Builder setNetwork(java.lang.String value) { */ public Builder clearNetwork() { network_ = getDefaultInstance().getNetwork(); - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000010); onChanged(); return this; } @@ -2616,7 +2854,7 @@ public Builder setNetworkBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); network_ = value; - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -2628,7 +2866,7 @@ private void ensureReservedIpRangesIsMutable() { if (!reservedIpRanges_.isModifiable()) { reservedIpRanges_ = new com.google.protobuf.LazyStringArrayList(reservedIpRanges_); } - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; } /** * @@ -2748,7 +2986,7 @@ public Builder setReservedIpRanges(int index, java.lang.String value) { } ensureReservedIpRangesIsMutable(); reservedIpRanges_.set(index, value); - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -2778,7 +3016,7 @@ public Builder addReservedIpRanges(java.lang.String value) { } ensureReservedIpRangesIsMutable(); reservedIpRanges_.add(value); - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -2805,7 +3043,7 @@ public Builder addReservedIpRanges(java.lang.String value) { public Builder addAllReservedIpRanges(java.lang.Iterable values) { ensureReservedIpRangesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, reservedIpRanges_); - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -2830,7 +3068,7 @@ public Builder addAllReservedIpRanges(java.lang.Iterable value */ public Builder clearReservedIpRanges() { reservedIpRanges_ = com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000020); ; onChanged(); return this; @@ -2862,7 +3100,7 @@ public Builder addReservedIpRangesBytes(com.google.protobuf.ByteString value) { checkByteStringIsUtf8(value); ensureReservedIpRangesIsMutable(); reservedIpRanges_.add(value); - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -2905,7 +3143,7 @@ public Builder addReservedIpRangesBytes(com.google.protobuf.ByteString value) { * @return Whether the baseOutputDirectory field is set. */ public boolean hasBaseOutputDirectory() { - return ((bitField0_ & 0x00000020) != 0); + return ((bitField0_ & 0x00000040) != 0); } /** * @@ -2985,7 +3223,7 @@ public Builder setBaseOutputDirectory(com.google.cloud.aiplatform.v1.GcsDestinat } else { baseOutputDirectoryBuilder_.setMessage(value); } - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -3025,7 +3263,7 @@ public Builder setBaseOutputDirectory( } else { baseOutputDirectoryBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -3060,7 +3298,7 @@ public Builder setBaseOutputDirectory( */ public Builder mergeBaseOutputDirectory(com.google.cloud.aiplatform.v1.GcsDestination value) { if (baseOutputDirectoryBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0) + if (((bitField0_ & 0x00000040) != 0) && baseOutputDirectory_ != null && baseOutputDirectory_ != com.google.cloud.aiplatform.v1.GcsDestination.getDefaultInstance()) { @@ -3072,7 +3310,7 @@ public Builder mergeBaseOutputDirectory(com.google.cloud.aiplatform.v1.GcsDestin baseOutputDirectoryBuilder_.mergeFrom(value); } if (baseOutputDirectory_ != null) { - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); } return this; @@ -3107,7 +3345,7 @@ public Builder mergeBaseOutputDirectory(com.google.cloud.aiplatform.v1.GcsDestin * .google.cloud.aiplatform.v1.GcsDestination base_output_directory = 6; */ public Builder clearBaseOutputDirectory() { - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000040); baseOutputDirectory_ = null; if (baseOutputDirectoryBuilder_ != null) { baseOutputDirectoryBuilder_.dispose(); @@ -3146,7 +3384,7 @@ public Builder clearBaseOutputDirectory() { * .google.cloud.aiplatform.v1.GcsDestination base_output_directory = 6; */ public com.google.cloud.aiplatform.v1.GcsDestination.Builder getBaseOutputDirectoryBuilder() { - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); return getBaseOutputDirectoryFieldBuilder().getBuilder(); } @@ -3306,7 +3544,7 @@ public Builder setProtectedArtifactLocationId(java.lang.String value) { throw new NullPointerException(); } protectedArtifactLocationId_ = value; - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; onChanged(); return this; } @@ -3326,7 +3564,7 @@ public Builder setProtectedArtifactLocationId(java.lang.String value) { */ public Builder clearProtectedArtifactLocationId() { protectedArtifactLocationId_ = getDefaultInstance().getProtectedArtifactLocationId(); - bitField0_ = (bitField0_ & ~0x00000040); + bitField0_ = (bitField0_ & ~0x00000080); onChanged(); return this; } @@ -3351,7 +3589,7 @@ public Builder setProtectedArtifactLocationIdBytes(com.google.protobuf.ByteStrin } checkByteStringIsUtf8(value); protectedArtifactLocationId_ = value; - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; onChanged(); return this; } @@ -3433,7 +3671,7 @@ public Builder setTensorboard(java.lang.String value) { throw new NullPointerException(); } tensorboard_ = value; - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; onChanged(); return this; } @@ -3455,7 +3693,7 @@ public Builder setTensorboard(java.lang.String value) { */ public Builder clearTensorboard() { tensorboard_ = getDefaultInstance().getTensorboard(); - bitField0_ = (bitField0_ & ~0x00000080); + bitField0_ = (bitField0_ & ~0x00000100); onChanged(); return this; } @@ -3482,7 +3720,7 @@ public Builder setTensorboardBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); tensorboard_ = value; - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; onChanged(); return this; } @@ -3538,7 +3776,7 @@ public boolean getEnableWebAccess() { public Builder setEnableWebAccess(boolean value) { enableWebAccess_ = value; - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; onChanged(); return this; } @@ -3564,7 +3802,7 @@ public Builder setEnableWebAccess(boolean value) { * @return This builder for chaining. */ public Builder clearEnableWebAccess() { - bitField0_ = (bitField0_ & ~0x00000100); + bitField0_ = (bitField0_ & ~0x00000200); enableWebAccess_ = false; onChanged(); return this; @@ -3619,7 +3857,7 @@ public boolean getEnableDashboardAccess() { public Builder setEnableDashboardAccess(boolean value) { enableDashboardAccess_ = value; - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; onChanged(); return this; } @@ -3644,7 +3882,7 @@ public Builder setEnableDashboardAccess(boolean value) { * @return This builder for chaining. */ public Builder clearEnableDashboardAccess() { - bitField0_ = (bitField0_ & ~0x00000200); + bitField0_ = (bitField0_ & ~0x00000400); enableDashboardAccess_ = false; onChanged(); return this; @@ -3724,7 +3962,7 @@ public Builder setExperiment(java.lang.String value) { throw new NullPointerException(); } experiment_ = value; - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000800; onChanged(); return this; } @@ -3745,7 +3983,7 @@ public Builder setExperiment(java.lang.String value) { */ public Builder clearExperiment() { experiment_ = getDefaultInstance().getExperiment(); - bitField0_ = (bitField0_ & ~0x00000400); + bitField0_ = (bitField0_ & ~0x00000800); onChanged(); return this; } @@ -3771,7 +4009,7 @@ public Builder setExperimentBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); experiment_ = value; - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000800; onChanged(); return this; } @@ -3850,7 +4088,7 @@ public Builder setExperimentRun(java.lang.String value) { throw new NullPointerException(); } experimentRun_ = value; - bitField0_ |= 0x00000800; + bitField0_ |= 0x00001000; onChanged(); return this; } @@ -3871,7 +4109,7 @@ public Builder setExperimentRun(java.lang.String value) { */ public Builder clearExperimentRun() { experimentRun_ = getDefaultInstance().getExperimentRun(); - bitField0_ = (bitField0_ & ~0x00000800); + bitField0_ = (bitField0_ & ~0x00001000); onChanged(); return this; } @@ -3897,7 +4135,7 @@ public Builder setExperimentRunBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); experimentRun_ = value; - bitField0_ |= 0x00000800; + bitField0_ |= 0x00001000; onChanged(); return this; } @@ -3909,7 +4147,7 @@ private void ensureModelsIsMutable() { if (!models_.isModifiable()) { models_ = new com.google.protobuf.LazyStringArrayList(models_); } - bitField0_ |= 0x00001000; + bitField0_ |= 0x00002000; } /** * @@ -4059,7 +4297,7 @@ public Builder setModels(int index, java.lang.String value) { } ensureModelsIsMutable(); models_.set(index, value); - bitField0_ |= 0x00001000; + bitField0_ |= 0x00002000; onChanged(); return this; } @@ -4095,7 +4333,7 @@ public Builder addModels(java.lang.String value) { } ensureModelsIsMutable(); models_.add(value); - bitField0_ |= 0x00001000; + bitField0_ |= 0x00002000; onChanged(); return this; } @@ -4128,7 +4366,7 @@ public Builder addModels(java.lang.String value) { public Builder addAllModels(java.lang.Iterable values) { ensureModelsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, models_); - bitField0_ |= 0x00001000; + bitField0_ |= 0x00002000; onChanged(); return this; } @@ -4159,7 +4397,7 @@ public Builder addAllModels(java.lang.Iterable values) { */ public Builder clearModels() { models_ = com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00001000); + bitField0_ = (bitField0_ & ~0x00002000); ; onChanged(); return this; @@ -4197,7 +4435,7 @@ public Builder addModelsBytes(com.google.protobuf.ByteString value) { checkByteStringIsUtf8(value); ensureModelsIsMutable(); models_.add(value); - bitField0_ |= 0x00001000; + bitField0_ |= 0x00002000; onChanged(); return this; } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CustomJobSpecOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CustomJobSpecOrBuilder.java index 5fed44087e0a..40ec68bf6fd4 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CustomJobSpecOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CustomJobSpecOrBuilder.java @@ -24,6 +24,47 @@ public interface CustomJobSpecOrBuilder // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.CustomJobSpec) com.google.protobuf.MessageOrBuilder { + /** + * + * + *
+   * Optional. The ID of the PersistentResource in the same Project and Location
+   * which to run
+   *
+   * If this is specified, the job will be run on existing machines held by the
+   * PersistentResource instead of on-demand short-live machines.
+   * The network and CMEK configs on the job should be consistent with those on
+   * the PersistentResource, otherwise, the job will be rejected.
+   * 
+ * + * + * string persistent_resource_id = 14 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The persistentResourceId. + */ + java.lang.String getPersistentResourceId(); + /** + * + * + *
+   * Optional. The ID of the PersistentResource in the same Project and Location
+   * which to run
+   *
+   * If this is specified, the job will be run on existing machines held by the
+   * PersistentResource instead of on-demand short-live machines.
+   * The network and CMEK configs on the job should be consistent with those on
+   * the PersistentResource, otherwise, the job will be rejected.
+   * 
+ * + * + * string persistent_resource_id = 14 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for persistentResourceId. + */ + com.google.protobuf.ByteString getPersistentResourceIdBytes(); + /** * * diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteNotebookRuntimeRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteNotebookRuntimeRequest.java new file mode 100644 index 000000000000..b2f0cee5c456 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteNotebookRuntimeRequest.java @@ -0,0 +1,663 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/notebook_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for
+ * [NotebookService.DeleteNotebookRuntime][google.cloud.aiplatform.v1.NotebookService.DeleteNotebookRuntime].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.DeleteNotebookRuntimeRequest} + */ +public final class DeleteNotebookRuntimeRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.DeleteNotebookRuntimeRequest) + DeleteNotebookRuntimeRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteNotebookRuntimeRequest.newBuilder() to construct. + private DeleteNotebookRuntimeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteNotebookRuntimeRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteNotebookRuntimeRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_DeleteNotebookRuntimeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_DeleteNotebookRuntimeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeRequest.class, + com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the NotebookRuntime resource to be deleted.
+   * Instead of checking whether the name is in valid NotebookRuntime resource
+   * name format, directly throw NotFound exception if there is no such
+   * NotebookRuntime in spanner.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the NotebookRuntime resource to be deleted.
+   * Instead of checking whether the name is in valid NotebookRuntime resource
+   * name format, directly throw NotFound exception if there is no such
+   * NotebookRuntime in spanner.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeRequest other = + (com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for
+   * [NotebookService.DeleteNotebookRuntime][google.cloud.aiplatform.v1.NotebookService.DeleteNotebookRuntime].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.DeleteNotebookRuntimeRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.DeleteNotebookRuntimeRequest) + com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_DeleteNotebookRuntimeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_DeleteNotebookRuntimeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeRequest.class, + com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_DeleteNotebookRuntimeRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeRequest build() { + com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeRequest buildPartial() { + com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeRequest result = + new com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeRequest other) { + if (other == com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the NotebookRuntime resource to be deleted.
+     * Instead of checking whether the name is in valid NotebookRuntime resource
+     * name format, directly throw NotFound exception if there is no such
+     * NotebookRuntime in spanner.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the NotebookRuntime resource to be deleted.
+     * Instead of checking whether the name is in valid NotebookRuntime resource
+     * name format, directly throw NotFound exception if there is no such
+     * NotebookRuntime in spanner.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the NotebookRuntime resource to be deleted.
+     * Instead of checking whether the name is in valid NotebookRuntime resource
+     * name format, directly throw NotFound exception if there is no such
+     * NotebookRuntime in spanner.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the NotebookRuntime resource to be deleted.
+     * Instead of checking whether the name is in valid NotebookRuntime resource
+     * name format, directly throw NotFound exception if there is no such
+     * NotebookRuntime in spanner.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the NotebookRuntime resource to be deleted.
+     * Instead of checking whether the name is in valid NotebookRuntime resource
+     * name format, directly throw NotFound exception if there is no such
+     * NotebookRuntime in spanner.
+     * 
+ * + * + * 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. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.DeleteNotebookRuntimeRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.DeleteNotebookRuntimeRequest) + private static final com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeRequest(); + } + + public static com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteNotebookRuntimeRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteNotebookRuntimeRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteNotebookRuntimeRequestOrBuilder.java new file mode 100644 index 000000000000..eadefbbcf9ed --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteNotebookRuntimeRequestOrBuilder.java @@ -0,0 +1,61 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/notebook_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +public interface DeleteNotebookRuntimeRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.DeleteNotebookRuntimeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the NotebookRuntime resource to be deleted.
+   * Instead of checking whether the name is in valid NotebookRuntime resource
+   * name format, directly throw NotFound exception if there is no such
+   * NotebookRuntime in spanner.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the NotebookRuntime resource to be deleted.
+   * Instead of checking whether the name is in valid NotebookRuntime resource
+   * name format, directly throw NotFound exception if there is no such
+   * NotebookRuntime in spanner.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteNotebookRuntimeTemplateRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteNotebookRuntimeTemplateRequest.java new file mode 100644 index 000000000000..237f5bc80ae6 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteNotebookRuntimeTemplateRequest.java @@ -0,0 +1,669 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/notebook_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for
+ * [NotebookService.DeleteNotebookRuntimeTemplate][google.cloud.aiplatform.v1.NotebookService.DeleteNotebookRuntimeTemplate].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.DeleteNotebookRuntimeTemplateRequest} + */ +public final class DeleteNotebookRuntimeTemplateRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.DeleteNotebookRuntimeTemplateRequest) + DeleteNotebookRuntimeTemplateRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteNotebookRuntimeTemplateRequest.newBuilder() to construct. + private DeleteNotebookRuntimeTemplateRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteNotebookRuntimeTemplateRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteNotebookRuntimeTemplateRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_DeleteNotebookRuntimeTemplateRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_DeleteNotebookRuntimeTemplateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeTemplateRequest.class, + com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeTemplateRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the NotebookRuntimeTemplate resource to be deleted.
+   * Format:
+   * `projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the NotebookRuntimeTemplate resource to be deleted.
+   * Format:
+   * `projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeTemplateRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeTemplateRequest other = + (com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeTemplateRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeTemplateRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeTemplateRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeTemplateRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeTemplateRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeTemplateRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeTemplateRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeTemplateRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeTemplateRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeTemplateRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeTemplateRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeTemplateRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeTemplateRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeTemplateRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for
+   * [NotebookService.DeleteNotebookRuntimeTemplate][google.cloud.aiplatform.v1.NotebookService.DeleteNotebookRuntimeTemplate].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.DeleteNotebookRuntimeTemplateRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.DeleteNotebookRuntimeTemplateRequest) + com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeTemplateRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_DeleteNotebookRuntimeTemplateRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_DeleteNotebookRuntimeTemplateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeTemplateRequest.class, + com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeTemplateRequest.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeTemplateRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_DeleteNotebookRuntimeTemplateRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeTemplateRequest + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeTemplateRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeTemplateRequest build() { + com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeTemplateRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeTemplateRequest buildPartial() { + com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeTemplateRequest result = + new com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeTemplateRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeTemplateRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeTemplateRequest) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeTemplateRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeTemplateRequest other) { + if (other + == com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeTemplateRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the NotebookRuntimeTemplate resource to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the NotebookRuntimeTemplate resource to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the NotebookRuntimeTemplate resource to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the NotebookRuntimeTemplate resource to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the NotebookRuntimeTemplate resource to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}`
+     * 
+ * + * + * 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. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.DeleteNotebookRuntimeTemplateRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.DeleteNotebookRuntimeTemplateRequest) + private static final com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeTemplateRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeTemplateRequest(); + } + + public static com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeTemplateRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteNotebookRuntimeTemplateRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeTemplateRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteNotebookRuntimeTemplateRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteNotebookRuntimeTemplateRequestOrBuilder.java new file mode 100644 index 000000000000..6fbb2bd2ddbb --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteNotebookRuntimeTemplateRequestOrBuilder.java @@ -0,0 +1,59 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/notebook_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +public interface DeleteNotebookRuntimeTemplateRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.DeleteNotebookRuntimeTemplateRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the NotebookRuntimeTemplate resource to be deleted.
+   * Format:
+   * `projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the NotebookRuntimeTemplate resource to be deleted.
+   * Format:
+   * `projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeletePersistentResourceRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeletePersistentResourceRequest.java new file mode 100644 index 000000000000..7d3f1b74fdbc --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeletePersistentResourceRequest.java @@ -0,0 +1,663 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/persistent_resource_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for
+ * [PersistentResourceService.DeletePersistentResource][google.cloud.aiplatform.v1.PersistentResourceService.DeletePersistentResource].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.DeletePersistentResourceRequest} + */ +public final class DeletePersistentResourceRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.DeletePersistentResourceRequest) + DeletePersistentResourceRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeletePersistentResourceRequest.newBuilder() to construct. + private DeletePersistentResourceRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeletePersistentResourceRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeletePersistentResourceRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.PersistentResourceServiceProto + .internal_static_google_cloud_aiplatform_v1_DeletePersistentResourceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.PersistentResourceServiceProto + .internal_static_google_cloud_aiplatform_v1_DeletePersistentResourceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.DeletePersistentResourceRequest.class, + com.google.cloud.aiplatform.v1.DeletePersistentResourceRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the PersistentResource to be deleted.
+   * Format:
+   * `projects/{project}/locations/{location}/persistentResources/{persistent_resource}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the PersistentResource to be deleted.
+   * Format:
+   * `projects/{project}/locations/{location}/persistentResources/{persistent_resource}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.DeletePersistentResourceRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.DeletePersistentResourceRequest other = + (com.google.cloud.aiplatform.v1.DeletePersistentResourceRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.DeletePersistentResourceRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DeletePersistentResourceRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.DeletePersistentResourceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DeletePersistentResourceRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.DeletePersistentResourceRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DeletePersistentResourceRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.DeletePersistentResourceRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.DeletePersistentResourceRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.DeletePersistentResourceRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.DeletePersistentResourceRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.DeletePersistentResourceRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.DeletePersistentResourceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.DeletePersistentResourceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for
+   * [PersistentResourceService.DeletePersistentResource][google.cloud.aiplatform.v1.PersistentResourceService.DeletePersistentResource].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.DeletePersistentResourceRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.DeletePersistentResourceRequest) + com.google.cloud.aiplatform.v1.DeletePersistentResourceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.PersistentResourceServiceProto + .internal_static_google_cloud_aiplatform_v1_DeletePersistentResourceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.PersistentResourceServiceProto + .internal_static_google_cloud_aiplatform_v1_DeletePersistentResourceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.DeletePersistentResourceRequest.class, + com.google.cloud.aiplatform.v1.DeletePersistentResourceRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.DeletePersistentResourceRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.PersistentResourceServiceProto + .internal_static_google_cloud_aiplatform_v1_DeletePersistentResourceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeletePersistentResourceRequest + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.DeletePersistentResourceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeletePersistentResourceRequest build() { + com.google.cloud.aiplatform.v1.DeletePersistentResourceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeletePersistentResourceRequest buildPartial() { + com.google.cloud.aiplatform.v1.DeletePersistentResourceRequest result = + new com.google.cloud.aiplatform.v1.DeletePersistentResourceRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1.DeletePersistentResourceRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.DeletePersistentResourceRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.DeletePersistentResourceRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.DeletePersistentResourceRequest other) { + if (other + == com.google.cloud.aiplatform.v1.DeletePersistentResourceRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the PersistentResource to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/persistentResources/{persistent_resource}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the PersistentResource to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/persistentResources/{persistent_resource}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the PersistentResource to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/persistentResources/{persistent_resource}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the PersistentResource to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/persistentResources/{persistent_resource}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the PersistentResource to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/persistentResources/{persistent_resource}`
+     * 
+ * + * + * 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. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.DeletePersistentResourceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.DeletePersistentResourceRequest) + private static final com.google.cloud.aiplatform.v1.DeletePersistentResourceRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.DeletePersistentResourceRequest(); + } + + public static com.google.cloud.aiplatform.v1.DeletePersistentResourceRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeletePersistentResourceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeletePersistentResourceRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeletePersistentResourceRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeletePersistentResourceRequestOrBuilder.java new file mode 100644 index 000000000000..2643baea85e7 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeletePersistentResourceRequestOrBuilder.java @@ -0,0 +1,59 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/persistent_resource_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +public interface DeletePersistentResourceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.DeletePersistentResourceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the PersistentResource to be deleted.
+   * Format:
+   * `projects/{project}/locations/{location}/persistentResources/{persistent_resource}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the PersistentResource to be deleted.
+   * Format:
+   * `projects/{project}/locations/{location}/persistentResources/{persistent_resource}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeployedModel.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeployedModel.java index a7053043ae59..99b97999aadf 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeployedModel.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeployedModel.java @@ -687,6 +687,28 @@ public com.google.cloud.aiplatform.v1.ExplanationSpecOrBuilder getExplanationSpe : explanationSpec_; } + public static final int DISABLE_EXPLANATIONS_FIELD_NUMBER = 19; + private boolean disableExplanations_ = false; + /** + * + * + *
+   * If true, deploy the model without explainable feature, regardless the
+   * existence of
+   * [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec]
+   * or
+   * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec].
+   * 
+ * + * bool disable_explanations = 19; + * + * @return The disableExplanations. + */ + @java.lang.Override + public boolean getDisableExplanations() { + return disableExplanations_; + } + public static final int SERVICE_ACCOUNT_FIELD_NUMBER = 11; @SuppressWarnings("serial") @@ -919,6 +941,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(modelVersionId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 18, modelVersionId_); } + if (disableExplanations_ != false) { + output.writeBool(19, disableExplanations_); + } getUnknownFields().writeTo(output); } @@ -971,6 +996,9 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(modelVersionId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(18, modelVersionId_); } + if (disableExplanations_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(19, disableExplanations_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -999,6 +1027,7 @@ public boolean equals(final java.lang.Object obj) { if (hasExplanationSpec()) { if (!getExplanationSpec().equals(other.getExplanationSpec())) return false; } + if (getDisableExplanations() != other.getDisableExplanations()) return false; if (!getServiceAccount().equals(other.getServiceAccount())) return false; if (getDisableContainerLogging() != other.getDisableContainerLogging()) return false; if (getEnableAccessLogging() != other.getEnableAccessLogging()) return false; @@ -1047,6 +1076,8 @@ public int hashCode() { hash = (37 * hash) + EXPLANATION_SPEC_FIELD_NUMBER; hash = (53 * hash) + getExplanationSpec().hashCode(); } + hash = (37 * hash) + DISABLE_EXPLANATIONS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDisableExplanations()); hash = (37 * hash) + SERVICE_ACCOUNT_FIELD_NUMBER; hash = (53 * hash) + getServiceAccount().hashCode(); hash = (37 * hash) + DISABLE_CONTAINER_LOGGING_FIELD_NUMBER; @@ -1243,6 +1274,7 @@ public Builder clear() { explanationSpecBuilder_.dispose(); explanationSpecBuilder_ = null; } + disableExplanations_ = false; serviceAccount_ = ""; disableContainerLogging_ = false; enableAccessLogging_ = false; @@ -1313,15 +1345,18 @@ private void buildPartial0(com.google.cloud.aiplatform.v1.DeployedModel result) to_bitField0_ |= 0x00000002; } if (((from_bitField0_ & 0x00000200) != 0)) { - result.serviceAccount_ = serviceAccount_; + result.disableExplanations_ = disableExplanations_; } if (((from_bitField0_ & 0x00000400) != 0)) { - result.disableContainerLogging_ = disableContainerLogging_; + result.serviceAccount_ = serviceAccount_; } if (((from_bitField0_ & 0x00000800) != 0)) { - result.enableAccessLogging_ = enableAccessLogging_; + result.disableContainerLogging_ = disableContainerLogging_; } if (((from_bitField0_ & 0x00001000) != 0)) { + result.enableAccessLogging_ = enableAccessLogging_; + } + if (((from_bitField0_ & 0x00002000) != 0)) { result.privateEndpoints_ = privateEndpointsBuilder_ == null ? privateEndpoints_ : privateEndpointsBuilder_.build(); to_bitField0_ |= 0x00000004; @@ -1411,9 +1446,12 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1.DeployedModel other) { if (other.hasExplanationSpec()) { mergeExplanationSpec(other.getExplanationSpec()); } + if (other.getDisableExplanations() != false) { + setDisableExplanations(other.getDisableExplanations()); + } if (!other.getServiceAccount().isEmpty()) { serviceAccount_ = other.serviceAccount_; - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; onChanged(); } if (other.getDisableContainerLogging() != false) { @@ -1521,26 +1559,26 @@ public Builder mergeFrom( case 90: { serviceAccount_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; break; } // case 90 case 104: { enableAccessLogging_ = input.readBool(); - bitField0_ |= 0x00000800; + bitField0_ |= 0x00001000; break; } // case 104 case 114: { input.readMessage( getPrivateEndpointsFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00001000; + bitField0_ |= 0x00002000; break; } // case 114 case 120: { disableContainerLogging_ = input.readBool(); - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000800; break; } // case 120 case 138: @@ -1556,6 +1594,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000020; break; } // case 146 + case 152: + { + disableExplanations_ = input.readBool(); + bitField0_ |= 0x00000200; + break; + } // case 152 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -3214,6 +3258,71 @@ public com.google.cloud.aiplatform.v1.ExplanationSpecOrBuilder getExplanationSpe return explanationSpecBuilder_; } + private boolean disableExplanations_; + /** + * + * + *
+     * If true, deploy the model without explainable feature, regardless the
+     * existence of
+     * [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec]
+     * or
+     * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec].
+     * 
+ * + * bool disable_explanations = 19; + * + * @return The disableExplanations. + */ + @java.lang.Override + public boolean getDisableExplanations() { + return disableExplanations_; + } + /** + * + * + *
+     * If true, deploy the model without explainable feature, regardless the
+     * existence of
+     * [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec]
+     * or
+     * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec].
+     * 
+ * + * bool disable_explanations = 19; + * + * @param value The disableExplanations to set. + * @return This builder for chaining. + */ + public Builder setDisableExplanations(boolean value) { + + disableExplanations_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * If true, deploy the model without explainable feature, regardless the
+     * existence of
+     * [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec]
+     * or
+     * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec].
+     * 
+ * + * bool disable_explanations = 19; + * + * @return This builder for chaining. + */ + public Builder clearDisableExplanations() { + bitField0_ = (bitField0_ & ~0x00000200); + disableExplanations_ = false; + onChanged(); + return this; + } + private java.lang.Object serviceAccount_ = ""; /** * @@ -3294,7 +3403,7 @@ public Builder setServiceAccount(java.lang.String value) { throw new NullPointerException(); } serviceAccount_ = value; - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; onChanged(); return this; } @@ -3317,7 +3426,7 @@ public Builder setServiceAccount(java.lang.String value) { */ public Builder clearServiceAccount() { serviceAccount_ = getDefaultInstance().getServiceAccount(); - bitField0_ = (bitField0_ & ~0x00000200); + bitField0_ = (bitField0_ & ~0x00000400); onChanged(); return this; } @@ -3345,7 +3454,7 @@ public Builder setServiceAccountBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); serviceAccount_ = value; - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; onChanged(); return this; } @@ -3393,7 +3502,7 @@ public boolean getDisableContainerLogging() { public Builder setDisableContainerLogging(boolean value) { disableContainerLogging_ = value; - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000800; onChanged(); return this; } @@ -3415,7 +3524,7 @@ public Builder setDisableContainerLogging(boolean value) { * @return This builder for chaining. */ public Builder clearDisableContainerLogging() { - bitField0_ = (bitField0_ & ~0x00000400); + bitField0_ = (bitField0_ & ~0x00000800); disableContainerLogging_ = false; onChanged(); return this; @@ -3466,7 +3575,7 @@ public boolean getEnableAccessLogging() { public Builder setEnableAccessLogging(boolean value) { enableAccessLogging_ = value; - bitField0_ |= 0x00000800; + bitField0_ |= 0x00001000; onChanged(); return this; } @@ -3489,7 +3598,7 @@ public Builder setEnableAccessLogging(boolean value) { * @return This builder for chaining. */ public Builder clearEnableAccessLogging() { - bitField0_ = (bitField0_ & ~0x00000800); + bitField0_ = (bitField0_ & ~0x00001000); enableAccessLogging_ = false; onChanged(); return this; @@ -3518,7 +3627,7 @@ public Builder clearEnableAccessLogging() { * @return Whether the privateEndpoints field is set. */ public boolean hasPrivateEndpoints() { - return ((bitField0_ & 0x00001000) != 0); + return ((bitField0_ & 0x00002000) != 0); } /** * @@ -3568,7 +3677,7 @@ public Builder setPrivateEndpoints(com.google.cloud.aiplatform.v1.PrivateEndpoin } else { privateEndpointsBuilder_.setMessage(value); } - bitField0_ |= 0x00001000; + bitField0_ |= 0x00002000; onChanged(); return this; } @@ -3593,7 +3702,7 @@ public Builder setPrivateEndpoints( } else { privateEndpointsBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00001000; + bitField0_ |= 0x00002000; onChanged(); return this; } @@ -3613,7 +3722,7 @@ public Builder setPrivateEndpoints( */ public Builder mergePrivateEndpoints(com.google.cloud.aiplatform.v1.PrivateEndpoints value) { if (privateEndpointsBuilder_ == null) { - if (((bitField0_ & 0x00001000) != 0) + if (((bitField0_ & 0x00002000) != 0) && privateEndpoints_ != null && privateEndpoints_ != com.google.cloud.aiplatform.v1.PrivateEndpoints.getDefaultInstance()) { @@ -3625,7 +3734,7 @@ public Builder mergePrivateEndpoints(com.google.cloud.aiplatform.v1.PrivateEndpo privateEndpointsBuilder_.mergeFrom(value); } if (privateEndpoints_ != null) { - bitField0_ |= 0x00001000; + bitField0_ |= 0x00002000; onChanged(); } return this; @@ -3645,7 +3754,7 @@ public Builder mergePrivateEndpoints(com.google.cloud.aiplatform.v1.PrivateEndpo * */ public Builder clearPrivateEndpoints() { - bitField0_ = (bitField0_ & ~0x00001000); + bitField0_ = (bitField0_ & ~0x00002000); privateEndpoints_ = null; if (privateEndpointsBuilder_ != null) { privateEndpointsBuilder_.dispose(); @@ -3669,7 +3778,7 @@ public Builder clearPrivateEndpoints() { * */ public com.google.cloud.aiplatform.v1.PrivateEndpoints.Builder getPrivateEndpointsBuilder() { - bitField0_ |= 0x00001000; + bitField0_ |= 0x00002000; onChanged(); return getPrivateEndpointsFieldBuilder().getBuilder(); } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeployedModelOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeployedModelOrBuilder.java index 691255b5e81e..2a775d51479f 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeployedModelOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeployedModelOrBuilder.java @@ -394,6 +394,23 @@ public interface DeployedModelOrBuilder */ com.google.cloud.aiplatform.v1.ExplanationSpecOrBuilder getExplanationSpecOrBuilder(); + /** + * + * + *
+   * If true, deploy the model without explainable feature, regardless the
+   * existence of
+   * [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec]
+   * or
+   * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec].
+   * 
+ * + * bool disable_explanations = 19; + * + * @return The disableExplanations. + */ + boolean getDisableExplanations(); + /** * * diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EndpointProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EndpointProto.java index 0f2d8c0b3068..0cb4adb7eb93 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EndpointProto.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EndpointProto.java @@ -97,7 +97,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "}/locations/{location}/endpoints/{endpoi" + "nt}\022Mprojects/{project}/locations/{locat" + "ion}/publishers/{publisher}/models/{mode" - + "l}\"\274\005\n\rDeployedModel\022M\n\023dedicated_resour" + + "l}\"\332\005\n\rDeployedModel\022M\n\023dedicated_resour" + "ces\030\007 \001(\0132..google.cloud.aiplatform.v1.D" + "edicatedResourcesH\000\022M\n\023automatic_resourc" + "es\030\010 \001(\0132..google.cloud.aiplatform.v1.Au" @@ -109,25 +109,26 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "B\003\340A\003\022\024\n\014display_name\030\003 \001(\t\0224\n\013create_ti" + "me\030\006 \001(\0132\032.google.protobuf.TimestampB\003\340A" + "\003\022E\n\020explanation_spec\030\t \001(\0132+.google.clo" - + "ud.aiplatform.v1.ExplanationSpec\022\027\n\017serv" - + "ice_account\030\013 \001(\t\022!\n\031disable_container_l" - + "ogging\030\017 \001(\010\022\035\n\025enable_access_logging\030\r " - + "\001(\010\022L\n\021private_endpoints\030\016 \001(\0132,.google." - + "cloud.aiplatform.v1.PrivateEndpointsB\003\340A" - + "\003B\026\n\024prediction_resources\"\217\001\n\020PrivateEnd" - + "points\022\035\n\020predict_http_uri\030\001 \001(\tB\003\340A\003\022\035\n" - + "\020explain_http_uri\030\002 \001(\tB\003\340A\003\022\034\n\017health_h" - + "ttp_uri\030\003 \001(\tB\003\340A\003\022\037\n\022service_attachment" - + "\030\004 \001(\tB\003\340A\003\"\234\001\n#PredictRequestResponseLo" - + "ggingConfig\022\017\n\007enabled\030\001 \001(\010\022\025\n\rsampling" - + "_rate\030\002 \001(\001\022M\n\024bigquery_destination\030\003 \001(" - + "\0132/.google.cloud.aiplatform.v1.BigQueryD" - + "estinationB\313\001\n\036com.google.cloud.aiplatfo" - + "rm.v1B\rEndpointProtoP\001Z>cloud.google.com" - + "/go/aiplatform/apiv1/aiplatformpb;aiplat" - + "formpb\252\002\032Google.Cloud.AIPlatform.V1\312\002\032Go" - + "ogle\\Cloud\\AIPlatform\\V1\352\002\035Google::Cloud" - + "::AIPlatform::V1b\006proto3" + + "ud.aiplatform.v1.ExplanationSpec\022\034\n\024disa" + + "ble_explanations\030\023 \001(\010\022\027\n\017service_accoun" + + "t\030\013 \001(\t\022!\n\031disable_container_logging\030\017 \001" + + "(\010\022\035\n\025enable_access_logging\030\r \001(\010\022L\n\021pri" + + "vate_endpoints\030\016 \001(\0132,.google.cloud.aipl" + + "atform.v1.PrivateEndpointsB\003\340A\003B\026\n\024predi" + + "ction_resources\"\217\001\n\020PrivateEndpoints\022\035\n\020" + + "predict_http_uri\030\001 \001(\tB\003\340A\003\022\035\n\020explain_h" + + "ttp_uri\030\002 \001(\tB\003\340A\003\022\034\n\017health_http_uri\030\003 " + + "\001(\tB\003\340A\003\022\037\n\022service_attachment\030\004 \001(\tB\003\340A" + + "\003\"\234\001\n#PredictRequestResponseLoggingConfi" + + "g\022\017\n\007enabled\030\001 \001(\010\022\025\n\rsampling_rate\030\002 \001(" + + "\001\022M\n\024bigquery_destination\030\003 \001(\0132/.google" + + ".cloud.aiplatform.v1.BigQueryDestination" + + "B\313\001\n\036com.google.cloud.aiplatform.v1B\rEnd" + + "pointProtoP\001Z>cloud.google.com/go/aiplat" + + "form/apiv1/aiplatformpb;aiplatformpb\252\002\032G" + + "oogle.Cloud.AIPlatform.V1\312\002\032Google\\Cloud" + + "\\AIPlatform\\V1\352\002\035Google::Cloud::AIPlatfo" + + "rm::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -193,6 +194,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "DisplayName", "CreateTime", "ExplanationSpec", + "DisableExplanations", "ServiceAccount", "DisableContainerLogging", "EnableAccessLogging", diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FunctionDeclaration.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FunctionDeclaration.java index 4eca9158363b..50b28097ceb9 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FunctionDeclaration.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FunctionDeclaration.java @@ -79,8 +79,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { *
    * Required. The name of the function to call.
    * Must start with a letter or an underscore.
-   * Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum
-   * length of 64.
+   * Must be a-z, A-Z, 0-9, or contain underscores, dots and dashes, with a
+   * maximum length of 64.
    * 
* * string name = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -105,8 +105,8 @@ public java.lang.String getName() { *
    * Required. The name of the function to call.
    * Must start with a letter or an underscore.
-   * Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum
-   * length of 64.
+   * Must be a-z, A-Z, 0-9, or contain underscores, dots and dashes, with a
+   * maximum length of 64.
    * 
* * string name = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -189,8 +189,10 @@ public com.google.protobuf.ByteString getDescriptionBytes() { * format. Reflects the Open API 3.03 Parameter Object. string Key: the name * of the parameter. Parameter names are case sensitive. Schema Value: the * Schema defining the type used for the parameter. For function with no - * parameters, this can be left unset. Example with 1 required and 1 optional - * parameter: type: OBJECT properties: + * parameters, this can be left unset. Parameter names must start with a + * letter or an underscore and must only contain chars a-z, A-Z, 0-9, or + * underscores with a maximum length of 64. Example with 1 required and 1 + * optional parameter: type: OBJECT properties: * param1: * type: STRING * param2: @@ -217,8 +219,10 @@ public boolean hasParameters() { * format. Reflects the Open API 3.03 Parameter Object. string Key: the name * of the parameter. Parameter names are case sensitive. Schema Value: the * Schema defining the type used for the parameter. For function with no - * parameters, this can be left unset. Example with 1 required and 1 optional - * parameter: type: OBJECT properties: + * parameters, this can be left unset. Parameter names must start with a + * letter or an underscore and must only contain chars a-z, A-Z, 0-9, or + * underscores with a maximum length of 64. Example with 1 required and 1 + * optional parameter: type: OBJECT properties: * param1: * type: STRING * param2: @@ -247,8 +251,10 @@ public com.google.cloud.aiplatform.v1.Schema getParameters() { * format. Reflects the Open API 3.03 Parameter Object. string Key: the name * of the parameter. Parameter names are case sensitive. Schema Value: the * Schema defining the type used for the parameter. For function with no - * parameters, this can be left unset. Example with 1 required and 1 optional - * parameter: type: OBJECT properties: + * parameters, this can be left unset. Parameter names must start with a + * letter or an underscore and must only contain chars a-z, A-Z, 0-9, or + * underscores with a maximum length of 64. Example with 1 required and 1 + * optional parameter: type: OBJECT properties: * param1: * type: STRING * param2: @@ -688,8 +694,8 @@ public Builder mergeFrom( *
      * Required. The name of the function to call.
      * Must start with a letter or an underscore.
-     * Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum
-     * length of 64.
+     * Must be a-z, A-Z, 0-9, or contain underscores, dots and dashes, with a
+     * maximum length of 64.
      * 
* * string name = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -713,8 +719,8 @@ public java.lang.String getName() { *
      * Required. The name of the function to call.
      * Must start with a letter or an underscore.
-     * Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum
-     * length of 64.
+     * Must be a-z, A-Z, 0-9, or contain underscores, dots and dashes, with a
+     * maximum length of 64.
      * 
* * string name = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -738,8 +744,8 @@ public com.google.protobuf.ByteString getNameBytes() { *
      * Required. The name of the function to call.
      * Must start with a letter or an underscore.
-     * Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum
-     * length of 64.
+     * Must be a-z, A-Z, 0-9, or contain underscores, dots and dashes, with a
+     * maximum length of 64.
      * 
* * string name = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -762,8 +768,8 @@ public Builder setName(java.lang.String value) { *
      * Required. The name of the function to call.
      * Must start with a letter or an underscore.
-     * Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum
-     * length of 64.
+     * Must be a-z, A-Z, 0-9, or contain underscores, dots and dashes, with a
+     * maximum length of 64.
      * 
* * string name = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -782,8 +788,8 @@ public Builder clearName() { *
      * Required. The name of the function to call.
      * Must start with a letter or an underscore.
-     * Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum
-     * length of 64.
+     * Must be a-z, A-Z, 0-9, or contain underscores, dots and dashes, with a
+     * maximum length of 64.
      * 
* * string name = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -927,8 +933,10 @@ public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { * format. Reflects the Open API 3.03 Parameter Object. string Key: the name * of the parameter. Parameter names are case sensitive. Schema Value: the * Schema defining the type used for the parameter. For function with no - * parameters, this can be left unset. Example with 1 required and 1 optional - * parameter: type: OBJECT properties: + * parameters, this can be left unset. Parameter names must start with a + * letter or an underscore and must only contain chars a-z, A-Z, 0-9, or + * underscores with a maximum length of 64. Example with 1 required and 1 + * optional parameter: type: OBJECT properties: * param1: * type: STRING * param2: @@ -954,8 +962,10 @@ public boolean hasParameters() { * format. Reflects the Open API 3.03 Parameter Object. string Key: the name * of the parameter. Parameter names are case sensitive. Schema Value: the * Schema defining the type used for the parameter. For function with no - * parameters, this can be left unset. Example with 1 required and 1 optional - * parameter: type: OBJECT properties: + * parameters, this can be left unset. Parameter names must start with a + * letter or an underscore and must only contain chars a-z, A-Z, 0-9, or + * underscores with a maximum length of 64. Example with 1 required and 1 + * optional parameter: type: OBJECT properties: * param1: * type: STRING * param2: @@ -987,8 +997,10 @@ public com.google.cloud.aiplatform.v1.Schema getParameters() { * format. Reflects the Open API 3.03 Parameter Object. string Key: the name * of the parameter. Parameter names are case sensitive. Schema Value: the * Schema defining the type used for the parameter. For function with no - * parameters, this can be left unset. Example with 1 required and 1 optional - * parameter: type: OBJECT properties: + * parameters, this can be left unset. Parameter names must start with a + * letter or an underscore and must only contain chars a-z, A-Z, 0-9, or + * underscores with a maximum length of 64. Example with 1 required and 1 + * optional parameter: type: OBJECT properties: * param1: * type: STRING * param2: @@ -1022,8 +1034,10 @@ public Builder setParameters(com.google.cloud.aiplatform.v1.Schema value) { * format. Reflects the Open API 3.03 Parameter Object. string Key: the name * of the parameter. Parameter names are case sensitive. Schema Value: the * Schema defining the type used for the parameter. For function with no - * parameters, this can be left unset. Example with 1 required and 1 optional - * parameter: type: OBJECT properties: + * parameters, this can be left unset. Parameter names must start with a + * letter or an underscore and must only contain chars a-z, A-Z, 0-9, or + * underscores with a maximum length of 64. Example with 1 required and 1 + * optional parameter: type: OBJECT properties: * param1: * type: STRING * param2: @@ -1054,8 +1068,10 @@ public Builder setParameters(com.google.cloud.aiplatform.v1.Schema.Builder build * format. Reflects the Open API 3.03 Parameter Object. string Key: the name * of the parameter. Parameter names are case sensitive. Schema Value: the * Schema defining the type used for the parameter. For function with no - * parameters, this can be left unset. Example with 1 required and 1 optional - * parameter: type: OBJECT properties: + * parameters, this can be left unset. Parameter names must start with a + * letter or an underscore and must only contain chars a-z, A-Z, 0-9, or + * underscores with a maximum length of 64. Example with 1 required and 1 + * optional parameter: type: OBJECT properties: * param1: * type: STRING * param2: @@ -1094,8 +1110,10 @@ public Builder mergeParameters(com.google.cloud.aiplatform.v1.Schema value) { * format. Reflects the Open API 3.03 Parameter Object. string Key: the name * of the parameter. Parameter names are case sensitive. Schema Value: the * Schema defining the type used for the parameter. For function with no - * parameters, this can be left unset. Example with 1 required and 1 optional - * parameter: type: OBJECT properties: + * parameters, this can be left unset. Parameter names must start with a + * letter or an underscore and must only contain chars a-z, A-Z, 0-9, or + * underscores with a maximum length of 64. Example with 1 required and 1 + * optional parameter: type: OBJECT properties: * param1: * type: STRING * param2: @@ -1126,8 +1144,10 @@ public Builder clearParameters() { * format. Reflects the Open API 3.03 Parameter Object. string Key: the name * of the parameter. Parameter names are case sensitive. Schema Value: the * Schema defining the type used for the parameter. For function with no - * parameters, this can be left unset. Example with 1 required and 1 optional - * parameter: type: OBJECT properties: + * parameters, this can be left unset. Parameter names must start with a + * letter or an underscore and must only contain chars a-z, A-Z, 0-9, or + * underscores with a maximum length of 64. Example with 1 required and 1 + * optional parameter: type: OBJECT properties: * param1: * type: STRING * param2: @@ -1153,8 +1173,10 @@ public com.google.cloud.aiplatform.v1.Schema.Builder getParametersBuilder() { * format. Reflects the Open API 3.03 Parameter Object. string Key: the name * of the parameter. Parameter names are case sensitive. Schema Value: the * Schema defining the type used for the parameter. For function with no - * parameters, this can be left unset. Example with 1 required and 1 optional - * parameter: type: OBJECT properties: + * parameters, this can be left unset. Parameter names must start with a + * letter or an underscore and must only contain chars a-z, A-Z, 0-9, or + * underscores with a maximum length of 64. Example with 1 required and 1 + * optional parameter: type: OBJECT properties: * param1: * type: STRING * param2: @@ -1184,8 +1206,10 @@ public com.google.cloud.aiplatform.v1.SchemaOrBuilder getParametersOrBuilder() { * format. Reflects the Open API 3.03 Parameter Object. string Key: the name * of the parameter. Parameter names are case sensitive. Schema Value: the * Schema defining the type used for the parameter. For function with no - * parameters, this can be left unset. Example with 1 required and 1 optional - * parameter: type: OBJECT properties: + * parameters, this can be left unset. Parameter names must start with a + * letter or an underscore and must only contain chars a-z, A-Z, 0-9, or + * underscores with a maximum length of 64. Example with 1 required and 1 + * optional parameter: type: OBJECT properties: * param1: * type: STRING * param2: diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FunctionDeclarationOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FunctionDeclarationOrBuilder.java index 9c5eabb661b6..611927bcce35 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FunctionDeclarationOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FunctionDeclarationOrBuilder.java @@ -30,8 +30,8 @@ public interface FunctionDeclarationOrBuilder *
    * Required. The name of the function to call.
    * Must start with a letter or an underscore.
-   * Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum
-   * length of 64.
+   * Must be a-z, A-Z, 0-9, or contain underscores, dots and dashes, with a
+   * maximum length of 64.
    * 
* * string name = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -45,8 +45,8 @@ public interface FunctionDeclarationOrBuilder *
    * Required. The name of the function to call.
    * Must start with a letter or an underscore.
-   * Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum
-   * length of 64.
+   * Must be a-z, A-Z, 0-9, or contain underscores, dots and dashes, with a
+   * maximum length of 64.
    * 
* * string name = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -90,8 +90,10 @@ public interface FunctionDeclarationOrBuilder * format. Reflects the Open API 3.03 Parameter Object. string Key: the name * of the parameter. Parameter names are case sensitive. Schema Value: the * Schema defining the type used for the parameter. For function with no - * parameters, this can be left unset. Example with 1 required and 1 optional - * parameter: type: OBJECT properties: + * parameters, this can be left unset. Parameter names must start with a + * letter or an underscore and must only contain chars a-z, A-Z, 0-9, or + * underscores with a maximum length of 64. Example with 1 required and 1 + * optional parameter: type: OBJECT properties: * param1: * type: STRING * param2: @@ -115,8 +117,10 @@ public interface FunctionDeclarationOrBuilder * format. Reflects the Open API 3.03 Parameter Object. string Key: the name * of the parameter. Parameter names are case sensitive. Schema Value: the * Schema defining the type used for the parameter. For function with no - * parameters, this can be left unset. Example with 1 required and 1 optional - * parameter: type: OBJECT properties: + * parameters, this can be left unset. Parameter names must start with a + * letter or an underscore and must only contain chars a-z, A-Z, 0-9, or + * underscores with a maximum length of 64. Example with 1 required and 1 + * optional parameter: type: OBJECT properties: * param1: * type: STRING * param2: @@ -140,8 +144,10 @@ public interface FunctionDeclarationOrBuilder * format. Reflects the Open API 3.03 Parameter Object. string Key: the name * of the parameter. Parameter names are case sensitive. Schema Value: the * Schema defining the type used for the parameter. For function with no - * parameters, this can be left unset. Example with 1 required and 1 optional - * parameter: type: OBJECT properties: + * parameters, this can be left unset. Parameter names must start with a + * letter or an underscore and must only contain chars a-z, A-Z, 0-9, or + * underscores with a maximum length of 64. Example with 1 required and 1 + * optional parameter: type: OBJECT properties: * param1: * type: STRING * param2: diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GenAiTuningServiceProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GenAiTuningServiceProto.java new file mode 100644 index 000000000000..c2ae47eb94b3 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GenAiTuningServiceProto.java @@ -0,0 +1,179 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/genai_tuning_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +public final class GenAiTuningServiceProto { + private GenAiTuningServiceProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_CreateTuningJobRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_CreateTuningJobRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_GetTuningJobRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_GetTuningJobRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_ListTuningJobsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ListTuningJobsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_ListTuningJobsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ListTuningJobsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_CancelTuningJobRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_CancelTuningJobRequest_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n5google/cloud/aiplatform/v1/genai_tunin" + + "g_service.proto\022\032google.cloud.aiplatform" + + ".v1\032\034google/api/annotations.proto\032\027googl" + + "e/api/client.proto\032\037google/api/field_beh" + + "avior.proto\032\031google/api/resource.proto\032+" + + "google/cloud/aiplatform/v1/tuning_job.pr" + + "oto\032\033google/protobuf/empty.proto\"\223\001\n\026Cre" + + "ateTuningJobRequest\0229\n\006parent\030\001 \001(\tB)\340A\002" + + "\372A#\n!locations.googleapis.com/Location\022>" + + "\n\ntuning_job\030\002 \001(\0132%.google.cloud.aiplat" + + "form.v1.TuningJobB\003\340A\002\"P\n\023GetTuningJobRe" + + "quest\0229\n\004name\030\001 \001(\tB+\340A\002\372A%\n#aiplatform." + + "googleapis.com/TuningJob\"\230\001\n\025ListTuningJ" + + "obsRequest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!loca" + + "tions.googleapis.com/Location\022\023\n\006filter\030" + + "\002 \001(\tB\003\340A\001\022\026\n\tpage_size\030\003 \001(\005B\003\340A\001\022\027\n\npa" + + "ge_token\030\004 \001(\tB\003\340A\001\"m\n\026ListTuningJobsRes" + + "ponse\022:\n\013tuning_jobs\030\001 \003(\0132%.google.clou" + + "d.aiplatform.v1.TuningJob\022\027\n\017next_page_t" + + "oken\030\002 \001(\t\"S\n\026CancelTuningJobRequest\0229\n\004" + + "name\030\001 \001(\tB+\340A\002\372A%\n#aiplatform.googleapi" + + "s.com/TuningJob2\266\006\n\022GenAiTuningService\022\304" + + "\001\n\017CreateTuningJob\0222.google.cloud.aiplat" + + "form.v1.CreateTuningJobRequest\032%.google." + + "cloud.aiplatform.v1.TuningJob\"V\332A\021parent" + + ",tuning_job\202\323\344\223\002<\"./v1/{parent=projects/" + + "*/locations/*}/tuningJobs:\ntuning_job\022\245\001" + + "\n\014GetTuningJob\022/.google.cloud.aiplatform" + + ".v1.GetTuningJobRequest\032%.google.cloud.a" + + "iplatform.v1.TuningJob\"=\332A\004name\202\323\344\223\0020\022./" + + "v1/{name=projects/*/locations/*/tuningJo" + + "bs/*}\022\270\001\n\016ListTuningJobs\0221.google.cloud." + + "aiplatform.v1.ListTuningJobsRequest\0322.go" + + "ogle.cloud.aiplatform.v1.ListTuningJobsR" + + "esponse\"?\332A\006parent\202\323\344\223\0020\022./v1/{parent=pr" + + "ojects/*/locations/*}/tuningJobs\022\246\001\n\017Can" + + "celTuningJob\0222.google.cloud.aiplatform.v" + + "1.CancelTuningJobRequest\032\026.google.protob" + + "uf.Empty\"G\332A\004name\202\323\344\223\002:\"5/v1/{name=proje" + + "cts/*/locations/*/tuningJobs/*}:cancel:\001" + + "*\032M\312A\031aiplatform.googleapis.com\322A.https:" + + "//www.googleapis.com/auth/cloud-platform" + + "B\325\001\n\036com.google.cloud.aiplatform.v1B\027Gen" + + "AiTuningServiceProtoP\001Z>cloud.google.com" + + "/go/aiplatform/apiv1/aiplatformpb;aiplat" + + "formpb\252\002\032Google.Cloud.AIPlatform.V1\312\002\032Go" + + "ogle\\Cloud\\AIPlatform\\V1\352\002\035Google::Cloud" + + "::AIPlatform::V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.aiplatform.v1.TuningJobProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1_CreateTuningJobRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1_CreateTuningJobRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_CreateTuningJobRequest_descriptor, + new java.lang.String[] { + "Parent", "TuningJob", + }); + internal_static_google_cloud_aiplatform_v1_GetTuningJobRequest_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_aiplatform_v1_GetTuningJobRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_GetTuningJobRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_aiplatform_v1_ListTuningJobsRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_aiplatform_v1_ListTuningJobsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ListTuningJobsRequest_descriptor, + new java.lang.String[] { + "Parent", "Filter", "PageSize", "PageToken", + }); + internal_static_google_cloud_aiplatform_v1_ListTuningJobsResponse_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_aiplatform_v1_ListTuningJobsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ListTuningJobsResponse_descriptor, + new java.lang.String[] { + "TuningJobs", "NextPageToken", + }); + internal_static_google_cloud_aiplatform_v1_CancelTuningJobRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_aiplatform_v1_CancelTuningJobRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_CancelTuningJobRequest_descriptor, + new java.lang.String[] { + "Name", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.aiplatform.v1.TuningJobProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GenerateContentRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GenerateContentRequest.java index 18fcf5e304d4..3827275d9c6b 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GenerateContentRequest.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GenerateContentRequest.java @@ -223,6 +223,68 @@ public com.google.cloud.aiplatform.v1.ContentOrBuilder getContentsOrBuilder(int return contents_.get(index); } + public static final int SYSTEM_INSTRUCTION_FIELD_NUMBER = 8; + private com.google.cloud.aiplatform.v1.Content systemInstruction_; + /** + * + * + *
+   * Optional. The user provided system instructions for the model.
+   * Note: only text should be used in parts and content in each part will be in
+   * a separate paragraph.
+   * 
+ * + * + * optional .google.cloud.aiplatform.v1.Content system_instruction = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the systemInstruction field is set. + */ + @java.lang.Override + public boolean hasSystemInstruction() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Optional. The user provided system instructions for the model.
+   * Note: only text should be used in parts and content in each part will be in
+   * a separate paragraph.
+   * 
+ * + * + * optional .google.cloud.aiplatform.v1.Content system_instruction = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The systemInstruction. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.Content getSystemInstruction() { + return systemInstruction_ == null + ? com.google.cloud.aiplatform.v1.Content.getDefaultInstance() + : systemInstruction_; + } + /** + * + * + *
+   * Optional. The user provided system instructions for the model.
+   * Note: only text should be used in parts and content in each part will be in
+   * a separate paragraph.
+   * 
+ * + * + * optional .google.cloud.aiplatform.v1.Content system_instruction = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ContentOrBuilder getSystemInstructionOrBuilder() { + return systemInstruction_ == null + ? com.google.cloud.aiplatform.v1.Content.getDefaultInstance() + : systemInstruction_; + } + public static final int TOOLS_FIELD_NUMBER = 6; @SuppressWarnings("serial") @@ -433,7 +495,7 @@ public com.google.cloud.aiplatform.v1.SafetySettingOrBuilder getSafetySettingsOr */ @java.lang.Override public boolean hasGenerationConfig() { - return ((bitField0_ & 0x00000001) != 0); + return ((bitField0_ & 0x00000002) != 0); } /** * @@ -492,7 +554,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < safetySettings_.size(); i++) { output.writeMessage(3, safetySettings_.get(i)); } - if (((bitField0_ & 0x00000001) != 0)) { + if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(4, getGenerationConfig()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) { @@ -501,6 +563,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < tools_.size(); i++) { output.writeMessage(6, tools_.get(i)); } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(8, getSystemInstruction()); + } getUnknownFields().writeTo(output); } @@ -516,7 +581,7 @@ public int getSerializedSize() { for (int i = 0; i < safetySettings_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, safetySettings_.get(i)); } - if (((bitField0_ & 0x00000001) != 0)) { + if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getGenerationConfig()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) { @@ -525,6 +590,9 @@ public int getSerializedSize() { for (int i = 0; i < tools_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, tools_.get(i)); } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getSystemInstruction()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -543,6 +611,10 @@ public boolean equals(final java.lang.Object obj) { if (!getModel().equals(other.getModel())) return false; if (!getContentsList().equals(other.getContentsList())) return false; + if (hasSystemInstruction() != other.hasSystemInstruction()) return false; + if (hasSystemInstruction()) { + if (!getSystemInstruction().equals(other.getSystemInstruction())) return false; + } if (!getToolsList().equals(other.getToolsList())) return false; if (!getSafetySettingsList().equals(other.getSafetySettingsList())) return false; if (hasGenerationConfig() != other.hasGenerationConfig()) return false; @@ -566,6 +638,10 @@ public int hashCode() { hash = (37 * hash) + CONTENTS_FIELD_NUMBER; hash = (53 * hash) + getContentsList().hashCode(); } + if (hasSystemInstruction()) { + hash = (37 * hash) + SYSTEM_INSTRUCTION_FIELD_NUMBER; + hash = (53 * hash) + getSystemInstruction().hashCode(); + } if (getToolsCount() > 0) { hash = (37 * hash) + TOOLS_FIELD_NUMBER; hash = (53 * hash) + getToolsList().hashCode(); @@ -720,6 +796,7 @@ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { getContentsFieldBuilder(); + getSystemInstructionFieldBuilder(); getToolsFieldBuilder(); getSafetySettingsFieldBuilder(); getGenerationConfigFieldBuilder(); @@ -738,20 +815,25 @@ public Builder clear() { contentsBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000002); + systemInstruction_ = null; + if (systemInstructionBuilder_ != null) { + systemInstructionBuilder_.dispose(); + systemInstructionBuilder_ = null; + } if (toolsBuilder_ == null) { tools_ = java.util.Collections.emptyList(); } else { tools_ = null; toolsBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000008); if (safetySettingsBuilder_ == null) { safetySettings_ = java.util.Collections.emptyList(); } else { safetySettings_ = null; safetySettingsBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000010); generationConfig_ = null; if (generationConfigBuilder_ != null) { generationConfigBuilder_.dispose(); @@ -804,18 +886,18 @@ private void buildPartialRepeatedFields( result.contents_ = contentsBuilder_.build(); } if (toolsBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { + if (((bitField0_ & 0x00000008) != 0)) { tools_ = java.util.Collections.unmodifiableList(tools_); - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000008); } result.tools_ = tools_; } else { result.tools_ = toolsBuilder_.build(); } if (safetySettingsBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0)) { + if (((bitField0_ & 0x00000010) != 0)) { safetySettings_ = java.util.Collections.unmodifiableList(safetySettings_); - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000010); } result.safetySettings_ = safetySettings_; } else { @@ -829,10 +911,17 @@ private void buildPartial0(com.google.cloud.aiplatform.v1.GenerateContentRequest result.model_ = model_; } int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000010) != 0)) { + if (((from_bitField0_ & 0x00000004) != 0)) { + result.systemInstruction_ = + systemInstructionBuilder_ == null + ? systemInstruction_ + : systemInstructionBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000020) != 0)) { result.generationConfig_ = generationConfigBuilder_ == null ? generationConfig_ : generationConfigBuilder_.build(); - to_bitField0_ |= 0x00000001; + to_bitField0_ |= 0x00000002; } result.bitField0_ |= to_bitField0_; } @@ -915,11 +1004,14 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1.GenerateContentRequest o } } } + if (other.hasSystemInstruction()) { + mergeSystemInstruction(other.getSystemInstruction()); + } if (toolsBuilder_ == null) { if (!other.tools_.isEmpty()) { if (tools_.isEmpty()) { tools_ = other.tools_; - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000008); } else { ensureToolsIsMutable(); tools_.addAll(other.tools_); @@ -932,7 +1024,7 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1.GenerateContentRequest o toolsBuilder_.dispose(); toolsBuilder_ = null; tools_ = other.tools_; - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000008); toolsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getToolsFieldBuilder() @@ -946,7 +1038,7 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1.GenerateContentRequest o if (!other.safetySettings_.isEmpty()) { if (safetySettings_.isEmpty()) { safetySettings_ = other.safetySettings_; - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000010); } else { ensureSafetySettingsIsMutable(); safetySettings_.addAll(other.safetySettings_); @@ -959,7 +1051,7 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1.GenerateContentRequest o safetySettingsBuilder_.dispose(); safetySettingsBuilder_ = null; safetySettings_ = other.safetySettings_; - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000010); safetySettingsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getSafetySettingsFieldBuilder() @@ -1028,7 +1120,7 @@ public Builder mergeFrom( { input.readMessage( getGenerationConfigFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; break; } // case 34 case 42: @@ -1050,6 +1142,13 @@ public Builder mergeFrom( } break; } // case 50 + case 66: + { + input.readMessage( + getSystemInstructionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 66 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1641,13 +1740,235 @@ public java.util.List getContent return contentsBuilder_; } + private com.google.cloud.aiplatform.v1.Content systemInstruction_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.Content, + com.google.cloud.aiplatform.v1.Content.Builder, + com.google.cloud.aiplatform.v1.ContentOrBuilder> + systemInstructionBuilder_; + /** + * + * + *
+     * Optional. The user provided system instructions for the model.
+     * Note: only text should be used in parts and content in each part will be in
+     * a separate paragraph.
+     * 
+ * + * + * optional .google.cloud.aiplatform.v1.Content system_instruction = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the systemInstruction field is set. + */ + public boolean hasSystemInstruction() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Optional. The user provided system instructions for the model.
+     * Note: only text should be used in parts and content in each part will be in
+     * a separate paragraph.
+     * 
+ * + * + * optional .google.cloud.aiplatform.v1.Content system_instruction = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The systemInstruction. + */ + public com.google.cloud.aiplatform.v1.Content getSystemInstruction() { + if (systemInstructionBuilder_ == null) { + return systemInstruction_ == null + ? com.google.cloud.aiplatform.v1.Content.getDefaultInstance() + : systemInstruction_; + } else { + return systemInstructionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. The user provided system instructions for the model.
+     * Note: only text should be used in parts and content in each part will be in
+     * a separate paragraph.
+     * 
+ * + * + * optional .google.cloud.aiplatform.v1.Content system_instruction = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSystemInstruction(com.google.cloud.aiplatform.v1.Content value) { + if (systemInstructionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + systemInstruction_ = value; + } else { + systemInstructionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The user provided system instructions for the model.
+     * Note: only text should be used in parts and content in each part will be in
+     * a separate paragraph.
+     * 
+ * + * + * optional .google.cloud.aiplatform.v1.Content system_instruction = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSystemInstruction( + com.google.cloud.aiplatform.v1.Content.Builder builderForValue) { + if (systemInstructionBuilder_ == null) { + systemInstruction_ = builderForValue.build(); + } else { + systemInstructionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The user provided system instructions for the model.
+     * Note: only text should be used in parts and content in each part will be in
+     * a separate paragraph.
+     * 
+ * + * + * optional .google.cloud.aiplatform.v1.Content system_instruction = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeSystemInstruction(com.google.cloud.aiplatform.v1.Content value) { + if (systemInstructionBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && systemInstruction_ != null + && systemInstruction_ != com.google.cloud.aiplatform.v1.Content.getDefaultInstance()) { + getSystemInstructionBuilder().mergeFrom(value); + } else { + systemInstruction_ = value; + } + } else { + systemInstructionBuilder_.mergeFrom(value); + } + if (systemInstruction_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Optional. The user provided system instructions for the model.
+     * Note: only text should be used in parts and content in each part will be in
+     * a separate paragraph.
+     * 
+ * + * + * optional .google.cloud.aiplatform.v1.Content system_instruction = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearSystemInstruction() { + bitField0_ = (bitField0_ & ~0x00000004); + systemInstruction_ = null; + if (systemInstructionBuilder_ != null) { + systemInstructionBuilder_.dispose(); + systemInstructionBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The user provided system instructions for the model.
+     * Note: only text should be used in parts and content in each part will be in
+     * a separate paragraph.
+     * 
+ * + * + * optional .google.cloud.aiplatform.v1.Content system_instruction = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1.Content.Builder getSystemInstructionBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getSystemInstructionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The user provided system instructions for the model.
+     * Note: only text should be used in parts and content in each part will be in
+     * a separate paragraph.
+     * 
+ * + * + * optional .google.cloud.aiplatform.v1.Content system_instruction = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1.ContentOrBuilder getSystemInstructionOrBuilder() { + if (systemInstructionBuilder_ != null) { + return systemInstructionBuilder_.getMessageOrBuilder(); + } else { + return systemInstruction_ == null + ? com.google.cloud.aiplatform.v1.Content.getDefaultInstance() + : systemInstruction_; + } + } + /** + * + * + *
+     * Optional. The user provided system instructions for the model.
+     * Note: only text should be used in parts and content in each part will be in
+     * a separate paragraph.
+     * 
+ * + * + * optional .google.cloud.aiplatform.v1.Content system_instruction = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.Content, + com.google.cloud.aiplatform.v1.Content.Builder, + com.google.cloud.aiplatform.v1.ContentOrBuilder> + getSystemInstructionFieldBuilder() { + if (systemInstructionBuilder_ == null) { + systemInstructionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.Content, + com.google.cloud.aiplatform.v1.Content.Builder, + com.google.cloud.aiplatform.v1.ContentOrBuilder>( + getSystemInstruction(), getParentForChildren(), isClean()); + systemInstruction_ = null; + } + return systemInstructionBuilder_; + } + private java.util.List tools_ = java.util.Collections.emptyList(); private void ensureToolsIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { + if (!((bitField0_ & 0x00000008) != 0)) { tools_ = new java.util.ArrayList(tools_); - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; } } @@ -1939,7 +2260,7 @@ public Builder addAllTools( public Builder clearTools() { if (toolsBuilder_ == null) { tools_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000008); onChanged(); } else { toolsBuilder_.clear(); @@ -2109,7 +2430,7 @@ public java.util.List getToolsBuild com.google.cloud.aiplatform.v1.Tool, com.google.cloud.aiplatform.v1.Tool.Builder, com.google.cloud.aiplatform.v1.ToolOrBuilder>( - tools_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + tools_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); tools_ = null; } return toolsBuilder_; @@ -2119,10 +2440,10 @@ public java.util.List getToolsBuild java.util.Collections.emptyList(); private void ensureSafetySettingsIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { + if (!((bitField0_ & 0x00000010) != 0)) { safetySettings_ = new java.util.ArrayList(safetySettings_); - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; } } @@ -2373,7 +2694,7 @@ public Builder addAllSafetySettings( public Builder clearSafetySettings() { if (safetySettingsBuilder_ == null) { safetySettings_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000010); onChanged(); } else { safetySettingsBuilder_.clear(); @@ -2520,7 +2841,7 @@ public com.google.cloud.aiplatform.v1.SafetySetting.Builder addSafetySettingsBui com.google.cloud.aiplatform.v1.SafetySetting.Builder, com.google.cloud.aiplatform.v1.SafetySettingOrBuilder>( safetySettings_, - ((bitField0_ & 0x00000008) != 0), + ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean()); safetySettings_ = null; @@ -2548,7 +2869,7 @@ public com.google.cloud.aiplatform.v1.SafetySetting.Builder addSafetySettingsBui * @return Whether the generationConfig field is set. */ public boolean hasGenerationConfig() { - return ((bitField0_ & 0x00000010) != 0); + return ((bitField0_ & 0x00000020) != 0); } /** * @@ -2592,7 +2913,7 @@ public Builder setGenerationConfig(com.google.cloud.aiplatform.v1.GenerationConf } else { generationConfigBuilder_.setMessage(value); } - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -2614,7 +2935,7 @@ public Builder setGenerationConfig( } else { generationConfigBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -2631,7 +2952,7 @@ public Builder setGenerationConfig( */ public Builder mergeGenerationConfig(com.google.cloud.aiplatform.v1.GenerationConfig value) { if (generationConfigBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0) + if (((bitField0_ & 0x00000020) != 0) && generationConfig_ != null && generationConfig_ != com.google.cloud.aiplatform.v1.GenerationConfig.getDefaultInstance()) { @@ -2643,7 +2964,7 @@ public Builder mergeGenerationConfig(com.google.cloud.aiplatform.v1.GenerationCo generationConfigBuilder_.mergeFrom(value); } if (generationConfig_ != null) { - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); } return this; @@ -2660,7 +2981,7 @@ public Builder mergeGenerationConfig(com.google.cloud.aiplatform.v1.GenerationCo * */ public Builder clearGenerationConfig() { - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000020); generationConfig_ = null; if (generationConfigBuilder_ != null) { generationConfigBuilder_.dispose(); @@ -2681,7 +3002,7 @@ public Builder clearGenerationConfig() { * */ public com.google.cloud.aiplatform.v1.GenerationConfig.Builder getGenerationConfigBuilder() { - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); return getGenerationConfigFieldBuilder().getBuilder(); } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GenerateContentRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GenerateContentRequestOrBuilder.java index 0d3f3219a94c..fb37c9e60ce8 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GenerateContentRequestOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GenerateContentRequestOrBuilder.java @@ -135,6 +135,53 @@ public interface GenerateContentRequestOrBuilder */ com.google.cloud.aiplatform.v1.ContentOrBuilder getContentsOrBuilder(int index); + /** + * + * + *
+   * Optional. The user provided system instructions for the model.
+   * Note: only text should be used in parts and content in each part will be in
+   * a separate paragraph.
+   * 
+ * + * + * optional .google.cloud.aiplatform.v1.Content system_instruction = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the systemInstruction field is set. + */ + boolean hasSystemInstruction(); + /** + * + * + *
+   * Optional. The user provided system instructions for the model.
+   * Note: only text should be used in parts and content in each part will be in
+   * a separate paragraph.
+   * 
+ * + * + * optional .google.cloud.aiplatform.v1.Content system_instruction = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The systemInstruction. + */ + com.google.cloud.aiplatform.v1.Content getSystemInstruction(); + /** + * + * + *
+   * Optional. The user provided system instructions for the model.
+   * Note: only text should be used in parts and content in each part will be in
+   * a separate paragraph.
+   * 
+ * + * + * optional .google.cloud.aiplatform.v1.Content system_instruction = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.aiplatform.v1.ContentOrBuilder getSystemInstructionOrBuilder(); + /** * * diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GenerateContentResponse.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GenerateContentResponse.java index 3cc0a2c6e863..1361e67ef5c3 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GenerateContentResponse.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GenerateContentResponse.java @@ -272,6 +272,27 @@ public enum BlockedReason implements com.google.protobuf.ProtocolMessageEnum { * OTHER = 2; */ OTHER(2), + /** + * + * + *
+       * Candidates blocked due to the terms which are included from the
+       * terminology blocklist.
+       * 
+ * + * BLOCKLIST = 3; + */ + BLOCKLIST(3), + /** + * + * + *
+       * Candidates blocked due to prohibited content.
+       * 
+ * + * PROHIBITED_CONTENT = 4; + */ + PROHIBITED_CONTENT(4), UNRECOGNIZED(-1), ; @@ -305,6 +326,27 @@ public enum BlockedReason implements com.google.protobuf.ProtocolMessageEnum { * OTHER = 2; */ public static final int OTHER_VALUE = 2; + /** + * + * + *
+       * Candidates blocked due to the terms which are included from the
+       * terminology blocklist.
+       * 
+ * + * BLOCKLIST = 3; + */ + public static final int BLOCKLIST_VALUE = 3; + /** + * + * + *
+       * Candidates blocked due to prohibited content.
+       * 
+ * + * PROHIBITED_CONTENT = 4; + */ + public static final int PROHIBITED_CONTENT_VALUE = 4; public final int getNumber() { if (this == UNRECOGNIZED) { @@ -336,6 +378,10 @@ public static BlockedReason forNumber(int value) { return SAFETY; case 2: return OTHER; + case 3: + return BLOCKLIST; + case 4: + return PROHIBITED_CONTENT; default: return null; } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GenerationConfig.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GenerationConfig.java index c67ff5ad6ac1..ebbe6586529d 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GenerationConfig.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GenerationConfig.java @@ -40,6 +40,7 @@ private GenerationConfig(com.google.protobuf.GeneratedMessageV3.Builder build private GenerationConfig() { stopSequences_ = com.google.protobuf.LazyStringArrayList.emptyList(); + responseMimeType_ = ""; } @java.lang.Override @@ -293,6 +294,135 @@ public com.google.protobuf.ByteString getStopSequencesBytes(int index) { return stopSequences_.getByteString(index); } + public static final int PRESENCE_PENALTY_FIELD_NUMBER = 8; + private float presencePenalty_ = 0F; + /** + * + * + *
+   * Optional. Positive penalties.
+   * 
+ * + * optional float presence_penalty = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the presencePenalty field is set. + */ + @java.lang.Override + public boolean hasPresencePenalty() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+   * Optional. Positive penalties.
+   * 
+ * + * optional float presence_penalty = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The presencePenalty. + */ + @java.lang.Override + public float getPresencePenalty() { + return presencePenalty_; + } + + public static final int FREQUENCY_PENALTY_FIELD_NUMBER = 9; + private float frequencyPenalty_ = 0F; + /** + * + * + *
+   * Optional. Frequency penalties.
+   * 
+ * + * optional float frequency_penalty = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the frequencyPenalty field is set. + */ + @java.lang.Override + public boolean hasFrequencyPenalty() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+   * Optional. Frequency penalties.
+   * 
+ * + * optional float frequency_penalty = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The frequencyPenalty. + */ + @java.lang.Override + public float getFrequencyPenalty() { + return frequencyPenalty_; + } + + public static final int RESPONSE_MIME_TYPE_FIELD_NUMBER = 13; + + @SuppressWarnings("serial") + private volatile java.lang.Object responseMimeType_ = ""; + /** + * + * + *
+   * Optional. Output response mimetype of the generated candidate text.
+   * Supported mimetype:
+   * - `text/plain`: (default) Text output.
+   * - `application/json`: JSON response in the candidates.
+   * The model needs to be prompted to output the appropriate response type,
+   * otherwise the behavior is undefined.
+   * This is a preview feature.
+   * 
+ * + * string response_mime_type = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The responseMimeType. + */ + @java.lang.Override + public java.lang.String getResponseMimeType() { + java.lang.Object ref = responseMimeType_; + 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(); + responseMimeType_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Output response mimetype of the generated candidate text.
+   * Supported mimetype:
+   * - `text/plain`: (default) Text output.
+   * - `application/json`: JSON response in the candidates.
+   * The model needs to be prompted to output the appropriate response type,
+   * otherwise the behavior is undefined.
+   * This is a preview feature.
+   * 
+ * + * string response_mime_type = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for responseMimeType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResponseMimeTypeBytes() { + java.lang.Object ref = responseMimeType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + responseMimeType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -325,6 +455,15 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < stopSequences_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, stopSequences_.getRaw(i)); } + if (((bitField0_ & 0x00000020) != 0)) { + output.writeFloat(8, presencePenalty_); + } + if (((bitField0_ & 0x00000040) != 0)) { + output.writeFloat(9, frequencyPenalty_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(responseMimeType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 13, responseMimeType_); + } getUnknownFields().writeTo(output); } @@ -357,6 +496,15 @@ public int getSerializedSize() { size += dataSize; size += 1 * getStopSequencesList().size(); } + if (((bitField0_ & 0x00000020) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(8, presencePenalty_); + } + if (((bitField0_ & 0x00000040) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(9, frequencyPenalty_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(responseMimeType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, responseMimeType_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -397,6 +545,17 @@ public boolean equals(final java.lang.Object obj) { if (getMaxOutputTokens() != other.getMaxOutputTokens()) return false; } if (!getStopSequencesList().equals(other.getStopSequencesList())) return false; + if (hasPresencePenalty() != other.hasPresencePenalty()) return false; + if (hasPresencePenalty()) { + if (java.lang.Float.floatToIntBits(getPresencePenalty()) + != java.lang.Float.floatToIntBits(other.getPresencePenalty())) return false; + } + if (hasFrequencyPenalty() != other.hasFrequencyPenalty()) return false; + if (hasFrequencyPenalty()) { + if (java.lang.Float.floatToIntBits(getFrequencyPenalty()) + != java.lang.Float.floatToIntBits(other.getFrequencyPenalty())) return false; + } + if (!getResponseMimeType().equals(other.getResponseMimeType())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -432,6 +591,16 @@ public int hashCode() { hash = (37 * hash) + STOP_SEQUENCES_FIELD_NUMBER; hash = (53 * hash) + getStopSequencesList().hashCode(); } + if (hasPresencePenalty()) { + hash = (37 * hash) + PRESENCE_PENALTY_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getPresencePenalty()); + } + if (hasFrequencyPenalty()) { + hash = (37 * hash) + FREQUENCY_PENALTY_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getFrequencyPenalty()); + } + hash = (37 * hash) + RESPONSE_MIME_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getResponseMimeType().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -577,6 +746,9 @@ public Builder clear() { candidateCount_ = 0; maxOutputTokens_ = 0; stopSequences_ = com.google.protobuf.LazyStringArrayList.emptyList(); + presencePenalty_ = 0F; + frequencyPenalty_ = 0F; + responseMimeType_ = ""; return this; } @@ -638,6 +810,17 @@ private void buildPartial0(com.google.cloud.aiplatform.v1.GenerationConfig resul stopSequences_.makeImmutable(); result.stopSequences_ = stopSequences_; } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.presencePenalty_ = presencePenalty_; + to_bitField0_ |= 0x00000020; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.frequencyPenalty_ = frequencyPenalty_; + to_bitField0_ |= 0x00000040; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.responseMimeType_ = responseMimeType_; + } result.bitField0_ |= to_bitField0_; } @@ -712,6 +895,17 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1.GenerationConfig other) } onChanged(); } + if (other.hasPresencePenalty()) { + setPresencePenalty(other.getPresencePenalty()); + } + if (other.hasFrequencyPenalty()) { + setFrequencyPenalty(other.getFrequencyPenalty()); + } + if (!other.getResponseMimeType().isEmpty()) { + responseMimeType_ = other.responseMimeType_; + bitField0_ |= 0x00000100; + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -775,6 +969,24 @@ public Builder mergeFrom( stopSequences_.add(s); break; } // case 50 + case 69: + { + presencePenalty_ = input.readFloat(); + bitField0_ |= 0x00000040; + break; + } // case 69 + case 77: + { + frequencyPenalty_ = input.readFloat(); + bitField0_ |= 0x00000080; + break; + } // case 77 + case 106: + { + responseMimeType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 106 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1308,6 +1520,278 @@ public Builder addStopSequencesBytes(com.google.protobuf.ByteString value) { return this; } + private float presencePenalty_; + /** + * + * + *
+     * Optional. Positive penalties.
+     * 
+ * + * optional float presence_penalty = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the presencePenalty field is set. + */ + @java.lang.Override + public boolean hasPresencePenalty() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+     * Optional. Positive penalties.
+     * 
+ * + * optional float presence_penalty = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The presencePenalty. + */ + @java.lang.Override + public float getPresencePenalty() { + return presencePenalty_; + } + /** + * + * + *
+     * Optional. Positive penalties.
+     * 
+ * + * optional float presence_penalty = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The presencePenalty to set. + * @return This builder for chaining. + */ + public Builder setPresencePenalty(float value) { + + presencePenalty_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Positive penalties.
+     * 
+ * + * optional float presence_penalty = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPresencePenalty() { + bitField0_ = (bitField0_ & ~0x00000040); + presencePenalty_ = 0F; + onChanged(); + return this; + } + + private float frequencyPenalty_; + /** + * + * + *
+     * Optional. Frequency penalties.
+     * 
+ * + * optional float frequency_penalty = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the frequencyPenalty field is set. + */ + @java.lang.Override + public boolean hasFrequencyPenalty() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * + * + *
+     * Optional. Frequency penalties.
+     * 
+ * + * optional float frequency_penalty = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The frequencyPenalty. + */ + @java.lang.Override + public float getFrequencyPenalty() { + return frequencyPenalty_; + } + /** + * + * + *
+     * Optional. Frequency penalties.
+     * 
+ * + * optional float frequency_penalty = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The frequencyPenalty to set. + * @return This builder for chaining. + */ + public Builder setFrequencyPenalty(float value) { + + frequencyPenalty_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Frequency penalties.
+     * 
+ * + * optional float frequency_penalty = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFrequencyPenalty() { + bitField0_ = (bitField0_ & ~0x00000080); + frequencyPenalty_ = 0F; + onChanged(); + return this; + } + + private java.lang.Object responseMimeType_ = ""; + /** + * + * + *
+     * Optional. Output response mimetype of the generated candidate text.
+     * Supported mimetype:
+     * - `text/plain`: (default) Text output.
+     * - `application/json`: JSON response in the candidates.
+     * The model needs to be prompted to output the appropriate response type,
+     * otherwise the behavior is undefined.
+     * This is a preview feature.
+     * 
+ * + * string response_mime_type = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The responseMimeType. + */ + public java.lang.String getResponseMimeType() { + java.lang.Object ref = responseMimeType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + responseMimeType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Output response mimetype of the generated candidate text.
+     * Supported mimetype:
+     * - `text/plain`: (default) Text output.
+     * - `application/json`: JSON response in the candidates.
+     * The model needs to be prompted to output the appropriate response type,
+     * otherwise the behavior is undefined.
+     * This is a preview feature.
+     * 
+ * + * string response_mime_type = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for responseMimeType. + */ + public com.google.protobuf.ByteString getResponseMimeTypeBytes() { + java.lang.Object ref = responseMimeType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + responseMimeType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Output response mimetype of the generated candidate text.
+     * Supported mimetype:
+     * - `text/plain`: (default) Text output.
+     * - `application/json`: JSON response in the candidates.
+     * The model needs to be prompted to output the appropriate response type,
+     * otherwise the behavior is undefined.
+     * This is a preview feature.
+     * 
+ * + * string response_mime_type = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The responseMimeType to set. + * @return This builder for chaining. + */ + public Builder setResponseMimeType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + responseMimeType_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Output response mimetype of the generated candidate text.
+     * Supported mimetype:
+     * - `text/plain`: (default) Text output.
+     * - `application/json`: JSON response in the candidates.
+     * The model needs to be prompted to output the appropriate response type,
+     * otherwise the behavior is undefined.
+     * This is a preview feature.
+     * 
+ * + * string response_mime_type = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearResponseMimeType() { + responseMimeType_ = getDefaultInstance().getResponseMimeType(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Output response mimetype of the generated candidate text.
+     * Supported mimetype:
+     * - `text/plain`: (default) Text output.
+     * - `application/json`: JSON response in the candidates.
+     * The model needs to be prompted to output the appropriate response type,
+     * otherwise the behavior is undefined.
+     * This is a preview feature.
+     * 
+ * + * string response_mime_type = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for responseMimeType to set. + * @return This builder for chaining. + */ + public Builder setResponseMimeTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + responseMimeType_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GenerationConfigOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GenerationConfigOrBuilder.java index c08f11aa2702..08d3d6dca97e 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GenerationConfigOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GenerationConfigOrBuilder.java @@ -199,4 +199,91 @@ public interface GenerationConfigOrBuilder * @return The bytes of the stopSequences at the given index. */ com.google.protobuf.ByteString getStopSequencesBytes(int index); + + /** + * + * + *
+   * Optional. Positive penalties.
+   * 
+ * + * optional float presence_penalty = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the presencePenalty field is set. + */ + boolean hasPresencePenalty(); + /** + * + * + *
+   * Optional. Positive penalties.
+   * 
+ * + * optional float presence_penalty = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The presencePenalty. + */ + float getPresencePenalty(); + + /** + * + * + *
+   * Optional. Frequency penalties.
+   * 
+ * + * optional float frequency_penalty = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the frequencyPenalty field is set. + */ + boolean hasFrequencyPenalty(); + /** + * + * + *
+   * Optional. Frequency penalties.
+   * 
+ * + * optional float frequency_penalty = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The frequencyPenalty. + */ + float getFrequencyPenalty(); + + /** + * + * + *
+   * Optional. Output response mimetype of the generated candidate text.
+   * Supported mimetype:
+   * - `text/plain`: (default) Text output.
+   * - `application/json`: JSON response in the candidates.
+   * The model needs to be prompted to output the appropriate response type,
+   * otherwise the behavior is undefined.
+   * This is a preview feature.
+   * 
+ * + * string response_mime_type = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The responseMimeType. + */ + java.lang.String getResponseMimeType(); + /** + * + * + *
+   * Optional. Output response mimetype of the generated candidate text.
+   * Supported mimetype:
+   * - `text/plain`: (default) Text output.
+   * - `application/json`: JSON response in the candidates.
+   * The model needs to be prompted to output the appropriate response type,
+   * otherwise the behavior is undefined.
+   * This is a preview feature.
+   * 
+ * + * string response_mime_type = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for responseMimeType. + */ + com.google.protobuf.ByteString getResponseMimeTypeBytes(); } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetNotebookRuntimeRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetNotebookRuntimeRequest.java new file mode 100644 index 000000000000..6849b1c80837 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetNotebookRuntimeRequest.java @@ -0,0 +1,663 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/notebook_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for
+ * [NotebookService.GetNotebookRuntime][google.cloud.aiplatform.v1.NotebookService.GetNotebookRuntime]
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.GetNotebookRuntimeRequest} + */ +public final class GetNotebookRuntimeRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.GetNotebookRuntimeRequest) + GetNotebookRuntimeRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetNotebookRuntimeRequest.newBuilder() to construct. + private GetNotebookRuntimeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetNotebookRuntimeRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetNotebookRuntimeRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_GetNotebookRuntimeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_GetNotebookRuntimeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.GetNotebookRuntimeRequest.class, + com.google.cloud.aiplatform.v1.GetNotebookRuntimeRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the NotebookRuntime resource.
+   * Instead of checking whether the name is in valid NotebookRuntime resource
+   * name format, directly throw NotFound exception if there is no such
+   * NotebookRuntime in spanner.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the NotebookRuntime resource.
+   * Instead of checking whether the name is in valid NotebookRuntime resource
+   * name format, directly throw NotFound exception if there is no such
+   * NotebookRuntime in spanner.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.GetNotebookRuntimeRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.GetNotebookRuntimeRequest other = + (com.google.cloud.aiplatform.v1.GetNotebookRuntimeRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.GetNotebookRuntimeRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.GetNotebookRuntimeRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.GetNotebookRuntimeRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.GetNotebookRuntimeRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.GetNotebookRuntimeRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.GetNotebookRuntimeRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.GetNotebookRuntimeRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.GetNotebookRuntimeRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.GetNotebookRuntimeRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.GetNotebookRuntimeRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.GetNotebookRuntimeRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.GetNotebookRuntimeRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.GetNotebookRuntimeRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for
+   * [NotebookService.GetNotebookRuntime][google.cloud.aiplatform.v1.NotebookService.GetNotebookRuntime]
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.GetNotebookRuntimeRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.GetNotebookRuntimeRequest) + com.google.cloud.aiplatform.v1.GetNotebookRuntimeRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_GetNotebookRuntimeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_GetNotebookRuntimeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.GetNotebookRuntimeRequest.class, + com.google.cloud.aiplatform.v1.GetNotebookRuntimeRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.GetNotebookRuntimeRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_GetNotebookRuntimeRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GetNotebookRuntimeRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.GetNotebookRuntimeRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GetNotebookRuntimeRequest build() { + com.google.cloud.aiplatform.v1.GetNotebookRuntimeRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GetNotebookRuntimeRequest buildPartial() { + com.google.cloud.aiplatform.v1.GetNotebookRuntimeRequest result = + new com.google.cloud.aiplatform.v1.GetNotebookRuntimeRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.GetNotebookRuntimeRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.GetNotebookRuntimeRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.GetNotebookRuntimeRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.GetNotebookRuntimeRequest other) { + if (other == com.google.cloud.aiplatform.v1.GetNotebookRuntimeRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the NotebookRuntime resource.
+     * Instead of checking whether the name is in valid NotebookRuntime resource
+     * name format, directly throw NotFound exception if there is no such
+     * NotebookRuntime in spanner.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the NotebookRuntime resource.
+     * Instead of checking whether the name is in valid NotebookRuntime resource
+     * name format, directly throw NotFound exception if there is no such
+     * NotebookRuntime in spanner.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the NotebookRuntime resource.
+     * Instead of checking whether the name is in valid NotebookRuntime resource
+     * name format, directly throw NotFound exception if there is no such
+     * NotebookRuntime in spanner.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the NotebookRuntime resource.
+     * Instead of checking whether the name is in valid NotebookRuntime resource
+     * name format, directly throw NotFound exception if there is no such
+     * NotebookRuntime in spanner.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the NotebookRuntime resource.
+     * Instead of checking whether the name is in valid NotebookRuntime resource
+     * name format, directly throw NotFound exception if there is no such
+     * NotebookRuntime in spanner.
+     * 
+ * + * + * 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. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.GetNotebookRuntimeRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.GetNotebookRuntimeRequest) + private static final com.google.cloud.aiplatform.v1.GetNotebookRuntimeRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.GetNotebookRuntimeRequest(); + } + + public static com.google.cloud.aiplatform.v1.GetNotebookRuntimeRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetNotebookRuntimeRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GetNotebookRuntimeRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetNotebookRuntimeRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetNotebookRuntimeRequestOrBuilder.java new file mode 100644 index 000000000000..ad6b1c30f568 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetNotebookRuntimeRequestOrBuilder.java @@ -0,0 +1,61 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/notebook_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +public interface GetNotebookRuntimeRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.GetNotebookRuntimeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the NotebookRuntime resource.
+   * Instead of checking whether the name is in valid NotebookRuntime resource
+   * name format, directly throw NotFound exception if there is no such
+   * NotebookRuntime in spanner.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the NotebookRuntime resource.
+   * Instead of checking whether the name is in valid NotebookRuntime resource
+   * name format, directly throw NotFound exception if there is no such
+   * NotebookRuntime in spanner.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetNotebookRuntimeTemplateRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetNotebookRuntimeTemplateRequest.java new file mode 100644 index 000000000000..48b8b822d260 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetNotebookRuntimeTemplateRequest.java @@ -0,0 +1,664 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/notebook_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for
+ * [NotebookService.GetNotebookRuntimeTemplate][google.cloud.aiplatform.v1.NotebookService.GetNotebookRuntimeTemplate]
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.GetNotebookRuntimeTemplateRequest} + */ +public final class GetNotebookRuntimeTemplateRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.GetNotebookRuntimeTemplateRequest) + GetNotebookRuntimeTemplateRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetNotebookRuntimeTemplateRequest.newBuilder() to construct. + private GetNotebookRuntimeTemplateRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetNotebookRuntimeTemplateRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetNotebookRuntimeTemplateRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_GetNotebookRuntimeTemplateRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_GetNotebookRuntimeTemplateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.GetNotebookRuntimeTemplateRequest.class, + com.google.cloud.aiplatform.v1.GetNotebookRuntimeTemplateRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the NotebookRuntimeTemplate resource.
+   * Format:
+   * `projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the NotebookRuntimeTemplate resource.
+   * Format:
+   * `projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.GetNotebookRuntimeTemplateRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.GetNotebookRuntimeTemplateRequest other = + (com.google.cloud.aiplatform.v1.GetNotebookRuntimeTemplateRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.GetNotebookRuntimeTemplateRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.GetNotebookRuntimeTemplateRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.GetNotebookRuntimeTemplateRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.GetNotebookRuntimeTemplateRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.GetNotebookRuntimeTemplateRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.GetNotebookRuntimeTemplateRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.GetNotebookRuntimeTemplateRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.GetNotebookRuntimeTemplateRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.GetNotebookRuntimeTemplateRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.GetNotebookRuntimeTemplateRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.GetNotebookRuntimeTemplateRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.GetNotebookRuntimeTemplateRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.GetNotebookRuntimeTemplateRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for
+   * [NotebookService.GetNotebookRuntimeTemplate][google.cloud.aiplatform.v1.NotebookService.GetNotebookRuntimeTemplate]
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.GetNotebookRuntimeTemplateRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.GetNotebookRuntimeTemplateRequest) + com.google.cloud.aiplatform.v1.GetNotebookRuntimeTemplateRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_GetNotebookRuntimeTemplateRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_GetNotebookRuntimeTemplateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.GetNotebookRuntimeTemplateRequest.class, + com.google.cloud.aiplatform.v1.GetNotebookRuntimeTemplateRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.GetNotebookRuntimeTemplateRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_GetNotebookRuntimeTemplateRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GetNotebookRuntimeTemplateRequest + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.GetNotebookRuntimeTemplateRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GetNotebookRuntimeTemplateRequest build() { + com.google.cloud.aiplatform.v1.GetNotebookRuntimeTemplateRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GetNotebookRuntimeTemplateRequest buildPartial() { + com.google.cloud.aiplatform.v1.GetNotebookRuntimeTemplateRequest result = + new com.google.cloud.aiplatform.v1.GetNotebookRuntimeTemplateRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1.GetNotebookRuntimeTemplateRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.GetNotebookRuntimeTemplateRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.GetNotebookRuntimeTemplateRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.GetNotebookRuntimeTemplateRequest other) { + if (other + == com.google.cloud.aiplatform.v1.GetNotebookRuntimeTemplateRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the NotebookRuntimeTemplate resource.
+     * Format:
+     * `projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the NotebookRuntimeTemplate resource.
+     * Format:
+     * `projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the NotebookRuntimeTemplate resource.
+     * Format:
+     * `projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the NotebookRuntimeTemplate resource.
+     * Format:
+     * `projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the NotebookRuntimeTemplate resource.
+     * Format:
+     * `projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}`
+     * 
+ * + * + * 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. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.GetNotebookRuntimeTemplateRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.GetNotebookRuntimeTemplateRequest) + private static final com.google.cloud.aiplatform.v1.GetNotebookRuntimeTemplateRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.GetNotebookRuntimeTemplateRequest(); + } + + public static com.google.cloud.aiplatform.v1.GetNotebookRuntimeTemplateRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetNotebookRuntimeTemplateRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GetNotebookRuntimeTemplateRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetNotebookRuntimeTemplateRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetNotebookRuntimeTemplateRequestOrBuilder.java new file mode 100644 index 000000000000..fd2cff6ea493 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetNotebookRuntimeTemplateRequestOrBuilder.java @@ -0,0 +1,59 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/notebook_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +public interface GetNotebookRuntimeTemplateRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.GetNotebookRuntimeTemplateRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the NotebookRuntimeTemplate resource.
+   * Format:
+   * `projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the NotebookRuntimeTemplate resource.
+   * Format:
+   * `projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetPersistentResourceRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetPersistentResourceRequest.java new file mode 100644 index 000000000000..db8a6e5ea4a7 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetPersistentResourceRequest.java @@ -0,0 +1,656 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/persistent_resource_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for
+ * [PersistentResourceService.GetPersistentResource][google.cloud.aiplatform.v1.PersistentResourceService.GetPersistentResource].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.GetPersistentResourceRequest} + */ +public final class GetPersistentResourceRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.GetPersistentResourceRequest) + GetPersistentResourceRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetPersistentResourceRequest.newBuilder() to construct. + private GetPersistentResourceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetPersistentResourceRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetPersistentResourceRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.PersistentResourceServiceProto + .internal_static_google_cloud_aiplatform_v1_GetPersistentResourceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.PersistentResourceServiceProto + .internal_static_google_cloud_aiplatform_v1_GetPersistentResourceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.GetPersistentResourceRequest.class, + com.google.cloud.aiplatform.v1.GetPersistentResourceRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the PersistentResource resource.
+   * Format:
+   * `projects/{project_id_or_number}/locations/{location_id}/persistentResources/{persistent_resource_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the PersistentResource resource.
+   * Format:
+   * `projects/{project_id_or_number}/locations/{location_id}/persistentResources/{persistent_resource_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.GetPersistentResourceRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.GetPersistentResourceRequest other = + (com.google.cloud.aiplatform.v1.GetPersistentResourceRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.GetPersistentResourceRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.GetPersistentResourceRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.GetPersistentResourceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.GetPersistentResourceRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.GetPersistentResourceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.GetPersistentResourceRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.GetPersistentResourceRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.GetPersistentResourceRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.GetPersistentResourceRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.GetPersistentResourceRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.GetPersistentResourceRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.GetPersistentResourceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.GetPersistentResourceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for
+   * [PersistentResourceService.GetPersistentResource][google.cloud.aiplatform.v1.PersistentResourceService.GetPersistentResource].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.GetPersistentResourceRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.GetPersistentResourceRequest) + com.google.cloud.aiplatform.v1.GetPersistentResourceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.PersistentResourceServiceProto + .internal_static_google_cloud_aiplatform_v1_GetPersistentResourceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.PersistentResourceServiceProto + .internal_static_google_cloud_aiplatform_v1_GetPersistentResourceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.GetPersistentResourceRequest.class, + com.google.cloud.aiplatform.v1.GetPersistentResourceRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.GetPersistentResourceRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.PersistentResourceServiceProto + .internal_static_google_cloud_aiplatform_v1_GetPersistentResourceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GetPersistentResourceRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.GetPersistentResourceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GetPersistentResourceRequest build() { + com.google.cloud.aiplatform.v1.GetPersistentResourceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GetPersistentResourceRequest buildPartial() { + com.google.cloud.aiplatform.v1.GetPersistentResourceRequest result = + new com.google.cloud.aiplatform.v1.GetPersistentResourceRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.GetPersistentResourceRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.GetPersistentResourceRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.GetPersistentResourceRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.GetPersistentResourceRequest other) { + if (other == com.google.cloud.aiplatform.v1.GetPersistentResourceRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the PersistentResource resource.
+     * Format:
+     * `projects/{project_id_or_number}/locations/{location_id}/persistentResources/{persistent_resource_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the PersistentResource resource.
+     * Format:
+     * `projects/{project_id_or_number}/locations/{location_id}/persistentResources/{persistent_resource_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the PersistentResource resource.
+     * Format:
+     * `projects/{project_id_or_number}/locations/{location_id}/persistentResources/{persistent_resource_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the PersistentResource resource.
+     * Format:
+     * `projects/{project_id_or_number}/locations/{location_id}/persistentResources/{persistent_resource_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the PersistentResource resource.
+     * Format:
+     * `projects/{project_id_or_number}/locations/{location_id}/persistentResources/{persistent_resource_id}`
+     * 
+ * + * + * 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. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.GetPersistentResourceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.GetPersistentResourceRequest) + private static final com.google.cloud.aiplatform.v1.GetPersistentResourceRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.GetPersistentResourceRequest(); + } + + public static com.google.cloud.aiplatform.v1.GetPersistentResourceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetPersistentResourceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GetPersistentResourceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetPersistentResourceRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetPersistentResourceRequestOrBuilder.java new file mode 100644 index 000000000000..4307d01f04f6 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetPersistentResourceRequestOrBuilder.java @@ -0,0 +1,59 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/persistent_resource_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +public interface GetPersistentResourceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.GetPersistentResourceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the PersistentResource resource.
+   * Format:
+   * `projects/{project_id_or_number}/locations/{location_id}/persistentResources/{persistent_resource_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the PersistentResource resource.
+   * Format:
+   * `projects/{project_id_or_number}/locations/{location_id}/persistentResources/{persistent_resource_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetTuningJobRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetTuningJobRequest.java new file mode 100644 index 000000000000..8ef38047836d --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetTuningJobRequest.java @@ -0,0 +1,648 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/genai_tuning_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for
+ * [GenAiTuningService.GetTuningJob][google.cloud.aiplatform.v1.GenAiTuningService.GetTuningJob].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.GetTuningJobRequest} + */ +public final class GetTuningJobRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.GetTuningJobRequest) + GetTuningJobRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetTuningJobRequest.newBuilder() to construct. + private GetTuningJobRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetTuningJobRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetTuningJobRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.GenAiTuningServiceProto + .internal_static_google_cloud_aiplatform_v1_GetTuningJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.GenAiTuningServiceProto + .internal_static_google_cloud_aiplatform_v1_GetTuningJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.GetTuningJobRequest.class, + com.google.cloud.aiplatform.v1.GetTuningJobRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the TuningJob resource. Format:
+   * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the TuningJob resource. Format:
+   * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.GetTuningJobRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.GetTuningJobRequest other = + (com.google.cloud.aiplatform.v1.GetTuningJobRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.GetTuningJobRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.GetTuningJobRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.GetTuningJobRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.GetTuningJobRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.GetTuningJobRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.GetTuningJobRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.GetTuningJobRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.GetTuningJobRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.GetTuningJobRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.GetTuningJobRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.GetTuningJobRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.GetTuningJobRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.aiplatform.v1.GetTuningJobRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for
+   * [GenAiTuningService.GetTuningJob][google.cloud.aiplatform.v1.GenAiTuningService.GetTuningJob].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.GetTuningJobRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.GetTuningJobRequest) + com.google.cloud.aiplatform.v1.GetTuningJobRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.GenAiTuningServiceProto + .internal_static_google_cloud_aiplatform_v1_GetTuningJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.GenAiTuningServiceProto + .internal_static_google_cloud_aiplatform_v1_GetTuningJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.GetTuningJobRequest.class, + com.google.cloud.aiplatform.v1.GetTuningJobRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.GetTuningJobRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.GenAiTuningServiceProto + .internal_static_google_cloud_aiplatform_v1_GetTuningJobRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GetTuningJobRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.GetTuningJobRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GetTuningJobRequest build() { + com.google.cloud.aiplatform.v1.GetTuningJobRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GetTuningJobRequest buildPartial() { + com.google.cloud.aiplatform.v1.GetTuningJobRequest result = + new com.google.cloud.aiplatform.v1.GetTuningJobRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.GetTuningJobRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.GetTuningJobRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.GetTuningJobRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.GetTuningJobRequest other) { + if (other == com.google.cloud.aiplatform.v1.GetTuningJobRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the TuningJob resource. Format:
+     * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the TuningJob resource. Format:
+     * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the TuningJob resource. Format:
+     * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the TuningJob resource. Format:
+     * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the TuningJob resource. Format:
+     * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}`
+     * 
+ * + * + * 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. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.GetTuningJobRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.GetTuningJobRequest) + private static final com.google.cloud.aiplatform.v1.GetTuningJobRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.GetTuningJobRequest(); + } + + public static com.google.cloud.aiplatform.v1.GetTuningJobRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetTuningJobRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GetTuningJobRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetTuningJobRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetTuningJobRequestOrBuilder.java new file mode 100644 index 000000000000..37dd92ead073 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetTuningJobRequestOrBuilder.java @@ -0,0 +1,57 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/genai_tuning_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +public interface GetTuningJobRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.GetTuningJobRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the TuningJob resource. Format:
+   * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the TuningJob resource. Format:
+   * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListEndpointsRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListEndpointsRequest.java index 28246aa94c33..e8d05f14069b 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListEndpointsRequest.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListEndpointsRequest.java @@ -137,9 +137,8 @@ public com.google.protobuf.ByteString getParentBytes() { * names both snake_case and camelCase are supported. * * * `endpoint` supports `=` and `!=`. `endpoint` represents the Endpoint - * ID, - * i.e. the last segment of the Endpoint's [resource - * name][google.cloud.aiplatform.v1.Endpoint.name]. + * ID, i.e. the last segment of the Endpoint's + * [resource name][google.cloud.aiplatform.v1.Endpoint.name]. * * `display_name` supports `=` and `!=`. * * `labels` supports general map functions that is: * * `labels.key=value` - key:value equality @@ -179,9 +178,8 @@ public java.lang.String getFilter() { * names both snake_case and camelCase are supported. * * * `endpoint` supports `=` and `!=`. `endpoint` represents the Endpoint - * ID, - * i.e. the last segment of the Endpoint's [resource - * name][google.cloud.aiplatform.v1.Endpoint.name]. + * ID, i.e. the last segment of the Endpoint's + * [resource name][google.cloud.aiplatform.v1.Endpoint.name]. * * `display_name` supports `=` and `!=`. * * `labels` supports general map functions that is: * * `labels.key=value` - key:value equality @@ -1019,9 +1017,8 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * names both snake_case and camelCase are supported. * * * `endpoint` supports `=` and `!=`. `endpoint` represents the Endpoint - * ID, - * i.e. the last segment of the Endpoint's [resource - * name][google.cloud.aiplatform.v1.Endpoint.name]. + * ID, i.e. the last segment of the Endpoint's + * [resource name][google.cloud.aiplatform.v1.Endpoint.name]. * * `display_name` supports `=` and `!=`. * * `labels` supports general map functions that is: * * `labels.key=value` - key:value equality @@ -1060,9 +1057,8 @@ public java.lang.String getFilter() { * names both snake_case and camelCase are supported. * * * `endpoint` supports `=` and `!=`. `endpoint` represents the Endpoint - * ID, - * i.e. the last segment of the Endpoint's [resource - * name][google.cloud.aiplatform.v1.Endpoint.name]. + * ID, i.e. the last segment of the Endpoint's + * [resource name][google.cloud.aiplatform.v1.Endpoint.name]. * * `display_name` supports `=` and `!=`. * * `labels` supports general map functions that is: * * `labels.key=value` - key:value equality @@ -1101,9 +1097,8 @@ public com.google.protobuf.ByteString getFilterBytes() { * names both snake_case and camelCase are supported. * * * `endpoint` supports `=` and `!=`. `endpoint` represents the Endpoint - * ID, - * i.e. the last segment of the Endpoint's [resource - * name][google.cloud.aiplatform.v1.Endpoint.name]. + * ID, i.e. the last segment of the Endpoint's + * [resource name][google.cloud.aiplatform.v1.Endpoint.name]. * * `display_name` supports `=` and `!=`. * * `labels` supports general map functions that is: * * `labels.key=value` - key:value equality @@ -1141,9 +1136,8 @@ public Builder setFilter(java.lang.String value) { * names both snake_case and camelCase are supported. * * * `endpoint` supports `=` and `!=`. `endpoint` represents the Endpoint - * ID, - * i.e. the last segment of the Endpoint's [resource - * name][google.cloud.aiplatform.v1.Endpoint.name]. + * ID, i.e. the last segment of the Endpoint's + * [resource name][google.cloud.aiplatform.v1.Endpoint.name]. * * `display_name` supports `=` and `!=`. * * `labels` supports general map functions that is: * * `labels.key=value` - key:value equality @@ -1177,9 +1171,8 @@ public Builder clearFilter() { * names both snake_case and camelCase are supported. * * * `endpoint` supports `=` and `!=`. `endpoint` represents the Endpoint - * ID, - * i.e. the last segment of the Endpoint's [resource - * name][google.cloud.aiplatform.v1.Endpoint.name]. + * ID, i.e. the last segment of the Endpoint's + * [resource name][google.cloud.aiplatform.v1.Endpoint.name]. * * `display_name` supports `=` and `!=`. * * `labels` supports general map functions that is: * * `labels.key=value` - key:value equality diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListEndpointsRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListEndpointsRequestOrBuilder.java index 5a47a30fb99b..6579a6582364 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListEndpointsRequestOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListEndpointsRequestOrBuilder.java @@ -63,9 +63,8 @@ public interface ListEndpointsRequestOrBuilder * names both snake_case and camelCase are supported. * * * `endpoint` supports `=` and `!=`. `endpoint` represents the Endpoint - * ID, - * i.e. the last segment of the Endpoint's [resource - * name][google.cloud.aiplatform.v1.Endpoint.name]. + * ID, i.e. the last segment of the Endpoint's + * [resource name][google.cloud.aiplatform.v1.Endpoint.name]. * * `display_name` supports `=` and `!=`. * * `labels` supports general map functions that is: * * `labels.key=value` - key:value equality @@ -94,9 +93,8 @@ public interface ListEndpointsRequestOrBuilder * names both snake_case and camelCase are supported. * * * `endpoint` supports `=` and `!=`. `endpoint` represents the Endpoint - * ID, - * i.e. the last segment of the Endpoint's [resource - * name][google.cloud.aiplatform.v1.Endpoint.name]. + * ID, i.e. the last segment of the Endpoint's + * [resource name][google.cloud.aiplatform.v1.Endpoint.name]. * * `display_name` supports `=` and `!=`. * * `labels` supports general map functions that is: * * `labels.key=value` - key:value equality diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListNotebookRuntimeTemplatesRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListNotebookRuntimeTemplatesRequest.java new file mode 100644 index 000000000000..2c5cd6958bcc --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListNotebookRuntimeTemplatesRequest.java @@ -0,0 +1,1815 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/notebook_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for
+ * [NotebookService.ListNotebookRuntimeTemplates][google.cloud.aiplatform.v1.NotebookService.ListNotebookRuntimeTemplates].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest} + */ +public final class ListNotebookRuntimeTemplatesRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest) + ListNotebookRuntimeTemplatesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListNotebookRuntimeTemplatesRequest.newBuilder() to construct. + private ListNotebookRuntimeTemplatesRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListNotebookRuntimeTemplatesRequest() { + parent_ = ""; + filter_ = ""; + pageToken_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListNotebookRuntimeTemplatesRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_ListNotebookRuntimeTemplatesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_ListNotebookRuntimeTemplatesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest.class, + com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The resource name of the Location from which to list the
+   * NotebookRuntimeTemplates.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the Location from which to list the
+   * NotebookRuntimeTemplates.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + * + * + *
+   * Optional. An expression for filtering the results of the request. For field
+   * names both snake_case and camelCase are supported.
+   *
+   *   * `notebookRuntimeTemplate` supports = and !=. `notebookRuntimeTemplate`
+   *     represents the NotebookRuntimeTemplate ID,
+   *     i.e. the last segment of the NotebookRuntimeTemplate's [resource name]
+   *     [google.cloud.aiplatform.v1.NotebookRuntimeTemplate.name].
+   *   * `display_name` supports = and !=
+   *   * `labels` supports general map functions that is:
+   *     * `labels.key=value` - key:value equality
+   *     * `labels.key:* or labels:key - key existence
+   *     * A key including a space must be quoted. `labels."a key"`.
+   *   * `notebookRuntimeType` supports = and !=. notebookRuntimeType enum:
+   *   [USER_DEFINED, ONE_CLICK].
+   *
+   * Some examples:
+   *
+   *   * `notebookRuntimeTemplate=notebookRuntimeTemplate123`
+   *   * `displayName="myDisplayName"`
+   *   * `labels.myKey="myValue"`
+   *   * `notebookRuntimeType=USER_DEFINED`
+   * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + 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(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An expression for filtering the results of the request. For field
+   * names both snake_case and camelCase are supported.
+   *
+   *   * `notebookRuntimeTemplate` supports = and !=. `notebookRuntimeTemplate`
+   *     represents the NotebookRuntimeTemplate ID,
+   *     i.e. the last segment of the NotebookRuntimeTemplate's [resource name]
+   *     [google.cloud.aiplatform.v1.NotebookRuntimeTemplate.name].
+   *   * `display_name` supports = and !=
+   *   * `labels` supports general map functions that is:
+   *     * `labels.key=value` - key:value equality
+   *     * `labels.key:* or labels:key - key existence
+   *     * A key including a space must be quoted. `labels."a key"`.
+   *   * `notebookRuntimeType` supports = and !=. notebookRuntimeType enum:
+   *   [USER_DEFINED, ONE_CLICK].
+   *
+   * Some examples:
+   *
+   *   * `notebookRuntimeTemplate=notebookRuntimeTemplate123`
+   *   * `displayName="myDisplayName"`
+   *   * `labels.myKey="myValue"`
+   *   * `notebookRuntimeType=USER_DEFINED`
+   * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 3; + private int pageSize_ = 0; + /** + * + * + *
+   * Optional. The standard list page size.
+   * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * Optional. The standard list page token.
+   * Typically obtained via
+   * [ListNotebookRuntimeTemplatesResponse.next_page_token][google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse.next_page_token]
+   * of the previous
+   * [NotebookService.ListNotebookRuntimeTemplates][google.cloud.aiplatform.v1.NotebookService.ListNotebookRuntimeTemplates]
+   * call.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + 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(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The standard list page token.
+   * Typically obtained via
+   * [ListNotebookRuntimeTemplatesResponse.next_page_token][google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse.next_page_token]
+   * of the previous
+   * [NotebookService.ListNotebookRuntimeTemplates][google.cloud.aiplatform.v1.NotebookService.ListNotebookRuntimeTemplates]
+   * call.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int READ_MASK_FIELD_NUMBER = 5; + private com.google.protobuf.FieldMask readMask_; + /** + * + * + *
+   * Optional. Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the readMask field is set. + */ + @java.lang.Override + public boolean hasReadMask() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Optional. Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The readMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getReadMask() { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } + /** + * + * + *
+   * Optional. Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder() { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } + + public static final int ORDER_BY_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + /** + * + * + *
+   * Optional. A comma-separated list of fields to order by, sorted in ascending
+   * order. Use "desc" after a field name for descending. Supported fields:
+   *
+   *   * `display_name`
+   *   * `create_time`
+   *   * `update_time`
+   *
+   * Example: `display_name, create_time desc`.
+   * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + 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(); + orderBy_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. A comma-separated list of fields to order by, sorted in ascending
+   * order. Use "desc" after a field name for descending. Supported fields:
+   *
+   *   * `display_name`
+   *   * `create_time`
+   *   * `update_time`
+   *
+   * Example: `display_name, create_time desc`.
+   * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); + } + if (pageSize_ != 0) { + output.writeInt32(3, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(5, getReadMask()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, orderBy_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pageToken_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getReadMask()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, orderBy_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest other = + (com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (hasReadMask() != other.hasReadMask()) return false; + if (hasReadMask()) { + if (!getReadMask().equals(other.getReadMask())) return false; + } + if (!getOrderBy().equals(other.getOrderBy())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + if (hasReadMask()) { + hash = (37 * hash) + READ_MASK_FIELD_NUMBER; + hash = (53 * hash) + getReadMask().hashCode(); + } + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for
+   * [NotebookService.ListNotebookRuntimeTemplates][google.cloud.aiplatform.v1.NotebookService.ListNotebookRuntimeTemplates].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest) + com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_ListNotebookRuntimeTemplatesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_ListNotebookRuntimeTemplatesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest.class, + com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getReadMaskFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + filter_ = ""; + pageSize_ = 0; + pageToken_ = ""; + readMask_ = null; + if (readMaskBuilder_ != null) { + readMaskBuilder_.dispose(); + readMaskBuilder_ = null; + } + orderBy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_ListNotebookRuntimeTemplatesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest build() { + com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest buildPartial() { + com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest result = + new com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.pageToken_ = pageToken_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000010) != 0)) { + result.readMask_ = readMaskBuilder_ == null ? readMask_ : readMaskBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.orderBy_ = orderBy_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest other) { + if (other + == com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.hasReadMask()) { + mergeReadMask(other.getReadMask()); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000020; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + input.readMessage(getReadMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of the Location from which to list the
+     * NotebookRuntimeTemplates.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Location from which to list the
+     * NotebookRuntimeTemplates.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Location from which to list the
+     * NotebookRuntimeTemplates.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Location from which to list the
+     * NotebookRuntimeTemplates.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Location from which to list the
+     * NotebookRuntimeTemplates.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Optional. An expression for filtering the results of the request. For field
+     * names both snake_case and camelCase are supported.
+     *
+     *   * `notebookRuntimeTemplate` supports = and !=. `notebookRuntimeTemplate`
+     *     represents the NotebookRuntimeTemplate ID,
+     *     i.e. the last segment of the NotebookRuntimeTemplate's [resource name]
+     *     [google.cloud.aiplatform.v1.NotebookRuntimeTemplate.name].
+     *   * `display_name` supports = and !=
+     *   * `labels` supports general map functions that is:
+     *     * `labels.key=value` - key:value equality
+     *     * `labels.key:* or labels:key - key existence
+     *     * A key including a space must be quoted. `labels."a key"`.
+     *   * `notebookRuntimeType` supports = and !=. notebookRuntimeType enum:
+     *   [USER_DEFINED, ONE_CLICK].
+     *
+     * Some examples:
+     *
+     *   * `notebookRuntimeTemplate=notebookRuntimeTemplate123`
+     *   * `displayName="myDisplayName"`
+     *   * `labels.myKey="myValue"`
+     *   * `notebookRuntimeType=USER_DEFINED`
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An expression for filtering the results of the request. For field
+     * names both snake_case and camelCase are supported.
+     *
+     *   * `notebookRuntimeTemplate` supports = and !=. `notebookRuntimeTemplate`
+     *     represents the NotebookRuntimeTemplate ID,
+     *     i.e. the last segment of the NotebookRuntimeTemplate's [resource name]
+     *     [google.cloud.aiplatform.v1.NotebookRuntimeTemplate.name].
+     *   * `display_name` supports = and !=
+     *   * `labels` supports general map functions that is:
+     *     * `labels.key=value` - key:value equality
+     *     * `labels.key:* or labels:key - key existence
+     *     * A key including a space must be quoted. `labels."a key"`.
+     *   * `notebookRuntimeType` supports = and !=. notebookRuntimeType enum:
+     *   [USER_DEFINED, ONE_CLICK].
+     *
+     * Some examples:
+     *
+     *   * `notebookRuntimeTemplate=notebookRuntimeTemplate123`
+     *   * `displayName="myDisplayName"`
+     *   * `labels.myKey="myValue"`
+     *   * `notebookRuntimeType=USER_DEFINED`
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An expression for filtering the results of the request. For field
+     * names both snake_case and camelCase are supported.
+     *
+     *   * `notebookRuntimeTemplate` supports = and !=. `notebookRuntimeTemplate`
+     *     represents the NotebookRuntimeTemplate ID,
+     *     i.e. the last segment of the NotebookRuntimeTemplate's [resource name]
+     *     [google.cloud.aiplatform.v1.NotebookRuntimeTemplate.name].
+     *   * `display_name` supports = and !=
+     *   * `labels` supports general map functions that is:
+     *     * `labels.key=value` - key:value equality
+     *     * `labels.key:* or labels:key - key existence
+     *     * A key including a space must be quoted. `labels."a key"`.
+     *   * `notebookRuntimeType` supports = and !=. notebookRuntimeType enum:
+     *   [USER_DEFINED, ONE_CLICK].
+     *
+     * Some examples:
+     *
+     *   * `notebookRuntimeTemplate=notebookRuntimeTemplate123`
+     *   * `displayName="myDisplayName"`
+     *   * `labels.myKey="myValue"`
+     *   * `notebookRuntimeType=USER_DEFINED`
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An expression for filtering the results of the request. For field
+     * names both snake_case and camelCase are supported.
+     *
+     *   * `notebookRuntimeTemplate` supports = and !=. `notebookRuntimeTemplate`
+     *     represents the NotebookRuntimeTemplate ID,
+     *     i.e. the last segment of the NotebookRuntimeTemplate's [resource name]
+     *     [google.cloud.aiplatform.v1.NotebookRuntimeTemplate.name].
+     *   * `display_name` supports = and !=
+     *   * `labels` supports general map functions that is:
+     *     * `labels.key=value` - key:value equality
+     *     * `labels.key:* or labels:key - key existence
+     *     * A key including a space must be quoted. `labels."a key"`.
+     *   * `notebookRuntimeType` supports = and !=. notebookRuntimeType enum:
+     *   [USER_DEFINED, ONE_CLICK].
+     *
+     * Some examples:
+     *
+     *   * `notebookRuntimeTemplate=notebookRuntimeTemplate123`
+     *   * `displayName="myDisplayName"`
+     *   * `labels.myKey="myValue"`
+     *   * `notebookRuntimeType=USER_DEFINED`
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An expression for filtering the results of the request. For field
+     * names both snake_case and camelCase are supported.
+     *
+     *   * `notebookRuntimeTemplate` supports = and !=. `notebookRuntimeTemplate`
+     *     represents the NotebookRuntimeTemplate ID,
+     *     i.e. the last segment of the NotebookRuntimeTemplate's [resource name]
+     *     [google.cloud.aiplatform.v1.NotebookRuntimeTemplate.name].
+     *   * `display_name` supports = and !=
+     *   * `labels` supports general map functions that is:
+     *     * `labels.key=value` - key:value equality
+     *     * `labels.key:* or labels:key - key existence
+     *     * A key including a space must be quoted. `labels."a key"`.
+     *   * `notebookRuntimeType` supports = and !=. notebookRuntimeType enum:
+     *   [USER_DEFINED, ONE_CLICK].
+     *
+     * Some examples:
+     *
+     *   * `notebookRuntimeTemplate=notebookRuntimeTemplate123`
+     *   * `displayName="myDisplayName"`
+     *   * `labels.myKey="myValue"`
+     *   * `notebookRuntimeType=USER_DEFINED`
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Optional. The standard list page size.
+     * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Optional. The standard list page size.
+     * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard list page size.
+     * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000004); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * Optional. The standard list page token.
+     * Typically obtained via
+     * [ListNotebookRuntimeTemplatesResponse.next_page_token][google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse.next_page_token]
+     * of the previous
+     * [NotebookService.ListNotebookRuntimeTemplates][google.cloud.aiplatform.v1.NotebookService.ListNotebookRuntimeTemplates]
+     * call.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The standard list page token.
+     * Typically obtained via
+     * [ListNotebookRuntimeTemplatesResponse.next_page_token][google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse.next_page_token]
+     * of the previous
+     * [NotebookService.ListNotebookRuntimeTemplates][google.cloud.aiplatform.v1.NotebookService.ListNotebookRuntimeTemplates]
+     * call.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The standard list page token.
+     * Typically obtained via
+     * [ListNotebookRuntimeTemplatesResponse.next_page_token][google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse.next_page_token]
+     * of the previous
+     * [NotebookService.ListNotebookRuntimeTemplates][google.cloud.aiplatform.v1.NotebookService.ListNotebookRuntimeTemplates]
+     * call.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard list page token.
+     * Typically obtained via
+     * [ListNotebookRuntimeTemplatesResponse.next_page_token][google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse.next_page_token]
+     * of the previous
+     * [NotebookService.ListNotebookRuntimeTemplates][google.cloud.aiplatform.v1.NotebookService.ListNotebookRuntimeTemplates]
+     * call.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard list page token.
+     * Typically obtained via
+     * [ListNotebookRuntimeTemplatesResponse.next_page_token][google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse.next_page_token]
+     * of the previous
+     * [NotebookService.ListNotebookRuntimeTemplates][google.cloud.aiplatform.v1.NotebookService.ListNotebookRuntimeTemplates]
+     * call.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private com.google.protobuf.FieldMask readMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + readMaskBuilder_; + /** + * + * + *
+     * Optional. Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the readMask field is set. + */ + public boolean hasReadMask() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * Optional. Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The readMask. + */ + public com.google.protobuf.FieldMask getReadMask() { + if (readMaskBuilder_ == null) { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } else { + return readMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setReadMask(com.google.protobuf.FieldMask value) { + if (readMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + readMask_ = value; + } else { + readMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setReadMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (readMaskBuilder_ == null) { + readMask_ = builderForValue.build(); + } else { + readMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeReadMask(com.google.protobuf.FieldMask value) { + if (readMaskBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && readMask_ != null + && readMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getReadMaskBuilder().mergeFrom(value); + } else { + readMask_ = value; + } + } else { + readMaskBuilder_.mergeFrom(value); + } + if (readMask_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Optional. Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearReadMask() { + bitField0_ = (bitField0_ & ~0x00000010); + readMask_ = null; + if (readMaskBuilder_ != null) { + readMaskBuilder_.dispose(); + readMaskBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMask.Builder getReadMaskBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getReadMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder() { + if (readMaskBuilder_ != null) { + return readMaskBuilder_.getMessageOrBuilder(); + } else { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } + } + /** + * + * + *
+     * Optional. Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getReadMaskFieldBuilder() { + if (readMaskBuilder_ == null) { + readMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getReadMask(), getParentForChildren(), isClean()); + readMask_ = null; + } + return readMaskBuilder_; + } + + private java.lang.Object orderBy_ = ""; + /** + * + * + *
+     * Optional. A comma-separated list of fields to order by, sorted in ascending
+     * order. Use "desc" after a field name for descending. Supported fields:
+     *
+     *   * `display_name`
+     *   * `create_time`
+     *   * `update_time`
+     *
+     * Example: `display_name, create_time desc`.
+     * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. A comma-separated list of fields to order by, sorted in ascending
+     * order. Use "desc" after a field name for descending. Supported fields:
+     *
+     *   * `display_name`
+     *   * `create_time`
+     *   * `update_time`
+     *
+     * Example: `display_name, create_time desc`.
+     * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. A comma-separated list of fields to order by, sorted in ascending
+     * order. Use "desc" after a field name for descending. Supported fields:
+     *
+     *   * `display_name`
+     *   * `create_time`
+     *   * `update_time`
+     *
+     * Example: `display_name, create_time desc`.
+     * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + orderBy_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A comma-separated list of fields to order by, sorted in ascending
+     * order. Use "desc" after a field name for descending. Supported fields:
+     *
+     *   * `display_name`
+     *   * `create_time`
+     *   * `update_time`
+     *
+     * Example: `display_name, create_time desc`.
+     * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A comma-separated list of fields to order by, sorted in ascending
+     * order. Use "desc" after a field name for descending. Supported fields:
+     *
+     *   * `display_name`
+     *   * `create_time`
+     *   * `update_time`
+     *
+     * Example: `display_name, create_time desc`.
+     * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest) + private static final com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest(); + } + + public static com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListNotebookRuntimeTemplatesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListNotebookRuntimeTemplatesRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListNotebookRuntimeTemplatesRequestOrBuilder.java new file mode 100644 index 000000000000..a4c0c8ffe457 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListNotebookRuntimeTemplatesRequestOrBuilder.java @@ -0,0 +1,249 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/notebook_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +public interface ListNotebookRuntimeTemplatesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the Location from which to list the
+   * NotebookRuntimeTemplates.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The resource name of the Location from which to list the
+   * NotebookRuntimeTemplates.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. An expression for filtering the results of the request. For field
+   * names both snake_case and camelCase are supported.
+   *
+   *   * `notebookRuntimeTemplate` supports = and !=. `notebookRuntimeTemplate`
+   *     represents the NotebookRuntimeTemplate ID,
+   *     i.e. the last segment of the NotebookRuntimeTemplate's [resource name]
+   *     [google.cloud.aiplatform.v1.NotebookRuntimeTemplate.name].
+   *   * `display_name` supports = and !=
+   *   * `labels` supports general map functions that is:
+   *     * `labels.key=value` - key:value equality
+   *     * `labels.key:* or labels:key - key existence
+   *     * A key including a space must be quoted. `labels."a key"`.
+   *   * `notebookRuntimeType` supports = and !=. notebookRuntimeType enum:
+   *   [USER_DEFINED, ONE_CLICK].
+   *
+   * Some examples:
+   *
+   *   * `notebookRuntimeTemplate=notebookRuntimeTemplate123`
+   *   * `displayName="myDisplayName"`
+   *   * `labels.myKey="myValue"`
+   *   * `notebookRuntimeType=USER_DEFINED`
+   * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Optional. An expression for filtering the results of the request. For field
+   * names both snake_case and camelCase are supported.
+   *
+   *   * `notebookRuntimeTemplate` supports = and !=. `notebookRuntimeTemplate`
+   *     represents the NotebookRuntimeTemplate ID,
+   *     i.e. the last segment of the NotebookRuntimeTemplate's [resource name]
+   *     [google.cloud.aiplatform.v1.NotebookRuntimeTemplate.name].
+   *   * `display_name` supports = and !=
+   *   * `labels` supports general map functions that is:
+   *     * `labels.key=value` - key:value equality
+   *     * `labels.key:* or labels:key - key existence
+   *     * A key including a space must be quoted. `labels."a key"`.
+   *   * `notebookRuntimeType` supports = and !=. notebookRuntimeType enum:
+   *   [USER_DEFINED, ONE_CLICK].
+   *
+   * Some examples:
+   *
+   *   * `notebookRuntimeTemplate=notebookRuntimeTemplate123`
+   *   * `displayName="myDisplayName"`
+   *   * `labels.myKey="myValue"`
+   *   * `notebookRuntimeType=USER_DEFINED`
+   * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Optional. The standard list page size.
+   * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. The standard list page token.
+   * Typically obtained via
+   * [ListNotebookRuntimeTemplatesResponse.next_page_token][google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse.next_page_token]
+   * of the previous
+   * [NotebookService.ListNotebookRuntimeTemplates][google.cloud.aiplatform.v1.NotebookService.ListNotebookRuntimeTemplates]
+   * call.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * Optional. The standard list page token.
+   * Typically obtained via
+   * [ListNotebookRuntimeTemplatesResponse.next_page_token][google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse.next_page_token]
+   * of the previous
+   * [NotebookService.ListNotebookRuntimeTemplates][google.cloud.aiplatform.v1.NotebookService.ListNotebookRuntimeTemplates]
+   * call.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the readMask field is set. + */ + boolean hasReadMask(); + /** + * + * + *
+   * Optional. Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The readMask. + */ + com.google.protobuf.FieldMask getReadMask(); + /** + * + * + *
+   * Optional. Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder(); + + /** + * + * + *
+   * Optional. A comma-separated list of fields to order by, sorted in ascending
+   * order. Use "desc" after a field name for descending. Supported fields:
+   *
+   *   * `display_name`
+   *   * `create_time`
+   *   * `update_time`
+   *
+   * Example: `display_name, create_time desc`.
+   * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * Optional. A comma-separated list of fields to order by, sorted in ascending
+   * order. Use "desc" after a field name for descending. Supported fields:
+   *
+   *   * `display_name`
+   *   * `create_time`
+   *   * `update_time`
+   *
+   * Example: `display_name, create_time desc`.
+   * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListNotebookRuntimeTemplatesResponse.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListNotebookRuntimeTemplatesResponse.java new file mode 100644 index 000000000000..2e5f514d249d --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListNotebookRuntimeTemplatesResponse.java @@ -0,0 +1,1227 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/notebook_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Response message for
+ * [NotebookService.ListNotebookRuntimeTemplates][google.cloud.aiplatform.v1.NotebookService.ListNotebookRuntimeTemplates].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse} + */ +public final class ListNotebookRuntimeTemplatesResponse + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse) + ListNotebookRuntimeTemplatesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListNotebookRuntimeTemplatesResponse.newBuilder() to construct. + private ListNotebookRuntimeTemplatesResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListNotebookRuntimeTemplatesResponse() { + notebookRuntimeTemplates_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListNotebookRuntimeTemplatesResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_ListNotebookRuntimeTemplatesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_ListNotebookRuntimeTemplatesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse.class, + com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse.Builder.class); + } + + public static final int NOTEBOOK_RUNTIME_TEMPLATES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List + notebookRuntimeTemplates_; + /** + * + * + *
+   * List of NotebookRuntimeTemplates in the requested page.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NotebookRuntimeTemplate notebook_runtime_templates = 1; + * + */ + @java.lang.Override + public java.util.List + getNotebookRuntimeTemplatesList() { + return notebookRuntimeTemplates_; + } + /** + * + * + *
+   * List of NotebookRuntimeTemplates in the requested page.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NotebookRuntimeTemplate notebook_runtime_templates = 1; + * + */ + @java.lang.Override + public java.util.List + getNotebookRuntimeTemplatesOrBuilderList() { + return notebookRuntimeTemplates_; + } + /** + * + * + *
+   * List of NotebookRuntimeTemplates in the requested page.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NotebookRuntimeTemplate notebook_runtime_templates = 1; + * + */ + @java.lang.Override + public int getNotebookRuntimeTemplatesCount() { + return notebookRuntimeTemplates_.size(); + } + /** + * + * + *
+   * List of NotebookRuntimeTemplates in the requested page.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NotebookRuntimeTemplate notebook_runtime_templates = 1; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate getNotebookRuntimeTemplates( + int index) { + return notebookRuntimeTemplates_.get(index); + } + /** + * + * + *
+   * List of NotebookRuntimeTemplates in the requested page.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NotebookRuntimeTemplate notebook_runtime_templates = 1; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateOrBuilder + getNotebookRuntimeTemplatesOrBuilder(int index) { + return notebookRuntimeTemplates_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * A token to retrieve next page of results.
+   * Pass to
+   * [ListNotebookRuntimeTemplatesRequest.page_token][google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest.page_token]
+   * to obtain that page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + 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(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token to retrieve next page of results.
+   * Pass to
+   * [ListNotebookRuntimeTemplatesRequest.page_token][google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest.page_token]
+   * to obtain that page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < notebookRuntimeTemplates_.size(); i++) { + output.writeMessage(1, notebookRuntimeTemplates_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < notebookRuntimeTemplates_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, notebookRuntimeTemplates_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse other = + (com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse) obj; + + if (!getNotebookRuntimeTemplatesList().equals(other.getNotebookRuntimeTemplatesList())) + return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getNotebookRuntimeTemplatesCount() > 0) { + hash = (37 * hash) + NOTEBOOK_RUNTIME_TEMPLATES_FIELD_NUMBER; + hash = (53 * hash) + getNotebookRuntimeTemplatesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for
+   * [NotebookService.ListNotebookRuntimeTemplates][google.cloud.aiplatform.v1.NotebookService.ListNotebookRuntimeTemplates].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse) + com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_ListNotebookRuntimeTemplatesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_ListNotebookRuntimeTemplatesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse.class, + com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (notebookRuntimeTemplatesBuilder_ == null) { + notebookRuntimeTemplates_ = java.util.Collections.emptyList(); + } else { + notebookRuntimeTemplates_ = null; + notebookRuntimeTemplatesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_ListNotebookRuntimeTemplatesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse build() { + com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse buildPartial() { + com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse result = + new com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse result) { + if (notebookRuntimeTemplatesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + notebookRuntimeTemplates_ = + java.util.Collections.unmodifiableList(notebookRuntimeTemplates_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.notebookRuntimeTemplates_ = notebookRuntimeTemplates_; + } else { + result.notebookRuntimeTemplates_ = notebookRuntimeTemplatesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse other) { + if (other + == com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse + .getDefaultInstance()) return this; + if (notebookRuntimeTemplatesBuilder_ == null) { + if (!other.notebookRuntimeTemplates_.isEmpty()) { + if (notebookRuntimeTemplates_.isEmpty()) { + notebookRuntimeTemplates_ = other.notebookRuntimeTemplates_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureNotebookRuntimeTemplatesIsMutable(); + notebookRuntimeTemplates_.addAll(other.notebookRuntimeTemplates_); + } + onChanged(); + } + } else { + if (!other.notebookRuntimeTemplates_.isEmpty()) { + if (notebookRuntimeTemplatesBuilder_.isEmpty()) { + notebookRuntimeTemplatesBuilder_.dispose(); + notebookRuntimeTemplatesBuilder_ = null; + notebookRuntimeTemplates_ = other.notebookRuntimeTemplates_; + bitField0_ = (bitField0_ & ~0x00000001); + notebookRuntimeTemplatesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getNotebookRuntimeTemplatesFieldBuilder() + : null; + } else { + notebookRuntimeTemplatesBuilder_.addAllMessages(other.notebookRuntimeTemplates_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate m = + input.readMessage( + com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate.parser(), + extensionRegistry); + if (notebookRuntimeTemplatesBuilder_ == null) { + ensureNotebookRuntimeTemplatesIsMutable(); + notebookRuntimeTemplates_.add(m); + } else { + notebookRuntimeTemplatesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List + notebookRuntimeTemplates_ = java.util.Collections.emptyList(); + + private void ensureNotebookRuntimeTemplatesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + notebookRuntimeTemplates_ = + new java.util.ArrayList( + notebookRuntimeTemplates_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate, + com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate.Builder, + com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateOrBuilder> + notebookRuntimeTemplatesBuilder_; + + /** + * + * + *
+     * List of NotebookRuntimeTemplates in the requested page.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NotebookRuntimeTemplate notebook_runtime_templates = 1; + * + */ + public java.util.List + getNotebookRuntimeTemplatesList() { + if (notebookRuntimeTemplatesBuilder_ == null) { + return java.util.Collections.unmodifiableList(notebookRuntimeTemplates_); + } else { + return notebookRuntimeTemplatesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of NotebookRuntimeTemplates in the requested page.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NotebookRuntimeTemplate notebook_runtime_templates = 1; + * + */ + public int getNotebookRuntimeTemplatesCount() { + if (notebookRuntimeTemplatesBuilder_ == null) { + return notebookRuntimeTemplates_.size(); + } else { + return notebookRuntimeTemplatesBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of NotebookRuntimeTemplates in the requested page.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NotebookRuntimeTemplate notebook_runtime_templates = 1; + * + */ + public com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate getNotebookRuntimeTemplates( + int index) { + if (notebookRuntimeTemplatesBuilder_ == null) { + return notebookRuntimeTemplates_.get(index); + } else { + return notebookRuntimeTemplatesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of NotebookRuntimeTemplates in the requested page.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NotebookRuntimeTemplate notebook_runtime_templates = 1; + * + */ + public Builder setNotebookRuntimeTemplates( + int index, com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate value) { + if (notebookRuntimeTemplatesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNotebookRuntimeTemplatesIsMutable(); + notebookRuntimeTemplates_.set(index, value); + onChanged(); + } else { + notebookRuntimeTemplatesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of NotebookRuntimeTemplates in the requested page.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NotebookRuntimeTemplate notebook_runtime_templates = 1; + * + */ + public Builder setNotebookRuntimeTemplates( + int index, com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate.Builder builderForValue) { + if (notebookRuntimeTemplatesBuilder_ == null) { + ensureNotebookRuntimeTemplatesIsMutable(); + notebookRuntimeTemplates_.set(index, builderForValue.build()); + onChanged(); + } else { + notebookRuntimeTemplatesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of NotebookRuntimeTemplates in the requested page.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NotebookRuntimeTemplate notebook_runtime_templates = 1; + * + */ + public Builder addNotebookRuntimeTemplates( + com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate value) { + if (notebookRuntimeTemplatesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNotebookRuntimeTemplatesIsMutable(); + notebookRuntimeTemplates_.add(value); + onChanged(); + } else { + notebookRuntimeTemplatesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of NotebookRuntimeTemplates in the requested page.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NotebookRuntimeTemplate notebook_runtime_templates = 1; + * + */ + public Builder addNotebookRuntimeTemplates( + int index, com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate value) { + if (notebookRuntimeTemplatesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNotebookRuntimeTemplatesIsMutable(); + notebookRuntimeTemplates_.add(index, value); + onChanged(); + } else { + notebookRuntimeTemplatesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of NotebookRuntimeTemplates in the requested page.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NotebookRuntimeTemplate notebook_runtime_templates = 1; + * + */ + public Builder addNotebookRuntimeTemplates( + com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate.Builder builderForValue) { + if (notebookRuntimeTemplatesBuilder_ == null) { + ensureNotebookRuntimeTemplatesIsMutable(); + notebookRuntimeTemplates_.add(builderForValue.build()); + onChanged(); + } else { + notebookRuntimeTemplatesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of NotebookRuntimeTemplates in the requested page.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NotebookRuntimeTemplate notebook_runtime_templates = 1; + * + */ + public Builder addNotebookRuntimeTemplates( + int index, com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate.Builder builderForValue) { + if (notebookRuntimeTemplatesBuilder_ == null) { + ensureNotebookRuntimeTemplatesIsMutable(); + notebookRuntimeTemplates_.add(index, builderForValue.build()); + onChanged(); + } else { + notebookRuntimeTemplatesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of NotebookRuntimeTemplates in the requested page.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NotebookRuntimeTemplate notebook_runtime_templates = 1; + * + */ + public Builder addAllNotebookRuntimeTemplates( + java.lang.Iterable + values) { + if (notebookRuntimeTemplatesBuilder_ == null) { + ensureNotebookRuntimeTemplatesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, notebookRuntimeTemplates_); + onChanged(); + } else { + notebookRuntimeTemplatesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of NotebookRuntimeTemplates in the requested page.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NotebookRuntimeTemplate notebook_runtime_templates = 1; + * + */ + public Builder clearNotebookRuntimeTemplates() { + if (notebookRuntimeTemplatesBuilder_ == null) { + notebookRuntimeTemplates_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + notebookRuntimeTemplatesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of NotebookRuntimeTemplates in the requested page.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NotebookRuntimeTemplate notebook_runtime_templates = 1; + * + */ + public Builder removeNotebookRuntimeTemplates(int index) { + if (notebookRuntimeTemplatesBuilder_ == null) { + ensureNotebookRuntimeTemplatesIsMutable(); + notebookRuntimeTemplates_.remove(index); + onChanged(); + } else { + notebookRuntimeTemplatesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of NotebookRuntimeTemplates in the requested page.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NotebookRuntimeTemplate notebook_runtime_templates = 1; + * + */ + public com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate.Builder + getNotebookRuntimeTemplatesBuilder(int index) { + return getNotebookRuntimeTemplatesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of NotebookRuntimeTemplates in the requested page.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NotebookRuntimeTemplate notebook_runtime_templates = 1; + * + */ + public com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateOrBuilder + getNotebookRuntimeTemplatesOrBuilder(int index) { + if (notebookRuntimeTemplatesBuilder_ == null) { + return notebookRuntimeTemplates_.get(index); + } else { + return notebookRuntimeTemplatesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of NotebookRuntimeTemplates in the requested page.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NotebookRuntimeTemplate notebook_runtime_templates = 1; + * + */ + public java.util.List + getNotebookRuntimeTemplatesOrBuilderList() { + if (notebookRuntimeTemplatesBuilder_ != null) { + return notebookRuntimeTemplatesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(notebookRuntimeTemplates_); + } + } + /** + * + * + *
+     * List of NotebookRuntimeTemplates in the requested page.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NotebookRuntimeTemplate notebook_runtime_templates = 1; + * + */ + public com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate.Builder + addNotebookRuntimeTemplatesBuilder() { + return getNotebookRuntimeTemplatesFieldBuilder() + .addBuilder(com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate.getDefaultInstance()); + } + /** + * + * + *
+     * List of NotebookRuntimeTemplates in the requested page.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NotebookRuntimeTemplate notebook_runtime_templates = 1; + * + */ + public com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate.Builder + addNotebookRuntimeTemplatesBuilder(int index) { + return getNotebookRuntimeTemplatesFieldBuilder() + .addBuilder( + index, com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate.getDefaultInstance()); + } + /** + * + * + *
+     * List of NotebookRuntimeTemplates in the requested page.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NotebookRuntimeTemplate notebook_runtime_templates = 1; + * + */ + public java.util.List + getNotebookRuntimeTemplatesBuilderList() { + return getNotebookRuntimeTemplatesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate, + com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate.Builder, + com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateOrBuilder> + getNotebookRuntimeTemplatesFieldBuilder() { + if (notebookRuntimeTemplatesBuilder_ == null) { + notebookRuntimeTemplatesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate, + com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate.Builder, + com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateOrBuilder>( + notebookRuntimeTemplates_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + notebookRuntimeTemplates_ = null; + } + return notebookRuntimeTemplatesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token to retrieve next page of results.
+     * Pass to
+     * [ListNotebookRuntimeTemplatesRequest.page_token][google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest.page_token]
+     * to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token to retrieve next page of results.
+     * Pass to
+     * [ListNotebookRuntimeTemplatesRequest.page_token][google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest.page_token]
+     * to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token to retrieve next page of results.
+     * Pass to
+     * [ListNotebookRuntimeTemplatesRequest.page_token][google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest.page_token]
+     * to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * A token to retrieve next page of results.
+     * Pass to
+     * [ListNotebookRuntimeTemplatesRequest.page_token][google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest.page_token]
+     * to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A token to retrieve next page of results.
+     * Pass to
+     * [ListNotebookRuntimeTemplatesRequest.page_token][google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest.page_token]
+     * to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse) + private static final com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse(); + } + + public static com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListNotebookRuntimeTemplatesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListNotebookRuntimeTemplatesResponseOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListNotebookRuntimeTemplatesResponseOrBuilder.java new file mode 100644 index 000000000000..09ddd8c3c5f6 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListNotebookRuntimeTemplatesResponseOrBuilder.java @@ -0,0 +1,121 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/notebook_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +public interface ListNotebookRuntimeTemplatesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * List of NotebookRuntimeTemplates in the requested page.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NotebookRuntimeTemplate notebook_runtime_templates = 1; + * + */ + java.util.List + getNotebookRuntimeTemplatesList(); + /** + * + * + *
+   * List of NotebookRuntimeTemplates in the requested page.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NotebookRuntimeTemplate notebook_runtime_templates = 1; + * + */ + com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate getNotebookRuntimeTemplates(int index); + /** + * + * + *
+   * List of NotebookRuntimeTemplates in the requested page.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NotebookRuntimeTemplate notebook_runtime_templates = 1; + * + */ + int getNotebookRuntimeTemplatesCount(); + /** + * + * + *
+   * List of NotebookRuntimeTemplates in the requested page.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NotebookRuntimeTemplate notebook_runtime_templates = 1; + * + */ + java.util.List + getNotebookRuntimeTemplatesOrBuilderList(); + /** + * + * + *
+   * List of NotebookRuntimeTemplates in the requested page.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NotebookRuntimeTemplate notebook_runtime_templates = 1; + * + */ + com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateOrBuilder + getNotebookRuntimeTemplatesOrBuilder(int index); + + /** + * + * + *
+   * A token to retrieve next page of results.
+   * Pass to
+   * [ListNotebookRuntimeTemplatesRequest.page_token][google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest.page_token]
+   * to obtain that page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token to retrieve next page of results.
+   * Pass to
+   * [ListNotebookRuntimeTemplatesRequest.page_token][google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest.page_token]
+   * to obtain that page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListNotebookRuntimesRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListNotebookRuntimesRequest.java new file mode 100644 index 000000000000..0a838544ea0c --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListNotebookRuntimesRequest.java @@ -0,0 +1,1900 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/notebook_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for
+ * [NotebookService.ListNotebookRuntimes][google.cloud.aiplatform.v1.NotebookService.ListNotebookRuntimes].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListNotebookRuntimesRequest} + */ +public final class ListNotebookRuntimesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ListNotebookRuntimesRequest) + ListNotebookRuntimesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListNotebookRuntimesRequest.newBuilder() to construct. + private ListNotebookRuntimesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListNotebookRuntimesRequest() { + parent_ = ""; + filter_ = ""; + pageToken_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListNotebookRuntimesRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_ListNotebookRuntimesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_ListNotebookRuntimesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListNotebookRuntimesRequest.class, + com.google.cloud.aiplatform.v1.ListNotebookRuntimesRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The resource name of the Location from which to list the
+   * NotebookRuntimes.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the Location from which to list the
+   * NotebookRuntimes.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + * + * + *
+   * Optional. An expression for filtering the results of the request. For field
+   * names both snake_case and camelCase are supported.
+   *
+   *   * `notebookRuntime` supports = and !=. `notebookRuntime` represents the
+   *     NotebookRuntime ID,
+   *     i.e. the last segment of the NotebookRuntime's [resource name]
+   *     [google.cloud.aiplatform.v1.NotebookRuntime.name].
+   *   * `displayName` supports = and != and regex.
+   *   * `notebookRuntimeTemplate` supports = and !=. `notebookRuntimeTemplate`
+   *     represents the NotebookRuntimeTemplate ID,
+   *     i.e. the last segment of the NotebookRuntimeTemplate's [resource name]
+   *     [google.cloud.aiplatform.v1.NotebookRuntimeTemplate.name].
+   *   * `healthState` supports = and !=. healthState enum: [HEALTHY, UNHEALTHY,
+   *   HEALTH_STATE_UNSPECIFIED].
+   *   * `runtimeState` supports = and !=. runtimeState enum:
+   *   [RUNTIME_STATE_UNSPECIFIED, RUNNING, BEING_STARTED, BEING_STOPPED,
+   *   STOPPED, BEING_UPGRADED, ERROR, INVALID].
+   *   * `runtimeUser` supports = and !=.
+   *   * API version is UI only: `uiState` supports = and !=. uiState enum:
+   *   [UI_RESOURCE_STATE_UNSPECIFIED, UI_RESOURCE_STATE_BEING_CREATED,
+   *   UI_RESOURCE_STATE_ACTIVE, UI_RESOURCE_STATE_BEING_DELETED,
+   *   UI_RESOURCE_STATE_CREATION_FAILED].
+   *   * `notebookRuntimeType` supports = and !=. notebookRuntimeType enum:
+   *   [USER_DEFINED, ONE_CLICK].
+   *
+   * Some examples:
+   *
+   *   * `notebookRuntime="notebookRuntime123"`
+   *   * `displayName="myDisplayName"` and `displayName=~"myDisplayNameRegex"`
+   *   * `notebookRuntimeTemplate="notebookRuntimeTemplate321"`
+   *   * `healthState=HEALTHY`
+   *   * `runtimeState=RUNNING`
+   *   * `runtimeUser="test@google.com"`
+   *   * `uiState=UI_RESOURCE_STATE_BEING_DELETED`
+   *   * `notebookRuntimeType=USER_DEFINED`
+   * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + 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(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An expression for filtering the results of the request. For field
+   * names both snake_case and camelCase are supported.
+   *
+   *   * `notebookRuntime` supports = and !=. `notebookRuntime` represents the
+   *     NotebookRuntime ID,
+   *     i.e. the last segment of the NotebookRuntime's [resource name]
+   *     [google.cloud.aiplatform.v1.NotebookRuntime.name].
+   *   * `displayName` supports = and != and regex.
+   *   * `notebookRuntimeTemplate` supports = and !=. `notebookRuntimeTemplate`
+   *     represents the NotebookRuntimeTemplate ID,
+   *     i.e. the last segment of the NotebookRuntimeTemplate's [resource name]
+   *     [google.cloud.aiplatform.v1.NotebookRuntimeTemplate.name].
+   *   * `healthState` supports = and !=. healthState enum: [HEALTHY, UNHEALTHY,
+   *   HEALTH_STATE_UNSPECIFIED].
+   *   * `runtimeState` supports = and !=. runtimeState enum:
+   *   [RUNTIME_STATE_UNSPECIFIED, RUNNING, BEING_STARTED, BEING_STOPPED,
+   *   STOPPED, BEING_UPGRADED, ERROR, INVALID].
+   *   * `runtimeUser` supports = and !=.
+   *   * API version is UI only: `uiState` supports = and !=. uiState enum:
+   *   [UI_RESOURCE_STATE_UNSPECIFIED, UI_RESOURCE_STATE_BEING_CREATED,
+   *   UI_RESOURCE_STATE_ACTIVE, UI_RESOURCE_STATE_BEING_DELETED,
+   *   UI_RESOURCE_STATE_CREATION_FAILED].
+   *   * `notebookRuntimeType` supports = and !=. notebookRuntimeType enum:
+   *   [USER_DEFINED, ONE_CLICK].
+   *
+   * Some examples:
+   *
+   *   * `notebookRuntime="notebookRuntime123"`
+   *   * `displayName="myDisplayName"` and `displayName=~"myDisplayNameRegex"`
+   *   * `notebookRuntimeTemplate="notebookRuntimeTemplate321"`
+   *   * `healthState=HEALTHY`
+   *   * `runtimeState=RUNNING`
+   *   * `runtimeUser="test@google.com"`
+   *   * `uiState=UI_RESOURCE_STATE_BEING_DELETED`
+   *   * `notebookRuntimeType=USER_DEFINED`
+   * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 3; + private int pageSize_ = 0; + /** + * + * + *
+   * Optional. The standard list page size.
+   * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * Optional. The standard list page token.
+   * Typically obtained via
+   * [ListNotebookRuntimesResponse.next_page_token][google.cloud.aiplatform.v1.ListNotebookRuntimesResponse.next_page_token]
+   * of the previous
+   * [NotebookService.ListNotebookRuntimes][google.cloud.aiplatform.v1.NotebookService.ListNotebookRuntimes]
+   * call.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + 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(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The standard list page token.
+   * Typically obtained via
+   * [ListNotebookRuntimesResponse.next_page_token][google.cloud.aiplatform.v1.ListNotebookRuntimesResponse.next_page_token]
+   * of the previous
+   * [NotebookService.ListNotebookRuntimes][google.cloud.aiplatform.v1.NotebookService.ListNotebookRuntimes]
+   * call.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int READ_MASK_FIELD_NUMBER = 5; + private com.google.protobuf.FieldMask readMask_; + /** + * + * + *
+   * Optional. Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the readMask field is set. + */ + @java.lang.Override + public boolean hasReadMask() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Optional. Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The readMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getReadMask() { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } + /** + * + * + *
+   * Optional. Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder() { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } + + public static final int ORDER_BY_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + /** + * + * + *
+   * Optional. A comma-separated list of fields to order by, sorted in ascending
+   * order. Use "desc" after a field name for descending. Supported fields:
+   *
+   *   * `display_name`
+   *   * `create_time`
+   *   * `update_time`
+   *
+   * Example: `display_name, create_time desc`.
+   * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + 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(); + orderBy_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. A comma-separated list of fields to order by, sorted in ascending
+   * order. Use "desc" after a field name for descending. Supported fields:
+   *
+   *   * `display_name`
+   *   * `create_time`
+   *   * `update_time`
+   *
+   * Example: `display_name, create_time desc`.
+   * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); + } + if (pageSize_ != 0) { + output.writeInt32(3, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(5, getReadMask()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, orderBy_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pageToken_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getReadMask()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, orderBy_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.ListNotebookRuntimesRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ListNotebookRuntimesRequest other = + (com.google.cloud.aiplatform.v1.ListNotebookRuntimesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (hasReadMask() != other.hasReadMask()) return false; + if (hasReadMask()) { + if (!getReadMask().equals(other.getReadMask())) return false; + } + if (!getOrderBy().equals(other.getOrderBy())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + if (hasReadMask()) { + hash = (37 * hash) + READ_MASK_FIELD_NUMBER; + hash = (53 * hash) + getReadMask().hashCode(); + } + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.ListNotebookRuntimesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListNotebookRuntimesRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListNotebookRuntimesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListNotebookRuntimesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListNotebookRuntimesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListNotebookRuntimesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListNotebookRuntimesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListNotebookRuntimesRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListNotebookRuntimesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListNotebookRuntimesRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListNotebookRuntimesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListNotebookRuntimesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.ListNotebookRuntimesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for
+   * [NotebookService.ListNotebookRuntimes][google.cloud.aiplatform.v1.NotebookService.ListNotebookRuntimes].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListNotebookRuntimesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ListNotebookRuntimesRequest) + com.google.cloud.aiplatform.v1.ListNotebookRuntimesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_ListNotebookRuntimesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_ListNotebookRuntimesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListNotebookRuntimesRequest.class, + com.google.cloud.aiplatform.v1.ListNotebookRuntimesRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.ListNotebookRuntimesRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getReadMaskFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + filter_ = ""; + pageSize_ = 0; + pageToken_ = ""; + readMask_ = null; + if (readMaskBuilder_ != null) { + readMaskBuilder_.dispose(); + readMaskBuilder_ = null; + } + orderBy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_ListNotebookRuntimesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListNotebookRuntimesRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ListNotebookRuntimesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListNotebookRuntimesRequest build() { + com.google.cloud.aiplatform.v1.ListNotebookRuntimesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListNotebookRuntimesRequest buildPartial() { + com.google.cloud.aiplatform.v1.ListNotebookRuntimesRequest result = + new com.google.cloud.aiplatform.v1.ListNotebookRuntimesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.ListNotebookRuntimesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.pageToken_ = pageToken_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000010) != 0)) { + result.readMask_ = readMaskBuilder_ == null ? readMask_ : readMaskBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.orderBy_ = orderBy_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.ListNotebookRuntimesRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.ListNotebookRuntimesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.ListNotebookRuntimesRequest other) { + if (other == com.google.cloud.aiplatform.v1.ListNotebookRuntimesRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.hasReadMask()) { + mergeReadMask(other.getReadMask()); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000020; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + input.readMessage(getReadMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of the Location from which to list the
+     * NotebookRuntimes.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Location from which to list the
+     * NotebookRuntimes.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Location from which to list the
+     * NotebookRuntimes.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Location from which to list the
+     * NotebookRuntimes.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Location from which to list the
+     * NotebookRuntimes.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Optional. An expression for filtering the results of the request. For field
+     * names both snake_case and camelCase are supported.
+     *
+     *   * `notebookRuntime` supports = and !=. `notebookRuntime` represents the
+     *     NotebookRuntime ID,
+     *     i.e. the last segment of the NotebookRuntime's [resource name]
+     *     [google.cloud.aiplatform.v1.NotebookRuntime.name].
+     *   * `displayName` supports = and != and regex.
+     *   * `notebookRuntimeTemplate` supports = and !=. `notebookRuntimeTemplate`
+     *     represents the NotebookRuntimeTemplate ID,
+     *     i.e. the last segment of the NotebookRuntimeTemplate's [resource name]
+     *     [google.cloud.aiplatform.v1.NotebookRuntimeTemplate.name].
+     *   * `healthState` supports = and !=. healthState enum: [HEALTHY, UNHEALTHY,
+     *   HEALTH_STATE_UNSPECIFIED].
+     *   * `runtimeState` supports = and !=. runtimeState enum:
+     *   [RUNTIME_STATE_UNSPECIFIED, RUNNING, BEING_STARTED, BEING_STOPPED,
+     *   STOPPED, BEING_UPGRADED, ERROR, INVALID].
+     *   * `runtimeUser` supports = and !=.
+     *   * API version is UI only: `uiState` supports = and !=. uiState enum:
+     *   [UI_RESOURCE_STATE_UNSPECIFIED, UI_RESOURCE_STATE_BEING_CREATED,
+     *   UI_RESOURCE_STATE_ACTIVE, UI_RESOURCE_STATE_BEING_DELETED,
+     *   UI_RESOURCE_STATE_CREATION_FAILED].
+     *   * `notebookRuntimeType` supports = and !=. notebookRuntimeType enum:
+     *   [USER_DEFINED, ONE_CLICK].
+     *
+     * Some examples:
+     *
+     *   * `notebookRuntime="notebookRuntime123"`
+     *   * `displayName="myDisplayName"` and `displayName=~"myDisplayNameRegex"`
+     *   * `notebookRuntimeTemplate="notebookRuntimeTemplate321"`
+     *   * `healthState=HEALTHY`
+     *   * `runtimeState=RUNNING`
+     *   * `runtimeUser="test@google.com"`
+     *   * `uiState=UI_RESOURCE_STATE_BEING_DELETED`
+     *   * `notebookRuntimeType=USER_DEFINED`
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An expression for filtering the results of the request. For field
+     * names both snake_case and camelCase are supported.
+     *
+     *   * `notebookRuntime` supports = and !=. `notebookRuntime` represents the
+     *     NotebookRuntime ID,
+     *     i.e. the last segment of the NotebookRuntime's [resource name]
+     *     [google.cloud.aiplatform.v1.NotebookRuntime.name].
+     *   * `displayName` supports = and != and regex.
+     *   * `notebookRuntimeTemplate` supports = and !=. `notebookRuntimeTemplate`
+     *     represents the NotebookRuntimeTemplate ID,
+     *     i.e. the last segment of the NotebookRuntimeTemplate's [resource name]
+     *     [google.cloud.aiplatform.v1.NotebookRuntimeTemplate.name].
+     *   * `healthState` supports = and !=. healthState enum: [HEALTHY, UNHEALTHY,
+     *   HEALTH_STATE_UNSPECIFIED].
+     *   * `runtimeState` supports = and !=. runtimeState enum:
+     *   [RUNTIME_STATE_UNSPECIFIED, RUNNING, BEING_STARTED, BEING_STOPPED,
+     *   STOPPED, BEING_UPGRADED, ERROR, INVALID].
+     *   * `runtimeUser` supports = and !=.
+     *   * API version is UI only: `uiState` supports = and !=. uiState enum:
+     *   [UI_RESOURCE_STATE_UNSPECIFIED, UI_RESOURCE_STATE_BEING_CREATED,
+     *   UI_RESOURCE_STATE_ACTIVE, UI_RESOURCE_STATE_BEING_DELETED,
+     *   UI_RESOURCE_STATE_CREATION_FAILED].
+     *   * `notebookRuntimeType` supports = and !=. notebookRuntimeType enum:
+     *   [USER_DEFINED, ONE_CLICK].
+     *
+     * Some examples:
+     *
+     *   * `notebookRuntime="notebookRuntime123"`
+     *   * `displayName="myDisplayName"` and `displayName=~"myDisplayNameRegex"`
+     *   * `notebookRuntimeTemplate="notebookRuntimeTemplate321"`
+     *   * `healthState=HEALTHY`
+     *   * `runtimeState=RUNNING`
+     *   * `runtimeUser="test@google.com"`
+     *   * `uiState=UI_RESOURCE_STATE_BEING_DELETED`
+     *   * `notebookRuntimeType=USER_DEFINED`
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An expression for filtering the results of the request. For field
+     * names both snake_case and camelCase are supported.
+     *
+     *   * `notebookRuntime` supports = and !=. `notebookRuntime` represents the
+     *     NotebookRuntime ID,
+     *     i.e. the last segment of the NotebookRuntime's [resource name]
+     *     [google.cloud.aiplatform.v1.NotebookRuntime.name].
+     *   * `displayName` supports = and != and regex.
+     *   * `notebookRuntimeTemplate` supports = and !=. `notebookRuntimeTemplate`
+     *     represents the NotebookRuntimeTemplate ID,
+     *     i.e. the last segment of the NotebookRuntimeTemplate's [resource name]
+     *     [google.cloud.aiplatform.v1.NotebookRuntimeTemplate.name].
+     *   * `healthState` supports = and !=. healthState enum: [HEALTHY, UNHEALTHY,
+     *   HEALTH_STATE_UNSPECIFIED].
+     *   * `runtimeState` supports = and !=. runtimeState enum:
+     *   [RUNTIME_STATE_UNSPECIFIED, RUNNING, BEING_STARTED, BEING_STOPPED,
+     *   STOPPED, BEING_UPGRADED, ERROR, INVALID].
+     *   * `runtimeUser` supports = and !=.
+     *   * API version is UI only: `uiState` supports = and !=. uiState enum:
+     *   [UI_RESOURCE_STATE_UNSPECIFIED, UI_RESOURCE_STATE_BEING_CREATED,
+     *   UI_RESOURCE_STATE_ACTIVE, UI_RESOURCE_STATE_BEING_DELETED,
+     *   UI_RESOURCE_STATE_CREATION_FAILED].
+     *   * `notebookRuntimeType` supports = and !=. notebookRuntimeType enum:
+     *   [USER_DEFINED, ONE_CLICK].
+     *
+     * Some examples:
+     *
+     *   * `notebookRuntime="notebookRuntime123"`
+     *   * `displayName="myDisplayName"` and `displayName=~"myDisplayNameRegex"`
+     *   * `notebookRuntimeTemplate="notebookRuntimeTemplate321"`
+     *   * `healthState=HEALTHY`
+     *   * `runtimeState=RUNNING`
+     *   * `runtimeUser="test@google.com"`
+     *   * `uiState=UI_RESOURCE_STATE_BEING_DELETED`
+     *   * `notebookRuntimeType=USER_DEFINED`
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An expression for filtering the results of the request. For field
+     * names both snake_case and camelCase are supported.
+     *
+     *   * `notebookRuntime` supports = and !=. `notebookRuntime` represents the
+     *     NotebookRuntime ID,
+     *     i.e. the last segment of the NotebookRuntime's [resource name]
+     *     [google.cloud.aiplatform.v1.NotebookRuntime.name].
+     *   * `displayName` supports = and != and regex.
+     *   * `notebookRuntimeTemplate` supports = and !=. `notebookRuntimeTemplate`
+     *     represents the NotebookRuntimeTemplate ID,
+     *     i.e. the last segment of the NotebookRuntimeTemplate's [resource name]
+     *     [google.cloud.aiplatform.v1.NotebookRuntimeTemplate.name].
+     *   * `healthState` supports = and !=. healthState enum: [HEALTHY, UNHEALTHY,
+     *   HEALTH_STATE_UNSPECIFIED].
+     *   * `runtimeState` supports = and !=. runtimeState enum:
+     *   [RUNTIME_STATE_UNSPECIFIED, RUNNING, BEING_STARTED, BEING_STOPPED,
+     *   STOPPED, BEING_UPGRADED, ERROR, INVALID].
+     *   * `runtimeUser` supports = and !=.
+     *   * API version is UI only: `uiState` supports = and !=. uiState enum:
+     *   [UI_RESOURCE_STATE_UNSPECIFIED, UI_RESOURCE_STATE_BEING_CREATED,
+     *   UI_RESOURCE_STATE_ACTIVE, UI_RESOURCE_STATE_BEING_DELETED,
+     *   UI_RESOURCE_STATE_CREATION_FAILED].
+     *   * `notebookRuntimeType` supports = and !=. notebookRuntimeType enum:
+     *   [USER_DEFINED, ONE_CLICK].
+     *
+     * Some examples:
+     *
+     *   * `notebookRuntime="notebookRuntime123"`
+     *   * `displayName="myDisplayName"` and `displayName=~"myDisplayNameRegex"`
+     *   * `notebookRuntimeTemplate="notebookRuntimeTemplate321"`
+     *   * `healthState=HEALTHY`
+     *   * `runtimeState=RUNNING`
+     *   * `runtimeUser="test@google.com"`
+     *   * `uiState=UI_RESOURCE_STATE_BEING_DELETED`
+     *   * `notebookRuntimeType=USER_DEFINED`
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An expression for filtering the results of the request. For field
+     * names both snake_case and camelCase are supported.
+     *
+     *   * `notebookRuntime` supports = and !=. `notebookRuntime` represents the
+     *     NotebookRuntime ID,
+     *     i.e. the last segment of the NotebookRuntime's [resource name]
+     *     [google.cloud.aiplatform.v1.NotebookRuntime.name].
+     *   * `displayName` supports = and != and regex.
+     *   * `notebookRuntimeTemplate` supports = and !=. `notebookRuntimeTemplate`
+     *     represents the NotebookRuntimeTemplate ID,
+     *     i.e. the last segment of the NotebookRuntimeTemplate's [resource name]
+     *     [google.cloud.aiplatform.v1.NotebookRuntimeTemplate.name].
+     *   * `healthState` supports = and !=. healthState enum: [HEALTHY, UNHEALTHY,
+     *   HEALTH_STATE_UNSPECIFIED].
+     *   * `runtimeState` supports = and !=. runtimeState enum:
+     *   [RUNTIME_STATE_UNSPECIFIED, RUNNING, BEING_STARTED, BEING_STOPPED,
+     *   STOPPED, BEING_UPGRADED, ERROR, INVALID].
+     *   * `runtimeUser` supports = and !=.
+     *   * API version is UI only: `uiState` supports = and !=. uiState enum:
+     *   [UI_RESOURCE_STATE_UNSPECIFIED, UI_RESOURCE_STATE_BEING_CREATED,
+     *   UI_RESOURCE_STATE_ACTIVE, UI_RESOURCE_STATE_BEING_DELETED,
+     *   UI_RESOURCE_STATE_CREATION_FAILED].
+     *   * `notebookRuntimeType` supports = and !=. notebookRuntimeType enum:
+     *   [USER_DEFINED, ONE_CLICK].
+     *
+     * Some examples:
+     *
+     *   * `notebookRuntime="notebookRuntime123"`
+     *   * `displayName="myDisplayName"` and `displayName=~"myDisplayNameRegex"`
+     *   * `notebookRuntimeTemplate="notebookRuntimeTemplate321"`
+     *   * `healthState=HEALTHY`
+     *   * `runtimeState=RUNNING`
+     *   * `runtimeUser="test@google.com"`
+     *   * `uiState=UI_RESOURCE_STATE_BEING_DELETED`
+     *   * `notebookRuntimeType=USER_DEFINED`
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Optional. The standard list page size.
+     * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Optional. The standard list page size.
+     * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard list page size.
+     * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000004); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * Optional. The standard list page token.
+     * Typically obtained via
+     * [ListNotebookRuntimesResponse.next_page_token][google.cloud.aiplatform.v1.ListNotebookRuntimesResponse.next_page_token]
+     * of the previous
+     * [NotebookService.ListNotebookRuntimes][google.cloud.aiplatform.v1.NotebookService.ListNotebookRuntimes]
+     * call.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The standard list page token.
+     * Typically obtained via
+     * [ListNotebookRuntimesResponse.next_page_token][google.cloud.aiplatform.v1.ListNotebookRuntimesResponse.next_page_token]
+     * of the previous
+     * [NotebookService.ListNotebookRuntimes][google.cloud.aiplatform.v1.NotebookService.ListNotebookRuntimes]
+     * call.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The standard list page token.
+     * Typically obtained via
+     * [ListNotebookRuntimesResponse.next_page_token][google.cloud.aiplatform.v1.ListNotebookRuntimesResponse.next_page_token]
+     * of the previous
+     * [NotebookService.ListNotebookRuntimes][google.cloud.aiplatform.v1.NotebookService.ListNotebookRuntimes]
+     * call.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard list page token.
+     * Typically obtained via
+     * [ListNotebookRuntimesResponse.next_page_token][google.cloud.aiplatform.v1.ListNotebookRuntimesResponse.next_page_token]
+     * of the previous
+     * [NotebookService.ListNotebookRuntimes][google.cloud.aiplatform.v1.NotebookService.ListNotebookRuntimes]
+     * call.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard list page token.
+     * Typically obtained via
+     * [ListNotebookRuntimesResponse.next_page_token][google.cloud.aiplatform.v1.ListNotebookRuntimesResponse.next_page_token]
+     * of the previous
+     * [NotebookService.ListNotebookRuntimes][google.cloud.aiplatform.v1.NotebookService.ListNotebookRuntimes]
+     * call.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private com.google.protobuf.FieldMask readMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + readMaskBuilder_; + /** + * + * + *
+     * Optional. Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the readMask field is set. + */ + public boolean hasReadMask() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * Optional. Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The readMask. + */ + public com.google.protobuf.FieldMask getReadMask() { + if (readMaskBuilder_ == null) { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } else { + return readMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setReadMask(com.google.protobuf.FieldMask value) { + if (readMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + readMask_ = value; + } else { + readMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setReadMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (readMaskBuilder_ == null) { + readMask_ = builderForValue.build(); + } else { + readMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeReadMask(com.google.protobuf.FieldMask value) { + if (readMaskBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && readMask_ != null + && readMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getReadMaskBuilder().mergeFrom(value); + } else { + readMask_ = value; + } + } else { + readMaskBuilder_.mergeFrom(value); + } + if (readMask_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Optional. Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearReadMask() { + bitField0_ = (bitField0_ & ~0x00000010); + readMask_ = null; + if (readMaskBuilder_ != null) { + readMaskBuilder_.dispose(); + readMaskBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMask.Builder getReadMaskBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getReadMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder() { + if (readMaskBuilder_ != null) { + return readMaskBuilder_.getMessageOrBuilder(); + } else { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } + } + /** + * + * + *
+     * Optional. Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getReadMaskFieldBuilder() { + if (readMaskBuilder_ == null) { + readMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getReadMask(), getParentForChildren(), isClean()); + readMask_ = null; + } + return readMaskBuilder_; + } + + private java.lang.Object orderBy_ = ""; + /** + * + * + *
+     * Optional. A comma-separated list of fields to order by, sorted in ascending
+     * order. Use "desc" after a field name for descending. Supported fields:
+     *
+     *   * `display_name`
+     *   * `create_time`
+     *   * `update_time`
+     *
+     * Example: `display_name, create_time desc`.
+     * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. A comma-separated list of fields to order by, sorted in ascending
+     * order. Use "desc" after a field name for descending. Supported fields:
+     *
+     *   * `display_name`
+     *   * `create_time`
+     *   * `update_time`
+     *
+     * Example: `display_name, create_time desc`.
+     * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. A comma-separated list of fields to order by, sorted in ascending
+     * order. Use "desc" after a field name for descending. Supported fields:
+     *
+     *   * `display_name`
+     *   * `create_time`
+     *   * `update_time`
+     *
+     * Example: `display_name, create_time desc`.
+     * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + orderBy_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A comma-separated list of fields to order by, sorted in ascending
+     * order. Use "desc" after a field name for descending. Supported fields:
+     *
+     *   * `display_name`
+     *   * `create_time`
+     *   * `update_time`
+     *
+     * Example: `display_name, create_time desc`.
+     * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A comma-separated list of fields to order by, sorted in ascending
+     * order. Use "desc" after a field name for descending. Supported fields:
+     *
+     *   * `display_name`
+     *   * `create_time`
+     *   * `update_time`
+     *
+     * Example: `display_name, create_time desc`.
+     * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.ListNotebookRuntimesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ListNotebookRuntimesRequest) + private static final com.google.cloud.aiplatform.v1.ListNotebookRuntimesRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ListNotebookRuntimesRequest(); + } + + public static com.google.cloud.aiplatform.v1.ListNotebookRuntimesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListNotebookRuntimesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListNotebookRuntimesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListNotebookRuntimesRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListNotebookRuntimesRequestOrBuilder.java new file mode 100644 index 000000000000..b376c8014cf5 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListNotebookRuntimesRequestOrBuilder.java @@ -0,0 +1,277 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/notebook_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +public interface ListNotebookRuntimesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ListNotebookRuntimesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the Location from which to list the
+   * NotebookRuntimes.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The resource name of the Location from which to list the
+   * NotebookRuntimes.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. An expression for filtering the results of the request. For field
+   * names both snake_case and camelCase are supported.
+   *
+   *   * `notebookRuntime` supports = and !=. `notebookRuntime` represents the
+   *     NotebookRuntime ID,
+   *     i.e. the last segment of the NotebookRuntime's [resource name]
+   *     [google.cloud.aiplatform.v1.NotebookRuntime.name].
+   *   * `displayName` supports = and != and regex.
+   *   * `notebookRuntimeTemplate` supports = and !=. `notebookRuntimeTemplate`
+   *     represents the NotebookRuntimeTemplate ID,
+   *     i.e. the last segment of the NotebookRuntimeTemplate's [resource name]
+   *     [google.cloud.aiplatform.v1.NotebookRuntimeTemplate.name].
+   *   * `healthState` supports = and !=. healthState enum: [HEALTHY, UNHEALTHY,
+   *   HEALTH_STATE_UNSPECIFIED].
+   *   * `runtimeState` supports = and !=. runtimeState enum:
+   *   [RUNTIME_STATE_UNSPECIFIED, RUNNING, BEING_STARTED, BEING_STOPPED,
+   *   STOPPED, BEING_UPGRADED, ERROR, INVALID].
+   *   * `runtimeUser` supports = and !=.
+   *   * API version is UI only: `uiState` supports = and !=. uiState enum:
+   *   [UI_RESOURCE_STATE_UNSPECIFIED, UI_RESOURCE_STATE_BEING_CREATED,
+   *   UI_RESOURCE_STATE_ACTIVE, UI_RESOURCE_STATE_BEING_DELETED,
+   *   UI_RESOURCE_STATE_CREATION_FAILED].
+   *   * `notebookRuntimeType` supports = and !=. notebookRuntimeType enum:
+   *   [USER_DEFINED, ONE_CLICK].
+   *
+   * Some examples:
+   *
+   *   * `notebookRuntime="notebookRuntime123"`
+   *   * `displayName="myDisplayName"` and `displayName=~"myDisplayNameRegex"`
+   *   * `notebookRuntimeTemplate="notebookRuntimeTemplate321"`
+   *   * `healthState=HEALTHY`
+   *   * `runtimeState=RUNNING`
+   *   * `runtimeUser="test@google.com"`
+   *   * `uiState=UI_RESOURCE_STATE_BEING_DELETED`
+   *   * `notebookRuntimeType=USER_DEFINED`
+   * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Optional. An expression for filtering the results of the request. For field
+   * names both snake_case and camelCase are supported.
+   *
+   *   * `notebookRuntime` supports = and !=. `notebookRuntime` represents the
+   *     NotebookRuntime ID,
+   *     i.e. the last segment of the NotebookRuntime's [resource name]
+   *     [google.cloud.aiplatform.v1.NotebookRuntime.name].
+   *   * `displayName` supports = and != and regex.
+   *   * `notebookRuntimeTemplate` supports = and !=. `notebookRuntimeTemplate`
+   *     represents the NotebookRuntimeTemplate ID,
+   *     i.e. the last segment of the NotebookRuntimeTemplate's [resource name]
+   *     [google.cloud.aiplatform.v1.NotebookRuntimeTemplate.name].
+   *   * `healthState` supports = and !=. healthState enum: [HEALTHY, UNHEALTHY,
+   *   HEALTH_STATE_UNSPECIFIED].
+   *   * `runtimeState` supports = and !=. runtimeState enum:
+   *   [RUNTIME_STATE_UNSPECIFIED, RUNNING, BEING_STARTED, BEING_STOPPED,
+   *   STOPPED, BEING_UPGRADED, ERROR, INVALID].
+   *   * `runtimeUser` supports = and !=.
+   *   * API version is UI only: `uiState` supports = and !=. uiState enum:
+   *   [UI_RESOURCE_STATE_UNSPECIFIED, UI_RESOURCE_STATE_BEING_CREATED,
+   *   UI_RESOURCE_STATE_ACTIVE, UI_RESOURCE_STATE_BEING_DELETED,
+   *   UI_RESOURCE_STATE_CREATION_FAILED].
+   *   * `notebookRuntimeType` supports = and !=. notebookRuntimeType enum:
+   *   [USER_DEFINED, ONE_CLICK].
+   *
+   * Some examples:
+   *
+   *   * `notebookRuntime="notebookRuntime123"`
+   *   * `displayName="myDisplayName"` and `displayName=~"myDisplayNameRegex"`
+   *   * `notebookRuntimeTemplate="notebookRuntimeTemplate321"`
+   *   * `healthState=HEALTHY`
+   *   * `runtimeState=RUNNING`
+   *   * `runtimeUser="test@google.com"`
+   *   * `uiState=UI_RESOURCE_STATE_BEING_DELETED`
+   *   * `notebookRuntimeType=USER_DEFINED`
+   * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Optional. The standard list page size.
+   * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. The standard list page token.
+   * Typically obtained via
+   * [ListNotebookRuntimesResponse.next_page_token][google.cloud.aiplatform.v1.ListNotebookRuntimesResponse.next_page_token]
+   * of the previous
+   * [NotebookService.ListNotebookRuntimes][google.cloud.aiplatform.v1.NotebookService.ListNotebookRuntimes]
+   * call.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * Optional. The standard list page token.
+   * Typically obtained via
+   * [ListNotebookRuntimesResponse.next_page_token][google.cloud.aiplatform.v1.ListNotebookRuntimesResponse.next_page_token]
+   * of the previous
+   * [NotebookService.ListNotebookRuntimes][google.cloud.aiplatform.v1.NotebookService.ListNotebookRuntimes]
+   * call.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the readMask field is set. + */ + boolean hasReadMask(); + /** + * + * + *
+   * Optional. Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The readMask. + */ + com.google.protobuf.FieldMask getReadMask(); + /** + * + * + *
+   * Optional. Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder(); + + /** + * + * + *
+   * Optional. A comma-separated list of fields to order by, sorted in ascending
+   * order. Use "desc" after a field name for descending. Supported fields:
+   *
+   *   * `display_name`
+   *   * `create_time`
+   *   * `update_time`
+   *
+   * Example: `display_name, create_time desc`.
+   * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * Optional. A comma-separated list of fields to order by, sorted in ascending
+   * order. Use "desc" after a field name for descending. Supported fields:
+   *
+   *   * `display_name`
+   *   * `create_time`
+   *   * `update_time`
+   *
+   * Example: `display_name, create_time desc`.
+   * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListNotebookRuntimesResponse.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListNotebookRuntimesResponse.java new file mode 100644 index 000000000000..2ed89e442a14 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListNotebookRuntimesResponse.java @@ -0,0 +1,1155 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/notebook_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Response message for
+ * [NotebookService.ListNotebookRuntimes][google.cloud.aiplatform.v1.NotebookService.ListNotebookRuntimes].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListNotebookRuntimesResponse} + */ +public final class ListNotebookRuntimesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ListNotebookRuntimesResponse) + ListNotebookRuntimesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListNotebookRuntimesResponse.newBuilder() to construct. + private ListNotebookRuntimesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListNotebookRuntimesResponse() { + notebookRuntimes_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListNotebookRuntimesResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_ListNotebookRuntimesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_ListNotebookRuntimesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListNotebookRuntimesResponse.class, + com.google.cloud.aiplatform.v1.ListNotebookRuntimesResponse.Builder.class); + } + + public static final int NOTEBOOK_RUNTIMES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List notebookRuntimes_; + /** + * + * + *
+   * List of NotebookRuntimes in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.NotebookRuntime notebook_runtimes = 1; + */ + @java.lang.Override + public java.util.List getNotebookRuntimesList() { + return notebookRuntimes_; + } + /** + * + * + *
+   * List of NotebookRuntimes in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.NotebookRuntime notebook_runtimes = 1; + */ + @java.lang.Override + public java.util.List + getNotebookRuntimesOrBuilderList() { + return notebookRuntimes_; + } + /** + * + * + *
+   * List of NotebookRuntimes in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.NotebookRuntime notebook_runtimes = 1; + */ + @java.lang.Override + public int getNotebookRuntimesCount() { + return notebookRuntimes_.size(); + } + /** + * + * + *
+   * List of NotebookRuntimes in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.NotebookRuntime notebook_runtimes = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.NotebookRuntime getNotebookRuntimes(int index) { + return notebookRuntimes_.get(index); + } + /** + * + * + *
+   * List of NotebookRuntimes in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.NotebookRuntime notebook_runtimes = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.NotebookRuntimeOrBuilder getNotebookRuntimesOrBuilder( + int index) { + return notebookRuntimes_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * A token to retrieve next page of results.
+   * Pass to
+   * [ListNotebookRuntimesRequest.page_token][google.cloud.aiplatform.v1.ListNotebookRuntimesRequest.page_token]
+   * to obtain that page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + 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(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token to retrieve next page of results.
+   * Pass to
+   * [ListNotebookRuntimesRequest.page_token][google.cloud.aiplatform.v1.ListNotebookRuntimesRequest.page_token]
+   * to obtain that page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < notebookRuntimes_.size(); i++) { + output.writeMessage(1, notebookRuntimes_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < notebookRuntimes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, notebookRuntimes_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.ListNotebookRuntimesResponse)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ListNotebookRuntimesResponse other = + (com.google.cloud.aiplatform.v1.ListNotebookRuntimesResponse) obj; + + if (!getNotebookRuntimesList().equals(other.getNotebookRuntimesList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getNotebookRuntimesCount() > 0) { + hash = (37 * hash) + NOTEBOOK_RUNTIMES_FIELD_NUMBER; + hash = (53 * hash) + getNotebookRuntimesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.ListNotebookRuntimesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListNotebookRuntimesResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListNotebookRuntimesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListNotebookRuntimesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListNotebookRuntimesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListNotebookRuntimesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListNotebookRuntimesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListNotebookRuntimesResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListNotebookRuntimesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListNotebookRuntimesResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListNotebookRuntimesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListNotebookRuntimesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.ListNotebookRuntimesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for
+   * [NotebookService.ListNotebookRuntimes][google.cloud.aiplatform.v1.NotebookService.ListNotebookRuntimes].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListNotebookRuntimesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ListNotebookRuntimesResponse) + com.google.cloud.aiplatform.v1.ListNotebookRuntimesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_ListNotebookRuntimesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_ListNotebookRuntimesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListNotebookRuntimesResponse.class, + com.google.cloud.aiplatform.v1.ListNotebookRuntimesResponse.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.ListNotebookRuntimesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (notebookRuntimesBuilder_ == null) { + notebookRuntimes_ = java.util.Collections.emptyList(); + } else { + notebookRuntimes_ = null; + notebookRuntimesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_ListNotebookRuntimesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListNotebookRuntimesResponse getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ListNotebookRuntimesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListNotebookRuntimesResponse build() { + com.google.cloud.aiplatform.v1.ListNotebookRuntimesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListNotebookRuntimesResponse buildPartial() { + com.google.cloud.aiplatform.v1.ListNotebookRuntimesResponse result = + new com.google.cloud.aiplatform.v1.ListNotebookRuntimesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.aiplatform.v1.ListNotebookRuntimesResponse result) { + if (notebookRuntimesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + notebookRuntimes_ = java.util.Collections.unmodifiableList(notebookRuntimes_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.notebookRuntimes_ = notebookRuntimes_; + } else { + result.notebookRuntimes_ = notebookRuntimesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.ListNotebookRuntimesResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.ListNotebookRuntimesResponse) { + return mergeFrom((com.google.cloud.aiplatform.v1.ListNotebookRuntimesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.ListNotebookRuntimesResponse other) { + if (other == com.google.cloud.aiplatform.v1.ListNotebookRuntimesResponse.getDefaultInstance()) + return this; + if (notebookRuntimesBuilder_ == null) { + if (!other.notebookRuntimes_.isEmpty()) { + if (notebookRuntimes_.isEmpty()) { + notebookRuntimes_ = other.notebookRuntimes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureNotebookRuntimesIsMutable(); + notebookRuntimes_.addAll(other.notebookRuntimes_); + } + onChanged(); + } + } else { + if (!other.notebookRuntimes_.isEmpty()) { + if (notebookRuntimesBuilder_.isEmpty()) { + notebookRuntimesBuilder_.dispose(); + notebookRuntimesBuilder_ = null; + notebookRuntimes_ = other.notebookRuntimes_; + bitField0_ = (bitField0_ & ~0x00000001); + notebookRuntimesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getNotebookRuntimesFieldBuilder() + : null; + } else { + notebookRuntimesBuilder_.addAllMessages(other.notebookRuntimes_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.aiplatform.v1.NotebookRuntime m = + input.readMessage( + com.google.cloud.aiplatform.v1.NotebookRuntime.parser(), extensionRegistry); + if (notebookRuntimesBuilder_ == null) { + ensureNotebookRuntimesIsMutable(); + notebookRuntimes_.add(m); + } else { + notebookRuntimesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List notebookRuntimes_ = + java.util.Collections.emptyList(); + + private void ensureNotebookRuntimesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + notebookRuntimes_ = + new java.util.ArrayList( + notebookRuntimes_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.NotebookRuntime, + com.google.cloud.aiplatform.v1.NotebookRuntime.Builder, + com.google.cloud.aiplatform.v1.NotebookRuntimeOrBuilder> + notebookRuntimesBuilder_; + + /** + * + * + *
+     * List of NotebookRuntimes in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.NotebookRuntime notebook_runtimes = 1; + */ + public java.util.List + getNotebookRuntimesList() { + if (notebookRuntimesBuilder_ == null) { + return java.util.Collections.unmodifiableList(notebookRuntimes_); + } else { + return notebookRuntimesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of NotebookRuntimes in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.NotebookRuntime notebook_runtimes = 1; + */ + public int getNotebookRuntimesCount() { + if (notebookRuntimesBuilder_ == null) { + return notebookRuntimes_.size(); + } else { + return notebookRuntimesBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of NotebookRuntimes in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.NotebookRuntime notebook_runtimes = 1; + */ + public com.google.cloud.aiplatform.v1.NotebookRuntime getNotebookRuntimes(int index) { + if (notebookRuntimesBuilder_ == null) { + return notebookRuntimes_.get(index); + } else { + return notebookRuntimesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of NotebookRuntimes in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.NotebookRuntime notebook_runtimes = 1; + */ + public Builder setNotebookRuntimes( + int index, com.google.cloud.aiplatform.v1.NotebookRuntime value) { + if (notebookRuntimesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNotebookRuntimesIsMutable(); + notebookRuntimes_.set(index, value); + onChanged(); + } else { + notebookRuntimesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of NotebookRuntimes in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.NotebookRuntime notebook_runtimes = 1; + */ + public Builder setNotebookRuntimes( + int index, com.google.cloud.aiplatform.v1.NotebookRuntime.Builder builderForValue) { + if (notebookRuntimesBuilder_ == null) { + ensureNotebookRuntimesIsMutable(); + notebookRuntimes_.set(index, builderForValue.build()); + onChanged(); + } else { + notebookRuntimesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of NotebookRuntimes in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.NotebookRuntime notebook_runtimes = 1; + */ + public Builder addNotebookRuntimes(com.google.cloud.aiplatform.v1.NotebookRuntime value) { + if (notebookRuntimesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNotebookRuntimesIsMutable(); + notebookRuntimes_.add(value); + onChanged(); + } else { + notebookRuntimesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of NotebookRuntimes in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.NotebookRuntime notebook_runtimes = 1; + */ + public Builder addNotebookRuntimes( + int index, com.google.cloud.aiplatform.v1.NotebookRuntime value) { + if (notebookRuntimesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNotebookRuntimesIsMutable(); + notebookRuntimes_.add(index, value); + onChanged(); + } else { + notebookRuntimesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of NotebookRuntimes in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.NotebookRuntime notebook_runtimes = 1; + */ + public Builder addNotebookRuntimes( + com.google.cloud.aiplatform.v1.NotebookRuntime.Builder builderForValue) { + if (notebookRuntimesBuilder_ == null) { + ensureNotebookRuntimesIsMutable(); + notebookRuntimes_.add(builderForValue.build()); + onChanged(); + } else { + notebookRuntimesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of NotebookRuntimes in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.NotebookRuntime notebook_runtimes = 1; + */ + public Builder addNotebookRuntimes( + int index, com.google.cloud.aiplatform.v1.NotebookRuntime.Builder builderForValue) { + if (notebookRuntimesBuilder_ == null) { + ensureNotebookRuntimesIsMutable(); + notebookRuntimes_.add(index, builderForValue.build()); + onChanged(); + } else { + notebookRuntimesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of NotebookRuntimes in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.NotebookRuntime notebook_runtimes = 1; + */ + public Builder addAllNotebookRuntimes( + java.lang.Iterable values) { + if (notebookRuntimesBuilder_ == null) { + ensureNotebookRuntimesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, notebookRuntimes_); + onChanged(); + } else { + notebookRuntimesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of NotebookRuntimes in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.NotebookRuntime notebook_runtimes = 1; + */ + public Builder clearNotebookRuntimes() { + if (notebookRuntimesBuilder_ == null) { + notebookRuntimes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + notebookRuntimesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of NotebookRuntimes in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.NotebookRuntime notebook_runtimes = 1; + */ + public Builder removeNotebookRuntimes(int index) { + if (notebookRuntimesBuilder_ == null) { + ensureNotebookRuntimesIsMutable(); + notebookRuntimes_.remove(index); + onChanged(); + } else { + notebookRuntimesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of NotebookRuntimes in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.NotebookRuntime notebook_runtimes = 1; + */ + public com.google.cloud.aiplatform.v1.NotebookRuntime.Builder getNotebookRuntimesBuilder( + int index) { + return getNotebookRuntimesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of NotebookRuntimes in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.NotebookRuntime notebook_runtimes = 1; + */ + public com.google.cloud.aiplatform.v1.NotebookRuntimeOrBuilder getNotebookRuntimesOrBuilder( + int index) { + if (notebookRuntimesBuilder_ == null) { + return notebookRuntimes_.get(index); + } else { + return notebookRuntimesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of NotebookRuntimes in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.NotebookRuntime notebook_runtimes = 1; + */ + public java.util.List + getNotebookRuntimesOrBuilderList() { + if (notebookRuntimesBuilder_ != null) { + return notebookRuntimesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(notebookRuntimes_); + } + } + /** + * + * + *
+     * List of NotebookRuntimes in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.NotebookRuntime notebook_runtimes = 1; + */ + public com.google.cloud.aiplatform.v1.NotebookRuntime.Builder addNotebookRuntimesBuilder() { + return getNotebookRuntimesFieldBuilder() + .addBuilder(com.google.cloud.aiplatform.v1.NotebookRuntime.getDefaultInstance()); + } + /** + * + * + *
+     * List of NotebookRuntimes in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.NotebookRuntime notebook_runtimes = 1; + */ + public com.google.cloud.aiplatform.v1.NotebookRuntime.Builder addNotebookRuntimesBuilder( + int index) { + return getNotebookRuntimesFieldBuilder() + .addBuilder(index, com.google.cloud.aiplatform.v1.NotebookRuntime.getDefaultInstance()); + } + /** + * + * + *
+     * List of NotebookRuntimes in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.NotebookRuntime notebook_runtimes = 1; + */ + public java.util.List + getNotebookRuntimesBuilderList() { + return getNotebookRuntimesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.NotebookRuntime, + com.google.cloud.aiplatform.v1.NotebookRuntime.Builder, + com.google.cloud.aiplatform.v1.NotebookRuntimeOrBuilder> + getNotebookRuntimesFieldBuilder() { + if (notebookRuntimesBuilder_ == null) { + notebookRuntimesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.NotebookRuntime, + com.google.cloud.aiplatform.v1.NotebookRuntime.Builder, + com.google.cloud.aiplatform.v1.NotebookRuntimeOrBuilder>( + notebookRuntimes_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + notebookRuntimes_ = null; + } + return notebookRuntimesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token to retrieve next page of results.
+     * Pass to
+     * [ListNotebookRuntimesRequest.page_token][google.cloud.aiplatform.v1.ListNotebookRuntimesRequest.page_token]
+     * to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token to retrieve next page of results.
+     * Pass to
+     * [ListNotebookRuntimesRequest.page_token][google.cloud.aiplatform.v1.ListNotebookRuntimesRequest.page_token]
+     * to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token to retrieve next page of results.
+     * Pass to
+     * [ListNotebookRuntimesRequest.page_token][google.cloud.aiplatform.v1.ListNotebookRuntimesRequest.page_token]
+     * to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * A token to retrieve next page of results.
+     * Pass to
+     * [ListNotebookRuntimesRequest.page_token][google.cloud.aiplatform.v1.ListNotebookRuntimesRequest.page_token]
+     * to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A token to retrieve next page of results.
+     * Pass to
+     * [ListNotebookRuntimesRequest.page_token][google.cloud.aiplatform.v1.ListNotebookRuntimesRequest.page_token]
+     * to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.ListNotebookRuntimesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ListNotebookRuntimesResponse) + private static final com.google.cloud.aiplatform.v1.ListNotebookRuntimesResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ListNotebookRuntimesResponse(); + } + + public static com.google.cloud.aiplatform.v1.ListNotebookRuntimesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListNotebookRuntimesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListNotebookRuntimesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListNotebookRuntimesResponseOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListNotebookRuntimesResponseOrBuilder.java new file mode 100644 index 000000000000..59e5d65e68bd --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListNotebookRuntimesResponseOrBuilder.java @@ -0,0 +1,109 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/notebook_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +public interface ListNotebookRuntimesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ListNotebookRuntimesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * List of NotebookRuntimes in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.NotebookRuntime notebook_runtimes = 1; + */ + java.util.List getNotebookRuntimesList(); + /** + * + * + *
+   * List of NotebookRuntimes in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.NotebookRuntime notebook_runtimes = 1; + */ + com.google.cloud.aiplatform.v1.NotebookRuntime getNotebookRuntimes(int index); + /** + * + * + *
+   * List of NotebookRuntimes in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.NotebookRuntime notebook_runtimes = 1; + */ + int getNotebookRuntimesCount(); + /** + * + * + *
+   * List of NotebookRuntimes in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.NotebookRuntime notebook_runtimes = 1; + */ + java.util.List + getNotebookRuntimesOrBuilderList(); + /** + * + * + *
+   * List of NotebookRuntimes in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.NotebookRuntime notebook_runtimes = 1; + */ + com.google.cloud.aiplatform.v1.NotebookRuntimeOrBuilder getNotebookRuntimesOrBuilder(int index); + + /** + * + * + *
+   * A token to retrieve next page of results.
+   * Pass to
+   * [ListNotebookRuntimesRequest.page_token][google.cloud.aiplatform.v1.ListNotebookRuntimesRequest.page_token]
+   * to obtain that page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token to retrieve next page of results.
+   * Pass to
+   * [ListNotebookRuntimesRequest.page_token][google.cloud.aiplatform.v1.ListNotebookRuntimesRequest.page_token]
+   * to obtain that page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListPersistentResourcesRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListPersistentResourcesRequest.java new file mode 100644 index 000000000000..673e8ccf6817 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListPersistentResourcesRequest.java @@ -0,0 +1,948 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/persistent_resource_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for [PersistentResourceService.ListPersistentResource][].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListPersistentResourcesRequest} + */ +public final class ListPersistentResourcesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ListPersistentResourcesRequest) + ListPersistentResourcesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListPersistentResourcesRequest.newBuilder() to construct. + private ListPersistentResourcesRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListPersistentResourcesRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListPersistentResourcesRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.PersistentResourceServiceProto + .internal_static_google_cloud_aiplatform_v1_ListPersistentResourcesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.PersistentResourceServiceProto + .internal_static_google_cloud_aiplatform_v1_ListPersistentResourcesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListPersistentResourcesRequest.class, + com.google.cloud.aiplatform.v1.ListPersistentResourcesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The resource name of the Location to list the PersistentResources
+   * from. Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the Location to list the PersistentResources
+   * from. Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 3; + private int pageSize_ = 0; + /** + * + * + *
+   * Optional. The standard list page size.
+   * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * Optional. The standard list page token.
+   * Typically obtained via
+   * [ListPersistentResourceResponse.next_page_token][] of the previous
+   * [PersistentResourceService.ListPersistentResource][] call.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + 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(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The standard list page token.
+   * Typically obtained via
+   * [ListPersistentResourceResponse.next_page_token][] of the previous
+   * [PersistentResourceService.ListPersistentResource][] call.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(3, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.ListPersistentResourcesRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ListPersistentResourcesRequest other = + (com.google.cloud.aiplatform.v1.ListPersistentResourcesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.ListPersistentResourcesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListPersistentResourcesRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListPersistentResourcesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListPersistentResourcesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListPersistentResourcesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListPersistentResourcesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListPersistentResourcesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListPersistentResourcesRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListPersistentResourcesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListPersistentResourcesRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListPersistentResourcesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListPersistentResourcesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.ListPersistentResourcesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for [PersistentResourceService.ListPersistentResource][].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListPersistentResourcesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ListPersistentResourcesRequest) + com.google.cloud.aiplatform.v1.ListPersistentResourcesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.PersistentResourceServiceProto + .internal_static_google_cloud_aiplatform_v1_ListPersistentResourcesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.PersistentResourceServiceProto + .internal_static_google_cloud_aiplatform_v1_ListPersistentResourcesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListPersistentResourcesRequest.class, + com.google.cloud.aiplatform.v1.ListPersistentResourcesRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.ListPersistentResourcesRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.PersistentResourceServiceProto + .internal_static_google_cloud_aiplatform_v1_ListPersistentResourcesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListPersistentResourcesRequest + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ListPersistentResourcesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListPersistentResourcesRequest build() { + com.google.cloud.aiplatform.v1.ListPersistentResourcesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListPersistentResourcesRequest buildPartial() { + com.google.cloud.aiplatform.v1.ListPersistentResourcesRequest result = + new com.google.cloud.aiplatform.v1.ListPersistentResourcesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1.ListPersistentResourcesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.ListPersistentResourcesRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.ListPersistentResourcesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.ListPersistentResourcesRequest other) { + if (other + == com.google.cloud.aiplatform.v1.ListPersistentResourcesRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 24: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 24 + case 34: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of the Location to list the PersistentResources
+     * from. Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Location to list the PersistentResources
+     * from. Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Location to list the PersistentResources
+     * from. Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Location to list the PersistentResources
+     * from. Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Location to list the PersistentResources
+     * from. Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Optional. The standard list page size.
+     * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Optional. The standard list page size.
+     * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard list page size.
+     * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * Optional. The standard list page token.
+     * Typically obtained via
+     * [ListPersistentResourceResponse.next_page_token][] of the previous
+     * [PersistentResourceService.ListPersistentResource][] call.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The standard list page token.
+     * Typically obtained via
+     * [ListPersistentResourceResponse.next_page_token][] of the previous
+     * [PersistentResourceService.ListPersistentResource][] call.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The standard list page token.
+     * Typically obtained via
+     * [ListPersistentResourceResponse.next_page_token][] of the previous
+     * [PersistentResourceService.ListPersistentResource][] call.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard list page token.
+     * Typically obtained via
+     * [ListPersistentResourceResponse.next_page_token][] of the previous
+     * [PersistentResourceService.ListPersistentResource][] call.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard list page token.
+     * Typically obtained via
+     * [ListPersistentResourceResponse.next_page_token][] of the previous
+     * [PersistentResourceService.ListPersistentResource][] call.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.ListPersistentResourcesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ListPersistentResourcesRequest) + private static final com.google.cloud.aiplatform.v1.ListPersistentResourcesRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ListPersistentResourcesRequest(); + } + + public static com.google.cloud.aiplatform.v1.ListPersistentResourcesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListPersistentResourcesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListPersistentResourcesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListPersistentResourcesRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListPersistentResourcesRequestOrBuilder.java new file mode 100644 index 000000000000..e1c24094a858 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListPersistentResourcesRequestOrBuilder.java @@ -0,0 +1,101 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/persistent_resource_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +public interface ListPersistentResourcesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ListPersistentResourcesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the Location to list the PersistentResources
+   * from. Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The resource name of the Location to list the PersistentResources
+   * from. Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. The standard list page size.
+   * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. The standard list page token.
+   * Typically obtained via
+   * [ListPersistentResourceResponse.next_page_token][] of the previous
+   * [PersistentResourceService.ListPersistentResource][] call.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * Optional. The standard list page token.
+   * Typically obtained via
+   * [ListPersistentResourceResponse.next_page_token][] of the previous
+   * [PersistentResourceService.ListPersistentResource][] call.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListPersistentResourcesResponse.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListPersistentResourcesResponse.java new file mode 100644 index 000000000000..190394925762 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListPersistentResourcesResponse.java @@ -0,0 +1,1047 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/persistent_resource_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Response message for
+ * [PersistentResourceService.ListPersistentResources][google.cloud.aiplatform.v1.PersistentResourceService.ListPersistentResources]
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListPersistentResourcesResponse} + */ +public final class ListPersistentResourcesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ListPersistentResourcesResponse) + ListPersistentResourcesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListPersistentResourcesResponse.newBuilder() to construct. + private ListPersistentResourcesResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListPersistentResourcesResponse() { + persistentResources_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListPersistentResourcesResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.PersistentResourceServiceProto + .internal_static_google_cloud_aiplatform_v1_ListPersistentResourcesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.PersistentResourceServiceProto + .internal_static_google_cloud_aiplatform_v1_ListPersistentResourcesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListPersistentResourcesResponse.class, + com.google.cloud.aiplatform.v1.ListPersistentResourcesResponse.Builder.class); + } + + public static final int PERSISTENT_RESOURCES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List persistentResources_; + /** + * repeated .google.cloud.aiplatform.v1.PersistentResource persistent_resources = 1; + */ + @java.lang.Override + public java.util.List + getPersistentResourcesList() { + return persistentResources_; + } + /** + * repeated .google.cloud.aiplatform.v1.PersistentResource persistent_resources = 1; + */ + @java.lang.Override + public java.util.List + getPersistentResourcesOrBuilderList() { + return persistentResources_; + } + /** + * repeated .google.cloud.aiplatform.v1.PersistentResource persistent_resources = 1; + */ + @java.lang.Override + public int getPersistentResourcesCount() { + return persistentResources_.size(); + } + /** + * repeated .google.cloud.aiplatform.v1.PersistentResource persistent_resources = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.PersistentResource getPersistentResources(int index) { + return persistentResources_.get(index); + } + /** + * repeated .google.cloud.aiplatform.v1.PersistentResource persistent_resources = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.PersistentResourceOrBuilder getPersistentResourcesOrBuilder( + int index) { + return persistentResources_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * A token to retrieve next page of results.
+   * Pass to
+   * [ListPersistentResourcesRequest.page_token][google.cloud.aiplatform.v1.ListPersistentResourcesRequest.page_token]
+   * to obtain that page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + 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(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token to retrieve next page of results.
+   * Pass to
+   * [ListPersistentResourcesRequest.page_token][google.cloud.aiplatform.v1.ListPersistentResourcesRequest.page_token]
+   * to obtain that page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < persistentResources_.size(); i++) { + output.writeMessage(1, persistentResources_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < persistentResources_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, persistentResources_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.ListPersistentResourcesResponse)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ListPersistentResourcesResponse other = + (com.google.cloud.aiplatform.v1.ListPersistentResourcesResponse) obj; + + if (!getPersistentResourcesList().equals(other.getPersistentResourcesList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getPersistentResourcesCount() > 0) { + hash = (37 * hash) + PERSISTENT_RESOURCES_FIELD_NUMBER; + hash = (53 * hash) + getPersistentResourcesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.ListPersistentResourcesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListPersistentResourcesResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListPersistentResourcesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListPersistentResourcesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListPersistentResourcesResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListPersistentResourcesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListPersistentResourcesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListPersistentResourcesResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListPersistentResourcesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListPersistentResourcesResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListPersistentResourcesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListPersistentResourcesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.ListPersistentResourcesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for
+   * [PersistentResourceService.ListPersistentResources][google.cloud.aiplatform.v1.PersistentResourceService.ListPersistentResources]
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListPersistentResourcesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ListPersistentResourcesResponse) + com.google.cloud.aiplatform.v1.ListPersistentResourcesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.PersistentResourceServiceProto + .internal_static_google_cloud_aiplatform_v1_ListPersistentResourcesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.PersistentResourceServiceProto + .internal_static_google_cloud_aiplatform_v1_ListPersistentResourcesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListPersistentResourcesResponse.class, + com.google.cloud.aiplatform.v1.ListPersistentResourcesResponse.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.ListPersistentResourcesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (persistentResourcesBuilder_ == null) { + persistentResources_ = java.util.Collections.emptyList(); + } else { + persistentResources_ = null; + persistentResourcesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.PersistentResourceServiceProto + .internal_static_google_cloud_aiplatform_v1_ListPersistentResourcesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListPersistentResourcesResponse + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ListPersistentResourcesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListPersistentResourcesResponse build() { + com.google.cloud.aiplatform.v1.ListPersistentResourcesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListPersistentResourcesResponse buildPartial() { + com.google.cloud.aiplatform.v1.ListPersistentResourcesResponse result = + new com.google.cloud.aiplatform.v1.ListPersistentResourcesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.aiplatform.v1.ListPersistentResourcesResponse result) { + if (persistentResourcesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + persistentResources_ = java.util.Collections.unmodifiableList(persistentResources_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.persistentResources_ = persistentResources_; + } else { + result.persistentResources_ = persistentResourcesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1.ListPersistentResourcesResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.ListPersistentResourcesResponse) { + return mergeFrom((com.google.cloud.aiplatform.v1.ListPersistentResourcesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.ListPersistentResourcesResponse other) { + if (other + == com.google.cloud.aiplatform.v1.ListPersistentResourcesResponse.getDefaultInstance()) + return this; + if (persistentResourcesBuilder_ == null) { + if (!other.persistentResources_.isEmpty()) { + if (persistentResources_.isEmpty()) { + persistentResources_ = other.persistentResources_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePersistentResourcesIsMutable(); + persistentResources_.addAll(other.persistentResources_); + } + onChanged(); + } + } else { + if (!other.persistentResources_.isEmpty()) { + if (persistentResourcesBuilder_.isEmpty()) { + persistentResourcesBuilder_.dispose(); + persistentResourcesBuilder_ = null; + persistentResources_ = other.persistentResources_; + bitField0_ = (bitField0_ & ~0x00000001); + persistentResourcesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPersistentResourcesFieldBuilder() + : null; + } else { + persistentResourcesBuilder_.addAllMessages(other.persistentResources_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.aiplatform.v1.PersistentResource m = + input.readMessage( + com.google.cloud.aiplatform.v1.PersistentResource.parser(), + extensionRegistry); + if (persistentResourcesBuilder_ == null) { + ensurePersistentResourcesIsMutable(); + persistentResources_.add(m); + } else { + persistentResourcesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List persistentResources_ = + java.util.Collections.emptyList(); + + private void ensurePersistentResourcesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + persistentResources_ = + new java.util.ArrayList( + persistentResources_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.PersistentResource, + com.google.cloud.aiplatform.v1.PersistentResource.Builder, + com.google.cloud.aiplatform.v1.PersistentResourceOrBuilder> + persistentResourcesBuilder_; + + /** + * repeated .google.cloud.aiplatform.v1.PersistentResource persistent_resources = 1; + * + */ + public java.util.List + getPersistentResourcesList() { + if (persistentResourcesBuilder_ == null) { + return java.util.Collections.unmodifiableList(persistentResources_); + } else { + return persistentResourcesBuilder_.getMessageList(); + } + } + /** + * repeated .google.cloud.aiplatform.v1.PersistentResource persistent_resources = 1; + * + */ + public int getPersistentResourcesCount() { + if (persistentResourcesBuilder_ == null) { + return persistentResources_.size(); + } else { + return persistentResourcesBuilder_.getCount(); + } + } + /** + * repeated .google.cloud.aiplatform.v1.PersistentResource persistent_resources = 1; + * + */ + public com.google.cloud.aiplatform.v1.PersistentResource getPersistentResources(int index) { + if (persistentResourcesBuilder_ == null) { + return persistentResources_.get(index); + } else { + return persistentResourcesBuilder_.getMessage(index); + } + } + /** + * repeated .google.cloud.aiplatform.v1.PersistentResource persistent_resources = 1; + * + */ + public Builder setPersistentResources( + int index, com.google.cloud.aiplatform.v1.PersistentResource value) { + if (persistentResourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePersistentResourcesIsMutable(); + persistentResources_.set(index, value); + onChanged(); + } else { + persistentResourcesBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.cloud.aiplatform.v1.PersistentResource persistent_resources = 1; + * + */ + public Builder setPersistentResources( + int index, com.google.cloud.aiplatform.v1.PersistentResource.Builder builderForValue) { + if (persistentResourcesBuilder_ == null) { + ensurePersistentResourcesIsMutable(); + persistentResources_.set(index, builderForValue.build()); + onChanged(); + } else { + persistentResourcesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.cloud.aiplatform.v1.PersistentResource persistent_resources = 1; + * + */ + public Builder addPersistentResources(com.google.cloud.aiplatform.v1.PersistentResource value) { + if (persistentResourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePersistentResourcesIsMutable(); + persistentResources_.add(value); + onChanged(); + } else { + persistentResourcesBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.cloud.aiplatform.v1.PersistentResource persistent_resources = 1; + * + */ + public Builder addPersistentResources( + int index, com.google.cloud.aiplatform.v1.PersistentResource value) { + if (persistentResourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePersistentResourcesIsMutable(); + persistentResources_.add(index, value); + onChanged(); + } else { + persistentResourcesBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.cloud.aiplatform.v1.PersistentResource persistent_resources = 1; + * + */ + public Builder addPersistentResources( + com.google.cloud.aiplatform.v1.PersistentResource.Builder builderForValue) { + if (persistentResourcesBuilder_ == null) { + ensurePersistentResourcesIsMutable(); + persistentResources_.add(builderForValue.build()); + onChanged(); + } else { + persistentResourcesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.cloud.aiplatform.v1.PersistentResource persistent_resources = 1; + * + */ + public Builder addPersistentResources( + int index, com.google.cloud.aiplatform.v1.PersistentResource.Builder builderForValue) { + if (persistentResourcesBuilder_ == null) { + ensurePersistentResourcesIsMutable(); + persistentResources_.add(index, builderForValue.build()); + onChanged(); + } else { + persistentResourcesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.cloud.aiplatform.v1.PersistentResource persistent_resources = 1; + * + */ + public Builder addAllPersistentResources( + java.lang.Iterable values) { + if (persistentResourcesBuilder_ == null) { + ensurePersistentResourcesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, persistentResources_); + onChanged(); + } else { + persistentResourcesBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.cloud.aiplatform.v1.PersistentResource persistent_resources = 1; + * + */ + public Builder clearPersistentResources() { + if (persistentResourcesBuilder_ == null) { + persistentResources_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + persistentResourcesBuilder_.clear(); + } + return this; + } + /** + * repeated .google.cloud.aiplatform.v1.PersistentResource persistent_resources = 1; + * + */ + public Builder removePersistentResources(int index) { + if (persistentResourcesBuilder_ == null) { + ensurePersistentResourcesIsMutable(); + persistentResources_.remove(index); + onChanged(); + } else { + persistentResourcesBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.cloud.aiplatform.v1.PersistentResource persistent_resources = 1; + * + */ + public com.google.cloud.aiplatform.v1.PersistentResource.Builder getPersistentResourcesBuilder( + int index) { + return getPersistentResourcesFieldBuilder().getBuilder(index); + } + /** + * repeated .google.cloud.aiplatform.v1.PersistentResource persistent_resources = 1; + * + */ + public com.google.cloud.aiplatform.v1.PersistentResourceOrBuilder + getPersistentResourcesOrBuilder(int index) { + if (persistentResourcesBuilder_ == null) { + return persistentResources_.get(index); + } else { + return persistentResourcesBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.cloud.aiplatform.v1.PersistentResource persistent_resources = 1; + * + */ + public java.util.List + getPersistentResourcesOrBuilderList() { + if (persistentResourcesBuilder_ != null) { + return persistentResourcesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(persistentResources_); + } + } + /** + * repeated .google.cloud.aiplatform.v1.PersistentResource persistent_resources = 1; + * + */ + public com.google.cloud.aiplatform.v1.PersistentResource.Builder + addPersistentResourcesBuilder() { + return getPersistentResourcesFieldBuilder() + .addBuilder(com.google.cloud.aiplatform.v1.PersistentResource.getDefaultInstance()); + } + /** + * repeated .google.cloud.aiplatform.v1.PersistentResource persistent_resources = 1; + * + */ + public com.google.cloud.aiplatform.v1.PersistentResource.Builder addPersistentResourcesBuilder( + int index) { + return getPersistentResourcesFieldBuilder() + .addBuilder( + index, com.google.cloud.aiplatform.v1.PersistentResource.getDefaultInstance()); + } + /** + * repeated .google.cloud.aiplatform.v1.PersistentResource persistent_resources = 1; + * + */ + public java.util.List + getPersistentResourcesBuilderList() { + return getPersistentResourcesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.PersistentResource, + com.google.cloud.aiplatform.v1.PersistentResource.Builder, + com.google.cloud.aiplatform.v1.PersistentResourceOrBuilder> + getPersistentResourcesFieldBuilder() { + if (persistentResourcesBuilder_ == null) { + persistentResourcesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.PersistentResource, + com.google.cloud.aiplatform.v1.PersistentResource.Builder, + com.google.cloud.aiplatform.v1.PersistentResourceOrBuilder>( + persistentResources_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + persistentResources_ = null; + } + return persistentResourcesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token to retrieve next page of results.
+     * Pass to
+     * [ListPersistentResourcesRequest.page_token][google.cloud.aiplatform.v1.ListPersistentResourcesRequest.page_token]
+     * to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token to retrieve next page of results.
+     * Pass to
+     * [ListPersistentResourcesRequest.page_token][google.cloud.aiplatform.v1.ListPersistentResourcesRequest.page_token]
+     * to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token to retrieve next page of results.
+     * Pass to
+     * [ListPersistentResourcesRequest.page_token][google.cloud.aiplatform.v1.ListPersistentResourcesRequest.page_token]
+     * to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * A token to retrieve next page of results.
+     * Pass to
+     * [ListPersistentResourcesRequest.page_token][google.cloud.aiplatform.v1.ListPersistentResourcesRequest.page_token]
+     * to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A token to retrieve next page of results.
+     * Pass to
+     * [ListPersistentResourcesRequest.page_token][google.cloud.aiplatform.v1.ListPersistentResourcesRequest.page_token]
+     * to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.ListPersistentResourcesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ListPersistentResourcesResponse) + private static final com.google.cloud.aiplatform.v1.ListPersistentResourcesResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ListPersistentResourcesResponse(); + } + + public static com.google.cloud.aiplatform.v1.ListPersistentResourcesResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListPersistentResourcesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListPersistentResourcesResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListPersistentResourcesResponseOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListPersistentResourcesResponseOrBuilder.java new file mode 100644 index 000000000000..2714a92ea9ff --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListPersistentResourcesResponseOrBuilder.java @@ -0,0 +1,80 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/persistent_resource_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +public interface ListPersistentResourcesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ListPersistentResourcesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .google.cloud.aiplatform.v1.PersistentResource persistent_resources = 1; + */ + java.util.List getPersistentResourcesList(); + /** + * repeated .google.cloud.aiplatform.v1.PersistentResource persistent_resources = 1; + */ + com.google.cloud.aiplatform.v1.PersistentResource getPersistentResources(int index); + /** + * repeated .google.cloud.aiplatform.v1.PersistentResource persistent_resources = 1; + */ + int getPersistentResourcesCount(); + /** + * repeated .google.cloud.aiplatform.v1.PersistentResource persistent_resources = 1; + */ + java.util.List + getPersistentResourcesOrBuilderList(); + /** + * repeated .google.cloud.aiplatform.v1.PersistentResource persistent_resources = 1; + */ + com.google.cloud.aiplatform.v1.PersistentResourceOrBuilder getPersistentResourcesOrBuilder( + int index); + + /** + * + * + *
+   * A token to retrieve next page of results.
+   * Pass to
+   * [ListPersistentResourcesRequest.page_token][google.cloud.aiplatform.v1.ListPersistentResourcesRequest.page_token]
+   * to obtain that page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token to retrieve next page of results.
+   * Pass to
+   * [ListPersistentResourcesRequest.page_token][google.cloud.aiplatform.v1.ListPersistentResourcesRequest.page_token]
+   * to obtain that page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListTuningJobsRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListTuningJobsRequest.java new file mode 100644 index 000000000000..6ded12d30fdf --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListTuningJobsRequest.java @@ -0,0 +1,1119 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/genai_tuning_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for
+ * [GenAiTuningService.ListTuningJobs][google.cloud.aiplatform.v1.GenAiTuningService.ListTuningJobs].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListTuningJobsRequest} + */ +public final class ListTuningJobsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ListTuningJobsRequest) + ListTuningJobsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListTuningJobsRequest.newBuilder() to construct. + private ListTuningJobsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListTuningJobsRequest() { + parent_ = ""; + filter_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListTuningJobsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.GenAiTuningServiceProto + .internal_static_google_cloud_aiplatform_v1_ListTuningJobsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.GenAiTuningServiceProto + .internal_static_google_cloud_aiplatform_v1_ListTuningJobsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListTuningJobsRequest.class, + com.google.cloud.aiplatform.v1.ListTuningJobsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The resource name of the Location to list the TuningJobs from.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the Location to list the TuningJobs from.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + * + * + *
+   * Optional. The standard list filter.
+   * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + 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(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The standard list filter.
+   * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 3; + private int pageSize_ = 0; + /** + * + * + *
+   * Optional. The standard list page size.
+   * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * Optional. The standard list page token.
+   * Typically obtained via [ListTuningJob.next_page_token][] of the
+   * previous GenAiTuningService.ListTuningJob][] call.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + 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(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The standard list page token.
+   * Typically obtained via [ListTuningJob.next_page_token][] of the
+   * previous GenAiTuningService.ListTuningJob][] call.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); + } + if (pageSize_ != 0) { + output.writeInt32(3, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.ListTuningJobsRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ListTuningJobsRequest other = + (com.google.cloud.aiplatform.v1.ListTuningJobsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.ListTuningJobsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListTuningJobsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListTuningJobsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListTuningJobsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListTuningJobsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListTuningJobsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListTuningJobsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListTuningJobsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListTuningJobsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListTuningJobsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListTuningJobsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListTuningJobsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.aiplatform.v1.ListTuningJobsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for
+   * [GenAiTuningService.ListTuningJobs][google.cloud.aiplatform.v1.GenAiTuningService.ListTuningJobs].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListTuningJobsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ListTuningJobsRequest) + com.google.cloud.aiplatform.v1.ListTuningJobsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.GenAiTuningServiceProto + .internal_static_google_cloud_aiplatform_v1_ListTuningJobsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.GenAiTuningServiceProto + .internal_static_google_cloud_aiplatform_v1_ListTuningJobsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListTuningJobsRequest.class, + com.google.cloud.aiplatform.v1.ListTuningJobsRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.ListTuningJobsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + filter_ = ""; + pageSize_ = 0; + pageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.GenAiTuningServiceProto + .internal_static_google_cloud_aiplatform_v1_ListTuningJobsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListTuningJobsRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ListTuningJobsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListTuningJobsRequest build() { + com.google.cloud.aiplatform.v1.ListTuningJobsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListTuningJobsRequest buildPartial() { + com.google.cloud.aiplatform.v1.ListTuningJobsRequest result = + new com.google.cloud.aiplatform.v1.ListTuningJobsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.ListTuningJobsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.pageToken_ = pageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.ListTuningJobsRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.ListTuningJobsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.ListTuningJobsRequest other) { + if (other == com.google.cloud.aiplatform.v1.ListTuningJobsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of the Location to list the TuningJobs from.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Location to list the TuningJobs from.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Location to list the TuningJobs from.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Location to list the TuningJobs from.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Location to list the TuningJobs from.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Optional. The standard list filter.
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The standard list filter.
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The standard list filter.
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard list filter.
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard list filter.
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Optional. The standard list page size.
+     * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Optional. The standard list page size.
+     * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard list page size.
+     * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000004); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * Optional. The standard list page token.
+     * Typically obtained via [ListTuningJob.next_page_token][] of the
+     * previous GenAiTuningService.ListTuningJob][] call.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The standard list page token.
+     * Typically obtained via [ListTuningJob.next_page_token][] of the
+     * previous GenAiTuningService.ListTuningJob][] call.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The standard list page token.
+     * Typically obtained via [ListTuningJob.next_page_token][] of the
+     * previous GenAiTuningService.ListTuningJob][] call.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard list page token.
+     * Typically obtained via [ListTuningJob.next_page_token][] of the
+     * previous GenAiTuningService.ListTuningJob][] call.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard list page token.
+     * Typically obtained via [ListTuningJob.next_page_token][] of the
+     * previous GenAiTuningService.ListTuningJob][] call.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.ListTuningJobsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ListTuningJobsRequest) + private static final com.google.cloud.aiplatform.v1.ListTuningJobsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ListTuningJobsRequest(); + } + + public static com.google.cloud.aiplatform.v1.ListTuningJobsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListTuningJobsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListTuningJobsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListTuningJobsRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListTuningJobsRequestOrBuilder.java new file mode 100644 index 000000000000..48d07a6bdad2 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListTuningJobsRequestOrBuilder.java @@ -0,0 +1,124 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/genai_tuning_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +public interface ListTuningJobsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ListTuningJobsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the Location to list the TuningJobs from.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The resource name of the Location to list the TuningJobs from.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. The standard list filter.
+   * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Optional. The standard list filter.
+   * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Optional. The standard list page size.
+   * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. The standard list page token.
+   * Typically obtained via [ListTuningJob.next_page_token][] of the
+   * previous GenAiTuningService.ListTuningJob][] call.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * Optional. The standard list page token.
+   * Typically obtained via [ListTuningJob.next_page_token][] of the
+   * previous GenAiTuningService.ListTuningJob][] call.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListTuningJobsResponse.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListTuningJobsResponse.java new file mode 100644 index 000000000000..2e5999539fd2 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListTuningJobsResponse.java @@ -0,0 +1,1143 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/genai_tuning_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Response message for
+ * [GenAiTuningService.ListTuningJobs][google.cloud.aiplatform.v1.GenAiTuningService.ListTuningJobs]
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListTuningJobsResponse} + */ +public final class ListTuningJobsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ListTuningJobsResponse) + ListTuningJobsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListTuningJobsResponse.newBuilder() to construct. + private ListTuningJobsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListTuningJobsResponse() { + tuningJobs_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListTuningJobsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.GenAiTuningServiceProto + .internal_static_google_cloud_aiplatform_v1_ListTuningJobsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.GenAiTuningServiceProto + .internal_static_google_cloud_aiplatform_v1_ListTuningJobsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListTuningJobsResponse.class, + com.google.cloud.aiplatform.v1.ListTuningJobsResponse.Builder.class); + } + + public static final int TUNING_JOBS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List tuningJobs_; + /** + * + * + *
+   * List of TuningJobs in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.TuningJob tuning_jobs = 1; + */ + @java.lang.Override + public java.util.List getTuningJobsList() { + return tuningJobs_; + } + /** + * + * + *
+   * List of TuningJobs in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.TuningJob tuning_jobs = 1; + */ + @java.lang.Override + public java.util.List + getTuningJobsOrBuilderList() { + return tuningJobs_; + } + /** + * + * + *
+   * List of TuningJobs in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.TuningJob tuning_jobs = 1; + */ + @java.lang.Override + public int getTuningJobsCount() { + return tuningJobs_.size(); + } + /** + * + * + *
+   * List of TuningJobs in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.TuningJob tuning_jobs = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.TuningJob getTuningJobs(int index) { + return tuningJobs_.get(index); + } + /** + * + * + *
+   * List of TuningJobs in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.TuningJob tuning_jobs = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.TuningJobOrBuilder getTuningJobsOrBuilder(int index) { + return tuningJobs_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * Pass to
+   * [ListTuningJobsRequest.page_token][google.cloud.aiplatform.v1.ListTuningJobsRequest.page_token]
+   * to obtain that page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + 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(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * Pass to
+   * [ListTuningJobsRequest.page_token][google.cloud.aiplatform.v1.ListTuningJobsRequest.page_token]
+   * to obtain that page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < tuningJobs_.size(); i++) { + output.writeMessage(1, tuningJobs_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < tuningJobs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, tuningJobs_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.ListTuningJobsResponse)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ListTuningJobsResponse other = + (com.google.cloud.aiplatform.v1.ListTuningJobsResponse) obj; + + if (!getTuningJobsList().equals(other.getTuningJobsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getTuningJobsCount() > 0) { + hash = (37 * hash) + TUNING_JOBS_FIELD_NUMBER; + hash = (53 * hash) + getTuningJobsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.ListTuningJobsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListTuningJobsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListTuningJobsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListTuningJobsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListTuningJobsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListTuningJobsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListTuningJobsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListTuningJobsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListTuningJobsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListTuningJobsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListTuningJobsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListTuningJobsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.ListTuningJobsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for
+   * [GenAiTuningService.ListTuningJobs][google.cloud.aiplatform.v1.GenAiTuningService.ListTuningJobs]
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListTuningJobsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ListTuningJobsResponse) + com.google.cloud.aiplatform.v1.ListTuningJobsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.GenAiTuningServiceProto + .internal_static_google_cloud_aiplatform_v1_ListTuningJobsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.GenAiTuningServiceProto + .internal_static_google_cloud_aiplatform_v1_ListTuningJobsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListTuningJobsResponse.class, + com.google.cloud.aiplatform.v1.ListTuningJobsResponse.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.ListTuningJobsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (tuningJobsBuilder_ == null) { + tuningJobs_ = java.util.Collections.emptyList(); + } else { + tuningJobs_ = null; + tuningJobsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.GenAiTuningServiceProto + .internal_static_google_cloud_aiplatform_v1_ListTuningJobsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListTuningJobsResponse getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ListTuningJobsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListTuningJobsResponse build() { + com.google.cloud.aiplatform.v1.ListTuningJobsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListTuningJobsResponse buildPartial() { + com.google.cloud.aiplatform.v1.ListTuningJobsResponse result = + new com.google.cloud.aiplatform.v1.ListTuningJobsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.aiplatform.v1.ListTuningJobsResponse result) { + if (tuningJobsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + tuningJobs_ = java.util.Collections.unmodifiableList(tuningJobs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.tuningJobs_ = tuningJobs_; + } else { + result.tuningJobs_ = tuningJobsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.ListTuningJobsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.ListTuningJobsResponse) { + return mergeFrom((com.google.cloud.aiplatform.v1.ListTuningJobsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.ListTuningJobsResponse other) { + if (other == com.google.cloud.aiplatform.v1.ListTuningJobsResponse.getDefaultInstance()) + return this; + if (tuningJobsBuilder_ == null) { + if (!other.tuningJobs_.isEmpty()) { + if (tuningJobs_.isEmpty()) { + tuningJobs_ = other.tuningJobs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTuningJobsIsMutable(); + tuningJobs_.addAll(other.tuningJobs_); + } + onChanged(); + } + } else { + if (!other.tuningJobs_.isEmpty()) { + if (tuningJobsBuilder_.isEmpty()) { + tuningJobsBuilder_.dispose(); + tuningJobsBuilder_ = null; + tuningJobs_ = other.tuningJobs_; + bitField0_ = (bitField0_ & ~0x00000001); + tuningJobsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getTuningJobsFieldBuilder() + : null; + } else { + tuningJobsBuilder_.addAllMessages(other.tuningJobs_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.aiplatform.v1.TuningJob m = + input.readMessage( + com.google.cloud.aiplatform.v1.TuningJob.parser(), extensionRegistry); + if (tuningJobsBuilder_ == null) { + ensureTuningJobsIsMutable(); + tuningJobs_.add(m); + } else { + tuningJobsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List tuningJobs_ = + java.util.Collections.emptyList(); + + private void ensureTuningJobsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + tuningJobs_ = + new java.util.ArrayList(tuningJobs_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.TuningJob, + com.google.cloud.aiplatform.v1.TuningJob.Builder, + com.google.cloud.aiplatform.v1.TuningJobOrBuilder> + tuningJobsBuilder_; + + /** + * + * + *
+     * List of TuningJobs in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.TuningJob tuning_jobs = 1; + */ + public java.util.List getTuningJobsList() { + if (tuningJobsBuilder_ == null) { + return java.util.Collections.unmodifiableList(tuningJobs_); + } else { + return tuningJobsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of TuningJobs in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.TuningJob tuning_jobs = 1; + */ + public int getTuningJobsCount() { + if (tuningJobsBuilder_ == null) { + return tuningJobs_.size(); + } else { + return tuningJobsBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of TuningJobs in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.TuningJob tuning_jobs = 1; + */ + public com.google.cloud.aiplatform.v1.TuningJob getTuningJobs(int index) { + if (tuningJobsBuilder_ == null) { + return tuningJobs_.get(index); + } else { + return tuningJobsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of TuningJobs in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.TuningJob tuning_jobs = 1; + */ + public Builder setTuningJobs(int index, com.google.cloud.aiplatform.v1.TuningJob value) { + if (tuningJobsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTuningJobsIsMutable(); + tuningJobs_.set(index, value); + onChanged(); + } else { + tuningJobsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of TuningJobs in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.TuningJob tuning_jobs = 1; + */ + public Builder setTuningJobs( + int index, com.google.cloud.aiplatform.v1.TuningJob.Builder builderForValue) { + if (tuningJobsBuilder_ == null) { + ensureTuningJobsIsMutable(); + tuningJobs_.set(index, builderForValue.build()); + onChanged(); + } else { + tuningJobsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of TuningJobs in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.TuningJob tuning_jobs = 1; + */ + public Builder addTuningJobs(com.google.cloud.aiplatform.v1.TuningJob value) { + if (tuningJobsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTuningJobsIsMutable(); + tuningJobs_.add(value); + onChanged(); + } else { + tuningJobsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of TuningJobs in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.TuningJob tuning_jobs = 1; + */ + public Builder addTuningJobs(int index, com.google.cloud.aiplatform.v1.TuningJob value) { + if (tuningJobsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTuningJobsIsMutable(); + tuningJobs_.add(index, value); + onChanged(); + } else { + tuningJobsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of TuningJobs in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.TuningJob tuning_jobs = 1; + */ + public Builder addTuningJobs(com.google.cloud.aiplatform.v1.TuningJob.Builder builderForValue) { + if (tuningJobsBuilder_ == null) { + ensureTuningJobsIsMutable(); + tuningJobs_.add(builderForValue.build()); + onChanged(); + } else { + tuningJobsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of TuningJobs in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.TuningJob tuning_jobs = 1; + */ + public Builder addTuningJobs( + int index, com.google.cloud.aiplatform.v1.TuningJob.Builder builderForValue) { + if (tuningJobsBuilder_ == null) { + ensureTuningJobsIsMutable(); + tuningJobs_.add(index, builderForValue.build()); + onChanged(); + } else { + tuningJobsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of TuningJobs in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.TuningJob tuning_jobs = 1; + */ + public Builder addAllTuningJobs( + java.lang.Iterable values) { + if (tuningJobsBuilder_ == null) { + ensureTuningJobsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, tuningJobs_); + onChanged(); + } else { + tuningJobsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of TuningJobs in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.TuningJob tuning_jobs = 1; + */ + public Builder clearTuningJobs() { + if (tuningJobsBuilder_ == null) { + tuningJobs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + tuningJobsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of TuningJobs in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.TuningJob tuning_jobs = 1; + */ + public Builder removeTuningJobs(int index) { + if (tuningJobsBuilder_ == null) { + ensureTuningJobsIsMutable(); + tuningJobs_.remove(index); + onChanged(); + } else { + tuningJobsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of TuningJobs in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.TuningJob tuning_jobs = 1; + */ + public com.google.cloud.aiplatform.v1.TuningJob.Builder getTuningJobsBuilder(int index) { + return getTuningJobsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of TuningJobs in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.TuningJob tuning_jobs = 1; + */ + public com.google.cloud.aiplatform.v1.TuningJobOrBuilder getTuningJobsOrBuilder(int index) { + if (tuningJobsBuilder_ == null) { + return tuningJobs_.get(index); + } else { + return tuningJobsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of TuningJobs in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.TuningJob tuning_jobs = 1; + */ + public java.util.List + getTuningJobsOrBuilderList() { + if (tuningJobsBuilder_ != null) { + return tuningJobsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(tuningJobs_); + } + } + /** + * + * + *
+     * List of TuningJobs in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.TuningJob tuning_jobs = 1; + */ + public com.google.cloud.aiplatform.v1.TuningJob.Builder addTuningJobsBuilder() { + return getTuningJobsFieldBuilder() + .addBuilder(com.google.cloud.aiplatform.v1.TuningJob.getDefaultInstance()); + } + /** + * + * + *
+     * List of TuningJobs in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.TuningJob tuning_jobs = 1; + */ + public com.google.cloud.aiplatform.v1.TuningJob.Builder addTuningJobsBuilder(int index) { + return getTuningJobsFieldBuilder() + .addBuilder(index, com.google.cloud.aiplatform.v1.TuningJob.getDefaultInstance()); + } + /** + * + * + *
+     * List of TuningJobs in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.TuningJob tuning_jobs = 1; + */ + public java.util.List + getTuningJobsBuilderList() { + return getTuningJobsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.TuningJob, + com.google.cloud.aiplatform.v1.TuningJob.Builder, + com.google.cloud.aiplatform.v1.TuningJobOrBuilder> + getTuningJobsFieldBuilder() { + if (tuningJobsBuilder_ == null) { + tuningJobsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.TuningJob, + com.google.cloud.aiplatform.v1.TuningJob.Builder, + com.google.cloud.aiplatform.v1.TuningJobOrBuilder>( + tuningJobs_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + tuningJobs_ = null; + } + return tuningJobsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to
+     * [ListTuningJobsRequest.page_token][google.cloud.aiplatform.v1.ListTuningJobsRequest.page_token]
+     * to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to
+     * [ListTuningJobsRequest.page_token][google.cloud.aiplatform.v1.ListTuningJobsRequest.page_token]
+     * to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to
+     * [ListTuningJobsRequest.page_token][google.cloud.aiplatform.v1.ListTuningJobsRequest.page_token]
+     * to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to
+     * [ListTuningJobsRequest.page_token][google.cloud.aiplatform.v1.ListTuningJobsRequest.page_token]
+     * to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to
+     * [ListTuningJobsRequest.page_token][google.cloud.aiplatform.v1.ListTuningJobsRequest.page_token]
+     * to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.ListTuningJobsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ListTuningJobsResponse) + private static final com.google.cloud.aiplatform.v1.ListTuningJobsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ListTuningJobsResponse(); + } + + public static com.google.cloud.aiplatform.v1.ListTuningJobsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListTuningJobsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListTuningJobsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListTuningJobsResponseOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListTuningJobsResponseOrBuilder.java new file mode 100644 index 000000000000..b4d57ad73da4 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListTuningJobsResponseOrBuilder.java @@ -0,0 +1,109 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/genai_tuning_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +public interface ListTuningJobsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ListTuningJobsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * List of TuningJobs in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.TuningJob tuning_jobs = 1; + */ + java.util.List getTuningJobsList(); + /** + * + * + *
+   * List of TuningJobs in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.TuningJob tuning_jobs = 1; + */ + com.google.cloud.aiplatform.v1.TuningJob getTuningJobs(int index); + /** + * + * + *
+   * List of TuningJobs in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.TuningJob tuning_jobs = 1; + */ + int getTuningJobsCount(); + /** + * + * + *
+   * List of TuningJobs in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.TuningJob tuning_jobs = 1; + */ + java.util.List + getTuningJobsOrBuilderList(); + /** + * + * + *
+   * List of TuningJobs in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.TuningJob tuning_jobs = 1; + */ + com.google.cloud.aiplatform.v1.TuningJobOrBuilder getTuningJobsOrBuilder(int index); + + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * Pass to
+   * [ListTuningJobsRequest.page_token][google.cloud.aiplatform.v1.ListTuningJobsRequest.page_token]
+   * to obtain that page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * Pass to
+   * [ListTuningJobsRequest.page_token][google.cloud.aiplatform.v1.ListTuningJobsRequest.page_token]
+   * to obtain that page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/MachineResourcesProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/MachineResourcesProto.java index 1cffda97661c..50d4cf9f6521 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/MachineResourcesProto.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/MachineResourcesProto.java @@ -64,6 +64,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_aiplatform_v1_AutoscalingMetricSpec_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_aiplatform_v1_AutoscalingMetricSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_ShieldedVmConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ShieldedVmConfig_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -102,12 +106,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\001 \001(\tB\003\340A\002\022\021\n\004path\030\002 \001(\tB\003\340A\002\022\030\n\013mount_p" + "oint\030\003 \001(\tB\003\340A\002\"A\n\025AutoscalingMetricSpec" + "\022\030\n\013metric_name\030\001 \001(\tB\003\340A\002\022\016\n\006target\030\002 \001" - + "(\005B\323\001\n\036com.google.cloud.aiplatform.v1B\025M" - + "achineResourcesProtoP\001Z>cloud.google.com" - + "/go/aiplatform/apiv1/aiplatformpb;aiplat" - + "formpb\252\002\032Google.Cloud.AIPlatform.V1\312\002\032Go" - + "ogle\\Cloud\\AIPlatform\\V1\352\002\035Google::Cloud" - + "::AIPlatform::V1b\006proto3" + + "(\005\".\n\020ShieldedVmConfig\022\032\n\022enable_secure_" + + "boot\030\001 \001(\010B\323\001\n\036com.google.cloud.aiplatfo" + + "rm.v1B\025MachineResourcesProtoP\001Z>cloud.go" + + "ogle.com/go/aiplatform/apiv1/aiplatformp" + + "b;aiplatformpb\252\002\032Google.Cloud.AIPlatform" + + ".V1\312\002\032Google\\Cloud\\AIPlatform\\V1\352\002\035Googl" + + "e::Cloud::AIPlatform::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -188,6 +193,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "MetricName", "Target", }); + internal_static_google_cloud_aiplatform_v1_ShieldedVmConfig_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_aiplatform_v1_ShieldedVmConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ShieldedVmConfig_descriptor, + new java.lang.String[] { + "EnableSecureBoot", + }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NetworkSpec.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NetworkSpec.java new file mode 100644 index 000000000000..5d68864514a8 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NetworkSpec.java @@ -0,0 +1,920 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/network_spec.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Network spec.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.NetworkSpec} + */ +public final class NetworkSpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.NetworkSpec) + NetworkSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use NetworkSpec.newBuilder() to construct. + private NetworkSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private NetworkSpec() { + network_ = ""; + subnetwork_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new NetworkSpec(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.NetworkSpecProto + .internal_static_google_cloud_aiplatform_v1_NetworkSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.NetworkSpecProto + .internal_static_google_cloud_aiplatform_v1_NetworkSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.NetworkSpec.class, + com.google.cloud.aiplatform.v1.NetworkSpec.Builder.class); + } + + public static final int ENABLE_INTERNET_ACCESS_FIELD_NUMBER = 1; + private boolean enableInternetAccess_ = false; + /** + * + * + *
+   * Whether to enable public internet access. Default false.
+   * 
+ * + * bool enable_internet_access = 1; + * + * @return The enableInternetAccess. + */ + @java.lang.Override + public boolean getEnableInternetAccess() { + return enableInternetAccess_; + } + + public static final int NETWORK_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object network_ = ""; + /** + * + * + *
+   * The full name of the Google Compute Engine
+   * [network](https://cloud.google.com//compute/docs/networks-and-firewalls#networks)
+   * 
+ * + * string network = 2 [(.google.api.resource_reference) = { ... } + * + * @return The network. + */ + @java.lang.Override + public java.lang.String getNetwork() { + java.lang.Object ref = network_; + 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(); + network_ = s; + return s; + } + } + /** + * + * + *
+   * The full name of the Google Compute Engine
+   * [network](https://cloud.google.com//compute/docs/networks-and-firewalls#networks)
+   * 
+ * + * string network = 2 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for network. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNetworkBytes() { + java.lang.Object ref = network_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + network_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SUBNETWORK_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object subnetwork_ = ""; + /** + * + * + *
+   * The name of the subnet that this instance is in.
+   * Format:
+   * `projects/{project_id_or_number}/regions/{region}/subnetworks/{subnetwork_id}`
+   * 
+ * + * string subnetwork = 3 [(.google.api.resource_reference) = { ... } + * + * @return The subnetwork. + */ + @java.lang.Override + public java.lang.String getSubnetwork() { + java.lang.Object ref = subnetwork_; + 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(); + subnetwork_ = s; + return s; + } + } + /** + * + * + *
+   * The name of the subnet that this instance is in.
+   * Format:
+   * `projects/{project_id_or_number}/regions/{region}/subnetworks/{subnetwork_id}`
+   * 
+ * + * string subnetwork = 3 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for subnetwork. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSubnetworkBytes() { + java.lang.Object ref = subnetwork_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + subnetwork_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (enableInternetAccess_ != false) { + output.writeBool(1, enableInternetAccess_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(network_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, network_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subnetwork_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, subnetwork_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (enableInternetAccess_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, enableInternetAccess_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(network_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, network_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subnetwork_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, subnetwork_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.NetworkSpec)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.NetworkSpec other = + (com.google.cloud.aiplatform.v1.NetworkSpec) obj; + + if (getEnableInternetAccess() != other.getEnableInternetAccess()) return false; + if (!getNetwork().equals(other.getNetwork())) return false; + if (!getSubnetwork().equals(other.getSubnetwork())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENABLE_INTERNET_ACCESS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableInternetAccess()); + hash = (37 * hash) + NETWORK_FIELD_NUMBER; + hash = (53 * hash) + getNetwork().hashCode(); + hash = (37 * hash) + SUBNETWORK_FIELD_NUMBER; + hash = (53 * hash) + getSubnetwork().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.NetworkSpec parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.NetworkSpec parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.NetworkSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.NetworkSpec parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.NetworkSpec parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.NetworkSpec parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.NetworkSpec parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.NetworkSpec parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.NetworkSpec parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.NetworkSpec parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.NetworkSpec parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.NetworkSpec parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.aiplatform.v1.NetworkSpec prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Network spec.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.NetworkSpec} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.NetworkSpec) + com.google.cloud.aiplatform.v1.NetworkSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.NetworkSpecProto + .internal_static_google_cloud_aiplatform_v1_NetworkSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.NetworkSpecProto + .internal_static_google_cloud_aiplatform_v1_NetworkSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.NetworkSpec.class, + com.google.cloud.aiplatform.v1.NetworkSpec.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.NetworkSpec.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + enableInternetAccess_ = false; + network_ = ""; + subnetwork_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.NetworkSpecProto + .internal_static_google_cloud_aiplatform_v1_NetworkSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.NetworkSpec getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.NetworkSpec.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.NetworkSpec build() { + com.google.cloud.aiplatform.v1.NetworkSpec result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.NetworkSpec buildPartial() { + com.google.cloud.aiplatform.v1.NetworkSpec result = + new com.google.cloud.aiplatform.v1.NetworkSpec(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.NetworkSpec result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.enableInternetAccess_ = enableInternetAccess_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.network_ = network_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.subnetwork_ = subnetwork_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.NetworkSpec) { + return mergeFrom((com.google.cloud.aiplatform.v1.NetworkSpec) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.NetworkSpec other) { + if (other == com.google.cloud.aiplatform.v1.NetworkSpec.getDefaultInstance()) return this; + if (other.getEnableInternetAccess() != false) { + setEnableInternetAccess(other.getEnableInternetAccess()); + } + if (!other.getNetwork().isEmpty()) { + network_ = other.network_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getSubnetwork().isEmpty()) { + subnetwork_ = other.subnetwork_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + enableInternetAccess_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + network_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + subnetwork_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private boolean enableInternetAccess_; + /** + * + * + *
+     * Whether to enable public internet access. Default false.
+     * 
+ * + * bool enable_internet_access = 1; + * + * @return The enableInternetAccess. + */ + @java.lang.Override + public boolean getEnableInternetAccess() { + return enableInternetAccess_; + } + /** + * + * + *
+     * Whether to enable public internet access. Default false.
+     * 
+ * + * bool enable_internet_access = 1; + * + * @param value The enableInternetAccess to set. + * @return This builder for chaining. + */ + public Builder setEnableInternetAccess(boolean value) { + + enableInternetAccess_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Whether to enable public internet access. Default false.
+     * 
+ * + * bool enable_internet_access = 1; + * + * @return This builder for chaining. + */ + public Builder clearEnableInternetAccess() { + bitField0_ = (bitField0_ & ~0x00000001); + enableInternetAccess_ = false; + onChanged(); + return this; + } + + private java.lang.Object network_ = ""; + /** + * + * + *
+     * The full name of the Google Compute Engine
+     * [network](https://cloud.google.com//compute/docs/networks-and-firewalls#networks)
+     * 
+ * + * string network = 2 [(.google.api.resource_reference) = { ... } + * + * @return The network. + */ + public java.lang.String getNetwork() { + java.lang.Object ref = network_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + network_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The full name of the Google Compute Engine
+     * [network](https://cloud.google.com//compute/docs/networks-and-firewalls#networks)
+     * 
+ * + * string network = 2 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for network. + */ + public com.google.protobuf.ByteString getNetworkBytes() { + java.lang.Object ref = network_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + network_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The full name of the Google Compute Engine
+     * [network](https://cloud.google.com//compute/docs/networks-and-firewalls#networks)
+     * 
+ * + * string network = 2 [(.google.api.resource_reference) = { ... } + * + * @param value The network to set. + * @return This builder for chaining. + */ + public Builder setNetwork(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + network_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The full name of the Google Compute Engine
+     * [network](https://cloud.google.com//compute/docs/networks-and-firewalls#networks)
+     * 
+ * + * string network = 2 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearNetwork() { + network_ = getDefaultInstance().getNetwork(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The full name of the Google Compute Engine
+     * [network](https://cloud.google.com//compute/docs/networks-and-firewalls#networks)
+     * 
+ * + * string network = 2 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for network to set. + * @return This builder for chaining. + */ + public Builder setNetworkBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + network_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object subnetwork_ = ""; + /** + * + * + *
+     * The name of the subnet that this instance is in.
+     * Format:
+     * `projects/{project_id_or_number}/regions/{region}/subnetworks/{subnetwork_id}`
+     * 
+ * + * string subnetwork = 3 [(.google.api.resource_reference) = { ... } + * + * @return The subnetwork. + */ + public java.lang.String getSubnetwork() { + java.lang.Object ref = subnetwork_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + subnetwork_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of the subnet that this instance is in.
+     * Format:
+     * `projects/{project_id_or_number}/regions/{region}/subnetworks/{subnetwork_id}`
+     * 
+ * + * string subnetwork = 3 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for subnetwork. + */ + public com.google.protobuf.ByteString getSubnetworkBytes() { + java.lang.Object ref = subnetwork_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + subnetwork_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of the subnet that this instance is in.
+     * Format:
+     * `projects/{project_id_or_number}/regions/{region}/subnetworks/{subnetwork_id}`
+     * 
+ * + * string subnetwork = 3 [(.google.api.resource_reference) = { ... } + * + * @param value The subnetwork to set. + * @return This builder for chaining. + */ + public Builder setSubnetwork(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + subnetwork_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the subnet that this instance is in.
+     * Format:
+     * `projects/{project_id_or_number}/regions/{region}/subnetworks/{subnetwork_id}`
+     * 
+ * + * string subnetwork = 3 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearSubnetwork() { + subnetwork_ = getDefaultInstance().getSubnetwork(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the subnet that this instance is in.
+     * Format:
+     * `projects/{project_id_or_number}/regions/{region}/subnetworks/{subnetwork_id}`
+     * 
+ * + * string subnetwork = 3 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for subnetwork to set. + * @return This builder for chaining. + */ + public Builder setSubnetworkBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + subnetwork_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.NetworkSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.NetworkSpec) + private static final com.google.cloud.aiplatform.v1.NetworkSpec DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.NetworkSpec(); + } + + public static com.google.cloud.aiplatform.v1.NetworkSpec getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NetworkSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.NetworkSpec getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NetworkSpecOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NetworkSpecOrBuilder.java new file mode 100644 index 000000000000..02800a52f4fa --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NetworkSpecOrBuilder.java @@ -0,0 +1,95 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/network_spec.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +public interface NetworkSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.NetworkSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Whether to enable public internet access. Default false.
+   * 
+ * + * bool enable_internet_access = 1; + * + * @return The enableInternetAccess. + */ + boolean getEnableInternetAccess(); + + /** + * + * + *
+   * The full name of the Google Compute Engine
+   * [network](https://cloud.google.com//compute/docs/networks-and-firewalls#networks)
+   * 
+ * + * string network = 2 [(.google.api.resource_reference) = { ... } + * + * @return The network. + */ + java.lang.String getNetwork(); + /** + * + * + *
+   * The full name of the Google Compute Engine
+   * [network](https://cloud.google.com//compute/docs/networks-and-firewalls#networks)
+   * 
+ * + * string network = 2 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for network. + */ + com.google.protobuf.ByteString getNetworkBytes(); + + /** + * + * + *
+   * The name of the subnet that this instance is in.
+   * Format:
+   * `projects/{project_id_or_number}/regions/{region}/subnetworks/{subnetwork_id}`
+   * 
+ * + * string subnetwork = 3 [(.google.api.resource_reference) = { ... } + * + * @return The subnetwork. + */ + java.lang.String getSubnetwork(); + /** + * + * + *
+   * The name of the subnet that this instance is in.
+   * Format:
+   * `projects/{project_id_or_number}/regions/{region}/subnetworks/{subnetwork_id}`
+   * 
+ * + * string subnetwork = 3 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for subnetwork. + */ + com.google.protobuf.ByteString getSubnetworkBytes(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NetworkSpecProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NetworkSpecProto.java new file mode 100644 index 000000000000..164d3ef0473e --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NetworkSpecProto.java @@ -0,0 +1,84 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/network_spec.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +public final class NetworkSpecProto { + private NetworkSpecProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_NetworkSpec_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_NetworkSpec_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n-google/cloud/aiplatform/v1/network_spe" + + "c.proto\022\032google.cloud.aiplatform.v1\032\031goo" + + "gle/api/resource.proto\"\237\001\n\013NetworkSpec\022\036" + + "\n\026enable_internet_access\030\001 \001(\010\0224\n\007networ" + + "k\030\002 \001(\tB#\372A \n\036compute.googleapis.com/Net" + + "work\022:\n\nsubnetwork\030\003 \001(\tB&\372A#\n!compute.g" + + "oogleapis.com/SubnetworkB\262\002\n\036com.google." + + "cloud.aiplatform.v1B\020NetworkSpecProtoP\001Z" + + ">cloud.google.com/go/aiplatform/apiv1/ai" + + "platformpb;aiplatformpb\252\002\032Google.Cloud.A" + + "IPlatform.V1\312\002\032Google\\Cloud\\AIPlatform\\V" + + "1\352\002\035Google::Cloud::AIPlatform::V1\352Aa\n!co" + + "mpute.googleapis.com/Subnetwork\022 + * The euc configuration of NotebookRuntimeTemplate. + * + * + * Protobuf type {@code google.cloud.aiplatform.v1.NotebookEucConfig} + */ +public final class NotebookEucConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.NotebookEucConfig) + NotebookEucConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use NotebookEucConfig.newBuilder() to construct. + private NotebookEucConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private NotebookEucConfig() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new NotebookEucConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.NotebookEucConfigProto + .internal_static_google_cloud_aiplatform_v1_NotebookEucConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.NotebookEucConfigProto + .internal_static_google_cloud_aiplatform_v1_NotebookEucConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.NotebookEucConfig.class, + com.google.cloud.aiplatform.v1.NotebookEucConfig.Builder.class); + } + + public static final int EUC_DISABLED_FIELD_NUMBER = 1; + private boolean eucDisabled_ = false; + /** + * + * + *
+   * Input only. Whether EUC is disabled in this NotebookRuntimeTemplate.
+   * In proto3, the default value of a boolean is false. In this way, by default
+   * EUC will be enabled for NotebookRuntimeTemplate.
+   * 
+ * + * bool euc_disabled = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The eucDisabled. + */ + @java.lang.Override + public boolean getEucDisabled() { + return eucDisabled_; + } + + public static final int BYPASS_ACTAS_CHECK_FIELD_NUMBER = 2; + private boolean bypassActasCheck_ = false; + /** + * + * + *
+   * Output only. Whether ActAs check is bypassed for service account attached
+   * to the VM. If false, we need ActAs check for the default Compute Engine
+   * Service account. When a Runtime is created, a VM is allocated using Default
+   * Compute Engine Service Account. Any user requesting to use this Runtime
+   * requires Service Account User (ActAs) permission over this SA. If true,
+   * Runtime owner is using EUC and does not require the above permission as VM
+   * no longer use default Compute Engine SA, but a P4SA.
+   * 
+ * + * bool bypass_actas_check = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bypassActasCheck. + */ + @java.lang.Override + public boolean getBypassActasCheck() { + return bypassActasCheck_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (eucDisabled_ != false) { + output.writeBool(1, eucDisabled_); + } + if (bypassActasCheck_ != false) { + output.writeBool(2, bypassActasCheck_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (eucDisabled_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, eucDisabled_); + } + if (bypassActasCheck_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, bypassActasCheck_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.NotebookEucConfig)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.NotebookEucConfig other = + (com.google.cloud.aiplatform.v1.NotebookEucConfig) obj; + + if (getEucDisabled() != other.getEucDisabled()) return false; + if (getBypassActasCheck() != other.getBypassActasCheck()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + EUC_DISABLED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEucDisabled()); + hash = (37 * hash) + BYPASS_ACTAS_CHECK_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getBypassActasCheck()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.NotebookEucConfig parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.NotebookEucConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.NotebookEucConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.NotebookEucConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.NotebookEucConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.NotebookEucConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.NotebookEucConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.NotebookEucConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.NotebookEucConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.NotebookEucConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.NotebookEucConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.NotebookEucConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.aiplatform.v1.NotebookEucConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The euc configuration of NotebookRuntimeTemplate.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.NotebookEucConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.NotebookEucConfig) + com.google.cloud.aiplatform.v1.NotebookEucConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.NotebookEucConfigProto + .internal_static_google_cloud_aiplatform_v1_NotebookEucConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.NotebookEucConfigProto + .internal_static_google_cloud_aiplatform_v1_NotebookEucConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.NotebookEucConfig.class, + com.google.cloud.aiplatform.v1.NotebookEucConfig.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.NotebookEucConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + eucDisabled_ = false; + bypassActasCheck_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.NotebookEucConfigProto + .internal_static_google_cloud_aiplatform_v1_NotebookEucConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.NotebookEucConfig getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.NotebookEucConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.NotebookEucConfig build() { + com.google.cloud.aiplatform.v1.NotebookEucConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.NotebookEucConfig buildPartial() { + com.google.cloud.aiplatform.v1.NotebookEucConfig result = + new com.google.cloud.aiplatform.v1.NotebookEucConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.NotebookEucConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.eucDisabled_ = eucDisabled_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.bypassActasCheck_ = bypassActasCheck_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.NotebookEucConfig) { + return mergeFrom((com.google.cloud.aiplatform.v1.NotebookEucConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.NotebookEucConfig other) { + if (other == com.google.cloud.aiplatform.v1.NotebookEucConfig.getDefaultInstance()) + return this; + if (other.getEucDisabled() != false) { + setEucDisabled(other.getEucDisabled()); + } + if (other.getBypassActasCheck() != false) { + setBypassActasCheck(other.getBypassActasCheck()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + eucDisabled_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + bypassActasCheck_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private boolean eucDisabled_; + /** + * + * + *
+     * Input only. Whether EUC is disabled in this NotebookRuntimeTemplate.
+     * In proto3, the default value of a boolean is false. In this way, by default
+     * EUC will be enabled for NotebookRuntimeTemplate.
+     * 
+ * + * bool euc_disabled = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The eucDisabled. + */ + @java.lang.Override + public boolean getEucDisabled() { + return eucDisabled_; + } + /** + * + * + *
+     * Input only. Whether EUC is disabled in this NotebookRuntimeTemplate.
+     * In proto3, the default value of a boolean is false. In this way, by default
+     * EUC will be enabled for NotebookRuntimeTemplate.
+     * 
+ * + * bool euc_disabled = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @param value The eucDisabled to set. + * @return This builder for chaining. + */ + public Builder setEucDisabled(boolean value) { + + eucDisabled_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Input only. Whether EUC is disabled in this NotebookRuntimeTemplate.
+     * In proto3, the default value of a boolean is false. In this way, by default
+     * EUC will be enabled for NotebookRuntimeTemplate.
+     * 
+ * + * bool euc_disabled = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearEucDisabled() { + bitField0_ = (bitField0_ & ~0x00000001); + eucDisabled_ = false; + onChanged(); + return this; + } + + private boolean bypassActasCheck_; + /** + * + * + *
+     * Output only. Whether ActAs check is bypassed for service account attached
+     * to the VM. If false, we need ActAs check for the default Compute Engine
+     * Service account. When a Runtime is created, a VM is allocated using Default
+     * Compute Engine Service Account. Any user requesting to use this Runtime
+     * requires Service Account User (ActAs) permission over this SA. If true,
+     * Runtime owner is using EUC and does not require the above permission as VM
+     * no longer use default Compute Engine SA, but a P4SA.
+     * 
+ * + * bool bypass_actas_check = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bypassActasCheck. + */ + @java.lang.Override + public boolean getBypassActasCheck() { + return bypassActasCheck_; + } + /** + * + * + *
+     * Output only. Whether ActAs check is bypassed for service account attached
+     * to the VM. If false, we need ActAs check for the default Compute Engine
+     * Service account. When a Runtime is created, a VM is allocated using Default
+     * Compute Engine Service Account. Any user requesting to use this Runtime
+     * requires Service Account User (ActAs) permission over this SA. If true,
+     * Runtime owner is using EUC and does not require the above permission as VM
+     * no longer use default Compute Engine SA, but a P4SA.
+     * 
+ * + * bool bypass_actas_check = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bypassActasCheck to set. + * @return This builder for chaining. + */ + public Builder setBypassActasCheck(boolean value) { + + bypassActasCheck_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Whether ActAs check is bypassed for service account attached
+     * to the VM. If false, we need ActAs check for the default Compute Engine
+     * Service account. When a Runtime is created, a VM is allocated using Default
+     * Compute Engine Service Account. Any user requesting to use this Runtime
+     * requires Service Account User (ActAs) permission over this SA. If true,
+     * Runtime owner is using EUC and does not require the above permission as VM
+     * no longer use default Compute Engine SA, but a P4SA.
+     * 
+ * + * bool bypass_actas_check = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearBypassActasCheck() { + bitField0_ = (bitField0_ & ~0x00000002); + bypassActasCheck_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.NotebookEucConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.NotebookEucConfig) + private static final com.google.cloud.aiplatform.v1.NotebookEucConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.NotebookEucConfig(); + } + + public static com.google.cloud.aiplatform.v1.NotebookEucConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NotebookEucConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.NotebookEucConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NotebookEucConfigOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NotebookEucConfigOrBuilder.java new file mode 100644 index 000000000000..715d2aad4a23 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NotebookEucConfigOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/notebook_euc_config.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +public interface NotebookEucConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.NotebookEucConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Input only. Whether EUC is disabled in this NotebookRuntimeTemplate.
+   * In proto3, the default value of a boolean is false. In this way, by default
+   * EUC will be enabled for NotebookRuntimeTemplate.
+   * 
+ * + * bool euc_disabled = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The eucDisabled. + */ + boolean getEucDisabled(); + + /** + * + * + *
+   * Output only. Whether ActAs check is bypassed for service account attached
+   * to the VM. If false, we need ActAs check for the default Compute Engine
+   * Service account. When a Runtime is created, a VM is allocated using Default
+   * Compute Engine Service Account. Any user requesting to use this Runtime
+   * requires Service Account User (ActAs) permission over this SA. If true,
+   * Runtime owner is using EUC and does not require the above permission as VM
+   * no longer use default Compute Engine SA, but a P4SA.
+   * 
+ * + * bool bypass_actas_check = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bypassActasCheck. + */ + boolean getBypassActasCheck(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NotebookEucConfigProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NotebookEucConfigProto.java new file mode 100644 index 000000000000..26c99839dd08 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NotebookEucConfigProto.java @@ -0,0 +1,79 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/notebook_euc_config.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +public final class NotebookEucConfigProto { + private NotebookEucConfigProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_NotebookEucConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_NotebookEucConfig_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n4google/cloud/aiplatform/v1/notebook_eu" + + "c_config.proto\022\032google.cloud.aiplatform." + + "v1\032\037google/api/field_behavior.proto\"O\n\021N" + + "otebookEucConfig\022\031\n\014euc_disabled\030\001 \001(\010B\003" + + "\340A\004\022\037\n\022bypass_actas_check\030\002 \001(\010B\003\340A\003B\324\001\n" + + "\036com.google.cloud.aiplatform.v1B\026Noteboo" + + "kEucConfigProtoP\001Z>cloud.google.com/go/a" + + "iplatform/apiv1/aiplatformpb;aiplatformp" + + "b\252\002\032Google.Cloud.AIPlatform.V1\312\002\032Google\\" + + "Cloud\\AIPlatform\\V1\352\002\035Google::Cloud::AIP" + + "latform::V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1_NotebookEucConfig_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1_NotebookEucConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_NotebookEucConfig_descriptor, + new java.lang.String[] { + "EucDisabled", "BypassActasCheck", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NotebookIdleShutdownConfig.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NotebookIdleShutdownConfig.java new file mode 100644 index 000000000000..b28bb30d8ec8 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NotebookIdleShutdownConfig.java @@ -0,0 +1,850 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/notebook_idle_shutdown_config.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * The idle shutdown configuration of NotebookRuntimeTemplate, which contains
+ * the idle_timeout as required field.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.NotebookIdleShutdownConfig} + */ +public final class NotebookIdleShutdownConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.NotebookIdleShutdownConfig) + NotebookIdleShutdownConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use NotebookIdleShutdownConfig.newBuilder() to construct. + private NotebookIdleShutdownConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private NotebookIdleShutdownConfig() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new NotebookIdleShutdownConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.NotebookIdleShutdownConfigProto + .internal_static_google_cloud_aiplatform_v1_NotebookIdleShutdownConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.NotebookIdleShutdownConfigProto + .internal_static_google_cloud_aiplatform_v1_NotebookIdleShutdownConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.NotebookIdleShutdownConfig.class, + com.google.cloud.aiplatform.v1.NotebookIdleShutdownConfig.Builder.class); + } + + private int bitField0_; + public static final int IDLE_TIMEOUT_FIELD_NUMBER = 1; + private com.google.protobuf.Duration idleTimeout_; + /** + * + * + *
+   * Required. Duration is accurate to the second. In Notebook, Idle Timeout is
+   * accurate to minute so the range of idle_timeout (second) is: 10 * 60 ~ 1440
+   * * 60.
+   * 
+ * + * .google.protobuf.Duration idle_timeout = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the idleTimeout field is set. + */ + @java.lang.Override + public boolean hasIdleTimeout() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. Duration is accurate to the second. In Notebook, Idle Timeout is
+   * accurate to minute so the range of idle_timeout (second) is: 10 * 60 ~ 1440
+   * * 60.
+   * 
+ * + * .google.protobuf.Duration idle_timeout = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The idleTimeout. + */ + @java.lang.Override + public com.google.protobuf.Duration getIdleTimeout() { + return idleTimeout_ == null ? com.google.protobuf.Duration.getDefaultInstance() : idleTimeout_; + } + /** + * + * + *
+   * Required. Duration is accurate to the second. In Notebook, Idle Timeout is
+   * accurate to minute so the range of idle_timeout (second) is: 10 * 60 ~ 1440
+   * * 60.
+   * 
+ * + * .google.protobuf.Duration idle_timeout = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getIdleTimeoutOrBuilder() { + return idleTimeout_ == null ? com.google.protobuf.Duration.getDefaultInstance() : idleTimeout_; + } + + public static final int IDLE_SHUTDOWN_DISABLED_FIELD_NUMBER = 2; + private boolean idleShutdownDisabled_ = false; + /** + * + * + *
+   * Whether Idle Shutdown is disabled in this NotebookRuntimeTemplate.
+   * 
+ * + * bool idle_shutdown_disabled = 2; + * + * @return The idleShutdownDisabled. + */ + @java.lang.Override + public boolean getIdleShutdownDisabled() { + return idleShutdownDisabled_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getIdleTimeout()); + } + if (idleShutdownDisabled_ != false) { + output.writeBool(2, idleShutdownDisabled_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getIdleTimeout()); + } + if (idleShutdownDisabled_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, idleShutdownDisabled_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.NotebookIdleShutdownConfig)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.NotebookIdleShutdownConfig other = + (com.google.cloud.aiplatform.v1.NotebookIdleShutdownConfig) obj; + + if (hasIdleTimeout() != other.hasIdleTimeout()) return false; + if (hasIdleTimeout()) { + if (!getIdleTimeout().equals(other.getIdleTimeout())) return false; + } + if (getIdleShutdownDisabled() != other.getIdleShutdownDisabled()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasIdleTimeout()) { + hash = (37 * hash) + IDLE_TIMEOUT_FIELD_NUMBER; + hash = (53 * hash) + getIdleTimeout().hashCode(); + } + hash = (37 * hash) + IDLE_SHUTDOWN_DISABLED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIdleShutdownDisabled()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.NotebookIdleShutdownConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.NotebookIdleShutdownConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.NotebookIdleShutdownConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.NotebookIdleShutdownConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.NotebookIdleShutdownConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.NotebookIdleShutdownConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.NotebookIdleShutdownConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.NotebookIdleShutdownConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.NotebookIdleShutdownConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.NotebookIdleShutdownConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.NotebookIdleShutdownConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.NotebookIdleShutdownConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.NotebookIdleShutdownConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The idle shutdown configuration of NotebookRuntimeTemplate, which contains
+   * the idle_timeout as required field.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.NotebookIdleShutdownConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.NotebookIdleShutdownConfig) + com.google.cloud.aiplatform.v1.NotebookIdleShutdownConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.NotebookIdleShutdownConfigProto + .internal_static_google_cloud_aiplatform_v1_NotebookIdleShutdownConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.NotebookIdleShutdownConfigProto + .internal_static_google_cloud_aiplatform_v1_NotebookIdleShutdownConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.NotebookIdleShutdownConfig.class, + com.google.cloud.aiplatform.v1.NotebookIdleShutdownConfig.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.NotebookIdleShutdownConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getIdleTimeoutFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + idleTimeout_ = null; + if (idleTimeoutBuilder_ != null) { + idleTimeoutBuilder_.dispose(); + idleTimeoutBuilder_ = null; + } + idleShutdownDisabled_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.NotebookIdleShutdownConfigProto + .internal_static_google_cloud_aiplatform_v1_NotebookIdleShutdownConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.NotebookIdleShutdownConfig getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.NotebookIdleShutdownConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.NotebookIdleShutdownConfig build() { + com.google.cloud.aiplatform.v1.NotebookIdleShutdownConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.NotebookIdleShutdownConfig buildPartial() { + com.google.cloud.aiplatform.v1.NotebookIdleShutdownConfig result = + new com.google.cloud.aiplatform.v1.NotebookIdleShutdownConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.NotebookIdleShutdownConfig result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.idleTimeout_ = + idleTimeoutBuilder_ == null ? idleTimeout_ : idleTimeoutBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.idleShutdownDisabled_ = idleShutdownDisabled_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.NotebookIdleShutdownConfig) { + return mergeFrom((com.google.cloud.aiplatform.v1.NotebookIdleShutdownConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.NotebookIdleShutdownConfig other) { + if (other == com.google.cloud.aiplatform.v1.NotebookIdleShutdownConfig.getDefaultInstance()) + return this; + if (other.hasIdleTimeout()) { + mergeIdleTimeout(other.getIdleTimeout()); + } + if (other.getIdleShutdownDisabled() != false) { + setIdleShutdownDisabled(other.getIdleShutdownDisabled()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getIdleTimeoutFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + idleShutdownDisabled_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.Duration idleTimeout_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + idleTimeoutBuilder_; + /** + * + * + *
+     * Required. Duration is accurate to the second. In Notebook, Idle Timeout is
+     * accurate to minute so the range of idle_timeout (second) is: 10 * 60 ~ 1440
+     * * 60.
+     * 
+ * + * .google.protobuf.Duration idle_timeout = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the idleTimeout field is set. + */ + public boolean hasIdleTimeout() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Required. Duration is accurate to the second. In Notebook, Idle Timeout is
+     * accurate to minute so the range of idle_timeout (second) is: 10 * 60 ~ 1440
+     * * 60.
+     * 
+ * + * .google.protobuf.Duration idle_timeout = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The idleTimeout. + */ + public com.google.protobuf.Duration getIdleTimeout() { + if (idleTimeoutBuilder_ == null) { + return idleTimeout_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : idleTimeout_; + } else { + return idleTimeoutBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Duration is accurate to the second. In Notebook, Idle Timeout is
+     * accurate to minute so the range of idle_timeout (second) is: 10 * 60 ~ 1440
+     * * 60.
+     * 
+ * + * .google.protobuf.Duration idle_timeout = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setIdleTimeout(com.google.protobuf.Duration value) { + if (idleTimeoutBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + idleTimeout_ = value; + } else { + idleTimeoutBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Duration is accurate to the second. In Notebook, Idle Timeout is
+     * accurate to minute so the range of idle_timeout (second) is: 10 * 60 ~ 1440
+     * * 60.
+     * 
+ * + * .google.protobuf.Duration idle_timeout = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setIdleTimeout(com.google.protobuf.Duration.Builder builderForValue) { + if (idleTimeoutBuilder_ == null) { + idleTimeout_ = builderForValue.build(); + } else { + idleTimeoutBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Duration is accurate to the second. In Notebook, Idle Timeout is
+     * accurate to minute so the range of idle_timeout (second) is: 10 * 60 ~ 1440
+     * * 60.
+     * 
+ * + * .google.protobuf.Duration idle_timeout = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeIdleTimeout(com.google.protobuf.Duration value) { + if (idleTimeoutBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && idleTimeout_ != null + && idleTimeout_ != com.google.protobuf.Duration.getDefaultInstance()) { + getIdleTimeoutBuilder().mergeFrom(value); + } else { + idleTimeout_ = value; + } + } else { + idleTimeoutBuilder_.mergeFrom(value); + } + if (idleTimeout_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. Duration is accurate to the second. In Notebook, Idle Timeout is
+     * accurate to minute so the range of idle_timeout (second) is: 10 * 60 ~ 1440
+     * * 60.
+     * 
+ * + * .google.protobuf.Duration idle_timeout = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearIdleTimeout() { + bitField0_ = (bitField0_ & ~0x00000001); + idleTimeout_ = null; + if (idleTimeoutBuilder_ != null) { + idleTimeoutBuilder_.dispose(); + idleTimeoutBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Duration is accurate to the second. In Notebook, Idle Timeout is
+     * accurate to minute so the range of idle_timeout (second) is: 10 * 60 ~ 1440
+     * * 60.
+     * 
+ * + * .google.protobuf.Duration idle_timeout = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.Duration.Builder getIdleTimeoutBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getIdleTimeoutFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Duration is accurate to the second. In Notebook, Idle Timeout is
+     * accurate to minute so the range of idle_timeout (second) is: 10 * 60 ~ 1440
+     * * 60.
+     * 
+ * + * .google.protobuf.Duration idle_timeout = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.DurationOrBuilder getIdleTimeoutOrBuilder() { + if (idleTimeoutBuilder_ != null) { + return idleTimeoutBuilder_.getMessageOrBuilder(); + } else { + return idleTimeout_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : idleTimeout_; + } + } + /** + * + * + *
+     * Required. Duration is accurate to the second. In Notebook, Idle Timeout is
+     * accurate to minute so the range of idle_timeout (second) is: 10 * 60 ~ 1440
+     * * 60.
+     * 
+ * + * .google.protobuf.Duration idle_timeout = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getIdleTimeoutFieldBuilder() { + if (idleTimeoutBuilder_ == null) { + idleTimeoutBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getIdleTimeout(), getParentForChildren(), isClean()); + idleTimeout_ = null; + } + return idleTimeoutBuilder_; + } + + private boolean idleShutdownDisabled_; + /** + * + * + *
+     * Whether Idle Shutdown is disabled in this NotebookRuntimeTemplate.
+     * 
+ * + * bool idle_shutdown_disabled = 2; + * + * @return The idleShutdownDisabled. + */ + @java.lang.Override + public boolean getIdleShutdownDisabled() { + return idleShutdownDisabled_; + } + /** + * + * + *
+     * Whether Idle Shutdown is disabled in this NotebookRuntimeTemplate.
+     * 
+ * + * bool idle_shutdown_disabled = 2; + * + * @param value The idleShutdownDisabled to set. + * @return This builder for chaining. + */ + public Builder setIdleShutdownDisabled(boolean value) { + + idleShutdownDisabled_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Whether Idle Shutdown is disabled in this NotebookRuntimeTemplate.
+     * 
+ * + * bool idle_shutdown_disabled = 2; + * + * @return This builder for chaining. + */ + public Builder clearIdleShutdownDisabled() { + bitField0_ = (bitField0_ & ~0x00000002); + idleShutdownDisabled_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.NotebookIdleShutdownConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.NotebookIdleShutdownConfig) + private static final com.google.cloud.aiplatform.v1.NotebookIdleShutdownConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.NotebookIdleShutdownConfig(); + } + + public static com.google.cloud.aiplatform.v1.NotebookIdleShutdownConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NotebookIdleShutdownConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.NotebookIdleShutdownConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NotebookIdleShutdownConfigOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NotebookIdleShutdownConfigOrBuilder.java new file mode 100644 index 000000000000..bfba4698fbf3 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NotebookIdleShutdownConfigOrBuilder.java @@ -0,0 +1,83 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/notebook_idle_shutdown_config.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +public interface NotebookIdleShutdownConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.NotebookIdleShutdownConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Duration is accurate to the second. In Notebook, Idle Timeout is
+   * accurate to minute so the range of idle_timeout (second) is: 10 * 60 ~ 1440
+   * * 60.
+   * 
+ * + * .google.protobuf.Duration idle_timeout = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the idleTimeout field is set. + */ + boolean hasIdleTimeout(); + /** + * + * + *
+   * Required. Duration is accurate to the second. In Notebook, Idle Timeout is
+   * accurate to minute so the range of idle_timeout (second) is: 10 * 60 ~ 1440
+   * * 60.
+   * 
+ * + * .google.protobuf.Duration idle_timeout = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The idleTimeout. + */ + com.google.protobuf.Duration getIdleTimeout(); + /** + * + * + *
+   * Required. Duration is accurate to the second. In Notebook, Idle Timeout is
+   * accurate to minute so the range of idle_timeout (second) is: 10 * 60 ~ 1440
+   * * 60.
+   * 
+ * + * .google.protobuf.Duration idle_timeout = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.DurationOrBuilder getIdleTimeoutOrBuilder(); + + /** + * + * + *
+   * Whether Idle Shutdown is disabled in this NotebookRuntimeTemplate.
+   * 
+ * + * bool idle_shutdown_disabled = 2; + * + * @return The idleShutdownDisabled. + */ + boolean getIdleShutdownDisabled(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NotebookIdleShutdownConfigProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NotebookIdleShutdownConfigProto.java new file mode 100644 index 000000000000..f1e55b4d2401 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NotebookIdleShutdownConfigProto.java @@ -0,0 +1,83 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/notebook_idle_shutdown_config.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +public final class NotebookIdleShutdownConfigProto { + private NotebookIdleShutdownConfigProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_NotebookIdleShutdownConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_NotebookIdleShutdownConfig_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n>google/cloud/aiplatform/v1/notebook_id" + + "le_shutdown_config.proto\022\032google.cloud.a" + + "iplatform.v1\032\037google/api/field_behavior." + + "proto\032\036google/protobuf/duration.proto\"r\n" + + "\032NotebookIdleShutdownConfig\0224\n\014idle_time" + + "out\030\001 \001(\0132\031.google.protobuf.DurationB\003\340A" + + "\002\022\036\n\026idle_shutdown_disabled\030\002 \001(\010B\335\001\n\036co" + + "m.google.cloud.aiplatform.v1B\037NotebookId" + + "leShutdownConfigProtoP\001Z>cloud.google.co" + + "m/go/aiplatform/apiv1/aiplatformpb;aipla" + + "tformpb\252\002\032Google.Cloud.AIPlatform.V1\312\002\032G" + + "oogle\\Cloud\\AIPlatform\\V1\352\002\035Google::Clou" + + "d::AIPlatform::V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.protobuf.DurationProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1_NotebookIdleShutdownConfig_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1_NotebookIdleShutdownConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_NotebookIdleShutdownConfig_descriptor, + new java.lang.String[] { + "IdleTimeout", "IdleShutdownDisabled", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.protobuf.DurationProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NotebookRuntime.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NotebookRuntime.java new file mode 100644 index 000000000000..975df33fc503 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NotebookRuntime.java @@ -0,0 +1,4820 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/notebook_runtime.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * A runtime is a virtual machine allocated to a particular user for a
+ * particular Notebook file on temporary basis with lifetime limited to 24
+ * hours.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.NotebookRuntime} + */ +public final class NotebookRuntime extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.NotebookRuntime) + NotebookRuntimeOrBuilder { + private static final long serialVersionUID = 0L; + // Use NotebookRuntime.newBuilder() to construct. + private NotebookRuntime(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private NotebookRuntime() { + name_ = ""; + runtimeUser_ = ""; + proxyUri_ = ""; + healthState_ = 0; + displayName_ = ""; + description_ = ""; + serviceAccount_ = ""; + runtimeState_ = 0; + version_ = ""; + notebookRuntimeType_ = 0; + networkTags_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new NotebookRuntime(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.NotebookRuntimeProto + .internal_static_google_cloud_aiplatform_v1_NotebookRuntime_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 16: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.NotebookRuntimeProto + .internal_static_google_cloud_aiplatform_v1_NotebookRuntime_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.NotebookRuntime.class, + com.google.cloud.aiplatform.v1.NotebookRuntime.Builder.class); + } + + /** + * + * + *
+   * The substate of the NotebookRuntime to display health information.
+   * 
+ * + * Protobuf enum {@code google.cloud.aiplatform.v1.NotebookRuntime.HealthState} + */ + public enum HealthState implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified health state.
+     * 
+ * + * HEALTH_STATE_UNSPECIFIED = 0; + */ + HEALTH_STATE_UNSPECIFIED(0), + /** + * + * + *
+     * NotebookRuntime is in healthy state. Applies to ACTIVE state.
+     * 
+ * + * HEALTHY = 1; + */ + HEALTHY(1), + /** + * + * + *
+     * NotebookRuntime is in unhealthy state. Applies to ACTIVE state.
+     * 
+ * + * UNHEALTHY = 2; + */ + UNHEALTHY(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified health state.
+     * 
+ * + * HEALTH_STATE_UNSPECIFIED = 0; + */ + public static final int HEALTH_STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * NotebookRuntime is in healthy state. Applies to ACTIVE state.
+     * 
+ * + * HEALTHY = 1; + */ + public static final int HEALTHY_VALUE = 1; + /** + * + * + *
+     * NotebookRuntime is in unhealthy state. Applies to ACTIVE state.
+     * 
+ * + * UNHEALTHY = 2; + */ + public static final int UNHEALTHY_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static HealthState valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static HealthState forNumber(int value) { + switch (value) { + case 0: + return HEALTH_STATE_UNSPECIFIED; + case 1: + return HEALTHY; + case 2: + return UNHEALTHY; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public HealthState findValueByNumber(int number) { + return HealthState.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.NotebookRuntime.getDescriptor().getEnumTypes().get(0); + } + + private static final HealthState[] VALUES = values(); + + public static HealthState valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private HealthState(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.aiplatform.v1.NotebookRuntime.HealthState) + } + + /** + * + * + *
+   * The substate of the NotebookRuntime to display state of runtime.
+   * The resource of NotebookRuntime is in ACTIVE state for these sub state.
+   * 
+ * + * Protobuf enum {@code google.cloud.aiplatform.v1.NotebookRuntime.RuntimeState} + */ + public enum RuntimeState implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified runtime state.
+     * 
+ * + * RUNTIME_STATE_UNSPECIFIED = 0; + */ + RUNTIME_STATE_UNSPECIFIED(0), + /** + * + * + *
+     * NotebookRuntime is in running state.
+     * 
+ * + * RUNNING = 1; + */ + RUNNING(1), + /** + * + * + *
+     * NotebookRuntime is in starting state.
+     * 
+ * + * BEING_STARTED = 2; + */ + BEING_STARTED(2), + /** + * + * + *
+     * NotebookRuntime is in stopping state.
+     * 
+ * + * BEING_STOPPED = 3; + */ + BEING_STOPPED(3), + /** + * + * + *
+     * NotebookRuntime is in stopped state.
+     * 
+ * + * STOPPED = 4; + */ + STOPPED(4), + /** + * + * + *
+     * NotebookRuntime is in upgrading state. It is in the middle of upgrading
+     * process.
+     * 
+ * + * BEING_UPGRADED = 5; + */ + BEING_UPGRADED(5), + /** + * + * + *
+     * NotebookRuntime was unable to start/stop properly.
+     * 
+ * + * ERROR = 100; + */ + ERROR(100), + /** + * + * + *
+     * NotebookRuntime is in invalid state. Cannot be recovered.
+     * 
+ * + * INVALID = 101; + */ + INVALID(101), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified runtime state.
+     * 
+ * + * RUNTIME_STATE_UNSPECIFIED = 0; + */ + public static final int RUNTIME_STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * NotebookRuntime is in running state.
+     * 
+ * + * RUNNING = 1; + */ + public static final int RUNNING_VALUE = 1; + /** + * + * + *
+     * NotebookRuntime is in starting state.
+     * 
+ * + * BEING_STARTED = 2; + */ + public static final int BEING_STARTED_VALUE = 2; + /** + * + * + *
+     * NotebookRuntime is in stopping state.
+     * 
+ * + * BEING_STOPPED = 3; + */ + public static final int BEING_STOPPED_VALUE = 3; + /** + * + * + *
+     * NotebookRuntime is in stopped state.
+     * 
+ * + * STOPPED = 4; + */ + public static final int STOPPED_VALUE = 4; + /** + * + * + *
+     * NotebookRuntime is in upgrading state. It is in the middle of upgrading
+     * process.
+     * 
+ * + * BEING_UPGRADED = 5; + */ + public static final int BEING_UPGRADED_VALUE = 5; + /** + * + * + *
+     * NotebookRuntime was unable to start/stop properly.
+     * 
+ * + * ERROR = 100; + */ + public static final int ERROR_VALUE = 100; + /** + * + * + *
+     * NotebookRuntime is in invalid state. Cannot be recovered.
+     * 
+ * + * INVALID = 101; + */ + public static final int INVALID_VALUE = 101; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static RuntimeState valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static RuntimeState forNumber(int value) { + switch (value) { + case 0: + return RUNTIME_STATE_UNSPECIFIED; + case 1: + return RUNNING; + case 2: + return BEING_STARTED; + case 3: + return BEING_STOPPED; + case 4: + return STOPPED; + case 5: + return BEING_UPGRADED; + case 100: + return ERROR; + case 101: + return INVALID; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public RuntimeState findValueByNumber(int number) { + return RuntimeState.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.NotebookRuntime.getDescriptor().getEnumTypes().get(1); + } + + private static final RuntimeState[] VALUES = values(); + + public static RuntimeState valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private RuntimeState(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.aiplatform.v1.NotebookRuntime.RuntimeState) + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Output only. The resource name of the NotebookRuntime.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The resource name of the NotebookRuntime.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RUNTIME_USER_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object runtimeUser_ = ""; + /** + * + * + *
+   * Required. The user email of the NotebookRuntime.
+   * 
+ * + * string runtime_user = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The runtimeUser. + */ + @java.lang.Override + public java.lang.String getRuntimeUser() { + java.lang.Object ref = runtimeUser_; + 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(); + runtimeUser_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The user email of the NotebookRuntime.
+   * 
+ * + * string runtime_user = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for runtimeUser. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRuntimeUserBytes() { + java.lang.Object ref = runtimeUser_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + runtimeUser_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NOTEBOOK_RUNTIME_TEMPLATE_REF_FIELD_NUMBER = 3; + private com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef notebookRuntimeTemplateRef_; + /** + * + * + *
+   * Output only. The pointer to NotebookRuntimeTemplate this NotebookRuntime is
+   * created from.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef notebook_runtime_template_ref = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the notebookRuntimeTemplateRef field is set. + */ + @java.lang.Override + public boolean hasNotebookRuntimeTemplateRef() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Output only. The pointer to NotebookRuntimeTemplate this NotebookRuntime is
+   * created from.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef notebook_runtime_template_ref = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The notebookRuntimeTemplateRef. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef getNotebookRuntimeTemplateRef() { + return notebookRuntimeTemplateRef_ == null + ? com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef.getDefaultInstance() + : notebookRuntimeTemplateRef_; + } + /** + * + * + *
+   * Output only. The pointer to NotebookRuntimeTemplate this NotebookRuntime is
+   * created from.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef notebook_runtime_template_ref = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateRefOrBuilder + getNotebookRuntimeTemplateRefOrBuilder() { + return notebookRuntimeTemplateRef_ == null + ? com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef.getDefaultInstance() + : notebookRuntimeTemplateRef_; + } + + public static final int PROXY_URI_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object proxyUri_ = ""; + /** + * + * + *
+   * Output only. The proxy endpoint used to access the NotebookRuntime.
+   * 
+ * + * string proxy_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The proxyUri. + */ + @java.lang.Override + public java.lang.String getProxyUri() { + java.lang.Object ref = proxyUri_; + 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(); + proxyUri_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The proxy endpoint used to access the NotebookRuntime.
+   * 
+ * + * string proxy_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for proxyUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProxyUriBytes() { + java.lang.Object ref = proxyUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + proxyUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. Timestamp when this NotebookRuntime was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Output only. Timestamp when this NotebookRuntime was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. Timestamp when this NotebookRuntime was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. Timestamp when this NotebookRuntime was most recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+   * Output only. Timestamp when this NotebookRuntime was most recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. Timestamp when this NotebookRuntime was most recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int HEALTH_STATE_FIELD_NUMBER = 8; + private int healthState_ = 0; + /** + * + * + *
+   * Output only. The health state of the NotebookRuntime.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntime.HealthState health_state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for healthState. + */ + @java.lang.Override + public int getHealthStateValue() { + return healthState_; + } + /** + * + * + *
+   * Output only. The health state of the NotebookRuntime.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntime.HealthState health_state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The healthState. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.NotebookRuntime.HealthState getHealthState() { + com.google.cloud.aiplatform.v1.NotebookRuntime.HealthState result = + com.google.cloud.aiplatform.v1.NotebookRuntime.HealthState.forNumber(healthState_); + return result == null + ? com.google.cloud.aiplatform.v1.NotebookRuntime.HealthState.UNRECOGNIZED + : result; + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 10; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + /** + * + * + *
+   * Required. The display name of the NotebookRuntime.
+   * The name can be up to 128 characters long and can consist of any UTF-8
+   * characters.
+   * 
+ * + * string display_name = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + 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(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The display name of the NotebookRuntime.
+   * The name can be up to 128 characters long and can consist of any UTF-8
+   * characters.
+   * 
+ * + * string display_name = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 11; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + * + * + *
+   * The description of the NotebookRuntime.
+   * 
+ * + * string description = 11; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + 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(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * The description of the NotebookRuntime.
+   * 
+ * + * string description = 11; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SERVICE_ACCOUNT_FIELD_NUMBER = 13; + + @SuppressWarnings("serial") + private volatile java.lang.Object serviceAccount_ = ""; + /** + * + * + *
+   * Output only. The service account that the NotebookRuntime workload runs as.
+   * 
+ * + * string service_account = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The serviceAccount. + */ + @java.lang.Override + public java.lang.String getServiceAccount() { + java.lang.Object ref = serviceAccount_; + 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(); + serviceAccount_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The service account that the NotebookRuntime workload runs as.
+   * 
+ * + * string service_account = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for serviceAccount. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServiceAccountBytes() { + java.lang.Object ref = serviceAccount_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceAccount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RUNTIME_STATE_FIELD_NUMBER = 14; + private int runtimeState_ = 0; + /** + * + * + *
+   * Output only. The runtime (instance) state of the NotebookRuntime.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntime.RuntimeState runtime_state = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for runtimeState. + */ + @java.lang.Override + public int getRuntimeStateValue() { + return runtimeState_; + } + /** + * + * + *
+   * Output only. The runtime (instance) state of the NotebookRuntime.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntime.RuntimeState runtime_state = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The runtimeState. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.NotebookRuntime.RuntimeState getRuntimeState() { + com.google.cloud.aiplatform.v1.NotebookRuntime.RuntimeState result = + com.google.cloud.aiplatform.v1.NotebookRuntime.RuntimeState.forNumber(runtimeState_); + return result == null + ? com.google.cloud.aiplatform.v1.NotebookRuntime.RuntimeState.UNRECOGNIZED + : result; + } + + public static final int IS_UPGRADABLE_FIELD_NUMBER = 15; + private boolean isUpgradable_ = false; + /** + * + * + *
+   * Output only. Whether NotebookRuntime is upgradable.
+   * 
+ * + * bool is_upgradable = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The isUpgradable. + */ + @java.lang.Override + public boolean getIsUpgradable() { + return isUpgradable_; + } + + public static final int LABELS_FIELD_NUMBER = 16; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.aiplatform.v1.NotebookRuntimeProto + .internal_static_google_cloud_aiplatform_v1_NotebookRuntime_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * The labels with user-defined metadata to organize your
+   * NotebookRuntime.
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one NotebookRuntime
+   * (System labels are excluded).
+   *
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+   * and are immutable. Following system labels exist for NotebookRuntime:
+   *
+   * * "aiplatform.googleapis.com/notebook_runtime_gce_instance_id": output
+   * only, its value is the Compute Engine instance id.
+   * * "aiplatform.googleapis.com/colab_enterprise_entry_service": its value is
+   * either "bigquery" or "vertex"; if absent, it should be "vertex". This is to
+   * describe the entry service, either BigQuery or Vertex.
+   * 
+ * + * map<string, string> labels = 16; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * The labels with user-defined metadata to organize your
+   * NotebookRuntime.
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one NotebookRuntime
+   * (System labels are excluded).
+   *
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+   * and are immutable. Following system labels exist for NotebookRuntime:
+   *
+   * * "aiplatform.googleapis.com/notebook_runtime_gce_instance_id": output
+   * only, its value is the Compute Engine instance id.
+   * * "aiplatform.googleapis.com/colab_enterprise_entry_service": its value is
+   * either "bigquery" or "vertex"; if absent, it should be "vertex". This is to
+   * describe the entry service, either BigQuery or Vertex.
+   * 
+ * + * map<string, string> labels = 16; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * The labels with user-defined metadata to organize your
+   * NotebookRuntime.
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one NotebookRuntime
+   * (System labels are excluded).
+   *
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+   * and are immutable. Following system labels exist for NotebookRuntime:
+   *
+   * * "aiplatform.googleapis.com/notebook_runtime_gce_instance_id": output
+   * only, its value is the Compute Engine instance id.
+   * * "aiplatform.googleapis.com/colab_enterprise_entry_service": its value is
+   * either "bigquery" or "vertex"; if absent, it should be "vertex". This is to
+   * describe the entry service, either BigQuery or Vertex.
+   * 
+ * + * map<string, string> labels = 16; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * The labels with user-defined metadata to organize your
+   * NotebookRuntime.
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one NotebookRuntime
+   * (System labels are excluded).
+   *
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+   * and are immutable. Following system labels exist for NotebookRuntime:
+   *
+   * * "aiplatform.googleapis.com/notebook_runtime_gce_instance_id": output
+   * only, its value is the Compute Engine instance id.
+   * * "aiplatform.googleapis.com/colab_enterprise_entry_service": its value is
+   * either "bigquery" or "vertex"; if absent, it should be "vertex". This is to
+   * describe the entry service, either BigQuery or Vertex.
+   * 
+ * + * map<string, string> labels = 16; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int EXPIRATION_TIME_FIELD_NUMBER = 17; + private com.google.protobuf.Timestamp expirationTime_; + /** + * + * + *
+   * Output only. Timestamp when this NotebookRuntime will be expired:
+   * 1. System Predefined NotebookRuntime: 24 hours after creation. After
+   * expiration, system predifined runtime will be deleted.
+   * 2. User created NotebookRuntime: 6 months after last upgrade. After
+   * expiration, user created runtime will be stopped and allowed for upgrade.
+   * 
+ * + * + * .google.protobuf.Timestamp expiration_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the expirationTime field is set. + */ + @java.lang.Override + public boolean hasExpirationTime() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+   * Output only. Timestamp when this NotebookRuntime will be expired:
+   * 1. System Predefined NotebookRuntime: 24 hours after creation. After
+   * expiration, system predifined runtime will be deleted.
+   * 2. User created NotebookRuntime: 6 months after last upgrade. After
+   * expiration, user created runtime will be stopped and allowed for upgrade.
+   * 
+ * + * + * .google.protobuf.Timestamp expiration_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The expirationTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getExpirationTime() { + return expirationTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : expirationTime_; + } + /** + * + * + *
+   * Output only. Timestamp when this NotebookRuntime will be expired:
+   * 1. System Predefined NotebookRuntime: 24 hours after creation. After
+   * expiration, system predifined runtime will be deleted.
+   * 2. User created NotebookRuntime: 6 months after last upgrade. After
+   * expiration, user created runtime will be stopped and allowed for upgrade.
+   * 
+ * + * + * .google.protobuf.Timestamp expiration_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getExpirationTimeOrBuilder() { + return expirationTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : expirationTime_; + } + + public static final int VERSION_FIELD_NUMBER = 18; + + @SuppressWarnings("serial") + private volatile java.lang.Object version_ = ""; + /** + * + * + *
+   * Output only. The VM os image version of NotebookRuntime.
+   * 
+ * + * string version = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The version. + */ + @java.lang.Override + public java.lang.String getVersion() { + java.lang.Object ref = version_; + 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(); + version_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The VM os image version of NotebookRuntime.
+   * 
+ * + * string version = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for version. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NOTEBOOK_RUNTIME_TYPE_FIELD_NUMBER = 19; + private int notebookRuntimeType_ = 0; + /** + * + * + *
+   * Output only. The type of the notebook runtime.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntimeType notebook_runtime_type = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for notebookRuntimeType. + */ + @java.lang.Override + public int getNotebookRuntimeTypeValue() { + return notebookRuntimeType_; + } + /** + * + * + *
+   * Output only. The type of the notebook runtime.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntimeType notebook_runtime_type = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The notebookRuntimeType. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.NotebookRuntimeType getNotebookRuntimeType() { + com.google.cloud.aiplatform.v1.NotebookRuntimeType result = + com.google.cloud.aiplatform.v1.NotebookRuntimeType.forNumber(notebookRuntimeType_); + return result == null + ? com.google.cloud.aiplatform.v1.NotebookRuntimeType.UNRECOGNIZED + : result; + } + + public static final int NETWORK_TAGS_FIELD_NUMBER = 25; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList networkTags_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Optional. The Compute Engine tags to add to runtime (see [Tagging
+   * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).
+   * 
+ * + * repeated string network_tags = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the networkTags. + */ + public com.google.protobuf.ProtocolStringList getNetworkTagsList() { + return networkTags_; + } + /** + * + * + *
+   * Optional. The Compute Engine tags to add to runtime (see [Tagging
+   * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).
+   * 
+ * + * repeated string network_tags = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of networkTags. + */ + public int getNetworkTagsCount() { + return networkTags_.size(); + } + /** + * + * + *
+   * Optional. The Compute Engine tags to add to runtime (see [Tagging
+   * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).
+   * 
+ * + * repeated string network_tags = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The networkTags at the given index. + */ + public java.lang.String getNetworkTags(int index) { + return networkTags_.get(index); + } + /** + * + * + *
+   * Optional. The Compute Engine tags to add to runtime (see [Tagging
+   * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).
+   * 
+ * + * repeated string network_tags = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the networkTags at the given index. + */ + public com.google.protobuf.ByteString getNetworkTagsBytes(int index) { + return networkTags_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(runtimeUser_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, runtimeUser_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getNotebookRuntimeTemplateRef()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(proxyUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, proxyUri_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(6, getCreateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(7, getUpdateTime()); + } + if (healthState_ + != com.google.cloud.aiplatform.v1.NotebookRuntime.HealthState.HEALTH_STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(8, healthState_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 10, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 11, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccount_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 13, serviceAccount_); + } + if (runtimeState_ + != com.google.cloud.aiplatform.v1.NotebookRuntime.RuntimeState.RUNTIME_STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(14, runtimeState_); + } + if (isUpgradable_ != false) { + output.writeBool(15, isUpgradable_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 16); + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(17, getExpirationTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 18, version_); + } + if (notebookRuntimeType_ + != com.google.cloud.aiplatform.v1.NotebookRuntimeType.NOTEBOOK_RUNTIME_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(19, notebookRuntimeType_); + } + for (int i = 0; i < networkTags_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 25, networkTags_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(runtimeUser_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, runtimeUser_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, getNotebookRuntimeTemplateRef()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(proxyUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, proxyUri_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getCreateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getUpdateTime()); + } + if (healthState_ + != com.google.cloud.aiplatform.v1.NotebookRuntime.HealthState.HEALTH_STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(8, healthState_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccount_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, serviceAccount_); + } + if (runtimeState_ + != com.google.cloud.aiplatform.v1.NotebookRuntime.RuntimeState.RUNTIME_STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(14, runtimeState_); + } + if (isUpgradable_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(15, isUpgradable_); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(16, labels__); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(17, getExpirationTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(18, version_); + } + if (notebookRuntimeType_ + != com.google.cloud.aiplatform.v1.NotebookRuntimeType.NOTEBOOK_RUNTIME_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(19, notebookRuntimeType_); + } + { + int dataSize = 0; + for (int i = 0; i < networkTags_.size(); i++) { + dataSize += computeStringSizeNoTag(networkTags_.getRaw(i)); + } + size += dataSize; + size += 2 * getNetworkTagsList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.NotebookRuntime)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.NotebookRuntime other = + (com.google.cloud.aiplatform.v1.NotebookRuntime) obj; + + if (!getName().equals(other.getName())) return false; + if (!getRuntimeUser().equals(other.getRuntimeUser())) return false; + if (hasNotebookRuntimeTemplateRef() != other.hasNotebookRuntimeTemplateRef()) return false; + if (hasNotebookRuntimeTemplateRef()) { + if (!getNotebookRuntimeTemplateRef().equals(other.getNotebookRuntimeTemplateRef())) + return false; + } + if (!getProxyUri().equals(other.getProxyUri())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (healthState_ != other.healthState_) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!getServiceAccount().equals(other.getServiceAccount())) return false; + if (runtimeState_ != other.runtimeState_) return false; + if (getIsUpgradable() != other.getIsUpgradable()) return false; + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (hasExpirationTime() != other.hasExpirationTime()) return false; + if (hasExpirationTime()) { + if (!getExpirationTime().equals(other.getExpirationTime())) return false; + } + if (!getVersion().equals(other.getVersion())) return false; + if (notebookRuntimeType_ != other.notebookRuntimeType_) return false; + if (!getNetworkTagsList().equals(other.getNetworkTagsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + RUNTIME_USER_FIELD_NUMBER; + hash = (53 * hash) + getRuntimeUser().hashCode(); + if (hasNotebookRuntimeTemplateRef()) { + hash = (37 * hash) + NOTEBOOK_RUNTIME_TEMPLATE_REF_FIELD_NUMBER; + hash = (53 * hash) + getNotebookRuntimeTemplateRef().hashCode(); + } + hash = (37 * hash) + PROXY_URI_FIELD_NUMBER; + hash = (53 * hash) + getProxyUri().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (37 * hash) + HEALTH_STATE_FIELD_NUMBER; + hash = (53 * hash) + healthState_; + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + SERVICE_ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getServiceAccount().hashCode(); + hash = (37 * hash) + RUNTIME_STATE_FIELD_NUMBER; + hash = (53 * hash) + runtimeState_; + hash = (37 * hash) + IS_UPGRADABLE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIsUpgradable()); + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + if (hasExpirationTime()) { + hash = (37 * hash) + EXPIRATION_TIME_FIELD_NUMBER; + hash = (53 * hash) + getExpirationTime().hashCode(); + } + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + hash = (37 * hash) + NOTEBOOK_RUNTIME_TYPE_FIELD_NUMBER; + hash = (53 * hash) + notebookRuntimeType_; + if (getNetworkTagsCount() > 0) { + hash = (37 * hash) + NETWORK_TAGS_FIELD_NUMBER; + hash = (53 * hash) + getNetworkTagsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.NotebookRuntime parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.NotebookRuntime parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.NotebookRuntime parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.NotebookRuntime parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.NotebookRuntime parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.NotebookRuntime parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.NotebookRuntime parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.NotebookRuntime parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.NotebookRuntime parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.NotebookRuntime parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.NotebookRuntime parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.NotebookRuntime parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.aiplatform.v1.NotebookRuntime prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A runtime is a virtual machine allocated to a particular user for a
+   * particular Notebook file on temporary basis with lifetime limited to 24
+   * hours.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.NotebookRuntime} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.NotebookRuntime) + com.google.cloud.aiplatform.v1.NotebookRuntimeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.NotebookRuntimeProto + .internal_static_google_cloud_aiplatform_v1_NotebookRuntime_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 16: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 16: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.NotebookRuntimeProto + .internal_static_google_cloud_aiplatform_v1_NotebookRuntime_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.NotebookRuntime.class, + com.google.cloud.aiplatform.v1.NotebookRuntime.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.NotebookRuntime.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getNotebookRuntimeTemplateRefFieldBuilder(); + getCreateTimeFieldBuilder(); + getUpdateTimeFieldBuilder(); + getExpirationTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + runtimeUser_ = ""; + notebookRuntimeTemplateRef_ = null; + if (notebookRuntimeTemplateRefBuilder_ != null) { + notebookRuntimeTemplateRefBuilder_.dispose(); + notebookRuntimeTemplateRefBuilder_ = null; + } + proxyUri_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + healthState_ = 0; + displayName_ = ""; + description_ = ""; + serviceAccount_ = ""; + runtimeState_ = 0; + isUpgradable_ = false; + internalGetMutableLabels().clear(); + expirationTime_ = null; + if (expirationTimeBuilder_ != null) { + expirationTimeBuilder_.dispose(); + expirationTimeBuilder_ = null; + } + version_ = ""; + notebookRuntimeType_ = 0; + networkTags_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.NotebookRuntimeProto + .internal_static_google_cloud_aiplatform_v1_NotebookRuntime_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.NotebookRuntime getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.NotebookRuntime.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.NotebookRuntime build() { + com.google.cloud.aiplatform.v1.NotebookRuntime result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.NotebookRuntime buildPartial() { + com.google.cloud.aiplatform.v1.NotebookRuntime result = + new com.google.cloud.aiplatform.v1.NotebookRuntime(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.NotebookRuntime result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.runtimeUser_ = runtimeUser_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.notebookRuntimeTemplateRef_ = + notebookRuntimeTemplateRefBuilder_ == null + ? notebookRuntimeTemplateRef_ + : notebookRuntimeTemplateRefBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.proxyUri_ = proxyUri_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.healthState_ = healthState_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.serviceAccount_ = serviceAccount_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.runtimeState_ = runtimeState_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.isUpgradable_ = isUpgradable_; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.expirationTime_ = + expirationTimeBuilder_ == null ? expirationTime_ : expirationTimeBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.version_ = version_; + } + if (((from_bitField0_ & 0x00008000) != 0)) { + result.notebookRuntimeType_ = notebookRuntimeType_; + } + if (((from_bitField0_ & 0x00010000) != 0)) { + networkTags_.makeImmutable(); + result.networkTags_ = networkTags_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.NotebookRuntime) { + return mergeFrom((com.google.cloud.aiplatform.v1.NotebookRuntime) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.NotebookRuntime other) { + if (other == com.google.cloud.aiplatform.v1.NotebookRuntime.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRuntimeUser().isEmpty()) { + runtimeUser_ = other.runtimeUser_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasNotebookRuntimeTemplateRef()) { + mergeNotebookRuntimeTemplateRef(other.getNotebookRuntimeTemplateRef()); + } + if (!other.getProxyUri().isEmpty()) { + proxyUri_ = other.proxyUri_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.healthState_ != 0) { + setHealthStateValue(other.getHealthStateValue()); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000080; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000100; + onChanged(); + } + if (!other.getServiceAccount().isEmpty()) { + serviceAccount_ = other.serviceAccount_; + bitField0_ |= 0x00000200; + onChanged(); + } + if (other.runtimeState_ != 0) { + setRuntimeStateValue(other.getRuntimeStateValue()); + } + if (other.getIsUpgradable() != false) { + setIsUpgradable(other.getIsUpgradable()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00001000; + if (other.hasExpirationTime()) { + mergeExpirationTime(other.getExpirationTime()); + } + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + bitField0_ |= 0x00004000; + onChanged(); + } + if (other.notebookRuntimeType_ != 0) { + setNotebookRuntimeTypeValue(other.getNotebookRuntimeTypeValue()); + } + if (!other.networkTags_.isEmpty()) { + if (networkTags_.isEmpty()) { + networkTags_ = other.networkTags_; + bitField0_ |= 0x00010000; + } else { + ensureNetworkTagsIsMutable(); + networkTags_.addAll(other.networkTags_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + runtimeUser_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + getNotebookRuntimeTemplateRefFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 42: + { + proxyUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 42 + case 50: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 50 + case 58: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 58 + case 64: + { + healthState_ = input.readEnum(); + bitField0_ |= 0x00000040; + break; + } // case 64 + case 82: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 82 + case 90: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 90 + case 106: + { + serviceAccount_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case 106 + case 112: + { + runtimeState_ = input.readEnum(); + bitField0_ |= 0x00000400; + break; + } // case 112 + case 120: + { + isUpgradable_ = input.readBool(); + bitField0_ |= 0x00000800; + break; + } // case 120 + case 130: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00001000; + break; + } // case 130 + case 138: + { + input.readMessage(getExpirationTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00002000; + break; + } // case 138 + case 146: + { + version_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00004000; + break; + } // case 146 + case 152: + { + notebookRuntimeType_ = input.readEnum(); + bitField0_ |= 0x00008000; + break; + } // case 152 + case 202: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureNetworkTagsIsMutable(); + networkTags_.add(s); + break; + } // case 202 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. The resource name of the NotebookRuntime.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The resource name of the NotebookRuntime.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The resource name of the NotebookRuntime.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The resource name of the NotebookRuntime.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The resource name of the NotebookRuntime.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object runtimeUser_ = ""; + /** + * + * + *
+     * Required. The user email of the NotebookRuntime.
+     * 
+ * + * string runtime_user = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The runtimeUser. + */ + public java.lang.String getRuntimeUser() { + java.lang.Object ref = runtimeUser_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + runtimeUser_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The user email of the NotebookRuntime.
+     * 
+ * + * string runtime_user = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for runtimeUser. + */ + public com.google.protobuf.ByteString getRuntimeUserBytes() { + java.lang.Object ref = runtimeUser_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + runtimeUser_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The user email of the NotebookRuntime.
+     * 
+ * + * string runtime_user = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The runtimeUser to set. + * @return This builder for chaining. + */ + public Builder setRuntimeUser(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + runtimeUser_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The user email of the NotebookRuntime.
+     * 
+ * + * string runtime_user = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearRuntimeUser() { + runtimeUser_ = getDefaultInstance().getRuntimeUser(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The user email of the NotebookRuntime.
+     * 
+ * + * string runtime_user = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for runtimeUser to set. + * @return This builder for chaining. + */ + public Builder setRuntimeUserBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + runtimeUser_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef notebookRuntimeTemplateRef_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef, + com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef.Builder, + com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateRefOrBuilder> + notebookRuntimeTemplateRefBuilder_; + /** + * + * + *
+     * Output only. The pointer to NotebookRuntimeTemplate this NotebookRuntime is
+     * created from.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef notebook_runtime_template_ref = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the notebookRuntimeTemplateRef field is set. + */ + public boolean hasNotebookRuntimeTemplateRef() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Output only. The pointer to NotebookRuntimeTemplate this NotebookRuntime is
+     * created from.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef notebook_runtime_template_ref = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The notebookRuntimeTemplateRef. + */ + public com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef + getNotebookRuntimeTemplateRef() { + if (notebookRuntimeTemplateRefBuilder_ == null) { + return notebookRuntimeTemplateRef_ == null + ? com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef.getDefaultInstance() + : notebookRuntimeTemplateRef_; + } else { + return notebookRuntimeTemplateRefBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The pointer to NotebookRuntimeTemplate this NotebookRuntime is
+     * created from.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef notebook_runtime_template_ref = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setNotebookRuntimeTemplateRef( + com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef value) { + if (notebookRuntimeTemplateRefBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + notebookRuntimeTemplateRef_ = value; + } else { + notebookRuntimeTemplateRefBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The pointer to NotebookRuntimeTemplate this NotebookRuntime is
+     * created from.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef notebook_runtime_template_ref = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setNotebookRuntimeTemplateRef( + com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef.Builder builderForValue) { + if (notebookRuntimeTemplateRefBuilder_ == null) { + notebookRuntimeTemplateRef_ = builderForValue.build(); + } else { + notebookRuntimeTemplateRefBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The pointer to NotebookRuntimeTemplate this NotebookRuntime is
+     * created from.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef notebook_runtime_template_ref = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeNotebookRuntimeTemplateRef( + com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef value) { + if (notebookRuntimeTemplateRefBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && notebookRuntimeTemplateRef_ != null + && notebookRuntimeTemplateRef_ + != com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef.getDefaultInstance()) { + getNotebookRuntimeTemplateRefBuilder().mergeFrom(value); + } else { + notebookRuntimeTemplateRef_ = value; + } + } else { + notebookRuntimeTemplateRefBuilder_.mergeFrom(value); + } + if (notebookRuntimeTemplateRef_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. The pointer to NotebookRuntimeTemplate this NotebookRuntime is
+     * created from.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef notebook_runtime_template_ref = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearNotebookRuntimeTemplateRef() { + bitField0_ = (bitField0_ & ~0x00000004); + notebookRuntimeTemplateRef_ = null; + if (notebookRuntimeTemplateRefBuilder_ != null) { + notebookRuntimeTemplateRefBuilder_.dispose(); + notebookRuntimeTemplateRefBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The pointer to NotebookRuntimeTemplate this NotebookRuntime is
+     * created from.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef notebook_runtime_template_ref = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef.Builder + getNotebookRuntimeTemplateRefBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getNotebookRuntimeTemplateRefFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The pointer to NotebookRuntimeTemplate this NotebookRuntime is
+     * created from.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef notebook_runtime_template_ref = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateRefOrBuilder + getNotebookRuntimeTemplateRefOrBuilder() { + if (notebookRuntimeTemplateRefBuilder_ != null) { + return notebookRuntimeTemplateRefBuilder_.getMessageOrBuilder(); + } else { + return notebookRuntimeTemplateRef_ == null + ? com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef.getDefaultInstance() + : notebookRuntimeTemplateRef_; + } + } + /** + * + * + *
+     * Output only. The pointer to NotebookRuntimeTemplate this NotebookRuntime is
+     * created from.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef notebook_runtime_template_ref = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef, + com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef.Builder, + com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateRefOrBuilder> + getNotebookRuntimeTemplateRefFieldBuilder() { + if (notebookRuntimeTemplateRefBuilder_ == null) { + notebookRuntimeTemplateRefBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef, + com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef.Builder, + com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateRefOrBuilder>( + getNotebookRuntimeTemplateRef(), getParentForChildren(), isClean()); + notebookRuntimeTemplateRef_ = null; + } + return notebookRuntimeTemplateRefBuilder_; + } + + private java.lang.Object proxyUri_ = ""; + /** + * + * + *
+     * Output only. The proxy endpoint used to access the NotebookRuntime.
+     * 
+ * + * string proxy_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The proxyUri. + */ + public java.lang.String getProxyUri() { + java.lang.Object ref = proxyUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + proxyUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The proxy endpoint used to access the NotebookRuntime.
+     * 
+ * + * string proxy_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for proxyUri. + */ + public com.google.protobuf.ByteString getProxyUriBytes() { + java.lang.Object ref = proxyUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + proxyUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The proxy endpoint used to access the NotebookRuntime.
+     * 
+ * + * string proxy_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The proxyUri to set. + * @return This builder for chaining. + */ + public Builder setProxyUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + proxyUri_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The proxy endpoint used to access the NotebookRuntime.
+     * 
+ * + * string proxy_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearProxyUri() { + proxyUri_ = getDefaultInstance().getProxyUri(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The proxy endpoint used to access the NotebookRuntime.
+     * 
+ * + * string proxy_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for proxyUri to set. + * @return This builder for chaining. + */ + public Builder setProxyUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + proxyUri_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntime was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntime was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntime was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntime was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntime was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntime was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000010); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntime was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntime was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntime was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntime was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntime was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntime was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntime was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntime was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntime was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000020); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntime was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntime was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntime was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private int healthState_ = 0; + /** + * + * + *
+     * Output only. The health state of the NotebookRuntime.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntime.HealthState health_state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for healthState. + */ + @java.lang.Override + public int getHealthStateValue() { + return healthState_; + } + /** + * + * + *
+     * Output only. The health state of the NotebookRuntime.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntime.HealthState health_state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for healthState to set. + * @return This builder for chaining. + */ + public Builder setHealthStateValue(int value) { + healthState_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The health state of the NotebookRuntime.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntime.HealthState health_state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The healthState. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.NotebookRuntime.HealthState getHealthState() { + com.google.cloud.aiplatform.v1.NotebookRuntime.HealthState result = + com.google.cloud.aiplatform.v1.NotebookRuntime.HealthState.forNumber(healthState_); + return result == null + ? com.google.cloud.aiplatform.v1.NotebookRuntime.HealthState.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Output only. The health state of the NotebookRuntime.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntime.HealthState health_state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The healthState to set. + * @return This builder for chaining. + */ + public Builder setHealthState( + com.google.cloud.aiplatform.v1.NotebookRuntime.HealthState value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000040; + healthState_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The health state of the NotebookRuntime.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntime.HealthState health_state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearHealthState() { + bitField0_ = (bitField0_ & ~0x00000040); + healthState_ = 0; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Required. The display name of the NotebookRuntime.
+     * The name can be up to 128 characters long and can consist of any UTF-8
+     * characters.
+     * 
+ * + * string display_name = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The display name of the NotebookRuntime.
+     * The name can be up to 128 characters long and can consist of any UTF-8
+     * characters.
+     * 
+ * + * string display_name = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The display name of the NotebookRuntime.
+     * The name can be up to 128 characters long and can consist of any UTF-8
+     * characters.
+     * 
+ * + * string display_name = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The display name of the NotebookRuntime.
+     * The name can be up to 128 characters long and can consist of any UTF-8
+     * characters.
+     * 
+ * + * string display_name = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The display name of the NotebookRuntime.
+     * The name can be up to 128 characters long and can consist of any UTF-8
+     * characters.
+     * 
+ * + * string display_name = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * The description of the NotebookRuntime.
+     * 
+ * + * string description = 11; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The description of the NotebookRuntime.
+     * 
+ * + * string description = 11; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The description of the NotebookRuntime.
+     * 
+ * + * string description = 11; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * The description of the NotebookRuntime.
+     * 
+ * + * string description = 11; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + /** + * + * + *
+     * The description of the NotebookRuntime.
+     * 
+ * + * string description = 11; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + private java.lang.Object serviceAccount_ = ""; + /** + * + * + *
+     * Output only. The service account that the NotebookRuntime workload runs as.
+     * 
+ * + * string service_account = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The serviceAccount. + */ + public java.lang.String getServiceAccount() { + java.lang.Object ref = serviceAccount_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceAccount_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The service account that the NotebookRuntime workload runs as.
+     * 
+ * + * string service_account = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for serviceAccount. + */ + public com.google.protobuf.ByteString getServiceAccountBytes() { + java.lang.Object ref = serviceAccount_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceAccount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The service account that the NotebookRuntime workload runs as.
+     * 
+ * + * string service_account = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The serviceAccount to set. + * @return This builder for chaining. + */ + public Builder setServiceAccount(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + serviceAccount_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The service account that the NotebookRuntime workload runs as.
+     * 
+ * + * string service_account = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearServiceAccount() { + serviceAccount_ = getDefaultInstance().getServiceAccount(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The service account that the NotebookRuntime workload runs as.
+     * 
+ * + * string service_account = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for serviceAccount to set. + * @return This builder for chaining. + */ + public Builder setServiceAccountBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + serviceAccount_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + private int runtimeState_ = 0; + /** + * + * + *
+     * Output only. The runtime (instance) state of the NotebookRuntime.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntime.RuntimeState runtime_state = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for runtimeState. + */ + @java.lang.Override + public int getRuntimeStateValue() { + return runtimeState_; + } + /** + * + * + *
+     * Output only. The runtime (instance) state of the NotebookRuntime.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntime.RuntimeState runtime_state = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for runtimeState to set. + * @return This builder for chaining. + */ + public Builder setRuntimeStateValue(int value) { + runtimeState_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The runtime (instance) state of the NotebookRuntime.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntime.RuntimeState runtime_state = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The runtimeState. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.NotebookRuntime.RuntimeState getRuntimeState() { + com.google.cloud.aiplatform.v1.NotebookRuntime.RuntimeState result = + com.google.cloud.aiplatform.v1.NotebookRuntime.RuntimeState.forNumber(runtimeState_); + return result == null + ? com.google.cloud.aiplatform.v1.NotebookRuntime.RuntimeState.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Output only. The runtime (instance) state of the NotebookRuntime.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntime.RuntimeState runtime_state = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The runtimeState to set. + * @return This builder for chaining. + */ + public Builder setRuntimeState( + com.google.cloud.aiplatform.v1.NotebookRuntime.RuntimeState value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000400; + runtimeState_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The runtime (instance) state of the NotebookRuntime.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntime.RuntimeState runtime_state = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearRuntimeState() { + bitField0_ = (bitField0_ & ~0x00000400); + runtimeState_ = 0; + onChanged(); + return this; + } + + private boolean isUpgradable_; + /** + * + * + *
+     * Output only. Whether NotebookRuntime is upgradable.
+     * 
+ * + * bool is_upgradable = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The isUpgradable. + */ + @java.lang.Override + public boolean getIsUpgradable() { + return isUpgradable_; + } + /** + * + * + *
+     * Output only. Whether NotebookRuntime is upgradable.
+     * 
+ * + * bool is_upgradable = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The isUpgradable to set. + * @return This builder for chaining. + */ + public Builder setIsUpgradable(boolean value) { + + isUpgradable_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Whether NotebookRuntime is upgradable.
+     * 
+ * + * bool is_upgradable = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearIsUpgradable() { + bitField0_ = (bitField0_ & ~0x00000800); + isUpgradable_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00001000; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * The labels with user-defined metadata to organize your
+     * NotebookRuntime.
+     *
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * No more than 64 user labels can be associated with one NotebookRuntime
+     * (System labels are excluded).
+     *
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+     * and are immutable. Following system labels exist for NotebookRuntime:
+     *
+     * * "aiplatform.googleapis.com/notebook_runtime_gce_instance_id": output
+     * only, its value is the Compute Engine instance id.
+     * * "aiplatform.googleapis.com/colab_enterprise_entry_service": its value is
+     * either "bigquery" or "vertex"; if absent, it should be "vertex". This is to
+     * describe the entry service, either BigQuery or Vertex.
+     * 
+ * + * map<string, string> labels = 16; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * The labels with user-defined metadata to organize your
+     * NotebookRuntime.
+     *
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * No more than 64 user labels can be associated with one NotebookRuntime
+     * (System labels are excluded).
+     *
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+     * and are immutable. Following system labels exist for NotebookRuntime:
+     *
+     * * "aiplatform.googleapis.com/notebook_runtime_gce_instance_id": output
+     * only, its value is the Compute Engine instance id.
+     * * "aiplatform.googleapis.com/colab_enterprise_entry_service": its value is
+     * either "bigquery" or "vertex"; if absent, it should be "vertex". This is to
+     * describe the entry service, either BigQuery or Vertex.
+     * 
+ * + * map<string, string> labels = 16; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * The labels with user-defined metadata to organize your
+     * NotebookRuntime.
+     *
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * No more than 64 user labels can be associated with one NotebookRuntime
+     * (System labels are excluded).
+     *
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+     * and are immutable. Following system labels exist for NotebookRuntime:
+     *
+     * * "aiplatform.googleapis.com/notebook_runtime_gce_instance_id": output
+     * only, its value is the Compute Engine instance id.
+     * * "aiplatform.googleapis.com/colab_enterprise_entry_service": its value is
+     * either "bigquery" or "vertex"; if absent, it should be "vertex". This is to
+     * describe the entry service, either BigQuery or Vertex.
+     * 
+ * + * map<string, string> labels = 16; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * The labels with user-defined metadata to organize your
+     * NotebookRuntime.
+     *
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * No more than 64 user labels can be associated with one NotebookRuntime
+     * (System labels are excluded).
+     *
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+     * and are immutable. Following system labels exist for NotebookRuntime:
+     *
+     * * "aiplatform.googleapis.com/notebook_runtime_gce_instance_id": output
+     * only, its value is the Compute Engine instance id.
+     * * "aiplatform.googleapis.com/colab_enterprise_entry_service": its value is
+     * either "bigquery" or "vertex"; if absent, it should be "vertex". This is to
+     * describe the entry service, either BigQuery or Vertex.
+     * 
+ * + * map<string, string> labels = 16; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00001000); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * The labels with user-defined metadata to organize your
+     * NotebookRuntime.
+     *
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * No more than 64 user labels can be associated with one NotebookRuntime
+     * (System labels are excluded).
+     *
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+     * and are immutable. Following system labels exist for NotebookRuntime:
+     *
+     * * "aiplatform.googleapis.com/notebook_runtime_gce_instance_id": output
+     * only, its value is the Compute Engine instance id.
+     * * "aiplatform.googleapis.com/colab_enterprise_entry_service": its value is
+     * either "bigquery" or "vertex"; if absent, it should be "vertex". This is to
+     * describe the entry service, either BigQuery or Vertex.
+     * 
+ * + * map<string, string> labels = 16; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + bitField0_ |= 0x00001000; + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * The labels with user-defined metadata to organize your
+     * NotebookRuntime.
+     *
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * No more than 64 user labels can be associated with one NotebookRuntime
+     * (System labels are excluded).
+     *
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+     * and are immutable. Following system labels exist for NotebookRuntime:
+     *
+     * * "aiplatform.googleapis.com/notebook_runtime_gce_instance_id": output
+     * only, its value is the Compute Engine instance id.
+     * * "aiplatform.googleapis.com/colab_enterprise_entry_service": its value is
+     * either "bigquery" or "vertex"; if absent, it should be "vertex". This is to
+     * describe the entry service, either BigQuery or Vertex.
+     * 
+ * + * map<string, string> labels = 16; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00001000; + return this; + } + /** + * + * + *
+     * The labels with user-defined metadata to organize your
+     * NotebookRuntime.
+     *
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * No more than 64 user labels can be associated with one NotebookRuntime
+     * (System labels are excluded).
+     *
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+     * and are immutable. Following system labels exist for NotebookRuntime:
+     *
+     * * "aiplatform.googleapis.com/notebook_runtime_gce_instance_id": output
+     * only, its value is the Compute Engine instance id.
+     * * "aiplatform.googleapis.com/colab_enterprise_entry_service": its value is
+     * either "bigquery" or "vertex"; if absent, it should be "vertex". This is to
+     * describe the entry service, either BigQuery or Vertex.
+     * 
+ * + * map<string, string> labels = 16; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00001000; + return this; + } + + private com.google.protobuf.Timestamp expirationTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + expirationTimeBuilder_; + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntime will be expired:
+     * 1. System Predefined NotebookRuntime: 24 hours after creation. After
+     * expiration, system predifined runtime will be deleted.
+     * 2. User created NotebookRuntime: 6 months after last upgrade. After
+     * expiration, user created runtime will be stopped and allowed for upgrade.
+     * 
+ * + * + * .google.protobuf.Timestamp expiration_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the expirationTime field is set. + */ + public boolean hasExpirationTime() { + return ((bitField0_ & 0x00002000) != 0); + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntime will be expired:
+     * 1. System Predefined NotebookRuntime: 24 hours after creation. After
+     * expiration, system predifined runtime will be deleted.
+     * 2. User created NotebookRuntime: 6 months after last upgrade. After
+     * expiration, user created runtime will be stopped and allowed for upgrade.
+     * 
+ * + * + * .google.protobuf.Timestamp expiration_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The expirationTime. + */ + public com.google.protobuf.Timestamp getExpirationTime() { + if (expirationTimeBuilder_ == null) { + return expirationTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : expirationTime_; + } else { + return expirationTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntime will be expired:
+     * 1. System Predefined NotebookRuntime: 24 hours after creation. After
+     * expiration, system predifined runtime will be deleted.
+     * 2. User created NotebookRuntime: 6 months after last upgrade. After
+     * expiration, user created runtime will be stopped and allowed for upgrade.
+     * 
+ * + * + * .google.protobuf.Timestamp expiration_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setExpirationTime(com.google.protobuf.Timestamp value) { + if (expirationTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + expirationTime_ = value; + } else { + expirationTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntime will be expired:
+     * 1. System Predefined NotebookRuntime: 24 hours after creation. After
+     * expiration, system predifined runtime will be deleted.
+     * 2. User created NotebookRuntime: 6 months after last upgrade. After
+     * expiration, user created runtime will be stopped and allowed for upgrade.
+     * 
+ * + * + * .google.protobuf.Timestamp expiration_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setExpirationTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (expirationTimeBuilder_ == null) { + expirationTime_ = builderForValue.build(); + } else { + expirationTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntime will be expired:
+     * 1. System Predefined NotebookRuntime: 24 hours after creation. After
+     * expiration, system predifined runtime will be deleted.
+     * 2. User created NotebookRuntime: 6 months after last upgrade. After
+     * expiration, user created runtime will be stopped and allowed for upgrade.
+     * 
+ * + * + * .google.protobuf.Timestamp expiration_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeExpirationTime(com.google.protobuf.Timestamp value) { + if (expirationTimeBuilder_ == null) { + if (((bitField0_ & 0x00002000) != 0) + && expirationTime_ != null + && expirationTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getExpirationTimeBuilder().mergeFrom(value); + } else { + expirationTime_ = value; + } + } else { + expirationTimeBuilder_.mergeFrom(value); + } + if (expirationTime_ != null) { + bitField0_ |= 0x00002000; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntime will be expired:
+     * 1. System Predefined NotebookRuntime: 24 hours after creation. After
+     * expiration, system predifined runtime will be deleted.
+     * 2. User created NotebookRuntime: 6 months after last upgrade. After
+     * expiration, user created runtime will be stopped and allowed for upgrade.
+     * 
+ * + * + * .google.protobuf.Timestamp expiration_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearExpirationTime() { + bitField0_ = (bitField0_ & ~0x00002000); + expirationTime_ = null; + if (expirationTimeBuilder_ != null) { + expirationTimeBuilder_.dispose(); + expirationTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntime will be expired:
+     * 1. System Predefined NotebookRuntime: 24 hours after creation. After
+     * expiration, system predifined runtime will be deleted.
+     * 2. User created NotebookRuntime: 6 months after last upgrade. After
+     * expiration, user created runtime will be stopped and allowed for upgrade.
+     * 
+ * + * + * .google.protobuf.Timestamp expiration_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getExpirationTimeBuilder() { + bitField0_ |= 0x00002000; + onChanged(); + return getExpirationTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntime will be expired:
+     * 1. System Predefined NotebookRuntime: 24 hours after creation. After
+     * expiration, system predifined runtime will be deleted.
+     * 2. User created NotebookRuntime: 6 months after last upgrade. After
+     * expiration, user created runtime will be stopped and allowed for upgrade.
+     * 
+ * + * + * .google.protobuf.Timestamp expiration_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getExpirationTimeOrBuilder() { + if (expirationTimeBuilder_ != null) { + return expirationTimeBuilder_.getMessageOrBuilder(); + } else { + return expirationTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : expirationTime_; + } + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntime will be expired:
+     * 1. System Predefined NotebookRuntime: 24 hours after creation. After
+     * expiration, system predifined runtime will be deleted.
+     * 2. User created NotebookRuntime: 6 months after last upgrade. After
+     * expiration, user created runtime will be stopped and allowed for upgrade.
+     * 
+ * + * + * .google.protobuf.Timestamp expiration_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getExpirationTimeFieldBuilder() { + if (expirationTimeBuilder_ == null) { + expirationTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getExpirationTime(), getParentForChildren(), isClean()); + expirationTime_ = null; + } + return expirationTimeBuilder_; + } + + private java.lang.Object version_ = ""; + /** + * + * + *
+     * Output only. The VM os image version of NotebookRuntime.
+     * 
+ * + * string version = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The VM os image version of NotebookRuntime.
+     * 
+ * + * string version = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for version. + */ + public com.google.protobuf.ByteString getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The VM os image version of NotebookRuntime.
+     * 
+ * + * string version = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + version_ = value; + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The VM os image version of NotebookRuntime.
+     * 
+ * + * string version = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearVersion() { + version_ = getDefaultInstance().getVersion(); + bitField0_ = (bitField0_ & ~0x00004000); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The VM os image version of NotebookRuntime.
+     * 
+ * + * string version = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + version_ = value; + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + + private int notebookRuntimeType_ = 0; + /** + * + * + *
+     * Output only. The type of the notebook runtime.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntimeType notebook_runtime_type = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for notebookRuntimeType. + */ + @java.lang.Override + public int getNotebookRuntimeTypeValue() { + return notebookRuntimeType_; + } + /** + * + * + *
+     * Output only. The type of the notebook runtime.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntimeType notebook_runtime_type = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for notebookRuntimeType to set. + * @return This builder for chaining. + */ + public Builder setNotebookRuntimeTypeValue(int value) { + notebookRuntimeType_ = value; + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The type of the notebook runtime.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntimeType notebook_runtime_type = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The notebookRuntimeType. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.NotebookRuntimeType getNotebookRuntimeType() { + com.google.cloud.aiplatform.v1.NotebookRuntimeType result = + com.google.cloud.aiplatform.v1.NotebookRuntimeType.forNumber(notebookRuntimeType_); + return result == null + ? com.google.cloud.aiplatform.v1.NotebookRuntimeType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Output only. The type of the notebook runtime.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntimeType notebook_runtime_type = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The notebookRuntimeType to set. + * @return This builder for chaining. + */ + public Builder setNotebookRuntimeType( + com.google.cloud.aiplatform.v1.NotebookRuntimeType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00008000; + notebookRuntimeType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The type of the notebook runtime.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntimeType notebook_runtime_type = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearNotebookRuntimeType() { + bitField0_ = (bitField0_ & ~0x00008000); + notebookRuntimeType_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList networkTags_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureNetworkTagsIsMutable() { + if (!networkTags_.isModifiable()) { + networkTags_ = new com.google.protobuf.LazyStringArrayList(networkTags_); + } + bitField0_ |= 0x00010000; + } + /** + * + * + *
+     * Optional. The Compute Engine tags to add to runtime (see [Tagging
+     * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).
+     * 
+ * + * repeated string network_tags = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the networkTags. + */ + public com.google.protobuf.ProtocolStringList getNetworkTagsList() { + networkTags_.makeImmutable(); + return networkTags_; + } + /** + * + * + *
+     * Optional. The Compute Engine tags to add to runtime (see [Tagging
+     * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).
+     * 
+ * + * repeated string network_tags = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of networkTags. + */ + public int getNetworkTagsCount() { + return networkTags_.size(); + } + /** + * + * + *
+     * Optional. The Compute Engine tags to add to runtime (see [Tagging
+     * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).
+     * 
+ * + * repeated string network_tags = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The networkTags at the given index. + */ + public java.lang.String getNetworkTags(int index) { + return networkTags_.get(index); + } + /** + * + * + *
+     * Optional. The Compute Engine tags to add to runtime (see [Tagging
+     * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).
+     * 
+ * + * repeated string network_tags = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the networkTags at the given index. + */ + public com.google.protobuf.ByteString getNetworkTagsBytes(int index) { + return networkTags_.getByteString(index); + } + /** + * + * + *
+     * Optional. The Compute Engine tags to add to runtime (see [Tagging
+     * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).
+     * 
+ * + * repeated string network_tags = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The networkTags to set. + * @return This builder for chaining. + */ + public Builder setNetworkTags(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureNetworkTagsIsMutable(); + networkTags_.set(index, value); + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Compute Engine tags to add to runtime (see [Tagging
+     * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).
+     * 
+ * + * repeated string network_tags = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The networkTags to add. + * @return This builder for chaining. + */ + public Builder addNetworkTags(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureNetworkTagsIsMutable(); + networkTags_.add(value); + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Compute Engine tags to add to runtime (see [Tagging
+     * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).
+     * 
+ * + * repeated string network_tags = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The networkTags to add. + * @return This builder for chaining. + */ + public Builder addAllNetworkTags(java.lang.Iterable values) { + ensureNetworkTagsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, networkTags_); + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Compute Engine tags to add to runtime (see [Tagging
+     * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).
+     * 
+ * + * repeated string network_tags = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearNetworkTags() { + networkTags_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00010000); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Compute Engine tags to add to runtime (see [Tagging
+     * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).
+     * 
+ * + * repeated string network_tags = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes of the networkTags to add. + * @return This builder for chaining. + */ + public Builder addNetworkTagsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureNetworkTagsIsMutable(); + networkTags_.add(value); + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.NotebookRuntime) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.NotebookRuntime) + private static final com.google.cloud.aiplatform.v1.NotebookRuntime DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.NotebookRuntime(); + } + + public static com.google.cloud.aiplatform.v1.NotebookRuntime getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NotebookRuntime parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.NotebookRuntime getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NotebookRuntimeName.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NotebookRuntimeName.java new file mode 100644 index 000000000000..cc6e88b87df5 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NotebookRuntimeName.java @@ -0,0 +1,227 @@ +/* + * Copyright 2024 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.aiplatform.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 NotebookRuntimeName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_NOTEBOOK_RUNTIME = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/notebookRuntimes/{notebook_runtime}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String notebookRuntime; + + @Deprecated + protected NotebookRuntimeName() { + project = null; + location = null; + notebookRuntime = null; + } + + private NotebookRuntimeName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + notebookRuntime = Preconditions.checkNotNull(builder.getNotebookRuntime()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getNotebookRuntime() { + return notebookRuntime; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static NotebookRuntimeName of(String project, String location, String notebookRuntime) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setNotebookRuntime(notebookRuntime) + .build(); + } + + public static String format(String project, String location, String notebookRuntime) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setNotebookRuntime(notebookRuntime) + .build() + .toString(); + } + + public static NotebookRuntimeName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_NOTEBOOK_RUNTIME.validatedMatch( + formattedString, "NotebookRuntimeName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("notebook_runtime")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (NotebookRuntimeName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_NOTEBOOK_RUNTIME.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (notebookRuntime != null) { + fieldMapBuilder.put("notebook_runtime", notebookRuntime); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_NOTEBOOK_RUNTIME.instantiate( + "project", project, "location", location, "notebook_runtime", notebookRuntime); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + NotebookRuntimeName that = ((NotebookRuntimeName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.notebookRuntime, that.notebookRuntime); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(notebookRuntime); + return h; + } + + /** Builder for projects/{project}/locations/{location}/notebookRuntimes/{notebook_runtime}. */ + public static class Builder { + private String project; + private String location; + private String notebookRuntime; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getNotebookRuntime() { + return notebookRuntime; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setNotebookRuntime(String notebookRuntime) { + this.notebookRuntime = notebookRuntime; + return this; + } + + private Builder(NotebookRuntimeName notebookRuntimeName) { + this.project = notebookRuntimeName.project; + this.location = notebookRuntimeName.location; + this.notebookRuntime = notebookRuntimeName.notebookRuntime; + } + + public NotebookRuntimeName build() { + return new NotebookRuntimeName(this); + } + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NotebookRuntimeOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NotebookRuntimeOrBuilder.java new file mode 100644 index 000000000000..06a3fb2875bf --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NotebookRuntimeOrBuilder.java @@ -0,0 +1,677 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/notebook_runtime.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +public interface NotebookRuntimeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.NotebookRuntime) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The resource name of the NotebookRuntime.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. The resource name of the NotebookRuntime.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The user email of the NotebookRuntime.
+   * 
+ * + * string runtime_user = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The runtimeUser. + */ + java.lang.String getRuntimeUser(); + /** + * + * + *
+   * Required. The user email of the NotebookRuntime.
+   * 
+ * + * string runtime_user = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for runtimeUser. + */ + com.google.protobuf.ByteString getRuntimeUserBytes(); + + /** + * + * + *
+   * Output only. The pointer to NotebookRuntimeTemplate this NotebookRuntime is
+   * created from.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef notebook_runtime_template_ref = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the notebookRuntimeTemplateRef field is set. + */ + boolean hasNotebookRuntimeTemplateRef(); + /** + * + * + *
+   * Output only. The pointer to NotebookRuntimeTemplate this NotebookRuntime is
+   * created from.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef notebook_runtime_template_ref = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The notebookRuntimeTemplateRef. + */ + com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef getNotebookRuntimeTemplateRef(); + /** + * + * + *
+   * Output only. The pointer to NotebookRuntimeTemplate this NotebookRuntime is
+   * created from.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef notebook_runtime_template_ref = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateRefOrBuilder + getNotebookRuntimeTemplateRefOrBuilder(); + + /** + * + * + *
+   * Output only. The proxy endpoint used to access the NotebookRuntime.
+   * 
+ * + * string proxy_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The proxyUri. + */ + java.lang.String getProxyUri(); + /** + * + * + *
+   * Output only. The proxy endpoint used to access the NotebookRuntime.
+   * 
+ * + * string proxy_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for proxyUri. + */ + com.google.protobuf.ByteString getProxyUriBytes(); + + /** + * + * + *
+   * Output only. Timestamp when this NotebookRuntime was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Timestamp when this NotebookRuntime was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Timestamp when this NotebookRuntime was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Timestamp when this NotebookRuntime was most recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. Timestamp when this NotebookRuntime was most recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. Timestamp when this NotebookRuntime was most recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The health state of the NotebookRuntime.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntime.HealthState health_state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for healthState. + */ + int getHealthStateValue(); + /** + * + * + *
+   * Output only. The health state of the NotebookRuntime.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntime.HealthState health_state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The healthState. + */ + com.google.cloud.aiplatform.v1.NotebookRuntime.HealthState getHealthState(); + + /** + * + * + *
+   * Required. The display name of the NotebookRuntime.
+   * The name can be up to 128 characters long and can consist of any UTF-8
+   * characters.
+   * 
+ * + * string display_name = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Required. The display name of the NotebookRuntime.
+   * The name can be up to 128 characters long and can consist of any UTF-8
+   * characters.
+   * 
+ * + * string display_name = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * The description of the NotebookRuntime.
+   * 
+ * + * string description = 11; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * The description of the NotebookRuntime.
+   * 
+ * + * string description = 11; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Output only. The service account that the NotebookRuntime workload runs as.
+   * 
+ * + * string service_account = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The serviceAccount. + */ + java.lang.String getServiceAccount(); + /** + * + * + *
+   * Output only. The service account that the NotebookRuntime workload runs as.
+   * 
+ * + * string service_account = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for serviceAccount. + */ + com.google.protobuf.ByteString getServiceAccountBytes(); + + /** + * + * + *
+   * Output only. The runtime (instance) state of the NotebookRuntime.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntime.RuntimeState runtime_state = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for runtimeState. + */ + int getRuntimeStateValue(); + /** + * + * + *
+   * Output only. The runtime (instance) state of the NotebookRuntime.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntime.RuntimeState runtime_state = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The runtimeState. + */ + com.google.cloud.aiplatform.v1.NotebookRuntime.RuntimeState getRuntimeState(); + + /** + * + * + *
+   * Output only. Whether NotebookRuntime is upgradable.
+   * 
+ * + * bool is_upgradable = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The isUpgradable. + */ + boolean getIsUpgradable(); + + /** + * + * + *
+   * The labels with user-defined metadata to organize your
+   * NotebookRuntime.
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one NotebookRuntime
+   * (System labels are excluded).
+   *
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+   * and are immutable. Following system labels exist for NotebookRuntime:
+   *
+   * * "aiplatform.googleapis.com/notebook_runtime_gce_instance_id": output
+   * only, its value is the Compute Engine instance id.
+   * * "aiplatform.googleapis.com/colab_enterprise_entry_service": its value is
+   * either "bigquery" or "vertex"; if absent, it should be "vertex". This is to
+   * describe the entry service, either BigQuery or Vertex.
+   * 
+ * + * map<string, string> labels = 16; + */ + int getLabelsCount(); + /** + * + * + *
+   * The labels with user-defined metadata to organize your
+   * NotebookRuntime.
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one NotebookRuntime
+   * (System labels are excluded).
+   *
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+   * and are immutable. Following system labels exist for NotebookRuntime:
+   *
+   * * "aiplatform.googleapis.com/notebook_runtime_gce_instance_id": output
+   * only, its value is the Compute Engine instance id.
+   * * "aiplatform.googleapis.com/colab_enterprise_entry_service": its value is
+   * either "bigquery" or "vertex"; if absent, it should be "vertex". This is to
+   * describe the entry service, either BigQuery or Vertex.
+   * 
+ * + * map<string, string> labels = 16; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * The labels with user-defined metadata to organize your
+   * NotebookRuntime.
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one NotebookRuntime
+   * (System labels are excluded).
+   *
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+   * and are immutable. Following system labels exist for NotebookRuntime:
+   *
+   * * "aiplatform.googleapis.com/notebook_runtime_gce_instance_id": output
+   * only, its value is the Compute Engine instance id.
+   * * "aiplatform.googleapis.com/colab_enterprise_entry_service": its value is
+   * either "bigquery" or "vertex"; if absent, it should be "vertex". This is to
+   * describe the entry service, either BigQuery or Vertex.
+   * 
+ * + * map<string, string> labels = 16; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * The labels with user-defined metadata to organize your
+   * NotebookRuntime.
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one NotebookRuntime
+   * (System labels are excluded).
+   *
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+   * and are immutable. Following system labels exist for NotebookRuntime:
+   *
+   * * "aiplatform.googleapis.com/notebook_runtime_gce_instance_id": output
+   * only, its value is the Compute Engine instance id.
+   * * "aiplatform.googleapis.com/colab_enterprise_entry_service": its value is
+   * either "bigquery" or "vertex"; if absent, it should be "vertex". This is to
+   * describe the entry service, either BigQuery or Vertex.
+   * 
+ * + * map<string, string> labels = 16; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * The labels with user-defined metadata to organize your
+   * NotebookRuntime.
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one NotebookRuntime
+   * (System labels are excluded).
+   *
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+   * and are immutable. Following system labels exist for NotebookRuntime:
+   *
+   * * "aiplatform.googleapis.com/notebook_runtime_gce_instance_id": output
+   * only, its value is the Compute Engine instance id.
+   * * "aiplatform.googleapis.com/colab_enterprise_entry_service": its value is
+   * either "bigquery" or "vertex"; if absent, it should be "vertex". This is to
+   * describe the entry service, either BigQuery or Vertex.
+   * 
+ * + * map<string, string> labels = 16; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Output only. Timestamp when this NotebookRuntime will be expired:
+   * 1. System Predefined NotebookRuntime: 24 hours after creation. After
+   * expiration, system predifined runtime will be deleted.
+   * 2. User created NotebookRuntime: 6 months after last upgrade. After
+   * expiration, user created runtime will be stopped and allowed for upgrade.
+   * 
+ * + * + * .google.protobuf.Timestamp expiration_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the expirationTime field is set. + */ + boolean hasExpirationTime(); + /** + * + * + *
+   * Output only. Timestamp when this NotebookRuntime will be expired:
+   * 1. System Predefined NotebookRuntime: 24 hours after creation. After
+   * expiration, system predifined runtime will be deleted.
+   * 2. User created NotebookRuntime: 6 months after last upgrade. After
+   * expiration, user created runtime will be stopped and allowed for upgrade.
+   * 
+ * + * + * .google.protobuf.Timestamp expiration_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The expirationTime. + */ + com.google.protobuf.Timestamp getExpirationTime(); + /** + * + * + *
+   * Output only. Timestamp when this NotebookRuntime will be expired:
+   * 1. System Predefined NotebookRuntime: 24 hours after creation. After
+   * expiration, system predifined runtime will be deleted.
+   * 2. User created NotebookRuntime: 6 months after last upgrade. After
+   * expiration, user created runtime will be stopped and allowed for upgrade.
+   * 
+ * + * + * .google.protobuf.Timestamp expiration_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getExpirationTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The VM os image version of NotebookRuntime.
+   * 
+ * + * string version = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The version. + */ + java.lang.String getVersion(); + /** + * + * + *
+   * Output only. The VM os image version of NotebookRuntime.
+   * 
+ * + * string version = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for version. + */ + com.google.protobuf.ByteString getVersionBytes(); + + /** + * + * + *
+   * Output only. The type of the notebook runtime.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntimeType notebook_runtime_type = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for notebookRuntimeType. + */ + int getNotebookRuntimeTypeValue(); + /** + * + * + *
+   * Output only. The type of the notebook runtime.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntimeType notebook_runtime_type = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The notebookRuntimeType. + */ + com.google.cloud.aiplatform.v1.NotebookRuntimeType getNotebookRuntimeType(); + + /** + * + * + *
+   * Optional. The Compute Engine tags to add to runtime (see [Tagging
+   * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).
+   * 
+ * + * repeated string network_tags = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the networkTags. + */ + java.util.List getNetworkTagsList(); + /** + * + * + *
+   * Optional. The Compute Engine tags to add to runtime (see [Tagging
+   * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).
+   * 
+ * + * repeated string network_tags = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of networkTags. + */ + int getNetworkTagsCount(); + /** + * + * + *
+   * Optional. The Compute Engine tags to add to runtime (see [Tagging
+   * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).
+   * 
+ * + * repeated string network_tags = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The networkTags at the given index. + */ + java.lang.String getNetworkTags(int index); + /** + * + * + *
+   * Optional. The Compute Engine tags to add to runtime (see [Tagging
+   * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).
+   * 
+ * + * repeated string network_tags = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the networkTags at the given index. + */ + com.google.protobuf.ByteString getNetworkTagsBytes(int index); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NotebookRuntimeProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NotebookRuntimeProto.java new file mode 100644 index 000000000000..670318a359e7 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NotebookRuntimeProto.java @@ -0,0 +1,234 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/notebook_runtime.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +public final class NotebookRuntimeProto { + private NotebookRuntimeProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_NotebookRuntimeTemplate_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_NotebookRuntimeTemplate_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_NotebookRuntimeTemplate_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_NotebookRuntimeTemplate_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_NotebookRuntime_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_NotebookRuntime_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_NotebookRuntime_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_NotebookRuntime_LabelsEntry_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n1google/cloud/aiplatform/v1/notebook_ru" + + "ntime.proto\022\032google.cloud.aiplatform.v1\032" + + "\037google/api/field_behavior.proto\032\031google" + + "/api/resource.proto\0322google/cloud/aiplat" + + "form/v1/machine_resources.proto\032-google/" + + "cloud/aiplatform/v1/network_spec.proto\0324" + + "google/cloud/aiplatform/v1/notebook_euc_" + + "config.proto\032>google/cloud/aiplatform/v1" + + "/notebook_idle_shutdown_config.proto\032>go" + + "ogle/cloud/aiplatform/v1/notebook_runtim" + + "e_template_ref.proto\032\037google/protobuf/ti" + + "mestamp.proto\"\341\010\n\027NotebookRuntimeTemplat" + + "e\022\021\n\004name\030\001 \001(\tB\003\340A\003\022\031\n\014display_name\030\002 \001" + + "(\tB\003\340A\002\022\023\n\013description\030\003 \001(\t\022\027\n\nis_defau" + + "lt\030\004 \001(\010B\003\340A\003\022E\n\014machine_spec\030\005 \001(\0132\'.go" + + "ogle.cloud.aiplatform.v1.MachineSpecB\006\340A" + + "\001\340A\005\022V\n\031data_persistent_disk_spec\030\010 \001(\0132" + + "..google.cloud.aiplatform.v1.PersistentD" + + "iskSpecB\003\340A\001\022B\n\014network_spec\030\014 \001(\0132\'.goo" + + "gle.cloud.aiplatform.v1.NetworkSpecB\003\340A\001" + + "\022\027\n\017service_account\030\r \001(\t\022\014\n\004etag\030\016 \001(\t\022" + + "O\n\006labels\030\017 \003(\0132?.google.cloud.aiplatfor" + + "m.v1.NotebookRuntimeTemplate.LabelsEntry" + + "\022T\n\024idle_shutdown_config\030\021 \001(\01326.google." + + "cloud.aiplatform.v1.NotebookIdleShutdown" + + "Config\022A\n\neuc_config\030\022 \001(\0132-.google.clou" + + "d.aiplatform.v1.NotebookEucConfig\0224\n\013cre" + + "ate_time\030\n \001(\0132\032.google.protobuf.Timesta" + + "mpB\003\340A\003\0224\n\013update_time\030\013 \001(\0132\032.google.pr" + + "otobuf.TimestampB\003\340A\003\022V\n\025notebook_runtim" + + "e_type\030\023 \001(\0162/.google.cloud.aiplatform.v" + + "1.NotebookRuntimeTypeB\006\340A\001\340A\005\022P\n\022shielde" + + "d_vm_config\030\024 \001(\0132,.google.cloud.aiplatf" + + "orm.v1.ShieldedVmConfigB\006\340A\001\340A\005\022\031\n\014netwo" + + "rk_tags\030\025 \003(\tB\003\340A\001\032-\n\013LabelsEntry\022\013\n\003key" + + "\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:\225\001\352A\221\001\n1aiplat" + + "form.googleapis.com/NotebookRuntimeTempl" + + "ate\022\\projects/{project}/locations/{locat" + + "ion}/notebookRuntimeTemplates/{notebook_" + + "runtime_template}\"\325\t\n\017NotebookRuntime\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\003\022\031\n\014runtime_user\030\002 \001(\tB\003" + + "\340A\002\022b\n\035notebook_runtime_template_ref\030\003 \001" + + "(\01326.google.cloud.aiplatform.v1.Notebook" + + "RuntimeTemplateRefB\003\340A\003\022\026\n\tproxy_uri\030\005 \001" + + "(\tB\003\340A\003\0224\n\013create_time\030\006 \001(\0132\032.google.pr" + + "otobuf.TimestampB\003\340A\003\0224\n\013update_time\030\007 \001" + + "(\0132\032.google.protobuf.TimestampB\003\340A\003\022R\n\014h" + + "ealth_state\030\010 \001(\01627.google.cloud.aiplatf" + + "orm.v1.NotebookRuntime.HealthStateB\003\340A\003\022" + + "\031\n\014display_name\030\n \001(\tB\003\340A\002\022\023\n\013descriptio" + + "n\030\013 \001(\t\022\034\n\017service_account\030\r \001(\tB\003\340A\003\022T\n" + + "\rruntime_state\030\016 \001(\01628.google.cloud.aipl" + + "atform.v1.NotebookRuntime.RuntimeStateB\003" + + "\340A\003\022\032\n\ris_upgradable\030\017 \001(\010B\003\340A\003\022G\n\006label" + + "s\030\020 \003(\01327.google.cloud.aiplatform.v1.Not" + + "ebookRuntime.LabelsEntry\0228\n\017expiration_t" + + "ime\030\021 \001(\0132\032.google.protobuf.TimestampB\003\340" + + "A\003\022\024\n\007version\030\022 \001(\tB\003\340A\003\022S\n\025notebook_run" + + "time_type\030\023 \001(\0162/.google.cloud.aiplatfor" + + "m.v1.NotebookRuntimeTypeB\003\340A\003\022\031\n\014network" + + "_tags\030\031 \003(\tB\003\340A\001\032-\n\013LabelsEntry\022\013\n\003key\030\001" + + " \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"G\n\013HealthState\022\034" + + "\n\030HEALTH_STATE_UNSPECIFIED\020\000\022\013\n\007HEALTHY\020" + + "\001\022\r\n\tUNHEALTHY\020\002\"\231\001\n\014RuntimeState\022\035\n\031RUN" + + "TIME_STATE_UNSPECIFIED\020\000\022\013\n\007RUNNING\020\001\022\021\n" + + "\rBEING_STARTED\020\002\022\021\n\rBEING_STOPPED\020\003\022\013\n\007S" + + "TOPPED\020\004\022\022\n\016BEING_UPGRADED\020\005\022\t\n\005ERROR\020d\022" + + "\013\n\007INVALID\020e:{\352Ax\n)aiplatform.googleapis" + + ".com/NotebookRuntime\022Kprojects/{project}" + + "/locations/{location}/notebookRuntimes/{" + + "notebook_runtime}*]\n\023NotebookRuntimeType" + + "\022%\n!NOTEBOOK_RUNTIME_TYPE_UNSPECIFIED\020\000\022" + + "\020\n\014USER_DEFINED\020\001\022\r\n\tONE_CLICK\020\002B\322\001\n\036com" + + ".google.cloud.aiplatform.v1B\024NotebookRun" + + "timeProtoP\001Z>cloud.google.com/go/aiplatf" + + "orm/apiv1/aiplatformpb;aiplatformpb\252\002\032Go" + + "ogle.Cloud.AIPlatform.V1\312\002\032Google\\Cloud\\" + + "AIPlatform\\V1\352\002\035Google::Cloud::AIPlatfor" + + "m::V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.aiplatform.v1.MachineResourcesProto.getDescriptor(), + com.google.cloud.aiplatform.v1.NetworkSpecProto.getDescriptor(), + com.google.cloud.aiplatform.v1.NotebookEucConfigProto.getDescriptor(), + com.google.cloud.aiplatform.v1.NotebookIdleShutdownConfigProto.getDescriptor(), + com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateRefProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1_NotebookRuntimeTemplate_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1_NotebookRuntimeTemplate_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_NotebookRuntimeTemplate_descriptor, + new java.lang.String[] { + "Name", + "DisplayName", + "Description", + "IsDefault", + "MachineSpec", + "DataPersistentDiskSpec", + "NetworkSpec", + "ServiceAccount", + "Etag", + "Labels", + "IdleShutdownConfig", + "EucConfig", + "CreateTime", + "UpdateTime", + "NotebookRuntimeType", + "ShieldedVmConfig", + "NetworkTags", + }); + internal_static_google_cloud_aiplatform_v1_NotebookRuntimeTemplate_LabelsEntry_descriptor = + internal_static_google_cloud_aiplatform_v1_NotebookRuntimeTemplate_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_aiplatform_v1_NotebookRuntimeTemplate_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_NotebookRuntimeTemplate_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_aiplatform_v1_NotebookRuntime_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_aiplatform_v1_NotebookRuntime_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_NotebookRuntime_descriptor, + new java.lang.String[] { + "Name", + "RuntimeUser", + "NotebookRuntimeTemplateRef", + "ProxyUri", + "CreateTime", + "UpdateTime", + "HealthState", + "DisplayName", + "Description", + "ServiceAccount", + "RuntimeState", + "IsUpgradable", + "Labels", + "ExpirationTime", + "Version", + "NotebookRuntimeType", + "NetworkTags", + }); + internal_static_google_cloud_aiplatform_v1_NotebookRuntime_LabelsEntry_descriptor = + internal_static_google_cloud_aiplatform_v1_NotebookRuntime_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_aiplatform_v1_NotebookRuntime_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_NotebookRuntime_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.aiplatform.v1.MachineResourcesProto.getDescriptor(); + com.google.cloud.aiplatform.v1.NetworkSpecProto.getDescriptor(); + com.google.cloud.aiplatform.v1.NotebookEucConfigProto.getDescriptor(); + com.google.cloud.aiplatform.v1.NotebookIdleShutdownConfigProto.getDescriptor(); + com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateRefProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NotebookRuntimeTemplate.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NotebookRuntimeTemplate.java new file mode 100644 index 000000000000..bcfdbab39fe7 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NotebookRuntimeTemplate.java @@ -0,0 +1,4774 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/notebook_runtime.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * A template that specifies runtime configurations such as machine type,
+ * runtime version, network configurations, etc.
+ * Multiple runtimes can be created from a runtime template.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.NotebookRuntimeTemplate} + */ +public final class NotebookRuntimeTemplate extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.NotebookRuntimeTemplate) + NotebookRuntimeTemplateOrBuilder { + private static final long serialVersionUID = 0L; + // Use NotebookRuntimeTemplate.newBuilder() to construct. + private NotebookRuntimeTemplate(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private NotebookRuntimeTemplate() { + name_ = ""; + displayName_ = ""; + description_ = ""; + serviceAccount_ = ""; + etag_ = ""; + notebookRuntimeType_ = 0; + networkTags_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new NotebookRuntimeTemplate(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.NotebookRuntimeProto + .internal_static_google_cloud_aiplatform_v1_NotebookRuntimeTemplate_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 15: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.NotebookRuntimeProto + .internal_static_google_cloud_aiplatform_v1_NotebookRuntimeTemplate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate.class, + com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Output only. The resource name of the NotebookRuntimeTemplate.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The resource name of the NotebookRuntimeTemplate.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + /** + * + * + *
+   * Required. The display name of the NotebookRuntimeTemplate.
+   * The name can be up to 128 characters long and can consist of any UTF-8
+   * characters.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + 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(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The display name of the NotebookRuntimeTemplate.
+   * The name can be up to 128 characters long and can consist of any UTF-8
+   * characters.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + * + * + *
+   * The description of the NotebookRuntimeTemplate.
+   * 
+ * + * string description = 3; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + 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(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * The description of the NotebookRuntimeTemplate.
+   * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IS_DEFAULT_FIELD_NUMBER = 4; + private boolean isDefault_ = false; + /** + * + * + *
+   * Output only. The default template to use if not specified.
+   * 
+ * + * bool is_default = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The isDefault. + */ + @java.lang.Override + public boolean getIsDefault() { + return isDefault_; + } + + public static final int MACHINE_SPEC_FIELD_NUMBER = 5; + private com.google.cloud.aiplatform.v1.MachineSpec machineSpec_; + /** + * + * + *
+   * Optional. Immutable. The specification of a single machine for the
+   * template.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MachineSpec machine_spec = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the machineSpec field is set. + */ + @java.lang.Override + public boolean hasMachineSpec() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Optional. Immutable. The specification of a single machine for the
+   * template.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MachineSpec machine_spec = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The machineSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.MachineSpec getMachineSpec() { + return machineSpec_ == null + ? com.google.cloud.aiplatform.v1.MachineSpec.getDefaultInstance() + : machineSpec_; + } + /** + * + * + *
+   * Optional. Immutable. The specification of a single machine for the
+   * template.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MachineSpec machine_spec = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.MachineSpecOrBuilder getMachineSpecOrBuilder() { + return machineSpec_ == null + ? com.google.cloud.aiplatform.v1.MachineSpec.getDefaultInstance() + : machineSpec_; + } + + public static final int DATA_PERSISTENT_DISK_SPEC_FIELD_NUMBER = 8; + private com.google.cloud.aiplatform.v1.PersistentDiskSpec dataPersistentDiskSpec_; + /** + * + * + *
+   * Optional. The specification of [persistent
+   * disk][https://cloud.google.com/compute/docs/disks/persistent-disks]
+   * attached to the runtime as data disk storage.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.PersistentDiskSpec data_persistent_disk_spec = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the dataPersistentDiskSpec field is set. + */ + @java.lang.Override + public boolean hasDataPersistentDiskSpec() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Optional. The specification of [persistent
+   * disk][https://cloud.google.com/compute/docs/disks/persistent-disks]
+   * attached to the runtime as data disk storage.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.PersistentDiskSpec data_persistent_disk_spec = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The dataPersistentDiskSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.PersistentDiskSpec getDataPersistentDiskSpec() { + return dataPersistentDiskSpec_ == null + ? com.google.cloud.aiplatform.v1.PersistentDiskSpec.getDefaultInstance() + : dataPersistentDiskSpec_; + } + /** + * + * + *
+   * Optional. The specification of [persistent
+   * disk][https://cloud.google.com/compute/docs/disks/persistent-disks]
+   * attached to the runtime as data disk storage.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.PersistentDiskSpec data_persistent_disk_spec = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.PersistentDiskSpecOrBuilder + getDataPersistentDiskSpecOrBuilder() { + return dataPersistentDiskSpec_ == null + ? com.google.cloud.aiplatform.v1.PersistentDiskSpec.getDefaultInstance() + : dataPersistentDiskSpec_; + } + + public static final int NETWORK_SPEC_FIELD_NUMBER = 12; + private com.google.cloud.aiplatform.v1.NetworkSpec networkSpec_; + /** + * + * + *
+   * Optional. Network spec.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.NetworkSpec network_spec = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the networkSpec field is set. + */ + @java.lang.Override + public boolean hasNetworkSpec() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+   * Optional. Network spec.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.NetworkSpec network_spec = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The networkSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.NetworkSpec getNetworkSpec() { + return networkSpec_ == null + ? com.google.cloud.aiplatform.v1.NetworkSpec.getDefaultInstance() + : networkSpec_; + } + /** + * + * + *
+   * Optional. Network spec.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.NetworkSpec network_spec = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.NetworkSpecOrBuilder getNetworkSpecOrBuilder() { + return networkSpec_ == null + ? com.google.cloud.aiplatform.v1.NetworkSpec.getDefaultInstance() + : networkSpec_; + } + + public static final int SERVICE_ACCOUNT_FIELD_NUMBER = 13; + + @SuppressWarnings("serial") + private volatile java.lang.Object serviceAccount_ = ""; + /** + * + * + *
+   * The service account that the runtime workload runs as.
+   * You can use any service account within the same project, but you
+   * must have the service account user permission to use the instance.
+   *
+   * If not specified, the [Compute Engine default service
+   * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account)
+   * is used.
+   * 
+ * + * string service_account = 13; + * + * @return The serviceAccount. + */ + @java.lang.Override + public java.lang.String getServiceAccount() { + java.lang.Object ref = serviceAccount_; + 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(); + serviceAccount_ = s; + return s; + } + } + /** + * + * + *
+   * The service account that the runtime workload runs as.
+   * You can use any service account within the same project, but you
+   * must have the service account user permission to use the instance.
+   *
+   * If not specified, the [Compute Engine default service
+   * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account)
+   * is used.
+   * 
+ * + * string service_account = 13; + * + * @return The bytes for serviceAccount. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServiceAccountBytes() { + java.lang.Object ref = serviceAccount_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceAccount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ETAG_FIELD_NUMBER = 14; + + @SuppressWarnings("serial") + private volatile java.lang.Object etag_ = ""; + /** + * + * + *
+   * Used to perform consistent read-modify-write updates. If not set, a blind
+   * "overwrite" update happens.
+   * 
+ * + * string etag = 14; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + 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(); + etag_ = s; + return s; + } + } + /** + * + * + *
+   * Used to perform consistent read-modify-write updates. If not set, a blind
+   * "overwrite" update happens.
+   * 
+ * + * string etag = 14; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LABELS_FIELD_NUMBER = 15; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.aiplatform.v1.NotebookRuntimeProto + .internal_static_google_cloud_aiplatform_v1_NotebookRuntimeTemplate_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * The labels with user-defined metadata to organize the
+   * NotebookRuntimeTemplates.
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   *
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 15; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * The labels with user-defined metadata to organize the
+   * NotebookRuntimeTemplates.
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   *
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 15; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * The labels with user-defined metadata to organize the
+   * NotebookRuntimeTemplates.
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   *
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 15; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * The labels with user-defined metadata to organize the
+   * NotebookRuntimeTemplates.
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   *
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 15; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int IDLE_SHUTDOWN_CONFIG_FIELD_NUMBER = 17; + private com.google.cloud.aiplatform.v1.NotebookIdleShutdownConfig idleShutdownConfig_; + /** + * + * + *
+   * The idle shutdown configuration of NotebookRuntimeTemplate. This config
+   * will only be set when idle shutdown is enabled.
+   * 
+ * + * .google.cloud.aiplatform.v1.NotebookIdleShutdownConfig idle_shutdown_config = 17; + * + * @return Whether the idleShutdownConfig field is set. + */ + @java.lang.Override + public boolean hasIdleShutdownConfig() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+   * The idle shutdown configuration of NotebookRuntimeTemplate. This config
+   * will only be set when idle shutdown is enabled.
+   * 
+ * + * .google.cloud.aiplatform.v1.NotebookIdleShutdownConfig idle_shutdown_config = 17; + * + * @return The idleShutdownConfig. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.NotebookIdleShutdownConfig getIdleShutdownConfig() { + return idleShutdownConfig_ == null + ? com.google.cloud.aiplatform.v1.NotebookIdleShutdownConfig.getDefaultInstance() + : idleShutdownConfig_; + } + /** + * + * + *
+   * The idle shutdown configuration of NotebookRuntimeTemplate. This config
+   * will only be set when idle shutdown is enabled.
+   * 
+ * + * .google.cloud.aiplatform.v1.NotebookIdleShutdownConfig idle_shutdown_config = 17; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.NotebookIdleShutdownConfigOrBuilder + getIdleShutdownConfigOrBuilder() { + return idleShutdownConfig_ == null + ? com.google.cloud.aiplatform.v1.NotebookIdleShutdownConfig.getDefaultInstance() + : idleShutdownConfig_; + } + + public static final int EUC_CONFIG_FIELD_NUMBER = 18; + private com.google.cloud.aiplatform.v1.NotebookEucConfig eucConfig_; + /** + * + * + *
+   * EUC configuration of the NotebookRuntimeTemplate.
+   * 
+ * + * .google.cloud.aiplatform.v1.NotebookEucConfig euc_config = 18; + * + * @return Whether the eucConfig field is set. + */ + @java.lang.Override + public boolean hasEucConfig() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+   * EUC configuration of the NotebookRuntimeTemplate.
+   * 
+ * + * .google.cloud.aiplatform.v1.NotebookEucConfig euc_config = 18; + * + * @return The eucConfig. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.NotebookEucConfig getEucConfig() { + return eucConfig_ == null + ? com.google.cloud.aiplatform.v1.NotebookEucConfig.getDefaultInstance() + : eucConfig_; + } + /** + * + * + *
+   * EUC configuration of the NotebookRuntimeTemplate.
+   * 
+ * + * .google.cloud.aiplatform.v1.NotebookEucConfig euc_config = 18; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.NotebookEucConfigOrBuilder getEucConfigOrBuilder() { + return eucConfig_ == null + ? com.google.cloud.aiplatform.v1.NotebookEucConfig.getDefaultInstance() + : eucConfig_; + } + + public static final int CREATE_TIME_FIELD_NUMBER = 10; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. Timestamp when this NotebookRuntimeTemplate was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+   * Output only. Timestamp when this NotebookRuntimeTemplate was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. Timestamp when this NotebookRuntimeTemplate was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 11; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. Timestamp when this NotebookRuntimeTemplate was most recently
+   * updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+   * Output only. Timestamp when this NotebookRuntimeTemplate was most recently
+   * updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. Timestamp when this NotebookRuntimeTemplate was most recently
+   * updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int NOTEBOOK_RUNTIME_TYPE_FIELD_NUMBER = 19; + private int notebookRuntimeType_ = 0; + /** + * + * + *
+   * Optional. Immutable. The type of the notebook runtime template.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntimeType notebook_runtime_type = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The enum numeric value on the wire for notebookRuntimeType. + */ + @java.lang.Override + public int getNotebookRuntimeTypeValue() { + return notebookRuntimeType_; + } + /** + * + * + *
+   * Optional. Immutable. The type of the notebook runtime template.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntimeType notebook_runtime_type = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The notebookRuntimeType. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.NotebookRuntimeType getNotebookRuntimeType() { + com.google.cloud.aiplatform.v1.NotebookRuntimeType result = + com.google.cloud.aiplatform.v1.NotebookRuntimeType.forNumber(notebookRuntimeType_); + return result == null + ? com.google.cloud.aiplatform.v1.NotebookRuntimeType.UNRECOGNIZED + : result; + } + + public static final int SHIELDED_VM_CONFIG_FIELD_NUMBER = 20; + private com.google.cloud.aiplatform.v1.ShieldedVmConfig shieldedVmConfig_; + /** + * + * + *
+   * Optional. Immutable. Runtime Shielded VM spec.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ShieldedVmConfig shielded_vm_config = 20 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the shieldedVmConfig field is set. + */ + @java.lang.Override + public boolean hasShieldedVmConfig() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * + * + *
+   * Optional. Immutable. Runtime Shielded VM spec.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ShieldedVmConfig shielded_vm_config = 20 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The shieldedVmConfig. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ShieldedVmConfig getShieldedVmConfig() { + return shieldedVmConfig_ == null + ? com.google.cloud.aiplatform.v1.ShieldedVmConfig.getDefaultInstance() + : shieldedVmConfig_; + } + /** + * + * + *
+   * Optional. Immutable. Runtime Shielded VM spec.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ShieldedVmConfig shielded_vm_config = 20 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ShieldedVmConfigOrBuilder getShieldedVmConfigOrBuilder() { + return shieldedVmConfig_ == null + ? com.google.cloud.aiplatform.v1.ShieldedVmConfig.getDefaultInstance() + : shieldedVmConfig_; + } + + public static final int NETWORK_TAGS_FIELD_NUMBER = 21; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList networkTags_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Optional. The Compute Engine tags to add to runtime (see [Tagging
+   * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).
+   * 
+ * + * repeated string network_tags = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the networkTags. + */ + public com.google.protobuf.ProtocolStringList getNetworkTagsList() { + return networkTags_; + } + /** + * + * + *
+   * Optional. The Compute Engine tags to add to runtime (see [Tagging
+   * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).
+   * 
+ * + * repeated string network_tags = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of networkTags. + */ + public int getNetworkTagsCount() { + return networkTags_.size(); + } + /** + * + * + *
+   * Optional. The Compute Engine tags to add to runtime (see [Tagging
+   * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).
+   * 
+ * + * repeated string network_tags = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The networkTags at the given index. + */ + public java.lang.String getNetworkTags(int index) { + return networkTags_.get(index); + } + /** + * + * + *
+   * Optional. The Compute Engine tags to add to runtime (see [Tagging
+   * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).
+   * 
+ * + * repeated string network_tags = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the networkTags at the given index. + */ + public com.google.protobuf.ByteString getNetworkTagsBytes(int index) { + return networkTags_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + if (isDefault_ != false) { + output.writeBool(4, isDefault_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(5, getMachineSpec()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(8, getDataPersistentDiskSpec()); + } + if (((bitField0_ & 0x00000020) != 0)) { + output.writeMessage(10, getCreateTime()); + } + if (((bitField0_ & 0x00000040) != 0)) { + output.writeMessage(11, getUpdateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(12, getNetworkSpec()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccount_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 13, serviceAccount_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 14, etag_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 15); + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(17, getIdleShutdownConfig()); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeMessage(18, getEucConfig()); + } + if (notebookRuntimeType_ + != com.google.cloud.aiplatform.v1.NotebookRuntimeType.NOTEBOOK_RUNTIME_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(19, notebookRuntimeType_); + } + if (((bitField0_ & 0x00000080) != 0)) { + output.writeMessage(20, getShieldedVmConfig()); + } + for (int i = 0; i < networkTags_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 21, networkTags_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + if (isDefault_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, isDefault_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getMachineSpec()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(8, getDataPersistentDiskSpec()); + } + if (((bitField0_ & 0x00000020) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getCreateTime()); + } + if (((bitField0_ & 0x00000040) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getUpdateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getNetworkSpec()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccount_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, serviceAccount_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(14, etag_); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(15, labels__); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(17, getIdleShutdownConfig()); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(18, getEucConfig()); + } + if (notebookRuntimeType_ + != com.google.cloud.aiplatform.v1.NotebookRuntimeType.NOTEBOOK_RUNTIME_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(19, notebookRuntimeType_); + } + if (((bitField0_ & 0x00000080) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(20, getShieldedVmConfig()); + } + { + int dataSize = 0; + for (int i = 0; i < networkTags_.size(); i++) { + dataSize += computeStringSizeNoTag(networkTags_.getRaw(i)); + } + size += dataSize; + size += 2 * getNetworkTagsList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate other = + (com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (getIsDefault() != other.getIsDefault()) return false; + if (hasMachineSpec() != other.hasMachineSpec()) return false; + if (hasMachineSpec()) { + if (!getMachineSpec().equals(other.getMachineSpec())) return false; + } + if (hasDataPersistentDiskSpec() != other.hasDataPersistentDiskSpec()) return false; + if (hasDataPersistentDiskSpec()) { + if (!getDataPersistentDiskSpec().equals(other.getDataPersistentDiskSpec())) return false; + } + if (hasNetworkSpec() != other.hasNetworkSpec()) return false; + if (hasNetworkSpec()) { + if (!getNetworkSpec().equals(other.getNetworkSpec())) return false; + } + if (!getServiceAccount().equals(other.getServiceAccount())) return false; + if (!getEtag().equals(other.getEtag())) return false; + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (hasIdleShutdownConfig() != other.hasIdleShutdownConfig()) return false; + if (hasIdleShutdownConfig()) { + if (!getIdleShutdownConfig().equals(other.getIdleShutdownConfig())) return false; + } + if (hasEucConfig() != other.hasEucConfig()) return false; + if (hasEucConfig()) { + if (!getEucConfig().equals(other.getEucConfig())) return false; + } + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (notebookRuntimeType_ != other.notebookRuntimeType_) return false; + if (hasShieldedVmConfig() != other.hasShieldedVmConfig()) return false; + if (hasShieldedVmConfig()) { + if (!getShieldedVmConfig().equals(other.getShieldedVmConfig())) return false; + } + if (!getNetworkTagsList().equals(other.getNetworkTagsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + IS_DEFAULT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIsDefault()); + if (hasMachineSpec()) { + hash = (37 * hash) + MACHINE_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getMachineSpec().hashCode(); + } + if (hasDataPersistentDiskSpec()) { + hash = (37 * hash) + DATA_PERSISTENT_DISK_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getDataPersistentDiskSpec().hashCode(); + } + if (hasNetworkSpec()) { + hash = (37 * hash) + NETWORK_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getNetworkSpec().hashCode(); + } + hash = (37 * hash) + SERVICE_ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getServiceAccount().hashCode(); + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + if (hasIdleShutdownConfig()) { + hash = (37 * hash) + IDLE_SHUTDOWN_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getIdleShutdownConfig().hashCode(); + } + if (hasEucConfig()) { + hash = (37 * hash) + EUC_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getEucConfig().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (37 * hash) + NOTEBOOK_RUNTIME_TYPE_FIELD_NUMBER; + hash = (53 * hash) + notebookRuntimeType_; + if (hasShieldedVmConfig()) { + hash = (37 * hash) + SHIELDED_VM_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getShieldedVmConfig().hashCode(); + } + if (getNetworkTagsCount() > 0) { + hash = (37 * hash) + NETWORK_TAGS_FIELD_NUMBER; + hash = (53 * hash) + getNetworkTagsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A template that specifies runtime configurations such as machine type,
+   * runtime version, network configurations, etc.
+   * Multiple runtimes can be created from a runtime template.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.NotebookRuntimeTemplate} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.NotebookRuntimeTemplate) + com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.NotebookRuntimeProto + .internal_static_google_cloud_aiplatform_v1_NotebookRuntimeTemplate_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 15: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 15: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.NotebookRuntimeProto + .internal_static_google_cloud_aiplatform_v1_NotebookRuntimeTemplate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate.class, + com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getMachineSpecFieldBuilder(); + getDataPersistentDiskSpecFieldBuilder(); + getNetworkSpecFieldBuilder(); + getIdleShutdownConfigFieldBuilder(); + getEucConfigFieldBuilder(); + getCreateTimeFieldBuilder(); + getUpdateTimeFieldBuilder(); + getShieldedVmConfigFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + displayName_ = ""; + description_ = ""; + isDefault_ = false; + machineSpec_ = null; + if (machineSpecBuilder_ != null) { + machineSpecBuilder_.dispose(); + machineSpecBuilder_ = null; + } + dataPersistentDiskSpec_ = null; + if (dataPersistentDiskSpecBuilder_ != null) { + dataPersistentDiskSpecBuilder_.dispose(); + dataPersistentDiskSpecBuilder_ = null; + } + networkSpec_ = null; + if (networkSpecBuilder_ != null) { + networkSpecBuilder_.dispose(); + networkSpecBuilder_ = null; + } + serviceAccount_ = ""; + etag_ = ""; + internalGetMutableLabels().clear(); + idleShutdownConfig_ = null; + if (idleShutdownConfigBuilder_ != null) { + idleShutdownConfigBuilder_.dispose(); + idleShutdownConfigBuilder_ = null; + } + eucConfig_ = null; + if (eucConfigBuilder_ != null) { + eucConfigBuilder_.dispose(); + eucConfigBuilder_ = null; + } + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + notebookRuntimeType_ = 0; + shieldedVmConfig_ = null; + if (shieldedVmConfigBuilder_ != null) { + shieldedVmConfigBuilder_.dispose(); + shieldedVmConfigBuilder_ = null; + } + networkTags_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.NotebookRuntimeProto + .internal_static_google_cloud_aiplatform_v1_NotebookRuntimeTemplate_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate build() { + com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate buildPartial() { + com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate result = + new com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.isDefault_ = isDefault_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000010) != 0)) { + result.machineSpec_ = + machineSpecBuilder_ == null ? machineSpec_ : machineSpecBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.dataPersistentDiskSpec_ = + dataPersistentDiskSpecBuilder_ == null + ? dataPersistentDiskSpec_ + : dataPersistentDiskSpecBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.networkSpec_ = + networkSpecBuilder_ == null ? networkSpec_ : networkSpecBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.serviceAccount_ = serviceAccount_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.etag_ = etag_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.idleShutdownConfig_ = + idleShutdownConfigBuilder_ == null + ? idleShutdownConfig_ + : idleShutdownConfigBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.eucConfig_ = eucConfigBuilder_ == null ? eucConfig_ : eucConfigBuilder_.build(); + to_bitField0_ |= 0x00000010; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000020; + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000040; + } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.notebookRuntimeType_ = notebookRuntimeType_; + } + if (((from_bitField0_ & 0x00008000) != 0)) { + result.shieldedVmConfig_ = + shieldedVmConfigBuilder_ == null ? shieldedVmConfig_ : shieldedVmConfigBuilder_.build(); + to_bitField0_ |= 0x00000080; + } + if (((from_bitField0_ & 0x00010000) != 0)) { + networkTags_.makeImmutable(); + result.networkTags_ = networkTags_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate) { + return mergeFrom((com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate other) { + if (other == com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.getIsDefault() != false) { + setIsDefault(other.getIsDefault()); + } + if (other.hasMachineSpec()) { + mergeMachineSpec(other.getMachineSpec()); + } + if (other.hasDataPersistentDiskSpec()) { + mergeDataPersistentDiskSpec(other.getDataPersistentDiskSpec()); + } + if (other.hasNetworkSpec()) { + mergeNetworkSpec(other.getNetworkSpec()); + } + if (!other.getServiceAccount().isEmpty()) { + serviceAccount_ = other.serviceAccount_; + bitField0_ |= 0x00000080; + onChanged(); + } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + bitField0_ |= 0x00000100; + onChanged(); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000200; + if (other.hasIdleShutdownConfig()) { + mergeIdleShutdownConfig(other.getIdleShutdownConfig()); + } + if (other.hasEucConfig()) { + mergeEucConfig(other.getEucConfig()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.notebookRuntimeType_ != 0) { + setNotebookRuntimeTypeValue(other.getNotebookRuntimeTypeValue()); + } + if (other.hasShieldedVmConfig()) { + mergeShieldedVmConfig(other.getShieldedVmConfig()); + } + if (!other.networkTags_.isEmpty()) { + if (networkTags_.isEmpty()) { + networkTags_ = other.networkTags_; + bitField0_ |= 0x00010000; + } else { + ensureNetworkTagsIsMutable(); + networkTags_.addAll(other.networkTags_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + isDefault_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: + { + input.readMessage(getMachineSpecFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 66: + { + input.readMessage( + getDataPersistentDiskSpecFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 66 + case 82: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00001000; + break; + } // case 82 + case 90: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00002000; + break; + } // case 90 + case 98: + { + input.readMessage(getNetworkSpecFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 98 + case 106: + { + serviceAccount_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 106 + case 114: + { + etag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 114 + case 122: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000200; + break; + } // case 122 + case 138: + { + input.readMessage( + getIdleShutdownConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000400; + break; + } // case 138 + case 146: + { + input.readMessage(getEucConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000800; + break; + } // case 146 + case 152: + { + notebookRuntimeType_ = input.readEnum(); + bitField0_ |= 0x00004000; + break; + } // case 152 + case 162: + { + input.readMessage( + getShieldedVmConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00008000; + break; + } // case 162 + case 170: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureNetworkTagsIsMutable(); + networkTags_.add(s); + break; + } // case 170 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. The resource name of the NotebookRuntimeTemplate.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The resource name of the NotebookRuntimeTemplate.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The resource name of the NotebookRuntimeTemplate.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The resource name of the NotebookRuntimeTemplate.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The resource name of the NotebookRuntimeTemplate.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Required. The display name of the NotebookRuntimeTemplate.
+     * The name can be up to 128 characters long and can consist of any UTF-8
+     * characters.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The display name of the NotebookRuntimeTemplate.
+     * The name can be up to 128 characters long and can consist of any UTF-8
+     * characters.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The display name of the NotebookRuntimeTemplate.
+     * The name can be up to 128 characters long and can consist of any UTF-8
+     * characters.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The display name of the NotebookRuntimeTemplate.
+     * The name can be up to 128 characters long and can consist of any UTF-8
+     * characters.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The display name of the NotebookRuntimeTemplate.
+     * The name can be up to 128 characters long and can consist of any UTF-8
+     * characters.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * The description of the NotebookRuntimeTemplate.
+     * 
+ * + * string description = 3; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The description of the NotebookRuntimeTemplate.
+     * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The description of the NotebookRuntimeTemplate.
+     * 
+ * + * string description = 3; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The description of the NotebookRuntimeTemplate.
+     * 
+ * + * string description = 3; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * The description of the NotebookRuntimeTemplate.
+     * 
+ * + * string description = 3; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private boolean isDefault_; + /** + * + * + *
+     * Output only. The default template to use if not specified.
+     * 
+ * + * bool is_default = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The isDefault. + */ + @java.lang.Override + public boolean getIsDefault() { + return isDefault_; + } + /** + * + * + *
+     * Output only. The default template to use if not specified.
+     * 
+ * + * bool is_default = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The isDefault to set. + * @return This builder for chaining. + */ + public Builder setIsDefault(boolean value) { + + isDefault_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The default template to use if not specified.
+     * 
+ * + * bool is_default = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearIsDefault() { + bitField0_ = (bitField0_ & ~0x00000008); + isDefault_ = false; + onChanged(); + return this; + } + + private com.google.cloud.aiplatform.v1.MachineSpec machineSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.MachineSpec, + com.google.cloud.aiplatform.v1.MachineSpec.Builder, + com.google.cloud.aiplatform.v1.MachineSpecOrBuilder> + machineSpecBuilder_; + /** + * + * + *
+     * Optional. Immutable. The specification of a single machine for the
+     * template.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MachineSpec machine_spec = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the machineSpec field is set. + */ + public boolean hasMachineSpec() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * Optional. Immutable. The specification of a single machine for the
+     * template.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MachineSpec machine_spec = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The machineSpec. + */ + public com.google.cloud.aiplatform.v1.MachineSpec getMachineSpec() { + if (machineSpecBuilder_ == null) { + return machineSpec_ == null + ? com.google.cloud.aiplatform.v1.MachineSpec.getDefaultInstance() + : machineSpec_; + } else { + return machineSpecBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Immutable. The specification of a single machine for the
+     * template.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MachineSpec machine_spec = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder setMachineSpec(com.google.cloud.aiplatform.v1.MachineSpec value) { + if (machineSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + machineSpec_ = value; + } else { + machineSpecBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Immutable. The specification of a single machine for the
+     * template.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MachineSpec machine_spec = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder setMachineSpec( + com.google.cloud.aiplatform.v1.MachineSpec.Builder builderForValue) { + if (machineSpecBuilder_ == null) { + machineSpec_ = builderForValue.build(); + } else { + machineSpecBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Immutable. The specification of a single machine for the
+     * template.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MachineSpec machine_spec = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder mergeMachineSpec(com.google.cloud.aiplatform.v1.MachineSpec value) { + if (machineSpecBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && machineSpec_ != null + && machineSpec_ != com.google.cloud.aiplatform.v1.MachineSpec.getDefaultInstance()) { + getMachineSpecBuilder().mergeFrom(value); + } else { + machineSpec_ = value; + } + } else { + machineSpecBuilder_.mergeFrom(value); + } + if (machineSpec_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Optional. Immutable. The specification of a single machine for the
+     * template.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MachineSpec machine_spec = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder clearMachineSpec() { + bitField0_ = (bitField0_ & ~0x00000010); + machineSpec_ = null; + if (machineSpecBuilder_ != null) { + machineSpecBuilder_.dispose(); + machineSpecBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Immutable. The specification of a single machine for the
+     * template.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MachineSpec machine_spec = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public com.google.cloud.aiplatform.v1.MachineSpec.Builder getMachineSpecBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getMachineSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Immutable. The specification of a single machine for the
+     * template.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MachineSpec machine_spec = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public com.google.cloud.aiplatform.v1.MachineSpecOrBuilder getMachineSpecOrBuilder() { + if (machineSpecBuilder_ != null) { + return machineSpecBuilder_.getMessageOrBuilder(); + } else { + return machineSpec_ == null + ? com.google.cloud.aiplatform.v1.MachineSpec.getDefaultInstance() + : machineSpec_; + } + } + /** + * + * + *
+     * Optional. Immutable. The specification of a single machine for the
+     * template.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MachineSpec machine_spec = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.MachineSpec, + com.google.cloud.aiplatform.v1.MachineSpec.Builder, + com.google.cloud.aiplatform.v1.MachineSpecOrBuilder> + getMachineSpecFieldBuilder() { + if (machineSpecBuilder_ == null) { + machineSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.MachineSpec, + com.google.cloud.aiplatform.v1.MachineSpec.Builder, + com.google.cloud.aiplatform.v1.MachineSpecOrBuilder>( + getMachineSpec(), getParentForChildren(), isClean()); + machineSpec_ = null; + } + return machineSpecBuilder_; + } + + private com.google.cloud.aiplatform.v1.PersistentDiskSpec dataPersistentDiskSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.PersistentDiskSpec, + com.google.cloud.aiplatform.v1.PersistentDiskSpec.Builder, + com.google.cloud.aiplatform.v1.PersistentDiskSpecOrBuilder> + dataPersistentDiskSpecBuilder_; + /** + * + * + *
+     * Optional. The specification of [persistent
+     * disk][https://cloud.google.com/compute/docs/disks/persistent-disks]
+     * attached to the runtime as data disk storage.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.PersistentDiskSpec data_persistent_disk_spec = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the dataPersistentDiskSpec field is set. + */ + public boolean hasDataPersistentDiskSpec() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+     * Optional. The specification of [persistent
+     * disk][https://cloud.google.com/compute/docs/disks/persistent-disks]
+     * attached to the runtime as data disk storage.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.PersistentDiskSpec data_persistent_disk_spec = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The dataPersistentDiskSpec. + */ + public com.google.cloud.aiplatform.v1.PersistentDiskSpec getDataPersistentDiskSpec() { + if (dataPersistentDiskSpecBuilder_ == null) { + return dataPersistentDiskSpec_ == null + ? com.google.cloud.aiplatform.v1.PersistentDiskSpec.getDefaultInstance() + : dataPersistentDiskSpec_; + } else { + return dataPersistentDiskSpecBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. The specification of [persistent
+     * disk][https://cloud.google.com/compute/docs/disks/persistent-disks]
+     * attached to the runtime as data disk storage.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.PersistentDiskSpec data_persistent_disk_spec = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDataPersistentDiskSpec( + com.google.cloud.aiplatform.v1.PersistentDiskSpec value) { + if (dataPersistentDiskSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dataPersistentDiskSpec_ = value; + } else { + dataPersistentDiskSpecBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The specification of [persistent
+     * disk][https://cloud.google.com/compute/docs/disks/persistent-disks]
+     * attached to the runtime as data disk storage.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.PersistentDiskSpec data_persistent_disk_spec = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDataPersistentDiskSpec( + com.google.cloud.aiplatform.v1.PersistentDiskSpec.Builder builderForValue) { + if (dataPersistentDiskSpecBuilder_ == null) { + dataPersistentDiskSpec_ = builderForValue.build(); + } else { + dataPersistentDiskSpecBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The specification of [persistent
+     * disk][https://cloud.google.com/compute/docs/disks/persistent-disks]
+     * attached to the runtime as data disk storage.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.PersistentDiskSpec data_persistent_disk_spec = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeDataPersistentDiskSpec( + com.google.cloud.aiplatform.v1.PersistentDiskSpec value) { + if (dataPersistentDiskSpecBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && dataPersistentDiskSpec_ != null + && dataPersistentDiskSpec_ + != com.google.cloud.aiplatform.v1.PersistentDiskSpec.getDefaultInstance()) { + getDataPersistentDiskSpecBuilder().mergeFrom(value); + } else { + dataPersistentDiskSpec_ = value; + } + } else { + dataPersistentDiskSpecBuilder_.mergeFrom(value); + } + if (dataPersistentDiskSpec_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Optional. The specification of [persistent
+     * disk][https://cloud.google.com/compute/docs/disks/persistent-disks]
+     * attached to the runtime as data disk storage.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.PersistentDiskSpec data_persistent_disk_spec = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearDataPersistentDiskSpec() { + bitField0_ = (bitField0_ & ~0x00000020); + dataPersistentDiskSpec_ = null; + if (dataPersistentDiskSpecBuilder_ != null) { + dataPersistentDiskSpecBuilder_.dispose(); + dataPersistentDiskSpecBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The specification of [persistent
+     * disk][https://cloud.google.com/compute/docs/disks/persistent-disks]
+     * attached to the runtime as data disk storage.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.PersistentDiskSpec data_persistent_disk_spec = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1.PersistentDiskSpec.Builder + getDataPersistentDiskSpecBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getDataPersistentDiskSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The specification of [persistent
+     * disk][https://cloud.google.com/compute/docs/disks/persistent-disks]
+     * attached to the runtime as data disk storage.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.PersistentDiskSpec data_persistent_disk_spec = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1.PersistentDiskSpecOrBuilder + getDataPersistentDiskSpecOrBuilder() { + if (dataPersistentDiskSpecBuilder_ != null) { + return dataPersistentDiskSpecBuilder_.getMessageOrBuilder(); + } else { + return dataPersistentDiskSpec_ == null + ? com.google.cloud.aiplatform.v1.PersistentDiskSpec.getDefaultInstance() + : dataPersistentDiskSpec_; + } + } + /** + * + * + *
+     * Optional. The specification of [persistent
+     * disk][https://cloud.google.com/compute/docs/disks/persistent-disks]
+     * attached to the runtime as data disk storage.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.PersistentDiskSpec data_persistent_disk_spec = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.PersistentDiskSpec, + com.google.cloud.aiplatform.v1.PersistentDiskSpec.Builder, + com.google.cloud.aiplatform.v1.PersistentDiskSpecOrBuilder> + getDataPersistentDiskSpecFieldBuilder() { + if (dataPersistentDiskSpecBuilder_ == null) { + dataPersistentDiskSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.PersistentDiskSpec, + com.google.cloud.aiplatform.v1.PersistentDiskSpec.Builder, + com.google.cloud.aiplatform.v1.PersistentDiskSpecOrBuilder>( + getDataPersistentDiskSpec(), getParentForChildren(), isClean()); + dataPersistentDiskSpec_ = null; + } + return dataPersistentDiskSpecBuilder_; + } + + private com.google.cloud.aiplatform.v1.NetworkSpec networkSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.NetworkSpec, + com.google.cloud.aiplatform.v1.NetworkSpec.Builder, + com.google.cloud.aiplatform.v1.NetworkSpecOrBuilder> + networkSpecBuilder_; + /** + * + * + *
+     * Optional. Network spec.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NetworkSpec network_spec = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the networkSpec field is set. + */ + public boolean hasNetworkSpec() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+     * Optional. Network spec.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NetworkSpec network_spec = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The networkSpec. + */ + public com.google.cloud.aiplatform.v1.NetworkSpec getNetworkSpec() { + if (networkSpecBuilder_ == null) { + return networkSpec_ == null + ? com.google.cloud.aiplatform.v1.NetworkSpec.getDefaultInstance() + : networkSpec_; + } else { + return networkSpecBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Network spec.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NetworkSpec network_spec = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setNetworkSpec(com.google.cloud.aiplatform.v1.NetworkSpec value) { + if (networkSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + networkSpec_ = value; + } else { + networkSpecBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Network spec.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NetworkSpec network_spec = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setNetworkSpec( + com.google.cloud.aiplatform.v1.NetworkSpec.Builder builderForValue) { + if (networkSpecBuilder_ == null) { + networkSpec_ = builderForValue.build(); + } else { + networkSpecBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Network spec.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NetworkSpec network_spec = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeNetworkSpec(com.google.cloud.aiplatform.v1.NetworkSpec value) { + if (networkSpecBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && networkSpec_ != null + && networkSpec_ != com.google.cloud.aiplatform.v1.NetworkSpec.getDefaultInstance()) { + getNetworkSpecBuilder().mergeFrom(value); + } else { + networkSpec_ = value; + } + } else { + networkSpecBuilder_.mergeFrom(value); + } + if (networkSpec_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Optional. Network spec.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NetworkSpec network_spec = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearNetworkSpec() { + bitField0_ = (bitField0_ & ~0x00000040); + networkSpec_ = null; + if (networkSpecBuilder_ != null) { + networkSpecBuilder_.dispose(); + networkSpecBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Network spec.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NetworkSpec network_spec = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1.NetworkSpec.Builder getNetworkSpecBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getNetworkSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Network spec.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NetworkSpec network_spec = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1.NetworkSpecOrBuilder getNetworkSpecOrBuilder() { + if (networkSpecBuilder_ != null) { + return networkSpecBuilder_.getMessageOrBuilder(); + } else { + return networkSpec_ == null + ? com.google.cloud.aiplatform.v1.NetworkSpec.getDefaultInstance() + : networkSpec_; + } + } + /** + * + * + *
+     * Optional. Network spec.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NetworkSpec network_spec = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.NetworkSpec, + com.google.cloud.aiplatform.v1.NetworkSpec.Builder, + com.google.cloud.aiplatform.v1.NetworkSpecOrBuilder> + getNetworkSpecFieldBuilder() { + if (networkSpecBuilder_ == null) { + networkSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.NetworkSpec, + com.google.cloud.aiplatform.v1.NetworkSpec.Builder, + com.google.cloud.aiplatform.v1.NetworkSpecOrBuilder>( + getNetworkSpec(), getParentForChildren(), isClean()); + networkSpec_ = null; + } + return networkSpecBuilder_; + } + + private java.lang.Object serviceAccount_ = ""; + /** + * + * + *
+     * The service account that the runtime workload runs as.
+     * You can use any service account within the same project, but you
+     * must have the service account user permission to use the instance.
+     *
+     * If not specified, the [Compute Engine default service
+     * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account)
+     * is used.
+     * 
+ * + * string service_account = 13; + * + * @return The serviceAccount. + */ + public java.lang.String getServiceAccount() { + java.lang.Object ref = serviceAccount_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceAccount_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The service account that the runtime workload runs as.
+     * You can use any service account within the same project, but you
+     * must have the service account user permission to use the instance.
+     *
+     * If not specified, the [Compute Engine default service
+     * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account)
+     * is used.
+     * 
+ * + * string service_account = 13; + * + * @return The bytes for serviceAccount. + */ + public com.google.protobuf.ByteString getServiceAccountBytes() { + java.lang.Object ref = serviceAccount_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceAccount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The service account that the runtime workload runs as.
+     * You can use any service account within the same project, but you
+     * must have the service account user permission to use the instance.
+     *
+     * If not specified, the [Compute Engine default service
+     * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account)
+     * is used.
+     * 
+ * + * string service_account = 13; + * + * @param value The serviceAccount to set. + * @return This builder for chaining. + */ + public Builder setServiceAccount(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + serviceAccount_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * The service account that the runtime workload runs as.
+     * You can use any service account within the same project, but you
+     * must have the service account user permission to use the instance.
+     *
+     * If not specified, the [Compute Engine default service
+     * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account)
+     * is used.
+     * 
+ * + * string service_account = 13; + * + * @return This builder for chaining. + */ + public Builder clearServiceAccount() { + serviceAccount_ = getDefaultInstance().getServiceAccount(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + /** + * + * + *
+     * The service account that the runtime workload runs as.
+     * You can use any service account within the same project, but you
+     * must have the service account user permission to use the instance.
+     *
+     * If not specified, the [Compute Engine default service
+     * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account)
+     * is used.
+     * 
+ * + * string service_account = 13; + * + * @param value The bytes for serviceAccount to set. + * @return This builder for chaining. + */ + public Builder setServiceAccountBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + serviceAccount_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + private java.lang.Object etag_ = ""; + /** + * + * + *
+     * Used to perform consistent read-modify-write updates. If not set, a blind
+     * "overwrite" update happens.
+     * 
+ * + * string etag = 14; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Used to perform consistent read-modify-write updates. If not set, a blind
+     * "overwrite" update happens.
+     * 
+ * + * string etag = 14; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Used to perform consistent read-modify-write updates. If not set, a blind
+     * "overwrite" update happens.
+     * 
+ * + * string etag = 14; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + etag_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Used to perform consistent read-modify-write updates. If not set, a blind
+     * "overwrite" update happens.
+     * 
+ * + * string etag = 14; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + etag_ = getDefaultInstance().getEtag(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + /** + * + * + *
+     * Used to perform consistent read-modify-write updates. If not set, a blind
+     * "overwrite" update happens.
+     * 
+ * + * string etag = 14; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + etag_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000200; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * The labels with user-defined metadata to organize the
+     * NotebookRuntimeTemplates.
+     *
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     *
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * 
+ * + * map<string, string> labels = 15; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * The labels with user-defined metadata to organize the
+     * NotebookRuntimeTemplates.
+     *
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     *
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * 
+ * + * map<string, string> labels = 15; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * The labels with user-defined metadata to organize the
+     * NotebookRuntimeTemplates.
+     *
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     *
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * 
+ * + * map<string, string> labels = 15; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * The labels with user-defined metadata to organize the
+     * NotebookRuntimeTemplates.
+     *
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     *
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * 
+ * + * map<string, string> labels = 15; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000200); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * The labels with user-defined metadata to organize the
+     * NotebookRuntimeTemplates.
+     *
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     *
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * 
+ * + * map<string, string> labels = 15; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + bitField0_ |= 0x00000200; + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * The labels with user-defined metadata to organize the
+     * NotebookRuntimeTemplates.
+     *
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     *
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * 
+ * + * map<string, string> labels = 15; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00000200; + return this; + } + /** + * + * + *
+     * The labels with user-defined metadata to organize the
+     * NotebookRuntimeTemplates.
+     *
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     *
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * 
+ * + * map<string, string> labels = 15; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000200; + return this; + } + + private com.google.cloud.aiplatform.v1.NotebookIdleShutdownConfig idleShutdownConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.NotebookIdleShutdownConfig, + com.google.cloud.aiplatform.v1.NotebookIdleShutdownConfig.Builder, + com.google.cloud.aiplatform.v1.NotebookIdleShutdownConfigOrBuilder> + idleShutdownConfigBuilder_; + /** + * + * + *
+     * The idle shutdown configuration of NotebookRuntimeTemplate. This config
+     * will only be set when idle shutdown is enabled.
+     * 
+ * + * .google.cloud.aiplatform.v1.NotebookIdleShutdownConfig idle_shutdown_config = 17; + * + * + * @return Whether the idleShutdownConfig field is set. + */ + public boolean hasIdleShutdownConfig() { + return ((bitField0_ & 0x00000400) != 0); + } + /** + * + * + *
+     * The idle shutdown configuration of NotebookRuntimeTemplate. This config
+     * will only be set when idle shutdown is enabled.
+     * 
+ * + * .google.cloud.aiplatform.v1.NotebookIdleShutdownConfig idle_shutdown_config = 17; + * + * + * @return The idleShutdownConfig. + */ + public com.google.cloud.aiplatform.v1.NotebookIdleShutdownConfig getIdleShutdownConfig() { + if (idleShutdownConfigBuilder_ == null) { + return idleShutdownConfig_ == null + ? com.google.cloud.aiplatform.v1.NotebookIdleShutdownConfig.getDefaultInstance() + : idleShutdownConfig_; + } else { + return idleShutdownConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The idle shutdown configuration of NotebookRuntimeTemplate. This config
+     * will only be set when idle shutdown is enabled.
+     * 
+ * + * .google.cloud.aiplatform.v1.NotebookIdleShutdownConfig idle_shutdown_config = 17; + * + */ + public Builder setIdleShutdownConfig( + com.google.cloud.aiplatform.v1.NotebookIdleShutdownConfig value) { + if (idleShutdownConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + idleShutdownConfig_ = value; + } else { + idleShutdownConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * The idle shutdown configuration of NotebookRuntimeTemplate. This config
+     * will only be set when idle shutdown is enabled.
+     * 
+ * + * .google.cloud.aiplatform.v1.NotebookIdleShutdownConfig idle_shutdown_config = 17; + * + */ + public Builder setIdleShutdownConfig( + com.google.cloud.aiplatform.v1.NotebookIdleShutdownConfig.Builder builderForValue) { + if (idleShutdownConfigBuilder_ == null) { + idleShutdownConfig_ = builderForValue.build(); + } else { + idleShutdownConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * The idle shutdown configuration of NotebookRuntimeTemplate. This config
+     * will only be set when idle shutdown is enabled.
+     * 
+ * + * .google.cloud.aiplatform.v1.NotebookIdleShutdownConfig idle_shutdown_config = 17; + * + */ + public Builder mergeIdleShutdownConfig( + com.google.cloud.aiplatform.v1.NotebookIdleShutdownConfig value) { + if (idleShutdownConfigBuilder_ == null) { + if (((bitField0_ & 0x00000400) != 0) + && idleShutdownConfig_ != null + && idleShutdownConfig_ + != com.google.cloud.aiplatform.v1.NotebookIdleShutdownConfig.getDefaultInstance()) { + getIdleShutdownConfigBuilder().mergeFrom(value); + } else { + idleShutdownConfig_ = value; + } + } else { + idleShutdownConfigBuilder_.mergeFrom(value); + } + if (idleShutdownConfig_ != null) { + bitField0_ |= 0x00000400; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The idle shutdown configuration of NotebookRuntimeTemplate. This config
+     * will only be set when idle shutdown is enabled.
+     * 
+ * + * .google.cloud.aiplatform.v1.NotebookIdleShutdownConfig idle_shutdown_config = 17; + * + */ + public Builder clearIdleShutdownConfig() { + bitField0_ = (bitField0_ & ~0x00000400); + idleShutdownConfig_ = null; + if (idleShutdownConfigBuilder_ != null) { + idleShutdownConfigBuilder_.dispose(); + idleShutdownConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The idle shutdown configuration of NotebookRuntimeTemplate. This config
+     * will only be set when idle shutdown is enabled.
+     * 
+ * + * .google.cloud.aiplatform.v1.NotebookIdleShutdownConfig idle_shutdown_config = 17; + * + */ + public com.google.cloud.aiplatform.v1.NotebookIdleShutdownConfig.Builder + getIdleShutdownConfigBuilder() { + bitField0_ |= 0x00000400; + onChanged(); + return getIdleShutdownConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The idle shutdown configuration of NotebookRuntimeTemplate. This config
+     * will only be set when idle shutdown is enabled.
+     * 
+ * + * .google.cloud.aiplatform.v1.NotebookIdleShutdownConfig idle_shutdown_config = 17; + * + */ + public com.google.cloud.aiplatform.v1.NotebookIdleShutdownConfigOrBuilder + getIdleShutdownConfigOrBuilder() { + if (idleShutdownConfigBuilder_ != null) { + return idleShutdownConfigBuilder_.getMessageOrBuilder(); + } else { + return idleShutdownConfig_ == null + ? com.google.cloud.aiplatform.v1.NotebookIdleShutdownConfig.getDefaultInstance() + : idleShutdownConfig_; + } + } + /** + * + * + *
+     * The idle shutdown configuration of NotebookRuntimeTemplate. This config
+     * will only be set when idle shutdown is enabled.
+     * 
+ * + * .google.cloud.aiplatform.v1.NotebookIdleShutdownConfig idle_shutdown_config = 17; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.NotebookIdleShutdownConfig, + com.google.cloud.aiplatform.v1.NotebookIdleShutdownConfig.Builder, + com.google.cloud.aiplatform.v1.NotebookIdleShutdownConfigOrBuilder> + getIdleShutdownConfigFieldBuilder() { + if (idleShutdownConfigBuilder_ == null) { + idleShutdownConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.NotebookIdleShutdownConfig, + com.google.cloud.aiplatform.v1.NotebookIdleShutdownConfig.Builder, + com.google.cloud.aiplatform.v1.NotebookIdleShutdownConfigOrBuilder>( + getIdleShutdownConfig(), getParentForChildren(), isClean()); + idleShutdownConfig_ = null; + } + return idleShutdownConfigBuilder_; + } + + private com.google.cloud.aiplatform.v1.NotebookEucConfig eucConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.NotebookEucConfig, + com.google.cloud.aiplatform.v1.NotebookEucConfig.Builder, + com.google.cloud.aiplatform.v1.NotebookEucConfigOrBuilder> + eucConfigBuilder_; + /** + * + * + *
+     * EUC configuration of the NotebookRuntimeTemplate.
+     * 
+ * + * .google.cloud.aiplatform.v1.NotebookEucConfig euc_config = 18; + * + * @return Whether the eucConfig field is set. + */ + public boolean hasEucConfig() { + return ((bitField0_ & 0x00000800) != 0); + } + /** + * + * + *
+     * EUC configuration of the NotebookRuntimeTemplate.
+     * 
+ * + * .google.cloud.aiplatform.v1.NotebookEucConfig euc_config = 18; + * + * @return The eucConfig. + */ + public com.google.cloud.aiplatform.v1.NotebookEucConfig getEucConfig() { + if (eucConfigBuilder_ == null) { + return eucConfig_ == null + ? com.google.cloud.aiplatform.v1.NotebookEucConfig.getDefaultInstance() + : eucConfig_; + } else { + return eucConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * EUC configuration of the NotebookRuntimeTemplate.
+     * 
+ * + * .google.cloud.aiplatform.v1.NotebookEucConfig euc_config = 18; + */ + public Builder setEucConfig(com.google.cloud.aiplatform.v1.NotebookEucConfig value) { + if (eucConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + eucConfig_ = value; + } else { + eucConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+     * EUC configuration of the NotebookRuntimeTemplate.
+     * 
+ * + * .google.cloud.aiplatform.v1.NotebookEucConfig euc_config = 18; + */ + public Builder setEucConfig( + com.google.cloud.aiplatform.v1.NotebookEucConfig.Builder builderForValue) { + if (eucConfigBuilder_ == null) { + eucConfig_ = builderForValue.build(); + } else { + eucConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+     * EUC configuration of the NotebookRuntimeTemplate.
+     * 
+ * + * .google.cloud.aiplatform.v1.NotebookEucConfig euc_config = 18; + */ + public Builder mergeEucConfig(com.google.cloud.aiplatform.v1.NotebookEucConfig value) { + if (eucConfigBuilder_ == null) { + if (((bitField0_ & 0x00000800) != 0) + && eucConfig_ != null + && eucConfig_ + != com.google.cloud.aiplatform.v1.NotebookEucConfig.getDefaultInstance()) { + getEucConfigBuilder().mergeFrom(value); + } else { + eucConfig_ = value; + } + } else { + eucConfigBuilder_.mergeFrom(value); + } + if (eucConfig_ != null) { + bitField0_ |= 0x00000800; + onChanged(); + } + return this; + } + /** + * + * + *
+     * EUC configuration of the NotebookRuntimeTemplate.
+     * 
+ * + * .google.cloud.aiplatform.v1.NotebookEucConfig euc_config = 18; + */ + public Builder clearEucConfig() { + bitField0_ = (bitField0_ & ~0x00000800); + eucConfig_ = null; + if (eucConfigBuilder_ != null) { + eucConfigBuilder_.dispose(); + eucConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * EUC configuration of the NotebookRuntimeTemplate.
+     * 
+ * + * .google.cloud.aiplatform.v1.NotebookEucConfig euc_config = 18; + */ + public com.google.cloud.aiplatform.v1.NotebookEucConfig.Builder getEucConfigBuilder() { + bitField0_ |= 0x00000800; + onChanged(); + return getEucConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * EUC configuration of the NotebookRuntimeTemplate.
+     * 
+ * + * .google.cloud.aiplatform.v1.NotebookEucConfig euc_config = 18; + */ + public com.google.cloud.aiplatform.v1.NotebookEucConfigOrBuilder getEucConfigOrBuilder() { + if (eucConfigBuilder_ != null) { + return eucConfigBuilder_.getMessageOrBuilder(); + } else { + return eucConfig_ == null + ? com.google.cloud.aiplatform.v1.NotebookEucConfig.getDefaultInstance() + : eucConfig_; + } + } + /** + * + * + *
+     * EUC configuration of the NotebookRuntimeTemplate.
+     * 
+ * + * .google.cloud.aiplatform.v1.NotebookEucConfig euc_config = 18; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.NotebookEucConfig, + com.google.cloud.aiplatform.v1.NotebookEucConfig.Builder, + com.google.cloud.aiplatform.v1.NotebookEucConfigOrBuilder> + getEucConfigFieldBuilder() { + if (eucConfigBuilder_ == null) { + eucConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.NotebookEucConfig, + com.google.cloud.aiplatform.v1.NotebookEucConfig.Builder, + com.google.cloud.aiplatform.v1.NotebookEucConfigOrBuilder>( + getEucConfig(), getParentForChildren(), isClean()); + eucConfig_ = null; + } + return eucConfigBuilder_; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntimeTemplate was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00001000) != 0); + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntimeTemplate was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntimeTemplate was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntimeTemplate was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntimeTemplate was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00001000) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00001000; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntimeTemplate was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00001000); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntimeTemplate was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00001000; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntimeTemplate was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntimeTemplate was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntimeTemplate was most recently
+     * updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00002000) != 0); + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntimeTemplate was most recently
+     * updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntimeTemplate was most recently
+     * updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntimeTemplate was most recently
+     * updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntimeTemplate was most recently
+     * updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00002000) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00002000; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntimeTemplate was most recently
+     * updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00002000); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntimeTemplate was most recently
+     * updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00002000; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntimeTemplate was most recently
+     * updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntimeTemplate was most recently
+     * updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private int notebookRuntimeType_ = 0; + /** + * + * + *
+     * Optional. Immutable. The type of the notebook runtime template.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntimeType notebook_runtime_type = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The enum numeric value on the wire for notebookRuntimeType. + */ + @java.lang.Override + public int getNotebookRuntimeTypeValue() { + return notebookRuntimeType_; + } + /** + * + * + *
+     * Optional. Immutable. The type of the notebook runtime template.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntimeType notebook_runtime_type = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The enum numeric value on the wire for notebookRuntimeType to set. + * @return This builder for chaining. + */ + public Builder setNotebookRuntimeTypeValue(int value) { + notebookRuntimeType_ = value; + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Immutable. The type of the notebook runtime template.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntimeType notebook_runtime_type = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The notebookRuntimeType. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.NotebookRuntimeType getNotebookRuntimeType() { + com.google.cloud.aiplatform.v1.NotebookRuntimeType result = + com.google.cloud.aiplatform.v1.NotebookRuntimeType.forNumber(notebookRuntimeType_); + return result == null + ? com.google.cloud.aiplatform.v1.NotebookRuntimeType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Optional. Immutable. The type of the notebook runtime template.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntimeType notebook_runtime_type = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The notebookRuntimeType to set. + * @return This builder for chaining. + */ + public Builder setNotebookRuntimeType( + com.google.cloud.aiplatform.v1.NotebookRuntimeType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00004000; + notebookRuntimeType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Immutable. The type of the notebook runtime template.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntimeType notebook_runtime_type = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return This builder for chaining. + */ + public Builder clearNotebookRuntimeType() { + bitField0_ = (bitField0_ & ~0x00004000); + notebookRuntimeType_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.aiplatform.v1.ShieldedVmConfig shieldedVmConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.ShieldedVmConfig, + com.google.cloud.aiplatform.v1.ShieldedVmConfig.Builder, + com.google.cloud.aiplatform.v1.ShieldedVmConfigOrBuilder> + shieldedVmConfigBuilder_; + /** + * + * + *
+     * Optional. Immutable. Runtime Shielded VM spec.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ShieldedVmConfig shielded_vm_config = 20 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the shieldedVmConfig field is set. + */ + public boolean hasShieldedVmConfig() { + return ((bitField0_ & 0x00008000) != 0); + } + /** + * + * + *
+     * Optional. Immutable. Runtime Shielded VM spec.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ShieldedVmConfig shielded_vm_config = 20 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The shieldedVmConfig. + */ + public com.google.cloud.aiplatform.v1.ShieldedVmConfig getShieldedVmConfig() { + if (shieldedVmConfigBuilder_ == null) { + return shieldedVmConfig_ == null + ? com.google.cloud.aiplatform.v1.ShieldedVmConfig.getDefaultInstance() + : shieldedVmConfig_; + } else { + return shieldedVmConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Immutable. Runtime Shielded VM spec.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ShieldedVmConfig shielded_vm_config = 20 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder setShieldedVmConfig(com.google.cloud.aiplatform.v1.ShieldedVmConfig value) { + if (shieldedVmConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + shieldedVmConfig_ = value; + } else { + shieldedVmConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Immutable. Runtime Shielded VM spec.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ShieldedVmConfig shielded_vm_config = 20 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder setShieldedVmConfig( + com.google.cloud.aiplatform.v1.ShieldedVmConfig.Builder builderForValue) { + if (shieldedVmConfigBuilder_ == null) { + shieldedVmConfig_ = builderForValue.build(); + } else { + shieldedVmConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Immutable. Runtime Shielded VM spec.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ShieldedVmConfig shielded_vm_config = 20 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder mergeShieldedVmConfig(com.google.cloud.aiplatform.v1.ShieldedVmConfig value) { + if (shieldedVmConfigBuilder_ == null) { + if (((bitField0_ & 0x00008000) != 0) + && shieldedVmConfig_ != null + && shieldedVmConfig_ + != com.google.cloud.aiplatform.v1.ShieldedVmConfig.getDefaultInstance()) { + getShieldedVmConfigBuilder().mergeFrom(value); + } else { + shieldedVmConfig_ = value; + } + } else { + shieldedVmConfigBuilder_.mergeFrom(value); + } + if (shieldedVmConfig_ != null) { + bitField0_ |= 0x00008000; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Optional. Immutable. Runtime Shielded VM spec.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ShieldedVmConfig shielded_vm_config = 20 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder clearShieldedVmConfig() { + bitField0_ = (bitField0_ & ~0x00008000); + shieldedVmConfig_ = null; + if (shieldedVmConfigBuilder_ != null) { + shieldedVmConfigBuilder_.dispose(); + shieldedVmConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Immutable. Runtime Shielded VM spec.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ShieldedVmConfig shielded_vm_config = 20 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public com.google.cloud.aiplatform.v1.ShieldedVmConfig.Builder getShieldedVmConfigBuilder() { + bitField0_ |= 0x00008000; + onChanged(); + return getShieldedVmConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Immutable. Runtime Shielded VM spec.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ShieldedVmConfig shielded_vm_config = 20 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public com.google.cloud.aiplatform.v1.ShieldedVmConfigOrBuilder getShieldedVmConfigOrBuilder() { + if (shieldedVmConfigBuilder_ != null) { + return shieldedVmConfigBuilder_.getMessageOrBuilder(); + } else { + return shieldedVmConfig_ == null + ? com.google.cloud.aiplatform.v1.ShieldedVmConfig.getDefaultInstance() + : shieldedVmConfig_; + } + } + /** + * + * + *
+     * Optional. Immutable. Runtime Shielded VM spec.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ShieldedVmConfig shielded_vm_config = 20 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.ShieldedVmConfig, + com.google.cloud.aiplatform.v1.ShieldedVmConfig.Builder, + com.google.cloud.aiplatform.v1.ShieldedVmConfigOrBuilder> + getShieldedVmConfigFieldBuilder() { + if (shieldedVmConfigBuilder_ == null) { + shieldedVmConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.ShieldedVmConfig, + com.google.cloud.aiplatform.v1.ShieldedVmConfig.Builder, + com.google.cloud.aiplatform.v1.ShieldedVmConfigOrBuilder>( + getShieldedVmConfig(), getParentForChildren(), isClean()); + shieldedVmConfig_ = null; + } + return shieldedVmConfigBuilder_; + } + + private com.google.protobuf.LazyStringArrayList networkTags_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureNetworkTagsIsMutable() { + if (!networkTags_.isModifiable()) { + networkTags_ = new com.google.protobuf.LazyStringArrayList(networkTags_); + } + bitField0_ |= 0x00010000; + } + /** + * + * + *
+     * Optional. The Compute Engine tags to add to runtime (see [Tagging
+     * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).
+     * 
+ * + * repeated string network_tags = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the networkTags. + */ + public com.google.protobuf.ProtocolStringList getNetworkTagsList() { + networkTags_.makeImmutable(); + return networkTags_; + } + /** + * + * + *
+     * Optional. The Compute Engine tags to add to runtime (see [Tagging
+     * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).
+     * 
+ * + * repeated string network_tags = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of networkTags. + */ + public int getNetworkTagsCount() { + return networkTags_.size(); + } + /** + * + * + *
+     * Optional. The Compute Engine tags to add to runtime (see [Tagging
+     * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).
+     * 
+ * + * repeated string network_tags = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The networkTags at the given index. + */ + public java.lang.String getNetworkTags(int index) { + return networkTags_.get(index); + } + /** + * + * + *
+     * Optional. The Compute Engine tags to add to runtime (see [Tagging
+     * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).
+     * 
+ * + * repeated string network_tags = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the networkTags at the given index. + */ + public com.google.protobuf.ByteString getNetworkTagsBytes(int index) { + return networkTags_.getByteString(index); + } + /** + * + * + *
+     * Optional. The Compute Engine tags to add to runtime (see [Tagging
+     * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).
+     * 
+ * + * repeated string network_tags = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The networkTags to set. + * @return This builder for chaining. + */ + public Builder setNetworkTags(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureNetworkTagsIsMutable(); + networkTags_.set(index, value); + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Compute Engine tags to add to runtime (see [Tagging
+     * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).
+     * 
+ * + * repeated string network_tags = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The networkTags to add. + * @return This builder for chaining. + */ + public Builder addNetworkTags(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureNetworkTagsIsMutable(); + networkTags_.add(value); + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Compute Engine tags to add to runtime (see [Tagging
+     * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).
+     * 
+ * + * repeated string network_tags = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The networkTags to add. + * @return This builder for chaining. + */ + public Builder addAllNetworkTags(java.lang.Iterable values) { + ensureNetworkTagsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, networkTags_); + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Compute Engine tags to add to runtime (see [Tagging
+     * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).
+     * 
+ * + * repeated string network_tags = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearNetworkTags() { + networkTags_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00010000); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Compute Engine tags to add to runtime (see [Tagging
+     * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).
+     * 
+ * + * repeated string network_tags = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes of the networkTags to add. + * @return This builder for chaining. + */ + public Builder addNetworkTagsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureNetworkTagsIsMutable(); + networkTags_.add(value); + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.NotebookRuntimeTemplate) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.NotebookRuntimeTemplate) + private static final com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate(); + } + + public static com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NotebookRuntimeTemplate parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NotebookRuntimeTemplateName.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NotebookRuntimeTemplateName.java new file mode 100644 index 000000000000..ff27d43382ee --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NotebookRuntimeTemplateName.java @@ -0,0 +1,240 @@ +/* + * Copyright 2024 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.aiplatform.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 NotebookRuntimeTemplateName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_NOTEBOOK_RUNTIME_TEMPLATE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String notebookRuntimeTemplate; + + @Deprecated + protected NotebookRuntimeTemplateName() { + project = null; + location = null; + notebookRuntimeTemplate = null; + } + + private NotebookRuntimeTemplateName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + notebookRuntimeTemplate = Preconditions.checkNotNull(builder.getNotebookRuntimeTemplate()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getNotebookRuntimeTemplate() { + return notebookRuntimeTemplate; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static NotebookRuntimeTemplateName of( + String project, String location, String notebookRuntimeTemplate) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setNotebookRuntimeTemplate(notebookRuntimeTemplate) + .build(); + } + + public static String format(String project, String location, String notebookRuntimeTemplate) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setNotebookRuntimeTemplate(notebookRuntimeTemplate) + .build() + .toString(); + } + + public static NotebookRuntimeTemplateName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_NOTEBOOK_RUNTIME_TEMPLATE.validatedMatch( + formattedString, + "NotebookRuntimeTemplateName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("notebook_runtime_template")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (NotebookRuntimeTemplateName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_NOTEBOOK_RUNTIME_TEMPLATE.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (notebookRuntimeTemplate != null) { + fieldMapBuilder.put("notebook_runtime_template", notebookRuntimeTemplate); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_NOTEBOOK_RUNTIME_TEMPLATE.instantiate( + "project", + project, + "location", + location, + "notebook_runtime_template", + notebookRuntimeTemplate); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + NotebookRuntimeTemplateName that = ((NotebookRuntimeTemplateName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.notebookRuntimeTemplate, that.notebookRuntimeTemplate); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(notebookRuntimeTemplate); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}. + */ + public static class Builder { + private String project; + private String location; + private String notebookRuntimeTemplate; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getNotebookRuntimeTemplate() { + return notebookRuntimeTemplate; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setNotebookRuntimeTemplate(String notebookRuntimeTemplate) { + this.notebookRuntimeTemplate = notebookRuntimeTemplate; + return this; + } + + private Builder(NotebookRuntimeTemplateName notebookRuntimeTemplateName) { + this.project = notebookRuntimeTemplateName.project; + this.location = notebookRuntimeTemplateName.location; + this.notebookRuntimeTemplate = notebookRuntimeTemplateName.notebookRuntimeTemplate; + } + + public NotebookRuntimeTemplateName build() { + return new NotebookRuntimeTemplateName(this); + } + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NotebookRuntimeTemplateOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NotebookRuntimeTemplateOrBuilder.java new file mode 100644 index 000000000000..7744be395240 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NotebookRuntimeTemplateOrBuilder.java @@ -0,0 +1,685 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/notebook_runtime.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +public interface NotebookRuntimeTemplateOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.NotebookRuntimeTemplate) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The resource name of the NotebookRuntimeTemplate.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. The resource name of the NotebookRuntimeTemplate.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The display name of the NotebookRuntimeTemplate.
+   * The name can be up to 128 characters long and can consist of any UTF-8
+   * characters.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Required. The display name of the NotebookRuntimeTemplate.
+   * The name can be up to 128 characters long and can consist of any UTF-8
+   * characters.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * The description of the NotebookRuntimeTemplate.
+   * 
+ * + * string description = 3; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * The description of the NotebookRuntimeTemplate.
+   * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Output only. The default template to use if not specified.
+   * 
+ * + * bool is_default = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The isDefault. + */ + boolean getIsDefault(); + + /** + * + * + *
+   * Optional. Immutable. The specification of a single machine for the
+   * template.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MachineSpec machine_spec = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the machineSpec field is set. + */ + boolean hasMachineSpec(); + /** + * + * + *
+   * Optional. Immutable. The specification of a single machine for the
+   * template.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MachineSpec machine_spec = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The machineSpec. + */ + com.google.cloud.aiplatform.v1.MachineSpec getMachineSpec(); + /** + * + * + *
+   * Optional. Immutable. The specification of a single machine for the
+   * template.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MachineSpec machine_spec = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + com.google.cloud.aiplatform.v1.MachineSpecOrBuilder getMachineSpecOrBuilder(); + + /** + * + * + *
+   * Optional. The specification of [persistent
+   * disk][https://cloud.google.com/compute/docs/disks/persistent-disks]
+   * attached to the runtime as data disk storage.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.PersistentDiskSpec data_persistent_disk_spec = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the dataPersistentDiskSpec field is set. + */ + boolean hasDataPersistentDiskSpec(); + /** + * + * + *
+   * Optional. The specification of [persistent
+   * disk][https://cloud.google.com/compute/docs/disks/persistent-disks]
+   * attached to the runtime as data disk storage.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.PersistentDiskSpec data_persistent_disk_spec = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The dataPersistentDiskSpec. + */ + com.google.cloud.aiplatform.v1.PersistentDiskSpec getDataPersistentDiskSpec(); + /** + * + * + *
+   * Optional. The specification of [persistent
+   * disk][https://cloud.google.com/compute/docs/disks/persistent-disks]
+   * attached to the runtime as data disk storage.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.PersistentDiskSpec data_persistent_disk_spec = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.aiplatform.v1.PersistentDiskSpecOrBuilder getDataPersistentDiskSpecOrBuilder(); + + /** + * + * + *
+   * Optional. Network spec.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.NetworkSpec network_spec = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the networkSpec field is set. + */ + boolean hasNetworkSpec(); + /** + * + * + *
+   * Optional. Network spec.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.NetworkSpec network_spec = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The networkSpec. + */ + com.google.cloud.aiplatform.v1.NetworkSpec getNetworkSpec(); + /** + * + * + *
+   * Optional. Network spec.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.NetworkSpec network_spec = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.aiplatform.v1.NetworkSpecOrBuilder getNetworkSpecOrBuilder(); + + /** + * + * + *
+   * The service account that the runtime workload runs as.
+   * You can use any service account within the same project, but you
+   * must have the service account user permission to use the instance.
+   *
+   * If not specified, the [Compute Engine default service
+   * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account)
+   * is used.
+   * 
+ * + * string service_account = 13; + * + * @return The serviceAccount. + */ + java.lang.String getServiceAccount(); + /** + * + * + *
+   * The service account that the runtime workload runs as.
+   * You can use any service account within the same project, but you
+   * must have the service account user permission to use the instance.
+   *
+   * If not specified, the [Compute Engine default service
+   * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account)
+   * is used.
+   * 
+ * + * string service_account = 13; + * + * @return The bytes for serviceAccount. + */ + com.google.protobuf.ByteString getServiceAccountBytes(); + + /** + * + * + *
+   * Used to perform consistent read-modify-write updates. If not set, a blind
+   * "overwrite" update happens.
+   * 
+ * + * string etag = 14; + * + * @return The etag. + */ + java.lang.String getEtag(); + /** + * + * + *
+   * Used to perform consistent read-modify-write updates. If not set, a blind
+   * "overwrite" update happens.
+   * 
+ * + * string etag = 14; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); + + /** + * + * + *
+   * The labels with user-defined metadata to organize the
+   * NotebookRuntimeTemplates.
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   *
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 15; + */ + int getLabelsCount(); + /** + * + * + *
+   * The labels with user-defined metadata to organize the
+   * NotebookRuntimeTemplates.
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   *
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 15; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * The labels with user-defined metadata to organize the
+   * NotebookRuntimeTemplates.
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   *
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 15; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * The labels with user-defined metadata to organize the
+   * NotebookRuntimeTemplates.
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   *
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 15; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * The labels with user-defined metadata to organize the
+   * NotebookRuntimeTemplates.
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   *
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 15; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * The idle shutdown configuration of NotebookRuntimeTemplate. This config
+   * will only be set when idle shutdown is enabled.
+   * 
+ * + * .google.cloud.aiplatform.v1.NotebookIdleShutdownConfig idle_shutdown_config = 17; + * + * @return Whether the idleShutdownConfig field is set. + */ + boolean hasIdleShutdownConfig(); + /** + * + * + *
+   * The idle shutdown configuration of NotebookRuntimeTemplate. This config
+   * will only be set when idle shutdown is enabled.
+   * 
+ * + * .google.cloud.aiplatform.v1.NotebookIdleShutdownConfig idle_shutdown_config = 17; + * + * @return The idleShutdownConfig. + */ + com.google.cloud.aiplatform.v1.NotebookIdleShutdownConfig getIdleShutdownConfig(); + /** + * + * + *
+   * The idle shutdown configuration of NotebookRuntimeTemplate. This config
+   * will only be set when idle shutdown is enabled.
+   * 
+ * + * .google.cloud.aiplatform.v1.NotebookIdleShutdownConfig idle_shutdown_config = 17; + */ + com.google.cloud.aiplatform.v1.NotebookIdleShutdownConfigOrBuilder + getIdleShutdownConfigOrBuilder(); + + /** + * + * + *
+   * EUC configuration of the NotebookRuntimeTemplate.
+   * 
+ * + * .google.cloud.aiplatform.v1.NotebookEucConfig euc_config = 18; + * + * @return Whether the eucConfig field is set. + */ + boolean hasEucConfig(); + /** + * + * + *
+   * EUC configuration of the NotebookRuntimeTemplate.
+   * 
+ * + * .google.cloud.aiplatform.v1.NotebookEucConfig euc_config = 18; + * + * @return The eucConfig. + */ + com.google.cloud.aiplatform.v1.NotebookEucConfig getEucConfig(); + /** + * + * + *
+   * EUC configuration of the NotebookRuntimeTemplate.
+   * 
+ * + * .google.cloud.aiplatform.v1.NotebookEucConfig euc_config = 18; + */ + com.google.cloud.aiplatform.v1.NotebookEucConfigOrBuilder getEucConfigOrBuilder(); + + /** + * + * + *
+   * Output only. Timestamp when this NotebookRuntimeTemplate was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Timestamp when this NotebookRuntimeTemplate was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Timestamp when this NotebookRuntimeTemplate was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Timestamp when this NotebookRuntimeTemplate was most recently
+   * updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. Timestamp when this NotebookRuntimeTemplate was most recently
+   * updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. Timestamp when this NotebookRuntimeTemplate was most recently
+   * updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Optional. Immutable. The type of the notebook runtime template.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntimeType notebook_runtime_type = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The enum numeric value on the wire for notebookRuntimeType. + */ + int getNotebookRuntimeTypeValue(); + /** + * + * + *
+   * Optional. Immutable. The type of the notebook runtime template.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.NotebookRuntimeType notebook_runtime_type = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The notebookRuntimeType. + */ + com.google.cloud.aiplatform.v1.NotebookRuntimeType getNotebookRuntimeType(); + + /** + * + * + *
+   * Optional. Immutable. Runtime Shielded VM spec.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ShieldedVmConfig shielded_vm_config = 20 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the shieldedVmConfig field is set. + */ + boolean hasShieldedVmConfig(); + /** + * + * + *
+   * Optional. Immutable. Runtime Shielded VM spec.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ShieldedVmConfig shielded_vm_config = 20 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The shieldedVmConfig. + */ + com.google.cloud.aiplatform.v1.ShieldedVmConfig getShieldedVmConfig(); + /** + * + * + *
+   * Optional. Immutable. Runtime Shielded VM spec.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ShieldedVmConfig shielded_vm_config = 20 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + com.google.cloud.aiplatform.v1.ShieldedVmConfigOrBuilder getShieldedVmConfigOrBuilder(); + + /** + * + * + *
+   * Optional. The Compute Engine tags to add to runtime (see [Tagging
+   * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).
+   * 
+ * + * repeated string network_tags = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the networkTags. + */ + java.util.List getNetworkTagsList(); + /** + * + * + *
+   * Optional. The Compute Engine tags to add to runtime (see [Tagging
+   * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).
+   * 
+ * + * repeated string network_tags = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of networkTags. + */ + int getNetworkTagsCount(); + /** + * + * + *
+   * Optional. The Compute Engine tags to add to runtime (see [Tagging
+   * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).
+   * 
+ * + * repeated string network_tags = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The networkTags at the given index. + */ + java.lang.String getNetworkTags(int index); + /** + * + * + *
+   * Optional. The Compute Engine tags to add to runtime (see [Tagging
+   * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).
+   * 
+ * + * repeated string network_tags = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the networkTags at the given index. + */ + com.google.protobuf.ByteString getNetworkTagsBytes(int index); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NotebookRuntimeTemplateRef.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NotebookRuntimeTemplateRef.java new file mode 100644 index 000000000000..5c289db6d565 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NotebookRuntimeTemplateRef.java @@ -0,0 +1,640 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/notebook_runtime_template_ref.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Points to a NotebookRuntimeTemplateRef.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef} + */ +public final class NotebookRuntimeTemplateRef extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef) + NotebookRuntimeTemplateRefOrBuilder { + private static final long serialVersionUID = 0L; + // Use NotebookRuntimeTemplateRef.newBuilder() to construct. + private NotebookRuntimeTemplateRef(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private NotebookRuntimeTemplateRef() { + notebookRuntimeTemplate_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new NotebookRuntimeTemplateRef(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateRefProto + .internal_static_google_cloud_aiplatform_v1_NotebookRuntimeTemplateRef_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateRefProto + .internal_static_google_cloud_aiplatform_v1_NotebookRuntimeTemplateRef_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef.class, + com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef.Builder.class); + } + + public static final int NOTEBOOK_RUNTIME_TEMPLATE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object notebookRuntimeTemplate_ = ""; + /** + * + * + *
+   * Immutable. A resource name of the NotebookRuntimeTemplate.
+   * 
+ * + * + * string notebook_runtime_template = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The notebookRuntimeTemplate. + */ + @java.lang.Override + public java.lang.String getNotebookRuntimeTemplate() { + java.lang.Object ref = notebookRuntimeTemplate_; + 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(); + notebookRuntimeTemplate_ = s; + return s; + } + } + /** + * + * + *
+   * Immutable. A resource name of the NotebookRuntimeTemplate.
+   * 
+ * + * + * string notebook_runtime_template = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for notebookRuntimeTemplate. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNotebookRuntimeTemplateBytes() { + java.lang.Object ref = notebookRuntimeTemplate_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + notebookRuntimeTemplate_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(notebookRuntimeTemplate_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, notebookRuntimeTemplate_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(notebookRuntimeTemplate_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, notebookRuntimeTemplate_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef other = + (com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef) obj; + + if (!getNotebookRuntimeTemplate().equals(other.getNotebookRuntimeTemplate())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NOTEBOOK_RUNTIME_TEMPLATE_FIELD_NUMBER; + hash = (53 * hash) + getNotebookRuntimeTemplate().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Points to a NotebookRuntimeTemplateRef.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef) + com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateRefOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateRefProto + .internal_static_google_cloud_aiplatform_v1_NotebookRuntimeTemplateRef_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateRefProto + .internal_static_google_cloud_aiplatform_v1_NotebookRuntimeTemplateRef_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef.class, + com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + notebookRuntimeTemplate_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateRefProto + .internal_static_google_cloud_aiplatform_v1_NotebookRuntimeTemplateRef_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef build() { + com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef buildPartial() { + com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef result = + new com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.notebookRuntimeTemplate_ = notebookRuntimeTemplate_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef) { + return mergeFrom((com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef other) { + if (other == com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef.getDefaultInstance()) + return this; + if (!other.getNotebookRuntimeTemplate().isEmpty()) { + notebookRuntimeTemplate_ = other.notebookRuntimeTemplate_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + notebookRuntimeTemplate_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object notebookRuntimeTemplate_ = ""; + /** + * + * + *
+     * Immutable. A resource name of the NotebookRuntimeTemplate.
+     * 
+ * + * + * string notebook_runtime_template = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The notebookRuntimeTemplate. + */ + public java.lang.String getNotebookRuntimeTemplate() { + java.lang.Object ref = notebookRuntimeTemplate_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + notebookRuntimeTemplate_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Immutable. A resource name of the NotebookRuntimeTemplate.
+     * 
+ * + * + * string notebook_runtime_template = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for notebookRuntimeTemplate. + */ + public com.google.protobuf.ByteString getNotebookRuntimeTemplateBytes() { + java.lang.Object ref = notebookRuntimeTemplate_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + notebookRuntimeTemplate_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Immutable. A resource name of the NotebookRuntimeTemplate.
+     * 
+ * + * + * string notebook_runtime_template = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @param value The notebookRuntimeTemplate to set. + * @return This builder for chaining. + */ + public Builder setNotebookRuntimeTemplate(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + notebookRuntimeTemplate_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. A resource name of the NotebookRuntimeTemplate.
+     * 
+ * + * + * string notebook_runtime_template = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearNotebookRuntimeTemplate() { + notebookRuntimeTemplate_ = getDefaultInstance().getNotebookRuntimeTemplate(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. A resource name of the NotebookRuntimeTemplate.
+     * 
+ * + * + * string notebook_runtime_template = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for notebookRuntimeTemplate to set. + * @return This builder for chaining. + */ + public Builder setNotebookRuntimeTemplateBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + notebookRuntimeTemplate_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef) + private static final com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef(); + } + + public static com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NotebookRuntimeTemplateRef parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NotebookRuntimeTemplateRefOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NotebookRuntimeTemplateRefOrBuilder.java new file mode 100644 index 000000000000..0082fb815a3e --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NotebookRuntimeTemplateRefOrBuilder.java @@ -0,0 +1,55 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/notebook_runtime_template_ref.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +public interface NotebookRuntimeTemplateRefOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Immutable. A resource name of the NotebookRuntimeTemplate.
+   * 
+ * + * + * string notebook_runtime_template = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The notebookRuntimeTemplate. + */ + java.lang.String getNotebookRuntimeTemplate(); + /** + * + * + *
+   * Immutable. A resource name of the NotebookRuntimeTemplate.
+   * 
+ * + * + * string notebook_runtime_template = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for notebookRuntimeTemplate. + */ + com.google.protobuf.ByteString getNotebookRuntimeTemplateBytes(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NotebookRuntimeTemplateRefProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NotebookRuntimeTemplateRefProto.java new file mode 100644 index 000000000000..a03854412173 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NotebookRuntimeTemplateRefProto.java @@ -0,0 +1,84 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/notebook_runtime_template_ref.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +public final class NotebookRuntimeTemplateRefProto { + private NotebookRuntimeTemplateRefProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_NotebookRuntimeTemplateRef_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_NotebookRuntimeTemplateRef_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n>google/cloud/aiplatform/v1/notebook_ru" + + "ntime_template_ref.proto\022\032google.cloud.a" + + "iplatform.v1\032\037google/api/field_behavior." + + "proto\032\031google/api/resource.proto\"z\n\032Note" + + "bookRuntimeTemplateRef\022\\\n\031notebook_runti" + + "me_template\030\001 \001(\tB9\340A\005\372A3\n1aiplatform.go" + + "ogleapis.com/NotebookRuntimeTemplateB\335\001\n" + + "\036com.google.cloud.aiplatform.v1B\037Noteboo" + + "kRuntimeTemplateRefProtoP\001Z>cloud.google" + + ".com/go/aiplatform/apiv1/aiplatformpb;ai" + + "platformpb\252\002\032Google.Cloud.AIPlatform.V1\312" + + "\002\032Google\\Cloud\\AIPlatform\\V1\352\002\035Google::C" + + "loud::AIPlatform::V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1_NotebookRuntimeTemplateRef_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1_NotebookRuntimeTemplateRef_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_NotebookRuntimeTemplateRef_descriptor, + new java.lang.String[] { + "NotebookRuntimeTemplate", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NotebookRuntimeType.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NotebookRuntimeType.java new file mode 100644 index 000000000000..71908709e82a --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NotebookRuntimeType.java @@ -0,0 +1,184 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/notebook_runtime.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Represents a notebook runtime type.
+ * 
+ * + * Protobuf enum {@code google.cloud.aiplatform.v1.NotebookRuntimeType} + */ +public enum NotebookRuntimeType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Unspecified notebook runtime type, NotebookRuntimeType will default to
+   * USER_DEFINED.
+   * 
+ * + * NOTEBOOK_RUNTIME_TYPE_UNSPECIFIED = 0; + */ + NOTEBOOK_RUNTIME_TYPE_UNSPECIFIED(0), + /** + * + * + *
+   * runtime or template with coustomized configurations from user.
+   * 
+ * + * USER_DEFINED = 1; + */ + USER_DEFINED(1), + /** + * + * + *
+   * runtime or template with system defined configurations.
+   * 
+ * + * ONE_CLICK = 2; + */ + ONE_CLICK(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Unspecified notebook runtime type, NotebookRuntimeType will default to
+   * USER_DEFINED.
+   * 
+ * + * NOTEBOOK_RUNTIME_TYPE_UNSPECIFIED = 0; + */ + public static final int NOTEBOOK_RUNTIME_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * runtime or template with coustomized configurations from user.
+   * 
+ * + * USER_DEFINED = 1; + */ + public static final int USER_DEFINED_VALUE = 1; + /** + * + * + *
+   * runtime or template with system defined configurations.
+   * 
+ * + * ONE_CLICK = 2; + */ + public static final int ONE_CLICK_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static NotebookRuntimeType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static NotebookRuntimeType forNumber(int value) { + switch (value) { + case 0: + return NOTEBOOK_RUNTIME_TYPE_UNSPECIFIED; + case 1: + return USER_DEFINED; + case 2: + return ONE_CLICK; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public NotebookRuntimeType findValueByNumber(int number) { + return NotebookRuntimeType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.NotebookRuntimeProto.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final NotebookRuntimeType[] VALUES = values(); + + public static NotebookRuntimeType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private NotebookRuntimeType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.aiplatform.v1.NotebookRuntimeType) +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NotebookServiceProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NotebookServiceProto.java new file mode 100644 index 000000000000..e8de77bd064c --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NotebookServiceProto.java @@ -0,0 +1,437 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/notebook_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +public final class NotebookServiceProto { + private NotebookServiceProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_CreateNotebookRuntimeTemplateRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_CreateNotebookRuntimeTemplateRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_CreateNotebookRuntimeTemplateOperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_CreateNotebookRuntimeTemplateOperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_GetNotebookRuntimeTemplateRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_GetNotebookRuntimeTemplateRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_ListNotebookRuntimeTemplatesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ListNotebookRuntimeTemplatesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_ListNotebookRuntimeTemplatesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ListNotebookRuntimeTemplatesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_DeleteNotebookRuntimeTemplateRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_DeleteNotebookRuntimeTemplateRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_AssignNotebookRuntimeRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_AssignNotebookRuntimeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_AssignNotebookRuntimeOperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_AssignNotebookRuntimeOperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_GetNotebookRuntimeRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_GetNotebookRuntimeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_ListNotebookRuntimesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ListNotebookRuntimesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_ListNotebookRuntimesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ListNotebookRuntimesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_DeleteNotebookRuntimeRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_DeleteNotebookRuntimeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_UpgradeNotebookRuntimeRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_UpgradeNotebookRuntimeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_UpgradeNotebookRuntimeOperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_UpgradeNotebookRuntimeOperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_UpgradeNotebookRuntimeResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_UpgradeNotebookRuntimeResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_StartNotebookRuntimeRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_StartNotebookRuntimeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_StartNotebookRuntimeOperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_StartNotebookRuntimeOperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_StartNotebookRuntimeResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_StartNotebookRuntimeResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n1google/cloud/aiplatform/v1/notebook_se" + + "rvice.proto\022\032google.cloud.aiplatform.v1\032" + + "\034google/api/annotations.proto\032\027google/ap" + + "i/client.proto\032\037google/api/field_behavio" + + "r.proto\032\031google/api/resource.proto\0321goog" + + "le/cloud/aiplatform/v1/notebook_runtime." + + "proto\032*google/cloud/aiplatform/v1/operat" + + "ion.proto\032#google/longrunning/operations" + + ".proto\032\033google/protobuf/empty.proto\032 goo" + + "gle/protobuf/field_mask.proto\"\351\001\n$Create" + + "NotebookRuntimeTemplateRequest\0229\n\006parent" + + "\030\001 \001(\tB)\340A\002\372A#\n!locations.googleapis.com" + + "/Location\022[\n\031notebook_runtime_template\030\002" + + " \001(\01323.google.cloud.aiplatform.v1.Notebo" + + "okRuntimeTemplateB\003\340A\002\022)\n\034notebook_runti" + + "me_template_id\030\003 \001(\tB\003\340A\001\"\200\001\n.CreateNote" + + "bookRuntimeTemplateOperationMetadata\022N\n\020" + + "generic_metadata\030\001 \001(\01324.google.cloud.ai" + + "platform.v1.GenericOperationMetadata\"l\n!" + + "GetNotebookRuntimeTemplateRequest\022G\n\004nam" + + "e\030\001 \001(\tB9\340A\002\372A3\n1aiplatform.googleapis.c" + + "om/NotebookRuntimeTemplate\"\361\001\n#ListNoteb" + + "ookRuntimeTemplatesRequest\0229\n\006parent\030\001 \001" + + "(\tB)\340A\002\372A#\n!locations.googleapis.com/Loc" + + "ation\022\023\n\006filter\030\002 \001(\tB\003\340A\001\022\026\n\tpage_size\030" + + "\003 \001(\005B\003\340A\001\022\027\n\npage_token\030\004 \001(\tB\003\340A\001\0222\n\tr" + + "ead_mask\030\005 \001(\0132\032.google.protobuf.FieldMa" + + "skB\003\340A\001\022\025\n\010order_by\030\006 \001(\tB\003\340A\001\"\230\001\n$ListN" + + "otebookRuntimeTemplatesResponse\022W\n\032noteb" + + "ook_runtime_templates\030\001 \003(\01323.google.clo" + + "ud.aiplatform.v1.NotebookRuntimeTemplate" + + "\022\027\n\017next_page_token\030\002 \001(\t\"o\n$DeleteNoteb" + + "ookRuntimeTemplateRequest\022G\n\004name\030\001 \001(\tB" + + "9\340A\002\372A3\n1aiplatform.googleapis.com/Noteb" + + "ookRuntimeTemplate\"\245\002\n\034AssignNotebookRun" + + "timeRequest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!loc" + + "ations.googleapis.com/Location\022\\\n\031notebo" + + "ok_runtime_template\030\002 \001(\tB9\340A\002\372A3\n1aipla" + + "tform.googleapis.com/NotebookRuntimeTemp" + + "late\022J\n\020notebook_runtime\030\003 \001(\0132+.google." + + "cloud.aiplatform.v1.NotebookRuntimeB\003\340A\002" + + "\022 \n\023notebook_runtime_id\030\004 \001(\tB\003\340A\001\"\222\001\n&A" + + "ssignNotebookRuntimeOperationMetadata\022N\n" + + "\020generic_metadata\030\001 \001(\01324.google.cloud.a" + + "iplatform.v1.GenericOperationMetadata\022\030\n" + + "\020progress_message\030\002 \001(\t\"\\\n\031GetNotebookRu" + + "ntimeRequest\022?\n\004name\030\001 \001(\tB1\340A\002\372A+\n)aipl" + + "atform.googleapis.com/NotebookRuntime\"\351\001" + + "\n\033ListNotebookRuntimesRequest\0229\n\006parent\030" + + "\001 \001(\tB)\340A\002\372A#\n!locations.googleapis.com/" + + "Location\022\023\n\006filter\030\002 \001(\tB\003\340A\001\022\026\n\tpage_si" + + "ze\030\003 \001(\005B\003\340A\001\022\027\n\npage_token\030\004 \001(\tB\003\340A\001\0222" + + "\n\tread_mask\030\005 \001(\0132\032.google.protobuf.Fiel" + + "dMaskB\003\340A\001\022\025\n\010order_by\030\006 \001(\tB\003\340A\001\"\177\n\034Lis" + + "tNotebookRuntimesResponse\022F\n\021notebook_ru" + + "ntimes\030\001 \003(\0132+.google.cloud.aiplatform.v" + + "1.NotebookRuntime\022\027\n\017next_page_token\030\002 \001" + + "(\t\"_\n\034DeleteNotebookRuntimeRequest\022?\n\004na" + + "me\030\001 \001(\tB1\340A\002\372A+\n)aiplatform.googleapis." + + "com/NotebookRuntime\"`\n\035UpgradeNotebookRu" + + "ntimeRequest\022?\n\004name\030\001 \001(\tB1\340A\002\372A+\n)aipl" + + "atform.googleapis.com/NotebookRuntime\"\223\001" + + "\n\'UpgradeNotebookRuntimeOperationMetadat" + + "a\022N\n\020generic_metadata\030\001 \001(\01324.google.clo" + + "ud.aiplatform.v1.GenericOperationMetadat" + + "a\022\030\n\020progress_message\030\002 \001(\t\" \n\036UpgradeNo" + + "tebookRuntimeResponse\"^\n\033StartNotebookRu" + + "ntimeRequest\022?\n\004name\030\001 \001(\tB1\340A\002\372A+\n)aipl" + + "atform.googleapis.com/NotebookRuntime\"\221\001" + + "\n%StartNotebookRuntimeOperationMetadata\022" + + "N\n\020generic_metadata\030\001 \001(\01324.google.cloud" + + ".aiplatform.v1.GenericOperationMetadata\022" + + "\030\n\020progress_message\030\002 \001(\t\"\036\n\034StartNotebo" + + "okRuntimeResponse2\377\024\n\017NotebookService\022\356\002" + + "\n\035CreateNotebookRuntimeTemplate\022@.google" + + ".cloud.aiplatform.v1.CreateNotebookRunti" + + "meTemplateRequest\032\035.google.longrunning.O" + + "peration\"\353\001\312AI\n\027NotebookRuntimeTemplate\022" + + ".CreateNotebookRuntimeTemplateOperationM" + + "etadata\332A=parent,notebook_runtime_templa" + + "te,notebook_runtime_template_id\202\323\344\223\002Y\"\022\022*cloud.google.com/go/aiplatform/a" + + "piv1/aiplatformpb;aiplatformpb\252\002\032Google." + + "Cloud.AIPlatform.V1\312\002\032Google\\Cloud\\AIPla" + + "tform\\V1\352\002\035Google::Cloud::AIPlatform::V1" + + "b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.aiplatform.v1.NotebookRuntimeProto.getDescriptor(), + com.google.cloud.aiplatform.v1.OperationProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1_CreateNotebookRuntimeTemplateRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1_CreateNotebookRuntimeTemplateRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_CreateNotebookRuntimeTemplateRequest_descriptor, + new java.lang.String[] { + "Parent", "NotebookRuntimeTemplate", "NotebookRuntimeTemplateId", + }); + internal_static_google_cloud_aiplatform_v1_CreateNotebookRuntimeTemplateOperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_aiplatform_v1_CreateNotebookRuntimeTemplateOperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_CreateNotebookRuntimeTemplateOperationMetadata_descriptor, + new java.lang.String[] { + "GenericMetadata", + }); + internal_static_google_cloud_aiplatform_v1_GetNotebookRuntimeTemplateRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_aiplatform_v1_GetNotebookRuntimeTemplateRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_GetNotebookRuntimeTemplateRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_aiplatform_v1_ListNotebookRuntimeTemplatesRequest_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_aiplatform_v1_ListNotebookRuntimeTemplatesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ListNotebookRuntimeTemplatesRequest_descriptor, + new java.lang.String[] { + "Parent", "Filter", "PageSize", "PageToken", "ReadMask", "OrderBy", + }); + internal_static_google_cloud_aiplatform_v1_ListNotebookRuntimeTemplatesResponse_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_aiplatform_v1_ListNotebookRuntimeTemplatesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ListNotebookRuntimeTemplatesResponse_descriptor, + new java.lang.String[] { + "NotebookRuntimeTemplates", "NextPageToken", + }); + internal_static_google_cloud_aiplatform_v1_DeleteNotebookRuntimeTemplateRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_aiplatform_v1_DeleteNotebookRuntimeTemplateRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_DeleteNotebookRuntimeTemplateRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_aiplatform_v1_AssignNotebookRuntimeRequest_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_aiplatform_v1_AssignNotebookRuntimeRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_AssignNotebookRuntimeRequest_descriptor, + new java.lang.String[] { + "Parent", "NotebookRuntimeTemplate", "NotebookRuntime", "NotebookRuntimeId", + }); + internal_static_google_cloud_aiplatform_v1_AssignNotebookRuntimeOperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_aiplatform_v1_AssignNotebookRuntimeOperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_AssignNotebookRuntimeOperationMetadata_descriptor, + new java.lang.String[] { + "GenericMetadata", "ProgressMessage", + }); + internal_static_google_cloud_aiplatform_v1_GetNotebookRuntimeRequest_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_aiplatform_v1_GetNotebookRuntimeRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_GetNotebookRuntimeRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_aiplatform_v1_ListNotebookRuntimesRequest_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_aiplatform_v1_ListNotebookRuntimesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ListNotebookRuntimesRequest_descriptor, + new java.lang.String[] { + "Parent", "Filter", "PageSize", "PageToken", "ReadMask", "OrderBy", + }); + internal_static_google_cloud_aiplatform_v1_ListNotebookRuntimesResponse_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_aiplatform_v1_ListNotebookRuntimesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ListNotebookRuntimesResponse_descriptor, + new java.lang.String[] { + "NotebookRuntimes", "NextPageToken", + }); + internal_static_google_cloud_aiplatform_v1_DeleteNotebookRuntimeRequest_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_aiplatform_v1_DeleteNotebookRuntimeRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_DeleteNotebookRuntimeRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_aiplatform_v1_UpgradeNotebookRuntimeRequest_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_cloud_aiplatform_v1_UpgradeNotebookRuntimeRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_UpgradeNotebookRuntimeRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_aiplatform_v1_UpgradeNotebookRuntimeOperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_cloud_aiplatform_v1_UpgradeNotebookRuntimeOperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_UpgradeNotebookRuntimeOperationMetadata_descriptor, + new java.lang.String[] { + "GenericMetadata", "ProgressMessage", + }); + internal_static_google_cloud_aiplatform_v1_UpgradeNotebookRuntimeResponse_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_cloud_aiplatform_v1_UpgradeNotebookRuntimeResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_UpgradeNotebookRuntimeResponse_descriptor, + new java.lang.String[] {}); + internal_static_google_cloud_aiplatform_v1_StartNotebookRuntimeRequest_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_cloud_aiplatform_v1_StartNotebookRuntimeRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_StartNotebookRuntimeRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_aiplatform_v1_StartNotebookRuntimeOperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_google_cloud_aiplatform_v1_StartNotebookRuntimeOperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_StartNotebookRuntimeOperationMetadata_descriptor, + new java.lang.String[] { + "GenericMetadata", "ProgressMessage", + }); + internal_static_google_cloud_aiplatform_v1_StartNotebookRuntimeResponse_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_google_cloud_aiplatform_v1_StartNotebookRuntimeResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_StartNotebookRuntimeResponse_descriptor, + new java.lang.String[] {}); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resourceReference); + registry.add(com.google.longrunning.OperationsProto.operationInfo); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.aiplatform.v1.NotebookRuntimeProto.getDescriptor(); + com.google.cloud.aiplatform.v1.OperationProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/OpenApiProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/OpenApiProto.java index 731ef451582c..2427a72118fe 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/OpenApiProto.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/OpenApiProto.java @@ -48,26 +48,33 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "\n(google/cloud/aiplatform/v1/openapi.pro" + "to\022\032google.cloud.aiplatform.v1\032\037google/a" + "pi/field_behavior.proto\032\034google/protobuf" - + "/struct.proto\"\267\003\n\006Schema\0223\n\004type\030\001 \001(\0162 " + + "/struct.proto\"\327\005\n\006Schema\0223\n\004type\030\001 \001(\0162 " + ".google.cloud.aiplatform.v1.TypeB\003\340A\001\022\023\n" - + "\006format\030\007 \001(\tB\003\340A\001\022\030\n\013description\030\010 \001(\tB" - + "\003\340A\001\022\025\n\010nullable\030\006 \001(\010B\003\340A\001\0226\n\005items\030\002 \001" - + "(\0132\".google.cloud.aiplatform.v1.SchemaB\003" - + "\340A\001\022\021\n\004enum\030\t \003(\tB\003\340A\001\022K\n\nproperties\030\003 \003" - + "(\01322.google.cloud.aiplatform.v1.Schema.P" - + "ropertiesEntryB\003\340A\001\022\025\n\010required\030\005 \003(\tB\003\340" - + "A\001\022,\n\007example\030\004 \001(\0132\026.google.protobuf.Va" - + "lueB\003\340A\001\032U\n\017PropertiesEntry\022\013\n\003key\030\001 \001(\t" - + "\0221\n\005value\030\002 \001(\0132\".google.cloud.aiplatfor" - + "m.v1.Schema:\0028\001*e\n\004Type\022\024\n\020TYPE_UNSPECIF" - + "IED\020\000\022\n\n\006STRING\020\001\022\n\n\006NUMBER\020\002\022\013\n\007INTEGER" - + "\020\003\022\013\n\007BOOLEAN\020\004\022\t\n\005ARRAY\020\005\022\n\n\006OBJECT\020\006B\312" - + "\001\n\036com.google.cloud.aiplatform.v1B\014OpenA" - + "piProtoP\001Z>cloud.google.com/go/aiplatfor" - + "m/apiv1/aiplatformpb;aiplatformpb\252\002\032Goog" - + "le.Cloud.AIPlatform.V1\312\002\032Google\\Cloud\\AI" - + "Platform\\V1\352\002\035Google::Cloud::AIPlatform:" - + ":V1b\006proto3" + + "\006format\030\007 \001(\tB\003\340A\001\022\022\n\005title\030\030 \001(\tB\003\340A\001\022\030" + + "\n\013description\030\010 \001(\tB\003\340A\001\022\025\n\010nullable\030\006 \001" + + "(\010B\003\340A\001\022,\n\007default\030\027 \001(\0132\026.google.protob" + + "uf.ValueB\003\340A\001\0226\n\005items\030\002 \001(\0132\".google.cl" + + "oud.aiplatform.v1.SchemaB\003\340A\001\022\026\n\tmin_ite" + + "ms\030\025 \001(\003B\003\340A\001\022\026\n\tmax_items\030\026 \001(\003B\003\340A\001\022\021\n" + + "\004enum\030\t \003(\tB\003\340A\001\022K\n\nproperties\030\003 \003(\01322.g" + + "oogle.cloud.aiplatform.v1.Schema.Propert" + + "iesEntryB\003\340A\001\022\025\n\010required\030\005 \003(\tB\003\340A\001\022\033\n\016" + + "min_properties\030\016 \001(\003B\003\340A\001\022\033\n\016max_propert" + + "ies\030\017 \001(\003B\003\340A\001\022\024\n\007minimum\030\020 \001(\001B\003\340A\001\022\024\n\007" + + "maximum\030\021 \001(\001B\003\340A\001\022\027\n\nmin_length\030\022 \001(\003B\003" + + "\340A\001\022\027\n\nmax_length\030\023 \001(\003B\003\340A\001\022\024\n\007pattern\030" + + "\024 \001(\tB\003\340A\001\022,\n\007example\030\004 \001(\0132\026.google.pro" + + "tobuf.ValueB\003\340A\001\032U\n\017PropertiesEntry\022\013\n\003k" + + "ey\030\001 \001(\t\0221\n\005value\030\002 \001(\0132\".google.cloud.a" + + "iplatform.v1.Schema:\0028\001*e\n\004Type\022\024\n\020TYPE_" + + "UNSPECIFIED\020\000\022\n\n\006STRING\020\001\022\n\n\006NUMBER\020\002\022\013\n" + + "\007INTEGER\020\003\022\013\n\007BOOLEAN\020\004\022\t\n\005ARRAY\020\005\022\n\n\006OB" + + "JECT\020\006B\312\001\n\036com.google.cloud.aiplatform.v" + + "1B\014OpenApiProtoP\001Z>cloud.google.com/go/a" + + "iplatform/apiv1/aiplatformpb;aiplatformp" + + "b\252\002\032Google.Cloud.AIPlatform.V1\312\002\032Google\\" + + "Cloud\\AIPlatform\\V1\352\002\035Google::Cloud::AIP" + + "latform::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -84,12 +91,23 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Type", "Format", + "Title", "Description", "Nullable", + "Default", "Items", + "MinItems", + "MaxItems", "Enum", "Properties", "Required", + "MinProperties", + "MaxProperties", + "Minimum", + "Maximum", + "MinLength", + "MaxLength", + "Pattern", "Example", }); internal_static_google_cloud_aiplatform_v1_Schema_PropertiesEntry_descriptor = diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PersistentResource.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PersistentResource.java new file mode 100644 index 000000000000..85711147e592 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PersistentResource.java @@ -0,0 +1,4941 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/persistent_resource.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Represents long-lasting resources that are dedicated to users to runs custom
+ * workloads.
+ * A PersistentResource can have multiple node pools and each node
+ * pool can have its own machine spec.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.PersistentResource} + */ +public final class PersistentResource extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.PersistentResource) + PersistentResourceOrBuilder { + private static final long serialVersionUID = 0L; + // Use PersistentResource.newBuilder() to construct. + private PersistentResource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PersistentResource() { + name_ = ""; + displayName_ = ""; + resourcePools_ = java.util.Collections.emptyList(); + state_ = 0; + network_ = ""; + reservedIpRanges_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PersistentResource(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.PersistentResourceProto + .internal_static_google_cloud_aiplatform_v1_PersistentResource_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 10: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.PersistentResourceProto + .internal_static_google_cloud_aiplatform_v1_PersistentResource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.PersistentResource.class, + com.google.cloud.aiplatform.v1.PersistentResource.Builder.class); + } + + /** + * + * + *
+   * Describes the PersistentResource state.
+   * 
+ * + * Protobuf enum {@code google.cloud.aiplatform.v1.PersistentResource.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Not set.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * The PROVISIONING state indicates the persistent resources is being
+     * created.
+     * 
+ * + * PROVISIONING = 1; + */ + PROVISIONING(1), + /** + * + * + *
+     * The RUNNING state indicates the persistent resource is healthy and fully
+     * usable.
+     * 
+ * + * RUNNING = 3; + */ + RUNNING(3), + /** + * + * + *
+     * The STOPPING state indicates the persistent resource is being deleted.
+     * 
+ * + * STOPPING = 4; + */ + STOPPING(4), + /** + * + * + *
+     * The ERROR state indicates the persistent resource may be unusable.
+     * Details can be found in the `error` field.
+     * 
+ * + * ERROR = 5; + */ + ERROR(5), + /** + * + * + *
+     * The REBOOTING state indicates the persistent resource is being rebooted
+     * (PR is not available right now but is expected to be ready again later).
+     * 
+ * + * REBOOTING = 6; + */ + REBOOTING(6), + /** + * + * + *
+     * The UPDATING state indicates the persistent resource is being updated.
+     * 
+ * + * UPDATING = 7; + */ + UPDATING(7), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Not set.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The PROVISIONING state indicates the persistent resources is being
+     * created.
+     * 
+ * + * PROVISIONING = 1; + */ + public static final int PROVISIONING_VALUE = 1; + /** + * + * + *
+     * The RUNNING state indicates the persistent resource is healthy and fully
+     * usable.
+     * 
+ * + * RUNNING = 3; + */ + public static final int RUNNING_VALUE = 3; + /** + * + * + *
+     * The STOPPING state indicates the persistent resource is being deleted.
+     * 
+ * + * STOPPING = 4; + */ + public static final int STOPPING_VALUE = 4; + /** + * + * + *
+     * The ERROR state indicates the persistent resource may be unusable.
+     * Details can be found in the `error` field.
+     * 
+ * + * ERROR = 5; + */ + public static final int ERROR_VALUE = 5; + /** + * + * + *
+     * The REBOOTING state indicates the persistent resource is being rebooted
+     * (PR is not available right now but is expected to be ready again later).
+     * 
+ * + * REBOOTING = 6; + */ + public static final int REBOOTING_VALUE = 6; + /** + * + * + *
+     * The UPDATING state indicates the persistent resource is being updated.
+     * 
+ * + * UPDATING = 7; + */ + public static final int UPDATING_VALUE = 7; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return PROVISIONING; + case 3: + return RUNNING; + case 4: + return STOPPING; + case 5: + return ERROR; + case 6: + return REBOOTING; + case 7: + return UPDATING; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.PersistentResource.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.aiplatform.v1.PersistentResource.State) + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Immutable. Resource name of a PersistentResource.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Immutable. Resource name of a PersistentResource.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + /** + * + * + *
+   * Optional. The display name of the PersistentResource.
+   * The name can be up to 128 characters long and can consist of any UTF-8
+   * characters.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + 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(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The display name of the PersistentResource.
+   * The name can be up to 128 characters long and can consist of any UTF-8
+   * characters.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESOURCE_POOLS_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List resourcePools_; + /** + * + * + *
+   * Required. The spec of the pools of different resources.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ResourcePool resource_pools = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List getResourcePoolsList() { + return resourcePools_; + } + /** + * + * + *
+   * Required. The spec of the pools of different resources.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ResourcePool resource_pools = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getResourcePoolsOrBuilderList() { + return resourcePools_; + } + /** + * + * + *
+   * Required. The spec of the pools of different resources.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ResourcePool resource_pools = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getResourcePoolsCount() { + return resourcePools_.size(); + } + /** + * + * + *
+   * Required. The spec of the pools of different resources.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ResourcePool resource_pools = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ResourcePool getResourcePools(int index) { + return resourcePools_.get(index); + } + /** + * + * + *
+   * Required. The spec of the pools of different resources.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ResourcePool resource_pools = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ResourcePoolOrBuilder getResourcePoolsOrBuilder(int index) { + return resourcePools_.get(index); + } + + public static final int STATE_FIELD_NUMBER = 5; + private int state_ = 0; + /** + * + * + *
+   * Output only. The detailed state of a Study.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.PersistentResource.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * Output only. The detailed state of a Study.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.PersistentResource.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.PersistentResource.State getState() { + com.google.cloud.aiplatform.v1.PersistentResource.State result = + com.google.cloud.aiplatform.v1.PersistentResource.State.forNumber(state_); + return result == null + ? com.google.cloud.aiplatform.v1.PersistentResource.State.UNRECOGNIZED + : result; + } + + public static final int ERROR_FIELD_NUMBER = 6; + private com.google.rpc.Status error_; + /** + * + * + *
+   * Output only. Only populated when persistent resource's state is `STOPPING`
+   * or `ERROR`.
+   * 
+ * + * .google.rpc.Status error = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the error field is set. + */ + @java.lang.Override + public boolean hasError() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Output only. Only populated when persistent resource's state is `STOPPING`
+   * or `ERROR`.
+   * 
+ * + * .google.rpc.Status error = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The error. + */ + @java.lang.Override + public com.google.rpc.Status getError() { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } + /** + * + * + *
+   * Output only. Only populated when persistent resource's state is `STOPPING`
+   * or `ERROR`.
+   * 
+ * + * .google.rpc.Status error = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } + + public static final int CREATE_TIME_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. Time when the PersistentResource was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Output only. Time when the PersistentResource was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. Time when the PersistentResource was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int START_TIME_FIELD_NUMBER = 8; + private com.google.protobuf.Timestamp startTime_; + /** + * + * + *
+   * Output only. Time when the PersistentResource for the first time entered
+   * the `RUNNING` state.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+   * Output only. Time when the PersistentResource for the first time entered
+   * the `RUNNING` state.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + /** + * + * + *
+   * Output only. Time when the PersistentResource for the first time entered
+   * the `RUNNING` state.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 9; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. Time when the PersistentResource was most recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+   * Output only. Time when the PersistentResource was most recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. Time when the PersistentResource was most recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int LABELS_FIELD_NUMBER = 10; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.aiplatform.v1.PersistentResourceProto + .internal_static_google_cloud_aiplatform_v1_PersistentResource_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * Optional. The labels with user-defined metadata to organize
+   * PersistentResource.
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   *
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * Optional. The labels with user-defined metadata to organize
+   * PersistentResource.
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   *
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Optional. The labels with user-defined metadata to organize
+   * PersistentResource.
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   *
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Optional. The labels with user-defined metadata to organize
+   * PersistentResource.
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   *
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int NETWORK_FIELD_NUMBER = 11; + + @SuppressWarnings("serial") + private volatile java.lang.Object network_ = ""; + /** + * + * + *
+   * Optional. The full name of the Compute Engine
+   * [network](/compute/docs/networks-and-firewalls#networks) to peered with
+   * Vertex AI to host the persistent resources.
+   * For example, `projects/12345/global/networks/myVPC`.
+   * [Format](/compute/docs/reference/rest/v1/networks/insert)
+   * is of the form `projects/{project}/global/networks/{network}`.
+   * Where {project} is a project number, as in `12345`, and {network} is a
+   * network name.
+   *
+   * To specify this field, you must have already [configured VPC Network
+   * Peering for Vertex
+   * AI](https://cloud.google.com/vertex-ai/docs/general/vpc-peering).
+   *
+   * If this field is left unspecified, the resources aren't peered with any
+   * network.
+   * 
+ * + * + * string network = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The network. + */ + @java.lang.Override + public java.lang.String getNetwork() { + java.lang.Object ref = network_; + 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(); + network_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The full name of the Compute Engine
+   * [network](/compute/docs/networks-and-firewalls#networks) to peered with
+   * Vertex AI to host the persistent resources.
+   * For example, `projects/12345/global/networks/myVPC`.
+   * [Format](/compute/docs/reference/rest/v1/networks/insert)
+   * is of the form `projects/{project}/global/networks/{network}`.
+   * Where {project} is a project number, as in `12345`, and {network} is a
+   * network name.
+   *
+   * To specify this field, you must have already [configured VPC Network
+   * Peering for Vertex
+   * AI](https://cloud.google.com/vertex-ai/docs/general/vpc-peering).
+   *
+   * If this field is left unspecified, the resources aren't peered with any
+   * network.
+   * 
+ * + * + * string network = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for network. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNetworkBytes() { + java.lang.Object ref = network_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + network_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENCRYPTION_SPEC_FIELD_NUMBER = 12; + private com.google.cloud.aiplatform.v1.EncryptionSpec encryptionSpec_; + /** + * + * + *
+   * Optional. Customer-managed encryption key spec for a PersistentResource.
+   * If set, this PersistentResource and all sub-resources of this
+   * PersistentResource will be secured by this key.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the encryptionSpec field is set. + */ + @java.lang.Override + public boolean hasEncryptionSpec() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+   * Optional. Customer-managed encryption key spec for a PersistentResource.
+   * If set, this PersistentResource and all sub-resources of this
+   * PersistentResource will be secured by this key.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The encryptionSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.EncryptionSpec getEncryptionSpec() { + return encryptionSpec_ == null + ? com.google.cloud.aiplatform.v1.EncryptionSpec.getDefaultInstance() + : encryptionSpec_; + } + /** + * + * + *
+   * Optional. Customer-managed encryption key spec for a PersistentResource.
+   * If set, this PersistentResource and all sub-resources of this
+   * PersistentResource will be secured by this key.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.EncryptionSpecOrBuilder getEncryptionSpecOrBuilder() { + return encryptionSpec_ == null + ? com.google.cloud.aiplatform.v1.EncryptionSpec.getDefaultInstance() + : encryptionSpec_; + } + + public static final int RESOURCE_RUNTIME_SPEC_FIELD_NUMBER = 13; + private com.google.cloud.aiplatform.v1.ResourceRuntimeSpec resourceRuntimeSpec_; + /** + * + * + *
+   * Optional. Persistent Resource runtime spec.
+   * For example, used for Ray cluster configuration.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ResourceRuntimeSpec resource_runtime_spec = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the resourceRuntimeSpec field is set. + */ + @java.lang.Override + public boolean hasResourceRuntimeSpec() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+   * Optional. Persistent Resource runtime spec.
+   * For example, used for Ray cluster configuration.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ResourceRuntimeSpec resource_runtime_spec = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The resourceRuntimeSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ResourceRuntimeSpec getResourceRuntimeSpec() { + return resourceRuntimeSpec_ == null + ? com.google.cloud.aiplatform.v1.ResourceRuntimeSpec.getDefaultInstance() + : resourceRuntimeSpec_; + } + /** + * + * + *
+   * Optional. Persistent Resource runtime spec.
+   * For example, used for Ray cluster configuration.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ResourceRuntimeSpec resource_runtime_spec = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ResourceRuntimeSpecOrBuilder + getResourceRuntimeSpecOrBuilder() { + return resourceRuntimeSpec_ == null + ? com.google.cloud.aiplatform.v1.ResourceRuntimeSpec.getDefaultInstance() + : resourceRuntimeSpec_; + } + + public static final int RESOURCE_RUNTIME_FIELD_NUMBER = 14; + private com.google.cloud.aiplatform.v1.ResourceRuntime resourceRuntime_; + /** + * + * + *
+   * Output only. Runtime information of the Persistent Resource.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ResourceRuntime resource_runtime = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the resourceRuntime field is set. + */ + @java.lang.Override + public boolean hasResourceRuntime() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+   * Output only. Runtime information of the Persistent Resource.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ResourceRuntime resource_runtime = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The resourceRuntime. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ResourceRuntime getResourceRuntime() { + return resourceRuntime_ == null + ? com.google.cloud.aiplatform.v1.ResourceRuntime.getDefaultInstance() + : resourceRuntime_; + } + /** + * + * + *
+   * Output only. Runtime information of the Persistent Resource.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ResourceRuntime resource_runtime = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ResourceRuntimeOrBuilder getResourceRuntimeOrBuilder() { + return resourceRuntime_ == null + ? com.google.cloud.aiplatform.v1.ResourceRuntime.getDefaultInstance() + : resourceRuntime_; + } + + public static final int RESERVED_IP_RANGES_FIELD_NUMBER = 15; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList reservedIpRanges_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Optional. A list of names for the reserved IP ranges under the VPC network
+   * that can be used for this persistent resource.
+   *
+   * If set, we will deploy the persistent resource within the provided IP
+   * ranges. Otherwise, the persistent resource is deployed to any IP
+   * ranges under the provided VPC network.
+   *
+   * Example: ['vertex-ai-ip-range'].
+   * 
+ * + * repeated string reserved_ip_ranges = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the reservedIpRanges. + */ + public com.google.protobuf.ProtocolStringList getReservedIpRangesList() { + return reservedIpRanges_; + } + /** + * + * + *
+   * Optional. A list of names for the reserved IP ranges under the VPC network
+   * that can be used for this persistent resource.
+   *
+   * If set, we will deploy the persistent resource within the provided IP
+   * ranges. Otherwise, the persistent resource is deployed to any IP
+   * ranges under the provided VPC network.
+   *
+   * Example: ['vertex-ai-ip-range'].
+   * 
+ * + * repeated string reserved_ip_ranges = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of reservedIpRanges. + */ + public int getReservedIpRangesCount() { + return reservedIpRanges_.size(); + } + /** + * + * + *
+   * Optional. A list of names for the reserved IP ranges under the VPC network
+   * that can be used for this persistent resource.
+   *
+   * If set, we will deploy the persistent resource within the provided IP
+   * ranges. Otherwise, the persistent resource is deployed to any IP
+   * ranges under the provided VPC network.
+   *
+   * Example: ['vertex-ai-ip-range'].
+   * 
+ * + * repeated string reserved_ip_ranges = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The reservedIpRanges at the given index. + */ + public java.lang.String getReservedIpRanges(int index) { + return reservedIpRanges_.get(index); + } + /** + * + * + *
+   * Optional. A list of names for the reserved IP ranges under the VPC network
+   * that can be used for this persistent resource.
+   *
+   * If set, we will deploy the persistent resource within the provided IP
+   * ranges. Otherwise, the persistent resource is deployed to any IP
+   * ranges under the provided VPC network.
+   *
+   * Example: ['vertex-ai-ip-range'].
+   * 
+ * + * repeated string reserved_ip_ranges = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the reservedIpRanges at the given index. + */ + public com.google.protobuf.ByteString getReservedIpRangesBytes(int index) { + return reservedIpRanges_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + for (int i = 0; i < resourcePools_.size(); i++) { + output.writeMessage(4, resourcePools_.get(i)); + } + if (state_ + != com.google.cloud.aiplatform.v1.PersistentResource.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(5, state_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(6, getError()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(7, getCreateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(8, getStartTime()); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(9, getUpdateTime()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 10); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(network_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 11, network_); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeMessage(12, getEncryptionSpec()); + } + if (((bitField0_ & 0x00000020) != 0)) { + output.writeMessage(13, getResourceRuntimeSpec()); + } + if (((bitField0_ & 0x00000040) != 0)) { + output.writeMessage(14, getResourceRuntime()); + } + for (int i = 0; i < reservedIpRanges_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 15, reservedIpRanges_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + for (int i = 0; i < resourcePools_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, resourcePools_.get(i)); + } + if (state_ + != com.google.cloud.aiplatform.v1.PersistentResource.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, state_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getError()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getCreateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getStartTime()); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getUpdateTime()); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, labels__); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(network_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, network_); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getEncryptionSpec()); + } + if (((bitField0_ & 0x00000020) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(13, getResourceRuntimeSpec()); + } + if (((bitField0_ & 0x00000040) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, getResourceRuntime()); + } + { + int dataSize = 0; + for (int i = 0; i < reservedIpRanges_.size(); i++) { + dataSize += computeStringSizeNoTag(reservedIpRanges_.getRaw(i)); + } + size += dataSize; + size += 1 * getReservedIpRangesList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.PersistentResource)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.PersistentResource other = + (com.google.cloud.aiplatform.v1.PersistentResource) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getResourcePoolsList().equals(other.getResourcePoolsList())) return false; + if (state_ != other.state_) return false; + if (hasError() != other.hasError()) return false; + if (hasError()) { + if (!getError().equals(other.getError())) return false; + } + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasStartTime() != other.hasStartTime()) return false; + if (hasStartTime()) { + if (!getStartTime().equals(other.getStartTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (!getNetwork().equals(other.getNetwork())) return false; + if (hasEncryptionSpec() != other.hasEncryptionSpec()) return false; + if (hasEncryptionSpec()) { + if (!getEncryptionSpec().equals(other.getEncryptionSpec())) return false; + } + if (hasResourceRuntimeSpec() != other.hasResourceRuntimeSpec()) return false; + if (hasResourceRuntimeSpec()) { + if (!getResourceRuntimeSpec().equals(other.getResourceRuntimeSpec())) return false; + } + if (hasResourceRuntime() != other.hasResourceRuntime()) return false; + if (hasResourceRuntime()) { + if (!getResourceRuntime().equals(other.getResourceRuntime())) return false; + } + if (!getReservedIpRangesList().equals(other.getReservedIpRangesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + if (getResourcePoolsCount() > 0) { + hash = (37 * hash) + RESOURCE_POOLS_FIELD_NUMBER; + hash = (53 * hash) + getResourcePoolsList().hashCode(); + } + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + if (hasError()) { + hash = (37 * hash) + ERROR_FIELD_NUMBER; + hash = (53 * hash) + getError().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (37 * hash) + NETWORK_FIELD_NUMBER; + hash = (53 * hash) + getNetwork().hashCode(); + if (hasEncryptionSpec()) { + hash = (37 * hash) + ENCRYPTION_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getEncryptionSpec().hashCode(); + } + if (hasResourceRuntimeSpec()) { + hash = (37 * hash) + RESOURCE_RUNTIME_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getResourceRuntimeSpec().hashCode(); + } + if (hasResourceRuntime()) { + hash = (37 * hash) + RESOURCE_RUNTIME_FIELD_NUMBER; + hash = (53 * hash) + getResourceRuntime().hashCode(); + } + if (getReservedIpRangesCount() > 0) { + hash = (37 * hash) + RESERVED_IP_RANGES_FIELD_NUMBER; + hash = (53 * hash) + getReservedIpRangesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.PersistentResource parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.PersistentResource parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.PersistentResource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.PersistentResource parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.PersistentResource parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.PersistentResource parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.PersistentResource parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.PersistentResource parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.PersistentResource parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.PersistentResource parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.PersistentResource parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.PersistentResource parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.aiplatform.v1.PersistentResource prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Represents long-lasting resources that are dedicated to users to runs custom
+   * workloads.
+   * A PersistentResource can have multiple node pools and each node
+   * pool can have its own machine spec.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.PersistentResource} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.PersistentResource) + com.google.cloud.aiplatform.v1.PersistentResourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.PersistentResourceProto + .internal_static_google_cloud_aiplatform_v1_PersistentResource_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 10: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 10: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.PersistentResourceProto + .internal_static_google_cloud_aiplatform_v1_PersistentResource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.PersistentResource.class, + com.google.cloud.aiplatform.v1.PersistentResource.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.PersistentResource.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getResourcePoolsFieldBuilder(); + getErrorFieldBuilder(); + getCreateTimeFieldBuilder(); + getStartTimeFieldBuilder(); + getUpdateTimeFieldBuilder(); + getEncryptionSpecFieldBuilder(); + getResourceRuntimeSpecFieldBuilder(); + getResourceRuntimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + displayName_ = ""; + if (resourcePoolsBuilder_ == null) { + resourcePools_ = java.util.Collections.emptyList(); + } else { + resourcePools_ = null; + resourcePoolsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + state_ = 0; + error_ = null; + if (errorBuilder_ != null) { + errorBuilder_.dispose(); + errorBuilder_ = null; + } + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + internalGetMutableLabels().clear(); + network_ = ""; + encryptionSpec_ = null; + if (encryptionSpecBuilder_ != null) { + encryptionSpecBuilder_.dispose(); + encryptionSpecBuilder_ = null; + } + resourceRuntimeSpec_ = null; + if (resourceRuntimeSpecBuilder_ != null) { + resourceRuntimeSpecBuilder_.dispose(); + resourceRuntimeSpecBuilder_ = null; + } + resourceRuntime_ = null; + if (resourceRuntimeBuilder_ != null) { + resourceRuntimeBuilder_.dispose(); + resourceRuntimeBuilder_ = null; + } + reservedIpRanges_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.PersistentResourceProto + .internal_static_google_cloud_aiplatform_v1_PersistentResource_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.PersistentResource getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.PersistentResource.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.PersistentResource build() { + com.google.cloud.aiplatform.v1.PersistentResource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.PersistentResource buildPartial() { + com.google.cloud.aiplatform.v1.PersistentResource result = + new com.google.cloud.aiplatform.v1.PersistentResource(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.aiplatform.v1.PersistentResource result) { + if (resourcePoolsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + resourcePools_ = java.util.Collections.unmodifiableList(resourcePools_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.resourcePools_ = resourcePools_; + } else { + result.resourcePools_ = resourcePoolsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.PersistentResource result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.state_ = state_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000010) != 0)) { + result.error_ = errorBuilder_ == null ? error_ : errorBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.startTime_ = startTimeBuilder_ == null ? startTime_ : startTimeBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.network_ = network_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.encryptionSpec_ = + encryptionSpecBuilder_ == null ? encryptionSpec_ : encryptionSpecBuilder_.build(); + to_bitField0_ |= 0x00000010; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.resourceRuntimeSpec_ = + resourceRuntimeSpecBuilder_ == null + ? resourceRuntimeSpec_ + : resourceRuntimeSpecBuilder_.build(); + to_bitField0_ |= 0x00000020; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.resourceRuntime_ = + resourceRuntimeBuilder_ == null ? resourceRuntime_ : resourceRuntimeBuilder_.build(); + to_bitField0_ |= 0x00000040; + } + if (((from_bitField0_ & 0x00002000) != 0)) { + reservedIpRanges_.makeImmutable(); + result.reservedIpRanges_ = reservedIpRanges_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.PersistentResource) { + return mergeFrom((com.google.cloud.aiplatform.v1.PersistentResource) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.PersistentResource other) { + if (other == com.google.cloud.aiplatform.v1.PersistentResource.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (resourcePoolsBuilder_ == null) { + if (!other.resourcePools_.isEmpty()) { + if (resourcePools_.isEmpty()) { + resourcePools_ = other.resourcePools_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureResourcePoolsIsMutable(); + resourcePools_.addAll(other.resourcePools_); + } + onChanged(); + } + } else { + if (!other.resourcePools_.isEmpty()) { + if (resourcePoolsBuilder_.isEmpty()) { + resourcePoolsBuilder_.dispose(); + resourcePoolsBuilder_ = null; + resourcePools_ = other.resourcePools_; + bitField0_ = (bitField0_ & ~0x00000004); + resourcePoolsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getResourcePoolsFieldBuilder() + : null; + } else { + resourcePoolsBuilder_.addAllMessages(other.resourcePools_); + } + } + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.hasError()) { + mergeError(other.getError()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000100; + if (!other.getNetwork().isEmpty()) { + network_ = other.network_; + bitField0_ |= 0x00000200; + onChanged(); + } + if (other.hasEncryptionSpec()) { + mergeEncryptionSpec(other.getEncryptionSpec()); + } + if (other.hasResourceRuntimeSpec()) { + mergeResourceRuntimeSpec(other.getResourceRuntimeSpec()); + } + if (other.hasResourceRuntime()) { + mergeResourceRuntime(other.getResourceRuntime()); + } + if (!other.reservedIpRanges_.isEmpty()) { + if (reservedIpRanges_.isEmpty()) { + reservedIpRanges_ = other.reservedIpRanges_; + bitField0_ |= 0x00002000; + } else { + ensureReservedIpRangesIsMutable(); + reservedIpRanges_.addAll(other.reservedIpRanges_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 34: + { + com.google.cloud.aiplatform.v1.ResourcePool m = + input.readMessage( + com.google.cloud.aiplatform.v1.ResourcePool.parser(), extensionRegistry); + if (resourcePoolsBuilder_ == null) { + ensureResourcePoolsIsMutable(); + resourcePools_.add(m); + } else { + resourcePoolsBuilder_.addMessage(m); + } + break; + } // case 34 + case 40: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 40 + case 50: + { + input.readMessage(getErrorFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 50 + case 58: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 58 + case 66: + { + input.readMessage(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 66 + case 74: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 74 + case 82: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000100; + break; + } // case 82 + case 90: + { + network_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case 90 + case 98: + { + input.readMessage(getEncryptionSpecFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000400; + break; + } // case 98 + case 106: + { + input.readMessage( + getResourceRuntimeSpecFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000800; + break; + } // case 106 + case 114: + { + input.readMessage(getResourceRuntimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00001000; + break; + } // case 114 + case 122: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureReservedIpRangesIsMutable(); + reservedIpRanges_.add(s); + break; + } // case 122 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Immutable. Resource name of a PersistentResource.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Immutable. Resource name of a PersistentResource.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Immutable. Resource name of a PersistentResource.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. Resource name of a PersistentResource.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. Resource name of a PersistentResource.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Optional. The display name of the PersistentResource.
+     * The name can be up to 128 characters long and can consist of any UTF-8
+     * characters.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The display name of the PersistentResource.
+     * The name can be up to 128 characters long and can consist of any UTF-8
+     * characters.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The display name of the PersistentResource.
+     * The name can be up to 128 characters long and can consist of any UTF-8
+     * characters.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The display name of the PersistentResource.
+     * The name can be up to 128 characters long and can consist of any UTF-8
+     * characters.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The display name of the PersistentResource.
+     * The name can be up to 128 characters long and can consist of any UTF-8
+     * characters.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.util.List resourcePools_ = + java.util.Collections.emptyList(); + + private void ensureResourcePoolsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + resourcePools_ = + new java.util.ArrayList(resourcePools_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.ResourcePool, + com.google.cloud.aiplatform.v1.ResourcePool.Builder, + com.google.cloud.aiplatform.v1.ResourcePoolOrBuilder> + resourcePoolsBuilder_; + + /** + * + * + *
+     * Required. The spec of the pools of different resources.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ResourcePool resource_pools = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List getResourcePoolsList() { + if (resourcePoolsBuilder_ == null) { + return java.util.Collections.unmodifiableList(resourcePools_); + } else { + return resourcePoolsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Required. The spec of the pools of different resources.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ResourcePool resource_pools = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getResourcePoolsCount() { + if (resourcePoolsBuilder_ == null) { + return resourcePools_.size(); + } else { + return resourcePoolsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Required. The spec of the pools of different resources.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ResourcePool resource_pools = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.ResourcePool getResourcePools(int index) { + if (resourcePoolsBuilder_ == null) { + return resourcePools_.get(index); + } else { + return resourcePoolsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Required. The spec of the pools of different resources.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ResourcePool resource_pools = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setResourcePools(int index, com.google.cloud.aiplatform.v1.ResourcePool value) { + if (resourcePoolsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResourcePoolsIsMutable(); + resourcePools_.set(index, value); + onChanged(); + } else { + resourcePoolsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. The spec of the pools of different resources.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ResourcePool resource_pools = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setResourcePools( + int index, com.google.cloud.aiplatform.v1.ResourcePool.Builder builderForValue) { + if (resourcePoolsBuilder_ == null) { + ensureResourcePoolsIsMutable(); + resourcePools_.set(index, builderForValue.build()); + onChanged(); + } else { + resourcePoolsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The spec of the pools of different resources.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ResourcePool resource_pools = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addResourcePools(com.google.cloud.aiplatform.v1.ResourcePool value) { + if (resourcePoolsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResourcePoolsIsMutable(); + resourcePools_.add(value); + onChanged(); + } else { + resourcePoolsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Required. The spec of the pools of different resources.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ResourcePool resource_pools = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addResourcePools(int index, com.google.cloud.aiplatform.v1.ResourcePool value) { + if (resourcePoolsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResourcePoolsIsMutable(); + resourcePools_.add(index, value); + onChanged(); + } else { + resourcePoolsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. The spec of the pools of different resources.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ResourcePool resource_pools = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addResourcePools( + com.google.cloud.aiplatform.v1.ResourcePool.Builder builderForValue) { + if (resourcePoolsBuilder_ == null) { + ensureResourcePoolsIsMutable(); + resourcePools_.add(builderForValue.build()); + onChanged(); + } else { + resourcePoolsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The spec of the pools of different resources.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ResourcePool resource_pools = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addResourcePools( + int index, com.google.cloud.aiplatform.v1.ResourcePool.Builder builderForValue) { + if (resourcePoolsBuilder_ == null) { + ensureResourcePoolsIsMutable(); + resourcePools_.add(index, builderForValue.build()); + onChanged(); + } else { + resourcePoolsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The spec of the pools of different resources.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ResourcePool resource_pools = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllResourcePools( + java.lang.Iterable values) { + if (resourcePoolsBuilder_ == null) { + ensureResourcePoolsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, resourcePools_); + onChanged(); + } else { + resourcePoolsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Required. The spec of the pools of different resources.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ResourcePool resource_pools = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearResourcePools() { + if (resourcePoolsBuilder_ == null) { + resourcePools_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + resourcePoolsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Required. The spec of the pools of different resources.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ResourcePool resource_pools = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeResourcePools(int index) { + if (resourcePoolsBuilder_ == null) { + ensureResourcePoolsIsMutable(); + resourcePools_.remove(index); + onChanged(); + } else { + resourcePoolsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Required. The spec of the pools of different resources.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ResourcePool resource_pools = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.ResourcePool.Builder getResourcePoolsBuilder(int index) { + return getResourcePoolsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Required. The spec of the pools of different resources.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ResourcePool resource_pools = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.ResourcePoolOrBuilder getResourcePoolsOrBuilder( + int index) { + if (resourcePoolsBuilder_ == null) { + return resourcePools_.get(index); + } else { + return resourcePoolsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Required. The spec of the pools of different resources.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ResourcePool resource_pools = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getResourcePoolsOrBuilderList() { + if (resourcePoolsBuilder_ != null) { + return resourcePoolsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(resourcePools_); + } + } + /** + * + * + *
+     * Required. The spec of the pools of different resources.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ResourcePool resource_pools = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.ResourcePool.Builder addResourcePoolsBuilder() { + return getResourcePoolsFieldBuilder() + .addBuilder(com.google.cloud.aiplatform.v1.ResourcePool.getDefaultInstance()); + } + /** + * + * + *
+     * Required. The spec of the pools of different resources.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ResourcePool resource_pools = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.ResourcePool.Builder addResourcePoolsBuilder(int index) { + return getResourcePoolsFieldBuilder() + .addBuilder(index, com.google.cloud.aiplatform.v1.ResourcePool.getDefaultInstance()); + } + /** + * + * + *
+     * Required. The spec of the pools of different resources.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ResourcePool resource_pools = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getResourcePoolsBuilderList() { + return getResourcePoolsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.ResourcePool, + com.google.cloud.aiplatform.v1.ResourcePool.Builder, + com.google.cloud.aiplatform.v1.ResourcePoolOrBuilder> + getResourcePoolsFieldBuilder() { + if (resourcePoolsBuilder_ == null) { + resourcePoolsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.ResourcePool, + com.google.cloud.aiplatform.v1.ResourcePool.Builder, + com.google.cloud.aiplatform.v1.ResourcePoolOrBuilder>( + resourcePools_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + resourcePools_ = null; + } + return resourcePoolsBuilder_; + } + + private int state_ = 0; + /** + * + * + *
+     * Output only. The detailed state of a Study.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.PersistentResource.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * Output only. The detailed state of a Study.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.PersistentResource.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The detailed state of a Study.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.PersistentResource.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.PersistentResource.State getState() { + com.google.cloud.aiplatform.v1.PersistentResource.State result = + com.google.cloud.aiplatform.v1.PersistentResource.State.forNumber(state_); + return result == null + ? com.google.cloud.aiplatform.v1.PersistentResource.State.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Output only. The detailed state of a Study.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.PersistentResource.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.aiplatform.v1.PersistentResource.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The detailed state of a Study.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.PersistentResource.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000008); + state_ = 0; + onChanged(); + return this; + } + + private com.google.rpc.Status error_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + errorBuilder_; + /** + * + * + *
+     * Output only. Only populated when persistent resource's state is `STOPPING`
+     * or `ERROR`.
+     * 
+ * + * .google.rpc.Status error = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the error field is set. + */ + public boolean hasError() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * Output only. Only populated when persistent resource's state is `STOPPING`
+     * or `ERROR`.
+     * 
+ * + * .google.rpc.Status error = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The error. + */ + public com.google.rpc.Status getError() { + if (errorBuilder_ == null) { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } else { + return errorBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Only populated when persistent resource's state is `STOPPING`
+     * or `ERROR`.
+     * 
+ * + * .google.rpc.Status error = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + error_ = value; + } else { + errorBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Only populated when persistent resource's state is `STOPPING`
+     * or `ERROR`.
+     * 
+ * + * .google.rpc.Status error = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setError(com.google.rpc.Status.Builder builderForValue) { + if (errorBuilder_ == null) { + error_ = builderForValue.build(); + } else { + errorBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Only populated when persistent resource's state is `STOPPING`
+     * or `ERROR`.
+     * 
+ * + * .google.rpc.Status error = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && error_ != null + && error_ != com.google.rpc.Status.getDefaultInstance()) { + getErrorBuilder().mergeFrom(value); + } else { + error_ = value; + } + } else { + errorBuilder_.mergeFrom(value); + } + if (error_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. Only populated when persistent resource's state is `STOPPING`
+     * or `ERROR`.
+     * 
+ * + * .google.rpc.Status error = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearError() { + bitField0_ = (bitField0_ & ~0x00000010); + error_ = null; + if (errorBuilder_ != null) { + errorBuilder_.dispose(); + errorBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Only populated when persistent resource's state is `STOPPING`
+     * or `ERROR`.
+     * 
+ * + * .google.rpc.Status error = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.rpc.Status.Builder getErrorBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getErrorFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Only populated when persistent resource's state is `STOPPING`
+     * or `ERROR`.
+     * 
+ * + * .google.rpc.Status error = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + if (errorBuilder_ != null) { + return errorBuilder_.getMessageOrBuilder(); + } else { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } + } + /** + * + * + *
+     * Output only. Only populated when persistent resource's state is `STOPPING`
+     * or `ERROR`.
+     * 
+ * + * .google.rpc.Status error = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getErrorFieldBuilder() { + if (errorBuilder_ == null) { + errorBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, + com.google.rpc.Status.Builder, + com.google.rpc.StatusOrBuilder>(getError(), getParentForChildren(), isClean()); + error_ = null; + } + return errorBuilder_; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. Time when the PersistentResource was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+     * Output only. Time when the PersistentResource was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time when the PersistentResource was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the PersistentResource was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the PersistentResource was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. Time when the PersistentResource was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000020); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the PersistentResource was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time when the PersistentResource was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. Time when the PersistentResource was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp startTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + startTimeBuilder_; + /** + * + * + *
+     * Output only. Time when the PersistentResource for the first time entered
+     * the `RUNNING` state.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+     * Output only. Time when the PersistentResource for the first time entered
+     * the `RUNNING` state.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The startTime. + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time when the PersistentResource for the first time entered
+     * the `RUNNING` state.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + } else { + startTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the PersistentResource for the first time entered
+     * the `RUNNING` state.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the PersistentResource for the first time entered
+     * the `RUNNING` state.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && startTime_ != null + && startTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getStartTimeBuilder().mergeFrom(value); + } else { + startTime_ = value; + } + } else { + startTimeBuilder_.mergeFrom(value); + } + if (startTime_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. Time when the PersistentResource for the first time entered
+     * the `RUNNING` state.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearStartTime() { + bitField0_ = (bitField0_ & ~0x00000040); + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the PersistentResource for the first time entered
+     * the `RUNNING` state.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getStartTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time when the PersistentResource for the first time entered
+     * the `RUNNING` state.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + } + /** + * + * + *
+     * Output only. Time when the PersistentResource for the first time entered
+     * the `RUNNING` state.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getStartTime(), getParentForChildren(), isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. Time when the PersistentResource was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * + * + *
+     * Output only. Time when the PersistentResource was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time when the PersistentResource was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the PersistentResource was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the PersistentResource was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000080; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. Time when the PersistentResource was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000080); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the PersistentResource was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time when the PersistentResource was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. Time when the PersistentResource was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000100; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * Optional. The labels with user-defined metadata to organize
+     * PersistentResource.
+     *
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     *
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * 
+ * + * map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * Optional. The labels with user-defined metadata to organize
+     * PersistentResource.
+     *
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     *
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * 
+ * + * map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Optional. The labels with user-defined metadata to organize
+     * PersistentResource.
+     *
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     *
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * 
+ * + * map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Optional. The labels with user-defined metadata to organize
+     * PersistentResource.
+     *
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     *
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * 
+ * + * map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000100); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Optional. The labels with user-defined metadata to organize
+     * PersistentResource.
+     *
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     *
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * 
+ * + * map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + bitField0_ |= 0x00000100; + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * Optional. The labels with user-defined metadata to organize
+     * PersistentResource.
+     *
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     *
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * 
+ * + * map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00000100; + return this; + } + /** + * + * + *
+     * Optional. The labels with user-defined metadata to organize
+     * PersistentResource.
+     *
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     *
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * 
+ * + * map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000100; + return this; + } + + private java.lang.Object network_ = ""; + /** + * + * + *
+     * Optional. The full name of the Compute Engine
+     * [network](/compute/docs/networks-and-firewalls#networks) to peered with
+     * Vertex AI to host the persistent resources.
+     * For example, `projects/12345/global/networks/myVPC`.
+     * [Format](/compute/docs/reference/rest/v1/networks/insert)
+     * is of the form `projects/{project}/global/networks/{network}`.
+     * Where {project} is a project number, as in `12345`, and {network} is a
+     * network name.
+     *
+     * To specify this field, you must have already [configured VPC Network
+     * Peering for Vertex
+     * AI](https://cloud.google.com/vertex-ai/docs/general/vpc-peering).
+     *
+     * If this field is left unspecified, the resources aren't peered with any
+     * network.
+     * 
+ * + * + * string network = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The network. + */ + public java.lang.String getNetwork() { + java.lang.Object ref = network_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + network_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The full name of the Compute Engine
+     * [network](/compute/docs/networks-and-firewalls#networks) to peered with
+     * Vertex AI to host the persistent resources.
+     * For example, `projects/12345/global/networks/myVPC`.
+     * [Format](/compute/docs/reference/rest/v1/networks/insert)
+     * is of the form `projects/{project}/global/networks/{network}`.
+     * Where {project} is a project number, as in `12345`, and {network} is a
+     * network name.
+     *
+     * To specify this field, you must have already [configured VPC Network
+     * Peering for Vertex
+     * AI](https://cloud.google.com/vertex-ai/docs/general/vpc-peering).
+     *
+     * If this field is left unspecified, the resources aren't peered with any
+     * network.
+     * 
+ * + * + * string network = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for network. + */ + public com.google.protobuf.ByteString getNetworkBytes() { + java.lang.Object ref = network_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + network_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The full name of the Compute Engine
+     * [network](/compute/docs/networks-and-firewalls#networks) to peered with
+     * Vertex AI to host the persistent resources.
+     * For example, `projects/12345/global/networks/myVPC`.
+     * [Format](/compute/docs/reference/rest/v1/networks/insert)
+     * is of the form `projects/{project}/global/networks/{network}`.
+     * Where {project} is a project number, as in `12345`, and {network} is a
+     * network name.
+     *
+     * To specify this field, you must have already [configured VPC Network
+     * Peering for Vertex
+     * AI](https://cloud.google.com/vertex-ai/docs/general/vpc-peering).
+     *
+     * If this field is left unspecified, the resources aren't peered with any
+     * network.
+     * 
+ * + * + * string network = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The network to set. + * @return This builder for chaining. + */ + public Builder setNetwork(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + network_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The full name of the Compute Engine
+     * [network](/compute/docs/networks-and-firewalls#networks) to peered with
+     * Vertex AI to host the persistent resources.
+     * For example, `projects/12345/global/networks/myVPC`.
+     * [Format](/compute/docs/reference/rest/v1/networks/insert)
+     * is of the form `projects/{project}/global/networks/{network}`.
+     * Where {project} is a project number, as in `12345`, and {network} is a
+     * network name.
+     *
+     * To specify this field, you must have already [configured VPC Network
+     * Peering for Vertex
+     * AI](https://cloud.google.com/vertex-ai/docs/general/vpc-peering).
+     *
+     * If this field is left unspecified, the resources aren't peered with any
+     * network.
+     * 
+ * + * + * string network = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearNetwork() { + network_ = getDefaultInstance().getNetwork(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The full name of the Compute Engine
+     * [network](/compute/docs/networks-and-firewalls#networks) to peered with
+     * Vertex AI to host the persistent resources.
+     * For example, `projects/12345/global/networks/myVPC`.
+     * [Format](/compute/docs/reference/rest/v1/networks/insert)
+     * is of the form `projects/{project}/global/networks/{network}`.
+     * Where {project} is a project number, as in `12345`, and {network} is a
+     * network name.
+     *
+     * To specify this field, you must have already [configured VPC Network
+     * Peering for Vertex
+     * AI](https://cloud.google.com/vertex-ai/docs/general/vpc-peering).
+     *
+     * If this field is left unspecified, the resources aren't peered with any
+     * network.
+     * 
+ * + * + * string network = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for network to set. + * @return This builder for chaining. + */ + public Builder setNetworkBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + network_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + private com.google.cloud.aiplatform.v1.EncryptionSpec encryptionSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.EncryptionSpec, + com.google.cloud.aiplatform.v1.EncryptionSpec.Builder, + com.google.cloud.aiplatform.v1.EncryptionSpecOrBuilder> + encryptionSpecBuilder_; + /** + * + * + *
+     * Optional. Customer-managed encryption key spec for a PersistentResource.
+     * If set, this PersistentResource and all sub-resources of this
+     * PersistentResource will be secured by this key.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the encryptionSpec field is set. + */ + public boolean hasEncryptionSpec() { + return ((bitField0_ & 0x00000400) != 0); + } + /** + * + * + *
+     * Optional. Customer-managed encryption key spec for a PersistentResource.
+     * If set, this PersistentResource and all sub-resources of this
+     * PersistentResource will be secured by this key.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The encryptionSpec. + */ + public com.google.cloud.aiplatform.v1.EncryptionSpec getEncryptionSpec() { + if (encryptionSpecBuilder_ == null) { + return encryptionSpec_ == null + ? com.google.cloud.aiplatform.v1.EncryptionSpec.getDefaultInstance() + : encryptionSpec_; + } else { + return encryptionSpecBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Customer-managed encryption key spec for a PersistentResource.
+     * If set, this PersistentResource and all sub-resources of this
+     * PersistentResource will be secured by this key.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setEncryptionSpec(com.google.cloud.aiplatform.v1.EncryptionSpec value) { + if (encryptionSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + encryptionSpec_ = value; + } else { + encryptionSpecBuilder_.setMessage(value); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Customer-managed encryption key spec for a PersistentResource.
+     * If set, this PersistentResource and all sub-resources of this
+     * PersistentResource will be secured by this key.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setEncryptionSpec( + com.google.cloud.aiplatform.v1.EncryptionSpec.Builder builderForValue) { + if (encryptionSpecBuilder_ == null) { + encryptionSpec_ = builderForValue.build(); + } else { + encryptionSpecBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Customer-managed encryption key spec for a PersistentResource.
+     * If set, this PersistentResource and all sub-resources of this
+     * PersistentResource will be secured by this key.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeEncryptionSpec(com.google.cloud.aiplatform.v1.EncryptionSpec value) { + if (encryptionSpecBuilder_ == null) { + if (((bitField0_ & 0x00000400) != 0) + && encryptionSpec_ != null + && encryptionSpec_ + != com.google.cloud.aiplatform.v1.EncryptionSpec.getDefaultInstance()) { + getEncryptionSpecBuilder().mergeFrom(value); + } else { + encryptionSpec_ = value; + } + } else { + encryptionSpecBuilder_.mergeFrom(value); + } + if (encryptionSpec_ != null) { + bitField0_ |= 0x00000400; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Optional. Customer-managed encryption key spec for a PersistentResource.
+     * If set, this PersistentResource and all sub-resources of this
+     * PersistentResource will be secured by this key.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearEncryptionSpec() { + bitField0_ = (bitField0_ & ~0x00000400); + encryptionSpec_ = null; + if (encryptionSpecBuilder_ != null) { + encryptionSpecBuilder_.dispose(); + encryptionSpecBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Customer-managed encryption key spec for a PersistentResource.
+     * If set, this PersistentResource and all sub-resources of this
+     * PersistentResource will be secured by this key.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1.EncryptionSpec.Builder getEncryptionSpecBuilder() { + bitField0_ |= 0x00000400; + onChanged(); + return getEncryptionSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Customer-managed encryption key spec for a PersistentResource.
+     * If set, this PersistentResource and all sub-resources of this
+     * PersistentResource will be secured by this key.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1.EncryptionSpecOrBuilder getEncryptionSpecOrBuilder() { + if (encryptionSpecBuilder_ != null) { + return encryptionSpecBuilder_.getMessageOrBuilder(); + } else { + return encryptionSpec_ == null + ? com.google.cloud.aiplatform.v1.EncryptionSpec.getDefaultInstance() + : encryptionSpec_; + } + } + /** + * + * + *
+     * Optional. Customer-managed encryption key spec for a PersistentResource.
+     * If set, this PersistentResource and all sub-resources of this
+     * PersistentResource will be secured by this key.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.EncryptionSpec, + com.google.cloud.aiplatform.v1.EncryptionSpec.Builder, + com.google.cloud.aiplatform.v1.EncryptionSpecOrBuilder> + getEncryptionSpecFieldBuilder() { + if (encryptionSpecBuilder_ == null) { + encryptionSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.EncryptionSpec, + com.google.cloud.aiplatform.v1.EncryptionSpec.Builder, + com.google.cloud.aiplatform.v1.EncryptionSpecOrBuilder>( + getEncryptionSpec(), getParentForChildren(), isClean()); + encryptionSpec_ = null; + } + return encryptionSpecBuilder_; + } + + private com.google.cloud.aiplatform.v1.ResourceRuntimeSpec resourceRuntimeSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.ResourceRuntimeSpec, + com.google.cloud.aiplatform.v1.ResourceRuntimeSpec.Builder, + com.google.cloud.aiplatform.v1.ResourceRuntimeSpecOrBuilder> + resourceRuntimeSpecBuilder_; + /** + * + * + *
+     * Optional. Persistent Resource runtime spec.
+     * For example, used for Ray cluster configuration.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ResourceRuntimeSpec resource_runtime_spec = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the resourceRuntimeSpec field is set. + */ + public boolean hasResourceRuntimeSpec() { + return ((bitField0_ & 0x00000800) != 0); + } + /** + * + * + *
+     * Optional. Persistent Resource runtime spec.
+     * For example, used for Ray cluster configuration.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ResourceRuntimeSpec resource_runtime_spec = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The resourceRuntimeSpec. + */ + public com.google.cloud.aiplatform.v1.ResourceRuntimeSpec getResourceRuntimeSpec() { + if (resourceRuntimeSpecBuilder_ == null) { + return resourceRuntimeSpec_ == null + ? com.google.cloud.aiplatform.v1.ResourceRuntimeSpec.getDefaultInstance() + : resourceRuntimeSpec_; + } else { + return resourceRuntimeSpecBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Persistent Resource runtime spec.
+     * For example, used for Ray cluster configuration.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ResourceRuntimeSpec resource_runtime_spec = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setResourceRuntimeSpec( + com.google.cloud.aiplatform.v1.ResourceRuntimeSpec value) { + if (resourceRuntimeSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + resourceRuntimeSpec_ = value; + } else { + resourceRuntimeSpecBuilder_.setMessage(value); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Persistent Resource runtime spec.
+     * For example, used for Ray cluster configuration.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ResourceRuntimeSpec resource_runtime_spec = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setResourceRuntimeSpec( + com.google.cloud.aiplatform.v1.ResourceRuntimeSpec.Builder builderForValue) { + if (resourceRuntimeSpecBuilder_ == null) { + resourceRuntimeSpec_ = builderForValue.build(); + } else { + resourceRuntimeSpecBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Persistent Resource runtime spec.
+     * For example, used for Ray cluster configuration.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ResourceRuntimeSpec resource_runtime_spec = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeResourceRuntimeSpec( + com.google.cloud.aiplatform.v1.ResourceRuntimeSpec value) { + if (resourceRuntimeSpecBuilder_ == null) { + if (((bitField0_ & 0x00000800) != 0) + && resourceRuntimeSpec_ != null + && resourceRuntimeSpec_ + != com.google.cloud.aiplatform.v1.ResourceRuntimeSpec.getDefaultInstance()) { + getResourceRuntimeSpecBuilder().mergeFrom(value); + } else { + resourceRuntimeSpec_ = value; + } + } else { + resourceRuntimeSpecBuilder_.mergeFrom(value); + } + if (resourceRuntimeSpec_ != null) { + bitField0_ |= 0x00000800; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Optional. Persistent Resource runtime spec.
+     * For example, used for Ray cluster configuration.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ResourceRuntimeSpec resource_runtime_spec = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearResourceRuntimeSpec() { + bitField0_ = (bitField0_ & ~0x00000800); + resourceRuntimeSpec_ = null; + if (resourceRuntimeSpecBuilder_ != null) { + resourceRuntimeSpecBuilder_.dispose(); + resourceRuntimeSpecBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Persistent Resource runtime spec.
+     * For example, used for Ray cluster configuration.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ResourceRuntimeSpec resource_runtime_spec = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1.ResourceRuntimeSpec.Builder + getResourceRuntimeSpecBuilder() { + bitField0_ |= 0x00000800; + onChanged(); + return getResourceRuntimeSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Persistent Resource runtime spec.
+     * For example, used for Ray cluster configuration.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ResourceRuntimeSpec resource_runtime_spec = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1.ResourceRuntimeSpecOrBuilder + getResourceRuntimeSpecOrBuilder() { + if (resourceRuntimeSpecBuilder_ != null) { + return resourceRuntimeSpecBuilder_.getMessageOrBuilder(); + } else { + return resourceRuntimeSpec_ == null + ? com.google.cloud.aiplatform.v1.ResourceRuntimeSpec.getDefaultInstance() + : resourceRuntimeSpec_; + } + } + /** + * + * + *
+     * Optional. Persistent Resource runtime spec.
+     * For example, used for Ray cluster configuration.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ResourceRuntimeSpec resource_runtime_spec = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.ResourceRuntimeSpec, + com.google.cloud.aiplatform.v1.ResourceRuntimeSpec.Builder, + com.google.cloud.aiplatform.v1.ResourceRuntimeSpecOrBuilder> + getResourceRuntimeSpecFieldBuilder() { + if (resourceRuntimeSpecBuilder_ == null) { + resourceRuntimeSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.ResourceRuntimeSpec, + com.google.cloud.aiplatform.v1.ResourceRuntimeSpec.Builder, + com.google.cloud.aiplatform.v1.ResourceRuntimeSpecOrBuilder>( + getResourceRuntimeSpec(), getParentForChildren(), isClean()); + resourceRuntimeSpec_ = null; + } + return resourceRuntimeSpecBuilder_; + } + + private com.google.cloud.aiplatform.v1.ResourceRuntime resourceRuntime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.ResourceRuntime, + com.google.cloud.aiplatform.v1.ResourceRuntime.Builder, + com.google.cloud.aiplatform.v1.ResourceRuntimeOrBuilder> + resourceRuntimeBuilder_; + /** + * + * + *
+     * Output only. Runtime information of the Persistent Resource.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ResourceRuntime resource_runtime = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the resourceRuntime field is set. + */ + public boolean hasResourceRuntime() { + return ((bitField0_ & 0x00001000) != 0); + } + /** + * + * + *
+     * Output only. Runtime information of the Persistent Resource.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ResourceRuntime resource_runtime = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The resourceRuntime. + */ + public com.google.cloud.aiplatform.v1.ResourceRuntime getResourceRuntime() { + if (resourceRuntimeBuilder_ == null) { + return resourceRuntime_ == null + ? com.google.cloud.aiplatform.v1.ResourceRuntime.getDefaultInstance() + : resourceRuntime_; + } else { + return resourceRuntimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Runtime information of the Persistent Resource.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ResourceRuntime resource_runtime = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setResourceRuntime(com.google.cloud.aiplatform.v1.ResourceRuntime value) { + if (resourceRuntimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + resourceRuntime_ = value; + } else { + resourceRuntimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Runtime information of the Persistent Resource.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ResourceRuntime resource_runtime = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setResourceRuntime( + com.google.cloud.aiplatform.v1.ResourceRuntime.Builder builderForValue) { + if (resourceRuntimeBuilder_ == null) { + resourceRuntime_ = builderForValue.build(); + } else { + resourceRuntimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Runtime information of the Persistent Resource.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ResourceRuntime resource_runtime = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeResourceRuntime(com.google.cloud.aiplatform.v1.ResourceRuntime value) { + if (resourceRuntimeBuilder_ == null) { + if (((bitField0_ & 0x00001000) != 0) + && resourceRuntime_ != null + && resourceRuntime_ + != com.google.cloud.aiplatform.v1.ResourceRuntime.getDefaultInstance()) { + getResourceRuntimeBuilder().mergeFrom(value); + } else { + resourceRuntime_ = value; + } + } else { + resourceRuntimeBuilder_.mergeFrom(value); + } + if (resourceRuntime_ != null) { + bitField0_ |= 0x00001000; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. Runtime information of the Persistent Resource.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ResourceRuntime resource_runtime = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearResourceRuntime() { + bitField0_ = (bitField0_ & ~0x00001000); + resourceRuntime_ = null; + if (resourceRuntimeBuilder_ != null) { + resourceRuntimeBuilder_.dispose(); + resourceRuntimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Runtime information of the Persistent Resource.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ResourceRuntime resource_runtime = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.ResourceRuntime.Builder getResourceRuntimeBuilder() { + bitField0_ |= 0x00001000; + onChanged(); + return getResourceRuntimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Runtime information of the Persistent Resource.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ResourceRuntime resource_runtime = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.ResourceRuntimeOrBuilder getResourceRuntimeOrBuilder() { + if (resourceRuntimeBuilder_ != null) { + return resourceRuntimeBuilder_.getMessageOrBuilder(); + } else { + return resourceRuntime_ == null + ? com.google.cloud.aiplatform.v1.ResourceRuntime.getDefaultInstance() + : resourceRuntime_; + } + } + /** + * + * + *
+     * Output only. Runtime information of the Persistent Resource.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ResourceRuntime resource_runtime = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.ResourceRuntime, + com.google.cloud.aiplatform.v1.ResourceRuntime.Builder, + com.google.cloud.aiplatform.v1.ResourceRuntimeOrBuilder> + getResourceRuntimeFieldBuilder() { + if (resourceRuntimeBuilder_ == null) { + resourceRuntimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.ResourceRuntime, + com.google.cloud.aiplatform.v1.ResourceRuntime.Builder, + com.google.cloud.aiplatform.v1.ResourceRuntimeOrBuilder>( + getResourceRuntime(), getParentForChildren(), isClean()); + resourceRuntime_ = null; + } + return resourceRuntimeBuilder_; + } + + private com.google.protobuf.LazyStringArrayList reservedIpRanges_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureReservedIpRangesIsMutable() { + if (!reservedIpRanges_.isModifiable()) { + reservedIpRanges_ = new com.google.protobuf.LazyStringArrayList(reservedIpRanges_); + } + bitField0_ |= 0x00002000; + } + /** + * + * + *
+     * Optional. A list of names for the reserved IP ranges under the VPC network
+     * that can be used for this persistent resource.
+     *
+     * If set, we will deploy the persistent resource within the provided IP
+     * ranges. Otherwise, the persistent resource is deployed to any IP
+     * ranges under the provided VPC network.
+     *
+     * Example: ['vertex-ai-ip-range'].
+     * 
+ * + * repeated string reserved_ip_ranges = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the reservedIpRanges. + */ + public com.google.protobuf.ProtocolStringList getReservedIpRangesList() { + reservedIpRanges_.makeImmutable(); + return reservedIpRanges_; + } + /** + * + * + *
+     * Optional. A list of names for the reserved IP ranges under the VPC network
+     * that can be used for this persistent resource.
+     *
+     * If set, we will deploy the persistent resource within the provided IP
+     * ranges. Otherwise, the persistent resource is deployed to any IP
+     * ranges under the provided VPC network.
+     *
+     * Example: ['vertex-ai-ip-range'].
+     * 
+ * + * repeated string reserved_ip_ranges = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of reservedIpRanges. + */ + public int getReservedIpRangesCount() { + return reservedIpRanges_.size(); + } + /** + * + * + *
+     * Optional. A list of names for the reserved IP ranges under the VPC network
+     * that can be used for this persistent resource.
+     *
+     * If set, we will deploy the persistent resource within the provided IP
+     * ranges. Otherwise, the persistent resource is deployed to any IP
+     * ranges under the provided VPC network.
+     *
+     * Example: ['vertex-ai-ip-range'].
+     * 
+ * + * repeated string reserved_ip_ranges = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The reservedIpRanges at the given index. + */ + public java.lang.String getReservedIpRanges(int index) { + return reservedIpRanges_.get(index); + } + /** + * + * + *
+     * Optional. A list of names for the reserved IP ranges under the VPC network
+     * that can be used for this persistent resource.
+     *
+     * If set, we will deploy the persistent resource within the provided IP
+     * ranges. Otherwise, the persistent resource is deployed to any IP
+     * ranges under the provided VPC network.
+     *
+     * Example: ['vertex-ai-ip-range'].
+     * 
+ * + * repeated string reserved_ip_ranges = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the reservedIpRanges at the given index. + */ + public com.google.protobuf.ByteString getReservedIpRangesBytes(int index) { + return reservedIpRanges_.getByteString(index); + } + /** + * + * + *
+     * Optional. A list of names for the reserved IP ranges under the VPC network
+     * that can be used for this persistent resource.
+     *
+     * If set, we will deploy the persistent resource within the provided IP
+     * ranges. Otherwise, the persistent resource is deployed to any IP
+     * ranges under the provided VPC network.
+     *
+     * Example: ['vertex-ai-ip-range'].
+     * 
+ * + * repeated string reserved_ip_ranges = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The reservedIpRanges to set. + * @return This builder for chaining. + */ + public Builder setReservedIpRanges(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureReservedIpRangesIsMutable(); + reservedIpRanges_.set(index, value); + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A list of names for the reserved IP ranges under the VPC network
+     * that can be used for this persistent resource.
+     *
+     * If set, we will deploy the persistent resource within the provided IP
+     * ranges. Otherwise, the persistent resource is deployed to any IP
+     * ranges under the provided VPC network.
+     *
+     * Example: ['vertex-ai-ip-range'].
+     * 
+ * + * repeated string reserved_ip_ranges = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The reservedIpRanges to add. + * @return This builder for chaining. + */ + public Builder addReservedIpRanges(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureReservedIpRangesIsMutable(); + reservedIpRanges_.add(value); + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A list of names for the reserved IP ranges under the VPC network
+     * that can be used for this persistent resource.
+     *
+     * If set, we will deploy the persistent resource within the provided IP
+     * ranges. Otherwise, the persistent resource is deployed to any IP
+     * ranges under the provided VPC network.
+     *
+     * Example: ['vertex-ai-ip-range'].
+     * 
+ * + * repeated string reserved_ip_ranges = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The reservedIpRanges to add. + * @return This builder for chaining. + */ + public Builder addAllReservedIpRanges(java.lang.Iterable values) { + ensureReservedIpRangesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, reservedIpRanges_); + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A list of names for the reserved IP ranges under the VPC network
+     * that can be used for this persistent resource.
+     *
+     * If set, we will deploy the persistent resource within the provided IP
+     * ranges. Otherwise, the persistent resource is deployed to any IP
+     * ranges under the provided VPC network.
+     *
+     * Example: ['vertex-ai-ip-range'].
+     * 
+ * + * repeated string reserved_ip_ranges = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearReservedIpRanges() { + reservedIpRanges_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00002000); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A list of names for the reserved IP ranges under the VPC network
+     * that can be used for this persistent resource.
+     *
+     * If set, we will deploy the persistent resource within the provided IP
+     * ranges. Otherwise, the persistent resource is deployed to any IP
+     * ranges under the provided VPC network.
+     *
+     * Example: ['vertex-ai-ip-range'].
+     * 
+ * + * repeated string reserved_ip_ranges = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes of the reservedIpRanges to add. + * @return This builder for chaining. + */ + public Builder addReservedIpRangesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureReservedIpRangesIsMutable(); + reservedIpRanges_.add(value); + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.PersistentResource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.PersistentResource) + private static final com.google.cloud.aiplatform.v1.PersistentResource DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.PersistentResource(); + } + + public static com.google.cloud.aiplatform.v1.PersistentResource getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PersistentResource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.PersistentResource getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PersistentResourceName.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PersistentResourceName.java new file mode 100644 index 000000000000..5ea1fd2e5ab1 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PersistentResourceName.java @@ -0,0 +1,231 @@ +/* + * Copyright 2024 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.aiplatform.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 PersistentResourceName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_PERSISTENT_RESOURCE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/persistentResources/{persistent_resource}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String persistentResource; + + @Deprecated + protected PersistentResourceName() { + project = null; + location = null; + persistentResource = null; + } + + private PersistentResourceName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + persistentResource = Preconditions.checkNotNull(builder.getPersistentResource()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getPersistentResource() { + return persistentResource; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static PersistentResourceName of( + String project, String location, String persistentResource) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setPersistentResource(persistentResource) + .build(); + } + + public static String format(String project, String location, String persistentResource) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setPersistentResource(persistentResource) + .build() + .toString(); + } + + public static PersistentResourceName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_PERSISTENT_RESOURCE.validatedMatch( + formattedString, "PersistentResourceName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), matchMap.get("location"), matchMap.get("persistent_resource")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (PersistentResourceName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_PERSISTENT_RESOURCE.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (persistentResource != null) { + fieldMapBuilder.put("persistent_resource", persistentResource); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_PERSISTENT_RESOURCE.instantiate( + "project", project, "location", location, "persistent_resource", persistentResource); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + PersistentResourceName that = ((PersistentResourceName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.persistentResource, that.persistentResource); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(persistentResource); + return h; + } + + /** + * Builder for projects/{project}/locations/{location}/persistentResources/{persistent_resource}. + */ + public static class Builder { + private String project; + private String location; + private String persistentResource; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getPersistentResource() { + return persistentResource; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setPersistentResource(String persistentResource) { + this.persistentResource = persistentResource; + return this; + } + + private Builder(PersistentResourceName persistentResourceName) { + this.project = persistentResourceName.project; + this.location = persistentResourceName.location; + this.persistentResource = persistentResourceName.persistentResource; + } + + public PersistentResourceName build() { + return new PersistentResourceName(this); + } + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PersistentResourceOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PersistentResourceOrBuilder.java new file mode 100644 index 000000000000..be3f8dbd61ee --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PersistentResourceOrBuilder.java @@ -0,0 +1,687 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/persistent_resource.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +public interface PersistentResourceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.PersistentResource) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Immutable. Resource name of a PersistentResource.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Immutable. Resource name of a PersistentResource.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. The display name of the PersistentResource.
+   * The name can be up to 128 characters long and can consist of any UTF-8
+   * characters.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Optional. The display name of the PersistentResource.
+   * The name can be up to 128 characters long and can consist of any UTF-8
+   * characters.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Required. The spec of the pools of different resources.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ResourcePool resource_pools = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List getResourcePoolsList(); + /** + * + * + *
+   * Required. The spec of the pools of different resources.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ResourcePool resource_pools = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1.ResourcePool getResourcePools(int index); + /** + * + * + *
+   * Required. The spec of the pools of different resources.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ResourcePool resource_pools = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getResourcePoolsCount(); + /** + * + * + *
+   * Required. The spec of the pools of different resources.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ResourcePool resource_pools = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getResourcePoolsOrBuilderList(); + /** + * + * + *
+   * Required. The spec of the pools of different resources.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ResourcePool resource_pools = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1.ResourcePoolOrBuilder getResourcePoolsOrBuilder(int index); + + /** + * + * + *
+   * Output only. The detailed state of a Study.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.PersistentResource.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Output only. The detailed state of a Study.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.PersistentResource.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.aiplatform.v1.PersistentResource.State getState(); + + /** + * + * + *
+   * Output only. Only populated when persistent resource's state is `STOPPING`
+   * or `ERROR`.
+   * 
+ * + * .google.rpc.Status error = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the error field is set. + */ + boolean hasError(); + /** + * + * + *
+   * Output only. Only populated when persistent resource's state is `STOPPING`
+   * or `ERROR`.
+   * 
+ * + * .google.rpc.Status error = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The error. + */ + com.google.rpc.Status getError(); + /** + * + * + *
+   * Output only. Only populated when persistent resource's state is `STOPPING`
+   * or `ERROR`.
+   * 
+ * + * .google.rpc.Status error = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.rpc.StatusOrBuilder getErrorOrBuilder(); + + /** + * + * + *
+   * Output only. Time when the PersistentResource was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Time when the PersistentResource was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Time when the PersistentResource was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Time when the PersistentResource for the first time entered
+   * the `RUNNING` state.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + /** + * + * + *
+   * Output only. Time when the PersistentResource for the first time entered
+   * the `RUNNING` state.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + /** + * + * + *
+   * Output only. Time when the PersistentResource for the first time entered
+   * the `RUNNING` state.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Time when the PersistentResource was most recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. Time when the PersistentResource was most recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. Time when the PersistentResource was most recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Optional. The labels with user-defined metadata to organize
+   * PersistentResource.
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   *
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + int getLabelsCount(); + /** + * + * + *
+   * Optional. The labels with user-defined metadata to organize
+   * PersistentResource.
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   *
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Optional. The labels with user-defined metadata to organize
+   * PersistentResource.
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   *
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Optional. The labels with user-defined metadata to organize
+   * PersistentResource.
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   *
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Optional. The labels with user-defined metadata to organize
+   * PersistentResource.
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   *
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Optional. The full name of the Compute Engine
+   * [network](/compute/docs/networks-and-firewalls#networks) to peered with
+   * Vertex AI to host the persistent resources.
+   * For example, `projects/12345/global/networks/myVPC`.
+   * [Format](/compute/docs/reference/rest/v1/networks/insert)
+   * is of the form `projects/{project}/global/networks/{network}`.
+   * Where {project} is a project number, as in `12345`, and {network} is a
+   * network name.
+   *
+   * To specify this field, you must have already [configured VPC Network
+   * Peering for Vertex
+   * AI](https://cloud.google.com/vertex-ai/docs/general/vpc-peering).
+   *
+   * If this field is left unspecified, the resources aren't peered with any
+   * network.
+   * 
+ * + * + * string network = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The network. + */ + java.lang.String getNetwork(); + /** + * + * + *
+   * Optional. The full name of the Compute Engine
+   * [network](/compute/docs/networks-and-firewalls#networks) to peered with
+   * Vertex AI to host the persistent resources.
+   * For example, `projects/12345/global/networks/myVPC`.
+   * [Format](/compute/docs/reference/rest/v1/networks/insert)
+   * is of the form `projects/{project}/global/networks/{network}`.
+   * Where {project} is a project number, as in `12345`, and {network} is a
+   * network name.
+   *
+   * To specify this field, you must have already [configured VPC Network
+   * Peering for Vertex
+   * AI](https://cloud.google.com/vertex-ai/docs/general/vpc-peering).
+   *
+   * If this field is left unspecified, the resources aren't peered with any
+   * network.
+   * 
+ * + * + * string network = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for network. + */ + com.google.protobuf.ByteString getNetworkBytes(); + + /** + * + * + *
+   * Optional. Customer-managed encryption key spec for a PersistentResource.
+   * If set, this PersistentResource and all sub-resources of this
+   * PersistentResource will be secured by this key.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the encryptionSpec field is set. + */ + boolean hasEncryptionSpec(); + /** + * + * + *
+   * Optional. Customer-managed encryption key spec for a PersistentResource.
+   * If set, this PersistentResource and all sub-resources of this
+   * PersistentResource will be secured by this key.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The encryptionSpec. + */ + com.google.cloud.aiplatform.v1.EncryptionSpec getEncryptionSpec(); + /** + * + * + *
+   * Optional. Customer-managed encryption key spec for a PersistentResource.
+   * If set, this PersistentResource and all sub-resources of this
+   * PersistentResource will be secured by this key.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.aiplatform.v1.EncryptionSpecOrBuilder getEncryptionSpecOrBuilder(); + + /** + * + * + *
+   * Optional. Persistent Resource runtime spec.
+   * For example, used for Ray cluster configuration.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ResourceRuntimeSpec resource_runtime_spec = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the resourceRuntimeSpec field is set. + */ + boolean hasResourceRuntimeSpec(); + /** + * + * + *
+   * Optional. Persistent Resource runtime spec.
+   * For example, used for Ray cluster configuration.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ResourceRuntimeSpec resource_runtime_spec = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The resourceRuntimeSpec. + */ + com.google.cloud.aiplatform.v1.ResourceRuntimeSpec getResourceRuntimeSpec(); + /** + * + * + *
+   * Optional. Persistent Resource runtime spec.
+   * For example, used for Ray cluster configuration.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ResourceRuntimeSpec resource_runtime_spec = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.aiplatform.v1.ResourceRuntimeSpecOrBuilder getResourceRuntimeSpecOrBuilder(); + + /** + * + * + *
+   * Output only. Runtime information of the Persistent Resource.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ResourceRuntime resource_runtime = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the resourceRuntime field is set. + */ + boolean hasResourceRuntime(); + /** + * + * + *
+   * Output only. Runtime information of the Persistent Resource.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ResourceRuntime resource_runtime = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The resourceRuntime. + */ + com.google.cloud.aiplatform.v1.ResourceRuntime getResourceRuntime(); + /** + * + * + *
+   * Output only. Runtime information of the Persistent Resource.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ResourceRuntime resource_runtime = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.aiplatform.v1.ResourceRuntimeOrBuilder getResourceRuntimeOrBuilder(); + + /** + * + * + *
+   * Optional. A list of names for the reserved IP ranges under the VPC network
+   * that can be used for this persistent resource.
+   *
+   * If set, we will deploy the persistent resource within the provided IP
+   * ranges. Otherwise, the persistent resource is deployed to any IP
+   * ranges under the provided VPC network.
+   *
+   * Example: ['vertex-ai-ip-range'].
+   * 
+ * + * repeated string reserved_ip_ranges = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the reservedIpRanges. + */ + java.util.List getReservedIpRangesList(); + /** + * + * + *
+   * Optional. A list of names for the reserved IP ranges under the VPC network
+   * that can be used for this persistent resource.
+   *
+   * If set, we will deploy the persistent resource within the provided IP
+   * ranges. Otherwise, the persistent resource is deployed to any IP
+   * ranges under the provided VPC network.
+   *
+   * Example: ['vertex-ai-ip-range'].
+   * 
+ * + * repeated string reserved_ip_ranges = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of reservedIpRanges. + */ + int getReservedIpRangesCount(); + /** + * + * + *
+   * Optional. A list of names for the reserved IP ranges under the VPC network
+   * that can be used for this persistent resource.
+   *
+   * If set, we will deploy the persistent resource within the provided IP
+   * ranges. Otherwise, the persistent resource is deployed to any IP
+   * ranges under the provided VPC network.
+   *
+   * Example: ['vertex-ai-ip-range'].
+   * 
+ * + * repeated string reserved_ip_ranges = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The reservedIpRanges at the given index. + */ + java.lang.String getReservedIpRanges(int index); + /** + * + * + *
+   * Optional. A list of names for the reserved IP ranges under the VPC network
+   * that can be used for this persistent resource.
+   *
+   * If set, we will deploy the persistent resource within the provided IP
+   * ranges. Otherwise, the persistent resource is deployed to any IP
+   * ranges under the provided VPC network.
+   *
+   * Example: ['vertex-ai-ip-range'].
+   * 
+ * + * repeated string reserved_ip_ranges = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the reservedIpRanges at the given index. + */ + com.google.protobuf.ByteString getReservedIpRangesBytes(int index); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PersistentResourceProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PersistentResourceProto.java new file mode 100644 index 000000000000..65cfb7b2886a --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PersistentResourceProto.java @@ -0,0 +1,241 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/persistent_resource.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +public final class PersistentResourceProto { + private PersistentResourceProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_PersistentResource_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_PersistentResource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_PersistentResource_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_PersistentResource_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_ResourcePool_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ResourcePool_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_ResourcePool_AutoscalingSpec_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ResourcePool_AutoscalingSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_ResourceRuntimeSpec_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ResourceRuntimeSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_RaySpec_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_RaySpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_ResourceRuntime_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ResourceRuntime_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_ServiceAccountSpec_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ServiceAccountSpec_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n4google/cloud/aiplatform/v1/persistent_" + + "resource.proto\022\032google.cloud.aiplatform." + + "v1\032\037google/api/field_behavior.proto\032\031goo" + + "gle/api/resource.proto\0320google/cloud/aip" + + "latform/v1/encryption_spec.proto\0322google" + + "/cloud/aiplatform/v1/machine_resources.p" + + "roto\032\037google/protobuf/timestamp.proto\032\027g" + + "oogle/rpc/status.proto\"\336\010\n\022PersistentRes" + + "ource\022\021\n\004name\030\001 \001(\tB\003\340A\005\022\031\n\014display_name" + + "\030\002 \001(\tB\003\340A\001\022E\n\016resource_pools\030\004 \003(\0132(.go" + + "ogle.cloud.aiplatform.v1.ResourcePoolB\003\340" + + "A\002\022H\n\005state\030\005 \001(\01624.google.cloud.aiplatf" + + "orm.v1.PersistentResource.StateB\003\340A\003\022&\n\005" + + "error\030\006 \001(\0132\022.google.rpc.StatusB\003\340A\003\0224\n\013" + + "create_time\030\007 \001(\0132\032.google.protobuf.Time" + + "stampB\003\340A\003\0223\n\nstart_time\030\010 \001(\0132\032.google." + + "protobuf.TimestampB\003\340A\003\0224\n\013update_time\030\t" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022O\n" + + "\006labels\030\n \003(\0132:.google.cloud.aiplatform." + + "v1.PersistentResource.LabelsEntryB\003\340A\001\0227" + + "\n\007network\030\013 \001(\tB&\340A\001\372A \n\036compute.googlea" + + "pis.com/Network\022H\n\017encryption_spec\030\014 \001(\013" + + "2*.google.cloud.aiplatform.v1.Encryption" + + "SpecB\003\340A\001\022S\n\025resource_runtime_spec\030\r \001(\013" + + "2/.google.cloud.aiplatform.v1.ResourceRu" + + "ntimeSpecB\003\340A\001\022J\n\020resource_runtime\030\016 \001(\013" + + "2+.google.cloud.aiplatform.v1.ResourceRu" + + "ntimeB\003\340A\003\022\037\n\022reserved_ip_ranges\030\017 \003(\tB\003" + + "\340A\001\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value" + + "\030\002 \001(\t:\0028\001\"s\n\005State\022\025\n\021STATE_UNSPECIFIED" + + "\020\000\022\020\n\014PROVISIONING\020\001\022\013\n\007RUNNING\020\003\022\014\n\010STO" + + "PPING\020\004\022\t\n\005ERROR\020\005\022\r\n\tREBOOTING\020\006\022\014\n\010UPD" + + "ATING\020\007:\205\001\352A\201\001\n,aiplatform.googleapis.co" + + "m/PersistentResource\022Qprojects/{project}" + + "/locations/{location}/persistentResource" + + "s/{persistent_resource}\"\333\003\n\014ResourcePool" + + "\022\017\n\002id\030\001 \001(\tB\003\340A\005\022E\n\014machine_spec\030\002 \001(\0132" + + "\'.google.cloud.aiplatform.v1.MachineSpec" + + "B\006\340A\002\340A\005\022\037\n\rreplica_count\030\003 \001(\003B\003\340A\001H\000\210\001" + + "\001\022<\n\tdisk_spec\030\004 \001(\0132$.google.cloud.aipl" + + "atform.v1.DiskSpecB\003\340A\001\022\037\n\022used_replica_" + + "count\030\006 \001(\003B\003\340A\003\022W\n\020autoscaling_spec\030\007 \001" + + "(\01328.google.cloud.aiplatform.v1.Resource" + + "Pool.AutoscalingSpecB\003\340A\001\032\207\001\n\017Autoscalin" + + "gSpec\022#\n\021min_replica_count\030\001 \001(\003B\003\340A\001H\000\210" + + "\001\001\022#\n\021max_replica_count\030\002 \001(\003B\003\340A\001H\001\210\001\001B" + + "\024\n\022_min_replica_countB\024\n\022_max_replica_co" + + "untB\020\n\016_replica_count\"\244\001\n\023ResourceRuntim" + + "eSpec\022Q\n\024service_account_spec\030\002 \001(\0132..go" + + "ogle.cloud.aiplatform.v1.ServiceAccountS" + + "pecB\003\340A\001\022:\n\010ray_spec\030\001 \001(\0132#.google.clou" + + "d.aiplatform.v1.RaySpecB\003\340A\001\"\t\n\007RaySpec\"" + + "\021\n\017ResourceRuntime\"^\n\022ServiceAccountSpec" + + "\022*\n\035enable_custom_service_account\030\001 \001(\010B" + + "\003\340A\002\022\034\n\017service_account\030\002 \001(\tB\003\340A\001B\325\001\n\036c" + + "om.google.cloud.aiplatform.v1B\027Persisten" + + "tResourceProtoP\001Z>cloud.google.com/go/ai" + + "platform/apiv1/aiplatformpb;aiplatformpb" + + "\252\002\032Google.Cloud.AIPlatform.V1\312\002\032Google\\C" + + "loud\\AIPlatform\\V1\352\002\035Google::Cloud::AIPl" + + "atform::V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.aiplatform.v1.EncryptionSpecProto.getDescriptor(), + com.google.cloud.aiplatform.v1.MachineResourcesProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.rpc.StatusProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1_PersistentResource_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1_PersistentResource_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_PersistentResource_descriptor, + new java.lang.String[] { + "Name", + "DisplayName", + "ResourcePools", + "State", + "Error", + "CreateTime", + "StartTime", + "UpdateTime", + "Labels", + "Network", + "EncryptionSpec", + "ResourceRuntimeSpec", + "ResourceRuntime", + "ReservedIpRanges", + }); + internal_static_google_cloud_aiplatform_v1_PersistentResource_LabelsEntry_descriptor = + internal_static_google_cloud_aiplatform_v1_PersistentResource_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_aiplatform_v1_PersistentResource_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_PersistentResource_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_aiplatform_v1_ResourcePool_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_aiplatform_v1_ResourcePool_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ResourcePool_descriptor, + new java.lang.String[] { + "Id", + "MachineSpec", + "ReplicaCount", + "DiskSpec", + "UsedReplicaCount", + "AutoscalingSpec", + }); + internal_static_google_cloud_aiplatform_v1_ResourcePool_AutoscalingSpec_descriptor = + internal_static_google_cloud_aiplatform_v1_ResourcePool_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_aiplatform_v1_ResourcePool_AutoscalingSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ResourcePool_AutoscalingSpec_descriptor, + new java.lang.String[] { + "MinReplicaCount", "MaxReplicaCount", + }); + internal_static_google_cloud_aiplatform_v1_ResourceRuntimeSpec_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_aiplatform_v1_ResourceRuntimeSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ResourceRuntimeSpec_descriptor, + new java.lang.String[] { + "ServiceAccountSpec", "RaySpec", + }); + internal_static_google_cloud_aiplatform_v1_RaySpec_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_aiplatform_v1_RaySpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_RaySpec_descriptor, + new java.lang.String[] {}); + internal_static_google_cloud_aiplatform_v1_ResourceRuntime_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_aiplatform_v1_ResourceRuntime_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ResourceRuntime_descriptor, + new java.lang.String[] {}); + internal_static_google_cloud_aiplatform_v1_ServiceAccountSpec_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_aiplatform_v1_ServiceAccountSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ServiceAccountSpec_descriptor, + new java.lang.String[] { + "EnableCustomServiceAccount", "ServiceAccount", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.aiplatform.v1.EncryptionSpecProto.getDescriptor(); + com.google.cloud.aiplatform.v1.MachineResourcesProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.rpc.StatusProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PersistentResourceServiceProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PersistentResourceServiceProto.java new file mode 100644 index 000000000000..9e2924a0cc9d --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PersistentResourceServiceProto.java @@ -0,0 +1,293 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/persistent_resource_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +public final class PersistentResourceServiceProto { + private PersistentResourceServiceProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_CreatePersistentResourceRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_CreatePersistentResourceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_CreatePersistentResourceOperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_CreatePersistentResourceOperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_UpdatePersistentResourceOperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_UpdatePersistentResourceOperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_RebootPersistentResourceOperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_RebootPersistentResourceOperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_GetPersistentResourceRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_GetPersistentResourceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_ListPersistentResourcesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ListPersistentResourcesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_ListPersistentResourcesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ListPersistentResourcesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_DeletePersistentResourceRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_DeletePersistentResourceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_UpdatePersistentResourceRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_UpdatePersistentResourceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_RebootPersistentResourceRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_RebootPersistentResourceRequest_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n/v1/{na" + + "me=projects/*/locations/*/persistentReso" + + "urces/*}:reboot:\001*\032M\312A\031aiplatform.google" + + "apis.com\322A.https://www.googleapis.com/au" + + "th/cloud-platformB\334\001\n\036com.google.cloud.a" + + "iplatform.v1B\036PersistentResourceServiceP" + + "rotoP\001Z>cloud.google.com/go/aiplatform/a" + + "piv1/aiplatformpb;aiplatformpb\252\002\032Google." + + "Cloud.AIPlatform.V1\312\002\032Google\\Cloud\\AIPla" + + "tform\\V1\352\002\035Google::Cloud::AIPlatform::V1" + + "b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.aiplatform.v1.OperationProto.getDescriptor(), + com.google.cloud.aiplatform.v1.PersistentResourceProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1_CreatePersistentResourceRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1_CreatePersistentResourceRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_CreatePersistentResourceRequest_descriptor, + new java.lang.String[] { + "Parent", "PersistentResource", "PersistentResourceId", + }); + internal_static_google_cloud_aiplatform_v1_CreatePersistentResourceOperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_aiplatform_v1_CreatePersistentResourceOperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_CreatePersistentResourceOperationMetadata_descriptor, + new java.lang.String[] { + "GenericMetadata", "ProgressMessage", + }); + internal_static_google_cloud_aiplatform_v1_UpdatePersistentResourceOperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_aiplatform_v1_UpdatePersistentResourceOperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_UpdatePersistentResourceOperationMetadata_descriptor, + new java.lang.String[] { + "GenericMetadata", "ProgressMessage", + }); + internal_static_google_cloud_aiplatform_v1_RebootPersistentResourceOperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_aiplatform_v1_RebootPersistentResourceOperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_RebootPersistentResourceOperationMetadata_descriptor, + new java.lang.String[] { + "GenericMetadata", "ProgressMessage", + }); + internal_static_google_cloud_aiplatform_v1_GetPersistentResourceRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_aiplatform_v1_GetPersistentResourceRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_GetPersistentResourceRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_aiplatform_v1_ListPersistentResourcesRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_aiplatform_v1_ListPersistentResourcesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ListPersistentResourcesRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_cloud_aiplatform_v1_ListPersistentResourcesResponse_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_aiplatform_v1_ListPersistentResourcesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ListPersistentResourcesResponse_descriptor, + new java.lang.String[] { + "PersistentResources", "NextPageToken", + }); + internal_static_google_cloud_aiplatform_v1_DeletePersistentResourceRequest_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_aiplatform_v1_DeletePersistentResourceRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_DeletePersistentResourceRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_aiplatform_v1_UpdatePersistentResourceRequest_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_aiplatform_v1_UpdatePersistentResourceRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_UpdatePersistentResourceRequest_descriptor, + new java.lang.String[] { + "PersistentResource", "UpdateMask", + }); + internal_static_google_cloud_aiplatform_v1_RebootPersistentResourceRequest_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_aiplatform_v1_RebootPersistentResourceRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_RebootPersistentResourceRequest_descriptor, + new java.lang.String[] { + "Name", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resourceReference); + registry.add(com.google.longrunning.OperationsProto.operationInfo); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.aiplatform.v1.OperationProto.getDescriptor(); + com.google.cloud.aiplatform.v1.PersistentResourceProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PredictionServiceProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PredictionServiceProto.java index 621ad6436eee..08a016006178 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PredictionServiceProto.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PredictionServiceProto.java @@ -217,114 +217,118 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "otobuf.ValueB\003\340A\002\022:\n\010contents\030\004 \003(\0132#.go" + "ogle.cloud.aiplatform.v1.ContentB\003\340A\002\"N\n" + "\023CountTokensResponse\022\024\n\014total_tokens\030\001 \001" - + "(\005\022!\n\031total_billable_characters\030\002 \001(\005\"\265\002" + + "(\005\022!\n\031total_billable_characters\030\002 \001(\005\"\227\003" + "\n\026GenerateContentRequest\022\022\n\005model\030\005 \001(\tB" + "\003\340A\002\022:\n\010contents\030\002 \003(\0132#.google.cloud.ai" - + "platform.v1.ContentB\003\340A\002\0224\n\005tools\030\006 \003(\0132" - + " .google.cloud.aiplatform.v1.ToolB\003\340A\001\022G" - + "\n\017safety_settings\030\003 \003(\0132).google.cloud.a" - + "iplatform.v1.SafetySettingB\003\340A\001\022L\n\021gener" - + "ation_config\030\004 \001(\0132,.google.cloud.aiplat" - + "form.v1.GenerationConfigB\003\340A\001\"\260\005\n\027Genera" - + "teContentResponse\022>\n\ncandidates\030\002 \003(\0132%." - + "google.cloud.aiplatform.v1.CandidateB\003\340A" - + "\003\022`\n\017prompt_feedback\030\003 \001(\0132B.google.clou" - + "d.aiplatform.v1.GenerateContentResponse." - + "PromptFeedbackB\003\340A\003\022Y\n\016usage_metadata\030\004 " - + "\001(\0132A.google.cloud.aiplatform.v1.Generat" - + "eContentResponse.UsageMetadata\032\257\002\n\016Promp" - + "tFeedback\022k\n\014block_reason\030\001 \001(\0162P.google" - + ".cloud.aiplatform.v1.GenerateContentResp" - + "onse.PromptFeedback.BlockedReasonB\003\340A\003\022E" - + "\n\016safety_ratings\030\002 \003(\0132(.google.cloud.ai" - + "platform.v1.SafetyRatingB\003\340A\003\022!\n\024block_r" - + "eason_message\030\003 \001(\tB\003\340A\003\"F\n\rBlockedReaso" - + "n\022\036\n\032BLOCKED_REASON_UNSPECIFIED\020\000\022\n\n\006SAF" - + "ETY\020\001\022\t\n\005OTHER\020\002\032f\n\rUsageMetadata\022\032\n\022pro" - + "mpt_token_count\030\001 \001(\005\022\036\n\026candidates_toke" - + "n_count\030\002 \001(\005\022\031\n\021total_token_count\030\003 \001(\005" - + "2\340\027\n\021PredictionService\022\224\002\n\007Predict\022*.goo" - + "gle.cloud.aiplatform.v1.PredictRequest\032+" - + ".google.cloud.aiplatform.v1.PredictRespo" - + "nse\"\257\001\332A\035endpoint,instances,parameters\202\323" - + "\344\223\002\210\001\"9/v1/{endpoint=projects/*/location" - + "s/*/endpoints/*}:predict:\001*ZH\"C/v1/{endp" - + "oint=projects/*/locations/*/publishers/*" - + "/models/*}:predict:\001*\022\376\001\n\nRawPredict\022-.g" - + "oogle.cloud.aiplatform.v1.RawPredictRequ" - + "est\032\024.google.api.HttpBody\"\252\001\332A\022endpoint," - + "http_body\202\323\344\223\002\216\001\"\"9/v1/{endpoint=projects/*/locatio" - + "ns/*/endpoints/*}:explain:\001*\022\247\002\n\017Generat" - + "eContent\0222.google.cloud.aiplatform.v1.Ge" - + "nerateContentRequest\0323.google.cloud.aipl" - + "atform.v1.GenerateContentResponse\"\252\001\332A\016m" - + "odel,contents\202\323\344\223\002\222\001\">/v1/{model=project" - + "s/*/locations/*/endpoints/*}:generateCon" - + "tent:\001*ZM\"H/v1/{model=projects/*/locatio" - + "ns/*/publishers/*/models/*}:generateCont" - + "ent:\001*\022\273\002\n\025StreamGenerateContent\0222.googl" - + "e.cloud.aiplatform.v1.GenerateContentReq" - + "uest\0323.google.cloud.aiplatform.v1.Genera" - + "teContentResponse\"\266\001\332A\016model,contents\202\323\344" - + "\223\002\236\001\"D/v1/{model=projects/*/locations/*/" - + "endpoints/*}:streamGenerateContent:\001*ZS\"" - + "N/v1/{model=projects/*/locations/*/publi" - + "shers/*/models/*}:streamGenerateContent:" - + "\001*0\001\032M\312A\031aiplatform.googleapis.com\322A.htt" - + "ps://www.googleapis.com/auth/cloud-platf" - + "ormB\324\001\n\036com.google.cloud.aiplatform.v1B\026" - + "PredictionServiceProtoP\001Z>cloud.google.c" - + "om/go/aiplatform/apiv1/aiplatformpb;aipl" - + "atformpb\252\002\032Google.Cloud.AIPlatform.V1\312\002\032" - + "Google\\Cloud\\AIPlatform\\V1\352\002\035Google::Clo" - + "ud::AIPlatform::V1b\006proto3" + + "platform.v1.ContentB\003\340A\002\022I\n\022system_instr" + + "uction\030\010 \001(\0132#.google.cloud.aiplatform.v" + + "1.ContentB\003\340A\001H\000\210\001\001\0224\n\005tools\030\006 \003(\0132 .goo" + + "gle.cloud.aiplatform.v1.ToolB\003\340A\001\022G\n\017saf" + + "ety_settings\030\003 \003(\0132).google.cloud.aiplat" + + "form.v1.SafetySettingB\003\340A\001\022L\n\021generation" + + "_config\030\004 \001(\0132,.google.cloud.aiplatform." + + "v1.GenerationConfigB\003\340A\001B\025\n\023_system_inst" + + "ruction\"\327\005\n\027GenerateContentResponse\022>\n\nc" + + "andidates\030\002 \003(\0132%.google.cloud.aiplatfor" + + "m.v1.CandidateB\003\340A\003\022`\n\017prompt_feedback\030\003" + + " \001(\0132B.google.cloud.aiplatform.v1.Genera" + + "teContentResponse.PromptFeedbackB\003\340A\003\022Y\n" + + "\016usage_metadata\030\004 \001(\0132A.google.cloud.aip" + + "latform.v1.GenerateContentResponse.Usage" + + "Metadata\032\326\002\n\016PromptFeedback\022k\n\014block_rea" + + "son\030\001 \001(\0162P.google.cloud.aiplatform.v1.G" + + "enerateContentResponse.PromptFeedback.Bl" + + "ockedReasonB\003\340A\003\022E\n\016safety_ratings\030\002 \003(\013" + + "2(.google.cloud.aiplatform.v1.SafetyRati" + + "ngB\003\340A\003\022!\n\024block_reason_message\030\003 \001(\tB\003\340" + + "A\003\"m\n\rBlockedReason\022\036\n\032BLOCKED_REASON_UN" + + "SPECIFIED\020\000\022\n\n\006SAFETY\020\001\022\t\n\005OTHER\020\002\022\r\n\tBL" + + "OCKLIST\020\003\022\026\n\022PROHIBITED_CONTENT\020\004\032f\n\rUsa" + + "geMetadata\022\032\n\022prompt_token_count\030\001 \001(\005\022\036" + + "\n\026candidates_token_count\030\002 \001(\005\022\031\n\021total_" + + "token_count\030\003 \001(\0052\340\027\n\021PredictionService\022" + + "\224\002\n\007Predict\022*.google.cloud.aiplatform.v1" + + ".PredictRequest\032+.google.cloud.aiplatfor" + + "m.v1.PredictResponse\"\257\001\332A\035endpoint,insta" + + "nces,parameters\202\323\344\223\002\210\001\"9/v1/{endpoint=pr" + + "ojects/*/locations/*/endpoints/*}:predic" + + "t:\001*ZH\"C/v1/{endpoint=projects/*/locatio" + + "ns/*/publishers/*/models/*}:predict:\001*\022\376" + + "\001\n\nRawPredict\022-.google.cloud.aiplatform." + + "v1.RawPredictRequest\032\024.google.api.HttpBo" + + "dy\"\252\001\332A\022endpoint,http_body\202\323\344\223\002\216\001\"\"9/v1/{endpoint=p" + + "rojects/*/locations/*/endpoints/*}:expla" + + "in:\001*\022\247\002\n\017GenerateContent\0222.google.cloud" + + ".aiplatform.v1.GenerateContentRequest\0323." + + "google.cloud.aiplatform.v1.GenerateConte" + + "ntResponse\"\252\001\332A\016model,contents\202\323\344\223\002\222\001\">/" + + "v1/{model=projects/*/locations/*/endpoin" + + "ts/*}:generateContent:\001*ZM\"H/v1/{model=p" + + "rojects/*/locations/*/publishers/*/model" + + "s/*}:generateContent:\001*\022\273\002\n\025StreamGenera" + + "teContent\0222.google.cloud.aiplatform.v1.G" + + "enerateContentRequest\0323.google.cloud.aip" + + "latform.v1.GenerateContentResponse\"\266\001\332A\016" + + "model,contents\202\323\344\223\002\236\001\"D/v1/{model=projec" + + "ts/*/locations/*/endpoints/*}:streamGene" + + "rateContent:\001*ZS\"N/v1/{model=projects/*/" + + "locations/*/publishers/*/models/*}:strea" + + "mGenerateContent:\001*0\001\032M\312A\031aiplatform.goo" + + "gleapis.com\322A.https://www.googleapis.com" + + "/auth/cloud-platformB\324\001\n\036com.google.clou" + + "d.aiplatform.v1B\026PredictionServiceProtoP" + + "\001Z>cloud.google.com/go/aiplatform/apiv1/" + + "aiplatformpb;aiplatformpb\252\002\032Google.Cloud" + + ".AIPlatform.V1\312\002\032Google\\Cloud\\AIPlatform" + + "\\V1\352\002\035Google::Cloud::AIPlatform::V1b\006pro" + + "to3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -512,7 +516,12 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_GenerateContentRequest_descriptor, new java.lang.String[] { - "Model", "Contents", "Tools", "SafetySettings", "GenerationConfig", + "Model", + "Contents", + "SystemInstruction", + "Tools", + "SafetySettings", + "GenerationConfig", }); internal_static_google_cloud_aiplatform_v1_GenerateContentResponse_descriptor = getDescriptor().getMessageTypes().get(21); diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/RaySpec.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/RaySpec.java new file mode 100644 index 000000000000..211e79a677a9 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/RaySpec.java @@ -0,0 +1,436 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/persistent_resource.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Configuration information for the Ray cluster.
+ * For experimental launch, Ray cluster creation and Persistent
+ * cluster creation are 1:1 mapping: We will provision all the nodes within the
+ * Persistent cluster as Ray nodes.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.RaySpec} + */ +public final class RaySpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.RaySpec) + RaySpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use RaySpec.newBuilder() to construct. + private RaySpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RaySpec() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RaySpec(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.PersistentResourceProto + .internal_static_google_cloud_aiplatform_v1_RaySpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.PersistentResourceProto + .internal_static_google_cloud_aiplatform_v1_RaySpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.RaySpec.class, + com.google.cloud.aiplatform.v1.RaySpec.Builder.class); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.RaySpec)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.RaySpec other = (com.google.cloud.aiplatform.v1.RaySpec) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.RaySpec parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.RaySpec parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.RaySpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.RaySpec parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.RaySpec parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.RaySpec parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.RaySpec parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.RaySpec parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.RaySpec parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.RaySpec parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.RaySpec parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.RaySpec parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.aiplatform.v1.RaySpec prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Configuration information for the Ray cluster.
+   * For experimental launch, Ray cluster creation and Persistent
+   * cluster creation are 1:1 mapping: We will provision all the nodes within the
+   * Persistent cluster as Ray nodes.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.RaySpec} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.RaySpec) + com.google.cloud.aiplatform.v1.RaySpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.PersistentResourceProto + .internal_static_google_cloud_aiplatform_v1_RaySpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.PersistentResourceProto + .internal_static_google_cloud_aiplatform_v1_RaySpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.RaySpec.class, + com.google.cloud.aiplatform.v1.RaySpec.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.RaySpec.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.PersistentResourceProto + .internal_static_google_cloud_aiplatform_v1_RaySpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.RaySpec getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.RaySpec.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.RaySpec build() { + com.google.cloud.aiplatform.v1.RaySpec result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.RaySpec buildPartial() { + com.google.cloud.aiplatform.v1.RaySpec result = + new com.google.cloud.aiplatform.v1.RaySpec(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.RaySpec) { + return mergeFrom((com.google.cloud.aiplatform.v1.RaySpec) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.RaySpec other) { + if (other == com.google.cloud.aiplatform.v1.RaySpec.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.RaySpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.RaySpec) + private static final com.google.cloud.aiplatform.v1.RaySpec DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.RaySpec(); + } + + public static com.google.cloud.aiplatform.v1.RaySpec getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RaySpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.RaySpec getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/RaySpecOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/RaySpecOrBuilder.java new file mode 100644 index 000000000000..294d699c8c9d --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/RaySpecOrBuilder.java @@ -0,0 +1,25 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/persistent_resource.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +public interface RaySpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.RaySpec) + com.google.protobuf.MessageOrBuilder {} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/RebootPersistentResourceOperationMetadata.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/RebootPersistentResourceOperationMetadata.java new file mode 100644 index 000000000000..a026eba2f84a --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/RebootPersistentResourceOperationMetadata.java @@ -0,0 +1,933 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/persistent_resource_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Details of operations that perform reboot PersistentResource.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.RebootPersistentResourceOperationMetadata} + */ +public final class RebootPersistentResourceOperationMetadata + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.RebootPersistentResourceOperationMetadata) + RebootPersistentResourceOperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use RebootPersistentResourceOperationMetadata.newBuilder() to construct. + private RebootPersistentResourceOperationMetadata( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RebootPersistentResourceOperationMetadata() { + progressMessage_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RebootPersistentResourceOperationMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.PersistentResourceServiceProto + .internal_static_google_cloud_aiplatform_v1_RebootPersistentResourceOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.PersistentResourceServiceProto + .internal_static_google_cloud_aiplatform_v1_RebootPersistentResourceOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.RebootPersistentResourceOperationMetadata.class, + com.google.cloud.aiplatform.v1.RebootPersistentResourceOperationMetadata.Builder.class); + } + + private int bitField0_; + public static final int GENERIC_METADATA_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1.GenericOperationMetadata genericMetadata_; + /** + * + * + *
+   * Operation metadata for PersistentResource.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + @java.lang.Override + public boolean hasGenericMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Operation metadata for PersistentResource.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata() { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + /** + * + * + *
+   * Operation metadata for PersistentResource.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder() { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + + public static final int PROGRESS_MESSAGE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object progressMessage_ = ""; + /** + * + * + *
+   * Progress Message for Reboot LRO
+   * 
+ * + * string progress_message = 2; + * + * @return The progressMessage. + */ + @java.lang.Override + public java.lang.String getProgressMessage() { + java.lang.Object ref = progressMessage_; + 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(); + progressMessage_ = s; + return s; + } + } + /** + * + * + *
+   * Progress Message for Reboot LRO
+   * 
+ * + * string progress_message = 2; + * + * @return The bytes for progressMessage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProgressMessageBytes() { + java.lang.Object ref = progressMessage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + progressMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getGenericMetadata()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(progressMessage_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, progressMessage_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getGenericMetadata()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(progressMessage_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, progressMessage_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.aiplatform.v1.RebootPersistentResourceOperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.RebootPersistentResourceOperationMetadata other = + (com.google.cloud.aiplatform.v1.RebootPersistentResourceOperationMetadata) obj; + + if (hasGenericMetadata() != other.hasGenericMetadata()) return false; + if (hasGenericMetadata()) { + if (!getGenericMetadata().equals(other.getGenericMetadata())) return false; + } + if (!getProgressMessage().equals(other.getProgressMessage())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasGenericMetadata()) { + hash = (37 * hash) + GENERIC_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getGenericMetadata().hashCode(); + } + hash = (37 * hash) + PROGRESS_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getProgressMessage().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.RebootPersistentResourceOperationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.RebootPersistentResourceOperationMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.RebootPersistentResourceOperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.RebootPersistentResourceOperationMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.RebootPersistentResourceOperationMetadata parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.RebootPersistentResourceOperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.RebootPersistentResourceOperationMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.RebootPersistentResourceOperationMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.RebootPersistentResourceOperationMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.RebootPersistentResourceOperationMetadata + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.RebootPersistentResourceOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.RebootPersistentResourceOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.RebootPersistentResourceOperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Details of operations that perform reboot PersistentResource.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.RebootPersistentResourceOperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.RebootPersistentResourceOperationMetadata) + com.google.cloud.aiplatform.v1.RebootPersistentResourceOperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.PersistentResourceServiceProto + .internal_static_google_cloud_aiplatform_v1_RebootPersistentResourceOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.PersistentResourceServiceProto + .internal_static_google_cloud_aiplatform_v1_RebootPersistentResourceOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.RebootPersistentResourceOperationMetadata.class, + com.google.cloud.aiplatform.v1.RebootPersistentResourceOperationMetadata.Builder + .class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.RebootPersistentResourceOperationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getGenericMetadataFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + genericMetadata_ = null; + if (genericMetadataBuilder_ != null) { + genericMetadataBuilder_.dispose(); + genericMetadataBuilder_ = null; + } + progressMessage_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.PersistentResourceServiceProto + .internal_static_google_cloud_aiplatform_v1_RebootPersistentResourceOperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.RebootPersistentResourceOperationMetadata + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.RebootPersistentResourceOperationMetadata + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.RebootPersistentResourceOperationMetadata build() { + com.google.cloud.aiplatform.v1.RebootPersistentResourceOperationMetadata result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.RebootPersistentResourceOperationMetadata buildPartial() { + com.google.cloud.aiplatform.v1.RebootPersistentResourceOperationMetadata result = + new com.google.cloud.aiplatform.v1.RebootPersistentResourceOperationMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1.RebootPersistentResourceOperationMetadata result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.genericMetadata_ = + genericMetadataBuilder_ == null ? genericMetadata_ : genericMetadataBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.progressMessage_ = progressMessage_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.aiplatform.v1.RebootPersistentResourceOperationMetadata) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.RebootPersistentResourceOperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.RebootPersistentResourceOperationMetadata other) { + if (other + == com.google.cloud.aiplatform.v1.RebootPersistentResourceOperationMetadata + .getDefaultInstance()) return this; + if (other.hasGenericMetadata()) { + mergeGenericMetadata(other.getGenericMetadata()); + } + if (!other.getProgressMessage().isEmpty()) { + progressMessage_ = other.progressMessage_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getGenericMetadataFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + progressMessage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.aiplatform.v1.GenericOperationMetadata genericMetadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder> + genericMetadataBuilder_; + /** + * + * + *
+     * Operation metadata for PersistentResource.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + public boolean hasGenericMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Operation metadata for PersistentResource.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata() { + if (genericMetadataBuilder_ == null) { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } else { + return genericMetadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Operation metadata for PersistentResource.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder setGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata value) { + if (genericMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + genericMetadata_ = value; + } else { + genericMetadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation metadata for PersistentResource.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder setGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder builderForValue) { + if (genericMetadataBuilder_ == null) { + genericMetadata_ = builderForValue.build(); + } else { + genericMetadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation metadata for PersistentResource.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder mergeGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata value) { + if (genericMetadataBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && genericMetadata_ != null + && genericMetadata_ + != com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance()) { + getGenericMetadataBuilder().mergeFrom(value); + } else { + genericMetadata_ = value; + } + } else { + genericMetadataBuilder_.mergeFrom(value); + } + if (genericMetadata_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Operation metadata for PersistentResource.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder clearGenericMetadata() { + bitField0_ = (bitField0_ & ~0x00000001); + genericMetadata_ = null; + if (genericMetadataBuilder_ != null) { + genericMetadataBuilder_.dispose(); + genericMetadataBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Operation metadata for PersistentResource.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder + getGenericMetadataBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getGenericMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Operation metadata for PersistentResource.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder() { + if (genericMetadataBuilder_ != null) { + return genericMetadataBuilder_.getMessageOrBuilder(); + } else { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + } + /** + * + * + *
+     * Operation metadata for PersistentResource.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder> + getGenericMetadataFieldBuilder() { + if (genericMetadataBuilder_ == null) { + genericMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder>( + getGenericMetadata(), getParentForChildren(), isClean()); + genericMetadata_ = null; + } + return genericMetadataBuilder_; + } + + private java.lang.Object progressMessage_ = ""; + /** + * + * + *
+     * Progress Message for Reboot LRO
+     * 
+ * + * string progress_message = 2; + * + * @return The progressMessage. + */ + public java.lang.String getProgressMessage() { + java.lang.Object ref = progressMessage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + progressMessage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Progress Message for Reboot LRO
+     * 
+ * + * string progress_message = 2; + * + * @return The bytes for progressMessage. + */ + public com.google.protobuf.ByteString getProgressMessageBytes() { + java.lang.Object ref = progressMessage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + progressMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Progress Message for Reboot LRO
+     * 
+ * + * string progress_message = 2; + * + * @param value The progressMessage to set. + * @return This builder for chaining. + */ + public Builder setProgressMessage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + progressMessage_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Progress Message for Reboot LRO
+     * 
+ * + * string progress_message = 2; + * + * @return This builder for chaining. + */ + public Builder clearProgressMessage() { + progressMessage_ = getDefaultInstance().getProgressMessage(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Progress Message for Reboot LRO
+     * 
+ * + * string progress_message = 2; + * + * @param value The bytes for progressMessage to set. + * @return This builder for chaining. + */ + public Builder setProgressMessageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + progressMessage_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.RebootPersistentResourceOperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.RebootPersistentResourceOperationMetadata) + private static final com.google.cloud.aiplatform.v1.RebootPersistentResourceOperationMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.RebootPersistentResourceOperationMetadata(); + } + + public static com.google.cloud.aiplatform.v1.RebootPersistentResourceOperationMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RebootPersistentResourceOperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.RebootPersistentResourceOperationMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/RebootPersistentResourceOperationMetadataOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/RebootPersistentResourceOperationMetadataOrBuilder.java new file mode 100644 index 000000000000..d98ba11148d7 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/RebootPersistentResourceOperationMetadataOrBuilder.java @@ -0,0 +1,86 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/persistent_resource_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +public interface RebootPersistentResourceOperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.RebootPersistentResourceOperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Operation metadata for PersistentResource.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + boolean hasGenericMetadata(); + /** + * + * + *
+   * Operation metadata for PersistentResource.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata(); + /** + * + * + *
+   * Operation metadata for PersistentResource.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder getGenericMetadataOrBuilder(); + + /** + * + * + *
+   * Progress Message for Reboot LRO
+   * 
+ * + * string progress_message = 2; + * + * @return The progressMessage. + */ + java.lang.String getProgressMessage(); + /** + * + * + *
+   * Progress Message for Reboot LRO
+   * 
+ * + * string progress_message = 2; + * + * @return The bytes for progressMessage. + */ + com.google.protobuf.ByteString getProgressMessageBytes(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/RebootPersistentResourceRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/RebootPersistentResourceRequest.java new file mode 100644 index 000000000000..96fc07103152 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/RebootPersistentResourceRequest.java @@ -0,0 +1,663 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/persistent_resource_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for
+ * [PersistentResourceService.RebootPersistentResource][google.cloud.aiplatform.v1.PersistentResourceService.RebootPersistentResource].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.RebootPersistentResourceRequest} + */ +public final class RebootPersistentResourceRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.RebootPersistentResourceRequest) + RebootPersistentResourceRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use RebootPersistentResourceRequest.newBuilder() to construct. + private RebootPersistentResourceRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RebootPersistentResourceRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RebootPersistentResourceRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.PersistentResourceServiceProto + .internal_static_google_cloud_aiplatform_v1_RebootPersistentResourceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.PersistentResourceServiceProto + .internal_static_google_cloud_aiplatform_v1_RebootPersistentResourceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.RebootPersistentResourceRequest.class, + com.google.cloud.aiplatform.v1.RebootPersistentResourceRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the PersistentResource resource.
+   * Format:
+   * `projects/{project_id_or_number}/locations/{location_id}/persistentResources/{persistent_resource_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the PersistentResource resource.
+   * Format:
+   * `projects/{project_id_or_number}/locations/{location_id}/persistentResources/{persistent_resource_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.RebootPersistentResourceRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.RebootPersistentResourceRequest other = + (com.google.cloud.aiplatform.v1.RebootPersistentResourceRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.RebootPersistentResourceRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.RebootPersistentResourceRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.RebootPersistentResourceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.RebootPersistentResourceRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.RebootPersistentResourceRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.RebootPersistentResourceRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.RebootPersistentResourceRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.RebootPersistentResourceRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.RebootPersistentResourceRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.RebootPersistentResourceRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.RebootPersistentResourceRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.RebootPersistentResourceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.RebootPersistentResourceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for
+   * [PersistentResourceService.RebootPersistentResource][google.cloud.aiplatform.v1.PersistentResourceService.RebootPersistentResource].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.RebootPersistentResourceRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.RebootPersistentResourceRequest) + com.google.cloud.aiplatform.v1.RebootPersistentResourceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.PersistentResourceServiceProto + .internal_static_google_cloud_aiplatform_v1_RebootPersistentResourceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.PersistentResourceServiceProto + .internal_static_google_cloud_aiplatform_v1_RebootPersistentResourceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.RebootPersistentResourceRequest.class, + com.google.cloud.aiplatform.v1.RebootPersistentResourceRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.RebootPersistentResourceRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.PersistentResourceServiceProto + .internal_static_google_cloud_aiplatform_v1_RebootPersistentResourceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.RebootPersistentResourceRequest + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.RebootPersistentResourceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.RebootPersistentResourceRequest build() { + com.google.cloud.aiplatform.v1.RebootPersistentResourceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.RebootPersistentResourceRequest buildPartial() { + com.google.cloud.aiplatform.v1.RebootPersistentResourceRequest result = + new com.google.cloud.aiplatform.v1.RebootPersistentResourceRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1.RebootPersistentResourceRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.RebootPersistentResourceRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.RebootPersistentResourceRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.RebootPersistentResourceRequest other) { + if (other + == com.google.cloud.aiplatform.v1.RebootPersistentResourceRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the PersistentResource resource.
+     * Format:
+     * `projects/{project_id_or_number}/locations/{location_id}/persistentResources/{persistent_resource_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the PersistentResource resource.
+     * Format:
+     * `projects/{project_id_or_number}/locations/{location_id}/persistentResources/{persistent_resource_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the PersistentResource resource.
+     * Format:
+     * `projects/{project_id_or_number}/locations/{location_id}/persistentResources/{persistent_resource_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the PersistentResource resource.
+     * Format:
+     * `projects/{project_id_or_number}/locations/{location_id}/persistentResources/{persistent_resource_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the PersistentResource resource.
+     * Format:
+     * `projects/{project_id_or_number}/locations/{location_id}/persistentResources/{persistent_resource_id}`
+     * 
+ * + * + * 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. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.RebootPersistentResourceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.RebootPersistentResourceRequest) + private static final com.google.cloud.aiplatform.v1.RebootPersistentResourceRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.RebootPersistentResourceRequest(); + } + + public static com.google.cloud.aiplatform.v1.RebootPersistentResourceRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RebootPersistentResourceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.RebootPersistentResourceRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/RebootPersistentResourceRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/RebootPersistentResourceRequestOrBuilder.java new file mode 100644 index 000000000000..8b8c9e0c48fe --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/RebootPersistentResourceRequestOrBuilder.java @@ -0,0 +1,59 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/persistent_resource_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +public interface RebootPersistentResourceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.RebootPersistentResourceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the PersistentResource resource.
+   * Format:
+   * `projects/{project_id_or_number}/locations/{location_id}/persistentResources/{persistent_resource_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the PersistentResource resource.
+   * Format:
+   * `projects/{project_id_or_number}/locations/{location_id}/persistentResources/{persistent_resource_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ResourcePool.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ResourcePool.java new file mode 100644 index 000000000000..7112076bca1c --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ResourcePool.java @@ -0,0 +1,2537 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/persistent_resource.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Represents the spec of a group of resources of the same type,
+ * for example machine type, disk, and accelerators, in a PersistentResource.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ResourcePool} + */ +public final class ResourcePool extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ResourcePool) + ResourcePoolOrBuilder { + private static final long serialVersionUID = 0L; + // Use ResourcePool.newBuilder() to construct. + private ResourcePool(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ResourcePool() { + id_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ResourcePool(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.PersistentResourceProto + .internal_static_google_cloud_aiplatform_v1_ResourcePool_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.PersistentResourceProto + .internal_static_google_cloud_aiplatform_v1_ResourcePool_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ResourcePool.class, + com.google.cloud.aiplatform.v1.ResourcePool.Builder.class); + } + + public interface AutoscalingSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Optional. min replicas in the node pool,
+     * must be ≤ replica_count and < max_replica_count or will throw error
+     * 
+ * + * optional int64 min_replica_count = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the minReplicaCount field is set. + */ + boolean hasMinReplicaCount(); + /** + * + * + *
+     * Optional. min replicas in the node pool,
+     * must be ≤ replica_count and < max_replica_count or will throw error
+     * 
+ * + * optional int64 min_replica_count = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The minReplicaCount. + */ + long getMinReplicaCount(); + + /** + * + * + *
+     * Optional. max replicas in the node pool,
+     * must be ≥ replica_count and > min_replica_count or will throw error
+     * 
+ * + * optional int64 max_replica_count = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the maxReplicaCount field is set. + */ + boolean hasMaxReplicaCount(); + /** + * + * + *
+     * Optional. max replicas in the node pool,
+     * must be ≥ replica_count and > min_replica_count or will throw error
+     * 
+ * + * optional int64 max_replica_count = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The maxReplicaCount. + */ + long getMaxReplicaCount(); + } + /** + * + * + *
+   * The min/max number of replicas allowed if enabling autoscaling
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec} + */ + public static final class AutoscalingSpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec) + AutoscalingSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use AutoscalingSpec.newBuilder() to construct. + private AutoscalingSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AutoscalingSpec() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AutoscalingSpec(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.PersistentResourceProto + .internal_static_google_cloud_aiplatform_v1_ResourcePool_AutoscalingSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.PersistentResourceProto + .internal_static_google_cloud_aiplatform_v1_ResourcePool_AutoscalingSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec.class, + com.google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec.Builder.class); + } + + private int bitField0_; + public static final int MIN_REPLICA_COUNT_FIELD_NUMBER = 1; + private long minReplicaCount_ = 0L; + /** + * + * + *
+     * Optional. min replicas in the node pool,
+     * must be ≤ replica_count and < max_replica_count or will throw error
+     * 
+ * + * optional int64 min_replica_count = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the minReplicaCount field is set. + */ + @java.lang.Override + public boolean hasMinReplicaCount() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Optional. min replicas in the node pool,
+     * must be ≤ replica_count and < max_replica_count or will throw error
+     * 
+ * + * optional int64 min_replica_count = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The minReplicaCount. + */ + @java.lang.Override + public long getMinReplicaCount() { + return minReplicaCount_; + } + + public static final int MAX_REPLICA_COUNT_FIELD_NUMBER = 2; + private long maxReplicaCount_ = 0L; + /** + * + * + *
+     * Optional. max replicas in the node pool,
+     * must be ≥ replica_count and > min_replica_count or will throw error
+     * 
+ * + * optional int64 max_replica_count = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the maxReplicaCount field is set. + */ + @java.lang.Override + public boolean hasMaxReplicaCount() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Optional. max replicas in the node pool,
+     * must be ≥ replica_count and > min_replica_count or will throw error
+     * 
+ * + * optional int64 max_replica_count = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The maxReplicaCount. + */ + @java.lang.Override + public long getMaxReplicaCount() { + return maxReplicaCount_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeInt64(1, minReplicaCount_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeInt64(2, maxReplicaCount_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, minReplicaCount_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, maxReplicaCount_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec other = + (com.google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec) obj; + + if (hasMinReplicaCount() != other.hasMinReplicaCount()) return false; + if (hasMinReplicaCount()) { + if (getMinReplicaCount() != other.getMinReplicaCount()) return false; + } + if (hasMaxReplicaCount() != other.hasMaxReplicaCount()) return false; + if (hasMaxReplicaCount()) { + if (getMaxReplicaCount() != other.getMaxReplicaCount()) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasMinReplicaCount()) { + hash = (37 * hash) + MIN_REPLICA_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getMinReplicaCount()); + } + if (hasMaxReplicaCount()) { + hash = (37 * hash) + MAX_REPLICA_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getMaxReplicaCount()); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * The min/max number of replicas allowed if enabling autoscaling
+     * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec) + com.google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.PersistentResourceProto + .internal_static_google_cloud_aiplatform_v1_ResourcePool_AutoscalingSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.PersistentResourceProto + .internal_static_google_cloud_aiplatform_v1_ResourcePool_AutoscalingSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec.class, + com.google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + minReplicaCount_ = 0L; + maxReplicaCount_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.PersistentResourceProto + .internal_static_google_cloud_aiplatform_v1_ResourcePool_AutoscalingSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec build() { + com.google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec buildPartial() { + com.google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec result = + new com.google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.minReplicaCount_ = minReplicaCount_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.maxReplicaCount_ = maxReplicaCount_; + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec) { + return mergeFrom((com.google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec other) { + if (other + == com.google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec.getDefaultInstance()) + return this; + if (other.hasMinReplicaCount()) { + setMinReplicaCount(other.getMinReplicaCount()); + } + if (other.hasMaxReplicaCount()) { + setMaxReplicaCount(other.getMaxReplicaCount()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + minReplicaCount_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + maxReplicaCount_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private long minReplicaCount_; + /** + * + * + *
+       * Optional. min replicas in the node pool,
+       * must be ≤ replica_count and < max_replica_count or will throw error
+       * 
+ * + * optional int64 min_replica_count = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the minReplicaCount field is set. + */ + @java.lang.Override + public boolean hasMinReplicaCount() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+       * Optional. min replicas in the node pool,
+       * must be ≤ replica_count and < max_replica_count or will throw error
+       * 
+ * + * optional int64 min_replica_count = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The minReplicaCount. + */ + @java.lang.Override + public long getMinReplicaCount() { + return minReplicaCount_; + } + /** + * + * + *
+       * Optional. min replicas in the node pool,
+       * must be ≤ replica_count and < max_replica_count or will throw error
+       * 
+ * + * optional int64 min_replica_count = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The minReplicaCount to set. + * @return This builder for chaining. + */ + public Builder setMinReplicaCount(long value) { + + minReplicaCount_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. min replicas in the node pool,
+       * must be ≤ replica_count and < max_replica_count or will throw error
+       * 
+ * + * optional int64 min_replica_count = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearMinReplicaCount() { + bitField0_ = (bitField0_ & ~0x00000001); + minReplicaCount_ = 0L; + onChanged(); + return this; + } + + private long maxReplicaCount_; + /** + * + * + *
+       * Optional. max replicas in the node pool,
+       * must be ≥ replica_count and > min_replica_count or will throw error
+       * 
+ * + * optional int64 max_replica_count = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the maxReplicaCount field is set. + */ + @java.lang.Override + public boolean hasMaxReplicaCount() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+       * Optional. max replicas in the node pool,
+       * must be ≥ replica_count and > min_replica_count or will throw error
+       * 
+ * + * optional int64 max_replica_count = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The maxReplicaCount. + */ + @java.lang.Override + public long getMaxReplicaCount() { + return maxReplicaCount_; + } + /** + * + * + *
+       * Optional. max replicas in the node pool,
+       * must be ≥ replica_count and > min_replica_count or will throw error
+       * 
+ * + * optional int64 max_replica_count = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The maxReplicaCount to set. + * @return This builder for chaining. + */ + public Builder setMaxReplicaCount(long value) { + + maxReplicaCount_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. max replicas in the node pool,
+       * must be ≥ replica_count and > min_replica_count or will throw error
+       * 
+ * + * optional int64 max_replica_count = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearMaxReplicaCount() { + bitField0_ = (bitField0_ & ~0x00000002); + maxReplicaCount_ = 0L; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec) + private static final com.google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec(); + } + + public static com.google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AutoscalingSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + * + * + *
+   * Immutable. The unique ID in a PersistentResource for referring to this
+   * resource pool. User can specify it if necessary. Otherwise, it's generated
+   * automatically.
+   * 
+ * + * string id = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + 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(); + id_ = s; + return s; + } + } + /** + * + * + *
+   * Immutable. The unique ID in a PersistentResource for referring to this
+   * resource pool. User can specify it if necessary. Otherwise, it's generated
+   * automatically.
+   * 
+ * + * string id = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MACHINE_SPEC_FIELD_NUMBER = 2; + private com.google.cloud.aiplatform.v1.MachineSpec machineSpec_; + /** + * + * + *
+   * Required. Immutable. The specification of a single machine.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MachineSpec machine_spec = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the machineSpec field is set. + */ + @java.lang.Override + public boolean hasMachineSpec() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. Immutable. The specification of a single machine.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MachineSpec machine_spec = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The machineSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.MachineSpec getMachineSpec() { + return machineSpec_ == null + ? com.google.cloud.aiplatform.v1.MachineSpec.getDefaultInstance() + : machineSpec_; + } + /** + * + * + *
+   * Required. Immutable. The specification of a single machine.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MachineSpec machine_spec = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.MachineSpecOrBuilder getMachineSpecOrBuilder() { + return machineSpec_ == null + ? com.google.cloud.aiplatform.v1.MachineSpec.getDefaultInstance() + : machineSpec_; + } + + public static final int REPLICA_COUNT_FIELD_NUMBER = 3; + private long replicaCount_ = 0L; + /** + * + * + *
+   * Optional. The total number of machines to use for this resource pool.
+   * 
+ * + * optional int64 replica_count = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the replicaCount field is set. + */ + @java.lang.Override + public boolean hasReplicaCount() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Optional. The total number of machines to use for this resource pool.
+   * 
+ * + * optional int64 replica_count = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The replicaCount. + */ + @java.lang.Override + public long getReplicaCount() { + return replicaCount_; + } + + public static final int DISK_SPEC_FIELD_NUMBER = 4; + private com.google.cloud.aiplatform.v1.DiskSpec diskSpec_; + /** + * + * + *
+   * Optional. Disk spec for the machine in this node pool.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.DiskSpec disk_spec = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the diskSpec field is set. + */ + @java.lang.Override + public boolean hasDiskSpec() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+   * Optional. Disk spec for the machine in this node pool.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.DiskSpec disk_spec = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The diskSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.DiskSpec getDiskSpec() { + return diskSpec_ == null + ? com.google.cloud.aiplatform.v1.DiskSpec.getDefaultInstance() + : diskSpec_; + } + /** + * + * + *
+   * Optional. Disk spec for the machine in this node pool.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.DiskSpec disk_spec = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.DiskSpecOrBuilder getDiskSpecOrBuilder() { + return diskSpec_ == null + ? com.google.cloud.aiplatform.v1.DiskSpec.getDefaultInstance() + : diskSpec_; + } + + public static final int USED_REPLICA_COUNT_FIELD_NUMBER = 6; + private long usedReplicaCount_ = 0L; + /** + * + * + *
+   * Output only. The number of machines currently in use by training jobs for
+   * this resource pool. Will replace idle_replica_count.
+   * 
+ * + * int64 used_replica_count = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The usedReplicaCount. + */ + @java.lang.Override + public long getUsedReplicaCount() { + return usedReplicaCount_; + } + + public static final int AUTOSCALING_SPEC_FIELD_NUMBER = 7; + private com.google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec autoscalingSpec_; + /** + * + * + *
+   * Optional. Optional spec to configure GKE autoscaling
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec autoscaling_spec = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the autoscalingSpec field is set. + */ + @java.lang.Override + public boolean hasAutoscalingSpec() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+   * Optional. Optional spec to configure GKE autoscaling
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec autoscaling_spec = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The autoscalingSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec getAutoscalingSpec() { + return autoscalingSpec_ == null + ? com.google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec.getDefaultInstance() + : autoscalingSpec_; + } + /** + * + * + *
+   * Optional. Optional spec to configure GKE autoscaling
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec autoscaling_spec = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpecOrBuilder + getAutoscalingSpecOrBuilder() { + return autoscalingSpec_ == null + ? com.google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec.getDefaultInstance() + : autoscalingSpec_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getMachineSpec()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeInt64(3, replicaCount_); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(4, getDiskSpec()); + } + if (usedReplicaCount_ != 0L) { + output.writeInt64(6, usedReplicaCount_); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(7, getAutoscalingSpec()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getMachineSpec()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, replicaCount_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getDiskSpec()); + } + if (usedReplicaCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(6, usedReplicaCount_); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getAutoscalingSpec()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.ResourcePool)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ResourcePool other = + (com.google.cloud.aiplatform.v1.ResourcePool) obj; + + if (!getId().equals(other.getId())) return false; + if (hasMachineSpec() != other.hasMachineSpec()) return false; + if (hasMachineSpec()) { + if (!getMachineSpec().equals(other.getMachineSpec())) return false; + } + if (hasReplicaCount() != other.hasReplicaCount()) return false; + if (hasReplicaCount()) { + if (getReplicaCount() != other.getReplicaCount()) return false; + } + if (hasDiskSpec() != other.hasDiskSpec()) return false; + if (hasDiskSpec()) { + if (!getDiskSpec().equals(other.getDiskSpec())) return false; + } + if (getUsedReplicaCount() != other.getUsedReplicaCount()) return false; + if (hasAutoscalingSpec() != other.hasAutoscalingSpec()) return false; + if (hasAutoscalingSpec()) { + if (!getAutoscalingSpec().equals(other.getAutoscalingSpec())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + if (hasMachineSpec()) { + hash = (37 * hash) + MACHINE_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getMachineSpec().hashCode(); + } + if (hasReplicaCount()) { + hash = (37 * hash) + REPLICA_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getReplicaCount()); + } + if (hasDiskSpec()) { + hash = (37 * hash) + DISK_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getDiskSpec().hashCode(); + } + hash = (37 * hash) + USED_REPLICA_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getUsedReplicaCount()); + if (hasAutoscalingSpec()) { + hash = (37 * hash) + AUTOSCALING_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getAutoscalingSpec().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.ResourcePool parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ResourcePool parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ResourcePool parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ResourcePool parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ResourcePool parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ResourcePool parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ResourcePool parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ResourcePool parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ResourcePool parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ResourcePool parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ResourcePool parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ResourcePool parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.aiplatform.v1.ResourcePool prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Represents the spec of a group of resources of the same type,
+   * for example machine type, disk, and accelerators, in a PersistentResource.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ResourcePool} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ResourcePool) + com.google.cloud.aiplatform.v1.ResourcePoolOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.PersistentResourceProto + .internal_static_google_cloud_aiplatform_v1_ResourcePool_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.PersistentResourceProto + .internal_static_google_cloud_aiplatform_v1_ResourcePool_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ResourcePool.class, + com.google.cloud.aiplatform.v1.ResourcePool.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.ResourcePool.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getMachineSpecFieldBuilder(); + getDiskSpecFieldBuilder(); + getAutoscalingSpecFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + machineSpec_ = null; + if (machineSpecBuilder_ != null) { + machineSpecBuilder_.dispose(); + machineSpecBuilder_ = null; + } + replicaCount_ = 0L; + diskSpec_ = null; + if (diskSpecBuilder_ != null) { + diskSpecBuilder_.dispose(); + diskSpecBuilder_ = null; + } + usedReplicaCount_ = 0L; + autoscalingSpec_ = null; + if (autoscalingSpecBuilder_ != null) { + autoscalingSpecBuilder_.dispose(); + autoscalingSpecBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.PersistentResourceProto + .internal_static_google_cloud_aiplatform_v1_ResourcePool_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ResourcePool getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ResourcePool.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ResourcePool build() { + com.google.cloud.aiplatform.v1.ResourcePool result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ResourcePool buildPartial() { + com.google.cloud.aiplatform.v1.ResourcePool result = + new com.google.cloud.aiplatform.v1.ResourcePool(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.ResourcePool result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.machineSpec_ = + machineSpecBuilder_ == null ? machineSpec_ : machineSpecBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.replicaCount_ = replicaCount_; + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.diskSpec_ = diskSpecBuilder_ == null ? diskSpec_ : diskSpecBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.usedReplicaCount_ = usedReplicaCount_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.autoscalingSpec_ = + autoscalingSpecBuilder_ == null ? autoscalingSpec_ : autoscalingSpecBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.ResourcePool) { + return mergeFrom((com.google.cloud.aiplatform.v1.ResourcePool) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.ResourcePool other) { + if (other == com.google.cloud.aiplatform.v1.ResourcePool.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasMachineSpec()) { + mergeMachineSpec(other.getMachineSpec()); + } + if (other.hasReplicaCount()) { + setReplicaCount(other.getReplicaCount()); + } + if (other.hasDiskSpec()) { + mergeDiskSpec(other.getDiskSpec()); + } + if (other.getUsedReplicaCount() != 0L) { + setUsedReplicaCount(other.getUsedReplicaCount()); + } + if (other.hasAutoscalingSpec()) { + mergeAutoscalingSpec(other.getAutoscalingSpec()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getMachineSpecFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + replicaCount_ = input.readInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: + { + input.readMessage(getDiskSpecFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 48: + { + usedReplicaCount_ = input.readInt64(); + bitField0_ |= 0x00000010; + break; + } // case 48 + case 58: + { + input.readMessage(getAutoscalingSpecFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 58 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + * + * + *
+     * Immutable. The unique ID in a PersistentResource for referring to this
+     * resource pool. User can specify it if necessary. Otherwise, it's generated
+     * automatically.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Immutable. The unique ID in a PersistentResource for referring to this
+     * resource pool. User can specify it if necessary. Otherwise, it's generated
+     * automatically.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for id. + */ + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Immutable. The unique ID in a PersistentResource for referring to this
+     * resource pool. User can specify it if necessary. Otherwise, it's generated
+     * automatically.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. The unique ID in a PersistentResource for referring to this
+     * resource pool. User can specify it if necessary. Otherwise, it's generated
+     * automatically.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. The unique ID in a PersistentResource for referring to this
+     * resource pool. User can specify it if necessary. Otherwise, it's generated
+     * automatically.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.cloud.aiplatform.v1.MachineSpec machineSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.MachineSpec, + com.google.cloud.aiplatform.v1.MachineSpec.Builder, + com.google.cloud.aiplatform.v1.MachineSpecOrBuilder> + machineSpecBuilder_; + /** + * + * + *
+     * Required. Immutable. The specification of a single machine.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MachineSpec machine_spec = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the machineSpec field is set. + */ + public boolean hasMachineSpec() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. Immutable. The specification of a single machine.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MachineSpec machine_spec = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The machineSpec. + */ + public com.google.cloud.aiplatform.v1.MachineSpec getMachineSpec() { + if (machineSpecBuilder_ == null) { + return machineSpec_ == null + ? com.google.cloud.aiplatform.v1.MachineSpec.getDefaultInstance() + : machineSpec_; + } else { + return machineSpecBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Immutable. The specification of a single machine.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MachineSpec machine_spec = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder setMachineSpec(com.google.cloud.aiplatform.v1.MachineSpec value) { + if (machineSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + machineSpec_ = value; + } else { + machineSpecBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Immutable. The specification of a single machine.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MachineSpec machine_spec = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder setMachineSpec( + com.google.cloud.aiplatform.v1.MachineSpec.Builder builderForValue) { + if (machineSpecBuilder_ == null) { + machineSpec_ = builderForValue.build(); + } else { + machineSpecBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Immutable. The specification of a single machine.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MachineSpec machine_spec = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder mergeMachineSpec(com.google.cloud.aiplatform.v1.MachineSpec value) { + if (machineSpecBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && machineSpec_ != null + && machineSpec_ != com.google.cloud.aiplatform.v1.MachineSpec.getDefaultInstance()) { + getMachineSpecBuilder().mergeFrom(value); + } else { + machineSpec_ = value; + } + } else { + machineSpecBuilder_.mergeFrom(value); + } + if (machineSpec_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. Immutable. The specification of a single machine.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MachineSpec machine_spec = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder clearMachineSpec() { + bitField0_ = (bitField0_ & ~0x00000002); + machineSpec_ = null; + if (machineSpecBuilder_ != null) { + machineSpecBuilder_.dispose(); + machineSpecBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Immutable. The specification of a single machine.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MachineSpec machine_spec = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public com.google.cloud.aiplatform.v1.MachineSpec.Builder getMachineSpecBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getMachineSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Immutable. The specification of a single machine.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MachineSpec machine_spec = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public com.google.cloud.aiplatform.v1.MachineSpecOrBuilder getMachineSpecOrBuilder() { + if (machineSpecBuilder_ != null) { + return machineSpecBuilder_.getMessageOrBuilder(); + } else { + return machineSpec_ == null + ? com.google.cloud.aiplatform.v1.MachineSpec.getDefaultInstance() + : machineSpec_; + } + } + /** + * + * + *
+     * Required. Immutable. The specification of a single machine.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MachineSpec machine_spec = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.MachineSpec, + com.google.cloud.aiplatform.v1.MachineSpec.Builder, + com.google.cloud.aiplatform.v1.MachineSpecOrBuilder> + getMachineSpecFieldBuilder() { + if (machineSpecBuilder_ == null) { + machineSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.MachineSpec, + com.google.cloud.aiplatform.v1.MachineSpec.Builder, + com.google.cloud.aiplatform.v1.MachineSpecOrBuilder>( + getMachineSpec(), getParentForChildren(), isClean()); + machineSpec_ = null; + } + return machineSpecBuilder_; + } + + private long replicaCount_; + /** + * + * + *
+     * Optional. The total number of machines to use for this resource pool.
+     * 
+ * + * optional int64 replica_count = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the replicaCount field is set. + */ + @java.lang.Override + public boolean hasReplicaCount() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Optional. The total number of machines to use for this resource pool.
+     * 
+ * + * optional int64 replica_count = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The replicaCount. + */ + @java.lang.Override + public long getReplicaCount() { + return replicaCount_; + } + /** + * + * + *
+     * Optional. The total number of machines to use for this resource pool.
+     * 
+ * + * optional int64 replica_count = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The replicaCount to set. + * @return This builder for chaining. + */ + public Builder setReplicaCount(long value) { + + replicaCount_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The total number of machines to use for this resource pool.
+     * 
+ * + * optional int64 replica_count = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearReplicaCount() { + bitField0_ = (bitField0_ & ~0x00000004); + replicaCount_ = 0L; + onChanged(); + return this; + } + + private com.google.cloud.aiplatform.v1.DiskSpec diskSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.DiskSpec, + com.google.cloud.aiplatform.v1.DiskSpec.Builder, + com.google.cloud.aiplatform.v1.DiskSpecOrBuilder> + diskSpecBuilder_; + /** + * + * + *
+     * Optional. Disk spec for the machine in this node pool.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.DiskSpec disk_spec = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the diskSpec field is set. + */ + public boolean hasDiskSpec() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Optional. Disk spec for the machine in this node pool.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.DiskSpec disk_spec = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The diskSpec. + */ + public com.google.cloud.aiplatform.v1.DiskSpec getDiskSpec() { + if (diskSpecBuilder_ == null) { + return diskSpec_ == null + ? com.google.cloud.aiplatform.v1.DiskSpec.getDefaultInstance() + : diskSpec_; + } else { + return diskSpecBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Disk spec for the machine in this node pool.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.DiskSpec disk_spec = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDiskSpec(com.google.cloud.aiplatform.v1.DiskSpec value) { + if (diskSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + diskSpec_ = value; + } else { + diskSpecBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Disk spec for the machine in this node pool.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.DiskSpec disk_spec = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDiskSpec(com.google.cloud.aiplatform.v1.DiskSpec.Builder builderForValue) { + if (diskSpecBuilder_ == null) { + diskSpec_ = builderForValue.build(); + } else { + diskSpecBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Disk spec for the machine in this node pool.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.DiskSpec disk_spec = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeDiskSpec(com.google.cloud.aiplatform.v1.DiskSpec value) { + if (diskSpecBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && diskSpec_ != null + && diskSpec_ != com.google.cloud.aiplatform.v1.DiskSpec.getDefaultInstance()) { + getDiskSpecBuilder().mergeFrom(value); + } else { + diskSpec_ = value; + } + } else { + diskSpecBuilder_.mergeFrom(value); + } + if (diskSpec_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Optional. Disk spec for the machine in this node pool.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.DiskSpec disk_spec = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearDiskSpec() { + bitField0_ = (bitField0_ & ~0x00000008); + diskSpec_ = null; + if (diskSpecBuilder_ != null) { + diskSpecBuilder_.dispose(); + diskSpecBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Disk spec for the machine in this node pool.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.DiskSpec disk_spec = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1.DiskSpec.Builder getDiskSpecBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getDiskSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Disk spec for the machine in this node pool.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.DiskSpec disk_spec = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1.DiskSpecOrBuilder getDiskSpecOrBuilder() { + if (diskSpecBuilder_ != null) { + return diskSpecBuilder_.getMessageOrBuilder(); + } else { + return diskSpec_ == null + ? com.google.cloud.aiplatform.v1.DiskSpec.getDefaultInstance() + : diskSpec_; + } + } + /** + * + * + *
+     * Optional. Disk spec for the machine in this node pool.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.DiskSpec disk_spec = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.DiskSpec, + com.google.cloud.aiplatform.v1.DiskSpec.Builder, + com.google.cloud.aiplatform.v1.DiskSpecOrBuilder> + getDiskSpecFieldBuilder() { + if (diskSpecBuilder_ == null) { + diskSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.DiskSpec, + com.google.cloud.aiplatform.v1.DiskSpec.Builder, + com.google.cloud.aiplatform.v1.DiskSpecOrBuilder>( + getDiskSpec(), getParentForChildren(), isClean()); + diskSpec_ = null; + } + return diskSpecBuilder_; + } + + private long usedReplicaCount_; + /** + * + * + *
+     * Output only. The number of machines currently in use by training jobs for
+     * this resource pool. Will replace idle_replica_count.
+     * 
+ * + * int64 used_replica_count = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The usedReplicaCount. + */ + @java.lang.Override + public long getUsedReplicaCount() { + return usedReplicaCount_; + } + /** + * + * + *
+     * Output only. The number of machines currently in use by training jobs for
+     * this resource pool. Will replace idle_replica_count.
+     * 
+ * + * int64 used_replica_count = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The usedReplicaCount to set. + * @return This builder for chaining. + */ + public Builder setUsedReplicaCount(long value) { + + usedReplicaCount_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The number of machines currently in use by training jobs for
+     * this resource pool. Will replace idle_replica_count.
+     * 
+ * + * int64 used_replica_count = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearUsedReplicaCount() { + bitField0_ = (bitField0_ & ~0x00000010); + usedReplicaCount_ = 0L; + onChanged(); + return this; + } + + private com.google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec autoscalingSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec, + com.google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec.Builder, + com.google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpecOrBuilder> + autoscalingSpecBuilder_; + /** + * + * + *
+     * Optional. Optional spec to configure GKE autoscaling
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec autoscaling_spec = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the autoscalingSpec field is set. + */ + public boolean hasAutoscalingSpec() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+     * Optional. Optional spec to configure GKE autoscaling
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec autoscaling_spec = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The autoscalingSpec. + */ + public com.google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec getAutoscalingSpec() { + if (autoscalingSpecBuilder_ == null) { + return autoscalingSpec_ == null + ? com.google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec.getDefaultInstance() + : autoscalingSpec_; + } else { + return autoscalingSpecBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Optional spec to configure GKE autoscaling
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec autoscaling_spec = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAutoscalingSpec( + com.google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec value) { + if (autoscalingSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + autoscalingSpec_ = value; + } else { + autoscalingSpecBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Optional spec to configure GKE autoscaling
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec autoscaling_spec = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAutoscalingSpec( + com.google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec.Builder builderForValue) { + if (autoscalingSpecBuilder_ == null) { + autoscalingSpec_ = builderForValue.build(); + } else { + autoscalingSpecBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Optional spec to configure GKE autoscaling
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec autoscaling_spec = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeAutoscalingSpec( + com.google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec value) { + if (autoscalingSpecBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && autoscalingSpec_ != null + && autoscalingSpec_ + != com.google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec + .getDefaultInstance()) { + getAutoscalingSpecBuilder().mergeFrom(value); + } else { + autoscalingSpec_ = value; + } + } else { + autoscalingSpecBuilder_.mergeFrom(value); + } + if (autoscalingSpec_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Optional. Optional spec to configure GKE autoscaling
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec autoscaling_spec = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearAutoscalingSpec() { + bitField0_ = (bitField0_ & ~0x00000020); + autoscalingSpec_ = null; + if (autoscalingSpecBuilder_ != null) { + autoscalingSpecBuilder_.dispose(); + autoscalingSpecBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Optional spec to configure GKE autoscaling
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec autoscaling_spec = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec.Builder + getAutoscalingSpecBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getAutoscalingSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Optional spec to configure GKE autoscaling
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec autoscaling_spec = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpecOrBuilder + getAutoscalingSpecOrBuilder() { + if (autoscalingSpecBuilder_ != null) { + return autoscalingSpecBuilder_.getMessageOrBuilder(); + } else { + return autoscalingSpec_ == null + ? com.google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec.getDefaultInstance() + : autoscalingSpec_; + } + } + /** + * + * + *
+     * Optional. Optional spec to configure GKE autoscaling
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec autoscaling_spec = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec, + com.google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec.Builder, + com.google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpecOrBuilder> + getAutoscalingSpecFieldBuilder() { + if (autoscalingSpecBuilder_ == null) { + autoscalingSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec, + com.google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec.Builder, + com.google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpecOrBuilder>( + getAutoscalingSpec(), getParentForChildren(), isClean()); + autoscalingSpec_ = null; + } + return autoscalingSpecBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.ResourcePool) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ResourcePool) + private static final com.google.cloud.aiplatform.v1.ResourcePool DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ResourcePool(); + } + + public static com.google.cloud.aiplatform.v1.ResourcePool getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ResourcePool parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ResourcePool getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ResourcePoolOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ResourcePoolOrBuilder.java new file mode 100644 index 000000000000..ab2e05294f2f --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ResourcePoolOrBuilder.java @@ -0,0 +1,218 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/persistent_resource.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +public interface ResourcePoolOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ResourcePool) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Immutable. The unique ID in a PersistentResource for referring to this
+   * resource pool. User can specify it if necessary. Otherwise, it's generated
+   * automatically.
+   * 
+ * + * string id = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The id. + */ + java.lang.String getId(); + /** + * + * + *
+   * Immutable. The unique ID in a PersistentResource for referring to this
+   * resource pool. User can specify it if necessary. Otherwise, it's generated
+   * automatically.
+   * 
+ * + * string id = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for id. + */ + com.google.protobuf.ByteString getIdBytes(); + + /** + * + * + *
+   * Required. Immutable. The specification of a single machine.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MachineSpec machine_spec = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the machineSpec field is set. + */ + boolean hasMachineSpec(); + /** + * + * + *
+   * Required. Immutable. The specification of a single machine.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MachineSpec machine_spec = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The machineSpec. + */ + com.google.cloud.aiplatform.v1.MachineSpec getMachineSpec(); + /** + * + * + *
+   * Required. Immutable. The specification of a single machine.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MachineSpec machine_spec = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + com.google.cloud.aiplatform.v1.MachineSpecOrBuilder getMachineSpecOrBuilder(); + + /** + * + * + *
+   * Optional. The total number of machines to use for this resource pool.
+   * 
+ * + * optional int64 replica_count = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the replicaCount field is set. + */ + boolean hasReplicaCount(); + /** + * + * + *
+   * Optional. The total number of machines to use for this resource pool.
+   * 
+ * + * optional int64 replica_count = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The replicaCount. + */ + long getReplicaCount(); + + /** + * + * + *
+   * Optional. Disk spec for the machine in this node pool.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.DiskSpec disk_spec = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the diskSpec field is set. + */ + boolean hasDiskSpec(); + /** + * + * + *
+   * Optional. Disk spec for the machine in this node pool.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.DiskSpec disk_spec = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The diskSpec. + */ + com.google.cloud.aiplatform.v1.DiskSpec getDiskSpec(); + /** + * + * + *
+   * Optional. Disk spec for the machine in this node pool.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.DiskSpec disk_spec = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.aiplatform.v1.DiskSpecOrBuilder getDiskSpecOrBuilder(); + + /** + * + * + *
+   * Output only. The number of machines currently in use by training jobs for
+   * this resource pool. Will replace idle_replica_count.
+   * 
+ * + * int64 used_replica_count = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The usedReplicaCount. + */ + long getUsedReplicaCount(); + + /** + * + * + *
+   * Optional. Optional spec to configure GKE autoscaling
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec autoscaling_spec = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the autoscalingSpec field is set. + */ + boolean hasAutoscalingSpec(); + /** + * + * + *
+   * Optional. Optional spec to configure GKE autoscaling
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec autoscaling_spec = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The autoscalingSpec. + */ + com.google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec getAutoscalingSpec(); + /** + * + * + *
+   * Optional. Optional spec to configure GKE autoscaling
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec autoscaling_spec = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpecOrBuilder + getAutoscalingSpecOrBuilder(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ResourceRuntime.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ResourceRuntime.java new file mode 100644 index 000000000000..08f03863d47d --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ResourceRuntime.java @@ -0,0 +1,431 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/persistent_resource.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Persistent Cluster runtime information as output
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ResourceRuntime} + */ +public final class ResourceRuntime extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ResourceRuntime) + ResourceRuntimeOrBuilder { + private static final long serialVersionUID = 0L; + // Use ResourceRuntime.newBuilder() to construct. + private ResourceRuntime(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ResourceRuntime() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ResourceRuntime(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.PersistentResourceProto + .internal_static_google_cloud_aiplatform_v1_ResourceRuntime_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.PersistentResourceProto + .internal_static_google_cloud_aiplatform_v1_ResourceRuntime_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ResourceRuntime.class, + com.google.cloud.aiplatform.v1.ResourceRuntime.Builder.class); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.ResourceRuntime)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ResourceRuntime other = + (com.google.cloud.aiplatform.v1.ResourceRuntime) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.ResourceRuntime parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ResourceRuntime parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ResourceRuntime parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ResourceRuntime parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ResourceRuntime parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ResourceRuntime parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ResourceRuntime parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ResourceRuntime parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ResourceRuntime parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ResourceRuntime parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ResourceRuntime parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ResourceRuntime parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.aiplatform.v1.ResourceRuntime prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Persistent Cluster runtime information as output
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ResourceRuntime} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ResourceRuntime) + com.google.cloud.aiplatform.v1.ResourceRuntimeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.PersistentResourceProto + .internal_static_google_cloud_aiplatform_v1_ResourceRuntime_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.PersistentResourceProto + .internal_static_google_cloud_aiplatform_v1_ResourceRuntime_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ResourceRuntime.class, + com.google.cloud.aiplatform.v1.ResourceRuntime.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.ResourceRuntime.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.PersistentResourceProto + .internal_static_google_cloud_aiplatform_v1_ResourceRuntime_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ResourceRuntime getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ResourceRuntime.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ResourceRuntime build() { + com.google.cloud.aiplatform.v1.ResourceRuntime result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ResourceRuntime buildPartial() { + com.google.cloud.aiplatform.v1.ResourceRuntime result = + new com.google.cloud.aiplatform.v1.ResourceRuntime(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.ResourceRuntime) { + return mergeFrom((com.google.cloud.aiplatform.v1.ResourceRuntime) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.ResourceRuntime other) { + if (other == com.google.cloud.aiplatform.v1.ResourceRuntime.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.ResourceRuntime) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ResourceRuntime) + private static final com.google.cloud.aiplatform.v1.ResourceRuntime DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ResourceRuntime(); + } + + public static com.google.cloud.aiplatform.v1.ResourceRuntime getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ResourceRuntime parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ResourceRuntime getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ResourceRuntimeOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ResourceRuntimeOrBuilder.java new file mode 100644 index 000000000000..d9589c3caf5a --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ResourceRuntimeOrBuilder.java @@ -0,0 +1,25 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/persistent_resource.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +public interface ResourceRuntimeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ResourceRuntime) + com.google.protobuf.MessageOrBuilder {} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ResourceRuntimeSpec.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ResourceRuntimeSpec.java new file mode 100644 index 000000000000..f2a55b626d16 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ResourceRuntimeSpec.java @@ -0,0 +1,1067 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/persistent_resource.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Configuration for the runtime on a PersistentResource instance, including
+ * but not limited to:
+ *
+ * * Service accounts used to run the workloads.
+ * * Whether to make it a dedicated Ray Cluster.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ResourceRuntimeSpec} + */ +public final class ResourceRuntimeSpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ResourceRuntimeSpec) + ResourceRuntimeSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use ResourceRuntimeSpec.newBuilder() to construct. + private ResourceRuntimeSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ResourceRuntimeSpec() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ResourceRuntimeSpec(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.PersistentResourceProto + .internal_static_google_cloud_aiplatform_v1_ResourceRuntimeSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.PersistentResourceProto + .internal_static_google_cloud_aiplatform_v1_ResourceRuntimeSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ResourceRuntimeSpec.class, + com.google.cloud.aiplatform.v1.ResourceRuntimeSpec.Builder.class); + } + + private int bitField0_; + public static final int SERVICE_ACCOUNT_SPEC_FIELD_NUMBER = 2; + private com.google.cloud.aiplatform.v1.ServiceAccountSpec serviceAccountSpec_; + /** + * + * + *
+   * Optional. Configure the use of workload identity on the PersistentResource
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ServiceAccountSpec service_account_spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the serviceAccountSpec field is set. + */ + @java.lang.Override + public boolean hasServiceAccountSpec() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Optional. Configure the use of workload identity on the PersistentResource
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ServiceAccountSpec service_account_spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The serviceAccountSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ServiceAccountSpec getServiceAccountSpec() { + return serviceAccountSpec_ == null + ? com.google.cloud.aiplatform.v1.ServiceAccountSpec.getDefaultInstance() + : serviceAccountSpec_; + } + /** + * + * + *
+   * Optional. Configure the use of workload identity on the PersistentResource
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ServiceAccountSpec service_account_spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ServiceAccountSpecOrBuilder + getServiceAccountSpecOrBuilder() { + return serviceAccountSpec_ == null + ? com.google.cloud.aiplatform.v1.ServiceAccountSpec.getDefaultInstance() + : serviceAccountSpec_; + } + + public static final int RAY_SPEC_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1.RaySpec raySpec_; + /** + * + * + *
+   * Optional. Ray cluster configuration.
+   * Required when creating a dedicated RayCluster on the PersistentResource.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.RaySpec ray_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the raySpec field is set. + */ + @java.lang.Override + public boolean hasRaySpec() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Optional. Ray cluster configuration.
+   * Required when creating a dedicated RayCluster on the PersistentResource.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.RaySpec ray_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The raySpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.RaySpec getRaySpec() { + return raySpec_ == null + ? com.google.cloud.aiplatform.v1.RaySpec.getDefaultInstance() + : raySpec_; + } + /** + * + * + *
+   * Optional. Ray cluster configuration.
+   * Required when creating a dedicated RayCluster on the PersistentResource.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.RaySpec ray_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.RaySpecOrBuilder getRaySpecOrBuilder() { + return raySpec_ == null + ? com.google.cloud.aiplatform.v1.RaySpec.getDefaultInstance() + : raySpec_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(1, getRaySpec()); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getServiceAccountSpec()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getRaySpec()); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getServiceAccountSpec()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.ResourceRuntimeSpec)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ResourceRuntimeSpec other = + (com.google.cloud.aiplatform.v1.ResourceRuntimeSpec) obj; + + if (hasServiceAccountSpec() != other.hasServiceAccountSpec()) return false; + if (hasServiceAccountSpec()) { + if (!getServiceAccountSpec().equals(other.getServiceAccountSpec())) return false; + } + if (hasRaySpec() != other.hasRaySpec()) return false; + if (hasRaySpec()) { + if (!getRaySpec().equals(other.getRaySpec())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasServiceAccountSpec()) { + hash = (37 * hash) + SERVICE_ACCOUNT_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getServiceAccountSpec().hashCode(); + } + if (hasRaySpec()) { + hash = (37 * hash) + RAY_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getRaySpec().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.ResourceRuntimeSpec parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ResourceRuntimeSpec parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ResourceRuntimeSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ResourceRuntimeSpec parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ResourceRuntimeSpec parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ResourceRuntimeSpec parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ResourceRuntimeSpec parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ResourceRuntimeSpec parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ResourceRuntimeSpec parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ResourceRuntimeSpec parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ResourceRuntimeSpec parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ResourceRuntimeSpec parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.aiplatform.v1.ResourceRuntimeSpec prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Configuration for the runtime on a PersistentResource instance, including
+   * but not limited to:
+   *
+   * * Service accounts used to run the workloads.
+   * * Whether to make it a dedicated Ray Cluster.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ResourceRuntimeSpec} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ResourceRuntimeSpec) + com.google.cloud.aiplatform.v1.ResourceRuntimeSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.PersistentResourceProto + .internal_static_google_cloud_aiplatform_v1_ResourceRuntimeSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.PersistentResourceProto + .internal_static_google_cloud_aiplatform_v1_ResourceRuntimeSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ResourceRuntimeSpec.class, + com.google.cloud.aiplatform.v1.ResourceRuntimeSpec.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.ResourceRuntimeSpec.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getServiceAccountSpecFieldBuilder(); + getRaySpecFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + serviceAccountSpec_ = null; + if (serviceAccountSpecBuilder_ != null) { + serviceAccountSpecBuilder_.dispose(); + serviceAccountSpecBuilder_ = null; + } + raySpec_ = null; + if (raySpecBuilder_ != null) { + raySpecBuilder_.dispose(); + raySpecBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.PersistentResourceProto + .internal_static_google_cloud_aiplatform_v1_ResourceRuntimeSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ResourceRuntimeSpec getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ResourceRuntimeSpec.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ResourceRuntimeSpec build() { + com.google.cloud.aiplatform.v1.ResourceRuntimeSpec result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ResourceRuntimeSpec buildPartial() { + com.google.cloud.aiplatform.v1.ResourceRuntimeSpec result = + new com.google.cloud.aiplatform.v1.ResourceRuntimeSpec(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.ResourceRuntimeSpec result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.serviceAccountSpec_ = + serviceAccountSpecBuilder_ == null + ? serviceAccountSpec_ + : serviceAccountSpecBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.raySpec_ = raySpecBuilder_ == null ? raySpec_ : raySpecBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.ResourceRuntimeSpec) { + return mergeFrom((com.google.cloud.aiplatform.v1.ResourceRuntimeSpec) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.ResourceRuntimeSpec other) { + if (other == com.google.cloud.aiplatform.v1.ResourceRuntimeSpec.getDefaultInstance()) + return this; + if (other.hasServiceAccountSpec()) { + mergeServiceAccountSpec(other.getServiceAccountSpec()); + } + if (other.hasRaySpec()) { + mergeRaySpec(other.getRaySpec()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getRaySpecFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 10 + case 18: + { + input.readMessage( + getServiceAccountSpecFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.aiplatform.v1.ServiceAccountSpec serviceAccountSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.ServiceAccountSpec, + com.google.cloud.aiplatform.v1.ServiceAccountSpec.Builder, + com.google.cloud.aiplatform.v1.ServiceAccountSpecOrBuilder> + serviceAccountSpecBuilder_; + /** + * + * + *
+     * Optional. Configure the use of workload identity on the PersistentResource
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ServiceAccountSpec service_account_spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the serviceAccountSpec field is set. + */ + public boolean hasServiceAccountSpec() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Optional. Configure the use of workload identity on the PersistentResource
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ServiceAccountSpec service_account_spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The serviceAccountSpec. + */ + public com.google.cloud.aiplatform.v1.ServiceAccountSpec getServiceAccountSpec() { + if (serviceAccountSpecBuilder_ == null) { + return serviceAccountSpec_ == null + ? com.google.cloud.aiplatform.v1.ServiceAccountSpec.getDefaultInstance() + : serviceAccountSpec_; + } else { + return serviceAccountSpecBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Configure the use of workload identity on the PersistentResource
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ServiceAccountSpec service_account_spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setServiceAccountSpec(com.google.cloud.aiplatform.v1.ServiceAccountSpec value) { + if (serviceAccountSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + serviceAccountSpec_ = value; + } else { + serviceAccountSpecBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Configure the use of workload identity on the PersistentResource
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ServiceAccountSpec service_account_spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setServiceAccountSpec( + com.google.cloud.aiplatform.v1.ServiceAccountSpec.Builder builderForValue) { + if (serviceAccountSpecBuilder_ == null) { + serviceAccountSpec_ = builderForValue.build(); + } else { + serviceAccountSpecBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Configure the use of workload identity on the PersistentResource
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ServiceAccountSpec service_account_spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeServiceAccountSpec( + com.google.cloud.aiplatform.v1.ServiceAccountSpec value) { + if (serviceAccountSpecBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && serviceAccountSpec_ != null + && serviceAccountSpec_ + != com.google.cloud.aiplatform.v1.ServiceAccountSpec.getDefaultInstance()) { + getServiceAccountSpecBuilder().mergeFrom(value); + } else { + serviceAccountSpec_ = value; + } + } else { + serviceAccountSpecBuilder_.mergeFrom(value); + } + if (serviceAccountSpec_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Optional. Configure the use of workload identity on the PersistentResource
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ServiceAccountSpec service_account_spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearServiceAccountSpec() { + bitField0_ = (bitField0_ & ~0x00000001); + serviceAccountSpec_ = null; + if (serviceAccountSpecBuilder_ != null) { + serviceAccountSpecBuilder_.dispose(); + serviceAccountSpecBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Configure the use of workload identity on the PersistentResource
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ServiceAccountSpec service_account_spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1.ServiceAccountSpec.Builder + getServiceAccountSpecBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getServiceAccountSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Configure the use of workload identity on the PersistentResource
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ServiceAccountSpec service_account_spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1.ServiceAccountSpecOrBuilder + getServiceAccountSpecOrBuilder() { + if (serviceAccountSpecBuilder_ != null) { + return serviceAccountSpecBuilder_.getMessageOrBuilder(); + } else { + return serviceAccountSpec_ == null + ? com.google.cloud.aiplatform.v1.ServiceAccountSpec.getDefaultInstance() + : serviceAccountSpec_; + } + } + /** + * + * + *
+     * Optional. Configure the use of workload identity on the PersistentResource
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ServiceAccountSpec service_account_spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.ServiceAccountSpec, + com.google.cloud.aiplatform.v1.ServiceAccountSpec.Builder, + com.google.cloud.aiplatform.v1.ServiceAccountSpecOrBuilder> + getServiceAccountSpecFieldBuilder() { + if (serviceAccountSpecBuilder_ == null) { + serviceAccountSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.ServiceAccountSpec, + com.google.cloud.aiplatform.v1.ServiceAccountSpec.Builder, + com.google.cloud.aiplatform.v1.ServiceAccountSpecOrBuilder>( + getServiceAccountSpec(), getParentForChildren(), isClean()); + serviceAccountSpec_ = null; + } + return serviceAccountSpecBuilder_; + } + + private com.google.cloud.aiplatform.v1.RaySpec raySpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.RaySpec, + com.google.cloud.aiplatform.v1.RaySpec.Builder, + com.google.cloud.aiplatform.v1.RaySpecOrBuilder> + raySpecBuilder_; + /** + * + * + *
+     * Optional. Ray cluster configuration.
+     * Required when creating a dedicated RayCluster on the PersistentResource.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.RaySpec ray_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the raySpec field is set. + */ + public boolean hasRaySpec() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Optional. Ray cluster configuration.
+     * Required when creating a dedicated RayCluster on the PersistentResource.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.RaySpec ray_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The raySpec. + */ + public com.google.cloud.aiplatform.v1.RaySpec getRaySpec() { + if (raySpecBuilder_ == null) { + return raySpec_ == null + ? com.google.cloud.aiplatform.v1.RaySpec.getDefaultInstance() + : raySpec_; + } else { + return raySpecBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Ray cluster configuration.
+     * Required when creating a dedicated RayCluster on the PersistentResource.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.RaySpec ray_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRaySpec(com.google.cloud.aiplatform.v1.RaySpec value) { + if (raySpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + raySpec_ = value; + } else { + raySpecBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Ray cluster configuration.
+     * Required when creating a dedicated RayCluster on the PersistentResource.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.RaySpec ray_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRaySpec(com.google.cloud.aiplatform.v1.RaySpec.Builder builderForValue) { + if (raySpecBuilder_ == null) { + raySpec_ = builderForValue.build(); + } else { + raySpecBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Ray cluster configuration.
+     * Required when creating a dedicated RayCluster on the PersistentResource.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.RaySpec ray_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeRaySpec(com.google.cloud.aiplatform.v1.RaySpec value) { + if (raySpecBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && raySpec_ != null + && raySpec_ != com.google.cloud.aiplatform.v1.RaySpec.getDefaultInstance()) { + getRaySpecBuilder().mergeFrom(value); + } else { + raySpec_ = value; + } + } else { + raySpecBuilder_.mergeFrom(value); + } + if (raySpec_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Optional. Ray cluster configuration.
+     * Required when creating a dedicated RayCluster on the PersistentResource.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.RaySpec ray_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearRaySpec() { + bitField0_ = (bitField0_ & ~0x00000002); + raySpec_ = null; + if (raySpecBuilder_ != null) { + raySpecBuilder_.dispose(); + raySpecBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Ray cluster configuration.
+     * Required when creating a dedicated RayCluster on the PersistentResource.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.RaySpec ray_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1.RaySpec.Builder getRaySpecBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getRaySpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Ray cluster configuration.
+     * Required when creating a dedicated RayCluster on the PersistentResource.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.RaySpec ray_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1.RaySpecOrBuilder getRaySpecOrBuilder() { + if (raySpecBuilder_ != null) { + return raySpecBuilder_.getMessageOrBuilder(); + } else { + return raySpec_ == null + ? com.google.cloud.aiplatform.v1.RaySpec.getDefaultInstance() + : raySpec_; + } + } + /** + * + * + *
+     * Optional. Ray cluster configuration.
+     * Required when creating a dedicated RayCluster on the PersistentResource.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.RaySpec ray_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.RaySpec, + com.google.cloud.aiplatform.v1.RaySpec.Builder, + com.google.cloud.aiplatform.v1.RaySpecOrBuilder> + getRaySpecFieldBuilder() { + if (raySpecBuilder_ == null) { + raySpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.RaySpec, + com.google.cloud.aiplatform.v1.RaySpec.Builder, + com.google.cloud.aiplatform.v1.RaySpecOrBuilder>( + getRaySpec(), getParentForChildren(), isClean()); + raySpec_ = null; + } + return raySpecBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.ResourceRuntimeSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ResourceRuntimeSpec) + private static final com.google.cloud.aiplatform.v1.ResourceRuntimeSpec DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ResourceRuntimeSpec(); + } + + public static com.google.cloud.aiplatform.v1.ResourceRuntimeSpec getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ResourceRuntimeSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ResourceRuntimeSpec getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ResourceRuntimeSpecOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ResourceRuntimeSpecOrBuilder.java new file mode 100644 index 000000000000..2635e23ac401 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ResourceRuntimeSpecOrBuilder.java @@ -0,0 +1,111 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/persistent_resource.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +public interface ResourceRuntimeSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ResourceRuntimeSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Configure the use of workload identity on the PersistentResource
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ServiceAccountSpec service_account_spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the serviceAccountSpec field is set. + */ + boolean hasServiceAccountSpec(); + /** + * + * + *
+   * Optional. Configure the use of workload identity on the PersistentResource
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ServiceAccountSpec service_account_spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The serviceAccountSpec. + */ + com.google.cloud.aiplatform.v1.ServiceAccountSpec getServiceAccountSpec(); + /** + * + * + *
+   * Optional. Configure the use of workload identity on the PersistentResource
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ServiceAccountSpec service_account_spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.aiplatform.v1.ServiceAccountSpecOrBuilder getServiceAccountSpecOrBuilder(); + + /** + * + * + *
+   * Optional. Ray cluster configuration.
+   * Required when creating a dedicated RayCluster on the PersistentResource.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.RaySpec ray_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the raySpec field is set. + */ + boolean hasRaySpec(); + /** + * + * + *
+   * Optional. Ray cluster configuration.
+   * Required when creating a dedicated RayCluster on the PersistentResource.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.RaySpec ray_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The raySpec. + */ + com.google.cloud.aiplatform.v1.RaySpec getRaySpec(); + /** + * + * + *
+   * Optional. Ray cluster configuration.
+   * Required when creating a dedicated RayCluster on the PersistentResource.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.RaySpec ray_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.aiplatform.v1.RaySpecOrBuilder getRaySpecOrBuilder(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SafetySetting.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SafetySetting.java index aa475bfd57e2..3f8236894992 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SafetySetting.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SafetySetting.java @@ -41,6 +41,7 @@ private SafetySetting(com.google.protobuf.GeneratedMessageV3.Builder builder) private SafetySetting() { category_ = 0; threshold_ = 0; + method_ = 0; } @java.lang.Override @@ -268,6 +269,165 @@ private HarmBlockThreshold(int value) { // @@protoc_insertion_point(enum_scope:google.cloud.aiplatform.v1.SafetySetting.HarmBlockThreshold) } + /** + * + * + *
+   * Probability vs severity.
+   * 
+ * + * Protobuf enum {@code google.cloud.aiplatform.v1.SafetySetting.HarmBlockMethod} + */ + public enum HarmBlockMethod implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The harm block method is unspecified.
+     * 
+ * + * HARM_BLOCK_METHOD_UNSPECIFIED = 0; + */ + HARM_BLOCK_METHOD_UNSPECIFIED(0), + /** + * + * + *
+     * The harm block method uses both probability and severity scores.
+     * 
+ * + * SEVERITY = 1; + */ + SEVERITY(1), + /** + * + * + *
+     * The harm block method uses the probability score.
+     * 
+ * + * PROBABILITY = 2; + */ + PROBABILITY(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The harm block method is unspecified.
+     * 
+ * + * HARM_BLOCK_METHOD_UNSPECIFIED = 0; + */ + public static final int HARM_BLOCK_METHOD_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The harm block method uses both probability and severity scores.
+     * 
+ * + * SEVERITY = 1; + */ + public static final int SEVERITY_VALUE = 1; + /** + * + * + *
+     * The harm block method uses the probability score.
+     * 
+ * + * PROBABILITY = 2; + */ + public static final int PROBABILITY_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static HarmBlockMethod valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static HarmBlockMethod forNumber(int value) { + switch (value) { + case 0: + return HARM_BLOCK_METHOD_UNSPECIFIED; + case 1: + return SEVERITY; + case 2: + return PROBABILITY; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public HarmBlockMethod findValueByNumber(int number) { + return HarmBlockMethod.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.SafetySetting.getDescriptor().getEnumTypes().get(1); + } + + private static final HarmBlockMethod[] VALUES = values(); + + public static HarmBlockMethod valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private HarmBlockMethod(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.aiplatform.v1.SafetySetting.HarmBlockMethod) + } + public static final int CATEGORY_FIELD_NUMBER = 1; private int category_ = 0; /** @@ -348,6 +508,49 @@ public com.google.cloud.aiplatform.v1.SafetySetting.HarmBlockThreshold getThresh : result; } + public static final int METHOD_FIELD_NUMBER = 4; + private int method_ = 0; + /** + * + * + *
+   * Optional. Specify if the threshold is used for probability or severity
+   * score. If not specified, the threshold is used for probability score.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.SafetySetting.HarmBlockMethod method = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for method. + */ + @java.lang.Override + public int getMethodValue() { + return method_; + } + /** + * + * + *
+   * Optional. Specify if the threshold is used for probability or severity
+   * score. If not specified, the threshold is used for probability score.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.SafetySetting.HarmBlockMethod method = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The method. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.SafetySetting.HarmBlockMethod getMethod() { + com.google.cloud.aiplatform.v1.SafetySetting.HarmBlockMethod result = + com.google.cloud.aiplatform.v1.SafetySetting.HarmBlockMethod.forNumber(method_); + return result == null + ? com.google.cloud.aiplatform.v1.SafetySetting.HarmBlockMethod.UNRECOGNIZED + : result; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -372,6 +575,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(2, threshold_); } + if (method_ + != com.google.cloud.aiplatform.v1.SafetySetting.HarmBlockMethod + .HARM_BLOCK_METHOD_UNSPECIFIED + .getNumber()) { + output.writeEnum(4, method_); + } getUnknownFields().writeTo(output); } @@ -391,6 +600,12 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, threshold_); } + if (method_ + != com.google.cloud.aiplatform.v1.SafetySetting.HarmBlockMethod + .HARM_BLOCK_METHOD_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, method_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -409,6 +624,7 @@ public boolean equals(final java.lang.Object obj) { if (category_ != other.category_) return false; if (threshold_ != other.threshold_) return false; + if (method_ != other.method_) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -424,6 +640,8 @@ public int hashCode() { hash = (53 * hash) + category_; hash = (37 * hash) + THRESHOLD_FIELD_NUMBER; hash = (53 * hash) + threshold_; + hash = (37 * hash) + METHOD_FIELD_NUMBER; + hash = (53 * hash) + method_; hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -565,6 +783,7 @@ public Builder clear() { bitField0_ = 0; category_ = 0; threshold_ = 0; + method_ = 0; return this; } @@ -607,6 +826,9 @@ private void buildPartial0(com.google.cloud.aiplatform.v1.SafetySetting result) if (((from_bitField0_ & 0x00000002) != 0)) { result.threshold_ = threshold_; } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.method_ = method_; + } } @java.lang.Override @@ -660,6 +882,9 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1.SafetySetting other) { if (other.threshold_ != 0) { setThresholdValue(other.getThresholdValue()); } + if (other.method_ != 0) { + setMethodValue(other.getMethodValue()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -698,6 +923,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000002; break; } // case 16 + case 32: + { + method_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 32 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -920,6 +1151,113 @@ public Builder clearThreshold() { return this; } + private int method_ = 0; + /** + * + * + *
+     * Optional. Specify if the threshold is used for probability or severity
+     * score. If not specified, the threshold is used for probability score.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.SafetySetting.HarmBlockMethod method = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for method. + */ + @java.lang.Override + public int getMethodValue() { + return method_; + } + /** + * + * + *
+     * Optional. Specify if the threshold is used for probability or severity
+     * score. If not specified, the threshold is used for probability score.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.SafetySetting.HarmBlockMethod method = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for method to set. + * @return This builder for chaining. + */ + public Builder setMethodValue(int value) { + method_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Specify if the threshold is used for probability or severity
+     * score. If not specified, the threshold is used for probability score.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.SafetySetting.HarmBlockMethod method = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The method. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.SafetySetting.HarmBlockMethod getMethod() { + com.google.cloud.aiplatform.v1.SafetySetting.HarmBlockMethod result = + com.google.cloud.aiplatform.v1.SafetySetting.HarmBlockMethod.forNumber(method_); + return result == null + ? com.google.cloud.aiplatform.v1.SafetySetting.HarmBlockMethod.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Optional. Specify if the threshold is used for probability or severity
+     * score. If not specified, the threshold is used for probability score.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.SafetySetting.HarmBlockMethod method = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The method to set. + * @return This builder for chaining. + */ + public Builder setMethod(com.google.cloud.aiplatform.v1.SafetySetting.HarmBlockMethod value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + method_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Specify if the threshold is used for probability or severity
+     * score. If not specified, the threshold is used for probability score.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.SafetySetting.HarmBlockMethod method = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearMethod() { + bitField0_ = (bitField0_ & ~0x00000004); + method_ = 0; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SafetySettingOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SafetySettingOrBuilder.java index e6523ec9b191..bdb8852ecb4c 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SafetySettingOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SafetySettingOrBuilder.java @@ -81,4 +81,35 @@ public interface SafetySettingOrBuilder * @return The threshold. */ com.google.cloud.aiplatform.v1.SafetySetting.HarmBlockThreshold getThreshold(); + + /** + * + * + *
+   * Optional. Specify if the threshold is used for probability or severity
+   * score. If not specified, the threshold is used for probability score.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.SafetySetting.HarmBlockMethod method = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for method. + */ + int getMethodValue(); + /** + * + * + *
+   * Optional. Specify if the threshold is used for probability or severity
+   * score. If not specified, the threshold is used for probability score.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.SafetySetting.HarmBlockMethod method = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The method. + */ + com.google.cloud.aiplatform.v1.SafetySetting.HarmBlockMethod getMethod(); } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/Schema.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/Schema.java index 6f31eeb72b66..086d09d9b483 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/Schema.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/Schema.java @@ -44,9 +44,11 @@ private Schema(com.google.protobuf.GeneratedMessageV3.Builder builder) { private Schema() { type_ = 0; format_ = ""; + title_ = ""; description_ = ""; enum_ = com.google.protobuf.LazyStringArrayList.emptyList(); required_ = com.google.protobuf.LazyStringArrayList.emptyList(); + pattern_ = ""; } @java.lang.Override @@ -130,8 +132,9 @@ public com.google.cloud.aiplatform.v1.Type getType() { *
    * Optional. The format of the data.
    * Supported formats:
-   *  for NUMBER type: float, double
-   *  for INTEGER type: int32, int64
+   *  for NUMBER type: "float", "double"
+   *  for INTEGER type: "int32", "int64"
+   *  for STRING type: "email", "byte", etc
    * 
* * string format = 7 [(.google.api.field_behavior) = OPTIONAL]; @@ -156,8 +159,9 @@ public java.lang.String getFormat() { *
    * Optional. The format of the data.
    * Supported formats:
-   *  for NUMBER type: float, double
-   *  for INTEGER type: int32, int64
+   *  for NUMBER type: "float", "double"
+   *  for INTEGER type: "int32", "int64"
+   *  for STRING type: "email", "byte", etc
    * 
* * string format = 7 [(.google.api.field_behavior) = OPTIONAL]; @@ -177,6 +181,57 @@ public com.google.protobuf.ByteString getFormatBytes() { } } + public static final int TITLE_FIELD_NUMBER = 24; + + @SuppressWarnings("serial") + private volatile java.lang.Object title_ = ""; + /** + * + * + *
+   * Optional. The title of the Schema.
+   * 
+ * + * string title = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The title. + */ + @java.lang.Override + public java.lang.String getTitle() { + java.lang.Object ref = title_; + 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(); + title_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The title of the Schema.
+   * 
+ * + * string title = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for title. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + public static final int DESCRIPTION_FIELD_NUMBER = 8; @SuppressWarnings("serial") @@ -246,13 +301,60 @@ public boolean getNullable() { return nullable_; } + public static final int DEFAULT_FIELD_NUMBER = 23; + private com.google.protobuf.Value default_; + /** + * + * + *
+   * Optional. Default value of the data.
+   * 
+ * + * .google.protobuf.Value default = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the default field is set. + */ + @java.lang.Override + public boolean hasDefault() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Optional. Default value of the data.
+   * 
+ * + * .google.protobuf.Value default = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The default. + */ + @java.lang.Override + public com.google.protobuf.Value getDefault() { + return default_ == null ? com.google.protobuf.Value.getDefaultInstance() : default_; + } + /** + * + * + *
+   * Optional. Default value of the data.
+   * 
+ * + * .google.protobuf.Value default = 23 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public com.google.protobuf.ValueOrBuilder getDefaultOrBuilder() { + return default_ == null ? com.google.protobuf.Value.getDefaultInstance() : default_; + } + public static final int ITEMS_FIELD_NUMBER = 2; private com.google.cloud.aiplatform.v1.Schema items_; /** * * *
-   * Optional. Schema of the elements of Type.ARRAY.
+   * Optional. SCHEMA FIELDS FOR TYPE ARRAY
+   * Schema of the elements of Type.ARRAY.
    * 
* * .google.cloud.aiplatform.v1.Schema items = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -262,13 +364,14 @@ public boolean getNullable() { */ @java.lang.Override public boolean hasItems() { - return ((bitField0_ & 0x00000001) != 0); + return ((bitField0_ & 0x00000002) != 0); } /** * * *
-   * Optional. Schema of the elements of Type.ARRAY.
+   * Optional. SCHEMA FIELDS FOR TYPE ARRAY
+   * Schema of the elements of Type.ARRAY.
    * 
* * .google.cloud.aiplatform.v1.Schema items = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -284,7 +387,8 @@ public com.google.cloud.aiplatform.v1.Schema getItems() { * * *
-   * Optional. Schema of the elements of Type.ARRAY.
+   * Optional. SCHEMA FIELDS FOR TYPE ARRAY
+   * Schema of the elements of Type.ARRAY.
    * 
* * .google.cloud.aiplatform.v1.Schema items = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -295,6 +399,42 @@ public com.google.cloud.aiplatform.v1.SchemaOrBuilder getItemsOrBuilder() { return items_ == null ? com.google.cloud.aiplatform.v1.Schema.getDefaultInstance() : items_; } + public static final int MIN_ITEMS_FIELD_NUMBER = 21; + private long minItems_ = 0L; + /** + * + * + *
+   * Optional. Minimum number of the elements for Type.ARRAY.
+   * 
+ * + * int64 min_items = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The minItems. + */ + @java.lang.Override + public long getMinItems() { + return minItems_; + } + + public static final int MAX_ITEMS_FIELD_NUMBER = 22; + private long maxItems_ = 0L; + /** + * + * + *
+   * Optional. Maximum number of the elements for Type.ARRAY.
+   * 
+ * + * int64 max_items = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The maxItems. + */ + @java.lang.Override + public long getMaxItems() { + return maxItems_; + } + public static final int ENUM_FIELD_NUMBER = 9; @SuppressWarnings("serial") @@ -402,7 +542,8 @@ public int getPropertiesCount() { * * *
-   * Optional. Properties of Type.OBJECT.
+   * Optional. SCHEMA FIELDS FOR TYPE OBJECT
+   * Properties of Type.OBJECT.
    * 
* * @@ -426,7 +567,8 @@ public java.util.Map ge * * *
-   * Optional. Properties of Type.OBJECT.
+   * Optional. SCHEMA FIELDS FOR TYPE OBJECT
+   * Properties of Type.OBJECT.
    * 
* * @@ -441,7 +583,8 @@ public java.util.Map ge * * *
-   * Optional. Properties of Type.OBJECT.
+   * Optional. SCHEMA FIELDS FOR TYPE OBJECT
+   * Properties of Type.OBJECT.
    * 
* * @@ -464,7 +607,8 @@ public java.util.Map ge * * *
-   * Optional. Properties of Type.OBJECT.
+   * Optional. SCHEMA FIELDS FOR TYPE OBJECT
+   * Properties of Type.OBJECT.
    * 
* * @@ -548,6 +692,169 @@ public com.google.protobuf.ByteString getRequiredBytes(int index) { return required_.getByteString(index); } + public static final int MIN_PROPERTIES_FIELD_NUMBER = 14; + private long minProperties_ = 0L; + /** + * + * + *
+   * Optional. Minimum number of the properties for Type.OBJECT.
+   * 
+ * + * int64 min_properties = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The minProperties. + */ + @java.lang.Override + public long getMinProperties() { + return minProperties_; + } + + public static final int MAX_PROPERTIES_FIELD_NUMBER = 15; + private long maxProperties_ = 0L; + /** + * + * + *
+   * Optional. Maximum number of the properties for Type.OBJECT.
+   * 
+ * + * int64 max_properties = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The maxProperties. + */ + @java.lang.Override + public long getMaxProperties() { + return maxProperties_; + } + + public static final int MINIMUM_FIELD_NUMBER = 16; + private double minimum_ = 0D; + /** + * + * + *
+   * Optional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER
+   * Minimum value of the Type.INTEGER and Type.NUMBER
+   * 
+ * + * double minimum = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The minimum. + */ + @java.lang.Override + public double getMinimum() { + return minimum_; + } + + public static final int MAXIMUM_FIELD_NUMBER = 17; + private double maximum_ = 0D; + /** + * + * + *
+   * Optional. Maximum value of the Type.INTEGER and Type.NUMBER
+   * 
+ * + * double maximum = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The maximum. + */ + @java.lang.Override + public double getMaximum() { + return maximum_; + } + + public static final int MIN_LENGTH_FIELD_NUMBER = 18; + private long minLength_ = 0L; + /** + * + * + *
+   * Optional. SCHEMA FIELDS FOR TYPE STRING
+   * Minimum length of the Type.STRING
+   * 
+ * + * int64 min_length = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The minLength. + */ + @java.lang.Override + public long getMinLength() { + return minLength_; + } + + public static final int MAX_LENGTH_FIELD_NUMBER = 19; + private long maxLength_ = 0L; + /** + * + * + *
+   * Optional. Maximum length of the Type.STRING
+   * 
+ * + * int64 max_length = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The maxLength. + */ + @java.lang.Override + public long getMaxLength() { + return maxLength_; + } + + public static final int PATTERN_FIELD_NUMBER = 20; + + @SuppressWarnings("serial") + private volatile java.lang.Object pattern_ = ""; + /** + * + * + *
+   * Optional. Pattern of the Type.STRING to restrict a string to a regular
+   * expression.
+   * 
+ * + * string pattern = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pattern. + */ + @java.lang.Override + public java.lang.String getPattern() { + java.lang.Object ref = pattern_; + 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(); + pattern_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Pattern of the Type.STRING to restrict a string to a regular
+   * expression.
+   * 
+ * + * string pattern = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pattern. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPatternBytes() { + java.lang.Object ref = pattern_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pattern_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + public static final int EXAMPLE_FIELD_NUMBER = 4; private com.google.protobuf.Value example_; /** @@ -564,7 +871,7 @@ public com.google.protobuf.ByteString getRequiredBytes(int index) { */ @java.lang.Override public boolean hasExample() { - return ((bitField0_ & 0x00000002) != 0); + return ((bitField0_ & 0x00000004) != 0); } /** * @@ -614,12 +921,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (type_ != com.google.cloud.aiplatform.v1.Type.TYPE_UNSPECIFIED.getNumber()) { output.writeEnum(1, type_); } - if (((bitField0_ & 0x00000001) != 0)) { + if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(2, getItems()); } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetProperties(), PropertiesDefaultEntryHolder.defaultEntry, 3); - if (((bitField0_ & 0x00000002) != 0)) { + if (((bitField0_ & 0x00000004) != 0)) { output.writeMessage(4, getExample()); } for (int i = 0; i < required_.size(); i++) { @@ -637,6 +944,39 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < enum_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 9, enum_.getRaw(i)); } + if (minProperties_ != 0L) { + output.writeInt64(14, minProperties_); + } + if (maxProperties_ != 0L) { + output.writeInt64(15, maxProperties_); + } + if (java.lang.Double.doubleToRawLongBits(minimum_) != 0) { + output.writeDouble(16, minimum_); + } + if (java.lang.Double.doubleToRawLongBits(maximum_) != 0) { + output.writeDouble(17, maximum_); + } + if (minLength_ != 0L) { + output.writeInt64(18, minLength_); + } + if (maxLength_ != 0L) { + output.writeInt64(19, maxLength_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pattern_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 20, pattern_); + } + if (minItems_ != 0L) { + output.writeInt64(21, minItems_); + } + if (maxItems_ != 0L) { + output.writeInt64(22, maxItems_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(23, getDefault()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 24, title_); + } getUnknownFields().writeTo(output); } @@ -649,7 +989,7 @@ public int getSerializedSize() { if (type_ != com.google.cloud.aiplatform.v1.Type.TYPE_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, type_); } - if (((bitField0_ & 0x00000001) != 0)) { + if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getItems()); } for (java.util.Map.Entry entry : @@ -663,7 +1003,7 @@ public int getSerializedSize() { .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, properties__); } - if (((bitField0_ & 0x00000002) != 0)) { + if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getExample()); } { @@ -691,6 +1031,39 @@ public int getSerializedSize() { size += dataSize; size += 1 * getEnumList().size(); } + if (minProperties_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(14, minProperties_); + } + if (maxProperties_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(15, maxProperties_); + } + if (java.lang.Double.doubleToRawLongBits(minimum_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(16, minimum_); + } + if (java.lang.Double.doubleToRawLongBits(maximum_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(17, maximum_); + } + if (minLength_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(18, minLength_); + } + if (maxLength_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(19, maxLength_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pattern_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(20, pattern_); + } + if (minItems_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(21, minItems_); + } + if (maxItems_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(22, maxItems_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(23, getDefault()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(24, title_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -708,15 +1081,31 @@ public boolean equals(final java.lang.Object obj) { if (type_ != other.type_) return false; if (!getFormat().equals(other.getFormat())) return false; + if (!getTitle().equals(other.getTitle())) return false; if (!getDescription().equals(other.getDescription())) return false; if (getNullable() != other.getNullable()) return false; + if (hasDefault() != other.hasDefault()) return false; + if (hasDefault()) { + if (!getDefault().equals(other.getDefault())) return false; + } if (hasItems() != other.hasItems()) return false; if (hasItems()) { if (!getItems().equals(other.getItems())) return false; } + if (getMinItems() != other.getMinItems()) return false; + if (getMaxItems() != other.getMaxItems()) return false; if (!getEnumList().equals(other.getEnumList())) return false; if (!internalGetProperties().equals(other.internalGetProperties())) return false; if (!getRequiredList().equals(other.getRequiredList())) return false; + if (getMinProperties() != other.getMinProperties()) return false; + if (getMaxProperties() != other.getMaxProperties()) return false; + if (java.lang.Double.doubleToLongBits(getMinimum()) + != java.lang.Double.doubleToLongBits(other.getMinimum())) return false; + if (java.lang.Double.doubleToLongBits(getMaximum()) + != java.lang.Double.doubleToLongBits(other.getMaximum())) return false; + if (getMinLength() != other.getMinLength()) return false; + if (getMaxLength() != other.getMaxLength()) return false; + if (!getPattern().equals(other.getPattern())) return false; if (hasExample() != other.hasExample()) return false; if (hasExample()) { if (!getExample().equals(other.getExample())) return false; @@ -736,14 +1125,24 @@ public int hashCode() { hash = (53 * hash) + type_; hash = (37 * hash) + FORMAT_FIELD_NUMBER; hash = (53 * hash) + getFormat().hashCode(); + hash = (37 * hash) + TITLE_FIELD_NUMBER; + hash = (53 * hash) + getTitle().hashCode(); hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; hash = (53 * hash) + getDescription().hashCode(); hash = (37 * hash) + NULLABLE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getNullable()); + if (hasDefault()) { + hash = (37 * hash) + DEFAULT_FIELD_NUMBER; + hash = (53 * hash) + getDefault().hashCode(); + } if (hasItems()) { hash = (37 * hash) + ITEMS_FIELD_NUMBER; hash = (53 * hash) + getItems().hashCode(); } + hash = (37 * hash) + MIN_ITEMS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getMinItems()); + hash = (37 * hash) + MAX_ITEMS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getMaxItems()); if (getEnumCount() > 0) { hash = (37 * hash) + ENUM_FIELD_NUMBER; hash = (53 * hash) + getEnumList().hashCode(); @@ -756,6 +1155,26 @@ public int hashCode() { hash = (37 * hash) + REQUIRED_FIELD_NUMBER; hash = (53 * hash) + getRequiredList().hashCode(); } + hash = (37 * hash) + MIN_PROPERTIES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getMinProperties()); + hash = (37 * hash) + MAX_PROPERTIES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getMaxProperties()); + hash = (37 * hash) + MINIMUM_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getMinimum())); + hash = (37 * hash) + MAXIMUM_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getMaximum())); + hash = (37 * hash) + MIN_LENGTH_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getMinLength()); + hash = (37 * hash) + MAX_LENGTH_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getMaxLength()); + hash = (37 * hash) + PATTERN_FIELD_NUMBER; + hash = (53 * hash) + getPattern().hashCode(); if (hasExample()) { hash = (37 * hash) + EXAMPLE_FIELD_NUMBER; hash = (53 * hash) + getExample().hashCode(); @@ -924,6 +1343,7 @@ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getDefaultFieldBuilder(); getItemsFieldBuilder(); getExampleFieldBuilder(); } @@ -935,16 +1355,31 @@ public Builder clear() { bitField0_ = 0; type_ = 0; format_ = ""; + title_ = ""; description_ = ""; nullable_ = false; + default_ = null; + if (defaultBuilder_ != null) { + defaultBuilder_.dispose(); + defaultBuilder_ = null; + } items_ = null; if (itemsBuilder_ != null) { itemsBuilder_.dispose(); itemsBuilder_ = null; } + minItems_ = 0L; + maxItems_ = 0L; enum_ = com.google.protobuf.LazyStringArrayList.emptyList(); internalGetMutableProperties().clear(); required_ = com.google.protobuf.LazyStringArrayList.emptyList(); + minProperties_ = 0L; + maxProperties_ = 0L; + minimum_ = 0D; + maximum_ = 0D; + minLength_ = 0L; + maxLength_ = 0L; + pattern_ = ""; example_ = null; if (exampleBuilder_ != null) { exampleBuilder_.dispose(); @@ -993,31 +1428,65 @@ private void buildPartial0(com.google.cloud.aiplatform.v1.Schema result) { result.format_ = format_; } if (((from_bitField0_ & 0x00000004) != 0)) { - result.description_ = description_; + result.title_ = title_; } if (((from_bitField0_ & 0x00000008) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { result.nullable_ = nullable_; } int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000010) != 0)) { - result.items_ = itemsBuilder_ == null ? items_ : itemsBuilder_.build(); + if (((from_bitField0_ & 0x00000020) != 0)) { + result.default_ = defaultBuilder_ == null ? default_ : defaultBuilder_.build(); to_bitField0_ |= 0x00000001; } - if (((from_bitField0_ & 0x00000020) != 0)) { + if (((from_bitField0_ & 0x00000040) != 0)) { + result.items_ = itemsBuilder_ == null ? items_ : itemsBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.minItems_ = minItems_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.maxItems_ = maxItems_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { enum_.makeImmutable(); result.enum_ = enum_; } - if (((from_bitField0_ & 0x00000040) != 0)) { + if (((from_bitField0_ & 0x00000400) != 0)) { result.properties_ = internalGetProperties().build(PropertiesDefaultEntryHolder.defaultEntry); } - if (((from_bitField0_ & 0x00000080) != 0)) { + if (((from_bitField0_ & 0x00000800) != 0)) { required_.makeImmutable(); result.required_ = required_; } - if (((from_bitField0_ & 0x00000100) != 0)) { + if (((from_bitField0_ & 0x00001000) != 0)) { + result.minProperties_ = minProperties_; + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.maxProperties_ = maxProperties_; + } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.minimum_ = minimum_; + } + if (((from_bitField0_ & 0x00008000) != 0)) { + result.maximum_ = maximum_; + } + if (((from_bitField0_ & 0x00010000) != 0)) { + result.minLength_ = minLength_; + } + if (((from_bitField0_ & 0x00020000) != 0)) { + result.maxLength_ = maxLength_; + } + if (((from_bitField0_ & 0x00040000) != 0)) { + result.pattern_ = pattern_; + } + if (((from_bitField0_ & 0x00080000) != 0)) { result.example_ = exampleBuilder_ == null ? example_ : exampleBuilder_.build(); - to_bitField0_ |= 0x00000002; + to_bitField0_ |= 0x00000004; } result.bitField0_ |= to_bitField0_; } @@ -1075,21 +1544,35 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1.Schema other) { bitField0_ |= 0x00000002; onChanged(); } + if (!other.getTitle().isEmpty()) { + title_ = other.title_; + bitField0_ |= 0x00000004; + onChanged(); + } if (!other.getDescription().isEmpty()) { description_ = other.description_; - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); } if (other.getNullable() != false) { setNullable(other.getNullable()); } + if (other.hasDefault()) { + mergeDefault(other.getDefault()); + } if (other.hasItems()) { mergeItems(other.getItems()); } + if (other.getMinItems() != 0L) { + setMinItems(other.getMinItems()); + } + if (other.getMaxItems() != 0L) { + setMaxItems(other.getMaxItems()); + } if (!other.enum_.isEmpty()) { if (enum_.isEmpty()) { enum_ = other.enum_; - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000200; } else { ensureEnumIsMutable(); enum_.addAll(other.enum_); @@ -1097,17 +1580,40 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1.Schema other) { onChanged(); } internalGetMutableProperties().mergeFrom(other.internalGetProperties()); - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000400; if (!other.required_.isEmpty()) { if (required_.isEmpty()) { required_ = other.required_; - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000800; } else { ensureRequiredIsMutable(); required_.addAll(other.required_); } onChanged(); } + if (other.getMinProperties() != 0L) { + setMinProperties(other.getMinProperties()); + } + if (other.getMaxProperties() != 0L) { + setMaxProperties(other.getMaxProperties()); + } + if (other.getMinimum() != 0D) { + setMinimum(other.getMinimum()); + } + if (other.getMaximum() != 0D) { + setMaximum(other.getMaximum()); + } + if (other.getMinLength() != 0L) { + setMinLength(other.getMinLength()); + } + if (other.getMaxLength() != 0L) { + setMaxLength(other.getMaxLength()); + } + if (!other.getPattern().isEmpty()) { + pattern_ = other.pattern_; + bitField0_ |= 0x00040000; + onChanged(); + } if (other.hasExample()) { mergeExample(other.getExample()); } @@ -1146,7 +1652,7 @@ public Builder mergeFrom( case 18: { input.readMessage(getItemsFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000040; break; } // case 18 case 26: @@ -1160,13 +1666,13 @@ public Builder mergeFrom( internalGetMutableProperties() .ensureBuilderMap() .put(properties__.getKey(), properties__.getValue()); - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000400; break; } // case 26 case 34: { input.readMessage(getExampleFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000100; + bitField0_ |= 0x00080000; break; } // case 34 case 42: @@ -1179,7 +1685,7 @@ public Builder mergeFrom( case 48: { nullable_ = input.readBool(); - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; break; } // case 48 case 58: @@ -1191,7 +1697,7 @@ public Builder mergeFrom( case 66: { description_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; break; } // case 66 case 74: @@ -1201,6 +1707,72 @@ public Builder mergeFrom( enum_.add(s); break; } // case 74 + case 112: + { + minProperties_ = input.readInt64(); + bitField0_ |= 0x00001000; + break; + } // case 112 + case 120: + { + maxProperties_ = input.readInt64(); + bitField0_ |= 0x00002000; + break; + } // case 120 + case 129: + { + minimum_ = input.readDouble(); + bitField0_ |= 0x00004000; + break; + } // case 129 + case 137: + { + maximum_ = input.readDouble(); + bitField0_ |= 0x00008000; + break; + } // case 137 + case 144: + { + minLength_ = input.readInt64(); + bitField0_ |= 0x00010000; + break; + } // case 144 + case 152: + { + maxLength_ = input.readInt64(); + bitField0_ |= 0x00020000; + break; + } // case 152 + case 162: + { + pattern_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00040000; + break; + } // case 162 + case 168: + { + minItems_ = input.readInt64(); + bitField0_ |= 0x00000080; + break; + } // case 168 + case 176: + { + maxItems_ = input.readInt64(); + bitField0_ |= 0x00000100; + break; + } // case 176 + case 186: + { + input.readMessage(getDefaultFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 186 + case 194: + { + title_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 194 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1322,8 +1894,9 @@ public Builder clearType() { *
      * Optional. The format of the data.
      * Supported formats:
-     *  for NUMBER type: float, double
-     *  for INTEGER type: int32, int64
+     *  for NUMBER type: "float", "double"
+     *  for INTEGER type: "int32", "int64"
+     *  for STRING type: "email", "byte", etc
      * 
* * string format = 7 [(.google.api.field_behavior) = OPTIONAL]; @@ -1347,8 +1920,9 @@ public java.lang.String getFormat() { *
      * Optional. The format of the data.
      * Supported formats:
-     *  for NUMBER type: float, double
-     *  for INTEGER type: int32, int64
+     *  for NUMBER type: "float", "double"
+     *  for INTEGER type: "int32", "int64"
+     *  for STRING type: "email", "byte", etc
      * 
* * string format = 7 [(.google.api.field_behavior) = OPTIONAL]; @@ -1372,8 +1946,9 @@ public com.google.protobuf.ByteString getFormatBytes() { *
      * Optional. The format of the data.
      * Supported formats:
-     *  for NUMBER type: float, double
-     *  for INTEGER type: int32, int64
+     *  for NUMBER type: "float", "double"
+     *  for INTEGER type: "int32", "int64"
+     *  for STRING type: "email", "byte", etc
      * 
* * string format = 7 [(.google.api.field_behavior) = OPTIONAL]; @@ -1396,8 +1971,9 @@ public Builder setFormat(java.lang.String value) { *
      * Optional. The format of the data.
      * Supported formats:
-     *  for NUMBER type: float, double
-     *  for INTEGER type: int32, int64
+     *  for NUMBER type: "float", "double"
+     *  for INTEGER type: "int32", "int64"
+     *  for STRING type: "email", "byte", etc
      * 
* * string format = 7 [(.google.api.field_behavior) = OPTIONAL]; @@ -1416,8 +1992,9 @@ public Builder clearFormat() { *
      * Optional. The format of the data.
      * Supported formats:
-     *  for NUMBER type: float, double
-     *  for INTEGER type: int32, int64
+     *  for NUMBER type: "float", "double"
+     *  for INTEGER type: "int32", "int64"
+     *  for STRING type: "email", "byte", etc
      * 
* * string format = 7 [(.google.api.field_behavior) = OPTIONAL]; @@ -1436,6 +2013,112 @@ public Builder setFormatBytes(com.google.protobuf.ByteString value) { return this; } + private java.lang.Object title_ = ""; + /** + * + * + *
+     * Optional. The title of the Schema.
+     * 
+ * + * string title = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The title. + */ + public java.lang.String getTitle() { + java.lang.Object ref = title_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + title_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The title of the Schema.
+     * 
+ * + * string title = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for title. + */ + public com.google.protobuf.ByteString getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The title of the Schema.
+     * 
+ * + * string title = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The title to set. + * @return This builder for chaining. + */ + public Builder setTitle(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + title_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The title of the Schema.
+     * 
+ * + * string title = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearTitle() { + title_ = getDefaultInstance().getTitle(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The title of the Schema.
+     * 
+ * + * string title = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for title to set. + * @return This builder for chaining. + */ + public Builder setTitleBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + title_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + private java.lang.Object description_ = ""; /** * @@ -1498,7 +2181,7 @@ public Builder setDescription(java.lang.String value) { throw new NullPointerException(); } description_ = value; - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -1515,7 +2198,7 @@ public Builder setDescription(java.lang.String value) { */ public Builder clearDescription() { description_ = getDefaultInstance().getDescription(); - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000008); onChanged(); return this; } @@ -1537,7 +2220,7 @@ public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); description_ = value; - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -1573,7 +2256,7 @@ public boolean getNullable() { public Builder setNullable(boolean value) { nullable_ = value; - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -1589,72 +2272,69 @@ public Builder setNullable(boolean value) { * @return This builder for chaining. */ public Builder clearNullable() { - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000010); nullable_ = false; onChanged(); return this; } - private com.google.cloud.aiplatform.v1.Schema items_; + private com.google.protobuf.Value default_; private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.aiplatform.v1.Schema, - com.google.cloud.aiplatform.v1.Schema.Builder, - com.google.cloud.aiplatform.v1.SchemaOrBuilder> - itemsBuilder_; + com.google.protobuf.Value, + com.google.protobuf.Value.Builder, + com.google.protobuf.ValueOrBuilder> + defaultBuilder_; /** * * *
-     * Optional. Schema of the elements of Type.ARRAY.
+     * Optional. Default value of the data.
      * 
* - * .google.cloud.aiplatform.v1.Schema items = 2 [(.google.api.field_behavior) = OPTIONAL]; - * + * .google.protobuf.Value default = 23 [(.google.api.field_behavior) = OPTIONAL]; * - * @return Whether the items field is set. + * @return Whether the default field is set. */ - public boolean hasItems() { - return ((bitField0_ & 0x00000010) != 0); + public boolean hasDefault() { + return ((bitField0_ & 0x00000020) != 0); } /** * * *
-     * Optional. Schema of the elements of Type.ARRAY.
+     * Optional. Default value of the data.
      * 
* - * .google.cloud.aiplatform.v1.Schema items = 2 [(.google.api.field_behavior) = OPTIONAL]; - * + * .google.protobuf.Value default = 23 [(.google.api.field_behavior) = OPTIONAL]; * - * @return The items. + * @return The default. */ - public com.google.cloud.aiplatform.v1.Schema getItems() { - if (itemsBuilder_ == null) { - return items_ == null ? com.google.cloud.aiplatform.v1.Schema.getDefaultInstance() : items_; + public com.google.protobuf.Value getDefault() { + if (defaultBuilder_ == null) { + return default_ == null ? com.google.protobuf.Value.getDefaultInstance() : default_; } else { - return itemsBuilder_.getMessage(); + return defaultBuilder_.getMessage(); } } /** * * *
-     * Optional. Schema of the elements of Type.ARRAY.
+     * Optional. Default value of the data.
      * 
* - * .google.cloud.aiplatform.v1.Schema items = 2 [(.google.api.field_behavior) = OPTIONAL]; - * + * .google.protobuf.Value default = 23 [(.google.api.field_behavior) = OPTIONAL]; */ - public Builder setItems(com.google.cloud.aiplatform.v1.Schema value) { - if (itemsBuilder_ == null) { + public Builder setDefault(com.google.protobuf.Value value) { + if (defaultBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - items_ = value; + default_ = value; } else { - itemsBuilder_.setMessage(value); + defaultBuilder_.setMessage(value); } - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -1662,19 +2342,18 @@ public Builder setItems(com.google.cloud.aiplatform.v1.Schema value) { * * *
-     * Optional. Schema of the elements of Type.ARRAY.
+     * Optional. Default value of the data.
      * 
* - * .google.cloud.aiplatform.v1.Schema items = 2 [(.google.api.field_behavior) = OPTIONAL]; - * + * .google.protobuf.Value default = 23 [(.google.api.field_behavior) = OPTIONAL]; */ - public Builder setItems(com.google.cloud.aiplatform.v1.Schema.Builder builderForValue) { - if (itemsBuilder_ == null) { - items_ = builderForValue.build(); + public Builder setDefault(com.google.protobuf.Value.Builder builderForValue) { + if (defaultBuilder_ == null) { + default_ = builderForValue.build(); } else { - itemsBuilder_.setMessage(builderForValue.build()); + defaultBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -1682,26 +2361,25 @@ public Builder setItems(com.google.cloud.aiplatform.v1.Schema.Builder builderFor * * *
-     * Optional. Schema of the elements of Type.ARRAY.
+     * Optional. Default value of the data.
      * 
* - * .google.cloud.aiplatform.v1.Schema items = 2 [(.google.api.field_behavior) = OPTIONAL]; - * + * .google.protobuf.Value default = 23 [(.google.api.field_behavior) = OPTIONAL]; */ - public Builder mergeItems(com.google.cloud.aiplatform.v1.Schema value) { - if (itemsBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0) - && items_ != null - && items_ != com.google.cloud.aiplatform.v1.Schema.getDefaultInstance()) { - getItemsBuilder().mergeFrom(value); + public Builder mergeDefault(com.google.protobuf.Value value) { + if (defaultBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && default_ != null + && default_ != com.google.protobuf.Value.getDefaultInstance()) { + getDefaultBuilder().mergeFrom(value); } else { - items_ = value; + default_ = value; } } else { - itemsBuilder_.mergeFrom(value); + defaultBuilder_.mergeFrom(value); } - if (items_ != null) { - bitField0_ |= 0x00000010; + if (default_ != null) { + bitField0_ |= 0x00000020; onChanged(); } return this; @@ -1710,18 +2388,17 @@ public Builder mergeItems(com.google.cloud.aiplatform.v1.Schema value) { * * *
-     * Optional. Schema of the elements of Type.ARRAY.
+     * Optional. Default value of the data.
      * 
* - * .google.cloud.aiplatform.v1.Schema items = 2 [(.google.api.field_behavior) = OPTIONAL]; - * + * .google.protobuf.Value default = 23 [(.google.api.field_behavior) = OPTIONAL]; */ - public Builder clearItems() { - bitField0_ = (bitField0_ & ~0x00000010); - items_ = null; - if (itemsBuilder_ != null) { - itemsBuilder_.dispose(); - itemsBuilder_ = null; + public Builder clearDefault() { + bitField0_ = (bitField0_ & ~0x00000020); + default_ = null; + if (defaultBuilder_ != null) { + defaultBuilder_.dispose(); + defaultBuilder_ = null; } onChanged(); return this; @@ -1730,159 +2407,900 @@ public Builder clearItems() { * * *
-     * Optional. Schema of the elements of Type.ARRAY.
+     * Optional. Default value of the data.
      * 
* - * .google.cloud.aiplatform.v1.Schema items = 2 [(.google.api.field_behavior) = OPTIONAL]; - * + * .google.protobuf.Value default = 23 [(.google.api.field_behavior) = OPTIONAL]; */ - public com.google.cloud.aiplatform.v1.Schema.Builder getItemsBuilder() { - bitField0_ |= 0x00000010; + public com.google.protobuf.Value.Builder getDefaultBuilder() { + bitField0_ |= 0x00000020; onChanged(); - return getItemsFieldBuilder().getBuilder(); + return getDefaultFieldBuilder().getBuilder(); } /** * * *
-     * Optional. Schema of the elements of Type.ARRAY.
+     * Optional. Default value of the data.
      * 
* - * .google.cloud.aiplatform.v1.Schema items = 2 [(.google.api.field_behavior) = OPTIONAL]; - * + * .google.protobuf.Value default = 23 [(.google.api.field_behavior) = OPTIONAL]; */ - public com.google.cloud.aiplatform.v1.SchemaOrBuilder getItemsOrBuilder() { - if (itemsBuilder_ != null) { - return itemsBuilder_.getMessageOrBuilder(); + public com.google.protobuf.ValueOrBuilder getDefaultOrBuilder() { + if (defaultBuilder_ != null) { + return defaultBuilder_.getMessageOrBuilder(); } else { - return items_ == null ? com.google.cloud.aiplatform.v1.Schema.getDefaultInstance() : items_; + return default_ == null ? com.google.protobuf.Value.getDefaultInstance() : default_; } } /** * * *
-     * Optional. Schema of the elements of Type.ARRAY.
+     * Optional. Default value of the data.
      * 
* - * .google.cloud.aiplatform.v1.Schema items = 2 [(.google.api.field_behavior) = OPTIONAL]; - * + * .google.protobuf.Value default = 23 [(.google.api.field_behavior) = OPTIONAL]; */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.aiplatform.v1.Schema, - com.google.cloud.aiplatform.v1.Schema.Builder, - com.google.cloud.aiplatform.v1.SchemaOrBuilder> - getItemsFieldBuilder() { - if (itemsBuilder_ == null) { - itemsBuilder_ = + com.google.protobuf.Value, + com.google.protobuf.Value.Builder, + com.google.protobuf.ValueOrBuilder> + getDefaultFieldBuilder() { + if (defaultBuilder_ == null) { + defaultBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.aiplatform.v1.Schema, - com.google.cloud.aiplatform.v1.Schema.Builder, - com.google.cloud.aiplatform.v1.SchemaOrBuilder>( - getItems(), getParentForChildren(), isClean()); - items_ = null; + com.google.protobuf.Value, + com.google.protobuf.Value.Builder, + com.google.protobuf.ValueOrBuilder>( + getDefault(), getParentForChildren(), isClean()); + default_ = null; } - return itemsBuilder_; + return defaultBuilder_; } - private com.google.protobuf.LazyStringArrayList enum_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - - private void ensureEnumIsMutable() { - if (!enum_.isModifiable()) { - enum_ = new com.google.protobuf.LazyStringArrayList(enum_); - } - bitField0_ |= 0x00000020; - } + private com.google.cloud.aiplatform.v1.Schema items_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.Schema, + com.google.cloud.aiplatform.v1.Schema.Builder, + com.google.cloud.aiplatform.v1.SchemaOrBuilder> + itemsBuilder_; /** * * *
-     * Optional. Possible values of the element of Type.STRING with enum format.
-     * For example we can define an Enum Direction as :
-     * {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]}
+     * Optional. SCHEMA FIELDS FOR TYPE ARRAY
+     * Schema of the elements of Type.ARRAY.
      * 
* - * repeated string enum = 9 [(.google.api.field_behavior) = OPTIONAL]; + * .google.cloud.aiplatform.v1.Schema items = 2 [(.google.api.field_behavior) = OPTIONAL]; + * * - * @return A list containing the enum. + * @return Whether the items field is set. */ - public com.google.protobuf.ProtocolStringList getEnumList() { - enum_.makeImmutable(); - return enum_; + public boolean hasItems() { + return ((bitField0_ & 0x00000040) != 0); } /** * * *
-     * Optional. Possible values of the element of Type.STRING with enum format.
-     * For example we can define an Enum Direction as :
-     * {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]}
+     * Optional. SCHEMA FIELDS FOR TYPE ARRAY
+     * Schema of the elements of Type.ARRAY.
      * 
* - * repeated string enum = 9 [(.google.api.field_behavior) = OPTIONAL]; + * .google.cloud.aiplatform.v1.Schema items = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The items. + */ + public com.google.cloud.aiplatform.v1.Schema getItems() { + if (itemsBuilder_ == null) { + return items_ == null ? com.google.cloud.aiplatform.v1.Schema.getDefaultInstance() : items_; + } else { + return itemsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. SCHEMA FIELDS FOR TYPE ARRAY
+     * Schema of the elements of Type.ARRAY.
+     * 
+ * + * .google.cloud.aiplatform.v1.Schema items = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setItems(com.google.cloud.aiplatform.v1.Schema value) { + if (itemsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + items_ = value; + } else { + itemsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. SCHEMA FIELDS FOR TYPE ARRAY
+     * Schema of the elements of Type.ARRAY.
+     * 
+ * + * .google.cloud.aiplatform.v1.Schema items = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setItems(com.google.cloud.aiplatform.v1.Schema.Builder builderForValue) { + if (itemsBuilder_ == null) { + items_ = builderForValue.build(); + } else { + itemsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. SCHEMA FIELDS FOR TYPE ARRAY
+     * Schema of the elements of Type.ARRAY.
+     * 
+ * + * .google.cloud.aiplatform.v1.Schema items = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeItems(com.google.cloud.aiplatform.v1.Schema value) { + if (itemsBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && items_ != null + && items_ != com.google.cloud.aiplatform.v1.Schema.getDefaultInstance()) { + getItemsBuilder().mergeFrom(value); + } else { + items_ = value; + } + } else { + itemsBuilder_.mergeFrom(value); + } + if (items_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Optional. SCHEMA FIELDS FOR TYPE ARRAY
+     * Schema of the elements of Type.ARRAY.
+     * 
+ * + * .google.cloud.aiplatform.v1.Schema items = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearItems() { + bitField0_ = (bitField0_ & ~0x00000040); + items_ = null; + if (itemsBuilder_ != null) { + itemsBuilder_.dispose(); + itemsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. SCHEMA FIELDS FOR TYPE ARRAY
+     * Schema of the elements of Type.ARRAY.
+     * 
+ * + * .google.cloud.aiplatform.v1.Schema items = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1.Schema.Builder getItemsBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getItemsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. SCHEMA FIELDS FOR TYPE ARRAY
+     * Schema of the elements of Type.ARRAY.
+     * 
+ * + * .google.cloud.aiplatform.v1.Schema items = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1.SchemaOrBuilder getItemsOrBuilder() { + if (itemsBuilder_ != null) { + return itemsBuilder_.getMessageOrBuilder(); + } else { + return items_ == null ? com.google.cloud.aiplatform.v1.Schema.getDefaultInstance() : items_; + } + } + /** + * + * + *
+     * Optional. SCHEMA FIELDS FOR TYPE ARRAY
+     * Schema of the elements of Type.ARRAY.
+     * 
+ * + * .google.cloud.aiplatform.v1.Schema items = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.Schema, + com.google.cloud.aiplatform.v1.Schema.Builder, + com.google.cloud.aiplatform.v1.SchemaOrBuilder> + getItemsFieldBuilder() { + if (itemsBuilder_ == null) { + itemsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.Schema, + com.google.cloud.aiplatform.v1.Schema.Builder, + com.google.cloud.aiplatform.v1.SchemaOrBuilder>( + getItems(), getParentForChildren(), isClean()); + items_ = null; + } + return itemsBuilder_; + } + + private long minItems_; + /** + * + * + *
+     * Optional. Minimum number of the elements for Type.ARRAY.
+     * 
+ * + * int64 min_items = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The minItems. + */ + @java.lang.Override + public long getMinItems() { + return minItems_; + } + /** + * + * + *
+     * Optional. Minimum number of the elements for Type.ARRAY.
+     * 
+ * + * int64 min_items = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The minItems to set. + * @return This builder for chaining. + */ + public Builder setMinItems(long value) { + + minItems_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Minimum number of the elements for Type.ARRAY.
+     * 
+ * + * int64 min_items = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearMinItems() { + bitField0_ = (bitField0_ & ~0x00000080); + minItems_ = 0L; + onChanged(); + return this; + } + + private long maxItems_; + /** + * + * + *
+     * Optional. Maximum number of the elements for Type.ARRAY.
+     * 
+ * + * int64 max_items = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The maxItems. + */ + @java.lang.Override + public long getMaxItems() { + return maxItems_; + } + /** + * + * + *
+     * Optional. Maximum number of the elements for Type.ARRAY.
+     * 
+ * + * int64 max_items = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The maxItems to set. + * @return This builder for chaining. + */ + public Builder setMaxItems(long value) { + + maxItems_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Maximum number of the elements for Type.ARRAY.
+     * 
+ * + * int64 max_items = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearMaxItems() { + bitField0_ = (bitField0_ & ~0x00000100); + maxItems_ = 0L; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList enum_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureEnumIsMutable() { + if (!enum_.isModifiable()) { + enum_ = new com.google.protobuf.LazyStringArrayList(enum_); + } + bitField0_ |= 0x00000200; + } + /** + * + * + *
+     * Optional. Possible values of the element of Type.STRING with enum format.
+     * For example we can define an Enum Direction as :
+     * {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]}
+     * 
+ * + * repeated string enum = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the enum. + */ + public com.google.protobuf.ProtocolStringList getEnumList() { + enum_.makeImmutable(); + return enum_; + } + /** + * + * + *
+     * Optional. Possible values of the element of Type.STRING with enum format.
+     * For example we can define an Enum Direction as :
+     * {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]}
+     * 
+ * + * repeated string enum = 9 [(.google.api.field_behavior) = OPTIONAL]; * * @return The count of enum. */ - public int getEnumCount() { - return enum_.size(); + public int getEnumCount() { + return enum_.size(); + } + /** + * + * + *
+     * Optional. Possible values of the element of Type.STRING with enum format.
+     * For example we can define an Enum Direction as :
+     * {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]}
+     * 
+ * + * repeated string enum = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The enum at the given index. + */ + public java.lang.String getEnum(int index) { + return enum_.get(index); + } + /** + * + * + *
+     * Optional. Possible values of the element of Type.STRING with enum format.
+     * For example we can define an Enum Direction as :
+     * {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]}
+     * 
+ * + * repeated string enum = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the enum at the given index. + */ + public com.google.protobuf.ByteString getEnumBytes(int index) { + return enum_.getByteString(index); + } + /** + * + * + *
+     * Optional. Possible values of the element of Type.STRING with enum format.
+     * For example we can define an Enum Direction as :
+     * {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]}
+     * 
+ * + * repeated string enum = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The enum to set. + * @return This builder for chaining. + */ + public Builder setEnum(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureEnumIsMutable(); + enum_.set(index, value); + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Possible values of the element of Type.STRING with enum format.
+     * For example we can define an Enum Direction as :
+     * {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]}
+     * 
+ * + * repeated string enum = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The enum to add. + * @return This builder for chaining. + */ + public Builder addEnum(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureEnumIsMutable(); + enum_.add(value); + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Possible values of the element of Type.STRING with enum format.
+     * For example we can define an Enum Direction as :
+     * {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]}
+     * 
+ * + * repeated string enum = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The enum to add. + * @return This builder for chaining. + */ + public Builder addAllEnum(java.lang.Iterable values) { + ensureEnumIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, enum_); + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Possible values of the element of Type.STRING with enum format.
+     * For example we can define an Enum Direction as :
+     * {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]}
+     * 
+ * + * repeated string enum = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEnum() { + enum_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000200); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Possible values of the element of Type.STRING with enum format.
+     * For example we can define an Enum Direction as :
+     * {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]}
+     * 
+ * + * repeated string enum = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes of the enum to add. + * @return This builder for chaining. + */ + public Builder addEnumBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureEnumIsMutable(); + enum_.add(value); + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + private static final class PropertiesConverter + implements com.google.protobuf.MapFieldBuilder.Converter< + java.lang.String, + com.google.cloud.aiplatform.v1.SchemaOrBuilder, + com.google.cloud.aiplatform.v1.Schema> { + @java.lang.Override + public com.google.cloud.aiplatform.v1.Schema build( + com.google.cloud.aiplatform.v1.SchemaOrBuilder val) { + if (val instanceof com.google.cloud.aiplatform.v1.Schema) { + return (com.google.cloud.aiplatform.v1.Schema) val; + } + return ((com.google.cloud.aiplatform.v1.Schema.Builder) val).build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry + defaultEntry() { + return PropertiesDefaultEntryHolder.defaultEntry; + } + }; + + private static final PropertiesConverter propertiesConverter = new PropertiesConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.cloud.aiplatform.v1.SchemaOrBuilder, + com.google.cloud.aiplatform.v1.Schema, + com.google.cloud.aiplatform.v1.Schema.Builder> + properties_; + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.cloud.aiplatform.v1.SchemaOrBuilder, + com.google.cloud.aiplatform.v1.Schema, + com.google.cloud.aiplatform.v1.Schema.Builder> + internalGetProperties() { + if (properties_ == null) { + return new com.google.protobuf.MapFieldBuilder<>(propertiesConverter); + } + return properties_; + } + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.cloud.aiplatform.v1.SchemaOrBuilder, + com.google.cloud.aiplatform.v1.Schema, + com.google.cloud.aiplatform.v1.Schema.Builder> + internalGetMutableProperties() { + if (properties_ == null) { + properties_ = new com.google.protobuf.MapFieldBuilder<>(propertiesConverter); + } + bitField0_ |= 0x00000400; + onChanged(); + return properties_; + } + + public int getPropertiesCount() { + return internalGetProperties().ensureBuilderMap().size(); + } + /** + * + * + *
+     * Optional. SCHEMA FIELDS FOR TYPE OBJECT
+     * Properties of Type.OBJECT.
+     * 
+ * + * + * map<string, .google.cloud.aiplatform.v1.Schema> properties = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsProperties(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetProperties().ensureBuilderMap().containsKey(key); + } + /** Use {@link #getPropertiesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getProperties() { + return getPropertiesMap(); + } + /** + * + * + *
+     * Optional. SCHEMA FIELDS FOR TYPE OBJECT
+     * Properties of Type.OBJECT.
+     * 
+ * + * + * map<string, .google.cloud.aiplatform.v1.Schema> properties = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map + getPropertiesMap() { + return internalGetProperties().getImmutableMap(); + } + /** + * + * + *
+     * Optional. SCHEMA FIELDS FOR TYPE OBJECT
+     * Properties of Type.OBJECT.
+     * 
+ * + * + * map<string, .google.cloud.aiplatform.v1.Schema> properties = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public /* nullable */ com.google.cloud.aiplatform.v1.Schema getPropertiesOrDefault( + java.lang.String key, + /* nullable */ + com.google.cloud.aiplatform.v1.Schema defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetMutableProperties().ensureBuilderMap(); + return map.containsKey(key) ? propertiesConverter.build(map.get(key)) : defaultValue; + } + /** + * + * + *
+     * Optional. SCHEMA FIELDS FOR TYPE OBJECT
+     * Properties of Type.OBJECT.
+     * 
+ * + * + * map<string, .google.cloud.aiplatform.v1.Schema> properties = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.Schema getPropertiesOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetMutableProperties().ensureBuilderMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return propertiesConverter.build(map.get(key)); + } + + public Builder clearProperties() { + bitField0_ = (bitField0_ & ~0x00000400); + internalGetMutableProperties().clear(); + return this; + } + /** + * + * + *
+     * Optional. SCHEMA FIELDS FOR TYPE OBJECT
+     * Properties of Type.OBJECT.
+     * 
+ * + * + * map<string, .google.cloud.aiplatform.v1.Schema> properties = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeProperties(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableProperties().ensureBuilderMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map + getMutableProperties() { + bitField0_ |= 0x00000400; + return internalGetMutableProperties().ensureMessageMap(); + } + /** + * + * + *
+     * Optional. SCHEMA FIELDS FOR TYPE OBJECT
+     * Properties of Type.OBJECT.
+     * 
+ * + * + * map<string, .google.cloud.aiplatform.v1.Schema> properties = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putProperties( + java.lang.String key, com.google.cloud.aiplatform.v1.Schema value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableProperties().ensureBuilderMap().put(key, value); + bitField0_ |= 0x00000400; + return this; + } + /** + * + * + *
+     * Optional. SCHEMA FIELDS FOR TYPE OBJECT
+     * Properties of Type.OBJECT.
+     * 
+ * + * + * map<string, .google.cloud.aiplatform.v1.Schema> properties = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putAllProperties( + java.util.Map values) { + for (java.util.Map.Entry e : + values.entrySet()) { + if (e.getKey() == null || e.getValue() == null) { + throw new NullPointerException(); + } + } + internalGetMutableProperties().ensureBuilderMap().putAll(values); + bitField0_ |= 0x00000400; + return this; + } + /** + * + * + *
+     * Optional. SCHEMA FIELDS FOR TYPE OBJECT
+     * Properties of Type.OBJECT.
+     * 
+ * + * + * map<string, .google.cloud.aiplatform.v1.Schema> properties = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1.Schema.Builder putPropertiesBuilderIfAbsent( + java.lang.String key) { + java.util.Map builderMap = + internalGetMutableProperties().ensureBuilderMap(); + com.google.cloud.aiplatform.v1.SchemaOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = com.google.cloud.aiplatform.v1.Schema.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof com.google.cloud.aiplatform.v1.Schema) { + entry = ((com.google.cloud.aiplatform.v1.Schema) entry).toBuilder(); + builderMap.put(key, entry); + } + return (com.google.cloud.aiplatform.v1.Schema.Builder) entry; + } + + private com.google.protobuf.LazyStringArrayList required_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureRequiredIsMutable() { + if (!required_.isModifiable()) { + required_ = new com.google.protobuf.LazyStringArrayList(required_); + } + bitField0_ |= 0x00000800; + } + /** + * + * + *
+     * Optional. Required properties of Type.OBJECT.
+     * 
+ * + * repeated string required = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the required. + */ + public com.google.protobuf.ProtocolStringList getRequiredList() { + required_.makeImmutable(); + return required_; } /** * * *
-     * Optional. Possible values of the element of Type.STRING with enum format.
-     * For example we can define an Enum Direction as :
-     * {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]}
+     * Optional. Required properties of Type.OBJECT.
      * 
* - * repeated string enum = 9 [(.google.api.field_behavior) = OPTIONAL]; + * repeated string required = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of required. + */ + public int getRequiredCount() { + return required_.size(); + } + /** + * + * + *
+     * Optional. Required properties of Type.OBJECT.
+     * 
+ * + * repeated string required = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @param index The index of the element to return. - * @return The enum at the given index. + * @return The required at the given index. */ - public java.lang.String getEnum(int index) { - return enum_.get(index); + public java.lang.String getRequired(int index) { + return required_.get(index); } /** * * *
-     * Optional. Possible values of the element of Type.STRING with enum format.
-     * For example we can define an Enum Direction as :
-     * {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]}
+     * Optional. Required properties of Type.OBJECT.
      * 
* - * repeated string enum = 9 [(.google.api.field_behavior) = OPTIONAL]; + * repeated string required = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @param index The index of the value to return. - * @return The bytes of the enum at the given index. + * @return The bytes of the required at the given index. */ - public com.google.protobuf.ByteString getEnumBytes(int index) { - return enum_.getByteString(index); + public com.google.protobuf.ByteString getRequiredBytes(int index) { + return required_.getByteString(index); } /** * * *
-     * Optional. Possible values of the element of Type.STRING with enum format.
-     * For example we can define an Enum Direction as :
-     * {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]}
+     * Optional. Required properties of Type.OBJECT.
      * 
* - * repeated string enum = 9 [(.google.api.field_behavior) = OPTIONAL]; + * repeated string required = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @param index The index to set the value at. - * @param value The enum to set. + * @param value The required to set. * @return This builder for chaining. */ - public Builder setEnum(int index, java.lang.String value) { + public Builder setRequired(int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } - ensureEnumIsMutable(); - enum_.set(index, value); - bitField0_ |= 0x00000020; + ensureRequiredIsMutable(); + required_.set(index, value); + bitField0_ |= 0x00000800; onChanged(); return this; } @@ -1890,23 +3308,21 @@ public Builder setEnum(int index, java.lang.String value) { * * *
-     * Optional. Possible values of the element of Type.STRING with enum format.
-     * For example we can define an Enum Direction as :
-     * {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]}
+     * Optional. Required properties of Type.OBJECT.
      * 
* - * repeated string enum = 9 [(.google.api.field_behavior) = OPTIONAL]; + * repeated string required = 5 [(.google.api.field_behavior) = OPTIONAL]; * - * @param value The enum to add. + * @param value The required to add. * @return This builder for chaining. */ - public Builder addEnum(java.lang.String value) { + public Builder addRequired(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - ensureEnumIsMutable(); - enum_.add(value); - bitField0_ |= 0x00000020; + ensureRequiredIsMutable(); + required_.add(value); + bitField0_ |= 0x00000800; onChanged(); return this; } @@ -1914,20 +3330,18 @@ public Builder addEnum(java.lang.String value) { * * *
-     * Optional. Possible values of the element of Type.STRING with enum format.
-     * For example we can define an Enum Direction as :
-     * {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]}
+     * Optional. Required properties of Type.OBJECT.
      * 
* - * repeated string enum = 9 [(.google.api.field_behavior) = OPTIONAL]; + * repeated string required = 5 [(.google.api.field_behavior) = OPTIONAL]; * - * @param values The enum to add. + * @param values The required to add. * @return This builder for chaining. */ - public Builder addAllEnum(java.lang.Iterable values) { - ensureEnumIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, enum_); - bitField0_ |= 0x00000020; + public Builder addAllRequired(java.lang.Iterable values) { + ensureRequiredIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, required_); + bitField0_ |= 0x00000800; onChanged(); return this; } @@ -1935,18 +3349,16 @@ public Builder addAllEnum(java.lang.Iterable values) { * * *
-     * Optional. Possible values of the element of Type.STRING with enum format.
-     * For example we can define an Enum Direction as :
-     * {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]}
+     * Optional. Required properties of Type.OBJECT.
      * 
* - * repeated string enum = 9 [(.google.api.field_behavior) = OPTIONAL]; + * repeated string required = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ - public Builder clearEnum() { - enum_ = com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); + public Builder clearRequired() { + required_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000800); ; onChanged(); return this; @@ -1955,406 +3367,416 @@ public Builder clearEnum() { * * *
-     * Optional. Possible values of the element of Type.STRING with enum format.
-     * For example we can define an Enum Direction as :
-     * {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]}
+     * Optional. Required properties of Type.OBJECT.
      * 
* - * repeated string enum = 9 [(.google.api.field_behavior) = OPTIONAL]; + * repeated string required = 5 [(.google.api.field_behavior) = OPTIONAL]; * - * @param value The bytes of the enum to add. + * @param value The bytes of the required to add. * @return This builder for chaining. */ - public Builder addEnumBytes(com.google.protobuf.ByteString value) { + public Builder addRequiredBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); - ensureEnumIsMutable(); - enum_.add(value); - bitField0_ |= 0x00000020; + ensureRequiredIsMutable(); + required_.add(value); + bitField0_ |= 0x00000800; onChanged(); return this; } - private static final class PropertiesConverter - implements com.google.protobuf.MapFieldBuilder.Converter< - java.lang.String, - com.google.cloud.aiplatform.v1.SchemaOrBuilder, - com.google.cloud.aiplatform.v1.Schema> { - @java.lang.Override - public com.google.cloud.aiplatform.v1.Schema build( - com.google.cloud.aiplatform.v1.SchemaOrBuilder val) { - if (val instanceof com.google.cloud.aiplatform.v1.Schema) { - return (com.google.cloud.aiplatform.v1.Schema) val; - } - return ((com.google.cloud.aiplatform.v1.Schema.Builder) val).build(); - } - - @java.lang.Override - public com.google.protobuf.MapEntry - defaultEntry() { - return PropertiesDefaultEntryHolder.defaultEntry; - } - }; - - private static final PropertiesConverter propertiesConverter = new PropertiesConverter(); + private long minProperties_; + /** + * + * + *
+     * Optional. Minimum number of the properties for Type.OBJECT.
+     * 
+ * + * int64 min_properties = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The minProperties. + */ + @java.lang.Override + public long getMinProperties() { + return minProperties_; + } + /** + * + * + *
+     * Optional. Minimum number of the properties for Type.OBJECT.
+     * 
+ * + * int64 min_properties = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The minProperties to set. + * @return This builder for chaining. + */ + public Builder setMinProperties(long value) { - private com.google.protobuf.MapFieldBuilder< - java.lang.String, - com.google.cloud.aiplatform.v1.SchemaOrBuilder, - com.google.cloud.aiplatform.v1.Schema, - com.google.cloud.aiplatform.v1.Schema.Builder> - properties_; + minProperties_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Minimum number of the properties for Type.OBJECT.
+     * 
+ * + * int64 min_properties = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearMinProperties() { + bitField0_ = (bitField0_ & ~0x00001000); + minProperties_ = 0L; + onChanged(); + return this; + } - private com.google.protobuf.MapFieldBuilder< - java.lang.String, - com.google.cloud.aiplatform.v1.SchemaOrBuilder, - com.google.cloud.aiplatform.v1.Schema, - com.google.cloud.aiplatform.v1.Schema.Builder> - internalGetProperties() { - if (properties_ == null) { - return new com.google.protobuf.MapFieldBuilder<>(propertiesConverter); - } - return properties_; + private long maxProperties_; + /** + * + * + *
+     * Optional. Maximum number of the properties for Type.OBJECT.
+     * 
+ * + * int64 max_properties = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The maxProperties. + */ + @java.lang.Override + public long getMaxProperties() { + return maxProperties_; } + /** + * + * + *
+     * Optional. Maximum number of the properties for Type.OBJECT.
+     * 
+ * + * int64 max_properties = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The maxProperties to set. + * @return This builder for chaining. + */ + public Builder setMaxProperties(long value) { - private com.google.protobuf.MapFieldBuilder< - java.lang.String, - com.google.cloud.aiplatform.v1.SchemaOrBuilder, - com.google.cloud.aiplatform.v1.Schema, - com.google.cloud.aiplatform.v1.Schema.Builder> - internalGetMutableProperties() { - if (properties_ == null) { - properties_ = new com.google.protobuf.MapFieldBuilder<>(propertiesConverter); - } - bitField0_ |= 0x00000040; + maxProperties_ = value; + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Maximum number of the properties for Type.OBJECT.
+     * 
+ * + * int64 max_properties = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearMaxProperties() { + bitField0_ = (bitField0_ & ~0x00002000); + maxProperties_ = 0L; onChanged(); - return properties_; + return this; } - public int getPropertiesCount() { - return internalGetProperties().ensureBuilderMap().size(); - } + private double minimum_; /** * * *
-     * Optional. Properties of Type.OBJECT.
+     * Optional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER
+     * Minimum value of the Type.INTEGER and Type.NUMBER
      * 
* - * - * map<string, .google.cloud.aiplatform.v1.Schema> properties = 3 [(.google.api.field_behavior) = OPTIONAL]; - * + * double minimum = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The minimum. */ @java.lang.Override - public boolean containsProperties(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetProperties().ensureBuilderMap().containsKey(key); - } - /** Use {@link #getPropertiesMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getProperties() { - return getPropertiesMap(); + public double getMinimum() { + return minimum_; } /** * * *
-     * Optional. Properties of Type.OBJECT.
+     * Optional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER
+     * Minimum value of the Type.INTEGER and Type.NUMBER
      * 
* - * - * map<string, .google.cloud.aiplatform.v1.Schema> properties = 3 [(.google.api.field_behavior) = OPTIONAL]; - * + * double minimum = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The minimum to set. + * @return This builder for chaining. */ - @java.lang.Override - public java.util.Map - getPropertiesMap() { - return internalGetProperties().getImmutableMap(); + public Builder setMinimum(double value) { + + minimum_ = value; + bitField0_ |= 0x00004000; + onChanged(); + return this; } /** * * *
-     * Optional. Properties of Type.OBJECT.
+     * Optional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER
+     * Minimum value of the Type.INTEGER and Type.NUMBER
      * 
* - * - * map<string, .google.cloud.aiplatform.v1.Schema> properties = 3 [(.google.api.field_behavior) = OPTIONAL]; - * + * double minimum = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. */ - @java.lang.Override - public /* nullable */ com.google.cloud.aiplatform.v1.Schema getPropertiesOrDefault( - java.lang.String key, - /* nullable */ - com.google.cloud.aiplatform.v1.Schema defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = - internalGetMutableProperties().ensureBuilderMap(); - return map.containsKey(key) ? propertiesConverter.build(map.get(key)) : defaultValue; + public Builder clearMinimum() { + bitField0_ = (bitField0_ & ~0x00004000); + minimum_ = 0D; + onChanged(); + return this; } + + private double maximum_; /** * * *
-     * Optional. Properties of Type.OBJECT.
+     * Optional. Maximum value of the Type.INTEGER and Type.NUMBER
      * 
* - * - * map<string, .google.cloud.aiplatform.v1.Schema> properties = 3 [(.google.api.field_behavior) = OPTIONAL]; - * + * double maximum = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The maximum. */ @java.lang.Override - public com.google.cloud.aiplatform.v1.Schema getPropertiesOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = - internalGetMutableProperties().ensureBuilderMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return propertiesConverter.build(map.get(key)); - } - - public Builder clearProperties() { - bitField0_ = (bitField0_ & ~0x00000040); - internalGetMutableProperties().clear(); - return this; + public double getMaximum() { + return maximum_; } /** * * *
-     * Optional. Properties of Type.OBJECT.
+     * Optional. Maximum value of the Type.INTEGER and Type.NUMBER
      * 
* - * - * map<string, .google.cloud.aiplatform.v1.Schema> properties = 3 [(.google.api.field_behavior) = OPTIONAL]; - * + * double maximum = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The maximum to set. + * @return This builder for chaining. */ - public Builder removeProperties(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - internalGetMutableProperties().ensureBuilderMap().remove(key); + public Builder setMaximum(double value) { + + maximum_ = value; + bitField0_ |= 0x00008000; + onChanged(); return this; } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map - getMutableProperties() { - bitField0_ |= 0x00000040; - return internalGetMutableProperties().ensureMessageMap(); - } /** * * *
-     * Optional. Properties of Type.OBJECT.
+     * Optional. Maximum value of the Type.INTEGER and Type.NUMBER
      * 
* - * - * map<string, .google.cloud.aiplatform.v1.Schema> properties = 3 [(.google.api.field_behavior) = OPTIONAL]; - * + * double maximum = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. */ - public Builder putProperties( - java.lang.String key, com.google.cloud.aiplatform.v1.Schema value) { - if (key == null) { - throw new NullPointerException("map key"); - } - if (value == null) { - throw new NullPointerException("map value"); - } - internalGetMutableProperties().ensureBuilderMap().put(key, value); - bitField0_ |= 0x00000040; + public Builder clearMaximum() { + bitField0_ = (bitField0_ & ~0x00008000); + maximum_ = 0D; + onChanged(); return this; } + + private long minLength_; /** * * *
-     * Optional. Properties of Type.OBJECT.
+     * Optional. SCHEMA FIELDS FOR TYPE STRING
+     * Minimum length of the Type.STRING
      * 
* - * - * map<string, .google.cloud.aiplatform.v1.Schema> properties = 3 [(.google.api.field_behavior) = OPTIONAL]; - * + * int64 min_length = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The minLength. */ - public Builder putAllProperties( - java.util.Map values) { - for (java.util.Map.Entry e : - values.entrySet()) { - if (e.getKey() == null || e.getValue() == null) { - throw new NullPointerException(); - } - } - internalGetMutableProperties().ensureBuilderMap().putAll(values); - bitField0_ |= 0x00000040; - return this; + @java.lang.Override + public long getMinLength() { + return minLength_; } /** * * *
-     * Optional. Properties of Type.OBJECT.
+     * Optional. SCHEMA FIELDS FOR TYPE STRING
+     * Minimum length of the Type.STRING
      * 
* - * - * map<string, .google.cloud.aiplatform.v1.Schema> properties = 3 [(.google.api.field_behavior) = OPTIONAL]; - * + * int64 min_length = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The minLength to set. + * @return This builder for chaining. */ - public com.google.cloud.aiplatform.v1.Schema.Builder putPropertiesBuilderIfAbsent( - java.lang.String key) { - java.util.Map builderMap = - internalGetMutableProperties().ensureBuilderMap(); - com.google.cloud.aiplatform.v1.SchemaOrBuilder entry = builderMap.get(key); - if (entry == null) { - entry = com.google.cloud.aiplatform.v1.Schema.newBuilder(); - builderMap.put(key, entry); - } - if (entry instanceof com.google.cloud.aiplatform.v1.Schema) { - entry = ((com.google.cloud.aiplatform.v1.Schema) entry).toBuilder(); - builderMap.put(key, entry); - } - return (com.google.cloud.aiplatform.v1.Schema.Builder) entry; - } - - private com.google.protobuf.LazyStringArrayList required_ = - com.google.protobuf.LazyStringArrayList.emptyList(); + public Builder setMinLength(long value) { - private void ensureRequiredIsMutable() { - if (!required_.isModifiable()) { - required_ = new com.google.protobuf.LazyStringArrayList(required_); - } - bitField0_ |= 0x00000080; + minLength_ = value; + bitField0_ |= 0x00010000; + onChanged(); + return this; } /** * * *
-     * Optional. Required properties of Type.OBJECT.
+     * Optional. SCHEMA FIELDS FOR TYPE STRING
+     * Minimum length of the Type.STRING
      * 
* - * repeated string required = 5 [(.google.api.field_behavior) = OPTIONAL]; + * int64 min_length = 18 [(.google.api.field_behavior) = OPTIONAL]; * - * @return A list containing the required. + * @return This builder for chaining. */ - public com.google.protobuf.ProtocolStringList getRequiredList() { - required_.makeImmutable(); - return required_; + public Builder clearMinLength() { + bitField0_ = (bitField0_ & ~0x00010000); + minLength_ = 0L; + onChanged(); + return this; } + + private long maxLength_; /** * * *
-     * Optional. Required properties of Type.OBJECT.
+     * Optional. Maximum length of the Type.STRING
      * 
* - * repeated string required = 5 [(.google.api.field_behavior) = OPTIONAL]; + * int64 max_length = 19 [(.google.api.field_behavior) = OPTIONAL]; * - * @return The count of required. + * @return The maxLength. */ - public int getRequiredCount() { - return required_.size(); + @java.lang.Override + public long getMaxLength() { + return maxLength_; } /** * * *
-     * Optional. Required properties of Type.OBJECT.
+     * Optional. Maximum length of the Type.STRING
      * 
* - * repeated string required = 5 [(.google.api.field_behavior) = OPTIONAL]; + * int64 max_length = 19 [(.google.api.field_behavior) = OPTIONAL]; * - * @param index The index of the element to return. - * @return The required at the given index. + * @param value The maxLength to set. + * @return This builder for chaining. */ - public java.lang.String getRequired(int index) { - return required_.get(index); + public Builder setMaxLength(long value) { + + maxLength_ = value; + bitField0_ |= 0x00020000; + onChanged(); + return this; } /** * * *
-     * Optional. Required properties of Type.OBJECT.
+     * Optional. Maximum length of the Type.STRING
      * 
* - * repeated string required = 5 [(.google.api.field_behavior) = OPTIONAL]; + * int64 max_length = 19 [(.google.api.field_behavior) = OPTIONAL]; * - * @param index The index of the value to return. - * @return The bytes of the required at the given index. + * @return This builder for chaining. */ - public com.google.protobuf.ByteString getRequiredBytes(int index) { - return required_.getByteString(index); + public Builder clearMaxLength() { + bitField0_ = (bitField0_ & ~0x00020000); + maxLength_ = 0L; + onChanged(); + return this; } + + private java.lang.Object pattern_ = ""; /** * * *
-     * Optional. Required properties of Type.OBJECT.
+     * Optional. Pattern of the Type.STRING to restrict a string to a regular
+     * expression.
      * 
* - * repeated string required = 5 [(.google.api.field_behavior) = OPTIONAL]; + * string pattern = 20 [(.google.api.field_behavior) = OPTIONAL]; * - * @param index The index to set the value at. - * @param value The required to set. - * @return This builder for chaining. + * @return The pattern. */ - public Builder setRequired(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + public java.lang.String getPattern() { + java.lang.Object ref = pattern_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pattern_ = s; + return s; + } else { + return (java.lang.String) ref; } - ensureRequiredIsMutable(); - required_.set(index, value); - bitField0_ |= 0x00000080; - onChanged(); - return this; } /** * * *
-     * Optional. Required properties of Type.OBJECT.
+     * Optional. Pattern of the Type.STRING to restrict a string to a regular
+     * expression.
      * 
* - * repeated string required = 5 [(.google.api.field_behavior) = OPTIONAL]; + * string pattern = 20 [(.google.api.field_behavior) = OPTIONAL]; * - * @param value The required to add. - * @return This builder for chaining. + * @return The bytes for pattern. */ - public Builder addRequired(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + public com.google.protobuf.ByteString getPatternBytes() { + java.lang.Object ref = pattern_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pattern_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } - ensureRequiredIsMutable(); - required_.add(value); - bitField0_ |= 0x00000080; - onChanged(); - return this; } /** * * *
-     * Optional. Required properties of Type.OBJECT.
+     * Optional. Pattern of the Type.STRING to restrict a string to a regular
+     * expression.
      * 
* - * repeated string required = 5 [(.google.api.field_behavior) = OPTIONAL]; + * string pattern = 20 [(.google.api.field_behavior) = OPTIONAL]; * - * @param values The required to add. + * @param value The pattern to set. * @return This builder for chaining. */ - public Builder addAllRequired(java.lang.Iterable values) { - ensureRequiredIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, required_); - bitField0_ |= 0x00000080; + public Builder setPattern(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pattern_ = value; + bitField0_ |= 0x00040000; onChanged(); return this; } @@ -2362,17 +3784,17 @@ public Builder addAllRequired(java.lang.Iterable values) { * * *
-     * Optional. Required properties of Type.OBJECT.
+     * Optional. Pattern of the Type.STRING to restrict a string to a regular
+     * expression.
      * 
* - * repeated string required = 5 [(.google.api.field_behavior) = OPTIONAL]; + * string pattern = 20 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ - public Builder clearRequired() { - required_ = com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000080); - ; + public Builder clearPattern() { + pattern_ = getDefaultInstance().getPattern(); + bitField0_ = (bitField0_ & ~0x00040000); onChanged(); return this; } @@ -2380,22 +3802,22 @@ public Builder clearRequired() { * * *
-     * Optional. Required properties of Type.OBJECT.
+     * Optional. Pattern of the Type.STRING to restrict a string to a regular
+     * expression.
      * 
* - * repeated string required = 5 [(.google.api.field_behavior) = OPTIONAL]; + * string pattern = 20 [(.google.api.field_behavior) = OPTIONAL]; * - * @param value The bytes of the required to add. + * @param value The bytes for pattern to set. * @return This builder for chaining. */ - public Builder addRequiredBytes(com.google.protobuf.ByteString value) { + public Builder setPatternBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); - ensureRequiredIsMutable(); - required_.add(value); - bitField0_ |= 0x00000080; + pattern_ = value; + bitField0_ |= 0x00040000; onChanged(); return this; } @@ -2419,7 +3841,7 @@ public Builder addRequiredBytes(com.google.protobuf.ByteString value) { * @return Whether the example field is set. */ public boolean hasExample() { - return ((bitField0_ & 0x00000100) != 0); + return ((bitField0_ & 0x00080000) != 0); } /** * @@ -2459,7 +3881,7 @@ public Builder setExample(com.google.protobuf.Value value) { } else { exampleBuilder_.setMessage(value); } - bitField0_ |= 0x00000100; + bitField0_ |= 0x00080000; onChanged(); return this; } @@ -2479,7 +3901,7 @@ public Builder setExample(com.google.protobuf.Value.Builder builderForValue) { } else { exampleBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000100; + bitField0_ |= 0x00080000; onChanged(); return this; } @@ -2495,7 +3917,7 @@ public Builder setExample(com.google.protobuf.Value.Builder builderForValue) { */ public Builder mergeExample(com.google.protobuf.Value value) { if (exampleBuilder_ == null) { - if (((bitField0_ & 0x00000100) != 0) + if (((bitField0_ & 0x00080000) != 0) && example_ != null && example_ != com.google.protobuf.Value.getDefaultInstance()) { getExampleBuilder().mergeFrom(value); @@ -2506,7 +3928,7 @@ public Builder mergeExample(com.google.protobuf.Value value) { exampleBuilder_.mergeFrom(value); } if (example_ != null) { - bitField0_ |= 0x00000100; + bitField0_ |= 0x00080000; onChanged(); } return this; @@ -2522,7 +3944,7 @@ public Builder mergeExample(com.google.protobuf.Value value) { * .google.protobuf.Value example = 4 [(.google.api.field_behavior) = OPTIONAL]; */ public Builder clearExample() { - bitField0_ = (bitField0_ & ~0x00000100); + bitField0_ = (bitField0_ & ~0x00080000); example_ = null; if (exampleBuilder_ != null) { exampleBuilder_.dispose(); @@ -2542,7 +3964,7 @@ public Builder clearExample() { * .google.protobuf.Value example = 4 [(.google.api.field_behavior) = OPTIONAL]; */ public com.google.protobuf.Value.Builder getExampleBuilder() { - bitField0_ |= 0x00000100; + bitField0_ |= 0x00080000; onChanged(); return getExampleFieldBuilder().getBuilder(); } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SchemaOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SchemaOrBuilder.java index b86439554ca3..752fb7ab414f 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SchemaOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SchemaOrBuilder.java @@ -57,8 +57,9 @@ public interface SchemaOrBuilder *
    * Optional. The format of the data.
    * Supported formats:
-   *  for NUMBER type: float, double
-   *  for INTEGER type: int32, int64
+   *  for NUMBER type: "float", "double"
+   *  for INTEGER type: "int32", "int64"
+   *  for STRING type: "email", "byte", etc
    * 
* * string format = 7 [(.google.api.field_behavior) = OPTIONAL]; @@ -72,8 +73,9 @@ public interface SchemaOrBuilder *
    * Optional. The format of the data.
    * Supported formats:
-   *  for NUMBER type: float, double
-   *  for INTEGER type: int32, int64
+   *  for NUMBER type: "float", "double"
+   *  for INTEGER type: "int32", "int64"
+   *  for STRING type: "email", "byte", etc
    * 
* * string format = 7 [(.google.api.field_behavior) = OPTIONAL]; @@ -82,6 +84,31 @@ public interface SchemaOrBuilder */ com.google.protobuf.ByteString getFormatBytes(); + /** + * + * + *
+   * Optional. The title of the Schema.
+   * 
+ * + * string title = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The title. + */ + java.lang.String getTitle(); + /** + * + * + *
+   * Optional. The title of the Schema.
+   * 
+ * + * string title = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for title. + */ + com.google.protobuf.ByteString getTitleBytes(); + /** * * @@ -124,7 +151,43 @@ public interface SchemaOrBuilder * * *
-   * Optional. Schema of the elements of Type.ARRAY.
+   * Optional. Default value of the data.
+   * 
+ * + * .google.protobuf.Value default = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the default field is set. + */ + boolean hasDefault(); + /** + * + * + *
+   * Optional. Default value of the data.
+   * 
+ * + * .google.protobuf.Value default = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The default. + */ + com.google.protobuf.Value getDefault(); + /** + * + * + *
+   * Optional. Default value of the data.
+   * 
+ * + * .google.protobuf.Value default = 23 [(.google.api.field_behavior) = OPTIONAL]; + */ + com.google.protobuf.ValueOrBuilder getDefaultOrBuilder(); + + /** + * + * + *
+   * Optional. SCHEMA FIELDS FOR TYPE ARRAY
+   * Schema of the elements of Type.ARRAY.
    * 
* * .google.cloud.aiplatform.v1.Schema items = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -137,7 +200,8 @@ public interface SchemaOrBuilder * * *
-   * Optional. Schema of the elements of Type.ARRAY.
+   * Optional. SCHEMA FIELDS FOR TYPE ARRAY
+   * Schema of the elements of Type.ARRAY.
    * 
* * .google.cloud.aiplatform.v1.Schema items = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -150,7 +214,8 @@ public interface SchemaOrBuilder * * *
-   * Optional. Schema of the elements of Type.ARRAY.
+   * Optional. SCHEMA FIELDS FOR TYPE ARRAY
+   * Schema of the elements of Type.ARRAY.
    * 
* * .google.cloud.aiplatform.v1.Schema items = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -158,6 +223,32 @@ public interface SchemaOrBuilder */ com.google.cloud.aiplatform.v1.SchemaOrBuilder getItemsOrBuilder(); + /** + * + * + *
+   * Optional. Minimum number of the elements for Type.ARRAY.
+   * 
+ * + * int64 min_items = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The minItems. + */ + long getMinItems(); + + /** + * + * + *
+   * Optional. Maximum number of the elements for Type.ARRAY.
+   * 
+ * + * int64 max_items = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The maxItems. + */ + long getMaxItems(); + /** * * @@ -221,7 +312,8 @@ public interface SchemaOrBuilder * * *
-   * Optional. Properties of Type.OBJECT.
+   * Optional. SCHEMA FIELDS FOR TYPE OBJECT
+   * Properties of Type.OBJECT.
    * 
* * @@ -233,7 +325,8 @@ public interface SchemaOrBuilder * * *
-   * Optional. Properties of Type.OBJECT.
+   * Optional. SCHEMA FIELDS FOR TYPE OBJECT
+   * Properties of Type.OBJECT.
    * 
* * @@ -248,7 +341,8 @@ public interface SchemaOrBuilder * * *
-   * Optional. Properties of Type.OBJECT.
+   * Optional. SCHEMA FIELDS FOR TYPE OBJECT
+   * Properties of Type.OBJECT.
    * 
* * @@ -260,7 +354,8 @@ public interface SchemaOrBuilder * * *
-   * Optional. Properties of Type.OBJECT.
+   * Optional. SCHEMA FIELDS FOR TYPE OBJECT
+   * Properties of Type.OBJECT.
    * 
* * @@ -276,7 +371,8 @@ com.google.cloud.aiplatform.v1.Schema getPropertiesOrDefault( * * *
-   * Optional. Properties of Type.OBJECT.
+   * Optional. SCHEMA FIELDS FOR TYPE OBJECT
+   * Properties of Type.OBJECT.
    * 
* * @@ -336,6 +432,113 @@ com.google.cloud.aiplatform.v1.Schema getPropertiesOrDefault( */ com.google.protobuf.ByteString getRequiredBytes(int index); + /** + * + * + *
+   * Optional. Minimum number of the properties for Type.OBJECT.
+   * 
+ * + * int64 min_properties = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The minProperties. + */ + long getMinProperties(); + + /** + * + * + *
+   * Optional. Maximum number of the properties for Type.OBJECT.
+   * 
+ * + * int64 max_properties = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The maxProperties. + */ + long getMaxProperties(); + + /** + * + * + *
+   * Optional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER
+   * Minimum value of the Type.INTEGER and Type.NUMBER
+   * 
+ * + * double minimum = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The minimum. + */ + double getMinimum(); + + /** + * + * + *
+   * Optional. Maximum value of the Type.INTEGER and Type.NUMBER
+   * 
+ * + * double maximum = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The maximum. + */ + double getMaximum(); + + /** + * + * + *
+   * Optional. SCHEMA FIELDS FOR TYPE STRING
+   * Minimum length of the Type.STRING
+   * 
+ * + * int64 min_length = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The minLength. + */ + long getMinLength(); + + /** + * + * + *
+   * Optional. Maximum length of the Type.STRING
+   * 
+ * + * int64 max_length = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The maxLength. + */ + long getMaxLength(); + + /** + * + * + *
+   * Optional. Pattern of the Type.STRING to restrict a string to a regular
+   * expression.
+   * 
+ * + * string pattern = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pattern. + */ + java.lang.String getPattern(); + /** + * + * + *
+   * Optional. Pattern of the Type.STRING to restrict a string to a regular
+   * expression.
+   * 
+ * + * string pattern = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pattern. + */ + com.google.protobuf.ByteString getPatternBytes(); + /** * * diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ServiceAccountSpec.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ServiceAccountSpec.java new file mode 100644 index 000000000000..ff38d26ddd3e --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ServiceAccountSpec.java @@ -0,0 +1,803 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/persistent_resource.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Configuration for the use of custom service account to run the workloads.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ServiceAccountSpec} + */ +public final class ServiceAccountSpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ServiceAccountSpec) + ServiceAccountSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use ServiceAccountSpec.newBuilder() to construct. + private ServiceAccountSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ServiceAccountSpec() { + serviceAccount_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ServiceAccountSpec(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.PersistentResourceProto + .internal_static_google_cloud_aiplatform_v1_ServiceAccountSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.PersistentResourceProto + .internal_static_google_cloud_aiplatform_v1_ServiceAccountSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ServiceAccountSpec.class, + com.google.cloud.aiplatform.v1.ServiceAccountSpec.Builder.class); + } + + public static final int ENABLE_CUSTOM_SERVICE_ACCOUNT_FIELD_NUMBER = 1; + private boolean enableCustomServiceAccount_ = false; + /** + * + * + *
+   * Required. If true, custom user-managed service account is enforced to run
+   * any workloads (for example, Vertex Jobs) on the resource. Otherwise, uses
+   * the [Vertex AI Custom Code Service
+   * Agent](https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents).
+   * 
+ * + * bool enable_custom_service_account = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The enableCustomServiceAccount. + */ + @java.lang.Override + public boolean getEnableCustomServiceAccount() { + return enableCustomServiceAccount_; + } + + public static final int SERVICE_ACCOUNT_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object serviceAccount_ = ""; + /** + * + * + *
+   * Optional. Required when all below conditions are met
+   *  * `enable_custom_service_account` is true;
+   *  * any runtime is specified via `ResourceRuntimeSpec` on creation time,
+   *    for example, Ray
+   *
+   * The users must have `iam.serviceAccounts.actAs` permission on this service
+   * account and then the specified runtime containers will run as it.
+   *
+   * Do not set this field if you want to submit jobs using custom service
+   * account to this PersistentResource after creation, but only specify the
+   * `service_account` inside the job.
+   * 
+ * + * string service_account = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The serviceAccount. + */ + @java.lang.Override + public java.lang.String getServiceAccount() { + java.lang.Object ref = serviceAccount_; + 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(); + serviceAccount_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Required when all below conditions are met
+   *  * `enable_custom_service_account` is true;
+   *  * any runtime is specified via `ResourceRuntimeSpec` on creation time,
+   *    for example, Ray
+   *
+   * The users must have `iam.serviceAccounts.actAs` permission on this service
+   * account and then the specified runtime containers will run as it.
+   *
+   * Do not set this field if you want to submit jobs using custom service
+   * account to this PersistentResource after creation, but only specify the
+   * `service_account` inside the job.
+   * 
+ * + * string service_account = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for serviceAccount. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServiceAccountBytes() { + java.lang.Object ref = serviceAccount_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceAccount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (enableCustomServiceAccount_ != false) { + output.writeBool(1, enableCustomServiceAccount_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccount_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, serviceAccount_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (enableCustomServiceAccount_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, enableCustomServiceAccount_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccount_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, serviceAccount_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.ServiceAccountSpec)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ServiceAccountSpec other = + (com.google.cloud.aiplatform.v1.ServiceAccountSpec) obj; + + if (getEnableCustomServiceAccount() != other.getEnableCustomServiceAccount()) return false; + if (!getServiceAccount().equals(other.getServiceAccount())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENABLE_CUSTOM_SERVICE_ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableCustomServiceAccount()); + hash = (37 * hash) + SERVICE_ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getServiceAccount().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.ServiceAccountSpec parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ServiceAccountSpec parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ServiceAccountSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ServiceAccountSpec parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ServiceAccountSpec parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ServiceAccountSpec parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ServiceAccountSpec parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ServiceAccountSpec parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ServiceAccountSpec parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ServiceAccountSpec parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ServiceAccountSpec parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ServiceAccountSpec parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.aiplatform.v1.ServiceAccountSpec prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Configuration for the use of custom service account to run the workloads.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ServiceAccountSpec} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ServiceAccountSpec) + com.google.cloud.aiplatform.v1.ServiceAccountSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.PersistentResourceProto + .internal_static_google_cloud_aiplatform_v1_ServiceAccountSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.PersistentResourceProto + .internal_static_google_cloud_aiplatform_v1_ServiceAccountSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ServiceAccountSpec.class, + com.google.cloud.aiplatform.v1.ServiceAccountSpec.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.ServiceAccountSpec.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + enableCustomServiceAccount_ = false; + serviceAccount_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.PersistentResourceProto + .internal_static_google_cloud_aiplatform_v1_ServiceAccountSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ServiceAccountSpec getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ServiceAccountSpec.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ServiceAccountSpec build() { + com.google.cloud.aiplatform.v1.ServiceAccountSpec result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ServiceAccountSpec buildPartial() { + com.google.cloud.aiplatform.v1.ServiceAccountSpec result = + new com.google.cloud.aiplatform.v1.ServiceAccountSpec(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.ServiceAccountSpec result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.enableCustomServiceAccount_ = enableCustomServiceAccount_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.serviceAccount_ = serviceAccount_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.ServiceAccountSpec) { + return mergeFrom((com.google.cloud.aiplatform.v1.ServiceAccountSpec) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.ServiceAccountSpec other) { + if (other == com.google.cloud.aiplatform.v1.ServiceAccountSpec.getDefaultInstance()) + return this; + if (other.getEnableCustomServiceAccount() != false) { + setEnableCustomServiceAccount(other.getEnableCustomServiceAccount()); + } + if (!other.getServiceAccount().isEmpty()) { + serviceAccount_ = other.serviceAccount_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + enableCustomServiceAccount_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + serviceAccount_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private boolean enableCustomServiceAccount_; + /** + * + * + *
+     * Required. If true, custom user-managed service account is enforced to run
+     * any workloads (for example, Vertex Jobs) on the resource. Otherwise, uses
+     * the [Vertex AI Custom Code Service
+     * Agent](https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents).
+     * 
+ * + * bool enable_custom_service_account = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enableCustomServiceAccount. + */ + @java.lang.Override + public boolean getEnableCustomServiceAccount() { + return enableCustomServiceAccount_; + } + /** + * + * + *
+     * Required. If true, custom user-managed service account is enforced to run
+     * any workloads (for example, Vertex Jobs) on the resource. Otherwise, uses
+     * the [Vertex AI Custom Code Service
+     * Agent](https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents).
+     * 
+ * + * bool enable_custom_service_account = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enableCustomServiceAccount to set. + * @return This builder for chaining. + */ + public Builder setEnableCustomServiceAccount(boolean value) { + + enableCustomServiceAccount_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. If true, custom user-managed service account is enforced to run
+     * any workloads (for example, Vertex Jobs) on the resource. Otherwise, uses
+     * the [Vertex AI Custom Code Service
+     * Agent](https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents).
+     * 
+ * + * bool enable_custom_service_account = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearEnableCustomServiceAccount() { + bitField0_ = (bitField0_ & ~0x00000001); + enableCustomServiceAccount_ = false; + onChanged(); + return this; + } + + private java.lang.Object serviceAccount_ = ""; + /** + * + * + *
+     * Optional. Required when all below conditions are met
+     *  * `enable_custom_service_account` is true;
+     *  * any runtime is specified via `ResourceRuntimeSpec` on creation time,
+     *    for example, Ray
+     *
+     * The users must have `iam.serviceAccounts.actAs` permission on this service
+     * account and then the specified runtime containers will run as it.
+     *
+     * Do not set this field if you want to submit jobs using custom service
+     * account to this PersistentResource after creation, but only specify the
+     * `service_account` inside the job.
+     * 
+ * + * string service_account = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The serviceAccount. + */ + public java.lang.String getServiceAccount() { + java.lang.Object ref = serviceAccount_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceAccount_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Required when all below conditions are met
+     *  * `enable_custom_service_account` is true;
+     *  * any runtime is specified via `ResourceRuntimeSpec` on creation time,
+     *    for example, Ray
+     *
+     * The users must have `iam.serviceAccounts.actAs` permission on this service
+     * account and then the specified runtime containers will run as it.
+     *
+     * Do not set this field if you want to submit jobs using custom service
+     * account to this PersistentResource after creation, but only specify the
+     * `service_account` inside the job.
+     * 
+ * + * string service_account = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for serviceAccount. + */ + public com.google.protobuf.ByteString getServiceAccountBytes() { + java.lang.Object ref = serviceAccount_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceAccount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Required when all below conditions are met
+     *  * `enable_custom_service_account` is true;
+     *  * any runtime is specified via `ResourceRuntimeSpec` on creation time,
+     *    for example, Ray
+     *
+     * The users must have `iam.serviceAccounts.actAs` permission on this service
+     * account and then the specified runtime containers will run as it.
+     *
+     * Do not set this field if you want to submit jobs using custom service
+     * account to this PersistentResource after creation, but only specify the
+     * `service_account` inside the job.
+     * 
+ * + * string service_account = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The serviceAccount to set. + * @return This builder for chaining. + */ + public Builder setServiceAccount(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + serviceAccount_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Required when all below conditions are met
+     *  * `enable_custom_service_account` is true;
+     *  * any runtime is specified via `ResourceRuntimeSpec` on creation time,
+     *    for example, Ray
+     *
+     * The users must have `iam.serviceAccounts.actAs` permission on this service
+     * account and then the specified runtime containers will run as it.
+     *
+     * Do not set this field if you want to submit jobs using custom service
+     * account to this PersistentResource after creation, but only specify the
+     * `service_account` inside the job.
+     * 
+ * + * string service_account = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearServiceAccount() { + serviceAccount_ = getDefaultInstance().getServiceAccount(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Required when all below conditions are met
+     *  * `enable_custom_service_account` is true;
+     *  * any runtime is specified via `ResourceRuntimeSpec` on creation time,
+     *    for example, Ray
+     *
+     * The users must have `iam.serviceAccounts.actAs` permission on this service
+     * account and then the specified runtime containers will run as it.
+     *
+     * Do not set this field if you want to submit jobs using custom service
+     * account to this PersistentResource after creation, but only specify the
+     * `service_account` inside the job.
+     * 
+ * + * string service_account = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for serviceAccount to set. + * @return This builder for chaining. + */ + public Builder setServiceAccountBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + serviceAccount_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.ServiceAccountSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ServiceAccountSpec) + private static final com.google.cloud.aiplatform.v1.ServiceAccountSpec DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ServiceAccountSpec(); + } + + public static com.google.cloud.aiplatform.v1.ServiceAccountSpec getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ServiceAccountSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ServiceAccountSpec getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ServiceAccountSpecOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ServiceAccountSpecOrBuilder.java new file mode 100644 index 000000000000..608e0c6fda67 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ServiceAccountSpecOrBuilder.java @@ -0,0 +1,87 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/persistent_resource.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +public interface ServiceAccountSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ServiceAccountSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. If true, custom user-managed service account is enforced to run
+   * any workloads (for example, Vertex Jobs) on the resource. Otherwise, uses
+   * the [Vertex AI Custom Code Service
+   * Agent](https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents).
+   * 
+ * + * bool enable_custom_service_account = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The enableCustomServiceAccount. + */ + boolean getEnableCustomServiceAccount(); + + /** + * + * + *
+   * Optional. Required when all below conditions are met
+   *  * `enable_custom_service_account` is true;
+   *  * any runtime is specified via `ResourceRuntimeSpec` on creation time,
+   *    for example, Ray
+   *
+   * The users must have `iam.serviceAccounts.actAs` permission on this service
+   * account and then the specified runtime containers will run as it.
+   *
+   * Do not set this field if you want to submit jobs using custom service
+   * account to this PersistentResource after creation, but only specify the
+   * `service_account` inside the job.
+   * 
+ * + * string service_account = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The serviceAccount. + */ + java.lang.String getServiceAccount(); + /** + * + * + *
+   * Optional. Required when all below conditions are met
+   *  * `enable_custom_service_account` is true;
+   *  * any runtime is specified via `ResourceRuntimeSpec` on creation time,
+   *    for example, Ray
+   *
+   * The users must have `iam.serviceAccounts.actAs` permission on this service
+   * account and then the specified runtime containers will run as it.
+   *
+   * Do not set this field if you want to submit jobs using custom service
+   * account to this PersistentResource after creation, but only specify the
+   * `service_account` inside the job.
+   * 
+ * + * string service_account = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for serviceAccount. + */ + com.google.protobuf.ByteString getServiceAccountBytes(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ShieldedVmConfig.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ShieldedVmConfig.java new file mode 100644 index 000000000000..712a568d0617 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ShieldedVmConfig.java @@ -0,0 +1,563 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/machine_resources.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * A set of Shielded Instance options.
+ * See [Images using supported Shielded VM
+ * features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm).
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ShieldedVmConfig} + */ +public final class ShieldedVmConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ShieldedVmConfig) + ShieldedVmConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use ShieldedVmConfig.newBuilder() to construct. + private ShieldedVmConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ShieldedVmConfig() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ShieldedVmConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.MachineResourcesProto + .internal_static_google_cloud_aiplatform_v1_ShieldedVmConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.MachineResourcesProto + .internal_static_google_cloud_aiplatform_v1_ShieldedVmConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ShieldedVmConfig.class, + com.google.cloud.aiplatform.v1.ShieldedVmConfig.Builder.class); + } + + public static final int ENABLE_SECURE_BOOT_FIELD_NUMBER = 1; + private boolean enableSecureBoot_ = false; + /** + * + * + *
+   * Defines whether the instance has [Secure
+   * Boot](https://cloud.google.com/compute/shielded-vm/docs/shielded-vm#secure-boot)
+   * enabled.
+   *
+   * Secure Boot helps ensure that the system only runs authentic software by
+   * verifying the digital signature of all boot components, and halting the
+   * boot process if signature verification fails.
+   * 
+ * + * bool enable_secure_boot = 1; + * + * @return The enableSecureBoot. + */ + @java.lang.Override + public boolean getEnableSecureBoot() { + return enableSecureBoot_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (enableSecureBoot_ != false) { + output.writeBool(1, enableSecureBoot_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (enableSecureBoot_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, enableSecureBoot_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.ShieldedVmConfig)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ShieldedVmConfig other = + (com.google.cloud.aiplatform.v1.ShieldedVmConfig) obj; + + if (getEnableSecureBoot() != other.getEnableSecureBoot()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENABLE_SECURE_BOOT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableSecureBoot()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.ShieldedVmConfig parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ShieldedVmConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ShieldedVmConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ShieldedVmConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ShieldedVmConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ShieldedVmConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ShieldedVmConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ShieldedVmConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ShieldedVmConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ShieldedVmConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ShieldedVmConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ShieldedVmConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.aiplatform.v1.ShieldedVmConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A set of Shielded Instance options.
+   * See [Images using supported Shielded VM
+   * features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm).
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ShieldedVmConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ShieldedVmConfig) + com.google.cloud.aiplatform.v1.ShieldedVmConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.MachineResourcesProto + .internal_static_google_cloud_aiplatform_v1_ShieldedVmConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.MachineResourcesProto + .internal_static_google_cloud_aiplatform_v1_ShieldedVmConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ShieldedVmConfig.class, + com.google.cloud.aiplatform.v1.ShieldedVmConfig.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.ShieldedVmConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + enableSecureBoot_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.MachineResourcesProto + .internal_static_google_cloud_aiplatform_v1_ShieldedVmConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ShieldedVmConfig getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ShieldedVmConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ShieldedVmConfig build() { + com.google.cloud.aiplatform.v1.ShieldedVmConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ShieldedVmConfig buildPartial() { + com.google.cloud.aiplatform.v1.ShieldedVmConfig result = + new com.google.cloud.aiplatform.v1.ShieldedVmConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.ShieldedVmConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.enableSecureBoot_ = enableSecureBoot_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.ShieldedVmConfig) { + return mergeFrom((com.google.cloud.aiplatform.v1.ShieldedVmConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.ShieldedVmConfig other) { + if (other == com.google.cloud.aiplatform.v1.ShieldedVmConfig.getDefaultInstance()) + return this; + if (other.getEnableSecureBoot() != false) { + setEnableSecureBoot(other.getEnableSecureBoot()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + enableSecureBoot_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private boolean enableSecureBoot_; + /** + * + * + *
+     * Defines whether the instance has [Secure
+     * Boot](https://cloud.google.com/compute/shielded-vm/docs/shielded-vm#secure-boot)
+     * enabled.
+     *
+     * Secure Boot helps ensure that the system only runs authentic software by
+     * verifying the digital signature of all boot components, and halting the
+     * boot process if signature verification fails.
+     * 
+ * + * bool enable_secure_boot = 1; + * + * @return The enableSecureBoot. + */ + @java.lang.Override + public boolean getEnableSecureBoot() { + return enableSecureBoot_; + } + /** + * + * + *
+     * Defines whether the instance has [Secure
+     * Boot](https://cloud.google.com/compute/shielded-vm/docs/shielded-vm#secure-boot)
+     * enabled.
+     *
+     * Secure Boot helps ensure that the system only runs authentic software by
+     * verifying the digital signature of all boot components, and halting the
+     * boot process if signature verification fails.
+     * 
+ * + * bool enable_secure_boot = 1; + * + * @param value The enableSecureBoot to set. + * @return This builder for chaining. + */ + public Builder setEnableSecureBoot(boolean value) { + + enableSecureBoot_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Defines whether the instance has [Secure
+     * Boot](https://cloud.google.com/compute/shielded-vm/docs/shielded-vm#secure-boot)
+     * enabled.
+     *
+     * Secure Boot helps ensure that the system only runs authentic software by
+     * verifying the digital signature of all boot components, and halting the
+     * boot process if signature verification fails.
+     * 
+ * + * bool enable_secure_boot = 1; + * + * @return This builder for chaining. + */ + public Builder clearEnableSecureBoot() { + bitField0_ = (bitField0_ & ~0x00000001); + enableSecureBoot_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.ShieldedVmConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ShieldedVmConfig) + private static final com.google.cloud.aiplatform.v1.ShieldedVmConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ShieldedVmConfig(); + } + + public static com.google.cloud.aiplatform.v1.ShieldedVmConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ShieldedVmConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ShieldedVmConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ShieldedVmConfigOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ShieldedVmConfigOrBuilder.java new file mode 100644 index 000000000000..30c5f39f45fa --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ShieldedVmConfigOrBuilder.java @@ -0,0 +1,45 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/machine_resources.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +public interface ShieldedVmConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ShieldedVmConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Defines whether the instance has [Secure
+   * Boot](https://cloud.google.com/compute/shielded-vm/docs/shielded-vm#secure-boot)
+   * enabled.
+   *
+   * Secure Boot helps ensure that the system only runs authentic software by
+   * verifying the digital signature of all boot components, and halting the
+   * boot process if signature verification fails.
+   * 
+ * + * bool enable_secure_boot = 1; + * + * @return The enableSecureBoot. + */ + boolean getEnableSecureBoot(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/StartNotebookRuntimeOperationMetadata.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/StartNotebookRuntimeOperationMetadata.java new file mode 100644 index 000000000000..f73359e560a3 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/StartNotebookRuntimeOperationMetadata.java @@ -0,0 +1,935 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/notebook_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Metadata information for
+ * [NotebookService.StartNotebookRuntime][google.cloud.aiplatform.v1.NotebookService.StartNotebookRuntime].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.StartNotebookRuntimeOperationMetadata} + */ +public final class StartNotebookRuntimeOperationMetadata + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.StartNotebookRuntimeOperationMetadata) + StartNotebookRuntimeOperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use StartNotebookRuntimeOperationMetadata.newBuilder() to construct. + private StartNotebookRuntimeOperationMetadata( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private StartNotebookRuntimeOperationMetadata() { + progressMessage_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new StartNotebookRuntimeOperationMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_StartNotebookRuntimeOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_StartNotebookRuntimeOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.StartNotebookRuntimeOperationMetadata.class, + com.google.cloud.aiplatform.v1.StartNotebookRuntimeOperationMetadata.Builder.class); + } + + private int bitField0_; + public static final int GENERIC_METADATA_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1.GenericOperationMetadata genericMetadata_; + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + @java.lang.Override + public boolean hasGenericMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata() { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder() { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + + public static final int PROGRESS_MESSAGE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object progressMessage_ = ""; + /** + * + * + *
+   * A human-readable message that shows the intermediate progress details of
+   * NotebookRuntime.
+   * 
+ * + * string progress_message = 2; + * + * @return The progressMessage. + */ + @java.lang.Override + public java.lang.String getProgressMessage() { + java.lang.Object ref = progressMessage_; + 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(); + progressMessage_ = s; + return s; + } + } + /** + * + * + *
+   * A human-readable message that shows the intermediate progress details of
+   * NotebookRuntime.
+   * 
+ * + * string progress_message = 2; + * + * @return The bytes for progressMessage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProgressMessageBytes() { + java.lang.Object ref = progressMessage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + progressMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getGenericMetadata()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(progressMessage_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, progressMessage_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getGenericMetadata()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(progressMessage_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, progressMessage_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.StartNotebookRuntimeOperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.StartNotebookRuntimeOperationMetadata other = + (com.google.cloud.aiplatform.v1.StartNotebookRuntimeOperationMetadata) obj; + + if (hasGenericMetadata() != other.hasGenericMetadata()) return false; + if (hasGenericMetadata()) { + if (!getGenericMetadata().equals(other.getGenericMetadata())) return false; + } + if (!getProgressMessage().equals(other.getProgressMessage())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasGenericMetadata()) { + hash = (37 * hash) + GENERIC_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getGenericMetadata().hashCode(); + } + hash = (37 * hash) + PROGRESS_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getProgressMessage().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.StartNotebookRuntimeOperationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.StartNotebookRuntimeOperationMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.StartNotebookRuntimeOperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.StartNotebookRuntimeOperationMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.StartNotebookRuntimeOperationMetadata parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.StartNotebookRuntimeOperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.StartNotebookRuntimeOperationMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.StartNotebookRuntimeOperationMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.StartNotebookRuntimeOperationMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.StartNotebookRuntimeOperationMetadata + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.StartNotebookRuntimeOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.StartNotebookRuntimeOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.StartNotebookRuntimeOperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Metadata information for
+   * [NotebookService.StartNotebookRuntime][google.cloud.aiplatform.v1.NotebookService.StartNotebookRuntime].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.StartNotebookRuntimeOperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.StartNotebookRuntimeOperationMetadata) + com.google.cloud.aiplatform.v1.StartNotebookRuntimeOperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_StartNotebookRuntimeOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_StartNotebookRuntimeOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.StartNotebookRuntimeOperationMetadata.class, + com.google.cloud.aiplatform.v1.StartNotebookRuntimeOperationMetadata.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.StartNotebookRuntimeOperationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getGenericMetadataFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + genericMetadata_ = null; + if (genericMetadataBuilder_ != null) { + genericMetadataBuilder_.dispose(); + genericMetadataBuilder_ = null; + } + progressMessage_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_StartNotebookRuntimeOperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.StartNotebookRuntimeOperationMetadata + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.StartNotebookRuntimeOperationMetadata + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.StartNotebookRuntimeOperationMetadata build() { + com.google.cloud.aiplatform.v1.StartNotebookRuntimeOperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.StartNotebookRuntimeOperationMetadata buildPartial() { + com.google.cloud.aiplatform.v1.StartNotebookRuntimeOperationMetadata result = + new com.google.cloud.aiplatform.v1.StartNotebookRuntimeOperationMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1.StartNotebookRuntimeOperationMetadata result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.genericMetadata_ = + genericMetadataBuilder_ == null ? genericMetadata_ : genericMetadataBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.progressMessage_ = progressMessage_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.StartNotebookRuntimeOperationMetadata) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.StartNotebookRuntimeOperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.StartNotebookRuntimeOperationMetadata other) { + if (other + == com.google.cloud.aiplatform.v1.StartNotebookRuntimeOperationMetadata + .getDefaultInstance()) return this; + if (other.hasGenericMetadata()) { + mergeGenericMetadata(other.getGenericMetadata()); + } + if (!other.getProgressMessage().isEmpty()) { + progressMessage_ = other.progressMessage_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getGenericMetadataFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + progressMessage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.aiplatform.v1.GenericOperationMetadata genericMetadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder> + genericMetadataBuilder_; + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + public boolean hasGenericMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata() { + if (genericMetadataBuilder_ == null) { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } else { + return genericMetadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder setGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata value) { + if (genericMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + genericMetadata_ = value; + } else { + genericMetadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder setGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder builderForValue) { + if (genericMetadataBuilder_ == null) { + genericMetadata_ = builderForValue.build(); + } else { + genericMetadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder mergeGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata value) { + if (genericMetadataBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && genericMetadata_ != null + && genericMetadata_ + != com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance()) { + getGenericMetadataBuilder().mergeFrom(value); + } else { + genericMetadata_ = value; + } + } else { + genericMetadataBuilder_.mergeFrom(value); + } + if (genericMetadata_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder clearGenericMetadata() { + bitField0_ = (bitField0_ & ~0x00000001); + genericMetadata_ = null; + if (genericMetadataBuilder_ != null) { + genericMetadataBuilder_.dispose(); + genericMetadataBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder + getGenericMetadataBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getGenericMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder() { + if (genericMetadataBuilder_ != null) { + return genericMetadataBuilder_.getMessageOrBuilder(); + } else { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder> + getGenericMetadataFieldBuilder() { + if (genericMetadataBuilder_ == null) { + genericMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder>( + getGenericMetadata(), getParentForChildren(), isClean()); + genericMetadata_ = null; + } + return genericMetadataBuilder_; + } + + private java.lang.Object progressMessage_ = ""; + /** + * + * + *
+     * A human-readable message that shows the intermediate progress details of
+     * NotebookRuntime.
+     * 
+ * + * string progress_message = 2; + * + * @return The progressMessage. + */ + public java.lang.String getProgressMessage() { + java.lang.Object ref = progressMessage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + progressMessage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A human-readable message that shows the intermediate progress details of
+     * NotebookRuntime.
+     * 
+ * + * string progress_message = 2; + * + * @return The bytes for progressMessage. + */ + public com.google.protobuf.ByteString getProgressMessageBytes() { + java.lang.Object ref = progressMessage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + progressMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A human-readable message that shows the intermediate progress details of
+     * NotebookRuntime.
+     * 
+ * + * string progress_message = 2; + * + * @param value The progressMessage to set. + * @return This builder for chaining. + */ + public Builder setProgressMessage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + progressMessage_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * A human-readable message that shows the intermediate progress details of
+     * NotebookRuntime.
+     * 
+ * + * string progress_message = 2; + * + * @return This builder for chaining. + */ + public Builder clearProgressMessage() { + progressMessage_ = getDefaultInstance().getProgressMessage(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A human-readable message that shows the intermediate progress details of
+     * NotebookRuntime.
+     * 
+ * + * string progress_message = 2; + * + * @param value The bytes for progressMessage to set. + * @return This builder for chaining. + */ + public Builder setProgressMessageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + progressMessage_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.StartNotebookRuntimeOperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.StartNotebookRuntimeOperationMetadata) + private static final com.google.cloud.aiplatform.v1.StartNotebookRuntimeOperationMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.StartNotebookRuntimeOperationMetadata(); + } + + public static com.google.cloud.aiplatform.v1.StartNotebookRuntimeOperationMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StartNotebookRuntimeOperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.StartNotebookRuntimeOperationMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/StartNotebookRuntimeOperationMetadataOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/StartNotebookRuntimeOperationMetadataOrBuilder.java new file mode 100644 index 000000000000..b3b2ddab5383 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/StartNotebookRuntimeOperationMetadataOrBuilder.java @@ -0,0 +1,88 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/notebook_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +public interface StartNotebookRuntimeOperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.StartNotebookRuntimeOperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + boolean hasGenericMetadata(); + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata(); + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder getGenericMetadataOrBuilder(); + + /** + * + * + *
+   * A human-readable message that shows the intermediate progress details of
+   * NotebookRuntime.
+   * 
+ * + * string progress_message = 2; + * + * @return The progressMessage. + */ + java.lang.String getProgressMessage(); + /** + * + * + *
+   * A human-readable message that shows the intermediate progress details of
+   * NotebookRuntime.
+   * 
+ * + * string progress_message = 2; + * + * @return The bytes for progressMessage. + */ + com.google.protobuf.ByteString getProgressMessageBytes(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/StartNotebookRuntimeRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/StartNotebookRuntimeRequest.java new file mode 100644 index 000000000000..0e8215085e29 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/StartNotebookRuntimeRequest.java @@ -0,0 +1,663 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/notebook_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for
+ * [NotebookService.StartNotebookRuntime][google.cloud.aiplatform.v1.NotebookService.StartNotebookRuntime].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.StartNotebookRuntimeRequest} + */ +public final class StartNotebookRuntimeRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.StartNotebookRuntimeRequest) + StartNotebookRuntimeRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use StartNotebookRuntimeRequest.newBuilder() to construct. + private StartNotebookRuntimeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private StartNotebookRuntimeRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new StartNotebookRuntimeRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_StartNotebookRuntimeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_StartNotebookRuntimeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.StartNotebookRuntimeRequest.class, + com.google.cloud.aiplatform.v1.StartNotebookRuntimeRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the NotebookRuntime resource to be started.
+   * Instead of checking whether the name is in valid NotebookRuntime resource
+   * name format, directly throw NotFound exception if there is no such
+   * NotebookRuntime in spanner.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the NotebookRuntime resource to be started.
+   * Instead of checking whether the name is in valid NotebookRuntime resource
+   * name format, directly throw NotFound exception if there is no such
+   * NotebookRuntime in spanner.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.StartNotebookRuntimeRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.StartNotebookRuntimeRequest other = + (com.google.cloud.aiplatform.v1.StartNotebookRuntimeRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.StartNotebookRuntimeRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.StartNotebookRuntimeRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.StartNotebookRuntimeRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.StartNotebookRuntimeRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.StartNotebookRuntimeRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.StartNotebookRuntimeRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.StartNotebookRuntimeRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.StartNotebookRuntimeRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.StartNotebookRuntimeRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.StartNotebookRuntimeRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.StartNotebookRuntimeRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.StartNotebookRuntimeRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.StartNotebookRuntimeRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for
+   * [NotebookService.StartNotebookRuntime][google.cloud.aiplatform.v1.NotebookService.StartNotebookRuntime].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.StartNotebookRuntimeRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.StartNotebookRuntimeRequest) + com.google.cloud.aiplatform.v1.StartNotebookRuntimeRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_StartNotebookRuntimeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_StartNotebookRuntimeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.StartNotebookRuntimeRequest.class, + com.google.cloud.aiplatform.v1.StartNotebookRuntimeRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.StartNotebookRuntimeRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_StartNotebookRuntimeRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.StartNotebookRuntimeRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.StartNotebookRuntimeRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.StartNotebookRuntimeRequest build() { + com.google.cloud.aiplatform.v1.StartNotebookRuntimeRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.StartNotebookRuntimeRequest buildPartial() { + com.google.cloud.aiplatform.v1.StartNotebookRuntimeRequest result = + new com.google.cloud.aiplatform.v1.StartNotebookRuntimeRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.StartNotebookRuntimeRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.StartNotebookRuntimeRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.StartNotebookRuntimeRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.StartNotebookRuntimeRequest other) { + if (other == com.google.cloud.aiplatform.v1.StartNotebookRuntimeRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the NotebookRuntime resource to be started.
+     * Instead of checking whether the name is in valid NotebookRuntime resource
+     * name format, directly throw NotFound exception if there is no such
+     * NotebookRuntime in spanner.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the NotebookRuntime resource to be started.
+     * Instead of checking whether the name is in valid NotebookRuntime resource
+     * name format, directly throw NotFound exception if there is no such
+     * NotebookRuntime in spanner.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the NotebookRuntime resource to be started.
+     * Instead of checking whether the name is in valid NotebookRuntime resource
+     * name format, directly throw NotFound exception if there is no such
+     * NotebookRuntime in spanner.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the NotebookRuntime resource to be started.
+     * Instead of checking whether the name is in valid NotebookRuntime resource
+     * name format, directly throw NotFound exception if there is no such
+     * NotebookRuntime in spanner.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the NotebookRuntime resource to be started.
+     * Instead of checking whether the name is in valid NotebookRuntime resource
+     * name format, directly throw NotFound exception if there is no such
+     * NotebookRuntime in spanner.
+     * 
+ * + * + * 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. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.StartNotebookRuntimeRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.StartNotebookRuntimeRequest) + private static final com.google.cloud.aiplatform.v1.StartNotebookRuntimeRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.StartNotebookRuntimeRequest(); + } + + public static com.google.cloud.aiplatform.v1.StartNotebookRuntimeRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StartNotebookRuntimeRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.StartNotebookRuntimeRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/StartNotebookRuntimeRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/StartNotebookRuntimeRequestOrBuilder.java new file mode 100644 index 000000000000..4775f19c8b32 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/StartNotebookRuntimeRequestOrBuilder.java @@ -0,0 +1,61 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/notebook_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +public interface StartNotebookRuntimeRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.StartNotebookRuntimeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the NotebookRuntime resource to be started.
+   * Instead of checking whether the name is in valid NotebookRuntime resource
+   * name format, directly throw NotFound exception if there is no such
+   * NotebookRuntime in spanner.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the NotebookRuntime resource to be started.
+   * Instead of checking whether the name is in valid NotebookRuntime resource
+   * name format, directly throw NotFound exception if there is no such
+   * NotebookRuntime in spanner.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/StartNotebookRuntimeResponse.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/StartNotebookRuntimeResponse.java new file mode 100644 index 000000000000..4e608f85e084 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/StartNotebookRuntimeResponse.java @@ -0,0 +1,435 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/notebook_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Response message for
+ * [NotebookService.StartNotebookRuntime][google.cloud.aiplatform.v1.NotebookService.StartNotebookRuntime].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.StartNotebookRuntimeResponse} + */ +public final class StartNotebookRuntimeResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.StartNotebookRuntimeResponse) + StartNotebookRuntimeResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use StartNotebookRuntimeResponse.newBuilder() to construct. + private StartNotebookRuntimeResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private StartNotebookRuntimeResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new StartNotebookRuntimeResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_StartNotebookRuntimeResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_StartNotebookRuntimeResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.StartNotebookRuntimeResponse.class, + com.google.cloud.aiplatform.v1.StartNotebookRuntimeResponse.Builder.class); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.StartNotebookRuntimeResponse)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.StartNotebookRuntimeResponse other = + (com.google.cloud.aiplatform.v1.StartNotebookRuntimeResponse) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.StartNotebookRuntimeResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.StartNotebookRuntimeResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.StartNotebookRuntimeResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.StartNotebookRuntimeResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.StartNotebookRuntimeResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.StartNotebookRuntimeResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.StartNotebookRuntimeResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.StartNotebookRuntimeResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.StartNotebookRuntimeResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.StartNotebookRuntimeResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.StartNotebookRuntimeResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.StartNotebookRuntimeResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.StartNotebookRuntimeResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for
+   * [NotebookService.StartNotebookRuntime][google.cloud.aiplatform.v1.NotebookService.StartNotebookRuntime].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.StartNotebookRuntimeResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.StartNotebookRuntimeResponse) + com.google.cloud.aiplatform.v1.StartNotebookRuntimeResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_StartNotebookRuntimeResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_StartNotebookRuntimeResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.StartNotebookRuntimeResponse.class, + com.google.cloud.aiplatform.v1.StartNotebookRuntimeResponse.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.StartNotebookRuntimeResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_StartNotebookRuntimeResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.StartNotebookRuntimeResponse getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.StartNotebookRuntimeResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.StartNotebookRuntimeResponse build() { + com.google.cloud.aiplatform.v1.StartNotebookRuntimeResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.StartNotebookRuntimeResponse buildPartial() { + com.google.cloud.aiplatform.v1.StartNotebookRuntimeResponse result = + new com.google.cloud.aiplatform.v1.StartNotebookRuntimeResponse(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.StartNotebookRuntimeResponse) { + return mergeFrom((com.google.cloud.aiplatform.v1.StartNotebookRuntimeResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.StartNotebookRuntimeResponse other) { + if (other == com.google.cloud.aiplatform.v1.StartNotebookRuntimeResponse.getDefaultInstance()) + return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.StartNotebookRuntimeResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.StartNotebookRuntimeResponse) + private static final com.google.cloud.aiplatform.v1.StartNotebookRuntimeResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.StartNotebookRuntimeResponse(); + } + + public static com.google.cloud.aiplatform.v1.StartNotebookRuntimeResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StartNotebookRuntimeResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.StartNotebookRuntimeResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/StartNotebookRuntimeResponseOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/StartNotebookRuntimeResponseOrBuilder.java new file mode 100644 index 000000000000..3216a5e4315e --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/StartNotebookRuntimeResponseOrBuilder.java @@ -0,0 +1,25 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/notebook_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +public interface StartNotebookRuntimeResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.StartNotebookRuntimeResponse) + com.google.protobuf.MessageOrBuilder {} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SupervisedHyperParameters.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SupervisedHyperParameters.java new file mode 100644 index 000000000000..860bbb9deb7c --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SupervisedHyperParameters.java @@ -0,0 +1,1012 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/tuning_job.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Hyperparameters for SFT.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.SupervisedHyperParameters} + */ +public final class SupervisedHyperParameters extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.SupervisedHyperParameters) + SupervisedHyperParametersOrBuilder { + private static final long serialVersionUID = 0L; + // Use SupervisedHyperParameters.newBuilder() to construct. + private SupervisedHyperParameters(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SupervisedHyperParameters() { + adapterSize_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SupervisedHyperParameters(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1_SupervisedHyperParameters_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1_SupervisedHyperParameters_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.SupervisedHyperParameters.class, + com.google.cloud.aiplatform.v1.SupervisedHyperParameters.Builder.class); + } + + /** + * + * + *
+   * Supported adapter sizes for tuning.
+   * 
+ * + * Protobuf enum {@code google.cloud.aiplatform.v1.SupervisedHyperParameters.AdapterSize} + */ + public enum AdapterSize implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Adapter size is unspecified.
+     * 
+ * + * ADAPTER_SIZE_UNSPECIFIED = 0; + */ + ADAPTER_SIZE_UNSPECIFIED(0), + /** + * + * + *
+     * Adapter size 1.
+     * 
+ * + * ADAPTER_SIZE_ONE = 1; + */ + ADAPTER_SIZE_ONE(1), + /** + * + * + *
+     * Adapter size 4.
+     * 
+ * + * ADAPTER_SIZE_FOUR = 2; + */ + ADAPTER_SIZE_FOUR(2), + /** + * + * + *
+     * Adapter size 8.
+     * 
+ * + * ADAPTER_SIZE_EIGHT = 3; + */ + ADAPTER_SIZE_EIGHT(3), + /** + * + * + *
+     * Adapter size 16.
+     * 
+ * + * ADAPTER_SIZE_SIXTEEN = 4; + */ + ADAPTER_SIZE_SIXTEEN(4), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Adapter size is unspecified.
+     * 
+ * + * ADAPTER_SIZE_UNSPECIFIED = 0; + */ + public static final int ADAPTER_SIZE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Adapter size 1.
+     * 
+ * + * ADAPTER_SIZE_ONE = 1; + */ + public static final int ADAPTER_SIZE_ONE_VALUE = 1; + /** + * + * + *
+     * Adapter size 4.
+     * 
+ * + * ADAPTER_SIZE_FOUR = 2; + */ + public static final int ADAPTER_SIZE_FOUR_VALUE = 2; + /** + * + * + *
+     * Adapter size 8.
+     * 
+ * + * ADAPTER_SIZE_EIGHT = 3; + */ + public static final int ADAPTER_SIZE_EIGHT_VALUE = 3; + /** + * + * + *
+     * Adapter size 16.
+     * 
+ * + * ADAPTER_SIZE_SIXTEEN = 4; + */ + public static final int ADAPTER_SIZE_SIXTEEN_VALUE = 4; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static AdapterSize valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static AdapterSize forNumber(int value) { + switch (value) { + case 0: + return ADAPTER_SIZE_UNSPECIFIED; + case 1: + return ADAPTER_SIZE_ONE; + case 2: + return ADAPTER_SIZE_FOUR; + case 3: + return ADAPTER_SIZE_EIGHT; + case 4: + return ADAPTER_SIZE_SIXTEEN; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public AdapterSize findValueByNumber(int number) { + return AdapterSize.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.SupervisedHyperParameters.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final AdapterSize[] VALUES = values(); + + public static AdapterSize valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private AdapterSize(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.aiplatform.v1.SupervisedHyperParameters.AdapterSize) + } + + public static final int EPOCH_COUNT_FIELD_NUMBER = 1; + private long epochCount_ = 0L; + /** + * + * + *
+   * Optional. Number of training epoches for this tuning job.
+   * 
+ * + * int64 epoch_count = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The epochCount. + */ + @java.lang.Override + public long getEpochCount() { + return epochCount_; + } + + public static final int LEARNING_RATE_MULTIPLIER_FIELD_NUMBER = 2; + private double learningRateMultiplier_ = 0D; + /** + * + * + *
+   * Optional. Learning rate multiplier for tuning.
+   * 
+ * + * double learning_rate_multiplier = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The learningRateMultiplier. + */ + @java.lang.Override + public double getLearningRateMultiplier() { + return learningRateMultiplier_; + } + + public static final int ADAPTER_SIZE_FIELD_NUMBER = 3; + private int adapterSize_ = 0; + /** + * + * + *
+   * Optional. Adapter size for tuning.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.SupervisedHyperParameters.AdapterSize adapter_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for adapterSize. + */ + @java.lang.Override + public int getAdapterSizeValue() { + return adapterSize_; + } + /** + * + * + *
+   * Optional. Adapter size for tuning.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.SupervisedHyperParameters.AdapterSize adapter_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The adapterSize. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.SupervisedHyperParameters.AdapterSize getAdapterSize() { + com.google.cloud.aiplatform.v1.SupervisedHyperParameters.AdapterSize result = + com.google.cloud.aiplatform.v1.SupervisedHyperParameters.AdapterSize.forNumber( + adapterSize_); + return result == null + ? com.google.cloud.aiplatform.v1.SupervisedHyperParameters.AdapterSize.UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (epochCount_ != 0L) { + output.writeInt64(1, epochCount_); + } + if (java.lang.Double.doubleToRawLongBits(learningRateMultiplier_) != 0) { + output.writeDouble(2, learningRateMultiplier_); + } + if (adapterSize_ + != com.google.cloud.aiplatform.v1.SupervisedHyperParameters.AdapterSize + .ADAPTER_SIZE_UNSPECIFIED + .getNumber()) { + output.writeEnum(3, adapterSize_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (epochCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, epochCount_); + } + if (java.lang.Double.doubleToRawLongBits(learningRateMultiplier_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(2, learningRateMultiplier_); + } + if (adapterSize_ + != com.google.cloud.aiplatform.v1.SupervisedHyperParameters.AdapterSize + .ADAPTER_SIZE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, adapterSize_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.SupervisedHyperParameters)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.SupervisedHyperParameters other = + (com.google.cloud.aiplatform.v1.SupervisedHyperParameters) obj; + + if (getEpochCount() != other.getEpochCount()) return false; + if (java.lang.Double.doubleToLongBits(getLearningRateMultiplier()) + != java.lang.Double.doubleToLongBits(other.getLearningRateMultiplier())) return false; + if (adapterSize_ != other.adapterSize_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + EPOCH_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getEpochCount()); + hash = (37 * hash) + LEARNING_RATE_MULTIPLIER_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getLearningRateMultiplier())); + hash = (37 * hash) + ADAPTER_SIZE_FIELD_NUMBER; + hash = (53 * hash) + adapterSize_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.SupervisedHyperParameters parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.SupervisedHyperParameters parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.SupervisedHyperParameters parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.SupervisedHyperParameters parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.SupervisedHyperParameters parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.SupervisedHyperParameters parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.SupervisedHyperParameters parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.SupervisedHyperParameters parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.SupervisedHyperParameters parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.SupervisedHyperParameters parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.SupervisedHyperParameters parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.SupervisedHyperParameters parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.SupervisedHyperParameters prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Hyperparameters for SFT.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.SupervisedHyperParameters} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.SupervisedHyperParameters) + com.google.cloud.aiplatform.v1.SupervisedHyperParametersOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1_SupervisedHyperParameters_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1_SupervisedHyperParameters_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.SupervisedHyperParameters.class, + com.google.cloud.aiplatform.v1.SupervisedHyperParameters.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.SupervisedHyperParameters.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + epochCount_ = 0L; + learningRateMultiplier_ = 0D; + adapterSize_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1_SupervisedHyperParameters_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.SupervisedHyperParameters getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.SupervisedHyperParameters.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.SupervisedHyperParameters build() { + com.google.cloud.aiplatform.v1.SupervisedHyperParameters result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.SupervisedHyperParameters buildPartial() { + com.google.cloud.aiplatform.v1.SupervisedHyperParameters result = + new com.google.cloud.aiplatform.v1.SupervisedHyperParameters(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.SupervisedHyperParameters result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.epochCount_ = epochCount_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.learningRateMultiplier_ = learningRateMultiplier_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.adapterSize_ = adapterSize_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.SupervisedHyperParameters) { + return mergeFrom((com.google.cloud.aiplatform.v1.SupervisedHyperParameters) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.SupervisedHyperParameters other) { + if (other == com.google.cloud.aiplatform.v1.SupervisedHyperParameters.getDefaultInstance()) + return this; + if (other.getEpochCount() != 0L) { + setEpochCount(other.getEpochCount()); + } + if (other.getLearningRateMultiplier() != 0D) { + setLearningRateMultiplier(other.getLearningRateMultiplier()); + } + if (other.adapterSize_ != 0) { + setAdapterSizeValue(other.getAdapterSizeValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + epochCount_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 17: + { + learningRateMultiplier_ = input.readDouble(); + bitField0_ |= 0x00000002; + break; + } // case 17 + case 24: + { + adapterSize_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private long epochCount_; + /** + * + * + *
+     * Optional. Number of training epoches for this tuning job.
+     * 
+ * + * int64 epoch_count = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The epochCount. + */ + @java.lang.Override + public long getEpochCount() { + return epochCount_; + } + /** + * + * + *
+     * Optional. Number of training epoches for this tuning job.
+     * 
+ * + * int64 epoch_count = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The epochCount to set. + * @return This builder for chaining. + */ + public Builder setEpochCount(long value) { + + epochCount_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Number of training epoches for this tuning job.
+     * 
+ * + * int64 epoch_count = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEpochCount() { + bitField0_ = (bitField0_ & ~0x00000001); + epochCount_ = 0L; + onChanged(); + return this; + } + + private double learningRateMultiplier_; + /** + * + * + *
+     * Optional. Learning rate multiplier for tuning.
+     * 
+ * + * double learning_rate_multiplier = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The learningRateMultiplier. + */ + @java.lang.Override + public double getLearningRateMultiplier() { + return learningRateMultiplier_; + } + /** + * + * + *
+     * Optional. Learning rate multiplier for tuning.
+     * 
+ * + * double learning_rate_multiplier = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The learningRateMultiplier to set. + * @return This builder for chaining. + */ + public Builder setLearningRateMultiplier(double value) { + + learningRateMultiplier_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Learning rate multiplier for tuning.
+     * 
+ * + * double learning_rate_multiplier = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearLearningRateMultiplier() { + bitField0_ = (bitField0_ & ~0x00000002); + learningRateMultiplier_ = 0D; + onChanged(); + return this; + } + + private int adapterSize_ = 0; + /** + * + * + *
+     * Optional. Adapter size for tuning.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.SupervisedHyperParameters.AdapterSize adapter_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for adapterSize. + */ + @java.lang.Override + public int getAdapterSizeValue() { + return adapterSize_; + } + /** + * + * + *
+     * Optional. Adapter size for tuning.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.SupervisedHyperParameters.AdapterSize adapter_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for adapterSize to set. + * @return This builder for chaining. + */ + public Builder setAdapterSizeValue(int value) { + adapterSize_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Adapter size for tuning.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.SupervisedHyperParameters.AdapterSize adapter_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The adapterSize. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.SupervisedHyperParameters.AdapterSize getAdapterSize() { + com.google.cloud.aiplatform.v1.SupervisedHyperParameters.AdapterSize result = + com.google.cloud.aiplatform.v1.SupervisedHyperParameters.AdapterSize.forNumber( + adapterSize_); + return result == null + ? com.google.cloud.aiplatform.v1.SupervisedHyperParameters.AdapterSize.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Optional. Adapter size for tuning.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.SupervisedHyperParameters.AdapterSize adapter_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The adapterSize to set. + * @return This builder for chaining. + */ + public Builder setAdapterSize( + com.google.cloud.aiplatform.v1.SupervisedHyperParameters.AdapterSize value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + adapterSize_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Adapter size for tuning.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.SupervisedHyperParameters.AdapterSize adapter_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearAdapterSize() { + bitField0_ = (bitField0_ & ~0x00000004); + adapterSize_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.SupervisedHyperParameters) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.SupervisedHyperParameters) + private static final com.google.cloud.aiplatform.v1.SupervisedHyperParameters DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.SupervisedHyperParameters(); + } + + public static com.google.cloud.aiplatform.v1.SupervisedHyperParameters getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SupervisedHyperParameters parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.SupervisedHyperParameters getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SupervisedHyperParametersOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SupervisedHyperParametersOrBuilder.java new file mode 100644 index 000000000000..0007a4404894 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SupervisedHyperParametersOrBuilder.java @@ -0,0 +1,81 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/tuning_job.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +public interface SupervisedHyperParametersOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.SupervisedHyperParameters) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Number of training epoches for this tuning job.
+   * 
+ * + * int64 epoch_count = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The epochCount. + */ + long getEpochCount(); + + /** + * + * + *
+   * Optional. Learning rate multiplier for tuning.
+   * 
+ * + * double learning_rate_multiplier = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The learningRateMultiplier. + */ + double getLearningRateMultiplier(); + + /** + * + * + *
+   * Optional. Adapter size for tuning.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.SupervisedHyperParameters.AdapterSize adapter_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for adapterSize. + */ + int getAdapterSizeValue(); + /** + * + * + *
+   * Optional. Adapter size for tuning.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.SupervisedHyperParameters.AdapterSize adapter_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The adapterSize. + */ + com.google.cloud.aiplatform.v1.SupervisedHyperParameters.AdapterSize getAdapterSize(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SupervisedTuningDataStats.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SupervisedTuningDataStats.java new file mode 100644 index 000000000000..6de7b9ff80a1 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SupervisedTuningDataStats.java @@ -0,0 +1,2332 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/tuning_job.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Tuning data statistics for Supervised Tuning.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.SupervisedTuningDataStats} + */ +public final class SupervisedTuningDataStats extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.SupervisedTuningDataStats) + SupervisedTuningDataStatsOrBuilder { + private static final long serialVersionUID = 0L; + // Use SupervisedTuningDataStats.newBuilder() to construct. + private SupervisedTuningDataStats(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SupervisedTuningDataStats() { + userDatasetExamples_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SupervisedTuningDataStats(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1_SupervisedTuningDataStats_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1_SupervisedTuningDataStats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.SupervisedTuningDataStats.class, + com.google.cloud.aiplatform.v1.SupervisedTuningDataStats.Builder.class); + } + + private int bitField0_; + public static final int TUNING_DATASET_EXAMPLE_COUNT_FIELD_NUMBER = 1; + private long tuningDatasetExampleCount_ = 0L; + /** + * + * + *
+   * Output only. Number of examples in the tuning dataset.
+   * 
+ * + * int64 tuning_dataset_example_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The tuningDatasetExampleCount. + */ + @java.lang.Override + public long getTuningDatasetExampleCount() { + return tuningDatasetExampleCount_; + } + + public static final int TOTAL_TUNING_CHARACTER_COUNT_FIELD_NUMBER = 2; + private long totalTuningCharacterCount_ = 0L; + /** + * + * + *
+   * Output only. Number of tuning characters in the tuning dataset.
+   * 
+ * + * int64 total_tuning_character_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The totalTuningCharacterCount. + */ + @java.lang.Override + public long getTotalTuningCharacterCount() { + return totalTuningCharacterCount_; + } + + public static final int TOTAL_BILLABLE_CHARACTER_COUNT_FIELD_NUMBER = 3; + private long totalBillableCharacterCount_ = 0L; + /** + * + * + *
+   * Output only. Number of billable characters in the tuning dataset.
+   * 
+ * + * int64 total_billable_character_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The totalBillableCharacterCount. + */ + @java.lang.Override + public long getTotalBillableCharacterCount() { + return totalBillableCharacterCount_; + } + + public static final int TUNING_STEP_COUNT_FIELD_NUMBER = 4; + private long tuningStepCount_ = 0L; + /** + * + * + *
+   * Output only. Number of tuning steps for this Tuning Job.
+   * 
+ * + * int64 tuning_step_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The tuningStepCount. + */ + @java.lang.Override + public long getTuningStepCount() { + return tuningStepCount_; + } + + public static final int USER_INPUT_TOKEN_DISTRIBUTION_FIELD_NUMBER = 5; + private com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution + userInputTokenDistribution_; + /** + * + * + *
+   * Output only. Dataset distributions for the user input tokens.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution user_input_token_distribution = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the userInputTokenDistribution field is set. + */ + @java.lang.Override + public boolean hasUserInputTokenDistribution() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Output only. Dataset distributions for the user input tokens.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution user_input_token_distribution = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The userInputTokenDistribution. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution + getUserInputTokenDistribution() { + return userInputTokenDistribution_ == null + ? com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.getDefaultInstance() + : userInputTokenDistribution_; + } + /** + * + * + *
+   * Output only. Dataset distributions for the user input tokens.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution user_input_token_distribution = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistributionOrBuilder + getUserInputTokenDistributionOrBuilder() { + return userInputTokenDistribution_ == null + ? com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.getDefaultInstance() + : userInputTokenDistribution_; + } + + public static final int USER_OUTPUT_TOKEN_DISTRIBUTION_FIELD_NUMBER = 6; + private com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution + userOutputTokenDistribution_; + /** + * + * + *
+   * Output only. Dataset distributions for the user output tokens.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution user_output_token_distribution = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the userOutputTokenDistribution field is set. + */ + @java.lang.Override + public boolean hasUserOutputTokenDistribution() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Output only. Dataset distributions for the user output tokens.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution user_output_token_distribution = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The userOutputTokenDistribution. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution + getUserOutputTokenDistribution() { + return userOutputTokenDistribution_ == null + ? com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.getDefaultInstance() + : userOutputTokenDistribution_; + } + /** + * + * + *
+   * Output only. Dataset distributions for the user output tokens.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution user_output_token_distribution = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistributionOrBuilder + getUserOutputTokenDistributionOrBuilder() { + return userOutputTokenDistribution_ == null + ? com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.getDefaultInstance() + : userOutputTokenDistribution_; + } + + public static final int USER_MESSAGE_PER_EXAMPLE_DISTRIBUTION_FIELD_NUMBER = 7; + private com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution + userMessagePerExampleDistribution_; + /** + * + * + *
+   * Output only. Dataset distributions for the messages per example.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution user_message_per_example_distribution = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the userMessagePerExampleDistribution field is set. + */ + @java.lang.Override + public boolean hasUserMessagePerExampleDistribution() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+   * Output only. Dataset distributions for the messages per example.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution user_message_per_example_distribution = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The userMessagePerExampleDistribution. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution + getUserMessagePerExampleDistribution() { + return userMessagePerExampleDistribution_ == null + ? com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.getDefaultInstance() + : userMessagePerExampleDistribution_; + } + /** + * + * + *
+   * Output only. Dataset distributions for the messages per example.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution user_message_per_example_distribution = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistributionOrBuilder + getUserMessagePerExampleDistributionOrBuilder() { + return userMessagePerExampleDistribution_ == null + ? com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.getDefaultInstance() + : userMessagePerExampleDistribution_; + } + + public static final int USER_DATASET_EXAMPLES_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private java.util.List userDatasetExamples_; + /** + * + * + *
+   * Output only. Sample user messages in the training dataset uri.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Content user_dataset_examples = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List getUserDatasetExamplesList() { + return userDatasetExamples_; + } + /** + * + * + *
+   * Output only. Sample user messages in the training dataset uri.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Content user_dataset_examples = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getUserDatasetExamplesOrBuilderList() { + return userDatasetExamples_; + } + /** + * + * + *
+   * Output only. Sample user messages in the training dataset uri.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Content user_dataset_examples = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getUserDatasetExamplesCount() { + return userDatasetExamples_.size(); + } + /** + * + * + *
+   * Output only. Sample user messages in the training dataset uri.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Content user_dataset_examples = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.Content getUserDatasetExamples(int index) { + return userDatasetExamples_.get(index); + } + /** + * + * + *
+   * Output only. Sample user messages in the training dataset uri.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Content user_dataset_examples = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ContentOrBuilder getUserDatasetExamplesOrBuilder( + int index) { + return userDatasetExamples_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (tuningDatasetExampleCount_ != 0L) { + output.writeInt64(1, tuningDatasetExampleCount_); + } + if (totalTuningCharacterCount_ != 0L) { + output.writeInt64(2, totalTuningCharacterCount_); + } + if (totalBillableCharacterCount_ != 0L) { + output.writeInt64(3, totalBillableCharacterCount_); + } + if (tuningStepCount_ != 0L) { + output.writeInt64(4, tuningStepCount_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(5, getUserInputTokenDistribution()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(6, getUserOutputTokenDistribution()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(7, getUserMessagePerExampleDistribution()); + } + for (int i = 0; i < userDatasetExamples_.size(); i++) { + output.writeMessage(8, userDatasetExamples_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (tuningDatasetExampleCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, tuningDatasetExampleCount_); + } + if (totalTuningCharacterCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, totalTuningCharacterCount_); + } + if (totalBillableCharacterCount_ != 0L) { + size += + com.google.protobuf.CodedOutputStream.computeInt64Size(3, totalBillableCharacterCount_); + } + if (tuningStepCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, tuningStepCount_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, getUserInputTokenDistribution()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, getUserOutputTokenDistribution()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 7, getUserMessagePerExampleDistribution()); + } + for (int i = 0; i < userDatasetExamples_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(8, userDatasetExamples_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.SupervisedTuningDataStats)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.SupervisedTuningDataStats other = + (com.google.cloud.aiplatform.v1.SupervisedTuningDataStats) obj; + + if (getTuningDatasetExampleCount() != other.getTuningDatasetExampleCount()) return false; + if (getTotalTuningCharacterCount() != other.getTotalTuningCharacterCount()) return false; + if (getTotalBillableCharacterCount() != other.getTotalBillableCharacterCount()) return false; + if (getTuningStepCount() != other.getTuningStepCount()) return false; + if (hasUserInputTokenDistribution() != other.hasUserInputTokenDistribution()) return false; + if (hasUserInputTokenDistribution()) { + if (!getUserInputTokenDistribution().equals(other.getUserInputTokenDistribution())) + return false; + } + if (hasUserOutputTokenDistribution() != other.hasUserOutputTokenDistribution()) return false; + if (hasUserOutputTokenDistribution()) { + if (!getUserOutputTokenDistribution().equals(other.getUserOutputTokenDistribution())) + return false; + } + if (hasUserMessagePerExampleDistribution() != other.hasUserMessagePerExampleDistribution()) + return false; + if (hasUserMessagePerExampleDistribution()) { + if (!getUserMessagePerExampleDistribution() + .equals(other.getUserMessagePerExampleDistribution())) return false; + } + if (!getUserDatasetExamplesList().equals(other.getUserDatasetExamplesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TUNING_DATASET_EXAMPLE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTuningDatasetExampleCount()); + hash = (37 * hash) + TOTAL_TUNING_CHARACTER_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTotalTuningCharacterCount()); + hash = (37 * hash) + TOTAL_BILLABLE_CHARACTER_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTotalBillableCharacterCount()); + hash = (37 * hash) + TUNING_STEP_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTuningStepCount()); + if (hasUserInputTokenDistribution()) { + hash = (37 * hash) + USER_INPUT_TOKEN_DISTRIBUTION_FIELD_NUMBER; + hash = (53 * hash) + getUserInputTokenDistribution().hashCode(); + } + if (hasUserOutputTokenDistribution()) { + hash = (37 * hash) + USER_OUTPUT_TOKEN_DISTRIBUTION_FIELD_NUMBER; + hash = (53 * hash) + getUserOutputTokenDistribution().hashCode(); + } + if (hasUserMessagePerExampleDistribution()) { + hash = (37 * hash) + USER_MESSAGE_PER_EXAMPLE_DISTRIBUTION_FIELD_NUMBER; + hash = (53 * hash) + getUserMessagePerExampleDistribution().hashCode(); + } + if (getUserDatasetExamplesCount() > 0) { + hash = (37 * hash) + USER_DATASET_EXAMPLES_FIELD_NUMBER; + hash = (53 * hash) + getUserDatasetExamplesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.SupervisedTuningDataStats parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.SupervisedTuningDataStats parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.SupervisedTuningDataStats parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.SupervisedTuningDataStats parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.SupervisedTuningDataStats parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.SupervisedTuningDataStats parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.SupervisedTuningDataStats parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.SupervisedTuningDataStats parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.SupervisedTuningDataStats parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.SupervisedTuningDataStats parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.SupervisedTuningDataStats parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.SupervisedTuningDataStats parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.SupervisedTuningDataStats prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Tuning data statistics for Supervised Tuning.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.SupervisedTuningDataStats} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.SupervisedTuningDataStats) + com.google.cloud.aiplatform.v1.SupervisedTuningDataStatsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1_SupervisedTuningDataStats_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1_SupervisedTuningDataStats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.SupervisedTuningDataStats.class, + com.google.cloud.aiplatform.v1.SupervisedTuningDataStats.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.SupervisedTuningDataStats.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getUserInputTokenDistributionFieldBuilder(); + getUserOutputTokenDistributionFieldBuilder(); + getUserMessagePerExampleDistributionFieldBuilder(); + getUserDatasetExamplesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + tuningDatasetExampleCount_ = 0L; + totalTuningCharacterCount_ = 0L; + totalBillableCharacterCount_ = 0L; + tuningStepCount_ = 0L; + userInputTokenDistribution_ = null; + if (userInputTokenDistributionBuilder_ != null) { + userInputTokenDistributionBuilder_.dispose(); + userInputTokenDistributionBuilder_ = null; + } + userOutputTokenDistribution_ = null; + if (userOutputTokenDistributionBuilder_ != null) { + userOutputTokenDistributionBuilder_.dispose(); + userOutputTokenDistributionBuilder_ = null; + } + userMessagePerExampleDistribution_ = null; + if (userMessagePerExampleDistributionBuilder_ != null) { + userMessagePerExampleDistributionBuilder_.dispose(); + userMessagePerExampleDistributionBuilder_ = null; + } + if (userDatasetExamplesBuilder_ == null) { + userDatasetExamples_ = java.util.Collections.emptyList(); + } else { + userDatasetExamples_ = null; + userDatasetExamplesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000080); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1_SupervisedTuningDataStats_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.SupervisedTuningDataStats getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.SupervisedTuningDataStats.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.SupervisedTuningDataStats build() { + com.google.cloud.aiplatform.v1.SupervisedTuningDataStats result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.SupervisedTuningDataStats buildPartial() { + com.google.cloud.aiplatform.v1.SupervisedTuningDataStats result = + new com.google.cloud.aiplatform.v1.SupervisedTuningDataStats(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.aiplatform.v1.SupervisedTuningDataStats result) { + if (userDatasetExamplesBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0)) { + userDatasetExamples_ = java.util.Collections.unmodifiableList(userDatasetExamples_); + bitField0_ = (bitField0_ & ~0x00000080); + } + result.userDatasetExamples_ = userDatasetExamples_; + } else { + result.userDatasetExamples_ = userDatasetExamplesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.SupervisedTuningDataStats result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.tuningDatasetExampleCount_ = tuningDatasetExampleCount_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.totalTuningCharacterCount_ = totalTuningCharacterCount_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.totalBillableCharacterCount_ = totalBillableCharacterCount_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.tuningStepCount_ = tuningStepCount_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000010) != 0)) { + result.userInputTokenDistribution_ = + userInputTokenDistributionBuilder_ == null + ? userInputTokenDistribution_ + : userInputTokenDistributionBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.userOutputTokenDistribution_ = + userOutputTokenDistributionBuilder_ == null + ? userOutputTokenDistribution_ + : userOutputTokenDistributionBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.userMessagePerExampleDistribution_ = + userMessagePerExampleDistributionBuilder_ == null + ? userMessagePerExampleDistribution_ + : userMessagePerExampleDistributionBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.SupervisedTuningDataStats) { + return mergeFrom((com.google.cloud.aiplatform.v1.SupervisedTuningDataStats) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.SupervisedTuningDataStats other) { + if (other == com.google.cloud.aiplatform.v1.SupervisedTuningDataStats.getDefaultInstance()) + return this; + if (other.getTuningDatasetExampleCount() != 0L) { + setTuningDatasetExampleCount(other.getTuningDatasetExampleCount()); + } + if (other.getTotalTuningCharacterCount() != 0L) { + setTotalTuningCharacterCount(other.getTotalTuningCharacterCount()); + } + if (other.getTotalBillableCharacterCount() != 0L) { + setTotalBillableCharacterCount(other.getTotalBillableCharacterCount()); + } + if (other.getTuningStepCount() != 0L) { + setTuningStepCount(other.getTuningStepCount()); + } + if (other.hasUserInputTokenDistribution()) { + mergeUserInputTokenDistribution(other.getUserInputTokenDistribution()); + } + if (other.hasUserOutputTokenDistribution()) { + mergeUserOutputTokenDistribution(other.getUserOutputTokenDistribution()); + } + if (other.hasUserMessagePerExampleDistribution()) { + mergeUserMessagePerExampleDistribution(other.getUserMessagePerExampleDistribution()); + } + if (userDatasetExamplesBuilder_ == null) { + if (!other.userDatasetExamples_.isEmpty()) { + if (userDatasetExamples_.isEmpty()) { + userDatasetExamples_ = other.userDatasetExamples_; + bitField0_ = (bitField0_ & ~0x00000080); + } else { + ensureUserDatasetExamplesIsMutable(); + userDatasetExamples_.addAll(other.userDatasetExamples_); + } + onChanged(); + } + } else { + if (!other.userDatasetExamples_.isEmpty()) { + if (userDatasetExamplesBuilder_.isEmpty()) { + userDatasetExamplesBuilder_.dispose(); + userDatasetExamplesBuilder_ = null; + userDatasetExamples_ = other.userDatasetExamples_; + bitField0_ = (bitField0_ & ~0x00000080); + userDatasetExamplesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getUserDatasetExamplesFieldBuilder() + : null; + } else { + userDatasetExamplesBuilder_.addAllMessages(other.userDatasetExamples_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + tuningDatasetExampleCount_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + totalTuningCharacterCount_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + totalBillableCharacterCount_ = input.readInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: + { + tuningStepCount_ = input.readInt64(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: + { + input.readMessage( + getUserInputTokenDistributionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + input.readMessage( + getUserOutputTokenDistributionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + input.readMessage( + getUserMessagePerExampleDistributionFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: + { + com.google.cloud.aiplatform.v1.Content m = + input.readMessage( + com.google.cloud.aiplatform.v1.Content.parser(), extensionRegistry); + if (userDatasetExamplesBuilder_ == null) { + ensureUserDatasetExamplesIsMutable(); + userDatasetExamples_.add(m); + } else { + userDatasetExamplesBuilder_.addMessage(m); + } + break; + } // case 66 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private long tuningDatasetExampleCount_; + /** + * + * + *
+     * Output only. Number of examples in the tuning dataset.
+     * 
+ * + * int64 tuning_dataset_example_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The tuningDatasetExampleCount. + */ + @java.lang.Override + public long getTuningDatasetExampleCount() { + return tuningDatasetExampleCount_; + } + /** + * + * + *
+     * Output only. Number of examples in the tuning dataset.
+     * 
+ * + * int64 tuning_dataset_example_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The tuningDatasetExampleCount to set. + * @return This builder for chaining. + */ + public Builder setTuningDatasetExampleCount(long value) { + + tuningDatasetExampleCount_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Number of examples in the tuning dataset.
+     * 
+ * + * int64 tuning_dataset_example_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearTuningDatasetExampleCount() { + bitField0_ = (bitField0_ & ~0x00000001); + tuningDatasetExampleCount_ = 0L; + onChanged(); + return this; + } + + private long totalTuningCharacterCount_; + /** + * + * + *
+     * Output only. Number of tuning characters in the tuning dataset.
+     * 
+ * + * int64 total_tuning_character_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The totalTuningCharacterCount. + */ + @java.lang.Override + public long getTotalTuningCharacterCount() { + return totalTuningCharacterCount_; + } + /** + * + * + *
+     * Output only. Number of tuning characters in the tuning dataset.
+     * 
+ * + * int64 total_tuning_character_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The totalTuningCharacterCount to set. + * @return This builder for chaining. + */ + public Builder setTotalTuningCharacterCount(long value) { + + totalTuningCharacterCount_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Number of tuning characters in the tuning dataset.
+     * 
+ * + * int64 total_tuning_character_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearTotalTuningCharacterCount() { + bitField0_ = (bitField0_ & ~0x00000002); + totalTuningCharacterCount_ = 0L; + onChanged(); + return this; + } + + private long totalBillableCharacterCount_; + /** + * + * + *
+     * Output only. Number of billable characters in the tuning dataset.
+     * 
+ * + * int64 total_billable_character_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The totalBillableCharacterCount. + */ + @java.lang.Override + public long getTotalBillableCharacterCount() { + return totalBillableCharacterCount_; + } + /** + * + * + *
+     * Output only. Number of billable characters in the tuning dataset.
+     * 
+ * + * int64 total_billable_character_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The totalBillableCharacterCount to set. + * @return This builder for chaining. + */ + public Builder setTotalBillableCharacterCount(long value) { + + totalBillableCharacterCount_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Number of billable characters in the tuning dataset.
+     * 
+ * + * int64 total_billable_character_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearTotalBillableCharacterCount() { + bitField0_ = (bitField0_ & ~0x00000004); + totalBillableCharacterCount_ = 0L; + onChanged(); + return this; + } + + private long tuningStepCount_; + /** + * + * + *
+     * Output only. Number of tuning steps for this Tuning Job.
+     * 
+ * + * int64 tuning_step_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The tuningStepCount. + */ + @java.lang.Override + public long getTuningStepCount() { + return tuningStepCount_; + } + /** + * + * + *
+     * Output only. Number of tuning steps for this Tuning Job.
+     * 
+ * + * int64 tuning_step_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The tuningStepCount to set. + * @return This builder for chaining. + */ + public Builder setTuningStepCount(long value) { + + tuningStepCount_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Number of tuning steps for this Tuning Job.
+     * 
+ * + * int64 tuning_step_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearTuningStepCount() { + bitField0_ = (bitField0_ & ~0x00000008); + tuningStepCount_ = 0L; + onChanged(); + return this; + } + + private com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution + userInputTokenDistribution_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution, + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.Builder, + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistributionOrBuilder> + userInputTokenDistributionBuilder_; + /** + * + * + *
+     * Output only. Dataset distributions for the user input tokens.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution user_input_token_distribution = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the userInputTokenDistribution field is set. + */ + public boolean hasUserInputTokenDistribution() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * Output only. Dataset distributions for the user input tokens.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution user_input_token_distribution = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The userInputTokenDistribution. + */ + public com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution + getUserInputTokenDistribution() { + if (userInputTokenDistributionBuilder_ == null) { + return userInputTokenDistribution_ == null + ? com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution + .getDefaultInstance() + : userInputTokenDistribution_; + } else { + return userInputTokenDistributionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Dataset distributions for the user input tokens.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution user_input_token_distribution = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUserInputTokenDistribution( + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution value) { + if (userInputTokenDistributionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + userInputTokenDistribution_ = value; + } else { + userInputTokenDistributionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Dataset distributions for the user input tokens.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution user_input_token_distribution = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUserInputTokenDistribution( + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.Builder + builderForValue) { + if (userInputTokenDistributionBuilder_ == null) { + userInputTokenDistribution_ = builderForValue.build(); + } else { + userInputTokenDistributionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Dataset distributions for the user input tokens.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution user_input_token_distribution = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUserInputTokenDistribution( + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution value) { + if (userInputTokenDistributionBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && userInputTokenDistribution_ != null + && userInputTokenDistribution_ + != com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution + .getDefaultInstance()) { + getUserInputTokenDistributionBuilder().mergeFrom(value); + } else { + userInputTokenDistribution_ = value; + } + } else { + userInputTokenDistributionBuilder_.mergeFrom(value); + } + if (userInputTokenDistribution_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. Dataset distributions for the user input tokens.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution user_input_token_distribution = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUserInputTokenDistribution() { + bitField0_ = (bitField0_ & ~0x00000010); + userInputTokenDistribution_ = null; + if (userInputTokenDistributionBuilder_ != null) { + userInputTokenDistributionBuilder_.dispose(); + userInputTokenDistributionBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Dataset distributions for the user input tokens.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution user_input_token_distribution = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.Builder + getUserInputTokenDistributionBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getUserInputTokenDistributionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Dataset distributions for the user input tokens.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution user_input_token_distribution = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistributionOrBuilder + getUserInputTokenDistributionOrBuilder() { + if (userInputTokenDistributionBuilder_ != null) { + return userInputTokenDistributionBuilder_.getMessageOrBuilder(); + } else { + return userInputTokenDistribution_ == null + ? com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution + .getDefaultInstance() + : userInputTokenDistribution_; + } + } + /** + * + * + *
+     * Output only. Dataset distributions for the user input tokens.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution user_input_token_distribution = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution, + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.Builder, + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistributionOrBuilder> + getUserInputTokenDistributionFieldBuilder() { + if (userInputTokenDistributionBuilder_ == null) { + userInputTokenDistributionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution, + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.Builder, + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistributionOrBuilder>( + getUserInputTokenDistribution(), getParentForChildren(), isClean()); + userInputTokenDistribution_ = null; + } + return userInputTokenDistributionBuilder_; + } + + private com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution + userOutputTokenDistribution_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution, + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.Builder, + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistributionOrBuilder> + userOutputTokenDistributionBuilder_; + /** + * + * + *
+     * Output only. Dataset distributions for the user output tokens.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution user_output_token_distribution = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the userOutputTokenDistribution field is set. + */ + public boolean hasUserOutputTokenDistribution() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+     * Output only. Dataset distributions for the user output tokens.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution user_output_token_distribution = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The userOutputTokenDistribution. + */ + public com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution + getUserOutputTokenDistribution() { + if (userOutputTokenDistributionBuilder_ == null) { + return userOutputTokenDistribution_ == null + ? com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution + .getDefaultInstance() + : userOutputTokenDistribution_; + } else { + return userOutputTokenDistributionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Dataset distributions for the user output tokens.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution user_output_token_distribution = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUserOutputTokenDistribution( + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution value) { + if (userOutputTokenDistributionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + userOutputTokenDistribution_ = value; + } else { + userOutputTokenDistributionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Dataset distributions for the user output tokens.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution user_output_token_distribution = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUserOutputTokenDistribution( + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.Builder + builderForValue) { + if (userOutputTokenDistributionBuilder_ == null) { + userOutputTokenDistribution_ = builderForValue.build(); + } else { + userOutputTokenDistributionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Dataset distributions for the user output tokens.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution user_output_token_distribution = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUserOutputTokenDistribution( + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution value) { + if (userOutputTokenDistributionBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && userOutputTokenDistribution_ != null + && userOutputTokenDistribution_ + != com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution + .getDefaultInstance()) { + getUserOutputTokenDistributionBuilder().mergeFrom(value); + } else { + userOutputTokenDistribution_ = value; + } + } else { + userOutputTokenDistributionBuilder_.mergeFrom(value); + } + if (userOutputTokenDistribution_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. Dataset distributions for the user output tokens.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution user_output_token_distribution = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUserOutputTokenDistribution() { + bitField0_ = (bitField0_ & ~0x00000020); + userOutputTokenDistribution_ = null; + if (userOutputTokenDistributionBuilder_ != null) { + userOutputTokenDistributionBuilder_.dispose(); + userOutputTokenDistributionBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Dataset distributions for the user output tokens.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution user_output_token_distribution = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.Builder + getUserOutputTokenDistributionBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getUserOutputTokenDistributionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Dataset distributions for the user output tokens.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution user_output_token_distribution = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistributionOrBuilder + getUserOutputTokenDistributionOrBuilder() { + if (userOutputTokenDistributionBuilder_ != null) { + return userOutputTokenDistributionBuilder_.getMessageOrBuilder(); + } else { + return userOutputTokenDistribution_ == null + ? com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution + .getDefaultInstance() + : userOutputTokenDistribution_; + } + } + /** + * + * + *
+     * Output only. Dataset distributions for the user output tokens.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution user_output_token_distribution = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution, + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.Builder, + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistributionOrBuilder> + getUserOutputTokenDistributionFieldBuilder() { + if (userOutputTokenDistributionBuilder_ == null) { + userOutputTokenDistributionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution, + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.Builder, + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistributionOrBuilder>( + getUserOutputTokenDistribution(), getParentForChildren(), isClean()); + userOutputTokenDistribution_ = null; + } + return userOutputTokenDistributionBuilder_; + } + + private com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution + userMessagePerExampleDistribution_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution, + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.Builder, + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistributionOrBuilder> + userMessagePerExampleDistributionBuilder_; + /** + * + * + *
+     * Output only. Dataset distributions for the messages per example.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution user_message_per_example_distribution = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the userMessagePerExampleDistribution field is set. + */ + public boolean hasUserMessagePerExampleDistribution() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+     * Output only. Dataset distributions for the messages per example.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution user_message_per_example_distribution = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The userMessagePerExampleDistribution. + */ + public com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution + getUserMessagePerExampleDistribution() { + if (userMessagePerExampleDistributionBuilder_ == null) { + return userMessagePerExampleDistribution_ == null + ? com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution + .getDefaultInstance() + : userMessagePerExampleDistribution_; + } else { + return userMessagePerExampleDistributionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Dataset distributions for the messages per example.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution user_message_per_example_distribution = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUserMessagePerExampleDistribution( + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution value) { + if (userMessagePerExampleDistributionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + userMessagePerExampleDistribution_ = value; + } else { + userMessagePerExampleDistributionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Dataset distributions for the messages per example.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution user_message_per_example_distribution = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUserMessagePerExampleDistribution( + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.Builder + builderForValue) { + if (userMessagePerExampleDistributionBuilder_ == null) { + userMessagePerExampleDistribution_ = builderForValue.build(); + } else { + userMessagePerExampleDistributionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Dataset distributions for the messages per example.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution user_message_per_example_distribution = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUserMessagePerExampleDistribution( + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution value) { + if (userMessagePerExampleDistributionBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && userMessagePerExampleDistribution_ != null + && userMessagePerExampleDistribution_ + != com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution + .getDefaultInstance()) { + getUserMessagePerExampleDistributionBuilder().mergeFrom(value); + } else { + userMessagePerExampleDistribution_ = value; + } + } else { + userMessagePerExampleDistributionBuilder_.mergeFrom(value); + } + if (userMessagePerExampleDistribution_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. Dataset distributions for the messages per example.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution user_message_per_example_distribution = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUserMessagePerExampleDistribution() { + bitField0_ = (bitField0_ & ~0x00000040); + userMessagePerExampleDistribution_ = null; + if (userMessagePerExampleDistributionBuilder_ != null) { + userMessagePerExampleDistributionBuilder_.dispose(); + userMessagePerExampleDistributionBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Dataset distributions for the messages per example.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution user_message_per_example_distribution = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.Builder + getUserMessagePerExampleDistributionBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getUserMessagePerExampleDistributionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Dataset distributions for the messages per example.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution user_message_per_example_distribution = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistributionOrBuilder + getUserMessagePerExampleDistributionOrBuilder() { + if (userMessagePerExampleDistributionBuilder_ != null) { + return userMessagePerExampleDistributionBuilder_.getMessageOrBuilder(); + } else { + return userMessagePerExampleDistribution_ == null + ? com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution + .getDefaultInstance() + : userMessagePerExampleDistribution_; + } + } + /** + * + * + *
+     * Output only. Dataset distributions for the messages per example.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution user_message_per_example_distribution = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution, + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.Builder, + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistributionOrBuilder> + getUserMessagePerExampleDistributionFieldBuilder() { + if (userMessagePerExampleDistributionBuilder_ == null) { + userMessagePerExampleDistributionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution, + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.Builder, + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistributionOrBuilder>( + getUserMessagePerExampleDistribution(), getParentForChildren(), isClean()); + userMessagePerExampleDistribution_ = null; + } + return userMessagePerExampleDistributionBuilder_; + } + + private java.util.List userDatasetExamples_ = + java.util.Collections.emptyList(); + + private void ensureUserDatasetExamplesIsMutable() { + if (!((bitField0_ & 0x00000080) != 0)) { + userDatasetExamples_ = + new java.util.ArrayList(userDatasetExamples_); + bitField0_ |= 0x00000080; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.Content, + com.google.cloud.aiplatform.v1.Content.Builder, + com.google.cloud.aiplatform.v1.ContentOrBuilder> + userDatasetExamplesBuilder_; + + /** + * + * + *
+     * Output only. Sample user messages in the training dataset uri.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Content user_dataset_examples = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List getUserDatasetExamplesList() { + if (userDatasetExamplesBuilder_ == null) { + return java.util.Collections.unmodifiableList(userDatasetExamples_); + } else { + return userDatasetExamplesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Output only. Sample user messages in the training dataset uri.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Content user_dataset_examples = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getUserDatasetExamplesCount() { + if (userDatasetExamplesBuilder_ == null) { + return userDatasetExamples_.size(); + } else { + return userDatasetExamplesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Output only. Sample user messages in the training dataset uri.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Content user_dataset_examples = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.Content getUserDatasetExamples(int index) { + if (userDatasetExamplesBuilder_ == null) { + return userDatasetExamples_.get(index); + } else { + return userDatasetExamplesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Output only. Sample user messages in the training dataset uri.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Content user_dataset_examples = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUserDatasetExamples(int index, com.google.cloud.aiplatform.v1.Content value) { + if (userDatasetExamplesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUserDatasetExamplesIsMutable(); + userDatasetExamples_.set(index, value); + onChanged(); + } else { + userDatasetExamplesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. Sample user messages in the training dataset uri.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Content user_dataset_examples = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUserDatasetExamples( + int index, com.google.cloud.aiplatform.v1.Content.Builder builderForValue) { + if (userDatasetExamplesBuilder_ == null) { + ensureUserDatasetExamplesIsMutable(); + userDatasetExamples_.set(index, builderForValue.build()); + onChanged(); + } else { + userDatasetExamplesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Sample user messages in the training dataset uri.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Content user_dataset_examples = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addUserDatasetExamples(com.google.cloud.aiplatform.v1.Content value) { + if (userDatasetExamplesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUserDatasetExamplesIsMutable(); + userDatasetExamples_.add(value); + onChanged(); + } else { + userDatasetExamplesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Output only. Sample user messages in the training dataset uri.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Content user_dataset_examples = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addUserDatasetExamples(int index, com.google.cloud.aiplatform.v1.Content value) { + if (userDatasetExamplesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUserDatasetExamplesIsMutable(); + userDatasetExamples_.add(index, value); + onChanged(); + } else { + userDatasetExamplesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. Sample user messages in the training dataset uri.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Content user_dataset_examples = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addUserDatasetExamples( + com.google.cloud.aiplatform.v1.Content.Builder builderForValue) { + if (userDatasetExamplesBuilder_ == null) { + ensureUserDatasetExamplesIsMutable(); + userDatasetExamples_.add(builderForValue.build()); + onChanged(); + } else { + userDatasetExamplesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Sample user messages in the training dataset uri.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Content user_dataset_examples = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addUserDatasetExamples( + int index, com.google.cloud.aiplatform.v1.Content.Builder builderForValue) { + if (userDatasetExamplesBuilder_ == null) { + ensureUserDatasetExamplesIsMutable(); + userDatasetExamples_.add(index, builderForValue.build()); + onChanged(); + } else { + userDatasetExamplesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Sample user messages in the training dataset uri.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Content user_dataset_examples = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllUserDatasetExamples( + java.lang.Iterable values) { + if (userDatasetExamplesBuilder_ == null) { + ensureUserDatasetExamplesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, userDatasetExamples_); + onChanged(); + } else { + userDatasetExamplesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Output only. Sample user messages in the training dataset uri.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Content user_dataset_examples = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUserDatasetExamples() { + if (userDatasetExamplesBuilder_ == null) { + userDatasetExamples_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + } else { + userDatasetExamplesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. Sample user messages in the training dataset uri.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Content user_dataset_examples = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeUserDatasetExamples(int index) { + if (userDatasetExamplesBuilder_ == null) { + ensureUserDatasetExamplesIsMutable(); + userDatasetExamples_.remove(index); + onChanged(); + } else { + userDatasetExamplesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Output only. Sample user messages in the training dataset uri.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Content user_dataset_examples = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.Content.Builder getUserDatasetExamplesBuilder(int index) { + return getUserDatasetExamplesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Output only. Sample user messages in the training dataset uri.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Content user_dataset_examples = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.ContentOrBuilder getUserDatasetExamplesOrBuilder( + int index) { + if (userDatasetExamplesBuilder_ == null) { + return userDatasetExamples_.get(index); + } else { + return userDatasetExamplesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Output only. Sample user messages in the training dataset uri.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Content user_dataset_examples = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getUserDatasetExamplesOrBuilderList() { + if (userDatasetExamplesBuilder_ != null) { + return userDatasetExamplesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(userDatasetExamples_); + } + } + /** + * + * + *
+     * Output only. Sample user messages in the training dataset uri.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Content user_dataset_examples = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.Content.Builder addUserDatasetExamplesBuilder() { + return getUserDatasetExamplesFieldBuilder() + .addBuilder(com.google.cloud.aiplatform.v1.Content.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. Sample user messages in the training dataset uri.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Content user_dataset_examples = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.Content.Builder addUserDatasetExamplesBuilder(int index) { + return getUserDatasetExamplesFieldBuilder() + .addBuilder(index, com.google.cloud.aiplatform.v1.Content.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. Sample user messages in the training dataset uri.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Content user_dataset_examples = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getUserDatasetExamplesBuilderList() { + return getUserDatasetExamplesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.Content, + com.google.cloud.aiplatform.v1.Content.Builder, + com.google.cloud.aiplatform.v1.ContentOrBuilder> + getUserDatasetExamplesFieldBuilder() { + if (userDatasetExamplesBuilder_ == null) { + userDatasetExamplesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.Content, + com.google.cloud.aiplatform.v1.Content.Builder, + com.google.cloud.aiplatform.v1.ContentOrBuilder>( + userDatasetExamples_, + ((bitField0_ & 0x00000080) != 0), + getParentForChildren(), + isClean()); + userDatasetExamples_ = null; + } + return userDatasetExamplesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.SupervisedTuningDataStats) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.SupervisedTuningDataStats) + private static final com.google.cloud.aiplatform.v1.SupervisedTuningDataStats DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.SupervisedTuningDataStats(); + } + + public static com.google.cloud.aiplatform.v1.SupervisedTuningDataStats getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SupervisedTuningDataStats parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.SupervisedTuningDataStats getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SupervisedTuningDataStatsOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SupervisedTuningDataStatsOrBuilder.java new file mode 100644 index 000000000000..ec2256d7d790 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SupervisedTuningDataStatsOrBuilder.java @@ -0,0 +1,272 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/tuning_job.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +public interface SupervisedTuningDataStatsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.SupervisedTuningDataStats) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Number of examples in the tuning dataset.
+   * 
+ * + * int64 tuning_dataset_example_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The tuningDatasetExampleCount. + */ + long getTuningDatasetExampleCount(); + + /** + * + * + *
+   * Output only. Number of tuning characters in the tuning dataset.
+   * 
+ * + * int64 total_tuning_character_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The totalTuningCharacterCount. + */ + long getTotalTuningCharacterCount(); + + /** + * + * + *
+   * Output only. Number of billable characters in the tuning dataset.
+   * 
+ * + * int64 total_billable_character_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The totalBillableCharacterCount. + */ + long getTotalBillableCharacterCount(); + + /** + * + * + *
+   * Output only. Number of tuning steps for this Tuning Job.
+   * 
+ * + * int64 tuning_step_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The tuningStepCount. + */ + long getTuningStepCount(); + + /** + * + * + *
+   * Output only. Dataset distributions for the user input tokens.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution user_input_token_distribution = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the userInputTokenDistribution field is set. + */ + boolean hasUserInputTokenDistribution(); + /** + * + * + *
+   * Output only. Dataset distributions for the user input tokens.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution user_input_token_distribution = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The userInputTokenDistribution. + */ + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution + getUserInputTokenDistribution(); + /** + * + * + *
+   * Output only. Dataset distributions for the user input tokens.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution user_input_token_distribution = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistributionOrBuilder + getUserInputTokenDistributionOrBuilder(); + + /** + * + * + *
+   * Output only. Dataset distributions for the user output tokens.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution user_output_token_distribution = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the userOutputTokenDistribution field is set. + */ + boolean hasUserOutputTokenDistribution(); + /** + * + * + *
+   * Output only. Dataset distributions for the user output tokens.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution user_output_token_distribution = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The userOutputTokenDistribution. + */ + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution + getUserOutputTokenDistribution(); + /** + * + * + *
+   * Output only. Dataset distributions for the user output tokens.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution user_output_token_distribution = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistributionOrBuilder + getUserOutputTokenDistributionOrBuilder(); + + /** + * + * + *
+   * Output only. Dataset distributions for the messages per example.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution user_message_per_example_distribution = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the userMessagePerExampleDistribution field is set. + */ + boolean hasUserMessagePerExampleDistribution(); + /** + * + * + *
+   * Output only. Dataset distributions for the messages per example.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution user_message_per_example_distribution = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The userMessagePerExampleDistribution. + */ + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution + getUserMessagePerExampleDistribution(); + /** + * + * + *
+   * Output only. Dataset distributions for the messages per example.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution user_message_per_example_distribution = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistributionOrBuilder + getUserMessagePerExampleDistributionOrBuilder(); + + /** + * + * + *
+   * Output only. Sample user messages in the training dataset uri.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Content user_dataset_examples = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getUserDatasetExamplesList(); + /** + * + * + *
+   * Output only. Sample user messages in the training dataset uri.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Content user_dataset_examples = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.aiplatform.v1.Content getUserDatasetExamples(int index); + /** + * + * + *
+   * Output only. Sample user messages in the training dataset uri.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Content user_dataset_examples = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getUserDatasetExamplesCount(); + /** + * + * + *
+   * Output only. Sample user messages in the training dataset uri.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Content user_dataset_examples = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getUserDatasetExamplesOrBuilderList(); + /** + * + * + *
+   * Output only. Sample user messages in the training dataset uri.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Content user_dataset_examples = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.aiplatform.v1.ContentOrBuilder getUserDatasetExamplesOrBuilder(int index); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SupervisedTuningDatasetDistribution.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SupervisedTuningDatasetDistribution.java new file mode 100644 index 000000000000..2f0e630009ff --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SupervisedTuningDatasetDistribution.java @@ -0,0 +1,2517 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/tuning_job.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Dataset distribution for Supervised Tuning.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution} + */ +public final class SupervisedTuningDatasetDistribution + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution) + SupervisedTuningDatasetDistributionOrBuilder { + private static final long serialVersionUID = 0L; + // Use SupervisedTuningDatasetDistribution.newBuilder() to construct. + private SupervisedTuningDatasetDistribution( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SupervisedTuningDatasetDistribution() { + buckets_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SupervisedTuningDatasetDistribution(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1_SupervisedTuningDatasetDistribution_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1_SupervisedTuningDatasetDistribution_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.class, + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.Builder.class); + } + + public interface DatasetBucketOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Output only. Number of values in the bucket.
+     * 
+ * + * double count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count. + */ + double getCount(); + + /** + * + * + *
+     * Output only. Left bound of the bucket.
+     * 
+ * + * double left = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The left. + */ + double getLeft(); + + /** + * + * + *
+     * Output only. Right bound of the bucket.
+     * 
+ * + * double right = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The right. + */ + double getRight(); + } + /** + * + * + *
+   * Dataset bucket used to create a histogram for the distribution given a
+   * population of values.
+   * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket} + */ + public static final class DatasetBucket extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket) + DatasetBucketOrBuilder { + private static final long serialVersionUID = 0L; + // Use DatasetBucket.newBuilder() to construct. + private DatasetBucket(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DatasetBucket() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DatasetBucket(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1_SupervisedTuningDatasetDistribution_DatasetBucket_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1_SupervisedTuningDatasetDistribution_DatasetBucket_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket + .class, + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket + .Builder.class); + } + + public static final int COUNT_FIELD_NUMBER = 1; + private double count_ = 0D; + /** + * + * + *
+     * Output only. Number of values in the bucket.
+     * 
+ * + * double count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count. + */ + @java.lang.Override + public double getCount() { + return count_; + } + + public static final int LEFT_FIELD_NUMBER = 2; + private double left_ = 0D; + /** + * + * + *
+     * Output only. Left bound of the bucket.
+     * 
+ * + * double left = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The left. + */ + @java.lang.Override + public double getLeft() { + return left_; + } + + public static final int RIGHT_FIELD_NUMBER = 3; + private double right_ = 0D; + /** + * + * + *
+     * Output only. Right bound of the bucket.
+     * 
+ * + * double right = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The right. + */ + @java.lang.Override + public double getRight() { + return right_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (java.lang.Double.doubleToRawLongBits(count_) != 0) { + output.writeDouble(1, count_); + } + if (java.lang.Double.doubleToRawLongBits(left_) != 0) { + output.writeDouble(2, left_); + } + if (java.lang.Double.doubleToRawLongBits(right_) != 0) { + output.writeDouble(3, right_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (java.lang.Double.doubleToRawLongBits(count_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(1, count_); + } + if (java.lang.Double.doubleToRawLongBits(left_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(2, left_); + } + if (java.lang.Double.doubleToRawLongBits(right_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(3, right_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket other = + (com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket) obj; + + if (java.lang.Double.doubleToLongBits(getCount()) + != java.lang.Double.doubleToLongBits(other.getCount())) return false; + if (java.lang.Double.doubleToLongBits(getLeft()) + != java.lang.Double.doubleToLongBits(other.getLeft())) return false; + if (java.lang.Double.doubleToLongBits(getRight()) + != java.lang.Double.doubleToLongBits(other.getRight())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + COUNT_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getCount())); + hash = (37 * hash) + LEFT_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong(java.lang.Double.doubleToLongBits(getLeft())); + hash = (37 * hash) + RIGHT_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getRight())); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Dataset bucket used to create a histogram for the distribution given a
+     * population of values.
+     * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket) + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucketOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1_SupervisedTuningDatasetDistribution_DatasetBucket_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1_SupervisedTuningDatasetDistribution_DatasetBucket_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket + .class, + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket + .Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + count_ = 0D; + left_ = 0D; + right_ = 0D; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1_SupervisedTuningDatasetDistribution_DatasetBucket_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket + build() { + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket + buildPartial() { + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket result = + new com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.count_ = count_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.left_ = left_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.right_ = right_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket other) { + if (other + == com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket + .getDefaultInstance()) return this; + if (other.getCount() != 0D) { + setCount(other.getCount()); + } + if (other.getLeft() != 0D) { + setLeft(other.getLeft()); + } + if (other.getRight() != 0D) { + setRight(other.getRight()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 9: + { + count_ = input.readDouble(); + bitField0_ |= 0x00000001; + break; + } // case 9 + case 17: + { + left_ = input.readDouble(); + bitField0_ |= 0x00000002; + break; + } // case 17 + case 25: + { + right_ = input.readDouble(); + bitField0_ |= 0x00000004; + break; + } // case 25 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private double count_; + /** + * + * + *
+       * Output only. Number of values in the bucket.
+       * 
+ * + * double count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count. + */ + @java.lang.Override + public double getCount() { + return count_; + } + /** + * + * + *
+       * Output only. Number of values in the bucket.
+       * 
+ * + * double count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The count to set. + * @return This builder for chaining. + */ + public Builder setCount(double value) { + + count_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. Number of values in the bucket.
+       * 
+ * + * double count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearCount() { + bitField0_ = (bitField0_ & ~0x00000001); + count_ = 0D; + onChanged(); + return this; + } + + private double left_; + /** + * + * + *
+       * Output only. Left bound of the bucket.
+       * 
+ * + * double left = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The left. + */ + @java.lang.Override + public double getLeft() { + return left_; + } + /** + * + * + *
+       * Output only. Left bound of the bucket.
+       * 
+ * + * double left = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The left to set. + * @return This builder for chaining. + */ + public Builder setLeft(double value) { + + left_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. Left bound of the bucket.
+       * 
+ * + * double left = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearLeft() { + bitField0_ = (bitField0_ & ~0x00000002); + left_ = 0D; + onChanged(); + return this; + } + + private double right_; + /** + * + * + *
+       * Output only. Right bound of the bucket.
+       * 
+ * + * double right = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The right. + */ + @java.lang.Override + public double getRight() { + return right_; + } + /** + * + * + *
+       * Output only. Right bound of the bucket.
+       * 
+ * + * double right = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The right to set. + * @return This builder for chaining. + */ + public Builder setRight(double value) { + + right_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. Right bound of the bucket.
+       * 
+ * + * double right = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearRight() { + bitField0_ = (bitField0_ & ~0x00000004); + right_ = 0D; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket) + private static final com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution + .DatasetBucket + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket(); + } + + public static com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DatasetBucket parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int SUM_FIELD_NUMBER = 1; + private long sum_ = 0L; + /** + * + * + *
+   * Output only. Sum of a given population of values.
+   * 
+ * + * int64 sum = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The sum. + */ + @java.lang.Override + public long getSum() { + return sum_; + } + + public static final int MIN_FIELD_NUMBER = 2; + private double min_ = 0D; + /** + * + * + *
+   * Output only. The minimum of the population values.
+   * 
+ * + * double min = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The min. + */ + @java.lang.Override + public double getMin() { + return min_; + } + + public static final int MAX_FIELD_NUMBER = 3; + private double max_ = 0D; + /** + * + * + *
+   * Output only. The maximum of the population values.
+   * 
+ * + * double max = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The max. + */ + @java.lang.Override + public double getMax() { + return max_; + } + + public static final int MEAN_FIELD_NUMBER = 4; + private double mean_ = 0D; + /** + * + * + *
+   * Output only. The arithmetic mean of the values in the population.
+   * 
+ * + * double mean = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The mean. + */ + @java.lang.Override + public double getMean() { + return mean_; + } + + public static final int MEDIAN_FIELD_NUMBER = 5; + private double median_ = 0D; + /** + * + * + *
+   * Output only. The median of the values in the population.
+   * 
+ * + * double median = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The median. + */ + @java.lang.Override + public double getMedian() { + return median_; + } + + public static final int P5_FIELD_NUMBER = 6; + private double p5_ = 0D; + /** + * + * + *
+   * Output only. The 5th percentile of the values in the population.
+   * 
+ * + * double p5 = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The p5. + */ + @java.lang.Override + public double getP5() { + return p5_; + } + + public static final int P95_FIELD_NUMBER = 7; + private double p95_ = 0D; + /** + * + * + *
+   * Output only. The 95th percentile of the values in the population.
+   * 
+ * + * double p95 = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The p95. + */ + @java.lang.Override + public double getP95() { + return p95_; + } + + public static final int BUCKETS_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket> + buckets_; + /** + * + * + *
+   * Output only. Defines the histogram bucket.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket buckets = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket> + getBucketsList() { + return buckets_; + } + /** + * + * + *
+   * Output only. Defines the histogram bucket.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket buckets = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution + .DatasetBucketOrBuilder> + getBucketsOrBuilderList() { + return buckets_; + } + /** + * + * + *
+   * Output only. Defines the histogram bucket.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket buckets = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getBucketsCount() { + return buckets_.size(); + } + /** + * + * + *
+   * Output only. Defines the histogram bucket.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket buckets = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket + getBuckets(int index) { + return buckets_.get(index); + } + /** + * + * + *
+   * Output only. Defines the histogram bucket.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket buckets = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucketOrBuilder + getBucketsOrBuilder(int index) { + return buckets_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (sum_ != 0L) { + output.writeInt64(1, sum_); + } + if (java.lang.Double.doubleToRawLongBits(min_) != 0) { + output.writeDouble(2, min_); + } + if (java.lang.Double.doubleToRawLongBits(max_) != 0) { + output.writeDouble(3, max_); + } + if (java.lang.Double.doubleToRawLongBits(mean_) != 0) { + output.writeDouble(4, mean_); + } + if (java.lang.Double.doubleToRawLongBits(median_) != 0) { + output.writeDouble(5, median_); + } + if (java.lang.Double.doubleToRawLongBits(p5_) != 0) { + output.writeDouble(6, p5_); + } + if (java.lang.Double.doubleToRawLongBits(p95_) != 0) { + output.writeDouble(7, p95_); + } + for (int i = 0; i < buckets_.size(); i++) { + output.writeMessage(8, buckets_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (sum_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, sum_); + } + if (java.lang.Double.doubleToRawLongBits(min_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(2, min_); + } + if (java.lang.Double.doubleToRawLongBits(max_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(3, max_); + } + if (java.lang.Double.doubleToRawLongBits(mean_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(4, mean_); + } + if (java.lang.Double.doubleToRawLongBits(median_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(5, median_); + } + if (java.lang.Double.doubleToRawLongBits(p5_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(6, p5_); + } + if (java.lang.Double.doubleToRawLongBits(p95_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(7, p95_); + } + for (int i = 0; i < buckets_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, buckets_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution other = + (com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution) obj; + + if (getSum() != other.getSum()) return false; + if (java.lang.Double.doubleToLongBits(getMin()) + != java.lang.Double.doubleToLongBits(other.getMin())) return false; + if (java.lang.Double.doubleToLongBits(getMax()) + != java.lang.Double.doubleToLongBits(other.getMax())) return false; + if (java.lang.Double.doubleToLongBits(getMean()) + != java.lang.Double.doubleToLongBits(other.getMean())) return false; + if (java.lang.Double.doubleToLongBits(getMedian()) + != java.lang.Double.doubleToLongBits(other.getMedian())) return false; + if (java.lang.Double.doubleToLongBits(getP5()) + != java.lang.Double.doubleToLongBits(other.getP5())) return false; + if (java.lang.Double.doubleToLongBits(getP95()) + != java.lang.Double.doubleToLongBits(other.getP95())) return false; + if (!getBucketsList().equals(other.getBucketsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SUM_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getSum()); + hash = (37 * hash) + MIN_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong(java.lang.Double.doubleToLongBits(getMin())); + hash = (37 * hash) + MAX_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong(java.lang.Double.doubleToLongBits(getMax())); + hash = (37 * hash) + MEAN_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong(java.lang.Double.doubleToLongBits(getMean())); + hash = (37 * hash) + MEDIAN_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong(java.lang.Double.doubleToLongBits(getMedian())); + hash = (37 * hash) + P5_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong(java.lang.Double.doubleToLongBits(getP5())); + hash = (37 * hash) + P95_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong(java.lang.Double.doubleToLongBits(getP95())); + if (getBucketsCount() > 0) { + hash = (37 * hash) + BUCKETS_FIELD_NUMBER; + hash = (53 * hash) + getBucketsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Dataset distribution for Supervised Tuning.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution) + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistributionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1_SupervisedTuningDatasetDistribution_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1_SupervisedTuningDatasetDistribution_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.class, + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + sum_ = 0L; + min_ = 0D; + max_ = 0D; + mean_ = 0D; + median_ = 0D; + p5_ = 0D; + p95_ = 0D; + if (bucketsBuilder_ == null) { + buckets_ = java.util.Collections.emptyList(); + } else { + buckets_ = null; + bucketsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000080); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1_SupervisedTuningDatasetDistribution_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution build() { + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution buildPartial() { + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution result = + new com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution result) { + if (bucketsBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0)) { + buckets_ = java.util.Collections.unmodifiableList(buckets_); + bitField0_ = (bitField0_ & ~0x00000080); + } + result.buckets_ = buckets_; + } else { + result.buckets_ = bucketsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.sum_ = sum_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.min_ = min_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.max_ = max_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.mean_ = mean_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.median_ = median_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.p5_ = p5_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.p95_ = p95_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution other) { + if (other + == com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution + .getDefaultInstance()) return this; + if (other.getSum() != 0L) { + setSum(other.getSum()); + } + if (other.getMin() != 0D) { + setMin(other.getMin()); + } + if (other.getMax() != 0D) { + setMax(other.getMax()); + } + if (other.getMean() != 0D) { + setMean(other.getMean()); + } + if (other.getMedian() != 0D) { + setMedian(other.getMedian()); + } + if (other.getP5() != 0D) { + setP5(other.getP5()); + } + if (other.getP95() != 0D) { + setP95(other.getP95()); + } + if (bucketsBuilder_ == null) { + if (!other.buckets_.isEmpty()) { + if (buckets_.isEmpty()) { + buckets_ = other.buckets_; + bitField0_ = (bitField0_ & ~0x00000080); + } else { + ensureBucketsIsMutable(); + buckets_.addAll(other.buckets_); + } + onChanged(); + } + } else { + if (!other.buckets_.isEmpty()) { + if (bucketsBuilder_.isEmpty()) { + bucketsBuilder_.dispose(); + bucketsBuilder_ = null; + buckets_ = other.buckets_; + bitField0_ = (bitField0_ & ~0x00000080); + bucketsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getBucketsFieldBuilder() + : null; + } else { + bucketsBuilder_.addAllMessages(other.buckets_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + sum_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 17: + { + min_ = input.readDouble(); + bitField0_ |= 0x00000002; + break; + } // case 17 + case 25: + { + max_ = input.readDouble(); + bitField0_ |= 0x00000004; + break; + } // case 25 + case 33: + { + mean_ = input.readDouble(); + bitField0_ |= 0x00000008; + break; + } // case 33 + case 41: + { + median_ = input.readDouble(); + bitField0_ |= 0x00000010; + break; + } // case 41 + case 49: + { + p5_ = input.readDouble(); + bitField0_ |= 0x00000020; + break; + } // case 49 + case 57: + { + p95_ = input.readDouble(); + bitField0_ |= 0x00000040; + break; + } // case 57 + case 66: + { + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket m = + input.readMessage( + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution + .DatasetBucket.parser(), + extensionRegistry); + if (bucketsBuilder_ == null) { + ensureBucketsIsMutable(); + buckets_.add(m); + } else { + bucketsBuilder_.addMessage(m); + } + break; + } // case 66 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private long sum_; + /** + * + * + *
+     * Output only. Sum of a given population of values.
+     * 
+ * + * int64 sum = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The sum. + */ + @java.lang.Override + public long getSum() { + return sum_; + } + /** + * + * + *
+     * Output only. Sum of a given population of values.
+     * 
+ * + * int64 sum = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The sum to set. + * @return This builder for chaining. + */ + public Builder setSum(long value) { + + sum_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Sum of a given population of values.
+     * 
+ * + * int64 sum = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearSum() { + bitField0_ = (bitField0_ & ~0x00000001); + sum_ = 0L; + onChanged(); + return this; + } + + private double min_; + /** + * + * + *
+     * Output only. The minimum of the population values.
+     * 
+ * + * double min = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The min. + */ + @java.lang.Override + public double getMin() { + return min_; + } + /** + * + * + *
+     * Output only. The minimum of the population values.
+     * 
+ * + * double min = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The min to set. + * @return This builder for chaining. + */ + public Builder setMin(double value) { + + min_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The minimum of the population values.
+     * 
+ * + * double min = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearMin() { + bitField0_ = (bitField0_ & ~0x00000002); + min_ = 0D; + onChanged(); + return this; + } + + private double max_; + /** + * + * + *
+     * Output only. The maximum of the population values.
+     * 
+ * + * double max = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The max. + */ + @java.lang.Override + public double getMax() { + return max_; + } + /** + * + * + *
+     * Output only. The maximum of the population values.
+     * 
+ * + * double max = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The max to set. + * @return This builder for chaining. + */ + public Builder setMax(double value) { + + max_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The maximum of the population values.
+     * 
+ * + * double max = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearMax() { + bitField0_ = (bitField0_ & ~0x00000004); + max_ = 0D; + onChanged(); + return this; + } + + private double mean_; + /** + * + * + *
+     * Output only. The arithmetic mean of the values in the population.
+     * 
+ * + * double mean = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The mean. + */ + @java.lang.Override + public double getMean() { + return mean_; + } + /** + * + * + *
+     * Output only. The arithmetic mean of the values in the population.
+     * 
+ * + * double mean = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The mean to set. + * @return This builder for chaining. + */ + public Builder setMean(double value) { + + mean_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The arithmetic mean of the values in the population.
+     * 
+ * + * double mean = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearMean() { + bitField0_ = (bitField0_ & ~0x00000008); + mean_ = 0D; + onChanged(); + return this; + } + + private double median_; + /** + * + * + *
+     * Output only. The median of the values in the population.
+     * 
+ * + * double median = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The median. + */ + @java.lang.Override + public double getMedian() { + return median_; + } + /** + * + * + *
+     * Output only. The median of the values in the population.
+     * 
+ * + * double median = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The median to set. + * @return This builder for chaining. + */ + public Builder setMedian(double value) { + + median_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The median of the values in the population.
+     * 
+ * + * double median = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearMedian() { + bitField0_ = (bitField0_ & ~0x00000010); + median_ = 0D; + onChanged(); + return this; + } + + private double p5_; + /** + * + * + *
+     * Output only. The 5th percentile of the values in the population.
+     * 
+ * + * double p5 = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The p5. + */ + @java.lang.Override + public double getP5() { + return p5_; + } + /** + * + * + *
+     * Output only. The 5th percentile of the values in the population.
+     * 
+ * + * double p5 = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The p5 to set. + * @return This builder for chaining. + */ + public Builder setP5(double value) { + + p5_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The 5th percentile of the values in the population.
+     * 
+ * + * double p5 = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearP5() { + bitField0_ = (bitField0_ & ~0x00000020); + p5_ = 0D; + onChanged(); + return this; + } + + private double p95_; + /** + * + * + *
+     * Output only. The 95th percentile of the values in the population.
+     * 
+ * + * double p95 = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The p95. + */ + @java.lang.Override + public double getP95() { + return p95_; + } + /** + * + * + *
+     * Output only. The 95th percentile of the values in the population.
+     * 
+ * + * double p95 = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The p95 to set. + * @return This builder for chaining. + */ + public Builder setP95(double value) { + + p95_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The 95th percentile of the values in the population.
+     * 
+ * + * double p95 = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearP95() { + bitField0_ = (bitField0_ & ~0x00000040); + p95_ = 0D; + onChanged(); + return this; + } + + private java.util.List< + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket> + buckets_ = java.util.Collections.emptyList(); + + private void ensureBucketsIsMutable() { + if (!((bitField0_ & 0x00000080) != 0)) { + buckets_ = + new java.util.ArrayList< + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket>( + buckets_); + bitField0_ |= 0x00000080; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket, + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket + .Builder, + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution + .DatasetBucketOrBuilder> + bucketsBuilder_; + + /** + * + * + *
+     * Output only. Defines the histogram bucket.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket buckets = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List< + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket> + getBucketsList() { + if (bucketsBuilder_ == null) { + return java.util.Collections.unmodifiableList(buckets_); + } else { + return bucketsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Output only. Defines the histogram bucket.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket buckets = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getBucketsCount() { + if (bucketsBuilder_ == null) { + return buckets_.size(); + } else { + return bucketsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Output only. Defines the histogram bucket.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket buckets = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket + getBuckets(int index) { + if (bucketsBuilder_ == null) { + return buckets_.get(index); + } else { + return bucketsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Output only. Defines the histogram bucket.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket buckets = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setBuckets( + int index, + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket value) { + if (bucketsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBucketsIsMutable(); + buckets_.set(index, value); + onChanged(); + } else { + bucketsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. Defines the histogram bucket.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket buckets = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setBuckets( + int index, + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket.Builder + builderForValue) { + if (bucketsBuilder_ == null) { + ensureBucketsIsMutable(); + buckets_.set(index, builderForValue.build()); + onChanged(); + } else { + bucketsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Defines the histogram bucket.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket buckets = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addBuckets( + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket value) { + if (bucketsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBucketsIsMutable(); + buckets_.add(value); + onChanged(); + } else { + bucketsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Output only. Defines the histogram bucket.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket buckets = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addBuckets( + int index, + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket value) { + if (bucketsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBucketsIsMutable(); + buckets_.add(index, value); + onChanged(); + } else { + bucketsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. Defines the histogram bucket.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket buckets = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addBuckets( + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket.Builder + builderForValue) { + if (bucketsBuilder_ == null) { + ensureBucketsIsMutable(); + buckets_.add(builderForValue.build()); + onChanged(); + } else { + bucketsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Defines the histogram bucket.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket buckets = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addBuckets( + int index, + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket.Builder + builderForValue) { + if (bucketsBuilder_ == null) { + ensureBucketsIsMutable(); + buckets_.add(index, builderForValue.build()); + onChanged(); + } else { + bucketsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Defines the histogram bucket.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket buckets = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllBuckets( + java.lang.Iterable< + ? extends + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution + .DatasetBucket> + values) { + if (bucketsBuilder_ == null) { + ensureBucketsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, buckets_); + onChanged(); + } else { + bucketsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Output only. Defines the histogram bucket.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket buckets = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearBuckets() { + if (bucketsBuilder_ == null) { + buckets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + } else { + bucketsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. Defines the histogram bucket.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket buckets = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeBuckets(int index) { + if (bucketsBuilder_ == null) { + ensureBucketsIsMutable(); + buckets_.remove(index); + onChanged(); + } else { + bucketsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Output only. Defines the histogram bucket.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket buckets = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket.Builder + getBucketsBuilder(int index) { + return getBucketsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Output only. Defines the histogram bucket.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket buckets = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucketOrBuilder + getBucketsOrBuilder(int index) { + if (bucketsBuilder_ == null) { + return buckets_.get(index); + } else { + return bucketsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Output only. Defines the histogram bucket.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket buckets = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List< + ? extends + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution + .DatasetBucketOrBuilder> + getBucketsOrBuilderList() { + if (bucketsBuilder_ != null) { + return bucketsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(buckets_); + } + } + /** + * + * + *
+     * Output only. Defines the histogram bucket.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket buckets = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket.Builder + addBucketsBuilder() { + return getBucketsFieldBuilder() + .addBuilder( + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket + .getDefaultInstance()); + } + /** + * + * + *
+     * Output only. Defines the histogram bucket.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket buckets = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket.Builder + addBucketsBuilder(int index) { + return getBucketsFieldBuilder() + .addBuilder( + index, + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket + .getDefaultInstance()); + } + /** + * + * + *
+     * Output only. Defines the histogram bucket.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket buckets = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List< + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket + .Builder> + getBucketsBuilderList() { + return getBucketsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket, + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket + .Builder, + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution + .DatasetBucketOrBuilder> + getBucketsFieldBuilder() { + if (bucketsBuilder_ == null) { + bucketsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket, + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket + .Builder, + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution + .DatasetBucketOrBuilder>( + buckets_, ((bitField0_ & 0x00000080) != 0), getParentForChildren(), isClean()); + buckets_ = null; + } + return bucketsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution) + private static final com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution(); + } + + public static com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SupervisedTuningDatasetDistribution parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SupervisedTuningDatasetDistributionOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SupervisedTuningDatasetDistributionOrBuilder.java new file mode 100644 index 000000000000..96a49a5190b0 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SupervisedTuningDatasetDistributionOrBuilder.java @@ -0,0 +1,185 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/tuning_job.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +public interface SupervisedTuningDatasetDistributionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Sum of a given population of values.
+   * 
+ * + * int64 sum = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The sum. + */ + long getSum(); + + /** + * + * + *
+   * Output only. The minimum of the population values.
+   * 
+ * + * double min = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The min. + */ + double getMin(); + + /** + * + * + *
+   * Output only. The maximum of the population values.
+   * 
+ * + * double max = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The max. + */ + double getMax(); + + /** + * + * + *
+   * Output only. The arithmetic mean of the values in the population.
+   * 
+ * + * double mean = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The mean. + */ + double getMean(); + + /** + * + * + *
+   * Output only. The median of the values in the population.
+   * 
+ * + * double median = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The median. + */ + double getMedian(); + + /** + * + * + *
+   * Output only. The 5th percentile of the values in the population.
+   * 
+ * + * double p5 = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The p5. + */ + double getP5(); + + /** + * + * + *
+   * Output only. The 95th percentile of the values in the population.
+   * 
+ * + * double p95 = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The p95. + */ + double getP95(); + + /** + * + * + *
+   * Output only. Defines the histogram bucket.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket buckets = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getBucketsList(); + /** + * + * + *
+   * Output only. Defines the histogram bucket.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket buckets = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket getBuckets( + int index); + /** + * + * + *
+   * Output only. Defines the histogram bucket.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket buckets = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getBucketsCount(); + /** + * + * + *
+   * Output only. Defines the histogram bucket.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket buckets = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List< + ? extends + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution + .DatasetBucketOrBuilder> + getBucketsOrBuilderList(); + /** + * + * + *
+   * Output only. Defines the histogram bucket.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket buckets = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucketOrBuilder + getBucketsOrBuilder(int index); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SupervisedTuningSpec.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SupervisedTuningSpec.java new file mode 100644 index 000000000000..18144b9ab21d --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SupervisedTuningSpec.java @@ -0,0 +1,1132 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/tuning_job.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Tuning Spec for Supervised Tuning.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.SupervisedTuningSpec} + */ +public final class SupervisedTuningSpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.SupervisedTuningSpec) + SupervisedTuningSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use SupervisedTuningSpec.newBuilder() to construct. + private SupervisedTuningSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SupervisedTuningSpec() { + trainingDatasetUri_ = ""; + validationDatasetUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SupervisedTuningSpec(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1_SupervisedTuningSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1_SupervisedTuningSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.SupervisedTuningSpec.class, + com.google.cloud.aiplatform.v1.SupervisedTuningSpec.Builder.class); + } + + private int bitField0_; + public static final int TRAINING_DATASET_URI_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object trainingDatasetUri_ = ""; + /** + * + * + *
+   * Required. Cloud Storage path to file containing training dataset for
+   * tuning.
+   * 
+ * + * string training_dataset_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The trainingDatasetUri. + */ + @java.lang.Override + public java.lang.String getTrainingDatasetUri() { + java.lang.Object ref = trainingDatasetUri_; + 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(); + trainingDatasetUri_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Cloud Storage path to file containing training dataset for
+   * tuning.
+   * 
+ * + * string training_dataset_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for trainingDatasetUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTrainingDatasetUriBytes() { + java.lang.Object ref = trainingDatasetUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + trainingDatasetUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALIDATION_DATASET_URI_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object validationDatasetUri_ = ""; + /** + * + * + *
+   * Optional. Cloud Storage path to file containing validation dataset for
+   * tuning.
+   * 
+ * + * string validation_dataset_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validationDatasetUri. + */ + @java.lang.Override + public java.lang.String getValidationDatasetUri() { + java.lang.Object ref = validationDatasetUri_; + 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(); + validationDatasetUri_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Cloud Storage path to file containing validation dataset for
+   * tuning.
+   * 
+ * + * string validation_dataset_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for validationDatasetUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getValidationDatasetUriBytes() { + java.lang.Object ref = validationDatasetUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + validationDatasetUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int HYPER_PARAMETERS_FIELD_NUMBER = 3; + private com.google.cloud.aiplatform.v1.SupervisedHyperParameters hyperParameters_; + /** + * + * + *
+   * Optional. Hyperparameters for SFT.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.SupervisedHyperParameters hyper_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the hyperParameters field is set. + */ + @java.lang.Override + public boolean hasHyperParameters() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Optional. Hyperparameters for SFT.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.SupervisedHyperParameters hyper_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The hyperParameters. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.SupervisedHyperParameters getHyperParameters() { + return hyperParameters_ == null + ? com.google.cloud.aiplatform.v1.SupervisedHyperParameters.getDefaultInstance() + : hyperParameters_; + } + /** + * + * + *
+   * Optional. Hyperparameters for SFT.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.SupervisedHyperParameters hyper_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.SupervisedHyperParametersOrBuilder + getHyperParametersOrBuilder() { + return hyperParameters_ == null + ? com.google.cloud.aiplatform.v1.SupervisedHyperParameters.getDefaultInstance() + : hyperParameters_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(trainingDatasetUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, trainingDatasetUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(validationDatasetUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, validationDatasetUri_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getHyperParameters()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(trainingDatasetUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, trainingDatasetUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(validationDatasetUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, validationDatasetUri_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getHyperParameters()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.SupervisedTuningSpec)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.SupervisedTuningSpec other = + (com.google.cloud.aiplatform.v1.SupervisedTuningSpec) obj; + + if (!getTrainingDatasetUri().equals(other.getTrainingDatasetUri())) return false; + if (!getValidationDatasetUri().equals(other.getValidationDatasetUri())) return false; + if (hasHyperParameters() != other.hasHyperParameters()) return false; + if (hasHyperParameters()) { + if (!getHyperParameters().equals(other.getHyperParameters())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TRAINING_DATASET_URI_FIELD_NUMBER; + hash = (53 * hash) + getTrainingDatasetUri().hashCode(); + hash = (37 * hash) + VALIDATION_DATASET_URI_FIELD_NUMBER; + hash = (53 * hash) + getValidationDatasetUri().hashCode(); + if (hasHyperParameters()) { + hash = (37 * hash) + HYPER_PARAMETERS_FIELD_NUMBER; + hash = (53 * hash) + getHyperParameters().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.SupervisedTuningSpec parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.SupervisedTuningSpec parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.SupervisedTuningSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.SupervisedTuningSpec parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.SupervisedTuningSpec parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.SupervisedTuningSpec parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.SupervisedTuningSpec parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.SupervisedTuningSpec parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.SupervisedTuningSpec parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.SupervisedTuningSpec parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.SupervisedTuningSpec parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.SupervisedTuningSpec parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.aiplatform.v1.SupervisedTuningSpec prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Tuning Spec for Supervised Tuning.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.SupervisedTuningSpec} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.SupervisedTuningSpec) + com.google.cloud.aiplatform.v1.SupervisedTuningSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1_SupervisedTuningSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1_SupervisedTuningSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.SupervisedTuningSpec.class, + com.google.cloud.aiplatform.v1.SupervisedTuningSpec.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.SupervisedTuningSpec.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getHyperParametersFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + trainingDatasetUri_ = ""; + validationDatasetUri_ = ""; + hyperParameters_ = null; + if (hyperParametersBuilder_ != null) { + hyperParametersBuilder_.dispose(); + hyperParametersBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1_SupervisedTuningSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.SupervisedTuningSpec getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.SupervisedTuningSpec.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.SupervisedTuningSpec build() { + com.google.cloud.aiplatform.v1.SupervisedTuningSpec result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.SupervisedTuningSpec buildPartial() { + com.google.cloud.aiplatform.v1.SupervisedTuningSpec result = + new com.google.cloud.aiplatform.v1.SupervisedTuningSpec(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.SupervisedTuningSpec result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.trainingDatasetUri_ = trainingDatasetUri_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.validationDatasetUri_ = validationDatasetUri_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.hyperParameters_ = + hyperParametersBuilder_ == null ? hyperParameters_ : hyperParametersBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.SupervisedTuningSpec) { + return mergeFrom((com.google.cloud.aiplatform.v1.SupervisedTuningSpec) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.SupervisedTuningSpec other) { + if (other == com.google.cloud.aiplatform.v1.SupervisedTuningSpec.getDefaultInstance()) + return this; + if (!other.getTrainingDatasetUri().isEmpty()) { + trainingDatasetUri_ = other.trainingDatasetUri_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getValidationDatasetUri().isEmpty()) { + validationDatasetUri_ = other.validationDatasetUri_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasHyperParameters()) { + mergeHyperParameters(other.getHyperParameters()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + trainingDatasetUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + validationDatasetUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getHyperParametersFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object trainingDatasetUri_ = ""; + /** + * + * + *
+     * Required. Cloud Storage path to file containing training dataset for
+     * tuning.
+     * 
+ * + * string training_dataset_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The trainingDatasetUri. + */ + public java.lang.String getTrainingDatasetUri() { + java.lang.Object ref = trainingDatasetUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + trainingDatasetUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Cloud Storage path to file containing training dataset for
+     * tuning.
+     * 
+ * + * string training_dataset_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for trainingDatasetUri. + */ + public com.google.protobuf.ByteString getTrainingDatasetUriBytes() { + java.lang.Object ref = trainingDatasetUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + trainingDatasetUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Cloud Storage path to file containing training dataset for
+     * tuning.
+     * 
+ * + * string training_dataset_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The trainingDatasetUri to set. + * @return This builder for chaining. + */ + public Builder setTrainingDatasetUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + trainingDatasetUri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Cloud Storage path to file containing training dataset for
+     * tuning.
+     * 
+ * + * string training_dataset_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearTrainingDatasetUri() { + trainingDatasetUri_ = getDefaultInstance().getTrainingDatasetUri(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Cloud Storage path to file containing training dataset for
+     * tuning.
+     * 
+ * + * string training_dataset_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for trainingDatasetUri to set. + * @return This builder for chaining. + */ + public Builder setTrainingDatasetUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + trainingDatasetUri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object validationDatasetUri_ = ""; + /** + * + * + *
+     * Optional. Cloud Storage path to file containing validation dataset for
+     * tuning.
+     * 
+ * + * string validation_dataset_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validationDatasetUri. + */ + public java.lang.String getValidationDatasetUri() { + java.lang.Object ref = validationDatasetUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + validationDatasetUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Cloud Storage path to file containing validation dataset for
+     * tuning.
+     * 
+ * + * string validation_dataset_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for validationDatasetUri. + */ + public com.google.protobuf.ByteString getValidationDatasetUriBytes() { + java.lang.Object ref = validationDatasetUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + validationDatasetUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Cloud Storage path to file containing validation dataset for
+     * tuning.
+     * 
+ * + * string validation_dataset_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The validationDatasetUri to set. + * @return This builder for chaining. + */ + public Builder setValidationDatasetUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + validationDatasetUri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Cloud Storage path to file containing validation dataset for
+     * tuning.
+     * 
+ * + * string validation_dataset_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearValidationDatasetUri() { + validationDatasetUri_ = getDefaultInstance().getValidationDatasetUri(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Cloud Storage path to file containing validation dataset for
+     * tuning.
+     * 
+ * + * string validation_dataset_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for validationDatasetUri to set. + * @return This builder for chaining. + */ + public Builder setValidationDatasetUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + validationDatasetUri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.aiplatform.v1.SupervisedHyperParameters hyperParameters_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.SupervisedHyperParameters, + com.google.cloud.aiplatform.v1.SupervisedHyperParameters.Builder, + com.google.cloud.aiplatform.v1.SupervisedHyperParametersOrBuilder> + hyperParametersBuilder_; + /** + * + * + *
+     * Optional. Hyperparameters for SFT.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.SupervisedHyperParameters hyper_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the hyperParameters field is set. + */ + public boolean hasHyperParameters() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Optional. Hyperparameters for SFT.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.SupervisedHyperParameters hyper_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The hyperParameters. + */ + public com.google.cloud.aiplatform.v1.SupervisedHyperParameters getHyperParameters() { + if (hyperParametersBuilder_ == null) { + return hyperParameters_ == null + ? com.google.cloud.aiplatform.v1.SupervisedHyperParameters.getDefaultInstance() + : hyperParameters_; + } else { + return hyperParametersBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Hyperparameters for SFT.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.SupervisedHyperParameters hyper_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setHyperParameters( + com.google.cloud.aiplatform.v1.SupervisedHyperParameters value) { + if (hyperParametersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + hyperParameters_ = value; + } else { + hyperParametersBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Hyperparameters for SFT.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.SupervisedHyperParameters hyper_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setHyperParameters( + com.google.cloud.aiplatform.v1.SupervisedHyperParameters.Builder builderForValue) { + if (hyperParametersBuilder_ == null) { + hyperParameters_ = builderForValue.build(); + } else { + hyperParametersBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Hyperparameters for SFT.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.SupervisedHyperParameters hyper_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeHyperParameters( + com.google.cloud.aiplatform.v1.SupervisedHyperParameters value) { + if (hyperParametersBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && hyperParameters_ != null + && hyperParameters_ + != com.google.cloud.aiplatform.v1.SupervisedHyperParameters.getDefaultInstance()) { + getHyperParametersBuilder().mergeFrom(value); + } else { + hyperParameters_ = value; + } + } else { + hyperParametersBuilder_.mergeFrom(value); + } + if (hyperParameters_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Optional. Hyperparameters for SFT.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.SupervisedHyperParameters hyper_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearHyperParameters() { + bitField0_ = (bitField0_ & ~0x00000004); + hyperParameters_ = null; + if (hyperParametersBuilder_ != null) { + hyperParametersBuilder_.dispose(); + hyperParametersBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Hyperparameters for SFT.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.SupervisedHyperParameters hyper_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1.SupervisedHyperParameters.Builder + getHyperParametersBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getHyperParametersFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Hyperparameters for SFT.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.SupervisedHyperParameters hyper_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1.SupervisedHyperParametersOrBuilder + getHyperParametersOrBuilder() { + if (hyperParametersBuilder_ != null) { + return hyperParametersBuilder_.getMessageOrBuilder(); + } else { + return hyperParameters_ == null + ? com.google.cloud.aiplatform.v1.SupervisedHyperParameters.getDefaultInstance() + : hyperParameters_; + } + } + /** + * + * + *
+     * Optional. Hyperparameters for SFT.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.SupervisedHyperParameters hyper_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.SupervisedHyperParameters, + com.google.cloud.aiplatform.v1.SupervisedHyperParameters.Builder, + com.google.cloud.aiplatform.v1.SupervisedHyperParametersOrBuilder> + getHyperParametersFieldBuilder() { + if (hyperParametersBuilder_ == null) { + hyperParametersBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.SupervisedHyperParameters, + com.google.cloud.aiplatform.v1.SupervisedHyperParameters.Builder, + com.google.cloud.aiplatform.v1.SupervisedHyperParametersOrBuilder>( + getHyperParameters(), getParentForChildren(), isClean()); + hyperParameters_ = null; + } + return hyperParametersBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.SupervisedTuningSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.SupervisedTuningSpec) + private static final com.google.cloud.aiplatform.v1.SupervisedTuningSpec DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.SupervisedTuningSpec(); + } + + public static com.google.cloud.aiplatform.v1.SupervisedTuningSpec getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SupervisedTuningSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.SupervisedTuningSpec getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SupervisedTuningSpecOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SupervisedTuningSpecOrBuilder.java new file mode 100644 index 000000000000..6178fb74dfdc --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SupervisedTuningSpecOrBuilder.java @@ -0,0 +1,121 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/tuning_job.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +public interface SupervisedTuningSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.SupervisedTuningSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Cloud Storage path to file containing training dataset for
+   * tuning.
+   * 
+ * + * string training_dataset_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The trainingDatasetUri. + */ + java.lang.String getTrainingDatasetUri(); + /** + * + * + *
+   * Required. Cloud Storage path to file containing training dataset for
+   * tuning.
+   * 
+ * + * string training_dataset_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for trainingDatasetUri. + */ + com.google.protobuf.ByteString getTrainingDatasetUriBytes(); + + /** + * + * + *
+   * Optional. Cloud Storage path to file containing validation dataset for
+   * tuning.
+   * 
+ * + * string validation_dataset_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validationDatasetUri. + */ + java.lang.String getValidationDatasetUri(); + /** + * + * + *
+   * Optional. Cloud Storage path to file containing validation dataset for
+   * tuning.
+   * 
+ * + * string validation_dataset_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for validationDatasetUri. + */ + com.google.protobuf.ByteString getValidationDatasetUriBytes(); + + /** + * + * + *
+   * Optional. Hyperparameters for SFT.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.SupervisedHyperParameters hyper_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the hyperParameters field is set. + */ + boolean hasHyperParameters(); + /** + * + * + *
+   * Optional. Hyperparameters for SFT.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.SupervisedHyperParameters hyper_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The hyperParameters. + */ + com.google.cloud.aiplatform.v1.SupervisedHyperParameters getHyperParameters(); + /** + * + * + *
+   * Optional. Hyperparameters for SFT.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.SupervisedHyperParameters hyper_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.aiplatform.v1.SupervisedHyperParametersOrBuilder getHyperParametersOrBuilder(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ResponseRecallInstance.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TunedModel.java similarity index 54% rename from java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ResponseRecallInstance.java rename to java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TunedModel.java index cf52fec9c86e..3e442cabd638 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ResponseRecallInstance.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TunedModel.java @@ -14,96 +14,84 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/aiplatform/v1beta1/evaluation_service.proto +// source: google/cloud/aiplatform/v1/tuning_job.proto // Protobuf Java Version: 3.25.2 -package com.google.cloud.aiplatform.v1beta1; +package com.google.cloud.aiplatform.v1; /** * * *
- * Spec for response recall instance.
+ * The Model Registry Model and Online Prediction Endpoint assiociated with
+ * this [TuningJob][google.cloud.aiplatform.v1.TuningJob].
  * 
* - * Protobuf type {@code google.cloud.aiplatform.v1beta1.ResponseRecallInstance} + * Protobuf type {@code google.cloud.aiplatform.v1.TunedModel} */ -public final class ResponseRecallInstance extends com.google.protobuf.GeneratedMessageV3 +public final class TunedModel extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.ResponseRecallInstance) - ResponseRecallInstanceOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.TunedModel) + TunedModelOrBuilder { private static final long serialVersionUID = 0L; - // Use ResponseRecallInstance.newBuilder() to construct. - private ResponseRecallInstance(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use TunedModel.newBuilder() to construct. + private TunedModel(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private ResponseRecallInstance() { - prediction_ = ""; - reference_ = ""; + private TunedModel() { + model_ = ""; + endpoint_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ResponseRecallInstance(); + return new TunedModel(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.aiplatform.v1beta1.EvaluationServiceProto - .internal_static_google_cloud_aiplatform_v1beta1_ResponseRecallInstance_descriptor; + return com.google.cloud.aiplatform.v1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1_TunedModel_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.aiplatform.v1beta1.EvaluationServiceProto - .internal_static_google_cloud_aiplatform_v1beta1_ResponseRecallInstance_fieldAccessorTable + return com.google.cloud.aiplatform.v1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1_TunedModel_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.aiplatform.v1beta1.ResponseRecallInstance.class, - com.google.cloud.aiplatform.v1beta1.ResponseRecallInstance.Builder.class); + com.google.cloud.aiplatform.v1.TunedModel.class, + com.google.cloud.aiplatform.v1.TunedModel.Builder.class); } - private int bitField0_; - public static final int PREDICTION_FIELD_NUMBER = 1; + public static final int MODEL_FIELD_NUMBER = 1; @SuppressWarnings("serial") - private volatile java.lang.Object prediction_ = ""; + private volatile java.lang.Object model_ = ""; /** * * *
-   * Required. Output of the evaluated model.
+   * Output only. The resource name of the TunedModel. Format:
+   * `projects/{project}/locations/{location}/models/{model}`.
    * 
* - * optional string prediction = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string model = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * * - * @return Whether the prediction field is set. + * @return The model. */ @java.lang.Override - public boolean hasPrediction() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * - * - *
-   * Required. Output of the evaluated model.
-   * 
- * - * optional string prediction = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The prediction. - */ - @java.lang.Override - public java.lang.String getPrediction() { - java.lang.Object ref = prediction_; + public java.lang.String getModel() { + java.lang.Object ref = model_; 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(); - prediction_ = s; + model_ = s; return s; } } @@ -111,65 +99,56 @@ public java.lang.String getPrediction() { * * *
-   * Required. Output of the evaluated model.
+   * Output only. The resource name of the TunedModel. Format:
+   * `projects/{project}/locations/{location}/models/{model}`.
    * 
* - * optional string prediction = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string model = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * * - * @return The bytes for prediction. + * @return The bytes for model. */ @java.lang.Override - public com.google.protobuf.ByteString getPredictionBytes() { - java.lang.Object ref = prediction_; + public com.google.protobuf.ByteString getModelBytes() { + java.lang.Object ref = model_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - prediction_ = b; + model_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - public static final int REFERENCE_FIELD_NUMBER = 2; + public static final int ENDPOINT_FIELD_NUMBER = 2; @SuppressWarnings("serial") - private volatile java.lang.Object reference_ = ""; + private volatile java.lang.Object endpoint_ = ""; /** * * *
-   * Required. Ground truth used to compare against the prediction.
+   * Output only. A resource name of an Endpoint. Format:
+   * `projects/{project}/locations/{location}/endpoints/{endpoint}`.
    * 
* - * optional string reference = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * string endpoint = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * * - * @return Whether the reference field is set. + * @return The endpoint. */ @java.lang.Override - public boolean hasReference() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * - * - *
-   * Required. Ground truth used to compare against the prediction.
-   * 
- * - * optional string reference = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The reference. - */ - @java.lang.Override - public java.lang.String getReference() { - java.lang.Object ref = reference_; + public java.lang.String getEndpoint() { + java.lang.Object ref = endpoint_; 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(); - reference_ = s; + endpoint_ = s; return s; } } @@ -177,20 +156,23 @@ public java.lang.String getReference() { * * *
-   * Required. Ground truth used to compare against the prediction.
+   * Output only. A resource name of an Endpoint. Format:
+   * `projects/{project}/locations/{location}/endpoints/{endpoint}`.
    * 
* - * optional string reference = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * string endpoint = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * * - * @return The bytes for reference. + * @return The bytes for endpoint. */ @java.lang.Override - public com.google.protobuf.ByteString getReferenceBytes() { - java.lang.Object ref = reference_; + public com.google.protobuf.ByteString getEndpointBytes() { + java.lang.Object ref = endpoint_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - reference_ = b; + endpoint_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -211,11 +193,11 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, prediction_); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, model_); } - if (((bitField0_ & 0x00000002) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, reference_); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpoint_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, endpoint_); } getUnknownFields().writeTo(output); } @@ -226,11 +208,11 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, prediction_); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, model_); } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, reference_); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpoint_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, endpoint_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -242,20 +224,14 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.ResponseRecallInstance)) { + if (!(obj instanceof com.google.cloud.aiplatform.v1.TunedModel)) { return super.equals(obj); } - com.google.cloud.aiplatform.v1beta1.ResponseRecallInstance other = - (com.google.cloud.aiplatform.v1beta1.ResponseRecallInstance) obj; + com.google.cloud.aiplatform.v1.TunedModel other = + (com.google.cloud.aiplatform.v1.TunedModel) obj; - if (hasPrediction() != other.hasPrediction()) return false; - if (hasPrediction()) { - if (!getPrediction().equals(other.getPrediction())) return false; - } - if (hasReference() != other.hasReference()) return false; - if (hasReference()) { - if (!getReference().equals(other.getReference())) return false; - } + if (!getModel().equals(other.getModel())) return false; + if (!getEndpoint().equals(other.getEndpoint())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -267,84 +243,80 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (hasPrediction()) { - hash = (37 * hash) + PREDICTION_FIELD_NUMBER; - hash = (53 * hash) + getPrediction().hashCode(); - } - if (hasReference()) { - hash = (37 * hash) + REFERENCE_FIELD_NUMBER; - hash = (53 * hash) + getReference().hashCode(); - } + hash = (37 * hash) + MODEL_FIELD_NUMBER; + hash = (53 * hash) + getModel().hashCode(); + hash = (37 * hash) + ENDPOINT_FIELD_NUMBER; + hash = (53 * hash) + getEndpoint().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.cloud.aiplatform.v1beta1.ResponseRecallInstance parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.cloud.aiplatform.v1.TunedModel parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.aiplatform.v1beta1.ResponseRecallInstance parseFrom( + public static com.google.cloud.aiplatform.v1.TunedModel parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.aiplatform.v1beta1.ResponseRecallInstance parseFrom( + public static com.google.cloud.aiplatform.v1.TunedModel parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.aiplatform.v1beta1.ResponseRecallInstance parseFrom( + public static com.google.cloud.aiplatform.v1.TunedModel parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.aiplatform.v1beta1.ResponseRecallInstance parseFrom(byte[] data) + public static com.google.cloud.aiplatform.v1.TunedModel parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.aiplatform.v1beta1.ResponseRecallInstance parseFrom( + public static com.google.cloud.aiplatform.v1.TunedModel parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.aiplatform.v1beta1.ResponseRecallInstance parseFrom( - java.io.InputStream input) throws java.io.IOException { + public static com.google.cloud.aiplatform.v1.TunedModel parseFrom(java.io.InputStream input) + throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.aiplatform.v1beta1.ResponseRecallInstance parseFrom( + public static com.google.cloud.aiplatform.v1.TunedModel parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.aiplatform.v1beta1.ResponseRecallInstance parseDelimitedFrom( + public static com.google.cloud.aiplatform.v1.TunedModel parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.aiplatform.v1beta1.ResponseRecallInstance parseDelimitedFrom( + public static com.google.cloud.aiplatform.v1.TunedModel parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.aiplatform.v1beta1.ResponseRecallInstance parseFrom( + public static com.google.cloud.aiplatform.v1.TunedModel parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.aiplatform.v1beta1.ResponseRecallInstance parseFrom( + public static com.google.cloud.aiplatform.v1.TunedModel parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -361,8 +333,7 @@ public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder( - com.google.cloud.aiplatform.v1beta1.ResponseRecallInstance prototype) { + public static Builder newBuilder(com.google.cloud.aiplatform.v1.TunedModel prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -380,31 +351,32 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Spec for response recall instance.
+   * The Model Registry Model and Online Prediction Endpoint assiociated with
+   * this [TuningJob][google.cloud.aiplatform.v1.TuningJob].
    * 
* - * Protobuf type {@code google.cloud.aiplatform.v1beta1.ResponseRecallInstance} + * Protobuf type {@code google.cloud.aiplatform.v1.TunedModel} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.ResponseRecallInstance) - com.google.cloud.aiplatform.v1beta1.ResponseRecallInstanceOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.TunedModel) + com.google.cloud.aiplatform.v1.TunedModelOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.aiplatform.v1beta1.EvaluationServiceProto - .internal_static_google_cloud_aiplatform_v1beta1_ResponseRecallInstance_descriptor; + return com.google.cloud.aiplatform.v1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1_TunedModel_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.aiplatform.v1beta1.EvaluationServiceProto - .internal_static_google_cloud_aiplatform_v1beta1_ResponseRecallInstance_fieldAccessorTable + return com.google.cloud.aiplatform.v1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1_TunedModel_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.aiplatform.v1beta1.ResponseRecallInstance.class, - com.google.cloud.aiplatform.v1beta1.ResponseRecallInstance.Builder.class); + com.google.cloud.aiplatform.v1.TunedModel.class, + com.google.cloud.aiplatform.v1.TunedModel.Builder.class); } - // Construct using com.google.cloud.aiplatform.v1beta1.ResponseRecallInstance.newBuilder() + // Construct using com.google.cloud.aiplatform.v1.TunedModel.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { @@ -415,25 +387,25 @@ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { public Builder clear() { super.clear(); bitField0_ = 0; - prediction_ = ""; - reference_ = ""; + model_ = ""; + endpoint_ = ""; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.aiplatform.v1beta1.EvaluationServiceProto - .internal_static_google_cloud_aiplatform_v1beta1_ResponseRecallInstance_descriptor; + return com.google.cloud.aiplatform.v1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1_TunedModel_descriptor; } @java.lang.Override - public com.google.cloud.aiplatform.v1beta1.ResponseRecallInstance getDefaultInstanceForType() { - return com.google.cloud.aiplatform.v1beta1.ResponseRecallInstance.getDefaultInstance(); + public com.google.cloud.aiplatform.v1.TunedModel getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.TunedModel.getDefaultInstance(); } @java.lang.Override - public com.google.cloud.aiplatform.v1beta1.ResponseRecallInstance build() { - com.google.cloud.aiplatform.v1beta1.ResponseRecallInstance result = buildPartial(); + public com.google.cloud.aiplatform.v1.TunedModel build() { + com.google.cloud.aiplatform.v1.TunedModel result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -441,9 +413,9 @@ public com.google.cloud.aiplatform.v1beta1.ResponseRecallInstance build() { } @java.lang.Override - public com.google.cloud.aiplatform.v1beta1.ResponseRecallInstance buildPartial() { - com.google.cloud.aiplatform.v1beta1.ResponseRecallInstance result = - new com.google.cloud.aiplatform.v1beta1.ResponseRecallInstance(this); + public com.google.cloud.aiplatform.v1.TunedModel buildPartial() { + com.google.cloud.aiplatform.v1.TunedModel result = + new com.google.cloud.aiplatform.v1.TunedModel(this); if (bitField0_ != 0) { buildPartial0(result); } @@ -451,18 +423,14 @@ public com.google.cloud.aiplatform.v1beta1.ResponseRecallInstance buildPartial() return result; } - private void buildPartial0(com.google.cloud.aiplatform.v1beta1.ResponseRecallInstance result) { + private void buildPartial0(com.google.cloud.aiplatform.v1.TunedModel result) { int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { - result.prediction_ = prediction_; - to_bitField0_ |= 0x00000001; + result.model_ = model_; } if (((from_bitField0_ & 0x00000002) != 0)) { - result.reference_ = reference_; - to_bitField0_ |= 0x00000002; + result.endpoint_ = endpoint_; } - result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -500,24 +468,23 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.aiplatform.v1beta1.ResponseRecallInstance) { - return mergeFrom((com.google.cloud.aiplatform.v1beta1.ResponseRecallInstance) other); + if (other instanceof com.google.cloud.aiplatform.v1.TunedModel) { + return mergeFrom((com.google.cloud.aiplatform.v1.TunedModel) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.ResponseRecallInstance other) { - if (other == com.google.cloud.aiplatform.v1beta1.ResponseRecallInstance.getDefaultInstance()) - return this; - if (other.hasPrediction()) { - prediction_ = other.prediction_; + public Builder mergeFrom(com.google.cloud.aiplatform.v1.TunedModel other) { + if (other == com.google.cloud.aiplatform.v1.TunedModel.getDefaultInstance()) return this; + if (!other.getModel().isEmpty()) { + model_ = other.model_; bitField0_ |= 0x00000001; onChanged(); } - if (other.hasReference()) { - reference_ = other.reference_; + if (!other.getEndpoint().isEmpty()) { + endpoint_ = other.endpoint_; bitField0_ |= 0x00000002; onChanged(); } @@ -549,13 +516,13 @@ public Builder mergeFrom( break; case 10: { - prediction_ = input.readStringRequireUtf8(); + model_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 case 18: { - reference_ = input.readStringRequireUtf8(); + endpoint_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000002; break; } // case 18 @@ -578,38 +545,27 @@ public Builder mergeFrom( private int bitField0_; - private java.lang.Object prediction_ = ""; + private java.lang.Object model_ = ""; /** * * *
-     * Required. Output of the evaluated model.
+     * Output only. The resource name of the TunedModel. Format:
+     * `projects/{project}/locations/{location}/models/{model}`.
      * 
* - * optional string prediction = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string model = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * * - * @return Whether the prediction field is set. + * @return The model. */ - public boolean hasPrediction() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * - * - *
-     * Required. Output of the evaluated model.
-     * 
- * - * optional string prediction = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The prediction. - */ - public java.lang.String getPrediction() { - java.lang.Object ref = prediction_; + public java.lang.String getModel() { + java.lang.Object ref = model_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - prediction_ = s; + model_ = s; return s; } else { return (java.lang.String) ref; @@ -619,19 +575,22 @@ public java.lang.String getPrediction() { * * *
-     * Required. Output of the evaluated model.
+     * Output only. The resource name of the TunedModel. Format:
+     * `projects/{project}/locations/{location}/models/{model}`.
      * 
* - * optional string prediction = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string model = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * * - * @return The bytes for prediction. + * @return The bytes for model. */ - public com.google.protobuf.ByteString getPredictionBytes() { - java.lang.Object ref = prediction_; + public com.google.protobuf.ByteString getModelBytes() { + java.lang.Object ref = model_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - prediction_ = b; + model_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -641,19 +600,22 @@ public com.google.protobuf.ByteString getPredictionBytes() { * * *
-     * Required. Output of the evaluated model.
+     * Output only. The resource name of the TunedModel. Format:
+     * `projects/{project}/locations/{location}/models/{model}`.
      * 
* - * optional string prediction = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string model = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * * - * @param value The prediction to set. + * @param value The model to set. * @return This builder for chaining. */ - public Builder setPrediction(java.lang.String value) { + public Builder setModel(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - prediction_ = value; + model_ = value; bitField0_ |= 0x00000001; onChanged(); return this; @@ -662,15 +624,18 @@ public Builder setPrediction(java.lang.String value) { * * *
-     * Required. Output of the evaluated model.
+     * Output only. The resource name of the TunedModel. Format:
+     * `projects/{project}/locations/{location}/models/{model}`.
      * 
* - * optional string prediction = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string model = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * * * @return This builder for chaining. */ - public Builder clearPrediction() { - prediction_ = getDefaultInstance().getPrediction(); + public Builder clearModel() { + model_ = getDefaultInstance().getModel(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; @@ -679,57 +644,49 @@ public Builder clearPrediction() { * * *
-     * Required. Output of the evaluated model.
+     * Output only. The resource name of the TunedModel. Format:
+     * `projects/{project}/locations/{location}/models/{model}`.
      * 
* - * optional string prediction = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string model = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * * - * @param value The bytes for prediction to set. + * @param value The bytes for model to set. * @return This builder for chaining. */ - public Builder setPredictionBytes(com.google.protobuf.ByteString value) { + public Builder setModelBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); - prediction_ = value; + model_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } - private java.lang.Object reference_ = ""; - /** - * - * - *
-     * Required. Ground truth used to compare against the prediction.
-     * 
- * - * optional string reference = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return Whether the reference field is set. - */ - public boolean hasReference() { - return ((bitField0_ & 0x00000002) != 0); - } + private java.lang.Object endpoint_ = ""; /** * * *
-     * Required. Ground truth used to compare against the prediction.
+     * Output only. A resource name of an Endpoint. Format:
+     * `projects/{project}/locations/{location}/endpoints/{endpoint}`.
      * 
* - * optional string reference = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * string endpoint = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * * - * @return The reference. + * @return The endpoint. */ - public java.lang.String getReference() { - java.lang.Object ref = reference_; + public java.lang.String getEndpoint() { + java.lang.Object ref = endpoint_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - reference_ = s; + endpoint_ = s; return s; } else { return (java.lang.String) ref; @@ -739,19 +696,22 @@ public java.lang.String getReference() { * * *
-     * Required. Ground truth used to compare against the prediction.
+     * Output only. A resource name of an Endpoint. Format:
+     * `projects/{project}/locations/{location}/endpoints/{endpoint}`.
      * 
* - * optional string reference = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * string endpoint = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * * - * @return The bytes for reference. + * @return The bytes for endpoint. */ - public com.google.protobuf.ByteString getReferenceBytes() { - java.lang.Object ref = reference_; + public com.google.protobuf.ByteString getEndpointBytes() { + java.lang.Object ref = endpoint_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - reference_ = b; + endpoint_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -761,19 +721,22 @@ public com.google.protobuf.ByteString getReferenceBytes() { * * *
-     * Required. Ground truth used to compare against the prediction.
+     * Output only. A resource name of an Endpoint. Format:
+     * `projects/{project}/locations/{location}/endpoints/{endpoint}`.
      * 
* - * optional string reference = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * string endpoint = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * * - * @param value The reference to set. + * @param value The endpoint to set. * @return This builder for chaining. */ - public Builder setReference(java.lang.String value) { + public Builder setEndpoint(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - reference_ = value; + endpoint_ = value; bitField0_ |= 0x00000002; onChanged(); return this; @@ -782,15 +745,18 @@ public Builder setReference(java.lang.String value) { * * *
-     * Required. Ground truth used to compare against the prediction.
+     * Output only. A resource name of an Endpoint. Format:
+     * `projects/{project}/locations/{location}/endpoints/{endpoint}`.
      * 
* - * optional string reference = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * string endpoint = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * * * @return This builder for chaining. */ - public Builder clearReference() { - reference_ = getDefaultInstance().getReference(); + public Builder clearEndpoint() { + endpoint_ = getDefaultInstance().getEndpoint(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; @@ -799,20 +765,23 @@ public Builder clearReference() { * * *
-     * Required. Ground truth used to compare against the prediction.
+     * Output only. A resource name of an Endpoint. Format:
+     * `projects/{project}/locations/{location}/endpoints/{endpoint}`.
      * 
* - * optional string reference = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * string endpoint = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * * - * @param value The bytes for reference to set. + * @param value The bytes for endpoint to set. * @return This builder for chaining. */ - public Builder setReferenceBytes(com.google.protobuf.ByteString value) { + public Builder setEndpointBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); - reference_ = value; + endpoint_ = value; bitField0_ |= 0x00000002; onChanged(); return this; @@ -829,24 +798,24 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.ResponseRecallInstance) + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.TunedModel) } - // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.ResponseRecallInstance) - private static final com.google.cloud.aiplatform.v1beta1.ResponseRecallInstance DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.TunedModel) + private static final com.google.cloud.aiplatform.v1.TunedModel DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.ResponseRecallInstance(); + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.TunedModel(); } - public static com.google.cloud.aiplatform.v1beta1.ResponseRecallInstance getDefaultInstance() { + public static com.google.cloud.aiplatform.v1.TunedModel getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public ResponseRecallInstance parsePartialFrom( + public TunedModel parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -865,17 +834,17 @@ public ResponseRecallInstance parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.cloud.aiplatform.v1beta1.ResponseRecallInstance getDefaultInstanceForType() { + public com.google.cloud.aiplatform.v1.TunedModel getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TunedModelOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TunedModelOrBuilder.java new file mode 100644 index 000000000000..f83f75a27cf4 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TunedModelOrBuilder.java @@ -0,0 +1,88 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/tuning_job.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +public interface TunedModelOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.TunedModel) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The resource name of the TunedModel. Format:
+   * `projects/{project}/locations/{location}/models/{model}`.
+   * 
+ * + * + * string model = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The model. + */ + java.lang.String getModel(); + /** + * + * + *
+   * Output only. The resource name of the TunedModel. Format:
+   * `projects/{project}/locations/{location}/models/{model}`.
+   * 
+ * + * + * string model = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for model. + */ + com.google.protobuf.ByteString getModelBytes(); + + /** + * + * + *
+   * Output only. A resource name of an Endpoint. Format:
+   * `projects/{project}/locations/{location}/endpoints/{endpoint}`.
+   * 
+ * + * + * string endpoint = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The endpoint. + */ + java.lang.String getEndpoint(); + /** + * + * + *
+   * Output only. A resource name of an Endpoint. Format:
+   * `projects/{project}/locations/{location}/endpoints/{endpoint}`.
+   * 
+ * + * + * string endpoint = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for endpoint. + */ + com.google.protobuf.ByteString getEndpointBytes(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TuningDataStats.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TuningDataStats.java new file mode 100644 index 000000000000..00fe91f1052f --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TuningDataStats.java @@ -0,0 +1,840 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/tuning_job.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * The tuning data statistic values for
+ * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.TuningDataStats} + */ +public final class TuningDataStats extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.TuningDataStats) + TuningDataStatsOrBuilder { + private static final long serialVersionUID = 0L; + // Use TuningDataStats.newBuilder() to construct. + private TuningDataStats(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TuningDataStats() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TuningDataStats(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1_TuningDataStats_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1_TuningDataStats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.TuningDataStats.class, + com.google.cloud.aiplatform.v1.TuningDataStats.Builder.class); + } + + private int tuningDataStatsCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object tuningDataStats_; + + public enum TuningDataStatsCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + SUPERVISED_TUNING_DATA_STATS(1), + TUNINGDATASTATS_NOT_SET(0); + private final int value; + + private TuningDataStatsCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TuningDataStatsCase valueOf(int value) { + return forNumber(value); + } + + public static TuningDataStatsCase forNumber(int value) { + switch (value) { + case 1: + return SUPERVISED_TUNING_DATA_STATS; + case 0: + return TUNINGDATASTATS_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public TuningDataStatsCase getTuningDataStatsCase() { + return TuningDataStatsCase.forNumber(tuningDataStatsCase_); + } + + public static final int SUPERVISED_TUNING_DATA_STATS_FIELD_NUMBER = 1; + /** + * + * + *
+   * The SFT Tuning data stats.
+   * 
+ * + * .google.cloud.aiplatform.v1.SupervisedTuningDataStats supervised_tuning_data_stats = 1; + * + * + * @return Whether the supervisedTuningDataStats field is set. + */ + @java.lang.Override + public boolean hasSupervisedTuningDataStats() { + return tuningDataStatsCase_ == 1; + } + /** + * + * + *
+   * The SFT Tuning data stats.
+   * 
+ * + * .google.cloud.aiplatform.v1.SupervisedTuningDataStats supervised_tuning_data_stats = 1; + * + * + * @return The supervisedTuningDataStats. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.SupervisedTuningDataStats getSupervisedTuningDataStats() { + if (tuningDataStatsCase_ == 1) { + return (com.google.cloud.aiplatform.v1.SupervisedTuningDataStats) tuningDataStats_; + } + return com.google.cloud.aiplatform.v1.SupervisedTuningDataStats.getDefaultInstance(); + } + /** + * + * + *
+   * The SFT Tuning data stats.
+   * 
+ * + * .google.cloud.aiplatform.v1.SupervisedTuningDataStats supervised_tuning_data_stats = 1; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.SupervisedTuningDataStatsOrBuilder + getSupervisedTuningDataStatsOrBuilder() { + if (tuningDataStatsCase_ == 1) { + return (com.google.cloud.aiplatform.v1.SupervisedTuningDataStats) tuningDataStats_; + } + return com.google.cloud.aiplatform.v1.SupervisedTuningDataStats.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (tuningDataStatsCase_ == 1) { + output.writeMessage( + 1, (com.google.cloud.aiplatform.v1.SupervisedTuningDataStats) tuningDataStats_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (tuningDataStatsCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.cloud.aiplatform.v1.SupervisedTuningDataStats) tuningDataStats_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.TuningDataStats)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.TuningDataStats other = + (com.google.cloud.aiplatform.v1.TuningDataStats) obj; + + if (!getTuningDataStatsCase().equals(other.getTuningDataStatsCase())) return false; + switch (tuningDataStatsCase_) { + case 1: + if (!getSupervisedTuningDataStats().equals(other.getSupervisedTuningDataStats())) + return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (tuningDataStatsCase_) { + case 1: + hash = (37 * hash) + SUPERVISED_TUNING_DATA_STATS_FIELD_NUMBER; + hash = (53 * hash) + getSupervisedTuningDataStats().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.TuningDataStats parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.TuningDataStats parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.TuningDataStats parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.TuningDataStats parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.TuningDataStats parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.TuningDataStats parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.TuningDataStats parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.TuningDataStats parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.TuningDataStats parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.TuningDataStats parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.TuningDataStats parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.TuningDataStats parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.aiplatform.v1.TuningDataStats prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The tuning data statistic values for
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.TuningDataStats} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.TuningDataStats) + com.google.cloud.aiplatform.v1.TuningDataStatsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1_TuningDataStats_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1_TuningDataStats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.TuningDataStats.class, + com.google.cloud.aiplatform.v1.TuningDataStats.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.TuningDataStats.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (supervisedTuningDataStatsBuilder_ != null) { + supervisedTuningDataStatsBuilder_.clear(); + } + tuningDataStatsCase_ = 0; + tuningDataStats_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1_TuningDataStats_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.TuningDataStats getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.TuningDataStats.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.TuningDataStats build() { + com.google.cloud.aiplatform.v1.TuningDataStats result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.TuningDataStats buildPartial() { + com.google.cloud.aiplatform.v1.TuningDataStats result = + new com.google.cloud.aiplatform.v1.TuningDataStats(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.TuningDataStats result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.aiplatform.v1.TuningDataStats result) { + result.tuningDataStatsCase_ = tuningDataStatsCase_; + result.tuningDataStats_ = this.tuningDataStats_; + if (tuningDataStatsCase_ == 1 && supervisedTuningDataStatsBuilder_ != null) { + result.tuningDataStats_ = supervisedTuningDataStatsBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.TuningDataStats) { + return mergeFrom((com.google.cloud.aiplatform.v1.TuningDataStats) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.TuningDataStats other) { + if (other == com.google.cloud.aiplatform.v1.TuningDataStats.getDefaultInstance()) return this; + switch (other.getTuningDataStatsCase()) { + case SUPERVISED_TUNING_DATA_STATS: + { + mergeSupervisedTuningDataStats(other.getSupervisedTuningDataStats()); + break; + } + case TUNINGDATASTATS_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + getSupervisedTuningDataStatsFieldBuilder().getBuilder(), extensionRegistry); + tuningDataStatsCase_ = 1; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int tuningDataStatsCase_ = 0; + private java.lang.Object tuningDataStats_; + + public TuningDataStatsCase getTuningDataStatsCase() { + return TuningDataStatsCase.forNumber(tuningDataStatsCase_); + } + + public Builder clearTuningDataStats() { + tuningDataStatsCase_ = 0; + tuningDataStats_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.SupervisedTuningDataStats, + com.google.cloud.aiplatform.v1.SupervisedTuningDataStats.Builder, + com.google.cloud.aiplatform.v1.SupervisedTuningDataStatsOrBuilder> + supervisedTuningDataStatsBuilder_; + /** + * + * + *
+     * The SFT Tuning data stats.
+     * 
+ * + * .google.cloud.aiplatform.v1.SupervisedTuningDataStats supervised_tuning_data_stats = 1; + * + * + * @return Whether the supervisedTuningDataStats field is set. + */ + @java.lang.Override + public boolean hasSupervisedTuningDataStats() { + return tuningDataStatsCase_ == 1; + } + /** + * + * + *
+     * The SFT Tuning data stats.
+     * 
+ * + * .google.cloud.aiplatform.v1.SupervisedTuningDataStats supervised_tuning_data_stats = 1; + * + * + * @return The supervisedTuningDataStats. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.SupervisedTuningDataStats getSupervisedTuningDataStats() { + if (supervisedTuningDataStatsBuilder_ == null) { + if (tuningDataStatsCase_ == 1) { + return (com.google.cloud.aiplatform.v1.SupervisedTuningDataStats) tuningDataStats_; + } + return com.google.cloud.aiplatform.v1.SupervisedTuningDataStats.getDefaultInstance(); + } else { + if (tuningDataStatsCase_ == 1) { + return supervisedTuningDataStatsBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1.SupervisedTuningDataStats.getDefaultInstance(); + } + } + /** + * + * + *
+     * The SFT Tuning data stats.
+     * 
+ * + * .google.cloud.aiplatform.v1.SupervisedTuningDataStats supervised_tuning_data_stats = 1; + * + */ + public Builder setSupervisedTuningDataStats( + com.google.cloud.aiplatform.v1.SupervisedTuningDataStats value) { + if (supervisedTuningDataStatsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + tuningDataStats_ = value; + onChanged(); + } else { + supervisedTuningDataStatsBuilder_.setMessage(value); + } + tuningDataStatsCase_ = 1; + return this; + } + /** + * + * + *
+     * The SFT Tuning data stats.
+     * 
+ * + * .google.cloud.aiplatform.v1.SupervisedTuningDataStats supervised_tuning_data_stats = 1; + * + */ + public Builder setSupervisedTuningDataStats( + com.google.cloud.aiplatform.v1.SupervisedTuningDataStats.Builder builderForValue) { + if (supervisedTuningDataStatsBuilder_ == null) { + tuningDataStats_ = builderForValue.build(); + onChanged(); + } else { + supervisedTuningDataStatsBuilder_.setMessage(builderForValue.build()); + } + tuningDataStatsCase_ = 1; + return this; + } + /** + * + * + *
+     * The SFT Tuning data stats.
+     * 
+ * + * .google.cloud.aiplatform.v1.SupervisedTuningDataStats supervised_tuning_data_stats = 1; + * + */ + public Builder mergeSupervisedTuningDataStats( + com.google.cloud.aiplatform.v1.SupervisedTuningDataStats value) { + if (supervisedTuningDataStatsBuilder_ == null) { + if (tuningDataStatsCase_ == 1 + && tuningDataStats_ + != com.google.cloud.aiplatform.v1.SupervisedTuningDataStats.getDefaultInstance()) { + tuningDataStats_ = + com.google.cloud.aiplatform.v1.SupervisedTuningDataStats.newBuilder( + (com.google.cloud.aiplatform.v1.SupervisedTuningDataStats) tuningDataStats_) + .mergeFrom(value) + .buildPartial(); + } else { + tuningDataStats_ = value; + } + onChanged(); + } else { + if (tuningDataStatsCase_ == 1) { + supervisedTuningDataStatsBuilder_.mergeFrom(value); + } else { + supervisedTuningDataStatsBuilder_.setMessage(value); + } + } + tuningDataStatsCase_ = 1; + return this; + } + /** + * + * + *
+     * The SFT Tuning data stats.
+     * 
+ * + * .google.cloud.aiplatform.v1.SupervisedTuningDataStats supervised_tuning_data_stats = 1; + * + */ + public Builder clearSupervisedTuningDataStats() { + if (supervisedTuningDataStatsBuilder_ == null) { + if (tuningDataStatsCase_ == 1) { + tuningDataStatsCase_ = 0; + tuningDataStats_ = null; + onChanged(); + } + } else { + if (tuningDataStatsCase_ == 1) { + tuningDataStatsCase_ = 0; + tuningDataStats_ = null; + } + supervisedTuningDataStatsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The SFT Tuning data stats.
+     * 
+ * + * .google.cloud.aiplatform.v1.SupervisedTuningDataStats supervised_tuning_data_stats = 1; + * + */ + public com.google.cloud.aiplatform.v1.SupervisedTuningDataStats.Builder + getSupervisedTuningDataStatsBuilder() { + return getSupervisedTuningDataStatsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The SFT Tuning data stats.
+     * 
+ * + * .google.cloud.aiplatform.v1.SupervisedTuningDataStats supervised_tuning_data_stats = 1; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.SupervisedTuningDataStatsOrBuilder + getSupervisedTuningDataStatsOrBuilder() { + if ((tuningDataStatsCase_ == 1) && (supervisedTuningDataStatsBuilder_ != null)) { + return supervisedTuningDataStatsBuilder_.getMessageOrBuilder(); + } else { + if (tuningDataStatsCase_ == 1) { + return (com.google.cloud.aiplatform.v1.SupervisedTuningDataStats) tuningDataStats_; + } + return com.google.cloud.aiplatform.v1.SupervisedTuningDataStats.getDefaultInstance(); + } + } + /** + * + * + *
+     * The SFT Tuning data stats.
+     * 
+ * + * .google.cloud.aiplatform.v1.SupervisedTuningDataStats supervised_tuning_data_stats = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.SupervisedTuningDataStats, + com.google.cloud.aiplatform.v1.SupervisedTuningDataStats.Builder, + com.google.cloud.aiplatform.v1.SupervisedTuningDataStatsOrBuilder> + getSupervisedTuningDataStatsFieldBuilder() { + if (supervisedTuningDataStatsBuilder_ == null) { + if (!(tuningDataStatsCase_ == 1)) { + tuningDataStats_ = + com.google.cloud.aiplatform.v1.SupervisedTuningDataStats.getDefaultInstance(); + } + supervisedTuningDataStatsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.SupervisedTuningDataStats, + com.google.cloud.aiplatform.v1.SupervisedTuningDataStats.Builder, + com.google.cloud.aiplatform.v1.SupervisedTuningDataStatsOrBuilder>( + (com.google.cloud.aiplatform.v1.SupervisedTuningDataStats) tuningDataStats_, + getParentForChildren(), + isClean()); + tuningDataStats_ = null; + } + tuningDataStatsCase_ = 1; + onChanged(); + return supervisedTuningDataStatsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.TuningDataStats) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.TuningDataStats) + private static final com.google.cloud.aiplatform.v1.TuningDataStats DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.TuningDataStats(); + } + + public static com.google.cloud.aiplatform.v1.TuningDataStats getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TuningDataStats parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.TuningDataStats getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TuningDataStatsOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TuningDataStatsOrBuilder.java new file mode 100644 index 000000000000..53ecdc4cefc3 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TuningDataStatsOrBuilder.java @@ -0,0 +1,67 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/tuning_job.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +public interface TuningDataStatsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.TuningDataStats) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The SFT Tuning data stats.
+   * 
+ * + * .google.cloud.aiplatform.v1.SupervisedTuningDataStats supervised_tuning_data_stats = 1; + * + * + * @return Whether the supervisedTuningDataStats field is set. + */ + boolean hasSupervisedTuningDataStats(); + /** + * + * + *
+   * The SFT Tuning data stats.
+   * 
+ * + * .google.cloud.aiplatform.v1.SupervisedTuningDataStats supervised_tuning_data_stats = 1; + * + * + * @return The supervisedTuningDataStats. + */ + com.google.cloud.aiplatform.v1.SupervisedTuningDataStats getSupervisedTuningDataStats(); + /** + * + * + *
+   * The SFT Tuning data stats.
+   * 
+ * + * .google.cloud.aiplatform.v1.SupervisedTuningDataStats supervised_tuning_data_stats = 1; + * + */ + com.google.cloud.aiplatform.v1.SupervisedTuningDataStatsOrBuilder + getSupervisedTuningDataStatsOrBuilder(); + + com.google.cloud.aiplatform.v1.TuningDataStats.TuningDataStatsCase getTuningDataStatsCase(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TuningJob.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TuningJob.java new file mode 100644 index 000000000000..c39d6863ca59 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TuningJob.java @@ -0,0 +1,4608 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/tuning_job.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Represents a TuningJob that runs with Google owned models.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.TuningJob} + */ +public final class TuningJob extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.TuningJob) + TuningJobOrBuilder { + private static final long serialVersionUID = 0L; + // Use TuningJob.newBuilder() to construct. + private TuningJob(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TuningJob() { + name_ = ""; + tunedModelDisplayName_ = ""; + description_ = ""; + state_ = 0; + experiment_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TuningJob(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1_TuningJob_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 12: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1_TuningJob_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.TuningJob.class, + com.google.cloud.aiplatform.v1.TuningJob.Builder.class); + } + + private int bitField0_; + private int sourceModelCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object sourceModel_; + + public enum SourceModelCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + BASE_MODEL(4), + SOURCEMODEL_NOT_SET(0); + private final int value; + + private SourceModelCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static SourceModelCase valueOf(int value) { + return forNumber(value); + } + + public static SourceModelCase forNumber(int value) { + switch (value) { + case 4: + return BASE_MODEL; + case 0: + return SOURCEMODEL_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public SourceModelCase getSourceModelCase() { + return SourceModelCase.forNumber(sourceModelCase_); + } + + private int tuningSpecCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object tuningSpec_; + + public enum TuningSpecCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + SUPERVISED_TUNING_SPEC(5), + TUNINGSPEC_NOT_SET(0); + private final int value; + + private TuningSpecCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TuningSpecCase valueOf(int value) { + return forNumber(value); + } + + public static TuningSpecCase forNumber(int value) { + switch (value) { + case 5: + return SUPERVISED_TUNING_SPEC; + case 0: + return TUNINGSPEC_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public TuningSpecCase getTuningSpecCase() { + return TuningSpecCase.forNumber(tuningSpecCase_); + } + + public static final int BASE_MODEL_FIELD_NUMBER = 4; + /** + * + * + *
+   * Model name for tuning, e.g., "gemini-1.0-pro-002".
+   * 
+ * + * string base_model = 4; + * + * @return Whether the baseModel field is set. + */ + public boolean hasBaseModel() { + return sourceModelCase_ == 4; + } + /** + * + * + *
+   * Model name for tuning, e.g., "gemini-1.0-pro-002".
+   * 
+ * + * string base_model = 4; + * + * @return The baseModel. + */ + public java.lang.String getBaseModel() { + java.lang.Object ref = ""; + if (sourceModelCase_ == 4) { + ref = sourceModel_; + } + 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(); + if (sourceModelCase_ == 4) { + sourceModel_ = s; + } + return s; + } + } + /** + * + * + *
+   * Model name for tuning, e.g., "gemini-1.0-pro-002".
+   * 
+ * + * string base_model = 4; + * + * @return The bytes for baseModel. + */ + public com.google.protobuf.ByteString getBaseModelBytes() { + java.lang.Object ref = ""; + if (sourceModelCase_ == 4) { + ref = sourceModel_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (sourceModelCase_ == 4) { + sourceModel_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SUPERVISED_TUNING_SPEC_FIELD_NUMBER = 5; + /** + * + * + *
+   * Tuning Spec for Supervised Fine Tuning.
+   * 
+ * + * .google.cloud.aiplatform.v1.SupervisedTuningSpec supervised_tuning_spec = 5; + * + * @return Whether the supervisedTuningSpec field is set. + */ + @java.lang.Override + public boolean hasSupervisedTuningSpec() { + return tuningSpecCase_ == 5; + } + /** + * + * + *
+   * Tuning Spec for Supervised Fine Tuning.
+   * 
+ * + * .google.cloud.aiplatform.v1.SupervisedTuningSpec supervised_tuning_spec = 5; + * + * @return The supervisedTuningSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.SupervisedTuningSpec getSupervisedTuningSpec() { + if (tuningSpecCase_ == 5) { + return (com.google.cloud.aiplatform.v1.SupervisedTuningSpec) tuningSpec_; + } + return com.google.cloud.aiplatform.v1.SupervisedTuningSpec.getDefaultInstance(); + } + /** + * + * + *
+   * Tuning Spec for Supervised Fine Tuning.
+   * 
+ * + * .google.cloud.aiplatform.v1.SupervisedTuningSpec supervised_tuning_spec = 5; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.SupervisedTuningSpecOrBuilder + getSupervisedTuningSpecOrBuilder() { + if (tuningSpecCase_ == 5) { + return (com.google.cloud.aiplatform.v1.SupervisedTuningSpec) tuningSpec_; + } + return com.google.cloud.aiplatform.v1.SupervisedTuningSpec.getDefaultInstance(); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Output only. Identifier. Resource name of a TuningJob. Format:
+   * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Identifier. Resource name of a TuningJob. Format:
+   * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TUNED_MODEL_DISPLAY_NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object tunedModelDisplayName_ = ""; + /** + * + * + *
+   * Optional. The display name of the
+   * [TunedModel][google.cloud.aiplatform.v1.Model]. The name can be up to
+   * 128 characters long and can consist of any UTF-8 characters.
+   * 
+ * + * string tuned_model_display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The tunedModelDisplayName. + */ + @java.lang.Override + public java.lang.String getTunedModelDisplayName() { + java.lang.Object ref = tunedModelDisplayName_; + 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(); + tunedModelDisplayName_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The display name of the
+   * [TunedModel][google.cloud.aiplatform.v1.Model]. The name can be up to
+   * 128 characters long and can consist of any UTF-8 characters.
+   * 
+ * + * string tuned_model_display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for tunedModelDisplayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTunedModelDisplayNameBytes() { + java.lang.Object ref = tunedModelDisplayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tunedModelDisplayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + * + * + *
+   * Optional. The description of the
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + 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(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The description of the
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATE_FIELD_NUMBER = 6; + private int state_ = 0; + /** + * + * + *
+   * Output only. The detailed state of the job.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.JobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * Output only. The detailed state of the job.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.JobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.JobState getState() { + com.google.cloud.aiplatform.v1.JobState result = + com.google.cloud.aiplatform.v1.JobState.forNumber(state_); + return result == null ? com.google.cloud.aiplatform.v1.JobState.UNRECOGNIZED : result; + } + + public static final int CREATE_TIME_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. Time when the
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob] was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Output only. Time when the
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob] was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. Time when the
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob] was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int START_TIME_FIELD_NUMBER = 8; + private com.google.protobuf.Timestamp startTime_; + /** + * + * + *
+   * Output only. Time when the
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob] for the first time
+   * entered the `JOB_STATE_RUNNING` state.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Output only. Time when the
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob] for the first time
+   * entered the `JOB_STATE_RUNNING` state.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + /** + * + * + *
+   * Output only. Time when the
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob] for the first time
+   * entered the `JOB_STATE_RUNNING` state.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + + public static final int END_TIME_FIELD_NUMBER = 9; + private com.google.protobuf.Timestamp endTime_; + /** + * + * + *
+   * Output only. Time when the TuningJob entered any of the following
+   * [JobStates][google.cloud.aiplatform.v1.JobState]: `JOB_STATE_SUCCEEDED`,
+   * `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`, `JOB_STATE_EXPIRED`.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+   * Output only. Time when the TuningJob entered any of the following
+   * [JobStates][google.cloud.aiplatform.v1.JobState]: `JOB_STATE_SUCCEEDED`,
+   * `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`, `JOB_STATE_EXPIRED`.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + * + * + *
+   * Output only. Time when the TuningJob entered any of the following
+   * [JobStates][google.cloud.aiplatform.v1.JobState]: `JOB_STATE_SUCCEEDED`,
+   * `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`, `JOB_STATE_EXPIRED`.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 10; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. Time when the
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob] was most recently
+   * updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+   * Output only. Time when the
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob] was most recently
+   * updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. Time when the
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob] was most recently
+   * updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int ERROR_FIELD_NUMBER = 11; + private com.google.rpc.Status error_; + /** + * + * + *
+   * Output only. Only populated when job's state is `JOB_STATE_FAILED` or
+   * `JOB_STATE_CANCELLED`.
+   * 
+ * + * .google.rpc.Status error = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the error field is set. + */ + @java.lang.Override + public boolean hasError() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+   * Output only. Only populated when job's state is `JOB_STATE_FAILED` or
+   * `JOB_STATE_CANCELLED`.
+   * 
+ * + * .google.rpc.Status error = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The error. + */ + @java.lang.Override + public com.google.rpc.Status getError() { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } + /** + * + * + *
+   * Output only. Only populated when job's state is `JOB_STATE_FAILED` or
+   * `JOB_STATE_CANCELLED`.
+   * 
+ * + * .google.rpc.Status error = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } + + public static final int LABELS_FIELD_NUMBER = 12; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.aiplatform.v1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1_TuningJob_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * Optional. The labels with user-defined metadata to organize
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob] and generated resources
+   * such as [Model][google.cloud.aiplatform.v1.Model] and
+   * [Endpoint][google.cloud.aiplatform.v1.Endpoint].
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   *
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * Optional. The labels with user-defined metadata to organize
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob] and generated resources
+   * such as [Model][google.cloud.aiplatform.v1.Model] and
+   * [Endpoint][google.cloud.aiplatform.v1.Endpoint].
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   *
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Optional. The labels with user-defined metadata to organize
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob] and generated resources
+   * such as [Model][google.cloud.aiplatform.v1.Model] and
+   * [Endpoint][google.cloud.aiplatform.v1.Endpoint].
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   *
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Optional. The labels with user-defined metadata to organize
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob] and generated resources
+   * such as [Model][google.cloud.aiplatform.v1.Model] and
+   * [Endpoint][google.cloud.aiplatform.v1.Endpoint].
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   *
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int EXPERIMENT_FIELD_NUMBER = 13; + + @SuppressWarnings("serial") + private volatile java.lang.Object experiment_ = ""; + /** + * + * + *
+   * Output only. The Experiment associated with this
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+   * 
+ * + * + * string experiment = 13 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The experiment. + */ + @java.lang.Override + public java.lang.String getExperiment() { + java.lang.Object ref = experiment_; + 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(); + experiment_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The Experiment associated with this
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+   * 
+ * + * + * string experiment = 13 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for experiment. + */ + @java.lang.Override + public com.google.protobuf.ByteString getExperimentBytes() { + java.lang.Object ref = experiment_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + experiment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TUNED_MODEL_FIELD_NUMBER = 14; + private com.google.cloud.aiplatform.v1.TunedModel tunedModel_; + /** + * + * + *
+   * Output only. The tuned model resources assiociated with this
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+   * 
+ * + * + * .google.cloud.aiplatform.v1.TunedModel tuned_model = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the tunedModel field is set. + */ + @java.lang.Override + public boolean hasTunedModel() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+   * Output only. The tuned model resources assiociated with this
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+   * 
+ * + * + * .google.cloud.aiplatform.v1.TunedModel tuned_model = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The tunedModel. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.TunedModel getTunedModel() { + return tunedModel_ == null + ? com.google.cloud.aiplatform.v1.TunedModel.getDefaultInstance() + : tunedModel_; + } + /** + * + * + *
+   * Output only. The tuned model resources assiociated with this
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+   * 
+ * + * + * .google.cloud.aiplatform.v1.TunedModel tuned_model = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.TunedModelOrBuilder getTunedModelOrBuilder() { + return tunedModel_ == null + ? com.google.cloud.aiplatform.v1.TunedModel.getDefaultInstance() + : tunedModel_; + } + + public static final int TUNING_DATA_STATS_FIELD_NUMBER = 15; + private com.google.cloud.aiplatform.v1.TuningDataStats tuningDataStats_; + /** + * + * + *
+   * Output only. The tuning data statistics associated with this
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+   * 
+ * + * + * .google.cloud.aiplatform.v1.TuningDataStats tuning_data_stats = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the tuningDataStats field is set. + */ + @java.lang.Override + public boolean hasTuningDataStats() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+   * Output only. The tuning data statistics associated with this
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+   * 
+ * + * + * .google.cloud.aiplatform.v1.TuningDataStats tuning_data_stats = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The tuningDataStats. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.TuningDataStats getTuningDataStats() { + return tuningDataStats_ == null + ? com.google.cloud.aiplatform.v1.TuningDataStats.getDefaultInstance() + : tuningDataStats_; + } + /** + * + * + *
+   * Output only. The tuning data statistics associated with this
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+   * 
+ * + * + * .google.cloud.aiplatform.v1.TuningDataStats tuning_data_stats = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.TuningDataStatsOrBuilder getTuningDataStatsOrBuilder() { + return tuningDataStats_ == null + ? com.google.cloud.aiplatform.v1.TuningDataStats.getDefaultInstance() + : tuningDataStats_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tunedModelDisplayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, tunedModelDisplayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + if (sourceModelCase_ == 4) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, sourceModel_); + } + if (tuningSpecCase_ == 5) { + output.writeMessage(5, (com.google.cloud.aiplatform.v1.SupervisedTuningSpec) tuningSpec_); + } + if (state_ != com.google.cloud.aiplatform.v1.JobState.JOB_STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(6, state_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(7, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(8, getStartTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(9, getEndTime()); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(10, getUpdateTime()); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeMessage(11, getError()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 12); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(experiment_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 13, experiment_); + } + if (((bitField0_ & 0x00000020) != 0)) { + output.writeMessage(14, getTunedModel()); + } + if (((bitField0_ & 0x00000040) != 0)) { + output.writeMessage(15, getTuningDataStats()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tunedModelDisplayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, tunedModelDisplayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + if (sourceModelCase_ == 4) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, sourceModel_); + } + if (tuningSpecCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, (com.google.cloud.aiplatform.v1.SupervisedTuningSpec) tuningSpec_); + } + if (state_ != com.google.cloud.aiplatform.v1.JobState.JOB_STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, state_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getStartTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getEndTime()); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getUpdateTime()); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getError()); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, labels__); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(experiment_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, experiment_); + } + if (((bitField0_ & 0x00000020) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, getTunedModel()); + } + if (((bitField0_ & 0x00000040) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(15, getTuningDataStats()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.TuningJob)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.TuningJob other = (com.google.cloud.aiplatform.v1.TuningJob) obj; + + if (!getName().equals(other.getName())) return false; + if (!getTunedModelDisplayName().equals(other.getTunedModelDisplayName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (state_ != other.state_) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasStartTime() != other.hasStartTime()) return false; + if (hasStartTime()) { + if (!getStartTime().equals(other.getStartTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (hasError() != other.hasError()) return false; + if (hasError()) { + if (!getError().equals(other.getError())) return false; + } + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (!getExperiment().equals(other.getExperiment())) return false; + if (hasTunedModel() != other.hasTunedModel()) return false; + if (hasTunedModel()) { + if (!getTunedModel().equals(other.getTunedModel())) return false; + } + if (hasTuningDataStats() != other.hasTuningDataStats()) return false; + if (hasTuningDataStats()) { + if (!getTuningDataStats().equals(other.getTuningDataStats())) return false; + } + if (!getSourceModelCase().equals(other.getSourceModelCase())) return false; + switch (sourceModelCase_) { + case 4: + if (!getBaseModel().equals(other.getBaseModel())) return false; + break; + case 0: + default: + } + if (!getTuningSpecCase().equals(other.getTuningSpecCase())) return false; + switch (tuningSpecCase_) { + case 5: + if (!getSupervisedTuningSpec().equals(other.getSupervisedTuningSpec())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + TUNED_MODEL_DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getTunedModelDisplayName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (hasError()) { + hash = (37 * hash) + ERROR_FIELD_NUMBER; + hash = (53 * hash) + getError().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (37 * hash) + EXPERIMENT_FIELD_NUMBER; + hash = (53 * hash) + getExperiment().hashCode(); + if (hasTunedModel()) { + hash = (37 * hash) + TUNED_MODEL_FIELD_NUMBER; + hash = (53 * hash) + getTunedModel().hashCode(); + } + if (hasTuningDataStats()) { + hash = (37 * hash) + TUNING_DATA_STATS_FIELD_NUMBER; + hash = (53 * hash) + getTuningDataStats().hashCode(); + } + switch (sourceModelCase_) { + case 4: + hash = (37 * hash) + BASE_MODEL_FIELD_NUMBER; + hash = (53 * hash) + getBaseModel().hashCode(); + break; + case 0: + default: + } + switch (tuningSpecCase_) { + case 5: + hash = (37 * hash) + SUPERVISED_TUNING_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getSupervisedTuningSpec().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.TuningJob parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.TuningJob parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.TuningJob parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.TuningJob parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.TuningJob parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.TuningJob parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.TuningJob parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.TuningJob parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.TuningJob parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.TuningJob parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.TuningJob parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.TuningJob parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.aiplatform.v1.TuningJob prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Represents a TuningJob that runs with Google owned models.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.TuningJob} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.TuningJob) + com.google.cloud.aiplatform.v1.TuningJobOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1_TuningJob_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 12: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 12: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1_TuningJob_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.TuningJob.class, + com.google.cloud.aiplatform.v1.TuningJob.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.TuningJob.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getCreateTimeFieldBuilder(); + getStartTimeFieldBuilder(); + getEndTimeFieldBuilder(); + getUpdateTimeFieldBuilder(); + getErrorFieldBuilder(); + getTunedModelFieldBuilder(); + getTuningDataStatsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (supervisedTuningSpecBuilder_ != null) { + supervisedTuningSpecBuilder_.clear(); + } + name_ = ""; + tunedModelDisplayName_ = ""; + description_ = ""; + state_ = 0; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + error_ = null; + if (errorBuilder_ != null) { + errorBuilder_.dispose(); + errorBuilder_ = null; + } + internalGetMutableLabels().clear(); + experiment_ = ""; + tunedModel_ = null; + if (tunedModelBuilder_ != null) { + tunedModelBuilder_.dispose(); + tunedModelBuilder_ = null; + } + tuningDataStats_ = null; + if (tuningDataStatsBuilder_ != null) { + tuningDataStatsBuilder_.dispose(); + tuningDataStatsBuilder_ = null; + } + sourceModelCase_ = 0; + sourceModel_ = null; + tuningSpecCase_ = 0; + tuningSpec_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1_TuningJob_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.TuningJob getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.TuningJob.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.TuningJob build() { + com.google.cloud.aiplatform.v1.TuningJob result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.TuningJob buildPartial() { + com.google.cloud.aiplatform.v1.TuningJob result = + new com.google.cloud.aiplatform.v1.TuningJob(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.TuningJob result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.tunedModelDisplayName_ = tunedModelDisplayName_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.state_ = state_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000040) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.startTime_ = startTimeBuilder_ == null ? startTime_ : startTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.endTime_ = endTimeBuilder_ == null ? endTime_ : endTimeBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.error_ = errorBuilder_ == null ? error_ : errorBuilder_.build(); + to_bitField0_ |= 0x00000010; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.experiment_ = experiment_; + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.tunedModel_ = tunedModelBuilder_ == null ? tunedModel_ : tunedModelBuilder_.build(); + to_bitField0_ |= 0x00000020; + } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.tuningDataStats_ = + tuningDataStatsBuilder_ == null ? tuningDataStats_ : tuningDataStatsBuilder_.build(); + to_bitField0_ |= 0x00000040; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.aiplatform.v1.TuningJob result) { + result.sourceModelCase_ = sourceModelCase_; + result.sourceModel_ = this.sourceModel_; + result.tuningSpecCase_ = tuningSpecCase_; + result.tuningSpec_ = this.tuningSpec_; + if (tuningSpecCase_ == 5 && supervisedTuningSpecBuilder_ != null) { + result.tuningSpec_ = supervisedTuningSpecBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.TuningJob) { + return mergeFrom((com.google.cloud.aiplatform.v1.TuningJob) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.TuningJob other) { + if (other == com.google.cloud.aiplatform.v1.TuningJob.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getTunedModelDisplayName().isEmpty()) { + tunedModelDisplayName_ = other.tunedModelDisplayName_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.hasError()) { + mergeError(other.getError()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000800; + if (!other.getExperiment().isEmpty()) { + experiment_ = other.experiment_; + bitField0_ |= 0x00001000; + onChanged(); + } + if (other.hasTunedModel()) { + mergeTunedModel(other.getTunedModel()); + } + if (other.hasTuningDataStats()) { + mergeTuningDataStats(other.getTuningDataStats()); + } + switch (other.getSourceModelCase()) { + case BASE_MODEL: + { + sourceModelCase_ = 4; + sourceModel_ = other.sourceModel_; + onChanged(); + break; + } + case SOURCEMODEL_NOT_SET: + { + break; + } + } + switch (other.getTuningSpecCase()) { + case SUPERVISED_TUNING_SPEC: + { + mergeSupervisedTuningSpec(other.getSupervisedTuningSpec()); + break; + } + case TUNINGSPEC_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 10 + case 18: + { + tunedModelDisplayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 18 + case 26: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 26 + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + sourceModelCase_ = 4; + sourceModel_ = s; + break; + } // case 34 + case 42: + { + input.readMessage( + getSupervisedTuningSpecFieldBuilder().getBuilder(), extensionRegistry); + tuningSpecCase_ = 5; + break; + } // case 42 + case 48: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 58: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: + { + input.readMessage(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 74: + { + input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000100; + break; + } // case 74 + case 82: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000200; + break; + } // case 82 + case 90: + { + input.readMessage(getErrorFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000400; + break; + } // case 90 + case 98: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000800; + break; + } // case 98 + case 106: + { + experiment_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00001000; + break; + } // case 106 + case 114: + { + input.readMessage(getTunedModelFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00002000; + break; + } // case 114 + case 122: + { + input.readMessage(getTuningDataStatsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00004000; + break; + } // case 122 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int sourceModelCase_ = 0; + private java.lang.Object sourceModel_; + + public SourceModelCase getSourceModelCase() { + return SourceModelCase.forNumber(sourceModelCase_); + } + + public Builder clearSourceModel() { + sourceModelCase_ = 0; + sourceModel_ = null; + onChanged(); + return this; + } + + private int tuningSpecCase_ = 0; + private java.lang.Object tuningSpec_; + + public TuningSpecCase getTuningSpecCase() { + return TuningSpecCase.forNumber(tuningSpecCase_); + } + + public Builder clearTuningSpec() { + tuningSpecCase_ = 0; + tuningSpec_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+     * Model name for tuning, e.g., "gemini-1.0-pro-002".
+     * 
+ * + * string base_model = 4; + * + * @return Whether the baseModel field is set. + */ + @java.lang.Override + public boolean hasBaseModel() { + return sourceModelCase_ == 4; + } + /** + * + * + *
+     * Model name for tuning, e.g., "gemini-1.0-pro-002".
+     * 
+ * + * string base_model = 4; + * + * @return The baseModel. + */ + @java.lang.Override + public java.lang.String getBaseModel() { + java.lang.Object ref = ""; + if (sourceModelCase_ == 4) { + ref = sourceModel_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (sourceModelCase_ == 4) { + sourceModel_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Model name for tuning, e.g., "gemini-1.0-pro-002".
+     * 
+ * + * string base_model = 4; + * + * @return The bytes for baseModel. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBaseModelBytes() { + java.lang.Object ref = ""; + if (sourceModelCase_ == 4) { + ref = sourceModel_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (sourceModelCase_ == 4) { + sourceModel_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Model name for tuning, e.g., "gemini-1.0-pro-002".
+     * 
+ * + * string base_model = 4; + * + * @param value The baseModel to set. + * @return This builder for chaining. + */ + public Builder setBaseModel(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + sourceModelCase_ = 4; + sourceModel_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Model name for tuning, e.g., "gemini-1.0-pro-002".
+     * 
+ * + * string base_model = 4; + * + * @return This builder for chaining. + */ + public Builder clearBaseModel() { + if (sourceModelCase_ == 4) { + sourceModelCase_ = 0; + sourceModel_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Model name for tuning, e.g., "gemini-1.0-pro-002".
+     * 
+ * + * string base_model = 4; + * + * @param value The bytes for baseModel to set. + * @return This builder for chaining. + */ + public Builder setBaseModelBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + sourceModelCase_ = 4; + sourceModel_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.SupervisedTuningSpec, + com.google.cloud.aiplatform.v1.SupervisedTuningSpec.Builder, + com.google.cloud.aiplatform.v1.SupervisedTuningSpecOrBuilder> + supervisedTuningSpecBuilder_; + /** + * + * + *
+     * Tuning Spec for Supervised Fine Tuning.
+     * 
+ * + * .google.cloud.aiplatform.v1.SupervisedTuningSpec supervised_tuning_spec = 5; + * + * @return Whether the supervisedTuningSpec field is set. + */ + @java.lang.Override + public boolean hasSupervisedTuningSpec() { + return tuningSpecCase_ == 5; + } + /** + * + * + *
+     * Tuning Spec for Supervised Fine Tuning.
+     * 
+ * + * .google.cloud.aiplatform.v1.SupervisedTuningSpec supervised_tuning_spec = 5; + * + * @return The supervisedTuningSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.SupervisedTuningSpec getSupervisedTuningSpec() { + if (supervisedTuningSpecBuilder_ == null) { + if (tuningSpecCase_ == 5) { + return (com.google.cloud.aiplatform.v1.SupervisedTuningSpec) tuningSpec_; + } + return com.google.cloud.aiplatform.v1.SupervisedTuningSpec.getDefaultInstance(); + } else { + if (tuningSpecCase_ == 5) { + return supervisedTuningSpecBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1.SupervisedTuningSpec.getDefaultInstance(); + } + } + /** + * + * + *
+     * Tuning Spec for Supervised Fine Tuning.
+     * 
+ * + * .google.cloud.aiplatform.v1.SupervisedTuningSpec supervised_tuning_spec = 5; + */ + public Builder setSupervisedTuningSpec( + com.google.cloud.aiplatform.v1.SupervisedTuningSpec value) { + if (supervisedTuningSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + tuningSpec_ = value; + onChanged(); + } else { + supervisedTuningSpecBuilder_.setMessage(value); + } + tuningSpecCase_ = 5; + return this; + } + /** + * + * + *
+     * Tuning Spec for Supervised Fine Tuning.
+     * 
+ * + * .google.cloud.aiplatform.v1.SupervisedTuningSpec supervised_tuning_spec = 5; + */ + public Builder setSupervisedTuningSpec( + com.google.cloud.aiplatform.v1.SupervisedTuningSpec.Builder builderForValue) { + if (supervisedTuningSpecBuilder_ == null) { + tuningSpec_ = builderForValue.build(); + onChanged(); + } else { + supervisedTuningSpecBuilder_.setMessage(builderForValue.build()); + } + tuningSpecCase_ = 5; + return this; + } + /** + * + * + *
+     * Tuning Spec for Supervised Fine Tuning.
+     * 
+ * + * .google.cloud.aiplatform.v1.SupervisedTuningSpec supervised_tuning_spec = 5; + */ + public Builder mergeSupervisedTuningSpec( + com.google.cloud.aiplatform.v1.SupervisedTuningSpec value) { + if (supervisedTuningSpecBuilder_ == null) { + if (tuningSpecCase_ == 5 + && tuningSpec_ + != com.google.cloud.aiplatform.v1.SupervisedTuningSpec.getDefaultInstance()) { + tuningSpec_ = + com.google.cloud.aiplatform.v1.SupervisedTuningSpec.newBuilder( + (com.google.cloud.aiplatform.v1.SupervisedTuningSpec) tuningSpec_) + .mergeFrom(value) + .buildPartial(); + } else { + tuningSpec_ = value; + } + onChanged(); + } else { + if (tuningSpecCase_ == 5) { + supervisedTuningSpecBuilder_.mergeFrom(value); + } else { + supervisedTuningSpecBuilder_.setMessage(value); + } + } + tuningSpecCase_ = 5; + return this; + } + /** + * + * + *
+     * Tuning Spec for Supervised Fine Tuning.
+     * 
+ * + * .google.cloud.aiplatform.v1.SupervisedTuningSpec supervised_tuning_spec = 5; + */ + public Builder clearSupervisedTuningSpec() { + if (supervisedTuningSpecBuilder_ == null) { + if (tuningSpecCase_ == 5) { + tuningSpecCase_ = 0; + tuningSpec_ = null; + onChanged(); + } + } else { + if (tuningSpecCase_ == 5) { + tuningSpecCase_ = 0; + tuningSpec_ = null; + } + supervisedTuningSpecBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Tuning Spec for Supervised Fine Tuning.
+     * 
+ * + * .google.cloud.aiplatform.v1.SupervisedTuningSpec supervised_tuning_spec = 5; + */ + public com.google.cloud.aiplatform.v1.SupervisedTuningSpec.Builder + getSupervisedTuningSpecBuilder() { + return getSupervisedTuningSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Tuning Spec for Supervised Fine Tuning.
+     * 
+ * + * .google.cloud.aiplatform.v1.SupervisedTuningSpec supervised_tuning_spec = 5; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.SupervisedTuningSpecOrBuilder + getSupervisedTuningSpecOrBuilder() { + if ((tuningSpecCase_ == 5) && (supervisedTuningSpecBuilder_ != null)) { + return supervisedTuningSpecBuilder_.getMessageOrBuilder(); + } else { + if (tuningSpecCase_ == 5) { + return (com.google.cloud.aiplatform.v1.SupervisedTuningSpec) tuningSpec_; + } + return com.google.cloud.aiplatform.v1.SupervisedTuningSpec.getDefaultInstance(); + } + } + /** + * + * + *
+     * Tuning Spec for Supervised Fine Tuning.
+     * 
+ * + * .google.cloud.aiplatform.v1.SupervisedTuningSpec supervised_tuning_spec = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.SupervisedTuningSpec, + com.google.cloud.aiplatform.v1.SupervisedTuningSpec.Builder, + com.google.cloud.aiplatform.v1.SupervisedTuningSpecOrBuilder> + getSupervisedTuningSpecFieldBuilder() { + if (supervisedTuningSpecBuilder_ == null) { + if (!(tuningSpecCase_ == 5)) { + tuningSpec_ = com.google.cloud.aiplatform.v1.SupervisedTuningSpec.getDefaultInstance(); + } + supervisedTuningSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.SupervisedTuningSpec, + com.google.cloud.aiplatform.v1.SupervisedTuningSpec.Builder, + com.google.cloud.aiplatform.v1.SupervisedTuningSpecOrBuilder>( + (com.google.cloud.aiplatform.v1.SupervisedTuningSpec) tuningSpec_, + getParentForChildren(), + isClean()); + tuningSpec_ = null; + } + tuningSpecCase_ = 5; + onChanged(); + return supervisedTuningSpecBuilder_; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. Identifier. Resource name of a TuningJob. Format:
+     * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Identifier. Resource name of a TuningJob. Format:
+     * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Identifier. Resource name of a TuningJob. Format:
+     * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Identifier. Resource name of a TuningJob. Format:
+     * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Identifier. Resource name of a TuningJob. Format:
+     * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object tunedModelDisplayName_ = ""; + /** + * + * + *
+     * Optional. The display name of the
+     * [TunedModel][google.cloud.aiplatform.v1.Model]. The name can be up to
+     * 128 characters long and can consist of any UTF-8 characters.
+     * 
+ * + * string tuned_model_display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The tunedModelDisplayName. + */ + public java.lang.String getTunedModelDisplayName() { + java.lang.Object ref = tunedModelDisplayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tunedModelDisplayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The display name of the
+     * [TunedModel][google.cloud.aiplatform.v1.Model]. The name can be up to
+     * 128 characters long and can consist of any UTF-8 characters.
+     * 
+ * + * string tuned_model_display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for tunedModelDisplayName. + */ + public com.google.protobuf.ByteString getTunedModelDisplayNameBytes() { + java.lang.Object ref = tunedModelDisplayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tunedModelDisplayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The display name of the
+     * [TunedModel][google.cloud.aiplatform.v1.Model]. The name can be up to
+     * 128 characters long and can consist of any UTF-8 characters.
+     * 
+ * + * string tuned_model_display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The tunedModelDisplayName to set. + * @return This builder for chaining. + */ + public Builder setTunedModelDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + tunedModelDisplayName_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The display name of the
+     * [TunedModel][google.cloud.aiplatform.v1.Model]. The name can be up to
+     * 128 characters long and can consist of any UTF-8 characters.
+     * 
+ * + * string tuned_model_display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearTunedModelDisplayName() { + tunedModelDisplayName_ = getDefaultInstance().getTunedModelDisplayName(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The display name of the
+     * [TunedModel][google.cloud.aiplatform.v1.Model]. The name can be up to
+     * 128 characters long and can consist of any UTF-8 characters.
+     * 
+ * + * string tuned_model_display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for tunedModelDisplayName to set. + * @return This builder for chaining. + */ + public Builder setTunedModelDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + tunedModelDisplayName_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * Optional. The description of the
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The description of the
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The description of the
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The description of the
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The description of the
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private int state_ = 0; + /** + * + * + *
+     * Output only. The detailed state of the job.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.JobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * Output only. The detailed state of the job.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.JobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The detailed state of the job.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.JobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.JobState getState() { + com.google.cloud.aiplatform.v1.JobState result = + com.google.cloud.aiplatform.v1.JobState.forNumber(state_); + return result == null ? com.google.cloud.aiplatform.v1.JobState.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Output only. The detailed state of the job.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.JobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.aiplatform.v1.JobState value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The detailed state of the job.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.JobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000020); + state_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. Time when the
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob] was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+     * Output only. Time when the
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob] was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time when the
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob] was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob] was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob] was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. Time when the
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob] was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000040); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob] was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time when the
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob] was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. Time when the
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob] was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp startTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + startTimeBuilder_; + /** + * + * + *
+     * Output only. Time when the
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob] for the first time
+     * entered the `JOB_STATE_RUNNING` state.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * + * + *
+     * Output only. Time when the
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob] for the first time
+     * entered the `JOB_STATE_RUNNING` state.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The startTime. + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time when the
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob] for the first time
+     * entered the `JOB_STATE_RUNNING` state.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + } else { + startTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob] for the first time
+     * entered the `JOB_STATE_RUNNING` state.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob] for the first time
+     * entered the `JOB_STATE_RUNNING` state.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && startTime_ != null + && startTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getStartTimeBuilder().mergeFrom(value); + } else { + startTime_ = value; + } + } else { + startTimeBuilder_.mergeFrom(value); + } + if (startTime_ != null) { + bitField0_ |= 0x00000080; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. Time when the
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob] for the first time
+     * entered the `JOB_STATE_RUNNING` state.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearStartTime() { + bitField0_ = (bitField0_ & ~0x00000080); + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob] for the first time
+     * entered the `JOB_STATE_RUNNING` state.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getStartTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time when the
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob] for the first time
+     * entered the `JOB_STATE_RUNNING` state.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + } + /** + * + * + *
+     * Output only. Time when the
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob] for the first time
+     * entered the `JOB_STATE_RUNNING` state.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getStartTime(), getParentForChildren(), isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + /** + * + * + *
+     * Output only. Time when the TuningJob entered any of the following
+     * [JobStates][google.cloud.aiplatform.v1.JobState]: `JOB_STATE_SUCCEEDED`,
+     * `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`, `JOB_STATE_EXPIRED`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return ((bitField0_ & 0x00000100) != 0); + } + /** + * + * + *
+     * Output only. Time when the TuningJob entered any of the following
+     * [JobStates][google.cloud.aiplatform.v1.JobState]: `JOB_STATE_SUCCEEDED`,
+     * `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`, `JOB_STATE_EXPIRED`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time when the TuningJob entered any of the following
+     * [JobStates][google.cloud.aiplatform.v1.JobState]: `JOB_STATE_SUCCEEDED`,
+     * `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`, `JOB_STATE_EXPIRED`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + } else { + endTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the TuningJob entered any of the following
+     * [JobStates][google.cloud.aiplatform.v1.JobState]: `JOB_STATE_SUCCEEDED`,
+     * `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`, `JOB_STATE_EXPIRED`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the TuningJob entered any of the following
+     * [JobStates][google.cloud.aiplatform.v1.JobState]: `JOB_STATE_SUCCEEDED`,
+     * `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`, `JOB_STATE_EXPIRED`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0) + && endTime_ != null + && endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEndTimeBuilder().mergeFrom(value); + } else { + endTime_ = value; + } + } else { + endTimeBuilder_.mergeFrom(value); + } + if (endTime_ != null) { + bitField0_ |= 0x00000100; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. Time when the TuningJob entered any of the following
+     * [JobStates][google.cloud.aiplatform.v1.JobState]: `JOB_STATE_SUCCEEDED`,
+     * `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`, `JOB_STATE_EXPIRED`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearEndTime() { + bitField0_ = (bitField0_ & ~0x00000100); + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the TuningJob entered any of the following
+     * [JobStates][google.cloud.aiplatform.v1.JobState]: `JOB_STATE_SUCCEEDED`,
+     * `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`, `JOB_STATE_EXPIRED`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + bitField0_ |= 0x00000100; + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time when the TuningJob entered any of the following
+     * [JobStates][google.cloud.aiplatform.v1.JobState]: `JOB_STATE_SUCCEEDED`,
+     * `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`, `JOB_STATE_EXPIRED`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + * + * + *
+     * Output only. Time when the TuningJob entered any of the following
+     * [JobStates][google.cloud.aiplatform.v1.JobState]: `JOB_STATE_SUCCEEDED`,
+     * `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`, `JOB_STATE_EXPIRED`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. Time when the
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob] was most recently
+     * updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000200) != 0); + } + /** + * + * + *
+     * Output only. Time when the
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob] was most recently
+     * updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time when the
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob] was most recently
+     * updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob] was most recently
+     * updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob] was most recently
+     * updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000200; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. Time when the
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob] was most recently
+     * updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000200); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob] was most recently
+     * updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000200; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time when the
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob] was most recently
+     * updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. Time when the
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob] was most recently
+     * updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.rpc.Status error_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + errorBuilder_; + /** + * + * + *
+     * Output only. Only populated when job's state is `JOB_STATE_FAILED` or
+     * `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.rpc.Status error = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the error field is set. + */ + public boolean hasError() { + return ((bitField0_ & 0x00000400) != 0); + } + /** + * + * + *
+     * Output only. Only populated when job's state is `JOB_STATE_FAILED` or
+     * `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.rpc.Status error = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The error. + */ + public com.google.rpc.Status getError() { + if (errorBuilder_ == null) { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } else { + return errorBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Only populated when job's state is `JOB_STATE_FAILED` or
+     * `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.rpc.Status error = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + error_ = value; + } else { + errorBuilder_.setMessage(value); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Only populated when job's state is `JOB_STATE_FAILED` or
+     * `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.rpc.Status error = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setError(com.google.rpc.Status.Builder builderForValue) { + if (errorBuilder_ == null) { + error_ = builderForValue.build(); + } else { + errorBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Only populated when job's state is `JOB_STATE_FAILED` or
+     * `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.rpc.Status error = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (((bitField0_ & 0x00000400) != 0) + && error_ != null + && error_ != com.google.rpc.Status.getDefaultInstance()) { + getErrorBuilder().mergeFrom(value); + } else { + error_ = value; + } + } else { + errorBuilder_.mergeFrom(value); + } + if (error_ != null) { + bitField0_ |= 0x00000400; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. Only populated when job's state is `JOB_STATE_FAILED` or
+     * `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.rpc.Status error = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearError() { + bitField0_ = (bitField0_ & ~0x00000400); + error_ = null; + if (errorBuilder_ != null) { + errorBuilder_.dispose(); + errorBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Only populated when job's state is `JOB_STATE_FAILED` or
+     * `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.rpc.Status error = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.rpc.Status.Builder getErrorBuilder() { + bitField0_ |= 0x00000400; + onChanged(); + return getErrorFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Only populated when job's state is `JOB_STATE_FAILED` or
+     * `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.rpc.Status error = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + if (errorBuilder_ != null) { + return errorBuilder_.getMessageOrBuilder(); + } else { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } + } + /** + * + * + *
+     * Output only. Only populated when job's state is `JOB_STATE_FAILED` or
+     * `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.rpc.Status error = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getErrorFieldBuilder() { + if (errorBuilder_ == null) { + errorBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, + com.google.rpc.Status.Builder, + com.google.rpc.StatusOrBuilder>(getError(), getParentForChildren(), isClean()); + error_ = null; + } + return errorBuilder_; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000800; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * Optional. The labels with user-defined metadata to organize
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob] and generated resources
+     * such as [Model][google.cloud.aiplatform.v1.Model] and
+     * [Endpoint][google.cloud.aiplatform.v1.Endpoint].
+     *
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     *
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * 
+ * + * map<string, string> labels = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * Optional. The labels with user-defined metadata to organize
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob] and generated resources
+     * such as [Model][google.cloud.aiplatform.v1.Model] and
+     * [Endpoint][google.cloud.aiplatform.v1.Endpoint].
+     *
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     *
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * 
+ * + * map<string, string> labels = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Optional. The labels with user-defined metadata to organize
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob] and generated resources
+     * such as [Model][google.cloud.aiplatform.v1.Model] and
+     * [Endpoint][google.cloud.aiplatform.v1.Endpoint].
+     *
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     *
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * 
+ * + * map<string, string> labels = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Optional. The labels with user-defined metadata to organize
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob] and generated resources
+     * such as [Model][google.cloud.aiplatform.v1.Model] and
+     * [Endpoint][google.cloud.aiplatform.v1.Endpoint].
+     *
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     *
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * 
+ * + * map<string, string> labels = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000800); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Optional. The labels with user-defined metadata to organize
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob] and generated resources
+     * such as [Model][google.cloud.aiplatform.v1.Model] and
+     * [Endpoint][google.cloud.aiplatform.v1.Endpoint].
+     *
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     *
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * 
+ * + * map<string, string> labels = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + bitField0_ |= 0x00000800; + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * Optional. The labels with user-defined metadata to organize
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob] and generated resources
+     * such as [Model][google.cloud.aiplatform.v1.Model] and
+     * [Endpoint][google.cloud.aiplatform.v1.Endpoint].
+     *
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     *
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * 
+ * + * map<string, string> labels = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00000800; + return this; + } + /** + * + * + *
+     * Optional. The labels with user-defined metadata to organize
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob] and generated resources
+     * such as [Model][google.cloud.aiplatform.v1.Model] and
+     * [Endpoint][google.cloud.aiplatform.v1.Endpoint].
+     *
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     *
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * 
+ * + * map<string, string> labels = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000800; + return this; + } + + private java.lang.Object experiment_ = ""; + /** + * + * + *
+     * Output only. The Experiment associated with this
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+     * 
+ * + * + * string experiment = 13 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The experiment. + */ + public java.lang.String getExperiment() { + java.lang.Object ref = experiment_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + experiment_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The Experiment associated with this
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+     * 
+ * + * + * string experiment = 13 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for experiment. + */ + public com.google.protobuf.ByteString getExperimentBytes() { + java.lang.Object ref = experiment_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + experiment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The Experiment associated with this
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+     * 
+ * + * + * string experiment = 13 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The experiment to set. + * @return This builder for chaining. + */ + public Builder setExperiment(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + experiment_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The Experiment associated with this
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+     * 
+ * + * + * string experiment = 13 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearExperiment() { + experiment_ = getDefaultInstance().getExperiment(); + bitField0_ = (bitField0_ & ~0x00001000); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The Experiment associated with this
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+     * 
+ * + * + * string experiment = 13 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for experiment to set. + * @return This builder for chaining. + */ + public Builder setExperimentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + experiment_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + + private com.google.cloud.aiplatform.v1.TunedModel tunedModel_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.TunedModel, + com.google.cloud.aiplatform.v1.TunedModel.Builder, + com.google.cloud.aiplatform.v1.TunedModelOrBuilder> + tunedModelBuilder_; + /** + * + * + *
+     * Output only. The tuned model resources assiociated with this
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+     * 
+ * + * + * .google.cloud.aiplatform.v1.TunedModel tuned_model = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the tunedModel field is set. + */ + public boolean hasTunedModel() { + return ((bitField0_ & 0x00002000) != 0); + } + /** + * + * + *
+     * Output only. The tuned model resources assiociated with this
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+     * 
+ * + * + * .google.cloud.aiplatform.v1.TunedModel tuned_model = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The tunedModel. + */ + public com.google.cloud.aiplatform.v1.TunedModel getTunedModel() { + if (tunedModelBuilder_ == null) { + return tunedModel_ == null + ? com.google.cloud.aiplatform.v1.TunedModel.getDefaultInstance() + : tunedModel_; + } else { + return tunedModelBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The tuned model resources assiociated with this
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+     * 
+ * + * + * .google.cloud.aiplatform.v1.TunedModel tuned_model = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setTunedModel(com.google.cloud.aiplatform.v1.TunedModel value) { + if (tunedModelBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + tunedModel_ = value; + } else { + tunedModelBuilder_.setMessage(value); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The tuned model resources assiociated with this
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+     * 
+ * + * + * .google.cloud.aiplatform.v1.TunedModel tuned_model = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setTunedModel( + com.google.cloud.aiplatform.v1.TunedModel.Builder builderForValue) { + if (tunedModelBuilder_ == null) { + tunedModel_ = builderForValue.build(); + } else { + tunedModelBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The tuned model resources assiociated with this
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+     * 
+ * + * + * .google.cloud.aiplatform.v1.TunedModel tuned_model = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeTunedModel(com.google.cloud.aiplatform.v1.TunedModel value) { + if (tunedModelBuilder_ == null) { + if (((bitField0_ & 0x00002000) != 0) + && tunedModel_ != null + && tunedModel_ != com.google.cloud.aiplatform.v1.TunedModel.getDefaultInstance()) { + getTunedModelBuilder().mergeFrom(value); + } else { + tunedModel_ = value; + } + } else { + tunedModelBuilder_.mergeFrom(value); + } + if (tunedModel_ != null) { + bitField0_ |= 0x00002000; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. The tuned model resources assiociated with this
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+     * 
+ * + * + * .google.cloud.aiplatform.v1.TunedModel tuned_model = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearTunedModel() { + bitField0_ = (bitField0_ & ~0x00002000); + tunedModel_ = null; + if (tunedModelBuilder_ != null) { + tunedModelBuilder_.dispose(); + tunedModelBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The tuned model resources assiociated with this
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+     * 
+ * + * + * .google.cloud.aiplatform.v1.TunedModel tuned_model = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.TunedModel.Builder getTunedModelBuilder() { + bitField0_ |= 0x00002000; + onChanged(); + return getTunedModelFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The tuned model resources assiociated with this
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+     * 
+ * + * + * .google.cloud.aiplatform.v1.TunedModel tuned_model = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.TunedModelOrBuilder getTunedModelOrBuilder() { + if (tunedModelBuilder_ != null) { + return tunedModelBuilder_.getMessageOrBuilder(); + } else { + return tunedModel_ == null + ? com.google.cloud.aiplatform.v1.TunedModel.getDefaultInstance() + : tunedModel_; + } + } + /** + * + * + *
+     * Output only. The tuned model resources assiociated with this
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+     * 
+ * + * + * .google.cloud.aiplatform.v1.TunedModel tuned_model = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.TunedModel, + com.google.cloud.aiplatform.v1.TunedModel.Builder, + com.google.cloud.aiplatform.v1.TunedModelOrBuilder> + getTunedModelFieldBuilder() { + if (tunedModelBuilder_ == null) { + tunedModelBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.TunedModel, + com.google.cloud.aiplatform.v1.TunedModel.Builder, + com.google.cloud.aiplatform.v1.TunedModelOrBuilder>( + getTunedModel(), getParentForChildren(), isClean()); + tunedModel_ = null; + } + return tunedModelBuilder_; + } + + private com.google.cloud.aiplatform.v1.TuningDataStats tuningDataStats_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.TuningDataStats, + com.google.cloud.aiplatform.v1.TuningDataStats.Builder, + com.google.cloud.aiplatform.v1.TuningDataStatsOrBuilder> + tuningDataStatsBuilder_; + /** + * + * + *
+     * Output only. The tuning data statistics associated with this
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+     * 
+ * + * + * .google.cloud.aiplatform.v1.TuningDataStats tuning_data_stats = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the tuningDataStats field is set. + */ + public boolean hasTuningDataStats() { + return ((bitField0_ & 0x00004000) != 0); + } + /** + * + * + *
+     * Output only. The tuning data statistics associated with this
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+     * 
+ * + * + * .google.cloud.aiplatform.v1.TuningDataStats tuning_data_stats = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The tuningDataStats. + */ + public com.google.cloud.aiplatform.v1.TuningDataStats getTuningDataStats() { + if (tuningDataStatsBuilder_ == null) { + return tuningDataStats_ == null + ? com.google.cloud.aiplatform.v1.TuningDataStats.getDefaultInstance() + : tuningDataStats_; + } else { + return tuningDataStatsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The tuning data statistics associated with this
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+     * 
+ * + * + * .google.cloud.aiplatform.v1.TuningDataStats tuning_data_stats = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setTuningDataStats(com.google.cloud.aiplatform.v1.TuningDataStats value) { + if (tuningDataStatsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + tuningDataStats_ = value; + } else { + tuningDataStatsBuilder_.setMessage(value); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The tuning data statistics associated with this
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+     * 
+ * + * + * .google.cloud.aiplatform.v1.TuningDataStats tuning_data_stats = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setTuningDataStats( + com.google.cloud.aiplatform.v1.TuningDataStats.Builder builderForValue) { + if (tuningDataStatsBuilder_ == null) { + tuningDataStats_ = builderForValue.build(); + } else { + tuningDataStatsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The tuning data statistics associated with this
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+     * 
+ * + * + * .google.cloud.aiplatform.v1.TuningDataStats tuning_data_stats = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeTuningDataStats(com.google.cloud.aiplatform.v1.TuningDataStats value) { + if (tuningDataStatsBuilder_ == null) { + if (((bitField0_ & 0x00004000) != 0) + && tuningDataStats_ != null + && tuningDataStats_ + != com.google.cloud.aiplatform.v1.TuningDataStats.getDefaultInstance()) { + getTuningDataStatsBuilder().mergeFrom(value); + } else { + tuningDataStats_ = value; + } + } else { + tuningDataStatsBuilder_.mergeFrom(value); + } + if (tuningDataStats_ != null) { + bitField0_ |= 0x00004000; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. The tuning data statistics associated with this
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+     * 
+ * + * + * .google.cloud.aiplatform.v1.TuningDataStats tuning_data_stats = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearTuningDataStats() { + bitField0_ = (bitField0_ & ~0x00004000); + tuningDataStats_ = null; + if (tuningDataStatsBuilder_ != null) { + tuningDataStatsBuilder_.dispose(); + tuningDataStatsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The tuning data statistics associated with this
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+     * 
+ * + * + * .google.cloud.aiplatform.v1.TuningDataStats tuning_data_stats = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.TuningDataStats.Builder getTuningDataStatsBuilder() { + bitField0_ |= 0x00004000; + onChanged(); + return getTuningDataStatsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The tuning data statistics associated with this
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+     * 
+ * + * + * .google.cloud.aiplatform.v1.TuningDataStats tuning_data_stats = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.TuningDataStatsOrBuilder getTuningDataStatsOrBuilder() { + if (tuningDataStatsBuilder_ != null) { + return tuningDataStatsBuilder_.getMessageOrBuilder(); + } else { + return tuningDataStats_ == null + ? com.google.cloud.aiplatform.v1.TuningDataStats.getDefaultInstance() + : tuningDataStats_; + } + } + /** + * + * + *
+     * Output only. The tuning data statistics associated with this
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+     * 
+ * + * + * .google.cloud.aiplatform.v1.TuningDataStats tuning_data_stats = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.TuningDataStats, + com.google.cloud.aiplatform.v1.TuningDataStats.Builder, + com.google.cloud.aiplatform.v1.TuningDataStatsOrBuilder> + getTuningDataStatsFieldBuilder() { + if (tuningDataStatsBuilder_ == null) { + tuningDataStatsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.TuningDataStats, + com.google.cloud.aiplatform.v1.TuningDataStats.Builder, + com.google.cloud.aiplatform.v1.TuningDataStatsOrBuilder>( + getTuningDataStats(), getParentForChildren(), isClean()); + tuningDataStats_ = null; + } + return tuningDataStatsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.TuningJob) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.TuningJob) + private static final com.google.cloud.aiplatform.v1.TuningJob DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.TuningJob(); + } + + public static com.google.cloud.aiplatform.v1.TuningJob getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TuningJob parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.TuningJob getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TuningJobName.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TuningJobName.java new file mode 100644 index 000000000000..3a2549cdb956 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TuningJobName.java @@ -0,0 +1,223 @@ +/* + * Copyright 2024 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.aiplatform.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 TuningJobName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_TUNING_JOB = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/tuningJobs/{tuning_job}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String tuningJob; + + @Deprecated + protected TuningJobName() { + project = null; + location = null; + tuningJob = null; + } + + private TuningJobName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + tuningJob = Preconditions.checkNotNull(builder.getTuningJob()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getTuningJob() { + return tuningJob; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static TuningJobName of(String project, String location, String tuningJob) { + return newBuilder().setProject(project).setLocation(location).setTuningJob(tuningJob).build(); + } + + public static String format(String project, String location, String tuningJob) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setTuningJob(tuningJob) + .build() + .toString(); + } + + public static TuningJobName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_TUNING_JOB.validatedMatch( + formattedString, "TuningJobName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("tuning_job")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (TuningJobName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_TUNING_JOB.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (tuningJob != null) { + fieldMapBuilder.put("tuning_job", tuningJob); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_TUNING_JOB.instantiate( + "project", project, "location", location, "tuning_job", tuningJob); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + TuningJobName that = ((TuningJobName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.tuningJob, that.tuningJob); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(tuningJob); + return h; + } + + /** Builder for projects/{project}/locations/{location}/tuningJobs/{tuning_job}. */ + public static class Builder { + private String project; + private String location; + private String tuningJob; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getTuningJob() { + return tuningJob; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setTuningJob(String tuningJob) { + this.tuningJob = tuningJob; + return this; + } + + private Builder(TuningJobName tuningJobName) { + this.project = tuningJobName.project; + this.location = tuningJobName.location; + this.tuningJob = tuningJobName.tuningJob; + } + + public TuningJobName build() { + return new TuningJobName(this); + } + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TuningJobOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TuningJobOrBuilder.java new file mode 100644 index 000000000000..4346f789a7ad --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TuningJobOrBuilder.java @@ -0,0 +1,651 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/tuning_job.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +public interface TuningJobOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.TuningJob) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Model name for tuning, e.g., "gemini-1.0-pro-002".
+   * 
+ * + * string base_model = 4; + * + * @return Whether the baseModel field is set. + */ + boolean hasBaseModel(); + /** + * + * + *
+   * Model name for tuning, e.g., "gemini-1.0-pro-002".
+   * 
+ * + * string base_model = 4; + * + * @return The baseModel. + */ + java.lang.String getBaseModel(); + /** + * + * + *
+   * Model name for tuning, e.g., "gemini-1.0-pro-002".
+   * 
+ * + * string base_model = 4; + * + * @return The bytes for baseModel. + */ + com.google.protobuf.ByteString getBaseModelBytes(); + + /** + * + * + *
+   * Tuning Spec for Supervised Fine Tuning.
+   * 
+ * + * .google.cloud.aiplatform.v1.SupervisedTuningSpec supervised_tuning_spec = 5; + * + * @return Whether the supervisedTuningSpec field is set. + */ + boolean hasSupervisedTuningSpec(); + /** + * + * + *
+   * Tuning Spec for Supervised Fine Tuning.
+   * 
+ * + * .google.cloud.aiplatform.v1.SupervisedTuningSpec supervised_tuning_spec = 5; + * + * @return The supervisedTuningSpec. + */ + com.google.cloud.aiplatform.v1.SupervisedTuningSpec getSupervisedTuningSpec(); + /** + * + * + *
+   * Tuning Spec for Supervised Fine Tuning.
+   * 
+ * + * .google.cloud.aiplatform.v1.SupervisedTuningSpec supervised_tuning_spec = 5; + */ + com.google.cloud.aiplatform.v1.SupervisedTuningSpecOrBuilder getSupervisedTuningSpecOrBuilder(); + + /** + * + * + *
+   * Output only. Identifier. Resource name of a TuningJob. Format:
+   * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. Identifier. Resource name of a TuningJob. Format:
+   * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. The display name of the
+   * [TunedModel][google.cloud.aiplatform.v1.Model]. The name can be up to
+   * 128 characters long and can consist of any UTF-8 characters.
+   * 
+ * + * string tuned_model_display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The tunedModelDisplayName. + */ + java.lang.String getTunedModelDisplayName(); + /** + * + * + *
+   * Optional. The display name of the
+   * [TunedModel][google.cloud.aiplatform.v1.Model]. The name can be up to
+   * 128 characters long and can consist of any UTF-8 characters.
+   * 
+ * + * string tuned_model_display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for tunedModelDisplayName. + */ + com.google.protobuf.ByteString getTunedModelDisplayNameBytes(); + + /** + * + * + *
+   * Optional. The description of the
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * Optional. The description of the
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Output only. The detailed state of the job.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.JobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Output only. The detailed state of the job.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.JobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.aiplatform.v1.JobState getState(); + + /** + * + * + *
+   * Output only. Time when the
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob] was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Time when the
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob] was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Time when the
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob] was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Time when the
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob] for the first time
+   * entered the `JOB_STATE_RUNNING` state.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + /** + * + * + *
+   * Output only. Time when the
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob] for the first time
+   * entered the `JOB_STATE_RUNNING` state.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + /** + * + * + *
+   * Output only. Time when the
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob] for the first time
+   * entered the `JOB_STATE_RUNNING` state.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Time when the TuningJob entered any of the following
+   * [JobStates][google.cloud.aiplatform.v1.JobState]: `JOB_STATE_SUCCEEDED`,
+   * `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`, `JOB_STATE_EXPIRED`.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + * + * + *
+   * Output only. Time when the TuningJob entered any of the following
+   * [JobStates][google.cloud.aiplatform.v1.JobState]: `JOB_STATE_SUCCEEDED`,
+   * `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`, `JOB_STATE_EXPIRED`.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + * + * + *
+   * Output only. Time when the TuningJob entered any of the following
+   * [JobStates][google.cloud.aiplatform.v1.JobState]: `JOB_STATE_SUCCEEDED`,
+   * `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`, `JOB_STATE_EXPIRED`.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Time when the
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob] was most recently
+   * updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. Time when the
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob] was most recently
+   * updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. Time when the
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob] was most recently
+   * updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Only populated when job's state is `JOB_STATE_FAILED` or
+   * `JOB_STATE_CANCELLED`.
+   * 
+ * + * .google.rpc.Status error = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the error field is set. + */ + boolean hasError(); + /** + * + * + *
+   * Output only. Only populated when job's state is `JOB_STATE_FAILED` or
+   * `JOB_STATE_CANCELLED`.
+   * 
+ * + * .google.rpc.Status error = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The error. + */ + com.google.rpc.Status getError(); + /** + * + * + *
+   * Output only. Only populated when job's state is `JOB_STATE_FAILED` or
+   * `JOB_STATE_CANCELLED`.
+   * 
+ * + * .google.rpc.Status error = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.rpc.StatusOrBuilder getErrorOrBuilder(); + + /** + * + * + *
+   * Optional. The labels with user-defined metadata to organize
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob] and generated resources
+   * such as [Model][google.cloud.aiplatform.v1.Model] and
+   * [Endpoint][google.cloud.aiplatform.v1.Endpoint].
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   *
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + int getLabelsCount(); + /** + * + * + *
+   * Optional. The labels with user-defined metadata to organize
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob] and generated resources
+   * such as [Model][google.cloud.aiplatform.v1.Model] and
+   * [Endpoint][google.cloud.aiplatform.v1.Endpoint].
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   *
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Optional. The labels with user-defined metadata to organize
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob] and generated resources
+   * such as [Model][google.cloud.aiplatform.v1.Model] and
+   * [Endpoint][google.cloud.aiplatform.v1.Endpoint].
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   *
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Optional. The labels with user-defined metadata to organize
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob] and generated resources
+   * such as [Model][google.cloud.aiplatform.v1.Model] and
+   * [Endpoint][google.cloud.aiplatform.v1.Endpoint].
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   *
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Optional. The labels with user-defined metadata to organize
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob] and generated resources
+   * such as [Model][google.cloud.aiplatform.v1.Model] and
+   * [Endpoint][google.cloud.aiplatform.v1.Endpoint].
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   *
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Output only. The Experiment associated with this
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+   * 
+ * + * + * string experiment = 13 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The experiment. + */ + java.lang.String getExperiment(); + /** + * + * + *
+   * Output only. The Experiment associated with this
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+   * 
+ * + * + * string experiment = 13 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for experiment. + */ + com.google.protobuf.ByteString getExperimentBytes(); + + /** + * + * + *
+   * Output only. The tuned model resources assiociated with this
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+   * 
+ * + * + * .google.cloud.aiplatform.v1.TunedModel tuned_model = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the tunedModel field is set. + */ + boolean hasTunedModel(); + /** + * + * + *
+   * Output only. The tuned model resources assiociated with this
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+   * 
+ * + * + * .google.cloud.aiplatform.v1.TunedModel tuned_model = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The tunedModel. + */ + com.google.cloud.aiplatform.v1.TunedModel getTunedModel(); + /** + * + * + *
+   * Output only. The tuned model resources assiociated with this
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+   * 
+ * + * + * .google.cloud.aiplatform.v1.TunedModel tuned_model = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.aiplatform.v1.TunedModelOrBuilder getTunedModelOrBuilder(); + + /** + * + * + *
+   * Output only. The tuning data statistics associated with this
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+   * 
+ * + * + * .google.cloud.aiplatform.v1.TuningDataStats tuning_data_stats = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the tuningDataStats field is set. + */ + boolean hasTuningDataStats(); + /** + * + * + *
+   * Output only. The tuning data statistics associated with this
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+   * 
+ * + * + * .google.cloud.aiplatform.v1.TuningDataStats tuning_data_stats = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The tuningDataStats. + */ + com.google.cloud.aiplatform.v1.TuningDataStats getTuningDataStats(); + /** + * + * + *
+   * Output only. The tuning data statistics associated with this
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+   * 
+ * + * + * .google.cloud.aiplatform.v1.TuningDataStats tuning_data_stats = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.aiplatform.v1.TuningDataStatsOrBuilder getTuningDataStatsOrBuilder(); + + com.google.cloud.aiplatform.v1.TuningJob.SourceModelCase getSourceModelCase(); + + com.google.cloud.aiplatform.v1.TuningJob.TuningSpecCase getTuningSpecCase(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TuningJobProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TuningJobProto.java new file mode 100644 index 000000000000..88ffb7067aea --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TuningJobProto.java @@ -0,0 +1,282 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/tuning_job.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +public final class TuningJobProto { + private TuningJobProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_TuningJob_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_TuningJob_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_TuningJob_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_TuningJob_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_TunedModel_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_TunedModel_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_SupervisedTuningDatasetDistribution_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_SupervisedTuningDatasetDistribution_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_SupervisedTuningDatasetDistribution_DatasetBucket_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_SupervisedTuningDatasetDistribution_DatasetBucket_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_SupervisedTuningDataStats_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_SupervisedTuningDataStats_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_TuningDataStats_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_TuningDataStats_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_SupervisedHyperParameters_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_SupervisedHyperParameters_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_SupervisedTuningSpec_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_SupervisedTuningSpec_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n+google/cloud/aiplatform/v1/tuning_job." + + "proto\022\032google.cloud.aiplatform.v1\032\037googl" + + "e/api/field_behavior.proto\032\031google/api/r" + + "esource.proto\032(google/cloud/aiplatform/v" + + "1/content.proto\032*google/cloud/aiplatform" + + "/v1/job_state.proto\032\037google/protobuf/tim" + + "estamp.proto\032\027google/rpc/status.proto\"\351\007" + + "\n\tTuningJob\022\024\n\nbase_model\030\004 \001(\tH\000\022R\n\026sup" + + "ervised_tuning_spec\030\005 \001(\01320.google.cloud" + + ".aiplatform.v1.SupervisedTuningSpecH\001\022\024\n" + + "\004name\030\001 \001(\tB\006\340A\010\340A\003\022%\n\030tuned_model_displ" + + "ay_name\030\002 \001(\tB\003\340A\001\022\030\n\013description\030\003 \001(\tB" + + "\003\340A\001\0228\n\005state\030\006 \001(\0162$.google.cloud.aipla" + + "tform.v1.JobStateB\003\340A\003\0224\n\013create_time\030\007 " + + "\001(\0132\032.google.protobuf.TimestampB\003\340A\003\0223\n\n" + + "start_time\030\010 \001(\0132\032.google.protobuf.Times" + + "tampB\003\340A\003\0221\n\010end_time\030\t \001(\0132\032.google.pro" + + "tobuf.TimestampB\003\340A\003\0224\n\013update_time\030\n \001(" + + "\0132\032.google.protobuf.TimestampB\003\340A\003\022&\n\005er" + + "ror\030\013 \001(\0132\022.google.rpc.StatusB\003\340A\003\022F\n\006la" + + "bels\030\014 \003(\01321.google.cloud.aiplatform.v1." + + "TuningJob.LabelsEntryB\003\340A\001\022=\n\nexperiment" + + "\030\r \001(\tB)\340A\003\372A#\n!aiplatform.googleapis.co" + + "m/Context\022@\n\013tuned_model\030\016 \001(\0132&.google." + + "cloud.aiplatform.v1.TunedModelB\003\340A\003\022K\n\021t" + + "uning_data_stats\030\017 \001(\0132+.google.cloud.ai" + + "platform.v1.TuningDataStatsB\003\340A\003\032-\n\013Labe" + + "lsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:" + + "\200\001\352A}\n#aiplatform.googleapis.com/TuningJ" + + "ob\022?projects/{project}/locations/{locati" + + "on}/tuningJobs/{tuning_job}*\ntuningJobs2" + + "\ttuningJobB\016\n\014source_modelB\r\n\013tuning_spe" + + "c\"\202\001\n\nTunedModel\0226\n\005model\030\001 \001(\tB\'\340A\003\372A!\n" + + "\037aiplatform.googleapis.com/Model\022<\n\010endp" + + "oint\030\002 \001(\tB*\340A\003\372A$\n\"aiplatform.googleapi" + + "s.com/Endpoint\"\327\002\n#SupervisedTuningDatas" + + "etDistribution\022\020\n\003sum\030\001 \001(\003B\003\340A\003\022\020\n\003min\030" + + "\002 \001(\001B\003\340A\003\022\020\n\003max\030\003 \001(\001B\003\340A\003\022\021\n\004mean\030\004 \001" + + "(\001B\003\340A\003\022\023\n\006median\030\005 \001(\001B\003\340A\003\022\017\n\002p5\030\006 \001(\001" + + "B\003\340A\003\022\020\n\003p95\030\007 \001(\001B\003\340A\003\022c\n\007buckets\030\010 \003(\013" + + "2M.google.cloud.aiplatform.v1.Supervised" + + "TuningDatasetDistribution.DatasetBucketB" + + "\003\340A\003\032J\n\rDatasetBucket\022\022\n\005count\030\001 \001(\001B\003\340A" + + "\003\022\021\n\004left\030\002 \001(\001B\003\340A\003\022\022\n\005right\030\003 \001(\001B\003\340A\003" + + "\"\327\004\n\031SupervisedTuningDataStats\022)\n\034tuning" + + "_dataset_example_count\030\001 \001(\003B\003\340A\003\022)\n\034tot" + + "al_tuning_character_count\030\002 \001(\003B\003\340A\003\022+\n\036" + + "total_billable_character_count\030\003 \001(\003B\003\340A" + + "\003\022\036\n\021tuning_step_count\030\004 \001(\003B\003\340A\003\022k\n\035use" + + "r_input_token_distribution\030\005 \001(\0132?.googl" + + "e.cloud.aiplatform.v1.SupervisedTuningDa" + + "tasetDistributionB\003\340A\003\022l\n\036user_output_to" + + "ken_distribution\030\006 \001(\0132?.google.cloud.ai" + + "platform.v1.SupervisedTuningDatasetDistr" + + "ibutionB\003\340A\003\022s\n%user_message_per_example" + + "_distribution\030\007 \001(\0132?.google.cloud.aipla" + + "tform.v1.SupervisedTuningDatasetDistribu" + + "tionB\003\340A\003\022G\n\025user_dataset_examples\030\010 \003(\013" + + "2#.google.cloud.aiplatform.v1.ContentB\003\340" + + "A\003\"\205\001\n\017TuningDataStats\022]\n\034supervised_tun" + + "ing_data_stats\030\001 \001(\01325.google.cloud.aipl" + + "atform.v1.SupervisedTuningDataStatsH\000B\023\n" + + "\021tuning_data_stats\"\307\002\n\031SupervisedHyperPa" + + "rameters\022\030\n\013epoch_count\030\001 \001(\003B\003\340A\001\022%\n\030le" + + "arning_rate_multiplier\030\002 \001(\001B\003\340A\001\022\\\n\014ada" + + "pter_size\030\003 \001(\0162A.google.cloud.aiplatfor" + + "m.v1.SupervisedHyperParameters.AdapterSi" + + "zeB\003\340A\001\"\212\001\n\013AdapterSize\022\034\n\030ADAPTER_SIZE_" + + "UNSPECIFIED\020\000\022\024\n\020ADAPTER_SIZE_ONE\020\001\022\025\n\021A" + + "DAPTER_SIZE_FOUR\020\002\022\026\n\022ADAPTER_SIZE_EIGHT" + + "\020\003\022\030\n\024ADAPTER_SIZE_SIXTEEN\020\004\"\264\001\n\024Supervi" + + "sedTuningSpec\022!\n\024training_dataset_uri\030\001 " + + "\001(\tB\003\340A\002\022#\n\026validation_dataset_uri\030\002 \001(\t" + + "B\003\340A\001\022T\n\020hyper_parameters\030\003 \001(\01325.google" + + ".cloud.aiplatform.v1.SupervisedHyperPara" + + "metersB\003\340A\001B\314\001\n\036com.google.cloud.aiplatf" + + "orm.v1B\016TuningJobProtoP\001Z>cloud.google.c" + + "om/go/aiplatform/apiv1/aiplatformpb;aipl" + + "atformpb\252\002\032Google.Cloud.AIPlatform.V1\312\002\032" + + "Google\\Cloud\\AIPlatform\\V1\352\002\035Google::Clo" + + "ud::AIPlatform::V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.aiplatform.v1.ContentProto.getDescriptor(), + com.google.cloud.aiplatform.v1.JobStateProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.rpc.StatusProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1_TuningJob_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1_TuningJob_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_TuningJob_descriptor, + new java.lang.String[] { + "BaseModel", + "SupervisedTuningSpec", + "Name", + "TunedModelDisplayName", + "Description", + "State", + "CreateTime", + "StartTime", + "EndTime", + "UpdateTime", + "Error", + "Labels", + "Experiment", + "TunedModel", + "TuningDataStats", + "SourceModel", + "TuningSpec", + }); + internal_static_google_cloud_aiplatform_v1_TuningJob_LabelsEntry_descriptor = + internal_static_google_cloud_aiplatform_v1_TuningJob_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_aiplatform_v1_TuningJob_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_TuningJob_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_aiplatform_v1_TunedModel_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_aiplatform_v1_TunedModel_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_TunedModel_descriptor, + new java.lang.String[] { + "Model", "Endpoint", + }); + internal_static_google_cloud_aiplatform_v1_SupervisedTuningDatasetDistribution_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_aiplatform_v1_SupervisedTuningDatasetDistribution_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_SupervisedTuningDatasetDistribution_descriptor, + new java.lang.String[] { + "Sum", "Min", "Max", "Mean", "Median", "P5", "P95", "Buckets", + }); + internal_static_google_cloud_aiplatform_v1_SupervisedTuningDatasetDistribution_DatasetBucket_descriptor = + internal_static_google_cloud_aiplatform_v1_SupervisedTuningDatasetDistribution_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_aiplatform_v1_SupervisedTuningDatasetDistribution_DatasetBucket_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_SupervisedTuningDatasetDistribution_DatasetBucket_descriptor, + new java.lang.String[] { + "Count", "Left", "Right", + }); + internal_static_google_cloud_aiplatform_v1_SupervisedTuningDataStats_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_aiplatform_v1_SupervisedTuningDataStats_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_SupervisedTuningDataStats_descriptor, + new java.lang.String[] { + "TuningDatasetExampleCount", + "TotalTuningCharacterCount", + "TotalBillableCharacterCount", + "TuningStepCount", + "UserInputTokenDistribution", + "UserOutputTokenDistribution", + "UserMessagePerExampleDistribution", + "UserDatasetExamples", + }); + internal_static_google_cloud_aiplatform_v1_TuningDataStats_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_aiplatform_v1_TuningDataStats_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_TuningDataStats_descriptor, + new java.lang.String[] { + "SupervisedTuningDataStats", "TuningDataStats", + }); + internal_static_google_cloud_aiplatform_v1_SupervisedHyperParameters_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_aiplatform_v1_SupervisedHyperParameters_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_SupervisedHyperParameters_descriptor, + new java.lang.String[] { + "EpochCount", "LearningRateMultiplier", "AdapterSize", + }); + internal_static_google_cloud_aiplatform_v1_SupervisedTuningSpec_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_aiplatform_v1_SupervisedTuningSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_SupervisedTuningSpec_descriptor, + new java.lang.String[] { + "TrainingDatasetUri", "ValidationDatasetUri", "HyperParameters", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.aiplatform.v1.ContentProto.getDescriptor(); + com.google.cloud.aiplatform.v1.JobStateProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.rpc.StatusProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdatePersistentResourceOperationMetadata.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdatePersistentResourceOperationMetadata.java new file mode 100644 index 000000000000..8e4ab2ffaf9f --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdatePersistentResourceOperationMetadata.java @@ -0,0 +1,933 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/persistent_resource_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Details of operations that perform update PersistentResource.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.UpdatePersistentResourceOperationMetadata} + */ +public final class UpdatePersistentResourceOperationMetadata + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.UpdatePersistentResourceOperationMetadata) + UpdatePersistentResourceOperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdatePersistentResourceOperationMetadata.newBuilder() to construct. + private UpdatePersistentResourceOperationMetadata( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdatePersistentResourceOperationMetadata() { + progressMessage_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdatePersistentResourceOperationMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.PersistentResourceServiceProto + .internal_static_google_cloud_aiplatform_v1_UpdatePersistentResourceOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.PersistentResourceServiceProto + .internal_static_google_cloud_aiplatform_v1_UpdatePersistentResourceOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.UpdatePersistentResourceOperationMetadata.class, + com.google.cloud.aiplatform.v1.UpdatePersistentResourceOperationMetadata.Builder.class); + } + + private int bitField0_; + public static final int GENERIC_METADATA_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1.GenericOperationMetadata genericMetadata_; + /** + * + * + *
+   * Operation metadata for PersistentResource.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + @java.lang.Override + public boolean hasGenericMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Operation metadata for PersistentResource.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata() { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + /** + * + * + *
+   * Operation metadata for PersistentResource.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder() { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + + public static final int PROGRESS_MESSAGE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object progressMessage_ = ""; + /** + * + * + *
+   * Progress Message for Update LRO
+   * 
+ * + * string progress_message = 2; + * + * @return The progressMessage. + */ + @java.lang.Override + public java.lang.String getProgressMessage() { + java.lang.Object ref = progressMessage_; + 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(); + progressMessage_ = s; + return s; + } + } + /** + * + * + *
+   * Progress Message for Update LRO
+   * 
+ * + * string progress_message = 2; + * + * @return The bytes for progressMessage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProgressMessageBytes() { + java.lang.Object ref = progressMessage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + progressMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getGenericMetadata()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(progressMessage_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, progressMessage_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getGenericMetadata()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(progressMessage_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, progressMessage_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.aiplatform.v1.UpdatePersistentResourceOperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.UpdatePersistentResourceOperationMetadata other = + (com.google.cloud.aiplatform.v1.UpdatePersistentResourceOperationMetadata) obj; + + if (hasGenericMetadata() != other.hasGenericMetadata()) return false; + if (hasGenericMetadata()) { + if (!getGenericMetadata().equals(other.getGenericMetadata())) return false; + } + if (!getProgressMessage().equals(other.getProgressMessage())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasGenericMetadata()) { + hash = (37 * hash) + GENERIC_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getGenericMetadata().hashCode(); + } + hash = (37 * hash) + PROGRESS_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getProgressMessage().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.UpdatePersistentResourceOperationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UpdatePersistentResourceOperationMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UpdatePersistentResourceOperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UpdatePersistentResourceOperationMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UpdatePersistentResourceOperationMetadata parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UpdatePersistentResourceOperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UpdatePersistentResourceOperationMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.UpdatePersistentResourceOperationMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UpdatePersistentResourceOperationMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.UpdatePersistentResourceOperationMetadata + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UpdatePersistentResourceOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.UpdatePersistentResourceOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.UpdatePersistentResourceOperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Details of operations that perform update PersistentResource.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.UpdatePersistentResourceOperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.UpdatePersistentResourceOperationMetadata) + com.google.cloud.aiplatform.v1.UpdatePersistentResourceOperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.PersistentResourceServiceProto + .internal_static_google_cloud_aiplatform_v1_UpdatePersistentResourceOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.PersistentResourceServiceProto + .internal_static_google_cloud_aiplatform_v1_UpdatePersistentResourceOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.UpdatePersistentResourceOperationMetadata.class, + com.google.cloud.aiplatform.v1.UpdatePersistentResourceOperationMetadata.Builder + .class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.UpdatePersistentResourceOperationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getGenericMetadataFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + genericMetadata_ = null; + if (genericMetadataBuilder_ != null) { + genericMetadataBuilder_.dispose(); + genericMetadataBuilder_ = null; + } + progressMessage_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.PersistentResourceServiceProto + .internal_static_google_cloud_aiplatform_v1_UpdatePersistentResourceOperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UpdatePersistentResourceOperationMetadata + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.UpdatePersistentResourceOperationMetadata + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UpdatePersistentResourceOperationMetadata build() { + com.google.cloud.aiplatform.v1.UpdatePersistentResourceOperationMetadata result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UpdatePersistentResourceOperationMetadata buildPartial() { + com.google.cloud.aiplatform.v1.UpdatePersistentResourceOperationMetadata result = + new com.google.cloud.aiplatform.v1.UpdatePersistentResourceOperationMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1.UpdatePersistentResourceOperationMetadata result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.genericMetadata_ = + genericMetadataBuilder_ == null ? genericMetadata_ : genericMetadataBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.progressMessage_ = progressMessage_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.aiplatform.v1.UpdatePersistentResourceOperationMetadata) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.UpdatePersistentResourceOperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.UpdatePersistentResourceOperationMetadata other) { + if (other + == com.google.cloud.aiplatform.v1.UpdatePersistentResourceOperationMetadata + .getDefaultInstance()) return this; + if (other.hasGenericMetadata()) { + mergeGenericMetadata(other.getGenericMetadata()); + } + if (!other.getProgressMessage().isEmpty()) { + progressMessage_ = other.progressMessage_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getGenericMetadataFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + progressMessage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.aiplatform.v1.GenericOperationMetadata genericMetadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder> + genericMetadataBuilder_; + /** + * + * + *
+     * Operation metadata for PersistentResource.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + public boolean hasGenericMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Operation metadata for PersistentResource.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata() { + if (genericMetadataBuilder_ == null) { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } else { + return genericMetadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Operation metadata for PersistentResource.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder setGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata value) { + if (genericMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + genericMetadata_ = value; + } else { + genericMetadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation metadata for PersistentResource.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder setGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder builderForValue) { + if (genericMetadataBuilder_ == null) { + genericMetadata_ = builderForValue.build(); + } else { + genericMetadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation metadata for PersistentResource.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder mergeGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata value) { + if (genericMetadataBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && genericMetadata_ != null + && genericMetadata_ + != com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance()) { + getGenericMetadataBuilder().mergeFrom(value); + } else { + genericMetadata_ = value; + } + } else { + genericMetadataBuilder_.mergeFrom(value); + } + if (genericMetadata_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Operation metadata for PersistentResource.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder clearGenericMetadata() { + bitField0_ = (bitField0_ & ~0x00000001); + genericMetadata_ = null; + if (genericMetadataBuilder_ != null) { + genericMetadataBuilder_.dispose(); + genericMetadataBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Operation metadata for PersistentResource.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder + getGenericMetadataBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getGenericMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Operation metadata for PersistentResource.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder() { + if (genericMetadataBuilder_ != null) { + return genericMetadataBuilder_.getMessageOrBuilder(); + } else { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + } + /** + * + * + *
+     * Operation metadata for PersistentResource.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder> + getGenericMetadataFieldBuilder() { + if (genericMetadataBuilder_ == null) { + genericMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder>( + getGenericMetadata(), getParentForChildren(), isClean()); + genericMetadata_ = null; + } + return genericMetadataBuilder_; + } + + private java.lang.Object progressMessage_ = ""; + /** + * + * + *
+     * Progress Message for Update LRO
+     * 
+ * + * string progress_message = 2; + * + * @return The progressMessage. + */ + public java.lang.String getProgressMessage() { + java.lang.Object ref = progressMessage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + progressMessage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Progress Message for Update LRO
+     * 
+ * + * string progress_message = 2; + * + * @return The bytes for progressMessage. + */ + public com.google.protobuf.ByteString getProgressMessageBytes() { + java.lang.Object ref = progressMessage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + progressMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Progress Message for Update LRO
+     * 
+ * + * string progress_message = 2; + * + * @param value The progressMessage to set. + * @return This builder for chaining. + */ + public Builder setProgressMessage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + progressMessage_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Progress Message for Update LRO
+     * 
+ * + * string progress_message = 2; + * + * @return This builder for chaining. + */ + public Builder clearProgressMessage() { + progressMessage_ = getDefaultInstance().getProgressMessage(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Progress Message for Update LRO
+     * 
+ * + * string progress_message = 2; + * + * @param value The bytes for progressMessage to set. + * @return This builder for chaining. + */ + public Builder setProgressMessageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + progressMessage_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.UpdatePersistentResourceOperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.UpdatePersistentResourceOperationMetadata) + private static final com.google.cloud.aiplatform.v1.UpdatePersistentResourceOperationMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.UpdatePersistentResourceOperationMetadata(); + } + + public static com.google.cloud.aiplatform.v1.UpdatePersistentResourceOperationMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdatePersistentResourceOperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UpdatePersistentResourceOperationMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdatePersistentResourceOperationMetadataOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdatePersistentResourceOperationMetadataOrBuilder.java new file mode 100644 index 000000000000..fcaff2e7d3eb --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdatePersistentResourceOperationMetadataOrBuilder.java @@ -0,0 +1,86 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/persistent_resource_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +public interface UpdatePersistentResourceOperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.UpdatePersistentResourceOperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Operation metadata for PersistentResource.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + boolean hasGenericMetadata(); + /** + * + * + *
+   * Operation metadata for PersistentResource.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata(); + /** + * + * + *
+   * Operation metadata for PersistentResource.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder getGenericMetadataOrBuilder(); + + /** + * + * + *
+   * Progress Message for Update LRO
+   * 
+ * + * string progress_message = 2; + * + * @return The progressMessage. + */ + java.lang.String getProgressMessage(); + /** + * + * + *
+   * Progress Message for Update LRO
+   * 
+ * + * string progress_message = 2; + * + * @return The bytes for progressMessage. + */ + com.google.protobuf.ByteString getProgressMessageBytes(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdatePersistentResourceRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdatePersistentResourceRequest.java new file mode 100644 index 000000000000..822a7bf7d058 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdatePersistentResourceRequest.java @@ -0,0 +1,1099 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/persistent_resource_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for UpdatePersistentResource method.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.UpdatePersistentResourceRequest} + */ +public final class UpdatePersistentResourceRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.UpdatePersistentResourceRequest) + UpdatePersistentResourceRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdatePersistentResourceRequest.newBuilder() to construct. + private UpdatePersistentResourceRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdatePersistentResourceRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdatePersistentResourceRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.PersistentResourceServiceProto + .internal_static_google_cloud_aiplatform_v1_UpdatePersistentResourceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.PersistentResourceServiceProto + .internal_static_google_cloud_aiplatform_v1_UpdatePersistentResourceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.UpdatePersistentResourceRequest.class, + com.google.cloud.aiplatform.v1.UpdatePersistentResourceRequest.Builder.class); + } + + private int bitField0_; + public static final int PERSISTENT_RESOURCE_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1.PersistentResource persistentResource_; + /** + * + * + *
+   * Required. The PersistentResource to update.
+   *
+   * The PersistentResource's `name` field is used to identify the
+   * PersistentResource to update. Format:
+   * `projects/{project}/locations/{location}/persistentResources/{persistent_resource}`
+   * 
+ * + * + * .google.cloud.aiplatform.v1.PersistentResource persistent_resource = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the persistentResource field is set. + */ + @java.lang.Override + public boolean hasPersistentResource() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. The PersistentResource to update.
+   *
+   * The PersistentResource's `name` field is used to identify the
+   * PersistentResource to update. Format:
+   * `projects/{project}/locations/{location}/persistentResources/{persistent_resource}`
+   * 
+ * + * + * .google.cloud.aiplatform.v1.PersistentResource persistent_resource = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The persistentResource. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.PersistentResource getPersistentResource() { + return persistentResource_ == null + ? com.google.cloud.aiplatform.v1.PersistentResource.getDefaultInstance() + : persistentResource_; + } + /** + * + * + *
+   * Required. The PersistentResource to update.
+   *
+   * The PersistentResource's `name` field is used to identify the
+   * PersistentResource to update. Format:
+   * `projects/{project}/locations/{location}/persistentResources/{persistent_resource}`
+   * 
+ * + * + * .google.cloud.aiplatform.v1.PersistentResource persistent_resource = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.PersistentResourceOrBuilder + getPersistentResourceOrBuilder() { + return persistentResource_ == null + ? com.google.cloud.aiplatform.v1.PersistentResource.getDefaultInstance() + : persistentResource_; + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Required. Specify the fields to be overwritten in the PersistentResource by
+   * the update method.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Required. Specify the fields to be overwritten in the PersistentResource by
+   * the update method.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Required. Specify the fields to be overwritten in the PersistentResource by
+   * the update method.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getPersistentResource()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getUpdateMask()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getPersistentResource()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.UpdatePersistentResourceRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.UpdatePersistentResourceRequest other = + (com.google.cloud.aiplatform.v1.UpdatePersistentResourceRequest) obj; + + if (hasPersistentResource() != other.hasPersistentResource()) return false; + if (hasPersistentResource()) { + if (!getPersistentResource().equals(other.getPersistentResource())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasPersistentResource()) { + hash = (37 * hash) + PERSISTENT_RESOURCE_FIELD_NUMBER; + hash = (53 * hash) + getPersistentResource().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.UpdatePersistentResourceRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UpdatePersistentResourceRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UpdatePersistentResourceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UpdatePersistentResourceRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UpdatePersistentResourceRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UpdatePersistentResourceRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UpdatePersistentResourceRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.UpdatePersistentResourceRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UpdatePersistentResourceRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.UpdatePersistentResourceRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UpdatePersistentResourceRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.UpdatePersistentResourceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.UpdatePersistentResourceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for UpdatePersistentResource method.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.UpdatePersistentResourceRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.UpdatePersistentResourceRequest) + com.google.cloud.aiplatform.v1.UpdatePersistentResourceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.PersistentResourceServiceProto + .internal_static_google_cloud_aiplatform_v1_UpdatePersistentResourceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.PersistentResourceServiceProto + .internal_static_google_cloud_aiplatform_v1_UpdatePersistentResourceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.UpdatePersistentResourceRequest.class, + com.google.cloud.aiplatform.v1.UpdatePersistentResourceRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.UpdatePersistentResourceRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPersistentResourceFieldBuilder(); + getUpdateMaskFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + persistentResource_ = null; + if (persistentResourceBuilder_ != null) { + persistentResourceBuilder_.dispose(); + persistentResourceBuilder_ = null; + } + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.PersistentResourceServiceProto + .internal_static_google_cloud_aiplatform_v1_UpdatePersistentResourceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UpdatePersistentResourceRequest + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.UpdatePersistentResourceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UpdatePersistentResourceRequest build() { + com.google.cloud.aiplatform.v1.UpdatePersistentResourceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UpdatePersistentResourceRequest buildPartial() { + com.google.cloud.aiplatform.v1.UpdatePersistentResourceRequest result = + new com.google.cloud.aiplatform.v1.UpdatePersistentResourceRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1.UpdatePersistentResourceRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.persistentResource_ = + persistentResourceBuilder_ == null + ? persistentResource_ + : persistentResourceBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.UpdatePersistentResourceRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.UpdatePersistentResourceRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.UpdatePersistentResourceRequest other) { + if (other + == com.google.cloud.aiplatform.v1.UpdatePersistentResourceRequest.getDefaultInstance()) + return this; + if (other.hasPersistentResource()) { + mergePersistentResource(other.getPersistentResource()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + getPersistentResourceFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.aiplatform.v1.PersistentResource persistentResource_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.PersistentResource, + com.google.cloud.aiplatform.v1.PersistentResource.Builder, + com.google.cloud.aiplatform.v1.PersistentResourceOrBuilder> + persistentResourceBuilder_; + /** + * + * + *
+     * Required. The PersistentResource to update.
+     *
+     * The PersistentResource's `name` field is used to identify the
+     * PersistentResource to update. Format:
+     * `projects/{project}/locations/{location}/persistentResources/{persistent_resource}`
+     * 
+ * + * + * .google.cloud.aiplatform.v1.PersistentResource persistent_resource = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the persistentResource field is set. + */ + public boolean hasPersistentResource() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Required. The PersistentResource to update.
+     *
+     * The PersistentResource's `name` field is used to identify the
+     * PersistentResource to update. Format:
+     * `projects/{project}/locations/{location}/persistentResources/{persistent_resource}`
+     * 
+ * + * + * .google.cloud.aiplatform.v1.PersistentResource persistent_resource = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The persistentResource. + */ + public com.google.cloud.aiplatform.v1.PersistentResource getPersistentResource() { + if (persistentResourceBuilder_ == null) { + return persistentResource_ == null + ? com.google.cloud.aiplatform.v1.PersistentResource.getDefaultInstance() + : persistentResource_; + } else { + return persistentResourceBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The PersistentResource to update.
+     *
+     * The PersistentResource's `name` field is used to identify the
+     * PersistentResource to update. Format:
+     * `projects/{project}/locations/{location}/persistentResources/{persistent_resource}`
+     * 
+ * + * + * .google.cloud.aiplatform.v1.PersistentResource persistent_resource = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPersistentResource(com.google.cloud.aiplatform.v1.PersistentResource value) { + if (persistentResourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + persistentResource_ = value; + } else { + persistentResourceBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The PersistentResource to update.
+     *
+     * The PersistentResource's `name` field is used to identify the
+     * PersistentResource to update. Format:
+     * `projects/{project}/locations/{location}/persistentResources/{persistent_resource}`
+     * 
+ * + * + * .google.cloud.aiplatform.v1.PersistentResource persistent_resource = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPersistentResource( + com.google.cloud.aiplatform.v1.PersistentResource.Builder builderForValue) { + if (persistentResourceBuilder_ == null) { + persistentResource_ = builderForValue.build(); + } else { + persistentResourceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The PersistentResource to update.
+     *
+     * The PersistentResource's `name` field is used to identify the
+     * PersistentResource to update. Format:
+     * `projects/{project}/locations/{location}/persistentResources/{persistent_resource}`
+     * 
+ * + * + * .google.cloud.aiplatform.v1.PersistentResource persistent_resource = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergePersistentResource( + com.google.cloud.aiplatform.v1.PersistentResource value) { + if (persistentResourceBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && persistentResource_ != null + && persistentResource_ + != com.google.cloud.aiplatform.v1.PersistentResource.getDefaultInstance()) { + getPersistentResourceBuilder().mergeFrom(value); + } else { + persistentResource_ = value; + } + } else { + persistentResourceBuilder_.mergeFrom(value); + } + if (persistentResource_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. The PersistentResource to update.
+     *
+     * The PersistentResource's `name` field is used to identify the
+     * PersistentResource to update. Format:
+     * `projects/{project}/locations/{location}/persistentResources/{persistent_resource}`
+     * 
+ * + * + * .google.cloud.aiplatform.v1.PersistentResource persistent_resource = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearPersistentResource() { + bitField0_ = (bitField0_ & ~0x00000001); + persistentResource_ = null; + if (persistentResourceBuilder_ != null) { + persistentResourceBuilder_.dispose(); + persistentResourceBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The PersistentResource to update.
+     *
+     * The PersistentResource's `name` field is used to identify the
+     * PersistentResource to update. Format:
+     * `projects/{project}/locations/{location}/persistentResources/{persistent_resource}`
+     * 
+ * + * + * .google.cloud.aiplatform.v1.PersistentResource persistent_resource = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.PersistentResource.Builder + getPersistentResourceBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getPersistentResourceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The PersistentResource to update.
+     *
+     * The PersistentResource's `name` field is used to identify the
+     * PersistentResource to update. Format:
+     * `projects/{project}/locations/{location}/persistentResources/{persistent_resource}`
+     * 
+ * + * + * .google.cloud.aiplatform.v1.PersistentResource persistent_resource = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.PersistentResourceOrBuilder + getPersistentResourceOrBuilder() { + if (persistentResourceBuilder_ != null) { + return persistentResourceBuilder_.getMessageOrBuilder(); + } else { + return persistentResource_ == null + ? com.google.cloud.aiplatform.v1.PersistentResource.getDefaultInstance() + : persistentResource_; + } + } + /** + * + * + *
+     * Required. The PersistentResource to update.
+     *
+     * The PersistentResource's `name` field is used to identify the
+     * PersistentResource to update. Format:
+     * `projects/{project}/locations/{location}/persistentResources/{persistent_resource}`
+     * 
+ * + * + * .google.cloud.aiplatform.v1.PersistentResource persistent_resource = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.PersistentResource, + com.google.cloud.aiplatform.v1.PersistentResource.Builder, + com.google.cloud.aiplatform.v1.PersistentResourceOrBuilder> + getPersistentResourceFieldBuilder() { + if (persistentResourceBuilder_ == null) { + persistentResourceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.PersistentResource, + com.google.cloud.aiplatform.v1.PersistentResource.Builder, + com.google.cloud.aiplatform.v1.PersistentResourceOrBuilder>( + getPersistentResource(), getParentForChildren(), isClean()); + persistentResource_ = null; + } + return persistentResourceBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * Required. Specify the fields to be overwritten in the PersistentResource by
+     * the update method.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. Specify the fields to be overwritten in the PersistentResource by
+     * the update method.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Specify the fields to be overwritten in the PersistentResource by
+     * the update method.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Specify the fields to be overwritten in the PersistentResource by
+     * the update method.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Specify the fields to be overwritten in the PersistentResource by
+     * the update method.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + if (updateMask_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. Specify the fields to be overwritten in the PersistentResource by
+     * the update method.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000002); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Specify the fields to be overwritten in the PersistentResource by
+     * the update method.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Specify the fields to be overwritten in the PersistentResource by
+     * the update method.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Required. Specify the fields to be overwritten in the PersistentResource by
+     * the update method.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.UpdatePersistentResourceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.UpdatePersistentResourceRequest) + private static final com.google.cloud.aiplatform.v1.UpdatePersistentResourceRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.UpdatePersistentResourceRequest(); + } + + public static com.google.cloud.aiplatform.v1.UpdatePersistentResourceRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdatePersistentResourceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UpdatePersistentResourceRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdatePersistentResourceRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdatePersistentResourceRequestOrBuilder.java new file mode 100644 index 000000000000..149978cffa3d --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdatePersistentResourceRequestOrBuilder.java @@ -0,0 +1,120 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/persistent_resource_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +public interface UpdatePersistentResourceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.UpdatePersistentResourceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The PersistentResource to update.
+   *
+   * The PersistentResource's `name` field is used to identify the
+   * PersistentResource to update. Format:
+   * `projects/{project}/locations/{location}/persistentResources/{persistent_resource}`
+   * 
+ * + * + * .google.cloud.aiplatform.v1.PersistentResource persistent_resource = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the persistentResource field is set. + */ + boolean hasPersistentResource(); + /** + * + * + *
+   * Required. The PersistentResource to update.
+   *
+   * The PersistentResource's `name` field is used to identify the
+   * PersistentResource to update. Format:
+   * `projects/{project}/locations/{location}/persistentResources/{persistent_resource}`
+   * 
+ * + * + * .google.cloud.aiplatform.v1.PersistentResource persistent_resource = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The persistentResource. + */ + com.google.cloud.aiplatform.v1.PersistentResource getPersistentResource(); + /** + * + * + *
+   * Required. The PersistentResource to update.
+   *
+   * The PersistentResource's `name` field is used to identify the
+   * PersistentResource to update. Format:
+   * `projects/{project}/locations/{location}/persistentResources/{persistent_resource}`
+   * 
+ * + * + * .google.cloud.aiplatform.v1.PersistentResource persistent_resource = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1.PersistentResourceOrBuilder getPersistentResourceOrBuilder(); + + /** + * + * + *
+   * Required. Specify the fields to be overwritten in the PersistentResource by
+   * the update method.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Required. Specify the fields to be overwritten in the PersistentResource by
+   * the update method.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Required. Specify the fields to be overwritten in the PersistentResource by
+   * the update method.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpgradeNotebookRuntimeOperationMetadata.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpgradeNotebookRuntimeOperationMetadata.java new file mode 100644 index 000000000000..4aa6087be8ef --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpgradeNotebookRuntimeOperationMetadata.java @@ -0,0 +1,936 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/notebook_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Metadata information for
+ * [NotebookService.UpgradeNotebookRuntime][google.cloud.aiplatform.v1.NotebookService.UpgradeNotebookRuntime].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.UpgradeNotebookRuntimeOperationMetadata} + */ +public final class UpgradeNotebookRuntimeOperationMetadata + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.UpgradeNotebookRuntimeOperationMetadata) + UpgradeNotebookRuntimeOperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpgradeNotebookRuntimeOperationMetadata.newBuilder() to construct. + private UpgradeNotebookRuntimeOperationMetadata( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpgradeNotebookRuntimeOperationMetadata() { + progressMessage_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpgradeNotebookRuntimeOperationMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_UpgradeNotebookRuntimeOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_UpgradeNotebookRuntimeOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeOperationMetadata.class, + com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeOperationMetadata.Builder.class); + } + + private int bitField0_; + public static final int GENERIC_METADATA_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1.GenericOperationMetadata genericMetadata_; + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + @java.lang.Override + public boolean hasGenericMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata() { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder() { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + + public static final int PROGRESS_MESSAGE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object progressMessage_ = ""; + /** + * + * + *
+   * A human-readable message that shows the intermediate progress details of
+   * NotebookRuntime.
+   * 
+ * + * string progress_message = 2; + * + * @return The progressMessage. + */ + @java.lang.Override + public java.lang.String getProgressMessage() { + java.lang.Object ref = progressMessage_; + 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(); + progressMessage_ = s; + return s; + } + } + /** + * + * + *
+   * A human-readable message that shows the intermediate progress details of
+   * NotebookRuntime.
+   * 
+ * + * string progress_message = 2; + * + * @return The bytes for progressMessage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProgressMessageBytes() { + java.lang.Object ref = progressMessage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + progressMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getGenericMetadata()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(progressMessage_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, progressMessage_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getGenericMetadata()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(progressMessage_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, progressMessage_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeOperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeOperationMetadata other = + (com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeOperationMetadata) obj; + + if (hasGenericMetadata() != other.hasGenericMetadata()) return false; + if (hasGenericMetadata()) { + if (!getGenericMetadata().equals(other.getGenericMetadata())) return false; + } + if (!getProgressMessage().equals(other.getProgressMessage())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasGenericMetadata()) { + hash = (37 * hash) + GENERIC_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getGenericMetadata().hashCode(); + } + hash = (37 * hash) + PROGRESS_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getProgressMessage().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeOperationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeOperationMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeOperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeOperationMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeOperationMetadata parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeOperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeOperationMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeOperationMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeOperationMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeOperationMetadata + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeOperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Metadata information for
+   * [NotebookService.UpgradeNotebookRuntime][google.cloud.aiplatform.v1.NotebookService.UpgradeNotebookRuntime].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.UpgradeNotebookRuntimeOperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.UpgradeNotebookRuntimeOperationMetadata) + com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeOperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_UpgradeNotebookRuntimeOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_UpgradeNotebookRuntimeOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeOperationMetadata.class, + com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeOperationMetadata.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeOperationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getGenericMetadataFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + genericMetadata_ = null; + if (genericMetadataBuilder_ != null) { + genericMetadataBuilder_.dispose(); + genericMetadataBuilder_ = null; + } + progressMessage_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_UpgradeNotebookRuntimeOperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeOperationMetadata + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeOperationMetadata + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeOperationMetadata build() { + com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeOperationMetadata result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeOperationMetadata buildPartial() { + com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeOperationMetadata result = + new com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeOperationMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeOperationMetadata result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.genericMetadata_ = + genericMetadataBuilder_ == null ? genericMetadata_ : genericMetadataBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.progressMessage_ = progressMessage_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeOperationMetadata) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeOperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeOperationMetadata other) { + if (other + == com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeOperationMetadata + .getDefaultInstance()) return this; + if (other.hasGenericMetadata()) { + mergeGenericMetadata(other.getGenericMetadata()); + } + if (!other.getProgressMessage().isEmpty()) { + progressMessage_ = other.progressMessage_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getGenericMetadataFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + progressMessage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.aiplatform.v1.GenericOperationMetadata genericMetadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder> + genericMetadataBuilder_; + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + public boolean hasGenericMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata() { + if (genericMetadataBuilder_ == null) { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } else { + return genericMetadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder setGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata value) { + if (genericMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + genericMetadata_ = value; + } else { + genericMetadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder setGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder builderForValue) { + if (genericMetadataBuilder_ == null) { + genericMetadata_ = builderForValue.build(); + } else { + genericMetadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder mergeGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata value) { + if (genericMetadataBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && genericMetadata_ != null + && genericMetadata_ + != com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance()) { + getGenericMetadataBuilder().mergeFrom(value); + } else { + genericMetadata_ = value; + } + } else { + genericMetadataBuilder_.mergeFrom(value); + } + if (genericMetadata_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder clearGenericMetadata() { + bitField0_ = (bitField0_ & ~0x00000001); + genericMetadata_ = null; + if (genericMetadataBuilder_ != null) { + genericMetadataBuilder_.dispose(); + genericMetadataBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder + getGenericMetadataBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getGenericMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder() { + if (genericMetadataBuilder_ != null) { + return genericMetadataBuilder_.getMessageOrBuilder(); + } else { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder> + getGenericMetadataFieldBuilder() { + if (genericMetadataBuilder_ == null) { + genericMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder>( + getGenericMetadata(), getParentForChildren(), isClean()); + genericMetadata_ = null; + } + return genericMetadataBuilder_; + } + + private java.lang.Object progressMessage_ = ""; + /** + * + * + *
+     * A human-readable message that shows the intermediate progress details of
+     * NotebookRuntime.
+     * 
+ * + * string progress_message = 2; + * + * @return The progressMessage. + */ + public java.lang.String getProgressMessage() { + java.lang.Object ref = progressMessage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + progressMessage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A human-readable message that shows the intermediate progress details of
+     * NotebookRuntime.
+     * 
+ * + * string progress_message = 2; + * + * @return The bytes for progressMessage. + */ + public com.google.protobuf.ByteString getProgressMessageBytes() { + java.lang.Object ref = progressMessage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + progressMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A human-readable message that shows the intermediate progress details of
+     * NotebookRuntime.
+     * 
+ * + * string progress_message = 2; + * + * @param value The progressMessage to set. + * @return This builder for chaining. + */ + public Builder setProgressMessage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + progressMessage_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * A human-readable message that shows the intermediate progress details of
+     * NotebookRuntime.
+     * 
+ * + * string progress_message = 2; + * + * @return This builder for chaining. + */ + public Builder clearProgressMessage() { + progressMessage_ = getDefaultInstance().getProgressMessage(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A human-readable message that shows the intermediate progress details of
+     * NotebookRuntime.
+     * 
+ * + * string progress_message = 2; + * + * @param value The bytes for progressMessage to set. + * @return This builder for chaining. + */ + public Builder setProgressMessageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + progressMessage_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.UpgradeNotebookRuntimeOperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.UpgradeNotebookRuntimeOperationMetadata) + private static final com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeOperationMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeOperationMetadata(); + } + + public static com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeOperationMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpgradeNotebookRuntimeOperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeOperationMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpgradeNotebookRuntimeOperationMetadataOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpgradeNotebookRuntimeOperationMetadataOrBuilder.java new file mode 100644 index 000000000000..205fc78c947e --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpgradeNotebookRuntimeOperationMetadataOrBuilder.java @@ -0,0 +1,88 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/notebook_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +public interface UpgradeNotebookRuntimeOperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.UpgradeNotebookRuntimeOperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + boolean hasGenericMetadata(); + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata(); + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder getGenericMetadataOrBuilder(); + + /** + * + * + *
+   * A human-readable message that shows the intermediate progress details of
+   * NotebookRuntime.
+   * 
+ * + * string progress_message = 2; + * + * @return The progressMessage. + */ + java.lang.String getProgressMessage(); + /** + * + * + *
+   * A human-readable message that shows the intermediate progress details of
+   * NotebookRuntime.
+   * 
+ * + * string progress_message = 2; + * + * @return The bytes for progressMessage. + */ + com.google.protobuf.ByteString getProgressMessageBytes(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpgradeNotebookRuntimeRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpgradeNotebookRuntimeRequest.java new file mode 100644 index 000000000000..7d8f0a850922 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpgradeNotebookRuntimeRequest.java @@ -0,0 +1,667 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/notebook_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for
+ * [NotebookService.UpgradeNotebookRuntime][google.cloud.aiplatform.v1.NotebookService.UpgradeNotebookRuntime].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.UpgradeNotebookRuntimeRequest} + */ +public final class UpgradeNotebookRuntimeRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.UpgradeNotebookRuntimeRequest) + UpgradeNotebookRuntimeRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpgradeNotebookRuntimeRequest.newBuilder() to construct. + private UpgradeNotebookRuntimeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpgradeNotebookRuntimeRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpgradeNotebookRuntimeRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_UpgradeNotebookRuntimeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_UpgradeNotebookRuntimeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeRequest.class, + com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the NotebookRuntime resource to be upgrade.
+   * Instead of checking whether the name is in valid NotebookRuntime resource
+   * name format, directly throw NotFound exception if there is no such
+   * NotebookRuntime in spanner.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the NotebookRuntime resource to be upgrade.
+   * Instead of checking whether the name is in valid NotebookRuntime resource
+   * name format, directly throw NotFound exception if there is no such
+   * NotebookRuntime in spanner.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeRequest other = + (com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for
+   * [NotebookService.UpgradeNotebookRuntime][google.cloud.aiplatform.v1.NotebookService.UpgradeNotebookRuntime].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.UpgradeNotebookRuntimeRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.UpgradeNotebookRuntimeRequest) + com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_UpgradeNotebookRuntimeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_UpgradeNotebookRuntimeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeRequest.class, + com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_UpgradeNotebookRuntimeRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeRequest + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeRequest build() { + com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeRequest buildPartial() { + com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeRequest result = + new com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeRequest other) { + if (other + == com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the NotebookRuntime resource to be upgrade.
+     * Instead of checking whether the name is in valid NotebookRuntime resource
+     * name format, directly throw NotFound exception if there is no such
+     * NotebookRuntime in spanner.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the NotebookRuntime resource to be upgrade.
+     * Instead of checking whether the name is in valid NotebookRuntime resource
+     * name format, directly throw NotFound exception if there is no such
+     * NotebookRuntime in spanner.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the NotebookRuntime resource to be upgrade.
+     * Instead of checking whether the name is in valid NotebookRuntime resource
+     * name format, directly throw NotFound exception if there is no such
+     * NotebookRuntime in spanner.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the NotebookRuntime resource to be upgrade.
+     * Instead of checking whether the name is in valid NotebookRuntime resource
+     * name format, directly throw NotFound exception if there is no such
+     * NotebookRuntime in spanner.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the NotebookRuntime resource to be upgrade.
+     * Instead of checking whether the name is in valid NotebookRuntime resource
+     * name format, directly throw NotFound exception if there is no such
+     * NotebookRuntime in spanner.
+     * 
+ * + * + * 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. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.UpgradeNotebookRuntimeRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.UpgradeNotebookRuntimeRequest) + private static final com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeRequest(); + } + + public static com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpgradeNotebookRuntimeRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpgradeNotebookRuntimeRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpgradeNotebookRuntimeRequestOrBuilder.java new file mode 100644 index 000000000000..9512edaabb60 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpgradeNotebookRuntimeRequestOrBuilder.java @@ -0,0 +1,61 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/notebook_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +public interface UpgradeNotebookRuntimeRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.UpgradeNotebookRuntimeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the NotebookRuntime resource to be upgrade.
+   * Instead of checking whether the name is in valid NotebookRuntime resource
+   * name format, directly throw NotFound exception if there is no such
+   * NotebookRuntime in spanner.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the NotebookRuntime resource to be upgrade.
+   * Instead of checking whether the name is in valid NotebookRuntime resource
+   * name format, directly throw NotFound exception if there is no such
+   * NotebookRuntime in spanner.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpgradeNotebookRuntimeResponse.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpgradeNotebookRuntimeResponse.java new file mode 100644 index 000000000000..095c203d926f --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpgradeNotebookRuntimeResponse.java @@ -0,0 +1,439 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/notebook_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Response message for
+ * [NotebookService.UpgradeNotebookRuntime][google.cloud.aiplatform.v1.NotebookService.UpgradeNotebookRuntime].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.UpgradeNotebookRuntimeResponse} + */ +public final class UpgradeNotebookRuntimeResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.UpgradeNotebookRuntimeResponse) + UpgradeNotebookRuntimeResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpgradeNotebookRuntimeResponse.newBuilder() to construct. + private UpgradeNotebookRuntimeResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpgradeNotebookRuntimeResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpgradeNotebookRuntimeResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_UpgradeNotebookRuntimeResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_UpgradeNotebookRuntimeResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeResponse.class, + com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeResponse.Builder.class); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeResponse)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeResponse other = + (com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeResponse) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for
+   * [NotebookService.UpgradeNotebookRuntime][google.cloud.aiplatform.v1.NotebookService.UpgradeNotebookRuntime].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.UpgradeNotebookRuntimeResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.UpgradeNotebookRuntimeResponse) + com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_UpgradeNotebookRuntimeResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_UpgradeNotebookRuntimeResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeResponse.class, + com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeResponse.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1_UpgradeNotebookRuntimeResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeResponse + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeResponse build() { + com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeResponse buildPartial() { + com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeResponse result = + new com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeResponse(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeResponse) { + return mergeFrom((com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeResponse other) { + if (other + == com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeResponse.getDefaultInstance()) + return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.UpgradeNotebookRuntimeResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.UpgradeNotebookRuntimeResponse) + private static final com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeResponse(); + } + + public static com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpgradeNotebookRuntimeResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpgradeNotebookRuntimeResponseOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpgradeNotebookRuntimeResponseOrBuilder.java new file mode 100644 index 000000000000..040b515a82f6 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpgradeNotebookRuntimeResponseOrBuilder.java @@ -0,0 +1,25 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/notebook_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1; + +public interface UpgradeNotebookRuntimeResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.UpgradeNotebookRuntimeResponse) + com.google.protobuf.MessageOrBuilder {} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/VertexAISearch.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/VertexAISearch.java index 64734a88d3a1..cb057a15c630 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/VertexAISearch.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/VertexAISearch.java @@ -74,7 +74,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { *
    * Required. Fully-qualified Vertex AI Search's datastore resource ID.
    * Format:
-   * projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`
    * 
* * string datastore = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -99,7 +99,7 @@ public java.lang.String getDatastore() { *
    * Required. Fully-qualified Vertex AI Search's datastore resource ID.
    * Format:
-   * projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`
    * 
* * string datastore = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -468,7 +468,7 @@ public Builder mergeFrom( *
      * Required. Fully-qualified Vertex AI Search's datastore resource ID.
      * Format:
-     * projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`
      * 
* * string datastore = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -492,7 +492,7 @@ public java.lang.String getDatastore() { *
      * Required. Fully-qualified Vertex AI Search's datastore resource ID.
      * Format:
-     * projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`
      * 
* * string datastore = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -516,7 +516,7 @@ public com.google.protobuf.ByteString getDatastoreBytes() { *
      * Required. Fully-qualified Vertex AI Search's datastore resource ID.
      * Format:
-     * projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`
      * 
* * string datastore = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -539,7 +539,7 @@ public Builder setDatastore(java.lang.String value) { *
      * Required. Fully-qualified Vertex AI Search's datastore resource ID.
      * Format:
-     * projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`
      * 
* * string datastore = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -558,7 +558,7 @@ public Builder clearDatastore() { *
      * Required. Fully-qualified Vertex AI Search's datastore resource ID.
      * Format:
-     * projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`
      * 
* * string datastore = 1 [(.google.api.field_behavior) = REQUIRED]; diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/VertexAISearchOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/VertexAISearchOrBuilder.java index c5d8060c196a..07014562c1e7 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/VertexAISearchOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/VertexAISearchOrBuilder.java @@ -30,7 +30,7 @@ public interface VertexAISearchOrBuilder *
    * Required. Fully-qualified Vertex AI Search's datastore resource ID.
    * Format:
-   * projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`
    * 
* * string datastore = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -44,7 +44,7 @@ public interface VertexAISearchOrBuilder *
    * Required. Fully-qualified Vertex AI Search's datastore resource ID.
    * Format:
-   * projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`
    * 
* * string datastore = 1 [(.google.api.field_behavior) = REQUIRED]; diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/content.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/content.proto index 331bb4ed4605..e98cc9a8260c 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/content.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/content.proto @@ -102,14 +102,15 @@ message Part { } } -// Raw media bytes. +// Content blob. // -// Text should not be sent as raw bytes, use the 'text' field. +// It's preferred to send as [text][google.cloud.aiplatform.v1.Part.text] +// directly rather than raw bytes. message Blob { // Required. The IANA standard MIME type of the source data. string mime_type = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. Raw bytes for media formats. + // Required. Raw bytes. bytes data = 2 [(google.api.field_behavior) = REQUIRED]; } @@ -152,6 +153,21 @@ message GenerationConfig { // Optional. Stop sequences. repeated string stop_sequences = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Positive penalties. + optional float presence_penalty = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Frequency penalties. + optional float frequency_penalty = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Output response mimetype of the generated candidate text. + // Supported mimetype: + // - `text/plain`: (default) Text output. + // - `application/json`: JSON response in the candidates. + // The model needs to be prompted to output the appropriate response type, + // otherwise the behavior is undefined. + // This is a preview feature. + string response_mime_type = 13 [(google.api.field_behavior) = OPTIONAL]; } // Safety settings. @@ -174,11 +190,27 @@ message SafetySetting { BLOCK_NONE = 4; } + // Probability vs severity. + enum HarmBlockMethod { + // The harm block method is unspecified. + HARM_BLOCK_METHOD_UNSPECIFIED = 0; + + // The harm block method uses both probability and severity scores. + SEVERITY = 1; + + // The harm block method uses the probability score. + PROBABILITY = 2; + } + // Required. Harm category. HarmCategory category = 1 [(google.api.field_behavior) = REQUIRED]; // Required. The harm block threshold. HarmBlockThreshold threshold = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Specify if the threshold is used for probability or severity + // score. If not specified, the threshold is used for probability score. + HarmBlockMethod method = 4 [(google.api.field_behavior) = OPTIONAL]; } // Safety rating corresponding to the generated content. diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/custom_job.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/custom_job.proto index f9fdbb17eab9..9cef0b9e5b85 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/custom_job.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/custom_job.proto @@ -113,6 +113,20 @@ message CustomJob { // Represents the spec of a CustomJob. message CustomJobSpec { + // Optional. The ID of the PersistentResource in the same Project and Location + // which to run + // + // If this is specified, the job will be run on existing machines held by the + // PersistentResource instead of on-demand short-live machines. + // The network and CMEK configs on the job should be consistent with those on + // the PersistentResource, otherwise, the job will be rejected. + string persistent_resource_id = 14 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/PersistentResource" + } + ]; + // Required. The spec of the worker pools including machine type and Docker // image. All worker pools except the first one are optional and can be // skipped by providing an empty value. diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/endpoint.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/endpoint.proto index 0d305a672e9d..dc4ee59efdbd 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/endpoint.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/endpoint.proto @@ -221,6 +221,13 @@ message DeployedModel { // will be used for the explanation configuration. ExplanationSpec explanation_spec = 9; + // If true, deploy the model without explainable feature, regardless the + // existence of + // [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec] + // or + // [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]. + bool disable_explanations = 19; + // The service account that the DeployedModel's container runs as. Specify the // email address of the service account. If this service account is not // specified, the container runs as a service account that doesn't have access diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/endpoint_service.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/endpoint_service.proto index 5b1216b1a86e..ac89e404cb42 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/endpoint_service.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/endpoint_service.proto @@ -211,9 +211,8 @@ message ListEndpointsRequest { // names both snake_case and camelCase are supported. // // * `endpoint` supports `=` and `!=`. `endpoint` represents the Endpoint - // ID, - // i.e. the last segment of the Endpoint's [resource - // name][google.cloud.aiplatform.v1.Endpoint.name]. + // ID, i.e. the last segment of the Endpoint's + // [resource name][google.cloud.aiplatform.v1.Endpoint.name]. // * `display_name` supports `=` and `!=`. // * `labels` supports general map functions that is: // * `labels.key=value` - key:value equality diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/genai_tuning_service.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/genai_tuning_service.proto new file mode 100644 index 000000000000..d0c369d3b4e5 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/genai_tuning_service.proto @@ -0,0 +1,164 @@ +// Copyright 2024 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/aiplatform/v1/tuning_job.proto"; +import "google/protobuf/empty.proto"; + +option csharp_namespace = "Google.Cloud.AIPlatform.V1"; +option go_package = "cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb"; +option java_multiple_files = true; +option java_outer_classname = "GenAiTuningServiceProto"; +option java_package = "com.google.cloud.aiplatform.v1"; +option php_namespace = "Google\\Cloud\\AIPlatform\\V1"; +option ruby_package = "Google::Cloud::AIPlatform::V1"; + +// A service for creating and managing GenAI Tuning Jobs. +service GenAiTuningService { + option (google.api.default_host) = "aiplatform.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Creates a TuningJob. A created TuningJob right away will be attempted to + // be run. + rpc CreateTuningJob(CreateTuningJobRequest) returns (TuningJob) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/tuningJobs" + body: "tuning_job" + }; + option (google.api.method_signature) = "parent,tuning_job"; + } + + // Gets a TuningJob. + rpc GetTuningJob(GetTuningJobRequest) returns (TuningJob) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/tuningJobs/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists TuningJobs in a Location. + rpc ListTuningJobs(ListTuningJobsRequest) returns (ListTuningJobsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/tuningJobs" + }; + option (google.api.method_signature) = "parent"; + } + + // Cancels a TuningJob. + // Starts asynchronous cancellation on the TuningJob. The server makes a best + // effort to cancel the job, but success is not guaranteed. Clients can use + // [GenAiTuningService.GetTuningJob][google.cloud.aiplatform.v1.GenAiTuningService.GetTuningJob] + // or other methods to check whether the cancellation succeeded or whether the + // job completed despite cancellation. On successful cancellation, the + // TuningJob is not deleted; instead it becomes a job with a + // [TuningJob.error][google.cloud.aiplatform.v1.TuningJob.error] value with a + // [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + // `Code.CANCELLED`, and + // [TuningJob.state][google.cloud.aiplatform.v1.TuningJob.state] is set to + // `CANCELLED`. + rpc CancelTuningJob(CancelTuningJobRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/tuningJobs/*}:cancel" + body: "*" + }; + option (google.api.method_signature) = "name"; + } +} + +// Request message for +// [GenAiTuningService.CreateTuningJob][google.cloud.aiplatform.v1.GenAiTuningService.CreateTuningJob]. +message CreateTuningJobRequest { + // Required. The resource name of the Location to create the TuningJob in. + // Format: `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. The TuningJob to create. + TuningJob tuning_job = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for +// [GenAiTuningService.GetTuningJob][google.cloud.aiplatform.v1.GenAiTuningService.GetTuningJob]. +message GetTuningJobRequest { + // Required. The name of the TuningJob resource. Format: + // `projects/{project}/locations/{location}/tuningJobs/{tuning_job}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/TuningJob" + } + ]; +} + +// Request message for +// [GenAiTuningService.ListTuningJobs][google.cloud.aiplatform.v1.GenAiTuningService.ListTuningJobs]. +message ListTuningJobsRequest { + // Required. The resource name of the Location to list the TuningJobs from. + // Format: `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Optional. The standard list filter. + string filter = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The standard list page size. + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The standard list page token. + // Typically obtained via [ListTuningJob.next_page_token][] of the + // previous GenAiTuningService.ListTuningJob][] call. + string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for +// [GenAiTuningService.ListTuningJobs][google.cloud.aiplatform.v1.GenAiTuningService.ListTuningJobs] +message ListTuningJobsResponse { + // List of TuningJobs in the requested page. + repeated TuningJob tuning_jobs = 1; + + // A token to retrieve the next page of results. + // Pass to + // [ListTuningJobsRequest.page_token][google.cloud.aiplatform.v1.ListTuningJobsRequest.page_token] + // to obtain that page. + string next_page_token = 2; +} + +// Request message for +// [GenAiTuningService.CancelTuningJob][google.cloud.aiplatform.v1.GenAiTuningService.CancelTuningJob]. +message CancelTuningJobRequest { + // Required. The name of the TuningJob to cancel. Format: + // `projects/{project}/locations/{location}/tuningJobs/{tuning_job}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/TuningJob" + } + ]; +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/machine_resources.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/machine_resources.proto index 041ea2e3d0ad..2870086fcc7a 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/machine_resources.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/machine_resources.proto @@ -232,3 +232,17 @@ message AutoscalingMetricSpec { // (representing 60%) if not provided. int32 target = 2; } + +// A set of Shielded Instance options. +// See [Images using supported Shielded VM +// features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm). +message ShieldedVmConfig { + // Defines whether the instance has [Secure + // Boot](https://cloud.google.com/compute/shielded-vm/docs/shielded-vm#secure-boot) + // enabled. + // + // Secure Boot helps ensure that the system only runs authentic software by + // verifying the digital signature of all boot components, and halting the + // boot process if signature verification fails. + bool enable_secure_boot = 1; +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/network_spec.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/network_spec.proto new file mode 100644 index 000000000000..1e8b945706d1 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/network_spec.proto @@ -0,0 +1,50 @@ +// 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1; + +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Cloud.AIPlatform.V1"; +option go_package = "cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb"; +option java_multiple_files = true; +option java_outer_classname = "NetworkSpecProto"; +option java_package = "com.google.cloud.aiplatform.v1"; +option php_namespace = "Google\\Cloud\\AIPlatform\\V1"; +option ruby_package = "Google::Cloud::AIPlatform::V1"; +option (google.api.resource_definition) = { + type: "compute.googleapis.com/Subnetwork" + pattern: "projects/{project}/regions/{region}/subnetworks/{subnetwork}" +}; + +// Network spec. +message NetworkSpec { + // Whether to enable public internet access. Default false. + bool enable_internet_access = 1; + + // The full name of the Google Compute Engine + // [network](https://cloud.google.com//compute/docs/networks-and-firewalls#networks) + string network = 2 [ + (google.api.resource_reference) = { type: "compute.googleapis.com/Network" } + ]; + + // The name of the subnet that this instance is in. + // Format: + // `projects/{project_id_or_number}/regions/{region}/subnetworks/{subnetwork_id}` + string subnetwork = 3 [(google.api.resource_reference) = { + type: "compute.googleapis.com/Subnetwork" + }]; +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/notebook_euc_config.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/notebook_euc_config.proto new file mode 100644 index 000000000000..70e5388a90ad --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/notebook_euc_config.proto @@ -0,0 +1,44 @@ +// 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1; + +import "google/api/field_behavior.proto"; + +option csharp_namespace = "Google.Cloud.AIPlatform.V1"; +option go_package = "cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb"; +option java_multiple_files = true; +option java_outer_classname = "NotebookEucConfigProto"; +option java_package = "com.google.cloud.aiplatform.v1"; +option php_namespace = "Google\\Cloud\\AIPlatform\\V1"; +option ruby_package = "Google::Cloud::AIPlatform::V1"; + +// The euc configuration of NotebookRuntimeTemplate. +message NotebookEucConfig { + // Input only. Whether EUC is disabled in this NotebookRuntimeTemplate. + // In proto3, the default value of a boolean is false. In this way, by default + // EUC will be enabled for NotebookRuntimeTemplate. + bool euc_disabled = 1 [(google.api.field_behavior) = INPUT_ONLY]; + + // Output only. Whether ActAs check is bypassed for service account attached + // to the VM. If false, we need ActAs check for the default Compute Engine + // Service account. When a Runtime is created, a VM is allocated using Default + // Compute Engine Service Account. Any user requesting to use this Runtime + // requires Service Account User (ActAs) permission over this SA. If true, + // Runtime owner is using EUC and does not require the above permission as VM + // no longer use default Compute Engine SA, but a P4SA. + bool bypass_actas_check = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/notebook_idle_shutdown_config.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/notebook_idle_shutdown_config.proto new file mode 100644 index 000000000000..9dfb02185d7e --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/notebook_idle_shutdown_config.proto @@ -0,0 +1,41 @@ +// 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1; + +import "google/api/field_behavior.proto"; +import "google/protobuf/duration.proto"; + +option csharp_namespace = "Google.Cloud.AIPlatform.V1"; +option go_package = "cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb"; +option java_multiple_files = true; +option java_outer_classname = "NotebookIdleShutdownConfigProto"; +option java_package = "com.google.cloud.aiplatform.v1"; +option php_namespace = "Google\\Cloud\\AIPlatform\\V1"; +option ruby_package = "Google::Cloud::AIPlatform::V1"; + +// The idle shutdown configuration of NotebookRuntimeTemplate, which contains +// the idle_timeout as required field. +message NotebookIdleShutdownConfig { + // Required. Duration is accurate to the second. In Notebook, Idle Timeout is + // accurate to minute so the range of idle_timeout (second) is: 10 * 60 ~ 1440 + // * 60. + google.protobuf.Duration idle_timeout = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Whether Idle Shutdown is disabled in this NotebookRuntimeTemplate. + bool idle_shutdown_disabled = 2; +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/notebook_runtime.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/notebook_runtime.proto new file mode 100644 index 000000000000..31bb98fdb924 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/notebook_runtime.proto @@ -0,0 +1,274 @@ +// 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/aiplatform/v1/machine_resources.proto"; +import "google/cloud/aiplatform/v1/network_spec.proto"; +import "google/cloud/aiplatform/v1/notebook_euc_config.proto"; +import "google/cloud/aiplatform/v1/notebook_idle_shutdown_config.proto"; +import "google/cloud/aiplatform/v1/notebook_runtime_template_ref.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.AIPlatform.V1"; +option go_package = "cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb"; +option java_multiple_files = true; +option java_outer_classname = "NotebookRuntimeProto"; +option java_package = "com.google.cloud.aiplatform.v1"; +option php_namespace = "Google\\Cloud\\AIPlatform\\V1"; +option ruby_package = "Google::Cloud::AIPlatform::V1"; + +// Represents a notebook runtime type. +enum NotebookRuntimeType { + // Unspecified notebook runtime type, NotebookRuntimeType will default to + // USER_DEFINED. + NOTEBOOK_RUNTIME_TYPE_UNSPECIFIED = 0; + + // runtime or template with coustomized configurations from user. + USER_DEFINED = 1; + + // runtime or template with system defined configurations. + ONE_CLICK = 2; +} + +// A template that specifies runtime configurations such as machine type, +// runtime version, network configurations, etc. +// Multiple runtimes can be created from a runtime template. +message NotebookRuntimeTemplate { + option (google.api.resource) = { + type: "aiplatform.googleapis.com/NotebookRuntimeTemplate" + pattern: "projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}" + }; + + // Output only. The resource name of the NotebookRuntimeTemplate. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The display name of the NotebookRuntimeTemplate. + // The name can be up to 128 characters long and can consist of any UTF-8 + // characters. + string display_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // The description of the NotebookRuntimeTemplate. + string description = 3; + + // Output only. The default template to use if not specified. + bool is_default = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Immutable. The specification of a single machine for the + // template. + MachineSpec machine_spec = 5 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Optional. The specification of [persistent + // disk][https://cloud.google.com/compute/docs/disks/persistent-disks] + // attached to the runtime as data disk storage. + PersistentDiskSpec data_persistent_disk_spec = 8 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Network spec. + NetworkSpec network_spec = 12 [(google.api.field_behavior) = OPTIONAL]; + + // The service account that the runtime workload runs as. + // You can use any service account within the same project, but you + // must have the service account user permission to use the instance. + // + // If not specified, the [Compute Engine default service + // account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) + // is used. + string service_account = 13; + + // Used to perform consistent read-modify-write updates. If not set, a blind + // "overwrite" update happens. + string etag = 14; + + // The labels with user-defined metadata to organize the + // NotebookRuntimeTemplates. + // + // Label keys and values can be no longer than 64 characters + // (Unicode codepoints), can only contain lowercase letters, numeric + // characters, underscores and dashes. International characters are allowed. + // + // See https://goo.gl/xmQnxf for more information and examples of labels. + map labels = 15; + + // The idle shutdown configuration of NotebookRuntimeTemplate. This config + // will only be set when idle shutdown is enabled. + NotebookIdleShutdownConfig idle_shutdown_config = 17; + + // EUC configuration of the NotebookRuntimeTemplate. + NotebookEucConfig euc_config = 18; + + // Output only. Timestamp when this NotebookRuntimeTemplate was created. + google.protobuf.Timestamp create_time = 10 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Timestamp when this NotebookRuntimeTemplate was most recently + // updated. + google.protobuf.Timestamp update_time = 11 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Immutable. The type of the notebook runtime template. + NotebookRuntimeType notebook_runtime_type = 19 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Optional. Immutable. Runtime Shielded VM spec. + ShieldedVmConfig shielded_vm_config = 20 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Optional. The Compute Engine tags to add to runtime (see [Tagging + // instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)). + repeated string network_tags = 21 [(google.api.field_behavior) = OPTIONAL]; +} + +// A runtime is a virtual machine allocated to a particular user for a +// particular Notebook file on temporary basis with lifetime limited to 24 +// hours. +message NotebookRuntime { + option (google.api.resource) = { + type: "aiplatform.googleapis.com/NotebookRuntime" + pattern: "projects/{project}/locations/{location}/notebookRuntimes/{notebook_runtime}" + }; + + // The substate of the NotebookRuntime to display health information. + enum HealthState { + // Unspecified health state. + HEALTH_STATE_UNSPECIFIED = 0; + + // NotebookRuntime is in healthy state. Applies to ACTIVE state. + HEALTHY = 1; + + // NotebookRuntime is in unhealthy state. Applies to ACTIVE state. + UNHEALTHY = 2; + } + + // The substate of the NotebookRuntime to display state of runtime. + // The resource of NotebookRuntime is in ACTIVE state for these sub state. + enum RuntimeState { + // Unspecified runtime state. + RUNTIME_STATE_UNSPECIFIED = 0; + + // NotebookRuntime is in running state. + RUNNING = 1; + + // NotebookRuntime is in starting state. + BEING_STARTED = 2; + + // NotebookRuntime is in stopping state. + BEING_STOPPED = 3; + + // NotebookRuntime is in stopped state. + STOPPED = 4; + + // NotebookRuntime is in upgrading state. It is in the middle of upgrading + // process. + BEING_UPGRADED = 5; + + // NotebookRuntime was unable to start/stop properly. + ERROR = 100; + + // NotebookRuntime is in invalid state. Cannot be recovered. + INVALID = 101; + } + + // Output only. The resource name of the NotebookRuntime. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The user email of the NotebookRuntime. + string runtime_user = 2 [(google.api.field_behavior) = REQUIRED]; + + // Output only. The pointer to NotebookRuntimeTemplate this NotebookRuntime is + // created from. + NotebookRuntimeTemplateRef notebook_runtime_template_ref = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The proxy endpoint used to access the NotebookRuntime. + string proxy_uri = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Timestamp when this NotebookRuntime was created. + google.protobuf.Timestamp create_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Timestamp when this NotebookRuntime was most recently updated. + google.protobuf.Timestamp update_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The health state of the NotebookRuntime. + HealthState health_state = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The display name of the NotebookRuntime. + // The name can be up to 128 characters long and can consist of any UTF-8 + // characters. + string display_name = 10 [(google.api.field_behavior) = REQUIRED]; + + // The description of the NotebookRuntime. + string description = 11; + + // Output only. The service account that the NotebookRuntime workload runs as. + string service_account = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The runtime (instance) state of the NotebookRuntime. + RuntimeState runtime_state = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Whether NotebookRuntime is upgradable. + bool is_upgradable = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The labels with user-defined metadata to organize your + // NotebookRuntime. + // + // Label keys and values can be no longer than 64 characters + // (Unicode codepoints), can only contain lowercase letters, numeric + // characters, underscores and dashes. International characters are allowed. + // No more than 64 user labels can be associated with one NotebookRuntime + // (System labels are excluded). + // + // See https://goo.gl/xmQnxf for more information and examples of labels. + // System reserved label keys are prefixed with "aiplatform.googleapis.com/" + // and are immutable. Following system labels exist for NotebookRuntime: + // + // * "aiplatform.googleapis.com/notebook_runtime_gce_instance_id": output + // only, its value is the Compute Engine instance id. + // * "aiplatform.googleapis.com/colab_enterprise_entry_service": its value is + // either "bigquery" or "vertex"; if absent, it should be "vertex". This is to + // describe the entry service, either BigQuery or Vertex. + map labels = 16; + + // Output only. Timestamp when this NotebookRuntime will be expired: + // 1. System Predefined NotebookRuntime: 24 hours after creation. After + // expiration, system predifined runtime will be deleted. + // 2. User created NotebookRuntime: 6 months after last upgrade. After + // expiration, user created runtime will be stopped and allowed for upgrade. + google.protobuf.Timestamp expiration_time = 17 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The VM os image version of NotebookRuntime. + string version = 18 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The type of the notebook runtime. + NotebookRuntimeType notebook_runtime_type = 19 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The Compute Engine tags to add to runtime (see [Tagging + // instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)). + repeated string network_tags = 25 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/notebook_runtime_template_ref.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/notebook_runtime_template_ref.proto new file mode 100644 index 000000000000..d5cd83506a47 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/notebook_runtime_template_ref.proto @@ -0,0 +1,39 @@ +// 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Cloud.AIPlatform.V1"; +option go_package = "cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb"; +option java_multiple_files = true; +option java_outer_classname = "NotebookRuntimeTemplateRefProto"; +option java_package = "com.google.cloud.aiplatform.v1"; +option php_namespace = "Google\\Cloud\\AIPlatform\\V1"; +option ruby_package = "Google::Cloud::AIPlatform::V1"; + +// Points to a NotebookRuntimeTemplateRef. +message NotebookRuntimeTemplateRef { + // Immutable. A resource name of the NotebookRuntimeTemplate. + string notebook_runtime_template = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/NotebookRuntimeTemplate" + } + ]; +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/notebook_service.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/notebook_service.proto new file mode 100644 index 000000000000..3669f7fe6e29 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/notebook_service.proto @@ -0,0 +1,512 @@ +// 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/aiplatform/v1/notebook_runtime.proto"; +import "google/cloud/aiplatform/v1/operation.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; + +option csharp_namespace = "Google.Cloud.AIPlatform.V1"; +option go_package = "cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb"; +option java_multiple_files = true; +option java_outer_classname = "NotebookServiceProto"; +option java_package = "com.google.cloud.aiplatform.v1"; +option php_namespace = "Google\\Cloud\\AIPlatform\\V1"; +option ruby_package = "Google::Cloud::AIPlatform::V1"; + +// The interface for Vertex Notebook service (a.k.a. Colab on Workbench). +service NotebookService { + option (google.api.default_host) = "aiplatform.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Creates a NotebookRuntimeTemplate. + rpc CreateNotebookRuntimeTemplate(CreateNotebookRuntimeTemplateRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/notebookRuntimeTemplates" + body: "notebook_runtime_template" + }; + option (google.api.method_signature) = + "parent,notebook_runtime_template,notebook_runtime_template_id"; + option (google.longrunning.operation_info) = { + response_type: "NotebookRuntimeTemplate" + metadata_type: "CreateNotebookRuntimeTemplateOperationMetadata" + }; + } + + // Gets a NotebookRuntimeTemplate. + rpc GetNotebookRuntimeTemplate(GetNotebookRuntimeTemplateRequest) + returns (NotebookRuntimeTemplate) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists NotebookRuntimeTemplates in a Location. + rpc ListNotebookRuntimeTemplates(ListNotebookRuntimeTemplatesRequest) + returns (ListNotebookRuntimeTemplatesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/notebookRuntimeTemplates" + }; + option (google.api.method_signature) = "parent"; + } + + // Deletes a NotebookRuntimeTemplate. + rpc DeleteNotebookRuntimeTemplate(DeleteNotebookRuntimeTemplateRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "DeleteOperationMetadata" + }; + } + + // Assigns a NotebookRuntime to a user for a particular Notebook file. This + // method will either returns an existing assignment or generates a new one. + rpc AssignNotebookRuntime(AssignNotebookRuntimeRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/notebookRuntimes:assign" + body: "*" + }; + option (google.api.method_signature) = + "parent,notebook_runtime_template,notebook_runtime,notebook_runtime_id"; + option (google.longrunning.operation_info) = { + response_type: "NotebookRuntime" + metadata_type: "AssignNotebookRuntimeOperationMetadata" + }; + } + + // Gets a NotebookRuntime. + rpc GetNotebookRuntime(GetNotebookRuntimeRequest) returns (NotebookRuntime) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/notebookRuntimes/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists NotebookRuntimes in a Location. + rpc ListNotebookRuntimes(ListNotebookRuntimesRequest) + returns (ListNotebookRuntimesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/notebookRuntimes" + }; + option (google.api.method_signature) = "parent"; + } + + // Deletes a NotebookRuntime. + rpc DeleteNotebookRuntime(DeleteNotebookRuntimeRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/notebookRuntimes/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "DeleteOperationMetadata" + }; + } + + // Upgrades a NotebookRuntime. + rpc UpgradeNotebookRuntime(UpgradeNotebookRuntimeRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/notebookRuntimes/*}:upgrade" + body: "*" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "UpgradeNotebookRuntimeResponse" + metadata_type: "UpgradeNotebookRuntimeOperationMetadata" + }; + } + + // Starts a NotebookRuntime. + rpc StartNotebookRuntime(StartNotebookRuntimeRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/notebookRuntimes/*}:start" + body: "*" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "StartNotebookRuntimeResponse" + metadata_type: "StartNotebookRuntimeOperationMetadata" + }; + } +} + +// Request message for +// [NotebookService.CreateNotebookRuntimeTemplate][google.cloud.aiplatform.v1.NotebookService.CreateNotebookRuntimeTemplate]. +message CreateNotebookRuntimeTemplateRequest { + // Required. The resource name of the Location to create the + // NotebookRuntimeTemplate. Format: `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. The NotebookRuntimeTemplate to create. + NotebookRuntimeTemplate notebook_runtime_template = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. User specified ID for the notebook runtime template. + string notebook_runtime_template_id = 3 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Metadata information for +// [NotebookService.CreateNotebookRuntimeTemplate][google.cloud.aiplatform.v1.NotebookService.CreateNotebookRuntimeTemplate]. +message CreateNotebookRuntimeTemplateOperationMetadata { + // The operation generic information. + GenericOperationMetadata generic_metadata = 1; +} + +// Request message for +// [NotebookService.GetNotebookRuntimeTemplate][google.cloud.aiplatform.v1.NotebookService.GetNotebookRuntimeTemplate] +message GetNotebookRuntimeTemplateRequest { + // Required. The name of the NotebookRuntimeTemplate resource. + // Format: + // `projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/NotebookRuntimeTemplate" + } + ]; +} + +// Request message for +// [NotebookService.ListNotebookRuntimeTemplates][google.cloud.aiplatform.v1.NotebookService.ListNotebookRuntimeTemplates]. +message ListNotebookRuntimeTemplatesRequest { + // Required. The resource name of the Location from which to list the + // NotebookRuntimeTemplates. + // Format: `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Optional. An expression for filtering the results of the request. For field + // names both snake_case and camelCase are supported. + // + // * `notebookRuntimeTemplate` supports = and !=. `notebookRuntimeTemplate` + // represents the NotebookRuntimeTemplate ID, + // i.e. the last segment of the NotebookRuntimeTemplate's [resource name] + // [google.cloud.aiplatform.v1.NotebookRuntimeTemplate.name]. + // * `display_name` supports = and != + // * `labels` supports general map functions that is: + // * `labels.key=value` - key:value equality + // * `labels.key:* or labels:key - key existence + // * A key including a space must be quoted. `labels."a key"`. + // * `notebookRuntimeType` supports = and !=. notebookRuntimeType enum: + // [USER_DEFINED, ONE_CLICK]. + // + // Some examples: + // + // * `notebookRuntimeTemplate=notebookRuntimeTemplate123` + // * `displayName="myDisplayName"` + // * `labels.myKey="myValue"` + // * `notebookRuntimeType=USER_DEFINED` + string filter = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The standard list page size. + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The standard list page token. + // Typically obtained via + // [ListNotebookRuntimeTemplatesResponse.next_page_token][google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse.next_page_token] + // of the previous + // [NotebookService.ListNotebookRuntimeTemplates][google.cloud.aiplatform.v1.NotebookService.ListNotebookRuntimeTemplates] + // call. + string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Mask specifying which fields to read. + google.protobuf.FieldMask read_mask = 5 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A comma-separated list of fields to order by, sorted in ascending + // order. Use "desc" after a field name for descending. Supported fields: + // + // * `display_name` + // * `create_time` + // * `update_time` + // + // Example: `display_name, create_time desc`. + string order_by = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for +// [NotebookService.ListNotebookRuntimeTemplates][google.cloud.aiplatform.v1.NotebookService.ListNotebookRuntimeTemplates]. +message ListNotebookRuntimeTemplatesResponse { + // List of NotebookRuntimeTemplates in the requested page. + repeated NotebookRuntimeTemplate notebook_runtime_templates = 1; + + // A token to retrieve next page of results. + // Pass to + // [ListNotebookRuntimeTemplatesRequest.page_token][google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest.page_token] + // to obtain that page. + string next_page_token = 2; +} + +// Request message for +// [NotebookService.DeleteNotebookRuntimeTemplate][google.cloud.aiplatform.v1.NotebookService.DeleteNotebookRuntimeTemplate]. +message DeleteNotebookRuntimeTemplateRequest { + // Required. The name of the NotebookRuntimeTemplate resource to be deleted. + // Format: + // `projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/NotebookRuntimeTemplate" + } + ]; +} + +// Request message for +// [NotebookService.AssignNotebookRuntime][google.cloud.aiplatform.v1.NotebookService.AssignNotebookRuntime]. +message AssignNotebookRuntimeRequest { + // Required. The resource name of the Location to get the NotebookRuntime + // assignment. Format: `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. The resource name of the NotebookRuntimeTemplate based on which a + // NotebookRuntime will be assigned (reuse or create a new one). + string notebook_runtime_template = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/NotebookRuntimeTemplate" + } + ]; + + // Required. Provide runtime specific information (e.g. runtime owner, + // notebook id) used for NotebookRuntime assignment. + NotebookRuntime notebook_runtime = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. User specified ID for the notebook runtime. + string notebook_runtime_id = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Metadata information for +// [NotebookService.AssignNotebookRuntime][google.cloud.aiplatform.v1.NotebookService.AssignNotebookRuntime]. +message AssignNotebookRuntimeOperationMetadata { + // The operation generic information. + GenericOperationMetadata generic_metadata = 1; + + // A human-readable message that shows the intermediate progress details of + // NotebookRuntime. + string progress_message = 2; +} + +// Request message for +// [NotebookService.GetNotebookRuntime][google.cloud.aiplatform.v1.NotebookService.GetNotebookRuntime] +message GetNotebookRuntimeRequest { + // Required. The name of the NotebookRuntime resource. + // Instead of checking whether the name is in valid NotebookRuntime resource + // name format, directly throw NotFound exception if there is no such + // NotebookRuntime in spanner. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/NotebookRuntime" + } + ]; +} + +// Request message for +// [NotebookService.ListNotebookRuntimes][google.cloud.aiplatform.v1.NotebookService.ListNotebookRuntimes]. +message ListNotebookRuntimesRequest { + // Required. The resource name of the Location from which to list the + // NotebookRuntimes. + // Format: `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Optional. An expression for filtering the results of the request. For field + // names both snake_case and camelCase are supported. + // + // * `notebookRuntime` supports = and !=. `notebookRuntime` represents the + // NotebookRuntime ID, + // i.e. the last segment of the NotebookRuntime's [resource name] + // [google.cloud.aiplatform.v1.NotebookRuntime.name]. + // * `displayName` supports = and != and regex. + // * `notebookRuntimeTemplate` supports = and !=. `notebookRuntimeTemplate` + // represents the NotebookRuntimeTemplate ID, + // i.e. the last segment of the NotebookRuntimeTemplate's [resource name] + // [google.cloud.aiplatform.v1.NotebookRuntimeTemplate.name]. + // * `healthState` supports = and !=. healthState enum: [HEALTHY, UNHEALTHY, + // HEALTH_STATE_UNSPECIFIED]. + // * `runtimeState` supports = and !=. runtimeState enum: + // [RUNTIME_STATE_UNSPECIFIED, RUNNING, BEING_STARTED, BEING_STOPPED, + // STOPPED, BEING_UPGRADED, ERROR, INVALID]. + // * `runtimeUser` supports = and !=. + // * API version is UI only: `uiState` supports = and !=. uiState enum: + // [UI_RESOURCE_STATE_UNSPECIFIED, UI_RESOURCE_STATE_BEING_CREATED, + // UI_RESOURCE_STATE_ACTIVE, UI_RESOURCE_STATE_BEING_DELETED, + // UI_RESOURCE_STATE_CREATION_FAILED]. + // * `notebookRuntimeType` supports = and !=. notebookRuntimeType enum: + // [USER_DEFINED, ONE_CLICK]. + // + // Some examples: + // + // * `notebookRuntime="notebookRuntime123"` + // * `displayName="myDisplayName"` and `displayName=~"myDisplayNameRegex"` + // * `notebookRuntimeTemplate="notebookRuntimeTemplate321"` + // * `healthState=HEALTHY` + // * `runtimeState=RUNNING` + // * `runtimeUser="test@google.com"` + // * `uiState=UI_RESOURCE_STATE_BEING_DELETED` + // * `notebookRuntimeType=USER_DEFINED` + string filter = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The standard list page size. + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The standard list page token. + // Typically obtained via + // [ListNotebookRuntimesResponse.next_page_token][google.cloud.aiplatform.v1.ListNotebookRuntimesResponse.next_page_token] + // of the previous + // [NotebookService.ListNotebookRuntimes][google.cloud.aiplatform.v1.NotebookService.ListNotebookRuntimes] + // call. + string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Mask specifying which fields to read. + google.protobuf.FieldMask read_mask = 5 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A comma-separated list of fields to order by, sorted in ascending + // order. Use "desc" after a field name for descending. Supported fields: + // + // * `display_name` + // * `create_time` + // * `update_time` + // + // Example: `display_name, create_time desc`. + string order_by = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for +// [NotebookService.ListNotebookRuntimes][google.cloud.aiplatform.v1.NotebookService.ListNotebookRuntimes]. +message ListNotebookRuntimesResponse { + // List of NotebookRuntimes in the requested page. + repeated NotebookRuntime notebook_runtimes = 1; + + // A token to retrieve next page of results. + // Pass to + // [ListNotebookRuntimesRequest.page_token][google.cloud.aiplatform.v1.ListNotebookRuntimesRequest.page_token] + // to obtain that page. + string next_page_token = 2; +} + +// Request message for +// [NotebookService.DeleteNotebookRuntime][google.cloud.aiplatform.v1.NotebookService.DeleteNotebookRuntime]. +message DeleteNotebookRuntimeRequest { + // Required. The name of the NotebookRuntime resource to be deleted. + // Instead of checking whether the name is in valid NotebookRuntime resource + // name format, directly throw NotFound exception if there is no such + // NotebookRuntime in spanner. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/NotebookRuntime" + } + ]; +} + +// Request message for +// [NotebookService.UpgradeNotebookRuntime][google.cloud.aiplatform.v1.NotebookService.UpgradeNotebookRuntime]. +message UpgradeNotebookRuntimeRequest { + // Required. The name of the NotebookRuntime resource to be upgrade. + // Instead of checking whether the name is in valid NotebookRuntime resource + // name format, directly throw NotFound exception if there is no such + // NotebookRuntime in spanner. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/NotebookRuntime" + } + ]; +} + +// Metadata information for +// [NotebookService.UpgradeNotebookRuntime][google.cloud.aiplatform.v1.NotebookService.UpgradeNotebookRuntime]. +message UpgradeNotebookRuntimeOperationMetadata { + // The operation generic information. + GenericOperationMetadata generic_metadata = 1; + + // A human-readable message that shows the intermediate progress details of + // NotebookRuntime. + string progress_message = 2; +} + +// Response message for +// [NotebookService.UpgradeNotebookRuntime][google.cloud.aiplatform.v1.NotebookService.UpgradeNotebookRuntime]. +message UpgradeNotebookRuntimeResponse {} + +// Request message for +// [NotebookService.StartNotebookRuntime][google.cloud.aiplatform.v1.NotebookService.StartNotebookRuntime]. +message StartNotebookRuntimeRequest { + // Required. The name of the NotebookRuntime resource to be started. + // Instead of checking whether the name is in valid NotebookRuntime resource + // name format, directly throw NotFound exception if there is no such + // NotebookRuntime in spanner. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/NotebookRuntime" + } + ]; +} + +// Metadata information for +// [NotebookService.StartNotebookRuntime][google.cloud.aiplatform.v1.NotebookService.StartNotebookRuntime]. +message StartNotebookRuntimeOperationMetadata { + // The operation generic information. + GenericOperationMetadata generic_metadata = 1; + + // A human-readable message that shows the intermediate progress details of + // NotebookRuntime. + string progress_message = 2; +} + +// Response message for +// [NotebookService.StartNotebookRuntime][google.cloud.aiplatform.v1.NotebookService.StartNotebookRuntime]. +message StartNotebookRuntimeResponse {} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/openapi.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/openapi.proto index dfdcd0a4264f..694a5675313f 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/openapi.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/openapi.proto @@ -62,30 +62,69 @@ message Schema { // Optional. The format of the data. // Supported formats: - // for NUMBER type: float, double - // for INTEGER type: int32, int64 + // for NUMBER type: "float", "double" + // for INTEGER type: "int32", "int64" + // for STRING type: "email", "byte", etc string format = 7 [(google.api.field_behavior) = OPTIONAL]; + // Optional. The title of the Schema. + string title = 24 [(google.api.field_behavior) = OPTIONAL]; + // Optional. The description of the data. string description = 8 [(google.api.field_behavior) = OPTIONAL]; // Optional. Indicates if the value may be null. bool nullable = 6 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Schema of the elements of Type.ARRAY. + // Optional. Default value of the data. + google.protobuf.Value default = 23 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. SCHEMA FIELDS FOR TYPE ARRAY + // Schema of the elements of Type.ARRAY. Schema items = 2 [(google.api.field_behavior) = OPTIONAL]; + // Optional. Minimum number of the elements for Type.ARRAY. + int64 min_items = 21 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Maximum number of the elements for Type.ARRAY. + int64 max_items = 22 [(google.api.field_behavior) = OPTIONAL]; + // Optional. Possible values of the element of Type.STRING with enum format. // For example we can define an Enum Direction as : // {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]} repeated string enum = 9 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Properties of Type.OBJECT. + // Optional. SCHEMA FIELDS FOR TYPE OBJECT + // Properties of Type.OBJECT. map properties = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. Required properties of Type.OBJECT. repeated string required = 5 [(google.api.field_behavior) = OPTIONAL]; + // Optional. Minimum number of the properties for Type.OBJECT. + int64 min_properties = 14 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Maximum number of the properties for Type.OBJECT. + int64 max_properties = 15 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER + // Minimum value of the Type.INTEGER and Type.NUMBER + double minimum = 16 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Maximum value of the Type.INTEGER and Type.NUMBER + double maximum = 17 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. SCHEMA FIELDS FOR TYPE STRING + // Minimum length of the Type.STRING + int64 min_length = 18 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Maximum length of the Type.STRING + int64 max_length = 19 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Pattern of the Type.STRING to restrict a string to a regular + // expression. + string pattern = 20 [(google.api.field_behavior) = OPTIONAL]; + // Optional. Example of the object. Will only populated when the object is the // root. google.protobuf.Value example = 4 [(google.api.field_behavior) = OPTIONAL]; diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/persistent_resource.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/persistent_resource.proto new file mode 100644 index 000000000000..03b4914f2c67 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/persistent_resource.proto @@ -0,0 +1,246 @@ +// 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/aiplatform/v1/encryption_spec.proto"; +import "google/cloud/aiplatform/v1/machine_resources.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Cloud.AIPlatform.V1"; +option go_package = "cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb"; +option java_multiple_files = true; +option java_outer_classname = "PersistentResourceProto"; +option java_package = "com.google.cloud.aiplatform.v1"; +option php_namespace = "Google\\Cloud\\AIPlatform\\V1"; +option ruby_package = "Google::Cloud::AIPlatform::V1"; + +// Represents long-lasting resources that are dedicated to users to runs custom +// workloads. +// A PersistentResource can have multiple node pools and each node +// pool can have its own machine spec. +message PersistentResource { + option (google.api.resource) = { + type: "aiplatform.googleapis.com/PersistentResource" + pattern: "projects/{project}/locations/{location}/persistentResources/{persistent_resource}" + }; + + // Describes the PersistentResource state. + enum State { + // Not set. + STATE_UNSPECIFIED = 0; + + // The PROVISIONING state indicates the persistent resources is being + // created. + PROVISIONING = 1; + + // The RUNNING state indicates the persistent resource is healthy and fully + // usable. + RUNNING = 3; + + // The STOPPING state indicates the persistent resource is being deleted. + STOPPING = 4; + + // The ERROR state indicates the persistent resource may be unusable. + // Details can be found in the `error` field. + ERROR = 5; + + // The REBOOTING state indicates the persistent resource is being rebooted + // (PR is not available right now but is expected to be ready again later). + REBOOTING = 6; + + // The UPDATING state indicates the persistent resource is being updated. + UPDATING = 7; + } + + // Immutable. Resource name of a PersistentResource. + string name = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // Optional. The display name of the PersistentResource. + // The name can be up to 128 characters long and can consist of any UTF-8 + // characters. + string display_name = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The spec of the pools of different resources. + repeated ResourcePool resource_pools = 4 + [(google.api.field_behavior) = REQUIRED]; + + // Output only. The detailed state of a Study. + State state = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Only populated when persistent resource's state is `STOPPING` + // or `ERROR`. + google.rpc.Status error = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when the PersistentResource was created. + google.protobuf.Timestamp create_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when the PersistentResource for the first time entered + // the `RUNNING` state. + google.protobuf.Timestamp start_time = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when the PersistentResource was most recently updated. + google.protobuf.Timestamp update_time = 9 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The labels with user-defined metadata to organize + // PersistentResource. + // + // Label keys and values can be no longer than 64 characters + // (Unicode codepoints), can only contain lowercase letters, numeric + // characters, underscores and dashes. International characters are allowed. + // + // See https://goo.gl/xmQnxf for more information and examples of labels. + map labels = 10 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The full name of the Compute Engine + // [network](/compute/docs/networks-and-firewalls#networks) to peered with + // Vertex AI to host the persistent resources. + // For example, `projects/12345/global/networks/myVPC`. + // [Format](/compute/docs/reference/rest/v1/networks/insert) + // is of the form `projects/{project}/global/networks/{network}`. + // Where {project} is a project number, as in `12345`, and {network} is a + // network name. + // + // To specify this field, you must have already [configured VPC Network + // Peering for Vertex + // AI](https://cloud.google.com/vertex-ai/docs/general/vpc-peering). + // + // If this field is left unspecified, the resources aren't peered with any + // network. + string network = 11 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { type: "compute.googleapis.com/Network" } + ]; + + // Optional. Customer-managed encryption key spec for a PersistentResource. + // If set, this PersistentResource and all sub-resources of this + // PersistentResource will be secured by this key. + EncryptionSpec encryption_spec = 12 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Persistent Resource runtime spec. + // For example, used for Ray cluster configuration. + ResourceRuntimeSpec resource_runtime_spec = 13 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Runtime information of the Persistent Resource. + ResourceRuntime resource_runtime = 14 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. A list of names for the reserved IP ranges under the VPC network + // that can be used for this persistent resource. + // + // If set, we will deploy the persistent resource within the provided IP + // ranges. Otherwise, the persistent resource is deployed to any IP + // ranges under the provided VPC network. + // + // Example: ['vertex-ai-ip-range']. + repeated string reserved_ip_ranges = 15 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Represents the spec of a group of resources of the same type, +// for example machine type, disk, and accelerators, in a PersistentResource. +message ResourcePool { + // The min/max number of replicas allowed if enabling autoscaling + message AutoscalingSpec { + // Optional. min replicas in the node pool, + // must be ≤ replica_count and < max_replica_count or will throw error + optional int64 min_replica_count = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. max replicas in the node pool, + // must be ≥ replica_count and > min_replica_count or will throw error + optional int64 max_replica_count = 2 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Immutable. The unique ID in a PersistentResource for referring to this + // resource pool. User can specify it if necessary. Otherwise, it's generated + // automatically. + string id = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // Required. Immutable. The specification of a single machine. + MachineSpec machine_spec = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Optional. The total number of machines to use for this resource pool. + optional int64 replica_count = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Disk spec for the machine in this node pool. + DiskSpec disk_spec = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The number of machines currently in use by training jobs for + // this resource pool. Will replace idle_replica_count. + int64 used_replica_count = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Optional spec to configure GKE autoscaling + AutoscalingSpec autoscaling_spec = 7 [(google.api.field_behavior) = OPTIONAL]; +} + +// Configuration for the runtime on a PersistentResource instance, including +// but not limited to: +// +// * Service accounts used to run the workloads. +// * Whether to make it a dedicated Ray Cluster. +message ResourceRuntimeSpec { + // Optional. Configure the use of workload identity on the PersistentResource + ServiceAccountSpec service_account_spec = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Ray cluster configuration. + // Required when creating a dedicated RayCluster on the PersistentResource. + RaySpec ray_spec = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// Configuration information for the Ray cluster. +// For experimental launch, Ray cluster creation and Persistent +// cluster creation are 1:1 mapping: We will provision all the nodes within the +// Persistent cluster as Ray nodes. +message RaySpec {} + +// Persistent Cluster runtime information as output +message ResourceRuntime {} + +// Configuration for the use of custom service account to run the workloads. +message ServiceAccountSpec { + // Required. If true, custom user-managed service account is enforced to run + // any workloads (for example, Vertex Jobs) on the resource. Otherwise, uses + // the [Vertex AI Custom Code Service + // Agent](https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents). + bool enable_custom_service_account = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. Required when all below conditions are met + // * `enable_custom_service_account` is true; + // * any runtime is specified via `ResourceRuntimeSpec` on creation time, + // for example, Ray + // + // The users must have `iam.serviceAccounts.actAs` permission on this service + // account and then the specified runtime containers will run as it. + // + // Do not set this field if you want to submit jobs using custom service + // account to this PersistentResource after creation, but only specify the + // `service_account` inside the job. + string service_account = 2 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/persistent_resource_service.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/persistent_resource_service.proto new file mode 100644 index 000000000000..edfc665ddbb7 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/persistent_resource_service.proto @@ -0,0 +1,258 @@ +// 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/aiplatform/v1/operation.proto"; +import "google/cloud/aiplatform/v1/persistent_resource.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; + +option csharp_namespace = "Google.Cloud.AIPlatform.V1"; +option go_package = "cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb"; +option java_multiple_files = true; +option java_outer_classname = "PersistentResourceServiceProto"; +option java_package = "com.google.cloud.aiplatform.v1"; +option php_namespace = "Google\\Cloud\\AIPlatform\\V1"; +option ruby_package = "Google::Cloud::AIPlatform::V1"; + +// A service for managing Vertex AI's machine learning PersistentResource. +service PersistentResourceService { + option (google.api.default_host) = "aiplatform.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Creates a PersistentResource. + rpc CreatePersistentResource(CreatePersistentResourceRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/persistentResources" + body: "persistent_resource" + }; + option (google.api.method_signature) = + "parent,persistent_resource,persistent_resource_id"; + option (google.longrunning.operation_info) = { + response_type: "PersistentResource" + metadata_type: "CreatePersistentResourceOperationMetadata" + }; + } + + // Gets a PersistentResource. + rpc GetPersistentResource(GetPersistentResourceRequest) + returns (PersistentResource) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/persistentResources/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists PersistentResources in a Location. + rpc ListPersistentResources(ListPersistentResourcesRequest) + returns (ListPersistentResourcesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/persistentResources" + }; + option (google.api.method_signature) = "parent"; + } + + // Deletes a PersistentResource. + rpc DeletePersistentResource(DeletePersistentResourceRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/persistentResources/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "DeleteOperationMetadata" + }; + } + + // Updates a PersistentResource. + rpc UpdatePersistentResource(UpdatePersistentResourceRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{persistent_resource.name=projects/*/locations/*/persistentResources/*}" + body: "persistent_resource" + }; + option (google.api.method_signature) = "persistent_resource,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "PersistentResource" + metadata_type: "UpdatePersistentResourceOperationMetadata" + }; + } + + // Reboots a PersistentResource. + rpc RebootPersistentResource(RebootPersistentResourceRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/persistentResources/*}:reboot" + body: "*" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "PersistentResource" + metadata_type: "RebootPersistentResourceOperationMetadata" + }; + } +} + +// Request message for +// [PersistentResourceService.CreatePersistentResource][google.cloud.aiplatform.v1.PersistentResourceService.CreatePersistentResource]. +message CreatePersistentResourceRequest { + // Required. The resource name of the Location to create the + // PersistentResource in. Format: `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. The PersistentResource to create. + PersistentResource persistent_resource = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The ID to use for the PersistentResource, which become the final + // component of the PersistentResource's resource name. + // + // The maximum length is 63 characters, and valid characters + // are `/^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$/`. + string persistent_resource_id = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Details of operations that perform create PersistentResource. +message CreatePersistentResourceOperationMetadata { + // Operation metadata for PersistentResource. + GenericOperationMetadata generic_metadata = 1; + + // Progress Message for Create LRO + string progress_message = 2; +} + +// Details of operations that perform update PersistentResource. +message UpdatePersistentResourceOperationMetadata { + // Operation metadata for PersistentResource. + GenericOperationMetadata generic_metadata = 1; + + // Progress Message for Update LRO + string progress_message = 2; +} + +// Details of operations that perform reboot PersistentResource. +message RebootPersistentResourceOperationMetadata { + // Operation metadata for PersistentResource. + GenericOperationMetadata generic_metadata = 1; + + // Progress Message for Reboot LRO + string progress_message = 2; +} + +// Request message for +// [PersistentResourceService.GetPersistentResource][google.cloud.aiplatform.v1.PersistentResourceService.GetPersistentResource]. +message GetPersistentResourceRequest { + // Required. The name of the PersistentResource resource. + // Format: + // `projects/{project_id_or_number}/locations/{location_id}/persistentResources/{persistent_resource_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/PersistentResource" + } + ]; +} + +// Request message for [PersistentResourceService.ListPersistentResource][]. +message ListPersistentResourcesRequest { + // Required. The resource name of the Location to list the PersistentResources + // from. Format: `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Optional. The standard list page size. + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The standard list page token. + // Typically obtained via + // [ListPersistentResourceResponse.next_page_token][] of the previous + // [PersistentResourceService.ListPersistentResource][] call. + string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for +// [PersistentResourceService.ListPersistentResources][google.cloud.aiplatform.v1.PersistentResourceService.ListPersistentResources] +message ListPersistentResourcesResponse { + repeated PersistentResource persistent_resources = 1; + + // A token to retrieve next page of results. + // Pass to + // [ListPersistentResourcesRequest.page_token][google.cloud.aiplatform.v1.ListPersistentResourcesRequest.page_token] + // to obtain that page. + string next_page_token = 2; +} + +// Request message for +// [PersistentResourceService.DeletePersistentResource][google.cloud.aiplatform.v1.PersistentResourceService.DeletePersistentResource]. +message DeletePersistentResourceRequest { + // Required. The name of the PersistentResource to be deleted. + // Format: + // `projects/{project}/locations/{location}/persistentResources/{persistent_resource}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/PersistentResource" + } + ]; +} + +// Request message for UpdatePersistentResource method. +message UpdatePersistentResourceRequest { + // Required. The PersistentResource to update. + // + // The PersistentResource's `name` field is used to identify the + // PersistentResource to update. Format: + // `projects/{project}/locations/{location}/persistentResources/{persistent_resource}` + PersistentResource persistent_resource = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. Specify the fields to be overwritten in the PersistentResource by + // the update method. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for +// [PersistentResourceService.RebootPersistentResource][google.cloud.aiplatform.v1.PersistentResourceService.RebootPersistentResource]. +message RebootPersistentResourceRequest { + // Required. The name of the PersistentResource resource. + // Format: + // `projects/{project_id_or_number}/locations/{location_id}/persistentResources/{persistent_resource_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/PersistentResource" + } + ]; +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/prediction_service.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/prediction_service.proto index e37bdb8fc655..886b3c5db174 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/prediction_service.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/prediction_service.proto @@ -648,6 +648,12 @@ message GenerateContentRequest { // request. repeated Content contents = 2 [(google.api.field_behavior) = REQUIRED]; + // Optional. The user provided system instructions for the model. + // Note: only text should be used in parts and content in each part will be in + // a separate paragraph. + optional Content system_instruction = 8 + [(google.api.field_behavior) = OPTIONAL]; + // Optional. A list of `Tools` the model may use to generate the next // response. // @@ -680,6 +686,13 @@ message GenerateContentResponse { // Candidates blocked due to other reason. OTHER = 2; + + // Candidates blocked due to the terms which are included from the + // terminology blocklist. + BLOCKLIST = 3; + + // Candidates blocked due to prohibited content. + PROHIBITED_CONTENT = 4; } // Output only. Blocked reason. diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/tool.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/tool.proto index 58dbb77e9530..adb54a79e2b3 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/tool.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/tool.proto @@ -68,8 +68,8 @@ message Tool { message FunctionDeclaration { // Required. The name of the function to call. // Must start with a letter or an underscore. - // Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum - // length of 64. + // Must be a-z, A-Z, 0-9, or contain underscores, dots and dashes, with a + // maximum length of 64. string name = 1 [(google.api.field_behavior) = REQUIRED]; // Optional. Description and purpose of the function. @@ -80,8 +80,10 @@ message FunctionDeclaration { // format. Reflects the Open API 3.03 Parameter Object. string Key: the name // of the parameter. Parameter names are case sensitive. Schema Value: the // Schema defining the type used for the parameter. For function with no - // parameters, this can be left unset. Example with 1 required and 1 optional - // parameter: type: OBJECT properties: + // parameters, this can be left unset. Parameter names must start with a + // letter or an underscore and must only contain chars a-z, A-Z, 0-9, or + // underscores with a maximum length of 64. Example with 1 required and 1 + // optional parameter: type: OBJECT properties: // param1: // type: STRING // param2: @@ -135,7 +137,7 @@ message Retrieval { message VertexAISearch { // Required. Fully-qualified Vertex AI Search's datastore resource ID. // Format: - // projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore} + // `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}` string datastore = 1 [(google.api.field_behavior) = REQUIRED]; } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/tuning_job.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/tuning_job.proto new file mode 100644 index 000000000000..466276a80553 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/tuning_job.proto @@ -0,0 +1,279 @@ +// Copyright 2024 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/aiplatform/v1/content.proto"; +import "google/cloud/aiplatform/v1/job_state.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Cloud.AIPlatform.V1"; +option go_package = "cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb"; +option java_multiple_files = true; +option java_outer_classname = "TuningJobProto"; +option java_package = "com.google.cloud.aiplatform.v1"; +option php_namespace = "Google\\Cloud\\AIPlatform\\V1"; +option ruby_package = "Google::Cloud::AIPlatform::V1"; + +// Represents a TuningJob that runs with Google owned models. +message TuningJob { + option (google.api.resource) = { + type: "aiplatform.googleapis.com/TuningJob" + pattern: "projects/{project}/locations/{location}/tuningJobs/{tuning_job}" + plural: "tuningJobs" + singular: "tuningJob" + }; + + oneof source_model { + // Model name for tuning, e.g., "gemini-1.0-pro-002". + string base_model = 4; + } + + oneof tuning_spec { + // Tuning Spec for Supervised Fine Tuning. + SupervisedTuningSpec supervised_tuning_spec = 5; + } + + // Output only. Identifier. Resource name of a TuningJob. Format: + // `projects/{project}/locations/{location}/tuningJobs/{tuning_job}` + string name = 1 [ + (google.api.field_behavior) = IDENTIFIER, + (google.api.field_behavior) = OUTPUT_ONLY + ]; + + // Optional. The display name of the + // [TunedModel][google.cloud.aiplatform.v1.Model]. The name can be up to + // 128 characters long and can consist of any UTF-8 characters. + string tuned_model_display_name = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The description of the + // [TuningJob][google.cloud.aiplatform.v1.TuningJob]. + string description = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The detailed state of the job. + JobState state = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when the + // [TuningJob][google.cloud.aiplatform.v1.TuningJob] was created. + google.protobuf.Timestamp create_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when the + // [TuningJob][google.cloud.aiplatform.v1.TuningJob] for the first time + // entered the `JOB_STATE_RUNNING` state. + google.protobuf.Timestamp start_time = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when the TuningJob entered any of the following + // [JobStates][google.cloud.aiplatform.v1.JobState]: `JOB_STATE_SUCCEEDED`, + // `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`, `JOB_STATE_EXPIRED`. + google.protobuf.Timestamp end_time = 9 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when the + // [TuningJob][google.cloud.aiplatform.v1.TuningJob] was most recently + // updated. + google.protobuf.Timestamp update_time = 10 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Only populated when job's state is `JOB_STATE_FAILED` or + // `JOB_STATE_CANCELLED`. + google.rpc.Status error = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The labels with user-defined metadata to organize + // [TuningJob][google.cloud.aiplatform.v1.TuningJob] and generated resources + // such as [Model][google.cloud.aiplatform.v1.Model] and + // [Endpoint][google.cloud.aiplatform.v1.Endpoint]. + // + // Label keys and values can be no longer than 64 characters + // (Unicode codepoints), can only contain lowercase letters, numeric + // characters, underscores and dashes. International characters are allowed. + // + // See https://goo.gl/xmQnxf for more information and examples of labels. + map labels = 12 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The Experiment associated with this + // [TuningJob][google.cloud.aiplatform.v1.TuningJob]. + string experiment = 13 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/Context" + } + ]; + + // Output only. The tuned model resources assiociated with this + // [TuningJob][google.cloud.aiplatform.v1.TuningJob]. + TunedModel tuned_model = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The tuning data statistics associated with this + // [TuningJob][google.cloud.aiplatform.v1.TuningJob]. + TuningDataStats tuning_data_stats = 15 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The Model Registry Model and Online Prediction Endpoint assiociated with +// this [TuningJob][google.cloud.aiplatform.v1.TuningJob]. +message TunedModel { + // Output only. The resource name of the TunedModel. Format: + // `projects/{project}/locations/{location}/models/{model}`. + string model = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/Model" + } + ]; + + // Output only. A resource name of an Endpoint. Format: + // `projects/{project}/locations/{location}/endpoints/{endpoint}`. + string endpoint = 2 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/Endpoint" + } + ]; +} + +// Dataset distribution for Supervised Tuning. +message SupervisedTuningDatasetDistribution { + // Dataset bucket used to create a histogram for the distribution given a + // population of values. + message DatasetBucket { + // Output only. Number of values in the bucket. + double count = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Left bound of the bucket. + double left = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Right bound of the bucket. + double right = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. Sum of a given population of values. + int64 sum = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The minimum of the population values. + double min = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The maximum of the population values. + double max = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The arithmetic mean of the values in the population. + double mean = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The median of the values in the population. + double median = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The 5th percentile of the values in the population. + double p5 = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The 95th percentile of the values in the population. + double p95 = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Defines the histogram bucket. + repeated DatasetBucket buckets = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Tuning data statistics for Supervised Tuning. +message SupervisedTuningDataStats { + // Output only. Number of examples in the tuning dataset. + int64 tuning_dataset_example_count = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Number of tuning characters in the tuning dataset. + int64 total_tuning_character_count = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Number of billable characters in the tuning dataset. + int64 total_billable_character_count = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Number of tuning steps for this Tuning Job. + int64 tuning_step_count = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Dataset distributions for the user input tokens. + SupervisedTuningDatasetDistribution user_input_token_distribution = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Dataset distributions for the user output tokens. + SupervisedTuningDatasetDistribution user_output_token_distribution = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Dataset distributions for the messages per example. + SupervisedTuningDatasetDistribution user_message_per_example_distribution = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Sample user messages in the training dataset uri. + repeated Content user_dataset_examples = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The tuning data statistic values for +// [TuningJob][google.cloud.aiplatform.v1.TuningJob]. +message TuningDataStats { + oneof tuning_data_stats { + // The SFT Tuning data stats. + SupervisedTuningDataStats supervised_tuning_data_stats = 1; + } +} + +// Hyperparameters for SFT. +message SupervisedHyperParameters { + // Supported adapter sizes for tuning. + enum AdapterSize { + // Adapter size is unspecified. + ADAPTER_SIZE_UNSPECIFIED = 0; + + // Adapter size 1. + ADAPTER_SIZE_ONE = 1; + + // Adapter size 4. + ADAPTER_SIZE_FOUR = 2; + + // Adapter size 8. + ADAPTER_SIZE_EIGHT = 3; + + // Adapter size 16. + ADAPTER_SIZE_SIXTEEN = 4; + } + + // Optional. Number of training epoches for this tuning job. + int64 epoch_count = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Learning rate multiplier for tuning. + double learning_rate_multiplier = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Adapter size for tuning. + AdapterSize adapter_size = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Tuning Spec for Supervised Tuning. +message SupervisedTuningSpec { + // Required. Cloud Storage path to file containing training dataset for + // tuning. + string training_dataset_uri = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Cloud Storage path to file containing validation dataset for + // tuning. + string validation_dataset_uri = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Hyperparameters for SFT. + SupervisedHyperParameters hyper_parameters = 3 + [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/AssignNotebookRuntimeOperationMetadata.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/AssignNotebookRuntimeOperationMetadata.java new file mode 100644 index 000000000000..edf1e11de9a1 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/AssignNotebookRuntimeOperationMetadata.java @@ -0,0 +1,948 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/notebook_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Metadata information for
+ * [NotebookService.AssignNotebookRuntime][google.cloud.aiplatform.v1beta1.NotebookService.AssignNotebookRuntime].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeOperationMetadata} + */ +public final class AssignNotebookRuntimeOperationMetadata + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeOperationMetadata) + AssignNotebookRuntimeOperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use AssignNotebookRuntimeOperationMetadata.newBuilder() to construct. + private AssignNotebookRuntimeOperationMetadata( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AssignNotebookRuntimeOperationMetadata() { + progressMessage_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AssignNotebookRuntimeOperationMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_AssignNotebookRuntimeOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_AssignNotebookRuntimeOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeOperationMetadata.class, + com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeOperationMetadata.Builder + .class); + } + + private int bitField0_; + public static final int GENERIC_METADATA_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata genericMetadata_; + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + @java.lang.Override + public boolean hasGenericMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata getGenericMetadata() { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder() { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + + public static final int PROGRESS_MESSAGE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object progressMessage_ = ""; + /** + * + * + *
+   * A human-readable message that shows the intermediate progress details of
+   * NotebookRuntime.
+   * 
+ * + * string progress_message = 2; + * + * @return The progressMessage. + */ + @java.lang.Override + public java.lang.String getProgressMessage() { + java.lang.Object ref = progressMessage_; + 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(); + progressMessage_ = s; + return s; + } + } + /** + * + * + *
+   * A human-readable message that shows the intermediate progress details of
+   * NotebookRuntime.
+   * 
+ * + * string progress_message = 2; + * + * @return The bytes for progressMessage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProgressMessageBytes() { + java.lang.Object ref = progressMessage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + progressMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getGenericMetadata()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(progressMessage_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, progressMessage_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getGenericMetadata()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(progressMessage_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, progressMessage_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeOperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeOperationMetadata other = + (com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeOperationMetadata) obj; + + if (hasGenericMetadata() != other.hasGenericMetadata()) return false; + if (hasGenericMetadata()) { + if (!getGenericMetadata().equals(other.getGenericMetadata())) return false; + } + if (!getProgressMessage().equals(other.getProgressMessage())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasGenericMetadata()) { + hash = (37 * hash) + GENERIC_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getGenericMetadata().hashCode(); + } + hash = (37 * hash) + PROGRESS_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getProgressMessage().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeOperationMetadata + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeOperationMetadata + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeOperationMetadata + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeOperationMetadata + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeOperationMetadata + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeOperationMetadata + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeOperationMetadata + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeOperationMetadata + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeOperationMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeOperationMetadata + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeOperationMetadata + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeOperationMetadata + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeOperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Metadata information for
+   * [NotebookService.AssignNotebookRuntime][google.cloud.aiplatform.v1beta1.NotebookService.AssignNotebookRuntime].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeOperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeOperationMetadata) + com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeOperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_AssignNotebookRuntimeOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_AssignNotebookRuntimeOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeOperationMetadata.class, + com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeOperationMetadata.Builder + .class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeOperationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getGenericMetadataFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + genericMetadata_ = null; + if (genericMetadataBuilder_ != null) { + genericMetadataBuilder_.dispose(); + genericMetadataBuilder_ = null; + } + progressMessage_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_AssignNotebookRuntimeOperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeOperationMetadata + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeOperationMetadata + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeOperationMetadata build() { + com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeOperationMetadata result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeOperationMetadata + buildPartial() { + com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeOperationMetadata result = + new com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeOperationMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeOperationMetadata result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.genericMetadata_ = + genericMetadataBuilder_ == null ? genericMetadata_ : genericMetadataBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.progressMessage_ = progressMessage_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeOperationMetadata) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeOperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeOperationMetadata other) { + if (other + == com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeOperationMetadata + .getDefaultInstance()) return this; + if (other.hasGenericMetadata()) { + mergeGenericMetadata(other.getGenericMetadata()); + } + if (!other.getProgressMessage().isEmpty()) { + progressMessage_ = other.progressMessage_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getGenericMetadataFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + progressMessage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata genericMetadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadataOrBuilder> + genericMetadataBuilder_; + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + public boolean hasGenericMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + public com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata getGenericMetadata() { + if (genericMetadataBuilder_ == null) { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } else { + return genericMetadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder setGenericMetadata( + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata value) { + if (genericMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + genericMetadata_ = value; + } else { + genericMetadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder setGenericMetadata( + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.Builder builderForValue) { + if (genericMetadataBuilder_ == null) { + genericMetadata_ = builderForValue.build(); + } else { + genericMetadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder mergeGenericMetadata( + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata value) { + if (genericMetadataBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && genericMetadata_ != null + && genericMetadata_ + != com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata + .getDefaultInstance()) { + getGenericMetadataBuilder().mergeFrom(value); + } else { + genericMetadata_ = value; + } + } else { + genericMetadataBuilder_.mergeFrom(value); + } + if (genericMetadata_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder clearGenericMetadata() { + bitField0_ = (bitField0_ & ~0x00000001); + genericMetadata_ = null; + if (genericMetadataBuilder_ != null) { + genericMetadataBuilder_.dispose(); + genericMetadataBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + public com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.Builder + getGenericMetadataBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getGenericMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + public com.google.cloud.aiplatform.v1beta1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder() { + if (genericMetadataBuilder_ != null) { + return genericMetadataBuilder_.getMessageOrBuilder(); + } else { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadataOrBuilder> + getGenericMetadataFieldBuilder() { + if (genericMetadataBuilder_ == null) { + genericMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadataOrBuilder>( + getGenericMetadata(), getParentForChildren(), isClean()); + genericMetadata_ = null; + } + return genericMetadataBuilder_; + } + + private java.lang.Object progressMessage_ = ""; + /** + * + * + *
+     * A human-readable message that shows the intermediate progress details of
+     * NotebookRuntime.
+     * 
+ * + * string progress_message = 2; + * + * @return The progressMessage. + */ + public java.lang.String getProgressMessage() { + java.lang.Object ref = progressMessage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + progressMessage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A human-readable message that shows the intermediate progress details of
+     * NotebookRuntime.
+     * 
+ * + * string progress_message = 2; + * + * @return The bytes for progressMessage. + */ + public com.google.protobuf.ByteString getProgressMessageBytes() { + java.lang.Object ref = progressMessage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + progressMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A human-readable message that shows the intermediate progress details of
+     * NotebookRuntime.
+     * 
+ * + * string progress_message = 2; + * + * @param value The progressMessage to set. + * @return This builder for chaining. + */ + public Builder setProgressMessage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + progressMessage_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * A human-readable message that shows the intermediate progress details of
+     * NotebookRuntime.
+     * 
+ * + * string progress_message = 2; + * + * @return This builder for chaining. + */ + public Builder clearProgressMessage() { + progressMessage_ = getDefaultInstance().getProgressMessage(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A human-readable message that shows the intermediate progress details of
+     * NotebookRuntime.
+     * 
+ * + * string progress_message = 2; + * + * @param value The bytes for progressMessage to set. + * @return This builder for chaining. + */ + public Builder setProgressMessageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + progressMessage_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeOperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeOperationMetadata) + private static final com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeOperationMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeOperationMetadata(); + } + + public static com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeOperationMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AssignNotebookRuntimeOperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeOperationMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/AssignNotebookRuntimeOperationMetadataOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/AssignNotebookRuntimeOperationMetadataOrBuilder.java new file mode 100644 index 000000000000..2eb2e337ff95 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/AssignNotebookRuntimeOperationMetadataOrBuilder.java @@ -0,0 +1,89 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/notebook_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +public interface AssignNotebookRuntimeOperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeOperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + boolean hasGenericMetadata(); + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata getGenericMetadata(); + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder(); + + /** + * + * + *
+   * A human-readable message that shows the intermediate progress details of
+   * NotebookRuntime.
+   * 
+ * + * string progress_message = 2; + * + * @return The progressMessage. + */ + java.lang.String getProgressMessage(); + /** + * + * + *
+   * A human-readable message that shows the intermediate progress details of
+   * NotebookRuntime.
+   * 
+ * + * string progress_message = 2; + * + * @return The bytes for progressMessage. + */ + com.google.protobuf.ByteString getProgressMessageBytes(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/AssignNotebookRuntimeRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/AssignNotebookRuntimeRequest.java new file mode 100644 index 000000000000..1e7384f4f5cf --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/AssignNotebookRuntimeRequest.java @@ -0,0 +1,1361 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/notebook_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Request message for
+ * [NotebookService.AssignNotebookRuntime][google.cloud.aiplatform.v1beta1.NotebookService.AssignNotebookRuntime].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeRequest} + */ +public final class AssignNotebookRuntimeRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeRequest) + AssignNotebookRuntimeRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use AssignNotebookRuntimeRequest.newBuilder() to construct. + private AssignNotebookRuntimeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AssignNotebookRuntimeRequest() { + parent_ = ""; + notebookRuntimeTemplate_ = ""; + notebookRuntimeId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AssignNotebookRuntimeRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_AssignNotebookRuntimeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_AssignNotebookRuntimeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeRequest.class, + com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The resource name of the Location to get the NotebookRuntime
+   * assignment. Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the Location to get the NotebookRuntime
+   * assignment. Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NOTEBOOK_RUNTIME_TEMPLATE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object notebookRuntimeTemplate_ = ""; + /** + * + * + *
+   * Required. The resource name of the NotebookRuntimeTemplate based on which a
+   * NotebookRuntime will be assigned (reuse or create a new one).
+   * 
+ * + * + * string notebook_runtime_template = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The notebookRuntimeTemplate. + */ + @java.lang.Override + public java.lang.String getNotebookRuntimeTemplate() { + java.lang.Object ref = notebookRuntimeTemplate_; + 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(); + notebookRuntimeTemplate_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the NotebookRuntimeTemplate based on which a
+   * NotebookRuntime will be assigned (reuse or create a new one).
+   * 
+ * + * + * string notebook_runtime_template = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for notebookRuntimeTemplate. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNotebookRuntimeTemplateBytes() { + java.lang.Object ref = notebookRuntimeTemplate_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + notebookRuntimeTemplate_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NOTEBOOK_RUNTIME_FIELD_NUMBER = 3; + private com.google.cloud.aiplatform.v1beta1.NotebookRuntime notebookRuntime_; + /** + * + * + *
+   * Required. Provide runtime specific information (e.g. runtime owner,
+   * notebook id) used for NotebookRuntime assignment.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntime notebook_runtime = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the notebookRuntime field is set. + */ + @java.lang.Override + public boolean hasNotebookRuntime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. Provide runtime specific information (e.g. runtime owner,
+   * notebook id) used for NotebookRuntime assignment.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntime notebook_runtime = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The notebookRuntime. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NotebookRuntime getNotebookRuntime() { + return notebookRuntime_ == null + ? com.google.cloud.aiplatform.v1beta1.NotebookRuntime.getDefaultInstance() + : notebookRuntime_; + } + /** + * + * + *
+   * Required. Provide runtime specific information (e.g. runtime owner,
+   * notebook id) used for NotebookRuntime assignment.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntime notebook_runtime = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NotebookRuntimeOrBuilder + getNotebookRuntimeOrBuilder() { + return notebookRuntime_ == null + ? com.google.cloud.aiplatform.v1beta1.NotebookRuntime.getDefaultInstance() + : notebookRuntime_; + } + + public static final int NOTEBOOK_RUNTIME_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object notebookRuntimeId_ = ""; + /** + * + * + *
+   * Optional. User specified ID for the notebook runtime.
+   * 
+ * + * string notebook_runtime_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The notebookRuntimeId. + */ + @java.lang.Override + public java.lang.String getNotebookRuntimeId() { + java.lang.Object ref = notebookRuntimeId_; + 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(); + notebookRuntimeId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. User specified ID for the notebook runtime.
+   * 
+ * + * string notebook_runtime_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for notebookRuntimeId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNotebookRuntimeIdBytes() { + java.lang.Object ref = notebookRuntimeId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + notebookRuntimeId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(notebookRuntimeTemplate_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, notebookRuntimeTemplate_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getNotebookRuntime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(notebookRuntimeId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, notebookRuntimeId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(notebookRuntimeTemplate_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, notebookRuntimeTemplate_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getNotebookRuntime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(notebookRuntimeId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, notebookRuntimeId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeRequest other = + (com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getNotebookRuntimeTemplate().equals(other.getNotebookRuntimeTemplate())) return false; + if (hasNotebookRuntime() != other.hasNotebookRuntime()) return false; + if (hasNotebookRuntime()) { + if (!getNotebookRuntime().equals(other.getNotebookRuntime())) return false; + } + if (!getNotebookRuntimeId().equals(other.getNotebookRuntimeId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + NOTEBOOK_RUNTIME_TEMPLATE_FIELD_NUMBER; + hash = (53 * hash) + getNotebookRuntimeTemplate().hashCode(); + if (hasNotebookRuntime()) { + hash = (37 * hash) + NOTEBOOK_RUNTIME_FIELD_NUMBER; + hash = (53 * hash) + getNotebookRuntime().hashCode(); + } + hash = (37 * hash) + NOTEBOOK_RUNTIME_ID_FIELD_NUMBER; + hash = (53 * hash) + getNotebookRuntimeId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for
+   * [NotebookService.AssignNotebookRuntime][google.cloud.aiplatform.v1beta1.NotebookService.AssignNotebookRuntime].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeRequest) + com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_AssignNotebookRuntimeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_AssignNotebookRuntimeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeRequest.class, + com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getNotebookRuntimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + notebookRuntimeTemplate_ = ""; + notebookRuntime_ = null; + if (notebookRuntimeBuilder_ != null) { + notebookRuntimeBuilder_.dispose(); + notebookRuntimeBuilder_ = null; + } + notebookRuntimeId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_AssignNotebookRuntimeRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeRequest + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeRequest build() { + com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeRequest buildPartial() { + com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeRequest result = + new com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.notebookRuntimeTemplate_ = notebookRuntimeTemplate_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.notebookRuntime_ = + notebookRuntimeBuilder_ == null ? notebookRuntime_ : notebookRuntimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.notebookRuntimeId_ = notebookRuntimeId_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeRequest other) { + if (other + == com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getNotebookRuntimeTemplate().isEmpty()) { + notebookRuntimeTemplate_ = other.notebookRuntimeTemplate_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasNotebookRuntime()) { + mergeNotebookRuntime(other.getNotebookRuntime()); + } + if (!other.getNotebookRuntimeId().isEmpty()) { + notebookRuntimeId_ = other.notebookRuntimeId_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + notebookRuntimeTemplate_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getNotebookRuntimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + notebookRuntimeId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of the Location to get the NotebookRuntime
+     * assignment. Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Location to get the NotebookRuntime
+     * assignment. Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Location to get the NotebookRuntime
+     * assignment. Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Location to get the NotebookRuntime
+     * assignment. Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Location to get the NotebookRuntime
+     * assignment. Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object notebookRuntimeTemplate_ = ""; + /** + * + * + *
+     * Required. The resource name of the NotebookRuntimeTemplate based on which a
+     * NotebookRuntime will be assigned (reuse or create a new one).
+     * 
+ * + * + * string notebook_runtime_template = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The notebookRuntimeTemplate. + */ + public java.lang.String getNotebookRuntimeTemplate() { + java.lang.Object ref = notebookRuntimeTemplate_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + notebookRuntimeTemplate_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the NotebookRuntimeTemplate based on which a
+     * NotebookRuntime will be assigned (reuse or create a new one).
+     * 
+ * + * + * string notebook_runtime_template = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for notebookRuntimeTemplate. + */ + public com.google.protobuf.ByteString getNotebookRuntimeTemplateBytes() { + java.lang.Object ref = notebookRuntimeTemplate_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + notebookRuntimeTemplate_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the NotebookRuntimeTemplate based on which a
+     * NotebookRuntime will be assigned (reuse or create a new one).
+     * 
+ * + * + * string notebook_runtime_template = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The notebookRuntimeTemplate to set. + * @return This builder for chaining. + */ + public Builder setNotebookRuntimeTemplate(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + notebookRuntimeTemplate_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the NotebookRuntimeTemplate based on which a
+     * NotebookRuntime will be assigned (reuse or create a new one).
+     * 
+ * + * + * string notebook_runtime_template = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearNotebookRuntimeTemplate() { + notebookRuntimeTemplate_ = getDefaultInstance().getNotebookRuntimeTemplate(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the NotebookRuntimeTemplate based on which a
+     * NotebookRuntime will be assigned (reuse or create a new one).
+     * 
+ * + * + * string notebook_runtime_template = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for notebookRuntimeTemplate to set. + * @return This builder for chaining. + */ + public Builder setNotebookRuntimeTemplateBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + notebookRuntimeTemplate_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.aiplatform.v1beta1.NotebookRuntime notebookRuntime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.NotebookRuntime, + com.google.cloud.aiplatform.v1beta1.NotebookRuntime.Builder, + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeOrBuilder> + notebookRuntimeBuilder_; + /** + * + * + *
+     * Required. Provide runtime specific information (e.g. runtime owner,
+     * notebook id) used for NotebookRuntime assignment.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntime notebook_runtime = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the notebookRuntime field is set. + */ + public boolean hasNotebookRuntime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Required. Provide runtime specific information (e.g. runtime owner,
+     * notebook id) used for NotebookRuntime assignment.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntime notebook_runtime = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The notebookRuntime. + */ + public com.google.cloud.aiplatform.v1beta1.NotebookRuntime getNotebookRuntime() { + if (notebookRuntimeBuilder_ == null) { + return notebookRuntime_ == null + ? com.google.cloud.aiplatform.v1beta1.NotebookRuntime.getDefaultInstance() + : notebookRuntime_; + } else { + return notebookRuntimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Provide runtime specific information (e.g. runtime owner,
+     * notebook id) used for NotebookRuntime assignment.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntime notebook_runtime = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setNotebookRuntime(com.google.cloud.aiplatform.v1beta1.NotebookRuntime value) { + if (notebookRuntimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + notebookRuntime_ = value; + } else { + notebookRuntimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Provide runtime specific information (e.g. runtime owner,
+     * notebook id) used for NotebookRuntime assignment.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntime notebook_runtime = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setNotebookRuntime( + com.google.cloud.aiplatform.v1beta1.NotebookRuntime.Builder builderForValue) { + if (notebookRuntimeBuilder_ == null) { + notebookRuntime_ = builderForValue.build(); + } else { + notebookRuntimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Provide runtime specific information (e.g. runtime owner,
+     * notebook id) used for NotebookRuntime assignment.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntime notebook_runtime = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeNotebookRuntime(com.google.cloud.aiplatform.v1beta1.NotebookRuntime value) { + if (notebookRuntimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && notebookRuntime_ != null + && notebookRuntime_ + != com.google.cloud.aiplatform.v1beta1.NotebookRuntime.getDefaultInstance()) { + getNotebookRuntimeBuilder().mergeFrom(value); + } else { + notebookRuntime_ = value; + } + } else { + notebookRuntimeBuilder_.mergeFrom(value); + } + if (notebookRuntime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. Provide runtime specific information (e.g. runtime owner,
+     * notebook id) used for NotebookRuntime assignment.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntime notebook_runtime = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearNotebookRuntime() { + bitField0_ = (bitField0_ & ~0x00000004); + notebookRuntime_ = null; + if (notebookRuntimeBuilder_ != null) { + notebookRuntimeBuilder_.dispose(); + notebookRuntimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Provide runtime specific information (e.g. runtime owner,
+     * notebook id) used for NotebookRuntime assignment.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntime notebook_runtime = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1beta1.NotebookRuntime.Builder getNotebookRuntimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getNotebookRuntimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Provide runtime specific information (e.g. runtime owner,
+     * notebook id) used for NotebookRuntime assignment.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntime notebook_runtime = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1beta1.NotebookRuntimeOrBuilder + getNotebookRuntimeOrBuilder() { + if (notebookRuntimeBuilder_ != null) { + return notebookRuntimeBuilder_.getMessageOrBuilder(); + } else { + return notebookRuntime_ == null + ? com.google.cloud.aiplatform.v1beta1.NotebookRuntime.getDefaultInstance() + : notebookRuntime_; + } + } + /** + * + * + *
+     * Required. Provide runtime specific information (e.g. runtime owner,
+     * notebook id) used for NotebookRuntime assignment.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntime notebook_runtime = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.NotebookRuntime, + com.google.cloud.aiplatform.v1beta1.NotebookRuntime.Builder, + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeOrBuilder> + getNotebookRuntimeFieldBuilder() { + if (notebookRuntimeBuilder_ == null) { + notebookRuntimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.NotebookRuntime, + com.google.cloud.aiplatform.v1beta1.NotebookRuntime.Builder, + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeOrBuilder>( + getNotebookRuntime(), getParentForChildren(), isClean()); + notebookRuntime_ = null; + } + return notebookRuntimeBuilder_; + } + + private java.lang.Object notebookRuntimeId_ = ""; + /** + * + * + *
+     * Optional. User specified ID for the notebook runtime.
+     * 
+ * + * string notebook_runtime_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The notebookRuntimeId. + */ + public java.lang.String getNotebookRuntimeId() { + java.lang.Object ref = notebookRuntimeId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + notebookRuntimeId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. User specified ID for the notebook runtime.
+     * 
+ * + * string notebook_runtime_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for notebookRuntimeId. + */ + public com.google.protobuf.ByteString getNotebookRuntimeIdBytes() { + java.lang.Object ref = notebookRuntimeId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + notebookRuntimeId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. User specified ID for the notebook runtime.
+     * 
+ * + * string notebook_runtime_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The notebookRuntimeId to set. + * @return This builder for chaining. + */ + public Builder setNotebookRuntimeId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + notebookRuntimeId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. User specified ID for the notebook runtime.
+     * 
+ * + * string notebook_runtime_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearNotebookRuntimeId() { + notebookRuntimeId_ = getDefaultInstance().getNotebookRuntimeId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. User specified ID for the notebook runtime.
+     * 
+ * + * string notebook_runtime_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for notebookRuntimeId to set. + * @return This builder for chaining. + */ + public Builder setNotebookRuntimeIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + notebookRuntimeId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeRequest) + private static final com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeRequest(); + } + + public static com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AssignNotebookRuntimeRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/AssignNotebookRuntimeRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/AssignNotebookRuntimeRequestOrBuilder.java new file mode 100644 index 000000000000..5e3c0434c572 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/AssignNotebookRuntimeRequestOrBuilder.java @@ -0,0 +1,157 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/notebook_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +public interface AssignNotebookRuntimeRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the Location to get the NotebookRuntime
+   * assignment. Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The resource name of the Location to get the NotebookRuntime
+   * assignment. Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The resource name of the NotebookRuntimeTemplate based on which a
+   * NotebookRuntime will be assigned (reuse or create a new one).
+   * 
+ * + * + * string notebook_runtime_template = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The notebookRuntimeTemplate. + */ + java.lang.String getNotebookRuntimeTemplate(); + /** + * + * + *
+   * Required. The resource name of the NotebookRuntimeTemplate based on which a
+   * NotebookRuntime will be assigned (reuse or create a new one).
+   * 
+ * + * + * string notebook_runtime_template = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for notebookRuntimeTemplate. + */ + com.google.protobuf.ByteString getNotebookRuntimeTemplateBytes(); + + /** + * + * + *
+   * Required. Provide runtime specific information (e.g. runtime owner,
+   * notebook id) used for NotebookRuntime assignment.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntime notebook_runtime = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the notebookRuntime field is set. + */ + boolean hasNotebookRuntime(); + /** + * + * + *
+   * Required. Provide runtime specific information (e.g. runtime owner,
+   * notebook id) used for NotebookRuntime assignment.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntime notebook_runtime = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The notebookRuntime. + */ + com.google.cloud.aiplatform.v1beta1.NotebookRuntime getNotebookRuntime(); + /** + * + * + *
+   * Required. Provide runtime specific information (e.g. runtime owner,
+   * notebook id) used for NotebookRuntime assignment.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntime notebook_runtime = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeOrBuilder getNotebookRuntimeOrBuilder(); + + /** + * + * + *
+   * Optional. User specified ID for the notebook runtime.
+   * 
+ * + * string notebook_runtime_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The notebookRuntimeId. + */ + java.lang.String getNotebookRuntimeId(); + /** + * + * + *
+   * Optional. User specified ID for the notebook runtime.
+   * 
+ * + * string notebook_runtime_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for notebookRuntimeId. + */ + com.google.protobuf.ByteString getNotebookRuntimeIdBytes(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/AuthConfig.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/AuthConfig.java index 999ec1afabec..eb6103571fde 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/AuthConfig.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/AuthConfig.java @@ -63,429 +63,6 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.cloud.aiplatform.v1beta1.AuthConfig.Builder.class); } - public interface NoAuthOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.AuthConfig.NoAuth) - com.google.protobuf.MessageOrBuilder {} - /** - * - * - *
-   * Empty message, used to indicate no authentication for an endpoint.
-   * 
- * - * Protobuf type {@code google.cloud.aiplatform.v1beta1.AuthConfig.NoAuth} - */ - public static final class NoAuth extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.AuthConfig.NoAuth) - NoAuthOrBuilder { - private static final long serialVersionUID = 0L; - // Use NoAuth.newBuilder() to construct. - private NoAuth(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private NoAuth() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new NoAuth(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.aiplatform.v1beta1.ExtensionProto - .internal_static_google_cloud_aiplatform_v1beta1_AuthConfig_NoAuth_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.aiplatform.v1beta1.ExtensionProto - .internal_static_google_cloud_aiplatform_v1beta1_AuthConfig_NoAuth_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.aiplatform.v1beta1.AuthConfig.NoAuth.class, - com.google.cloud.aiplatform.v1beta1.AuthConfig.NoAuth.Builder.class); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.AuthConfig.NoAuth)) { - return super.equals(obj); - } - com.google.cloud.aiplatform.v1beta1.AuthConfig.NoAuth other = - (com.google.cloud.aiplatform.v1beta1.AuthConfig.NoAuth) obj; - - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.aiplatform.v1beta1.AuthConfig.NoAuth parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.aiplatform.v1beta1.AuthConfig.NoAuth parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.aiplatform.v1beta1.AuthConfig.NoAuth parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.aiplatform.v1beta1.AuthConfig.NoAuth parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.aiplatform.v1beta1.AuthConfig.NoAuth parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.aiplatform.v1beta1.AuthConfig.NoAuth parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.aiplatform.v1beta1.AuthConfig.NoAuth parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.aiplatform.v1beta1.AuthConfig.NoAuth parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.aiplatform.v1beta1.AuthConfig.NoAuth parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.aiplatform.v1beta1.AuthConfig.NoAuth parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.aiplatform.v1beta1.AuthConfig.NoAuth parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.aiplatform.v1beta1.AuthConfig.NoAuth parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.aiplatform.v1beta1.AuthConfig.NoAuth prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-     * Empty message, used to indicate no authentication for an endpoint.
-     * 
- * - * Protobuf type {@code google.cloud.aiplatform.v1beta1.AuthConfig.NoAuth} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.AuthConfig.NoAuth) - com.google.cloud.aiplatform.v1beta1.AuthConfig.NoAuthOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.aiplatform.v1beta1.ExtensionProto - .internal_static_google_cloud_aiplatform_v1beta1_AuthConfig_NoAuth_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.aiplatform.v1beta1.ExtensionProto - .internal_static_google_cloud_aiplatform_v1beta1_AuthConfig_NoAuth_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.aiplatform.v1beta1.AuthConfig.NoAuth.class, - com.google.cloud.aiplatform.v1beta1.AuthConfig.NoAuth.Builder.class); - } - - // Construct using com.google.cloud.aiplatform.v1beta1.AuthConfig.NoAuth.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.aiplatform.v1beta1.ExtensionProto - .internal_static_google_cloud_aiplatform_v1beta1_AuthConfig_NoAuth_descriptor; - } - - @java.lang.Override - public com.google.cloud.aiplatform.v1beta1.AuthConfig.NoAuth getDefaultInstanceForType() { - return com.google.cloud.aiplatform.v1beta1.AuthConfig.NoAuth.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.aiplatform.v1beta1.AuthConfig.NoAuth build() { - com.google.cloud.aiplatform.v1beta1.AuthConfig.NoAuth result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.aiplatform.v1beta1.AuthConfig.NoAuth buildPartial() { - com.google.cloud.aiplatform.v1beta1.AuthConfig.NoAuth result = - new com.google.cloud.aiplatform.v1beta1.AuthConfig.NoAuth(this); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.aiplatform.v1beta1.AuthConfig.NoAuth) { - return mergeFrom((com.google.cloud.aiplatform.v1beta1.AuthConfig.NoAuth) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.AuthConfig.NoAuth other) { - if (other == com.google.cloud.aiplatform.v1beta1.AuthConfig.NoAuth.getDefaultInstance()) - return this; - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.AuthConfig.NoAuth) - } - - // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.AuthConfig.NoAuth) - private static final com.google.cloud.aiplatform.v1beta1.AuthConfig.NoAuth DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.AuthConfig.NoAuth(); - } - - public static com.google.cloud.aiplatform.v1beta1.AuthConfig.NoAuth getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public NoAuth parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.aiplatform.v1beta1.AuthConfig.NoAuth getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - public interface ApiKeyConfigOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.AuthConfig.ApiKeyConfig) diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/Blob.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/Blob.java index 2ca66a63ac5c..5aa3ef352cb8 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/Blob.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/Blob.java @@ -23,9 +23,10 @@ * * *
- * Raw media bytes.
+ * Content blob.
  *
- * Text should not be sent as raw bytes, use the 'text' field.
+ * It's preferred to send as [text][google.cloud.aiplatform.v1beta1.Part.text]
+ * directly rather than raw bytes.
  * 
* * Protobuf type {@code google.cloud.aiplatform.v1beta1.Blob} @@ -123,7 +124,7 @@ public com.google.protobuf.ByteString getMimeTypeBytes() { * * *
-   * Required. Raw bytes for media formats.
+   * Required. Raw bytes.
    * 
* * bytes data = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -306,9 +307,10 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Raw media bytes.
+   * Content blob.
    *
-   * Text should not be sent as raw bytes, use the 'text' field.
+   * It's preferred to send as [text][google.cloud.aiplatform.v1beta1.Part.text]
+   * directly rather than raw bytes.
    * 
* * Protobuf type {@code google.cloud.aiplatform.v1beta1.Blob} @@ -610,7 +612,7 @@ public Builder setMimeTypeBytes(com.google.protobuf.ByteString value) { * * *
-     * Required. Raw bytes for media formats.
+     * Required. Raw bytes.
      * 
* * bytes data = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -625,7 +627,7 @@ public com.google.protobuf.ByteString getData() { * * *
-     * Required. Raw bytes for media formats.
+     * Required. Raw bytes.
      * 
* * bytes data = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -646,7 +648,7 @@ public Builder setData(com.google.protobuf.ByteString value) { * * *
-     * Required. Raw bytes for media formats.
+     * Required. Raw bytes.
      * 
* * bytes data = 2 [(.google.api.field_behavior) = REQUIRED]; diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/BlobOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/BlobOrBuilder.java index fa82f326d1cf..04c9dccd5c93 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/BlobOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/BlobOrBuilder.java @@ -53,7 +53,7 @@ public interface BlobOrBuilder * * *
-   * Required. Raw bytes for media formats.
+   * Required. Raw bytes.
    * 
* * bytes data = 2 [(.google.api.field_behavior) = REQUIRED]; diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ChatCompletionsRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ChatCompletionsRequest.java new file mode 100644 index 000000000000..2e19f36ee7fa --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ChatCompletionsRequest.java @@ -0,0 +1,936 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/prediction_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Request message for [PredictionService.ChatCompletions]
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.ChatCompletionsRequest} + */ +public final class ChatCompletionsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.ChatCompletionsRequest) + ChatCompletionsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ChatCompletionsRequest.newBuilder() to construct. + private ChatCompletionsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ChatCompletionsRequest() { + endpoint_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ChatCompletionsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.PredictionServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ChatCompletionsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.PredictionServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ChatCompletionsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.ChatCompletionsRequest.class, + com.google.cloud.aiplatform.v1beta1.ChatCompletionsRequest.Builder.class); + } + + private int bitField0_; + public static final int ENDPOINT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object endpoint_ = ""; + /** + * + * + *
+   * Required. The name of the Endpoint requested to serve the prediction.
+   * Format:
+   * `projects/{project}/locations/{location}/endpoints/openapi`
+   * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The endpoint. + */ + @java.lang.Override + public java.lang.String getEndpoint() { + java.lang.Object ref = endpoint_; + 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(); + endpoint_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the Endpoint requested to serve the prediction.
+   * Format:
+   * `projects/{project}/locations/{location}/endpoints/openapi`
+   * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for endpoint. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEndpointBytes() { + java.lang.Object ref = endpoint_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + endpoint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int HTTP_BODY_FIELD_NUMBER = 2; + private com.google.api.HttpBody httpBody_; + /** + * + * + *
+   * Optional. The prediction input. Supports HTTP headers and arbitrary data
+   * payload.
+   * 
+ * + * .google.api.HttpBody http_body = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the httpBody field is set. + */ + @java.lang.Override + public boolean hasHttpBody() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Optional. The prediction input. Supports HTTP headers and arbitrary data
+   * payload.
+   * 
+ * + * .google.api.HttpBody http_body = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The httpBody. + */ + @java.lang.Override + public com.google.api.HttpBody getHttpBody() { + return httpBody_ == null ? com.google.api.HttpBody.getDefaultInstance() : httpBody_; + } + /** + * + * + *
+   * Optional. The prediction input. Supports HTTP headers and arbitrary data
+   * payload.
+   * 
+ * + * .google.api.HttpBody http_body = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public com.google.api.HttpBodyOrBuilder getHttpBodyOrBuilder() { + return httpBody_ == null ? com.google.api.HttpBody.getDefaultInstance() : httpBody_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpoint_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, endpoint_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getHttpBody()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpoint_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, endpoint_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getHttpBody()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.ChatCompletionsRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.ChatCompletionsRequest other = + (com.google.cloud.aiplatform.v1beta1.ChatCompletionsRequest) obj; + + if (!getEndpoint().equals(other.getEndpoint())) return false; + if (hasHttpBody() != other.hasHttpBody()) return false; + if (hasHttpBody()) { + if (!getHttpBody().equals(other.getHttpBody())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENDPOINT_FIELD_NUMBER; + hash = (53 * hash) + getEndpoint().hashCode(); + if (hasHttpBody()) { + hash = (37 * hash) + HTTP_BODY_FIELD_NUMBER; + hash = (53 * hash) + getHttpBody().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.ChatCompletionsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.ChatCompletionsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ChatCompletionsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.ChatCompletionsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ChatCompletionsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.ChatCompletionsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ChatCompletionsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.ChatCompletionsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ChatCompletionsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.ChatCompletionsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ChatCompletionsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.ChatCompletionsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.ChatCompletionsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for [PredictionService.ChatCompletions]
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.ChatCompletionsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.ChatCompletionsRequest) + com.google.cloud.aiplatform.v1beta1.ChatCompletionsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.PredictionServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ChatCompletionsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.PredictionServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ChatCompletionsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.ChatCompletionsRequest.class, + com.google.cloud.aiplatform.v1beta1.ChatCompletionsRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.ChatCompletionsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getHttpBodyFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + endpoint_ = ""; + httpBody_ = null; + if (httpBodyBuilder_ != null) { + httpBodyBuilder_.dispose(); + httpBodyBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.PredictionServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ChatCompletionsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ChatCompletionsRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.ChatCompletionsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ChatCompletionsRequest build() { + com.google.cloud.aiplatform.v1beta1.ChatCompletionsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ChatCompletionsRequest buildPartial() { + com.google.cloud.aiplatform.v1beta1.ChatCompletionsRequest result = + new com.google.cloud.aiplatform.v1beta1.ChatCompletionsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1beta1.ChatCompletionsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.endpoint_ = endpoint_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.httpBody_ = httpBodyBuilder_ == null ? httpBody_ : httpBodyBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1beta1.ChatCompletionsRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.ChatCompletionsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.ChatCompletionsRequest other) { + if (other == com.google.cloud.aiplatform.v1beta1.ChatCompletionsRequest.getDefaultInstance()) + return this; + if (!other.getEndpoint().isEmpty()) { + endpoint_ = other.endpoint_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasHttpBody()) { + mergeHttpBody(other.getHttpBody()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + endpoint_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getHttpBodyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object endpoint_ = ""; + /** + * + * + *
+     * Required. The name of the Endpoint requested to serve the prediction.
+     * Format:
+     * `projects/{project}/locations/{location}/endpoints/openapi`
+     * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The endpoint. + */ + public java.lang.String getEndpoint() { + java.lang.Object ref = endpoint_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endpoint_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the Endpoint requested to serve the prediction.
+     * Format:
+     * `projects/{project}/locations/{location}/endpoints/openapi`
+     * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for endpoint. + */ + public com.google.protobuf.ByteString getEndpointBytes() { + java.lang.Object ref = endpoint_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + endpoint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the Endpoint requested to serve the prediction.
+     * Format:
+     * `projects/{project}/locations/{location}/endpoints/openapi`
+     * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The endpoint to set. + * @return This builder for chaining. + */ + public Builder setEndpoint(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + endpoint_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the Endpoint requested to serve the prediction.
+     * Format:
+     * `projects/{project}/locations/{location}/endpoints/openapi`
+     * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearEndpoint() { + endpoint_ = getDefaultInstance().getEndpoint(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the Endpoint requested to serve the prediction.
+     * Format:
+     * `projects/{project}/locations/{location}/endpoints/openapi`
+     * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for endpoint to set. + * @return This builder for chaining. + */ + public Builder setEndpointBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + endpoint_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.api.HttpBody httpBody_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.HttpBody, + com.google.api.HttpBody.Builder, + com.google.api.HttpBodyOrBuilder> + httpBodyBuilder_; + /** + * + * + *
+     * Optional. The prediction input. Supports HTTP headers and arbitrary data
+     * payload.
+     * 
+ * + * .google.api.HttpBody http_body = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the httpBody field is set. + */ + public boolean hasHttpBody() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Optional. The prediction input. Supports HTTP headers and arbitrary data
+     * payload.
+     * 
+ * + * .google.api.HttpBody http_body = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The httpBody. + */ + public com.google.api.HttpBody getHttpBody() { + if (httpBodyBuilder_ == null) { + return httpBody_ == null ? com.google.api.HttpBody.getDefaultInstance() : httpBody_; + } else { + return httpBodyBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. The prediction input. Supports HTTP headers and arbitrary data
+     * payload.
+     * 
+ * + * .google.api.HttpBody http_body = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder setHttpBody(com.google.api.HttpBody value) { + if (httpBodyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + httpBody_ = value; + } else { + httpBodyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The prediction input. Supports HTTP headers and arbitrary data
+     * payload.
+     * 
+ * + * .google.api.HttpBody http_body = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder setHttpBody(com.google.api.HttpBody.Builder builderForValue) { + if (httpBodyBuilder_ == null) { + httpBody_ = builderForValue.build(); + } else { + httpBodyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The prediction input. Supports HTTP headers and arbitrary data
+     * payload.
+     * 
+ * + * .google.api.HttpBody http_body = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder mergeHttpBody(com.google.api.HttpBody value) { + if (httpBodyBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && httpBody_ != null + && httpBody_ != com.google.api.HttpBody.getDefaultInstance()) { + getHttpBodyBuilder().mergeFrom(value); + } else { + httpBody_ = value; + } + } else { + httpBodyBuilder_.mergeFrom(value); + } + if (httpBody_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Optional. The prediction input. Supports HTTP headers and arbitrary data
+     * payload.
+     * 
+ * + * .google.api.HttpBody http_body = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder clearHttpBody() { + bitField0_ = (bitField0_ & ~0x00000002); + httpBody_ = null; + if (httpBodyBuilder_ != null) { + httpBodyBuilder_.dispose(); + httpBodyBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The prediction input. Supports HTTP headers and arbitrary data
+     * payload.
+     * 
+ * + * .google.api.HttpBody http_body = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + public com.google.api.HttpBody.Builder getHttpBodyBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getHttpBodyFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The prediction input. Supports HTTP headers and arbitrary data
+     * payload.
+     * 
+ * + * .google.api.HttpBody http_body = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + public com.google.api.HttpBodyOrBuilder getHttpBodyOrBuilder() { + if (httpBodyBuilder_ != null) { + return httpBodyBuilder_.getMessageOrBuilder(); + } else { + return httpBody_ == null ? com.google.api.HttpBody.getDefaultInstance() : httpBody_; + } + } + /** + * + * + *
+     * Optional. The prediction input. Supports HTTP headers and arbitrary data
+     * payload.
+     * 
+ * + * .google.api.HttpBody http_body = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.HttpBody, + com.google.api.HttpBody.Builder, + com.google.api.HttpBodyOrBuilder> + getHttpBodyFieldBuilder() { + if (httpBodyBuilder_ == null) { + httpBodyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.api.HttpBody, + com.google.api.HttpBody.Builder, + com.google.api.HttpBodyOrBuilder>(getHttpBody(), getParentForChildren(), isClean()); + httpBody_ = null; + } + return httpBodyBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.ChatCompletionsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.ChatCompletionsRequest) + private static final com.google.cloud.aiplatform.v1beta1.ChatCompletionsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.ChatCompletionsRequest(); + } + + public static com.google.cloud.aiplatform.v1beta1.ChatCompletionsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ChatCompletionsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ChatCompletionsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ChatCompletionsRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ChatCompletionsRequestOrBuilder.java new file mode 100644 index 000000000000..384d3fef436e --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ChatCompletionsRequestOrBuilder.java @@ -0,0 +1,97 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/prediction_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +public interface ChatCompletionsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.ChatCompletionsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the Endpoint requested to serve the prediction.
+   * Format:
+   * `projects/{project}/locations/{location}/endpoints/openapi`
+   * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The endpoint. + */ + java.lang.String getEndpoint(); + /** + * + * + *
+   * Required. The name of the Endpoint requested to serve the prediction.
+   * Format:
+   * `projects/{project}/locations/{location}/endpoints/openapi`
+   * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for endpoint. + */ + com.google.protobuf.ByteString getEndpointBytes(); + + /** + * + * + *
+   * Optional. The prediction input. Supports HTTP headers and arbitrary data
+   * payload.
+   * 
+ * + * .google.api.HttpBody http_body = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the httpBody field is set. + */ + boolean hasHttpBody(); + /** + * + * + *
+   * Optional. The prediction input. Supports HTTP headers and arbitrary data
+   * payload.
+   * 
+ * + * .google.api.HttpBody http_body = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The httpBody. + */ + com.google.api.HttpBody getHttpBody(); + /** + * + * + *
+   * Optional. The prediction input. Supports HTTP headers and arbitrary data
+   * payload.
+   * 
+ * + * .google.api.HttpBody http_body = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + com.google.api.HttpBodyOrBuilder getHttpBodyOrBuilder(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ContentProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ContentProto.java index 243a21f8e924..e13413d6ed12 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ContentProto.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ContentProto.java @@ -84,6 +84,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_aiplatform_v1beta1_GroundingAttribution_Web_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_aiplatform_v1beta1_GroundingAttribution_Web_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_GroundingAttribution_RetrievedContext_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_GroundingAttribution_RetrievedContext_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_aiplatform_v1beta1_GroundingMetadata_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -121,83 +125,96 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "y\n\rVideoMetadata\0224\n\014start_offset\030\001 \001(\0132\031" + ".google.protobuf.DurationB\003\340A\001\0222\n\nend_of" + "fset\030\002 \001(\0132\031.google.protobuf.DurationB\003\340" - + "A\001\"\226\002\n\020GenerationConfig\022\035\n\013temperature\030\001" + + "A\001\"\253\003\n\020GenerationConfig\022\035\n\013temperature\030\001" + " \001(\002B\003\340A\001H\000\210\001\001\022\027\n\005top_p\030\002 \001(\002B\003\340A\001H\001\210\001\001\022" + "\027\n\005top_k\030\003 \001(\002B\003\340A\001H\002\210\001\001\022!\n\017candidate_co" + "unt\030\004 \001(\005B\003\340A\001H\003\210\001\001\022#\n\021max_output_tokens" + "\030\005 \001(\005B\003\340A\001H\004\210\001\001\022\033\n\016stop_sequences\030\006 \003(\t" - + "B\003\340A\001B\016\n\014_temperatureB\010\n\006_top_pB\010\n\006_top_" - + "kB\022\n\020_candidate_countB\024\n\022_max_output_tok" - + "ens\"\307\002\n\rSafetySetting\022D\n\010category\030\001 \001(\0162" - + "-.google.cloud.aiplatform.v1beta1.HarmCa" - + "tegoryB\003\340A\002\022Y\n\tthreshold\030\002 \001(\0162A.google." - + "cloud.aiplatform.v1beta1.SafetySetting.H" - + "armBlockThresholdB\003\340A\002\"\224\001\n\022HarmBlockThre" - + "shold\022$\n HARM_BLOCK_THRESHOLD_UNSPECIFIE" - + "D\020\000\022\027\n\023BLOCK_LOW_AND_ABOVE\020\001\022\032\n\026BLOCK_ME" - + "DIUM_AND_ABOVE\020\002\022\023\n\017BLOCK_ONLY_HIGH\020\003\022\016\n" - + "\nBLOCK_NONE\020\004\"\316\004\n\014SafetyRating\022D\n\010catego" - + "ry\030\001 \001(\0162-.google.cloud.aiplatform.v1bet" - + "a1.HarmCategoryB\003\340A\003\022W\n\013probability\030\002 \001(" - + "\0162=.google.cloud.aiplatform.v1beta1.Safe" - + "tyRating.HarmProbabilityB\003\340A\003\022\036\n\021probabi" - + "lity_score\030\005 \001(\002B\003\340A\003\022Q\n\010severity\030\006 \001(\0162" - + ":.google.cloud.aiplatform.v1beta1.Safety" - + "Rating.HarmSeverityB\003\340A\003\022\033\n\016severity_sco" - + "re\030\007 \001(\002B\003\340A\003\022\024\n\007blocked\030\003 \001(\010B\003\340A\003\"b\n\017H" - + "armProbability\022 \n\034HARM_PROBABILITY_UNSPE" - + "CIFIED\020\000\022\016\n\nNEGLIGIBLE\020\001\022\007\n\003LOW\020\002\022\n\n\006MED" - + "IUM\020\003\022\010\n\004HIGH\020\004\"\224\001\n\014HarmSeverity\022\035\n\031HARM" - + "_SEVERITY_UNSPECIFIED\020\000\022\034\n\030HARM_SEVERITY" - + "_NEGLIGIBLE\020\001\022\025\n\021HARM_SEVERITY_LOW\020\002\022\030\n\024" - + "HARM_SEVERITY_MEDIUM\020\003\022\026\n\022HARM_SEVERITY_" - + "HIGH\020\004\"U\n\020CitationMetadata\022A\n\tcitations\030" - + "\001 \003(\0132).google.cloud.aiplatform.v1beta1." - + "CitationB\003\340A\003\"\252\001\n\010Citation\022\030\n\013start_inde" - + "x\030\001 \001(\005B\003\340A\003\022\026\n\tend_index\030\002 \001(\005B\003\340A\003\022\020\n\003" - + "uri\030\003 \001(\tB\003\340A\003\022\022\n\005title\030\004 \001(\tB\003\340A\003\022\024\n\007li" - + "cense\030\005 \001(\tB\003\340A\003\0220\n\020publication_date\030\006 \001" - + "(\0132\021.google.type.DateB\003\340A\003\"\377\004\n\tCandidate" - + "\022\022\n\005index\030\001 \001(\005B\003\340A\003\022>\n\007content\030\002 \001(\0132(." - + "google.cloud.aiplatform.v1beta1.ContentB" - + "\003\340A\003\022S\n\rfinish_reason\030\003 \001(\01627.google.clo" - + "ud.aiplatform.v1beta1.Candidate.FinishRe" - + "asonB\003\340A\003\022J\n\016safety_ratings\030\004 \003(\0132-.goog" - + "le.cloud.aiplatform.v1beta1.SafetyRating" - + "B\003\340A\003\022 \n\016finish_message\030\005 \001(\tB\003\340A\003H\000\210\001\001\022" - + "Q\n\021citation_metadata\030\006 \001(\01321.google.clou" - + "d.aiplatform.v1beta1.CitationMetadataB\003\340" - + "A\003\022S\n\022grounding_metadata\030\007 \001(\01322.google." - + "cloud.aiplatform.v1beta1.GroundingMetada" - + "taB\003\340A\003\"\237\001\n\014FinishReason\022\035\n\031FINISH_REASO" - + "N_UNSPECIFIED\020\000\022\010\n\004STOP\020\001\022\016\n\nMAX_TOKENS\020" - + "\002\022\n\n\006SAFETY\020\003\022\016\n\nRECITATION\020\004\022\t\n\005OTHER\020\005" - + "\022\r\n\tBLOCKLIST\020\006\022\026\n\022PROHIBITED_CONTENT\020\007\022" - + "\010\n\004SPII\020\010B\021\n\017_finish_message\"T\n\007Segment\022" - + "\027\n\npart_index\030\001 \001(\005B\003\340A\003\022\030\n\013start_index\030" - + "\002 \001(\005B\003\340A\003\022\026\n\tend_index\030\003 \001(\005B\003\340A\003\"\233\002\n\024G" - + "roundingAttribution\022M\n\003web\030\003 \001(\01329.googl" - + "e.cloud.aiplatform.v1beta1.GroundingAttr" - + "ibution.WebB\003\340A\001H\000\022>\n\007segment\030\001 \001(\0132(.go" - + "ogle.cloud.aiplatform.v1beta1.SegmentB\003\340" - + "A\003\022%\n\020confidence_score\030\002 \001(\002B\006\340A\001\340A\003H\001\210\001" - + "\001\032+\n\003Web\022\020\n\003uri\030\001 \001(\tB\003\340A\003\022\022\n\005title\030\002 \001(" - + "\tB\003\340A\003B\013\n\treferenceB\023\n\021_confidence_score" - + "\"\220\001\n\021GroundingMetadata\022\037\n\022web_search_que" - + "ries\030\001 \003(\tB\003\340A\001\022Z\n\026grounding_attribution" - + "s\030\002 \003(\01325.google.cloud.aiplatform.v1beta" - + "1.GroundingAttributionB\003\340A\001*\264\001\n\014HarmCate" - + "gory\022\035\n\031HARM_CATEGORY_UNSPECIFIED\020\000\022\035\n\031H" - + "ARM_CATEGORY_HATE_SPEECH\020\001\022#\n\037HARM_CATEG" - + "ORY_DANGEROUS_CONTENT\020\002\022\034\n\030HARM_CATEGORY" - + "_HARASSMENT\020\003\022#\n\037HARM_CATEGORY_SEXUALLY_" - + "EXPLICIT\020\004B\343\001\n#com.google.cloud.aiplatfo" - + "rm.v1beta1B\014ContentProtoP\001ZCcloud.google" - + ".com/go/aiplatform/apiv1beta1/aiplatform" - + "pb;aiplatformpb\252\002\037Google.Cloud.AIPlatfor" - + "m.V1Beta1\312\002\037Google\\Cloud\\AIPlatform\\V1be" - + "ta1\352\002\"Google::Cloud::AIPlatform::V1beta1" - + "b\006proto3" + + "B\003\340A\001\022\"\n\020presence_penalty\030\010 \001(\002B\003\340A\001H\005\210\001" + + "\001\022#\n\021frequency_penalty\030\t \001(\002B\003\340A\001H\006\210\001\001\022\037" + + "\n\022response_mime_type\030\r \001(\tB\003\340A\001B\016\n\014_temp" + + "eratureB\010\n\006_top_pB\010\n\006_top_kB\022\n\020_candidat" + + "e_countB\024\n\022_max_output_tokensB\023\n\021_presen" + + "ce_penaltyB\024\n\022_frequency_penalty\"\361\003\n\rSaf" + + "etySetting\022D\n\010category\030\001 \001(\0162-.google.cl" + + "oud.aiplatform.v1beta1.HarmCategoryB\003\340A\002" + + "\022Y\n\tthreshold\030\002 \001(\0162A.google.cloud.aipla" + + "tform.v1beta1.SafetySetting.HarmBlockThr" + + "esholdB\003\340A\002\022S\n\006method\030\004 \001(\0162>.google.clo" + + "ud.aiplatform.v1beta1.SafetySetting.Harm" + + "BlockMethodB\003\340A\001\"\224\001\n\022HarmBlockThreshold\022" + + "$\n HARM_BLOCK_THRESHOLD_UNSPECIFIED\020\000\022\027\n" + + "\023BLOCK_LOW_AND_ABOVE\020\001\022\032\n\026BLOCK_MEDIUM_A" + + "ND_ABOVE\020\002\022\023\n\017BLOCK_ONLY_HIGH\020\003\022\016\n\nBLOCK" + + "_NONE\020\004\"S\n\017HarmBlockMethod\022!\n\035HARM_BLOCK" + + "_METHOD_UNSPECIFIED\020\000\022\014\n\010SEVERITY\020\001\022\017\n\013P" + + "ROBABILITY\020\002\"\316\004\n\014SafetyRating\022D\n\010categor" + + "y\030\001 \001(\0162-.google.cloud.aiplatform.v1beta" + + "1.HarmCategoryB\003\340A\003\022W\n\013probability\030\002 \001(\016" + + "2=.google.cloud.aiplatform.v1beta1.Safet" + + "yRating.HarmProbabilityB\003\340A\003\022\036\n\021probabil" + + "ity_score\030\005 \001(\002B\003\340A\003\022Q\n\010severity\030\006 \001(\0162:" + + ".google.cloud.aiplatform.v1beta1.SafetyR" + + "ating.HarmSeverityB\003\340A\003\022\033\n\016severity_scor" + + "e\030\007 \001(\002B\003\340A\003\022\024\n\007blocked\030\003 \001(\010B\003\340A\003\"b\n\017Ha" + + "rmProbability\022 \n\034HARM_PROBABILITY_UNSPEC" + + "IFIED\020\000\022\016\n\nNEGLIGIBLE\020\001\022\007\n\003LOW\020\002\022\n\n\006MEDI" + + "UM\020\003\022\010\n\004HIGH\020\004\"\224\001\n\014HarmSeverity\022\035\n\031HARM_" + + "SEVERITY_UNSPECIFIED\020\000\022\034\n\030HARM_SEVERITY_" + + "NEGLIGIBLE\020\001\022\025\n\021HARM_SEVERITY_LOW\020\002\022\030\n\024H" + + "ARM_SEVERITY_MEDIUM\020\003\022\026\n\022HARM_SEVERITY_H" + + "IGH\020\004\"U\n\020CitationMetadata\022A\n\tcitations\030\001" + + " \003(\0132).google.cloud.aiplatform.v1beta1.C" + + "itationB\003\340A\003\"\252\001\n\010Citation\022\030\n\013start_index" + + "\030\001 \001(\005B\003\340A\003\022\026\n\tend_index\030\002 \001(\005B\003\340A\003\022\020\n\003u" + + "ri\030\003 \001(\tB\003\340A\003\022\022\n\005title\030\004 \001(\tB\003\340A\003\022\024\n\007lic" + + "ense\030\005 \001(\tB\003\340A\003\0220\n\020publication_date\030\006 \001(" + + "\0132\021.google.type.DateB\003\340A\003\"\377\004\n\tCandidate\022" + + "\022\n\005index\030\001 \001(\005B\003\340A\003\022>\n\007content\030\002 \001(\0132(.g" + + "oogle.cloud.aiplatform.v1beta1.ContentB\003" + + "\340A\003\022S\n\rfinish_reason\030\003 \001(\01627.google.clou" + + "d.aiplatform.v1beta1.Candidate.FinishRea" + + "sonB\003\340A\003\022J\n\016safety_ratings\030\004 \003(\0132-.googl" + + "e.cloud.aiplatform.v1beta1.SafetyRatingB" + + "\003\340A\003\022 \n\016finish_message\030\005 \001(\tB\003\340A\003H\000\210\001\001\022Q" + + "\n\021citation_metadata\030\006 \001(\01321.google.cloud" + + ".aiplatform.v1beta1.CitationMetadataB\003\340A" + + "\003\022S\n\022grounding_metadata\030\007 \001(\01322.google.c" + + "loud.aiplatform.v1beta1.GroundingMetadat" + + "aB\003\340A\003\"\237\001\n\014FinishReason\022\035\n\031FINISH_REASON" + + "_UNSPECIFIED\020\000\022\010\n\004STOP\020\001\022\016\n\nMAX_TOKENS\020\002" + + "\022\n\n\006SAFETY\020\003\022\016\n\nRECITATION\020\004\022\t\n\005OTHER\020\005\022" + + "\r\n\tBLOCKLIST\020\006\022\026\n\022PROHIBITED_CONTENT\020\007\022\010" + + "\n\004SPII\020\010B\021\n\017_finish_message\"T\n\007Segment\022\027" + + "\n\npart_index\030\001 \001(\005B\003\340A\003\022\030\n\013start_index\030\002" + + " \001(\005B\003\340A\003\022\026\n\tend_index\030\003 \001(\005B\003\340A\003\"\277\003\n\024Gr" + + "oundingAttribution\022M\n\003web\030\003 \001(\01329.google" + + ".cloud.aiplatform.v1beta1.GroundingAttri" + + "bution.WebB\003\340A\001H\000\022h\n\021retrieved_context\030\004" + + " \001(\0132F.google.cloud.aiplatform.v1beta1.G" + + "roundingAttribution.RetrievedContextB\003\340A" + + "\001H\000\022>\n\007segment\030\001 \001(\0132(.google.cloud.aipl" + + "atform.v1beta1.SegmentB\003\340A\003\022%\n\020confidenc" + + "e_score\030\002 \001(\002B\006\340A\001\340A\003H\001\210\001\001\032+\n\003Web\022\020\n\003uri" + + "\030\001 \001(\tB\003\340A\003\022\022\n\005title\030\002 \001(\tB\003\340A\003\0328\n\020Retri" + + "evedContext\022\020\n\003uri\030\001 \001(\tB\003\340A\003\022\022\n\005title\030\002" + + " \001(\tB\003\340A\003B\013\n\treferenceB\023\n\021_confidence_sc" + + "ore\"\260\001\n\021GroundingMetadata\022\037\n\022web_search_" + + "queries\030\001 \003(\tB\003\340A\001\022\036\n\021retrieval_queries\030" + + "\003 \003(\tB\003\340A\001\022Z\n\026grounding_attributions\030\002 \003" + + "(\01325.google.cloud.aiplatform.v1beta1.Gro" + + "undingAttributionB\003\340A\001*\264\001\n\014HarmCategory\022" + + "\035\n\031HARM_CATEGORY_UNSPECIFIED\020\000\022\035\n\031HARM_C" + + "ATEGORY_HATE_SPEECH\020\001\022#\n\037HARM_CATEGORY_D" + + "ANGEROUS_CONTENT\020\002\022\034\n\030HARM_CATEGORY_HARA" + + "SSMENT\020\003\022#\n\037HARM_CATEGORY_SEXUALLY_EXPLI" + + "CIT\020\004B\343\001\n#com.google.cloud.aiplatform.v1" + + "beta1B\014ContentProtoP\001ZCcloud.google.com/" + + "go/aiplatform/apiv1beta1/aiplatformpb;ai" + + "platformpb\252\002\037Google.Cloud.AIPlatform.V1B" + + "eta1\312\002\037Google\\Cloud\\AIPlatform\\V1beta1\352\002" + + "\"Google::Cloud::AIPlatform::V1beta1b\006pro" + + "to3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -261,7 +278,15 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1beta1_GenerationConfig_descriptor, new java.lang.String[] { - "Temperature", "TopP", "TopK", "CandidateCount", "MaxOutputTokens", "StopSequences", + "Temperature", + "TopP", + "TopK", + "CandidateCount", + "MaxOutputTokens", + "StopSequences", + "PresencePenalty", + "FrequencyPenalty", + "ResponseMimeType", }); internal_static_google_cloud_aiplatform_v1beta1_SafetySetting_descriptor = getDescriptor().getMessageTypes().get(6); @@ -269,7 +294,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1beta1_SafetySetting_descriptor, new java.lang.String[] { - "Category", "Threshold", + "Category", "Threshold", "Method", }); internal_static_google_cloud_aiplatform_v1beta1_SafetyRating_descriptor = getDescriptor().getMessageTypes().get(7); @@ -323,7 +348,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1beta1_GroundingAttribution_descriptor, new java.lang.String[] { - "Web", "Segment", "ConfidenceScore", "Reference", + "Web", "RetrievedContext", "Segment", "ConfidenceScore", "Reference", }); internal_static_google_cloud_aiplatform_v1beta1_GroundingAttribution_Web_descriptor = internal_static_google_cloud_aiplatform_v1beta1_GroundingAttribution_descriptor @@ -335,13 +360,23 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Uri", "Title", }); + internal_static_google_cloud_aiplatform_v1beta1_GroundingAttribution_RetrievedContext_descriptor = + internal_static_google_cloud_aiplatform_v1beta1_GroundingAttribution_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_aiplatform_v1beta1_GroundingAttribution_RetrievedContext_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_GroundingAttribution_RetrievedContext_descriptor, + new java.lang.String[] { + "Uri", "Title", + }); internal_static_google_cloud_aiplatform_v1beta1_GroundingMetadata_descriptor = getDescriptor().getMessageTypes().get(13); internal_static_google_cloud_aiplatform_v1beta1_GroundingMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1beta1_GroundingMetadata_descriptor, new java.lang.String[] { - "WebSearchQueries", "GroundingAttributions", + "WebSearchQueries", "RetrievalQueries", "GroundingAttributions", }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CreateNotebookRuntimeTemplateOperationMetadata.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CreateNotebookRuntimeTemplateOperationMetadata.java new file mode 100644 index 000000000000..99e5256ded76 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CreateNotebookRuntimeTemplateOperationMetadata.java @@ -0,0 +1,773 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/notebook_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Metadata information for
+ * [NotebookService.CreateNotebookRuntimeTemplate][google.cloud.aiplatform.v1beta1.NotebookService.CreateNotebookRuntimeTemplate].
+ * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateOperationMetadata} + */ +public final class CreateNotebookRuntimeTemplateOperationMetadata + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateOperationMetadata) + CreateNotebookRuntimeTemplateOperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateNotebookRuntimeTemplateOperationMetadata.newBuilder() to construct. + private CreateNotebookRuntimeTemplateOperationMetadata( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateNotebookRuntimeTemplateOperationMetadata() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateNotebookRuntimeTemplateOperationMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_CreateNotebookRuntimeTemplateOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_CreateNotebookRuntimeTemplateOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateOperationMetadata + .class, + com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateOperationMetadata + .Builder.class); + } + + private int bitField0_; + public static final int GENERIC_METADATA_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata genericMetadata_; + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + @java.lang.Override + public boolean hasGenericMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata getGenericMetadata() { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder() { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getGenericMetadata()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getGenericMetadata()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateOperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateOperationMetadata other = + (com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateOperationMetadata) obj; + + if (hasGenericMetadata() != other.hasGenericMetadata()) return false; + if (hasGenericMetadata()) { + if (!getGenericMetadata().equals(other.getGenericMetadata())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasGenericMetadata()) { + hash = (37 * hash) + GENERIC_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getGenericMetadata().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateOperationMetadata + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateOperationMetadata + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateOperationMetadata + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateOperationMetadata + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateOperationMetadata + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateOperationMetadata + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateOperationMetadata + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateOperationMetadata + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateOperationMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateOperationMetadata + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateOperationMetadata + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateOperationMetadata + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateOperationMetadata + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Metadata information for
+   * [NotebookService.CreateNotebookRuntimeTemplate][google.cloud.aiplatform.v1beta1.NotebookService.CreateNotebookRuntimeTemplate].
+   * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateOperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateOperationMetadata) + com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateOperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_CreateNotebookRuntimeTemplateOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_CreateNotebookRuntimeTemplateOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateOperationMetadata + .class, + com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateOperationMetadata + .Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateOperationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getGenericMetadataFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + genericMetadata_ = null; + if (genericMetadataBuilder_ != null) { + genericMetadataBuilder_.dispose(); + genericMetadataBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_CreateNotebookRuntimeTemplateOperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateOperationMetadata + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateOperationMetadata + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateOperationMetadata + build() { + com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateOperationMetadata result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateOperationMetadata + buildPartial() { + com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateOperationMetadata result = + new com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateOperationMetadata( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateOperationMetadata result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.genericMetadata_ = + genericMetadataBuilder_ == null ? genericMetadata_ : genericMetadataBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateOperationMetadata) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateOperationMetadata) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateOperationMetadata other) { + if (other + == com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateOperationMetadata + .getDefaultInstance()) return this; + if (other.hasGenericMetadata()) { + mergeGenericMetadata(other.getGenericMetadata()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getGenericMetadataFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata genericMetadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadataOrBuilder> + genericMetadataBuilder_; + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + public boolean hasGenericMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + public com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata getGenericMetadata() { + if (genericMetadataBuilder_ == null) { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } else { + return genericMetadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder setGenericMetadata( + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata value) { + if (genericMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + genericMetadata_ = value; + } else { + genericMetadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder setGenericMetadata( + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.Builder builderForValue) { + if (genericMetadataBuilder_ == null) { + genericMetadata_ = builderForValue.build(); + } else { + genericMetadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder mergeGenericMetadata( + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata value) { + if (genericMetadataBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && genericMetadata_ != null + && genericMetadata_ + != com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata + .getDefaultInstance()) { + getGenericMetadataBuilder().mergeFrom(value); + } else { + genericMetadata_ = value; + } + } else { + genericMetadataBuilder_.mergeFrom(value); + } + if (genericMetadata_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder clearGenericMetadata() { + bitField0_ = (bitField0_ & ~0x00000001); + genericMetadata_ = null; + if (genericMetadataBuilder_ != null) { + genericMetadataBuilder_.dispose(); + genericMetadataBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + public com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.Builder + getGenericMetadataBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getGenericMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + public com.google.cloud.aiplatform.v1beta1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder() { + if (genericMetadataBuilder_ != null) { + return genericMetadataBuilder_.getMessageOrBuilder(); + } else { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadataOrBuilder> + getGenericMetadataFieldBuilder() { + if (genericMetadataBuilder_ == null) { + genericMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadataOrBuilder>( + getGenericMetadata(), getParentForChildren(), isClean()); + genericMetadata_ = null; + } + return genericMetadataBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateOperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateOperationMetadata) + private static final com.google.cloud.aiplatform.v1beta1 + .CreateNotebookRuntimeTemplateOperationMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateOperationMetadata(); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateOperationMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateNotebookRuntimeTemplateOperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser + parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser + getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateOperationMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CreateNotebookRuntimeTemplateOperationMetadataOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CreateNotebookRuntimeTemplateOperationMetadataOrBuilder.java new file mode 100644 index 000000000000..81a0a53664e0 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CreateNotebookRuntimeTemplateOperationMetadataOrBuilder.java @@ -0,0 +1,62 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/notebook_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +public interface CreateNotebookRuntimeTemplateOperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateOperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + boolean hasGenericMetadata(); + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata getGenericMetadata(); + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CreateNotebookRuntimeTemplateRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CreateNotebookRuntimeTemplateRequest.java new file mode 100644 index 000000000000..389d95e81ebd --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CreateNotebookRuntimeTemplateRequest.java @@ -0,0 +1,1172 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/notebook_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Request message for
+ * [NotebookService.CreateNotebookRuntimeTemplate][google.cloud.aiplatform.v1beta1.NotebookService.CreateNotebookRuntimeTemplate].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateRequest} + */ +public final class CreateNotebookRuntimeTemplateRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateRequest) + CreateNotebookRuntimeTemplateRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateNotebookRuntimeTemplateRequest.newBuilder() to construct. + private CreateNotebookRuntimeTemplateRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateNotebookRuntimeTemplateRequest() { + parent_ = ""; + notebookRuntimeTemplateId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateNotebookRuntimeTemplateRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_CreateNotebookRuntimeTemplateRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_CreateNotebookRuntimeTemplateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateRequest.class, + com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The resource name of the Location to create the
+   * NotebookRuntimeTemplate. Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the Location to create the
+   * NotebookRuntimeTemplate. Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NOTEBOOK_RUNTIME_TEMPLATE_FIELD_NUMBER = 2; + private com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate notebookRuntimeTemplate_; + /** + * + * + *
+   * Required. The NotebookRuntimeTemplate to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate notebook_runtime_template = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the notebookRuntimeTemplate field is set. + */ + @java.lang.Override + public boolean hasNotebookRuntimeTemplate() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. The NotebookRuntimeTemplate to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate notebook_runtime_template = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The notebookRuntimeTemplate. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate getNotebookRuntimeTemplate() { + return notebookRuntimeTemplate_ == null + ? com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate.getDefaultInstance() + : notebookRuntimeTemplate_; + } + /** + * + * + *
+   * Required. The NotebookRuntimeTemplate to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate notebook_runtime_template = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateOrBuilder + getNotebookRuntimeTemplateOrBuilder() { + return notebookRuntimeTemplate_ == null + ? com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate.getDefaultInstance() + : notebookRuntimeTemplate_; + } + + public static final int NOTEBOOK_RUNTIME_TEMPLATE_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object notebookRuntimeTemplateId_ = ""; + /** + * + * + *
+   * Optional. User specified ID for the notebook runtime template.
+   * 
+ * + * string notebook_runtime_template_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The notebookRuntimeTemplateId. + */ + @java.lang.Override + public java.lang.String getNotebookRuntimeTemplateId() { + java.lang.Object ref = notebookRuntimeTemplateId_; + 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(); + notebookRuntimeTemplateId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. User specified ID for the notebook runtime template.
+   * 
+ * + * string notebook_runtime_template_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for notebookRuntimeTemplateId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNotebookRuntimeTemplateIdBytes() { + java.lang.Object ref = notebookRuntimeTemplateId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + notebookRuntimeTemplateId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getNotebookRuntimeTemplate()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(notebookRuntimeTemplateId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, notebookRuntimeTemplateId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(2, getNotebookRuntimeTemplate()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(notebookRuntimeTemplateId_)) { + size += + com.google.protobuf.GeneratedMessageV3.computeStringSize(3, notebookRuntimeTemplateId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateRequest other = + (com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasNotebookRuntimeTemplate() != other.hasNotebookRuntimeTemplate()) return false; + if (hasNotebookRuntimeTemplate()) { + if (!getNotebookRuntimeTemplate().equals(other.getNotebookRuntimeTemplate())) return false; + } + if (!getNotebookRuntimeTemplateId().equals(other.getNotebookRuntimeTemplateId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasNotebookRuntimeTemplate()) { + hash = (37 * hash) + NOTEBOOK_RUNTIME_TEMPLATE_FIELD_NUMBER; + hash = (53 * hash) + getNotebookRuntimeTemplate().hashCode(); + } + hash = (37 * hash) + NOTEBOOK_RUNTIME_TEMPLATE_ID_FIELD_NUMBER; + hash = (53 * hash) + getNotebookRuntimeTemplateId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for
+   * [NotebookService.CreateNotebookRuntimeTemplate][google.cloud.aiplatform.v1beta1.NotebookService.CreateNotebookRuntimeTemplate].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateRequest) + com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_CreateNotebookRuntimeTemplateRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_CreateNotebookRuntimeTemplateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateRequest.class, + com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getNotebookRuntimeTemplateFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + notebookRuntimeTemplate_ = null; + if (notebookRuntimeTemplateBuilder_ != null) { + notebookRuntimeTemplateBuilder_.dispose(); + notebookRuntimeTemplateBuilder_ = null; + } + notebookRuntimeTemplateId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_CreateNotebookRuntimeTemplateRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateRequest + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateRequest build() { + com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateRequest buildPartial() { + com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateRequest result = + new com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.notebookRuntimeTemplate_ = + notebookRuntimeTemplateBuilder_ == null + ? notebookRuntimeTemplate_ + : notebookRuntimeTemplateBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.notebookRuntimeTemplateId_ = notebookRuntimeTemplateId_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateRequest) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateRequest other) { + if (other + == com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasNotebookRuntimeTemplate()) { + mergeNotebookRuntimeTemplate(other.getNotebookRuntimeTemplate()); + } + if (!other.getNotebookRuntimeTemplateId().isEmpty()) { + notebookRuntimeTemplateId_ = other.notebookRuntimeTemplateId_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + getNotebookRuntimeTemplateFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + notebookRuntimeTemplateId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of the Location to create the
+     * NotebookRuntimeTemplate. Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Location to create the
+     * NotebookRuntimeTemplate. Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Location to create the
+     * NotebookRuntimeTemplate. Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Location to create the
+     * NotebookRuntimeTemplate. Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Location to create the
+     * NotebookRuntimeTemplate. Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate notebookRuntimeTemplate_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate, + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate.Builder, + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateOrBuilder> + notebookRuntimeTemplateBuilder_; + /** + * + * + *
+     * Required. The NotebookRuntimeTemplate to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate notebook_runtime_template = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the notebookRuntimeTemplate field is set. + */ + public boolean hasNotebookRuntimeTemplate() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. The NotebookRuntimeTemplate to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate notebook_runtime_template = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The notebookRuntimeTemplate. + */ + public com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate + getNotebookRuntimeTemplate() { + if (notebookRuntimeTemplateBuilder_ == null) { + return notebookRuntimeTemplate_ == null + ? com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate.getDefaultInstance() + : notebookRuntimeTemplate_; + } else { + return notebookRuntimeTemplateBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The NotebookRuntimeTemplate to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate notebook_runtime_template = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setNotebookRuntimeTemplate( + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate value) { + if (notebookRuntimeTemplateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + notebookRuntimeTemplate_ = value; + } else { + notebookRuntimeTemplateBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The NotebookRuntimeTemplate to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate notebook_runtime_template = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setNotebookRuntimeTemplate( + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate.Builder builderForValue) { + if (notebookRuntimeTemplateBuilder_ == null) { + notebookRuntimeTemplate_ = builderForValue.build(); + } else { + notebookRuntimeTemplateBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The NotebookRuntimeTemplate to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate notebook_runtime_template = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeNotebookRuntimeTemplate( + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate value) { + if (notebookRuntimeTemplateBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && notebookRuntimeTemplate_ != null + && notebookRuntimeTemplate_ + != com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate + .getDefaultInstance()) { + getNotebookRuntimeTemplateBuilder().mergeFrom(value); + } else { + notebookRuntimeTemplate_ = value; + } + } else { + notebookRuntimeTemplateBuilder_.mergeFrom(value); + } + if (notebookRuntimeTemplate_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. The NotebookRuntimeTemplate to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate notebook_runtime_template = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearNotebookRuntimeTemplate() { + bitField0_ = (bitField0_ & ~0x00000002); + notebookRuntimeTemplate_ = null; + if (notebookRuntimeTemplateBuilder_ != null) { + notebookRuntimeTemplateBuilder_.dispose(); + notebookRuntimeTemplateBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The NotebookRuntimeTemplate to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate notebook_runtime_template = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate.Builder + getNotebookRuntimeTemplateBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getNotebookRuntimeTemplateFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The NotebookRuntimeTemplate to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate notebook_runtime_template = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateOrBuilder + getNotebookRuntimeTemplateOrBuilder() { + if (notebookRuntimeTemplateBuilder_ != null) { + return notebookRuntimeTemplateBuilder_.getMessageOrBuilder(); + } else { + return notebookRuntimeTemplate_ == null + ? com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate.getDefaultInstance() + : notebookRuntimeTemplate_; + } + } + /** + * + * + *
+     * Required. The NotebookRuntimeTemplate to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate notebook_runtime_template = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate, + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate.Builder, + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateOrBuilder> + getNotebookRuntimeTemplateFieldBuilder() { + if (notebookRuntimeTemplateBuilder_ == null) { + notebookRuntimeTemplateBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate, + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate.Builder, + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateOrBuilder>( + getNotebookRuntimeTemplate(), getParentForChildren(), isClean()); + notebookRuntimeTemplate_ = null; + } + return notebookRuntimeTemplateBuilder_; + } + + private java.lang.Object notebookRuntimeTemplateId_ = ""; + /** + * + * + *
+     * Optional. User specified ID for the notebook runtime template.
+     * 
+ * + * string notebook_runtime_template_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The notebookRuntimeTemplateId. + */ + public java.lang.String getNotebookRuntimeTemplateId() { + java.lang.Object ref = notebookRuntimeTemplateId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + notebookRuntimeTemplateId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. User specified ID for the notebook runtime template.
+     * 
+ * + * string notebook_runtime_template_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The bytes for notebookRuntimeTemplateId. + */ + public com.google.protobuf.ByteString getNotebookRuntimeTemplateIdBytes() { + java.lang.Object ref = notebookRuntimeTemplateId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + notebookRuntimeTemplateId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. User specified ID for the notebook runtime template.
+     * 
+ * + * string notebook_runtime_template_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The notebookRuntimeTemplateId to set. + * @return This builder for chaining. + */ + public Builder setNotebookRuntimeTemplateId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + notebookRuntimeTemplateId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. User specified ID for the notebook runtime template.
+     * 
+ * + * string notebook_runtime_template_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearNotebookRuntimeTemplateId() { + notebookRuntimeTemplateId_ = getDefaultInstance().getNotebookRuntimeTemplateId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. User specified ID for the notebook runtime template.
+     * 
+ * + * string notebook_runtime_template_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes for notebookRuntimeTemplateId to set. + * @return This builder for chaining. + */ + public Builder setNotebookRuntimeTemplateIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + notebookRuntimeTemplateId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateRequest) + private static final com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateRequest(); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateNotebookRuntimeTemplateRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CreateNotebookRuntimeTemplateRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CreateNotebookRuntimeTemplateRequestOrBuilder.java new file mode 100644 index 000000000000..827b33ca9003 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CreateNotebookRuntimeTemplateRequestOrBuilder.java @@ -0,0 +1,124 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/notebook_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +public interface CreateNotebookRuntimeTemplateRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the Location to create the
+   * NotebookRuntimeTemplate. Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The resource name of the Location to create the
+   * NotebookRuntimeTemplate. Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The NotebookRuntimeTemplate to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate notebook_runtime_template = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the notebookRuntimeTemplate field is set. + */ + boolean hasNotebookRuntimeTemplate(); + /** + * + * + *
+   * Required. The NotebookRuntimeTemplate to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate notebook_runtime_template = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The notebookRuntimeTemplate. + */ + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate getNotebookRuntimeTemplate(); + /** + * + * + *
+   * Required. The NotebookRuntimeTemplate to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate notebook_runtime_template = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateOrBuilder + getNotebookRuntimeTemplateOrBuilder(); + + /** + * + * + *
+   * Optional. User specified ID for the notebook runtime template.
+   * 
+ * + * string notebook_runtime_template_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The notebookRuntimeTemplateId. + */ + java.lang.String getNotebookRuntimeTemplateId(); + /** + * + * + *
+   * Optional. User specified ID for the notebook runtime template.
+   * 
+ * + * string notebook_runtime_template_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for notebookRuntimeTemplateId. + */ + com.google.protobuf.ByteString getNotebookRuntimeTemplateIdBytes(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CreateRagCorpusOperationMetadata.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CreateRagCorpusOperationMetadata.java new file mode 100644 index 000000000000..e03039cbcbeb --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CreateRagCorpusOperationMetadata.java @@ -0,0 +1,745 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/vertex_rag_data_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Runtime operation information for
+ * [VertexRagDataService.CreateRagCorpus][google.cloud.aiplatform.v1beta1.VertexRagDataService.CreateRagCorpus].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.CreateRagCorpusOperationMetadata} + */ +public final class CreateRagCorpusOperationMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.CreateRagCorpusOperationMetadata) + CreateRagCorpusOperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateRagCorpusOperationMetadata.newBuilder() to construct. + private CreateRagCorpusOperationMetadata( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateRagCorpusOperationMetadata() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateRagCorpusOperationMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_CreateRagCorpusOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_CreateRagCorpusOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.CreateRagCorpusOperationMetadata.class, + com.google.cloud.aiplatform.v1beta1.CreateRagCorpusOperationMetadata.Builder.class); + } + + private int bitField0_; + public static final int GENERIC_METADATA_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata genericMetadata_; + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + @java.lang.Override + public boolean hasGenericMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata getGenericMetadata() { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder() { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getGenericMetadata()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getGenericMetadata()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.CreateRagCorpusOperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.CreateRagCorpusOperationMetadata other = + (com.google.cloud.aiplatform.v1beta1.CreateRagCorpusOperationMetadata) obj; + + if (hasGenericMetadata() != other.hasGenericMetadata()) return false; + if (hasGenericMetadata()) { + if (!getGenericMetadata().equals(other.getGenericMetadata())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasGenericMetadata()) { + hash = (37 * hash) + GENERIC_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getGenericMetadata().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.CreateRagCorpusOperationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateRagCorpusOperationMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateRagCorpusOperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateRagCorpusOperationMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateRagCorpusOperationMetadata parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateRagCorpusOperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateRagCorpusOperationMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateRagCorpusOperationMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateRagCorpusOperationMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateRagCorpusOperationMetadata + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateRagCorpusOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateRagCorpusOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.CreateRagCorpusOperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Runtime operation information for
+   * [VertexRagDataService.CreateRagCorpus][google.cloud.aiplatform.v1beta1.VertexRagDataService.CreateRagCorpus].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.CreateRagCorpusOperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.CreateRagCorpusOperationMetadata) + com.google.cloud.aiplatform.v1beta1.CreateRagCorpusOperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_CreateRagCorpusOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_CreateRagCorpusOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.CreateRagCorpusOperationMetadata.class, + com.google.cloud.aiplatform.v1beta1.CreateRagCorpusOperationMetadata.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.CreateRagCorpusOperationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getGenericMetadataFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + genericMetadata_ = null; + if (genericMetadataBuilder_ != null) { + genericMetadataBuilder_.dispose(); + genericMetadataBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_CreateRagCorpusOperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.CreateRagCorpusOperationMetadata + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.CreateRagCorpusOperationMetadata + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.CreateRagCorpusOperationMetadata build() { + com.google.cloud.aiplatform.v1beta1.CreateRagCorpusOperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.CreateRagCorpusOperationMetadata buildPartial() { + com.google.cloud.aiplatform.v1beta1.CreateRagCorpusOperationMetadata result = + new com.google.cloud.aiplatform.v1beta1.CreateRagCorpusOperationMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1beta1.CreateRagCorpusOperationMetadata result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.genericMetadata_ = + genericMetadataBuilder_ == null ? genericMetadata_ : genericMetadataBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1beta1.CreateRagCorpusOperationMetadata) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.CreateRagCorpusOperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.CreateRagCorpusOperationMetadata other) { + if (other + == com.google.cloud.aiplatform.v1beta1.CreateRagCorpusOperationMetadata + .getDefaultInstance()) return this; + if (other.hasGenericMetadata()) { + mergeGenericMetadata(other.getGenericMetadata()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getGenericMetadataFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata genericMetadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadataOrBuilder> + genericMetadataBuilder_; + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + public boolean hasGenericMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + public com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata getGenericMetadata() { + if (genericMetadataBuilder_ == null) { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } else { + return genericMetadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder setGenericMetadata( + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata value) { + if (genericMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + genericMetadata_ = value; + } else { + genericMetadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder setGenericMetadata( + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.Builder builderForValue) { + if (genericMetadataBuilder_ == null) { + genericMetadata_ = builderForValue.build(); + } else { + genericMetadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder mergeGenericMetadata( + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata value) { + if (genericMetadataBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && genericMetadata_ != null + && genericMetadata_ + != com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata + .getDefaultInstance()) { + getGenericMetadataBuilder().mergeFrom(value); + } else { + genericMetadata_ = value; + } + } else { + genericMetadataBuilder_.mergeFrom(value); + } + if (genericMetadata_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder clearGenericMetadata() { + bitField0_ = (bitField0_ & ~0x00000001); + genericMetadata_ = null; + if (genericMetadataBuilder_ != null) { + genericMetadataBuilder_.dispose(); + genericMetadataBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + public com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.Builder + getGenericMetadataBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getGenericMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + public com.google.cloud.aiplatform.v1beta1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder() { + if (genericMetadataBuilder_ != null) { + return genericMetadataBuilder_.getMessageOrBuilder(); + } else { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadataOrBuilder> + getGenericMetadataFieldBuilder() { + if (genericMetadataBuilder_ == null) { + genericMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadataOrBuilder>( + getGenericMetadata(), getParentForChildren(), isClean()); + genericMetadata_ = null; + } + return genericMetadataBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.CreateRagCorpusOperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.CreateRagCorpusOperationMetadata) + private static final com.google.cloud.aiplatform.v1beta1.CreateRagCorpusOperationMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.CreateRagCorpusOperationMetadata(); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateRagCorpusOperationMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateRagCorpusOperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.CreateRagCorpusOperationMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CreateRagCorpusOperationMetadataOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CreateRagCorpusOperationMetadataOrBuilder.java new file mode 100644 index 000000000000..eb5a60f0e7fa --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CreateRagCorpusOperationMetadataOrBuilder.java @@ -0,0 +1,62 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/vertex_rag_data_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +public interface CreateRagCorpusOperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.CreateRagCorpusOperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + boolean hasGenericMetadata(); + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata getGenericMetadata(); + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CreateRagCorpusRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CreateRagCorpusRequest.java new file mode 100644 index 000000000000..efdeaf3b4c43 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CreateRagCorpusRequest.java @@ -0,0 +1,953 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/vertex_rag_data_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Request message for
+ * [VertexRagDataService.CreateRagCorpus][google.cloud.aiplatform.v1beta1.VertexRagDataService.CreateRagCorpus].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.CreateRagCorpusRequest} + */ +public final class CreateRagCorpusRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.CreateRagCorpusRequest) + CreateRagCorpusRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateRagCorpusRequest.newBuilder() to construct. + private CreateRagCorpusRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateRagCorpusRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateRagCorpusRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_CreateRagCorpusRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_CreateRagCorpusRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.CreateRagCorpusRequest.class, + com.google.cloud.aiplatform.v1beta1.CreateRagCorpusRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The resource name of the Location to create the RagCorpus in.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the Location to create the RagCorpus in.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RAG_CORPUS_FIELD_NUMBER = 2; + private com.google.cloud.aiplatform.v1beta1.RagCorpus ragCorpus_; + /** + * + * + *
+   * Required. The RagCorpus to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.RagCorpus rag_corpus = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the ragCorpus field is set. + */ + @java.lang.Override + public boolean hasRagCorpus() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. The RagCorpus to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.RagCorpus rag_corpus = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The ragCorpus. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.RagCorpus getRagCorpus() { + return ragCorpus_ == null + ? com.google.cloud.aiplatform.v1beta1.RagCorpus.getDefaultInstance() + : ragCorpus_; + } + /** + * + * + *
+   * Required. The RagCorpus to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.RagCorpus rag_corpus = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.RagCorpusOrBuilder getRagCorpusOrBuilder() { + return ragCorpus_ == null + ? com.google.cloud.aiplatform.v1beta1.RagCorpus.getDefaultInstance() + : ragCorpus_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getRagCorpus()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getRagCorpus()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.CreateRagCorpusRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.CreateRagCorpusRequest other = + (com.google.cloud.aiplatform.v1beta1.CreateRagCorpusRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasRagCorpus() != other.hasRagCorpus()) return false; + if (hasRagCorpus()) { + if (!getRagCorpus().equals(other.getRagCorpus())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasRagCorpus()) { + hash = (37 * hash) + RAG_CORPUS_FIELD_NUMBER; + hash = (53 * hash) + getRagCorpus().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.CreateRagCorpusRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateRagCorpusRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateRagCorpusRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateRagCorpusRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateRagCorpusRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateRagCorpusRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateRagCorpusRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateRagCorpusRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateRagCorpusRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateRagCorpusRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateRagCorpusRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateRagCorpusRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.CreateRagCorpusRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for
+   * [VertexRagDataService.CreateRagCorpus][google.cloud.aiplatform.v1beta1.VertexRagDataService.CreateRagCorpus].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.CreateRagCorpusRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.CreateRagCorpusRequest) + com.google.cloud.aiplatform.v1beta1.CreateRagCorpusRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_CreateRagCorpusRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_CreateRagCorpusRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.CreateRagCorpusRequest.class, + com.google.cloud.aiplatform.v1beta1.CreateRagCorpusRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.CreateRagCorpusRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getRagCorpusFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + ragCorpus_ = null; + if (ragCorpusBuilder_ != null) { + ragCorpusBuilder_.dispose(); + ragCorpusBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_CreateRagCorpusRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.CreateRagCorpusRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.CreateRagCorpusRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.CreateRagCorpusRequest build() { + com.google.cloud.aiplatform.v1beta1.CreateRagCorpusRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.CreateRagCorpusRequest buildPartial() { + com.google.cloud.aiplatform.v1beta1.CreateRagCorpusRequest result = + new com.google.cloud.aiplatform.v1beta1.CreateRagCorpusRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1beta1.CreateRagCorpusRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.ragCorpus_ = ragCorpusBuilder_ == null ? ragCorpus_ : ragCorpusBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1beta1.CreateRagCorpusRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.CreateRagCorpusRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.CreateRagCorpusRequest other) { + if (other == com.google.cloud.aiplatform.v1beta1.CreateRagCorpusRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasRagCorpus()) { + mergeRagCorpus(other.getRagCorpus()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getRagCorpusFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of the Location to create the RagCorpus in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Location to create the RagCorpus in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Location to create the RagCorpus in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Location to create the RagCorpus in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Location to create the RagCorpus in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.cloud.aiplatform.v1beta1.RagCorpus ragCorpus_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.RagCorpus, + com.google.cloud.aiplatform.v1beta1.RagCorpus.Builder, + com.google.cloud.aiplatform.v1beta1.RagCorpusOrBuilder> + ragCorpusBuilder_; + /** + * + * + *
+     * Required. The RagCorpus to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.RagCorpus rag_corpus = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the ragCorpus field is set. + */ + public boolean hasRagCorpus() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. The RagCorpus to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.RagCorpus rag_corpus = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The ragCorpus. + */ + public com.google.cloud.aiplatform.v1beta1.RagCorpus getRagCorpus() { + if (ragCorpusBuilder_ == null) { + return ragCorpus_ == null + ? com.google.cloud.aiplatform.v1beta1.RagCorpus.getDefaultInstance() + : ragCorpus_; + } else { + return ragCorpusBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The RagCorpus to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.RagCorpus rag_corpus = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setRagCorpus(com.google.cloud.aiplatform.v1beta1.RagCorpus value) { + if (ragCorpusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ragCorpus_ = value; + } else { + ragCorpusBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The RagCorpus to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.RagCorpus rag_corpus = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setRagCorpus( + com.google.cloud.aiplatform.v1beta1.RagCorpus.Builder builderForValue) { + if (ragCorpusBuilder_ == null) { + ragCorpus_ = builderForValue.build(); + } else { + ragCorpusBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The RagCorpus to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.RagCorpus rag_corpus = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeRagCorpus(com.google.cloud.aiplatform.v1beta1.RagCorpus value) { + if (ragCorpusBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && ragCorpus_ != null + && ragCorpus_ != com.google.cloud.aiplatform.v1beta1.RagCorpus.getDefaultInstance()) { + getRagCorpusBuilder().mergeFrom(value); + } else { + ragCorpus_ = value; + } + } else { + ragCorpusBuilder_.mergeFrom(value); + } + if (ragCorpus_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. The RagCorpus to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.RagCorpus rag_corpus = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearRagCorpus() { + bitField0_ = (bitField0_ & ~0x00000002); + ragCorpus_ = null; + if (ragCorpusBuilder_ != null) { + ragCorpusBuilder_.dispose(); + ragCorpusBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The RagCorpus to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.RagCorpus rag_corpus = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1beta1.RagCorpus.Builder getRagCorpusBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getRagCorpusFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The RagCorpus to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.RagCorpus rag_corpus = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1beta1.RagCorpusOrBuilder getRagCorpusOrBuilder() { + if (ragCorpusBuilder_ != null) { + return ragCorpusBuilder_.getMessageOrBuilder(); + } else { + return ragCorpus_ == null + ? com.google.cloud.aiplatform.v1beta1.RagCorpus.getDefaultInstance() + : ragCorpus_; + } + } + /** + * + * + *
+     * Required. The RagCorpus to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.RagCorpus rag_corpus = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.RagCorpus, + com.google.cloud.aiplatform.v1beta1.RagCorpus.Builder, + com.google.cloud.aiplatform.v1beta1.RagCorpusOrBuilder> + getRagCorpusFieldBuilder() { + if (ragCorpusBuilder_ == null) { + ragCorpusBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.RagCorpus, + com.google.cloud.aiplatform.v1beta1.RagCorpus.Builder, + com.google.cloud.aiplatform.v1beta1.RagCorpusOrBuilder>( + getRagCorpus(), getParentForChildren(), isClean()); + ragCorpus_ = null; + } + return ragCorpusBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.CreateRagCorpusRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.CreateRagCorpusRequest) + private static final com.google.cloud.aiplatform.v1beta1.CreateRagCorpusRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.CreateRagCorpusRequest(); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateRagCorpusRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateRagCorpusRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.CreateRagCorpusRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CreateRagCorpusRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CreateRagCorpusRequestOrBuilder.java new file mode 100644 index 000000000000..c02d37916911 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CreateRagCorpusRequestOrBuilder.java @@ -0,0 +1,98 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/vertex_rag_data_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +public interface CreateRagCorpusRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.CreateRagCorpusRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the Location to create the RagCorpus in.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The resource name of the Location to create the RagCorpus in.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The RagCorpus to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.RagCorpus rag_corpus = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the ragCorpus field is set. + */ + boolean hasRagCorpus(); + /** + * + * + *
+   * Required. The RagCorpus to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.RagCorpus rag_corpus = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The ragCorpus. + */ + com.google.cloud.aiplatform.v1beta1.RagCorpus getRagCorpus(); + /** + * + * + *
+   * Required. The RagCorpus to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.RagCorpus rag_corpus = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1beta1.RagCorpusOrBuilder getRagCorpusOrBuilder(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeleteNotebookRuntimeRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeleteNotebookRuntimeRequest.java new file mode 100644 index 000000000000..27e6f29f2a50 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeleteNotebookRuntimeRequest.java @@ -0,0 +1,670 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/notebook_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Request message for
+ * [NotebookService.DeleteNotebookRuntime][google.cloud.aiplatform.v1beta1.NotebookService.DeleteNotebookRuntime].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeRequest} + */ +public final class DeleteNotebookRuntimeRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeRequest) + DeleteNotebookRuntimeRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteNotebookRuntimeRequest.newBuilder() to construct. + private DeleteNotebookRuntimeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteNotebookRuntimeRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteNotebookRuntimeRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_DeleteNotebookRuntimeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_DeleteNotebookRuntimeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeRequest.class, + com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the NotebookRuntime resource to be deleted.
+   * Instead of checking whether the name is in valid NotebookRuntime resource
+   * name format, directly throw NotFound exception if there is no such
+   * NotebookRuntime in spanner.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the NotebookRuntime resource to be deleted.
+   * Instead of checking whether the name is in valid NotebookRuntime resource
+   * name format, directly throw NotFound exception if there is no such
+   * NotebookRuntime in spanner.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeRequest other = + (com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for
+   * [NotebookService.DeleteNotebookRuntime][google.cloud.aiplatform.v1beta1.NotebookService.DeleteNotebookRuntime].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeRequest) + com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_DeleteNotebookRuntimeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_DeleteNotebookRuntimeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeRequest.class, + com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_DeleteNotebookRuntimeRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeRequest + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeRequest build() { + com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeRequest buildPartial() { + com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeRequest result = + new com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeRequest other) { + if (other + == com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the NotebookRuntime resource to be deleted.
+     * Instead of checking whether the name is in valid NotebookRuntime resource
+     * name format, directly throw NotFound exception if there is no such
+     * NotebookRuntime in spanner.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the NotebookRuntime resource to be deleted.
+     * Instead of checking whether the name is in valid NotebookRuntime resource
+     * name format, directly throw NotFound exception if there is no such
+     * NotebookRuntime in spanner.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the NotebookRuntime resource to be deleted.
+     * Instead of checking whether the name is in valid NotebookRuntime resource
+     * name format, directly throw NotFound exception if there is no such
+     * NotebookRuntime in spanner.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the NotebookRuntime resource to be deleted.
+     * Instead of checking whether the name is in valid NotebookRuntime resource
+     * name format, directly throw NotFound exception if there is no such
+     * NotebookRuntime in spanner.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the NotebookRuntime resource to be deleted.
+     * Instead of checking whether the name is in valid NotebookRuntime resource
+     * name format, directly throw NotFound exception if there is no such
+     * NotebookRuntime in spanner.
+     * 
+ * + * + * 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. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeRequest) + private static final com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeRequest(); + } + + public static com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteNotebookRuntimeRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeleteNotebookRuntimeRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeleteNotebookRuntimeRequestOrBuilder.java new file mode 100644 index 000000000000..0321c3b119e6 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeleteNotebookRuntimeRequestOrBuilder.java @@ -0,0 +1,61 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/notebook_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +public interface DeleteNotebookRuntimeRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the NotebookRuntime resource to be deleted.
+   * Instead of checking whether the name is in valid NotebookRuntime resource
+   * name format, directly throw NotFound exception if there is no such
+   * NotebookRuntime in spanner.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the NotebookRuntime resource to be deleted.
+   * Instead of checking whether the name is in valid NotebookRuntime resource
+   * name format, directly throw NotFound exception if there is no such
+   * NotebookRuntime in spanner.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeleteNotebookRuntimeTemplateRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeleteNotebookRuntimeTemplateRequest.java new file mode 100644 index 000000000000..84e0c8454a72 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeleteNotebookRuntimeTemplateRequest.java @@ -0,0 +1,674 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/notebook_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Request message for
+ * [NotebookService.DeleteNotebookRuntimeTemplate][google.cloud.aiplatform.v1beta1.NotebookService.DeleteNotebookRuntimeTemplate].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeTemplateRequest} + */ +public final class DeleteNotebookRuntimeTemplateRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeTemplateRequest) + DeleteNotebookRuntimeTemplateRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteNotebookRuntimeTemplateRequest.newBuilder() to construct. + private DeleteNotebookRuntimeTemplateRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteNotebookRuntimeTemplateRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteNotebookRuntimeTemplateRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_DeleteNotebookRuntimeTemplateRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_DeleteNotebookRuntimeTemplateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeTemplateRequest.class, + com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeTemplateRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the NotebookRuntimeTemplate resource to be deleted.
+   * Format:
+   * `projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the NotebookRuntimeTemplate resource to be deleted.
+   * Format:
+   * `projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeTemplateRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeTemplateRequest other = + (com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeTemplateRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeTemplateRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeTemplateRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeTemplateRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeTemplateRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeTemplateRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeTemplateRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeTemplateRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeTemplateRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeTemplateRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeTemplateRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeTemplateRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeTemplateRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeTemplateRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for
+   * [NotebookService.DeleteNotebookRuntimeTemplate][google.cloud.aiplatform.v1beta1.NotebookService.DeleteNotebookRuntimeTemplate].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeTemplateRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeTemplateRequest) + com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeTemplateRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_DeleteNotebookRuntimeTemplateRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_DeleteNotebookRuntimeTemplateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeTemplateRequest.class, + com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeTemplateRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeTemplateRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_DeleteNotebookRuntimeTemplateRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeTemplateRequest + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeTemplateRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeTemplateRequest build() { + com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeTemplateRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeTemplateRequest buildPartial() { + com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeTemplateRequest result = + new com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeTemplateRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeTemplateRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeTemplateRequest) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeTemplateRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeTemplateRequest other) { + if (other + == com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeTemplateRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the NotebookRuntimeTemplate resource to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the NotebookRuntimeTemplate resource to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the NotebookRuntimeTemplate resource to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the NotebookRuntimeTemplate resource to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the NotebookRuntimeTemplate resource to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}`
+     * 
+ * + * + * 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. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeTemplateRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeTemplateRequest) + private static final com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeTemplateRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeTemplateRequest(); + } + + public static com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeTemplateRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteNotebookRuntimeTemplateRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeTemplateRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeleteNotebookRuntimeTemplateRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeleteNotebookRuntimeTemplateRequestOrBuilder.java new file mode 100644 index 000000000000..701384e06e5d --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeleteNotebookRuntimeTemplateRequestOrBuilder.java @@ -0,0 +1,59 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/notebook_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +public interface DeleteNotebookRuntimeTemplateRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeTemplateRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the NotebookRuntimeTemplate resource to be deleted.
+   * Format:
+   * `projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the NotebookRuntimeTemplate resource to be deleted.
+   * Format:
+   * `projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeleteRagCorpusRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeleteRagCorpusRequest.java new file mode 100644 index 000000000000..e6f5af6654d9 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeleteRagCorpusRequest.java @@ -0,0 +1,757 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/vertex_rag_data_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Request message for
+ * [VertexRagDataService.DeleteRagCorpus][google.cloud.aiplatform.v1beta1.VertexRagDataService.DeleteRagCorpus].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.DeleteRagCorpusRequest} + */ +public final class DeleteRagCorpusRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.DeleteRagCorpusRequest) + DeleteRagCorpusRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteRagCorpusRequest.newBuilder() to construct. + private DeleteRagCorpusRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteRagCorpusRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteRagCorpusRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_DeleteRagCorpusRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_DeleteRagCorpusRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.DeleteRagCorpusRequest.class, + com.google.cloud.aiplatform.v1beta1.DeleteRagCorpusRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the RagCorpus resource to be deleted.
+   * Format:
+   * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the RagCorpus resource to be deleted.
+   * Format:
+   * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FORCE_FIELD_NUMBER = 2; + private boolean force_ = false; + /** + * + * + *
+   * Optional. If set to true, any RagFiles in this RagCorpus will also be
+   * deleted. Otherwise, the request will only work if the RagCorpus has no
+   * RagFiles.
+   * 
+ * + * bool force = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (force_ != false) { + output.writeBool(2, force_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (force_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, force_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.DeleteRagCorpusRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.DeleteRagCorpusRequest other = + (com.google.cloud.aiplatform.v1beta1.DeleteRagCorpusRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (getForce() != other.getForce()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + FORCE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getForce()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.DeleteRagCorpusRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.DeleteRagCorpusRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.DeleteRagCorpusRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.DeleteRagCorpusRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.DeleteRagCorpusRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.DeleteRagCorpusRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.DeleteRagCorpusRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.DeleteRagCorpusRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.DeleteRagCorpusRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.DeleteRagCorpusRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.DeleteRagCorpusRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.DeleteRagCorpusRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.DeleteRagCorpusRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for
+   * [VertexRagDataService.DeleteRagCorpus][google.cloud.aiplatform.v1beta1.VertexRagDataService.DeleteRagCorpus].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.DeleteRagCorpusRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.DeleteRagCorpusRequest) + com.google.cloud.aiplatform.v1beta1.DeleteRagCorpusRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_DeleteRagCorpusRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_DeleteRagCorpusRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.DeleteRagCorpusRequest.class, + com.google.cloud.aiplatform.v1beta1.DeleteRagCorpusRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.DeleteRagCorpusRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + force_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_DeleteRagCorpusRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.DeleteRagCorpusRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.DeleteRagCorpusRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.DeleteRagCorpusRequest build() { + com.google.cloud.aiplatform.v1beta1.DeleteRagCorpusRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.DeleteRagCorpusRequest buildPartial() { + com.google.cloud.aiplatform.v1beta1.DeleteRagCorpusRequest result = + new com.google.cloud.aiplatform.v1beta1.DeleteRagCorpusRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1beta1.DeleteRagCorpusRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.force_ = force_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1beta1.DeleteRagCorpusRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.DeleteRagCorpusRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.DeleteRagCorpusRequest other) { + if (other == com.google.cloud.aiplatform.v1beta1.DeleteRagCorpusRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getForce() != false) { + setForce(other.getForce()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + force_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the RagCorpus resource to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the RagCorpus resource to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the RagCorpus resource to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the RagCorpus resource to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the RagCorpus resource to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
+     * 
+ * + * + * 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. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private boolean force_; + /** + * + * + *
+     * Optional. If set to true, any RagFiles in this RagCorpus will also be
+     * deleted. Otherwise, the request will only work if the RagCorpus has no
+     * RagFiles.
+     * 
+ * + * bool force = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + /** + * + * + *
+     * Optional. If set to true, any RagFiles in this RagCorpus will also be
+     * deleted. Otherwise, the request will only work if the RagCorpus has no
+     * RagFiles.
+     * 
+ * + * bool force = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The force to set. + * @return This builder for chaining. + */ + public Builder setForce(boolean value) { + + force_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If set to true, any RagFiles in this RagCorpus will also be
+     * deleted. Otherwise, the request will only work if the RagCorpus has no
+     * RagFiles.
+     * 
+ * + * bool force = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearForce() { + bitField0_ = (bitField0_ & ~0x00000002); + force_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.DeleteRagCorpusRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.DeleteRagCorpusRequest) + private static final com.google.cloud.aiplatform.v1beta1.DeleteRagCorpusRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.DeleteRagCorpusRequest(); + } + + public static com.google.cloud.aiplatform.v1beta1.DeleteRagCorpusRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteRagCorpusRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.DeleteRagCorpusRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeleteRagCorpusRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeleteRagCorpusRequestOrBuilder.java new file mode 100644 index 000000000000..104408303302 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeleteRagCorpusRequestOrBuilder.java @@ -0,0 +1,74 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/vertex_rag_data_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +public interface DeleteRagCorpusRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.DeleteRagCorpusRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the RagCorpus resource to be deleted.
+   * Format:
+   * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the RagCorpus resource to be deleted.
+   * Format:
+   * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. If set to true, any RagFiles in this RagCorpus will also be
+   * deleted. Otherwise, the request will only work if the RagCorpus has no
+   * RagFiles.
+   * 
+ * + * bool force = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The force. + */ + boolean getForce(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeleteRagFileRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeleteRagFileRequest.java new file mode 100644 index 000000000000..247b589c7da5 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeleteRagFileRequest.java @@ -0,0 +1,656 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/vertex_rag_data_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Request message for
+ * [VertexRagDataService.DeleteRagFile][google.cloud.aiplatform.v1beta1.VertexRagDataService.DeleteRagFile].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.DeleteRagFileRequest} + */ +public final class DeleteRagFileRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.DeleteRagFileRequest) + DeleteRagFileRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteRagFileRequest.newBuilder() to construct. + private DeleteRagFileRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteRagFileRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteRagFileRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_DeleteRagFileRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_DeleteRagFileRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.DeleteRagFileRequest.class, + com.google.cloud.aiplatform.v1beta1.DeleteRagFileRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the RagFile resource to be deleted.
+   * Format:
+   * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}/ragFiles/{rag_file}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the RagFile resource to be deleted.
+   * Format:
+   * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}/ragFiles/{rag_file}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.DeleteRagFileRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.DeleteRagFileRequest other = + (com.google.cloud.aiplatform.v1beta1.DeleteRagFileRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.DeleteRagFileRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.DeleteRagFileRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.DeleteRagFileRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.DeleteRagFileRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.DeleteRagFileRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.DeleteRagFileRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.DeleteRagFileRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.DeleteRagFileRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.DeleteRagFileRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.DeleteRagFileRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.DeleteRagFileRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.DeleteRagFileRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.DeleteRagFileRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for
+   * [VertexRagDataService.DeleteRagFile][google.cloud.aiplatform.v1beta1.VertexRagDataService.DeleteRagFile].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.DeleteRagFileRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.DeleteRagFileRequest) + com.google.cloud.aiplatform.v1beta1.DeleteRagFileRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_DeleteRagFileRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_DeleteRagFileRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.DeleteRagFileRequest.class, + com.google.cloud.aiplatform.v1beta1.DeleteRagFileRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.DeleteRagFileRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_DeleteRagFileRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.DeleteRagFileRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.DeleteRagFileRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.DeleteRagFileRequest build() { + com.google.cloud.aiplatform.v1beta1.DeleteRagFileRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.DeleteRagFileRequest buildPartial() { + com.google.cloud.aiplatform.v1beta1.DeleteRagFileRequest result = + new com.google.cloud.aiplatform.v1beta1.DeleteRagFileRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1beta1.DeleteRagFileRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1beta1.DeleteRagFileRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.DeleteRagFileRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.DeleteRagFileRequest other) { + if (other == com.google.cloud.aiplatform.v1beta1.DeleteRagFileRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the RagFile resource to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}/ragFiles/{rag_file}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the RagFile resource to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}/ragFiles/{rag_file}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the RagFile resource to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}/ragFiles/{rag_file}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the RagFile resource to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}/ragFiles/{rag_file}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the RagFile resource to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}/ragFiles/{rag_file}`
+     * 
+ * + * + * 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. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.DeleteRagFileRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.DeleteRagFileRequest) + private static final com.google.cloud.aiplatform.v1beta1.DeleteRagFileRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.DeleteRagFileRequest(); + } + + public static com.google.cloud.aiplatform.v1beta1.DeleteRagFileRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteRagFileRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.DeleteRagFileRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeleteRagFileRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeleteRagFileRequestOrBuilder.java new file mode 100644 index 000000000000..c4cb399640ba --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeleteRagFileRequestOrBuilder.java @@ -0,0 +1,59 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/vertex_rag_data_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +public interface DeleteRagFileRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.DeleteRagFileRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the RagFile resource to be deleted.
+   * Format:
+   * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}/ragFiles/{rag_file}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the RagFile resource to be deleted.
+   * Format:
+   * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}/ragFiles/{rag_file}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DirectUploadSource.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DirectUploadSource.java new file mode 100644 index 000000000000..99ae29e6ff79 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DirectUploadSource.java @@ -0,0 +1,433 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/io.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * The input content is encapsulated and uploaded in the request.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.DirectUploadSource} + */ +public final class DirectUploadSource extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.DirectUploadSource) + DirectUploadSourceOrBuilder { + private static final long serialVersionUID = 0L; + // Use DirectUploadSource.newBuilder() to construct. + private DirectUploadSource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DirectUploadSource() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DirectUploadSource(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.IoProto + .internal_static_google_cloud_aiplatform_v1beta1_DirectUploadSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.IoProto + .internal_static_google_cloud_aiplatform_v1beta1_DirectUploadSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.DirectUploadSource.class, + com.google.cloud.aiplatform.v1beta1.DirectUploadSource.Builder.class); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.DirectUploadSource)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.DirectUploadSource other = + (com.google.cloud.aiplatform.v1beta1.DirectUploadSource) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.DirectUploadSource parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.DirectUploadSource parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.DirectUploadSource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.DirectUploadSource parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.DirectUploadSource parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.DirectUploadSource parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.DirectUploadSource parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.DirectUploadSource parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.DirectUploadSource parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.DirectUploadSource parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.DirectUploadSource parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.DirectUploadSource parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.DirectUploadSource prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The input content is encapsulated and uploaded in the request.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.DirectUploadSource} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.DirectUploadSource) + com.google.cloud.aiplatform.v1beta1.DirectUploadSourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.IoProto + .internal_static_google_cloud_aiplatform_v1beta1_DirectUploadSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.IoProto + .internal_static_google_cloud_aiplatform_v1beta1_DirectUploadSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.DirectUploadSource.class, + com.google.cloud.aiplatform.v1beta1.DirectUploadSource.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.DirectUploadSource.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.IoProto + .internal_static_google_cloud_aiplatform_v1beta1_DirectUploadSource_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.DirectUploadSource getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.DirectUploadSource.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.DirectUploadSource build() { + com.google.cloud.aiplatform.v1beta1.DirectUploadSource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.DirectUploadSource buildPartial() { + com.google.cloud.aiplatform.v1beta1.DirectUploadSource result = + new com.google.cloud.aiplatform.v1beta1.DirectUploadSource(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1beta1.DirectUploadSource) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.DirectUploadSource) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.DirectUploadSource other) { + if (other == com.google.cloud.aiplatform.v1beta1.DirectUploadSource.getDefaultInstance()) + return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.DirectUploadSource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.DirectUploadSource) + private static final com.google.cloud.aiplatform.v1beta1.DirectUploadSource DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.DirectUploadSource(); + } + + public static com.google.cloud.aiplatform.v1beta1.DirectUploadSource getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DirectUploadSource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.DirectUploadSource getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DirectUploadSourceOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DirectUploadSourceOrBuilder.java new file mode 100644 index 000000000000..e4568f8ea012 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DirectUploadSourceOrBuilder.java @@ -0,0 +1,25 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/io.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +public interface DirectUploadSourceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.DirectUploadSource) + com.google.protobuf.MessageOrBuilder {} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/EvaluateInstancesRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/EvaluateInstancesRequest.java index 2575461211ae..0f3a34093f42 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/EvaluateInstancesRequest.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/EvaluateInstancesRequest.java @@ -80,7 +80,6 @@ public enum MetricInputsCase SAFETY_INPUT(8), GROUNDEDNESS_INPUT(9), FULFILLMENT_INPUT(12), - RESPONSE_RECALL_INPUT(13), SUMMARIZATION_QUALITY_INPUT(7), PAIRWISE_SUMMARIZATION_QUALITY_INPUT(23), SUMMARIZATION_HELPFULNESS_INPUT(14), @@ -90,7 +89,6 @@ public enum MetricInputsCase QUESTION_ANSWERING_RELEVANCE_INPUT(16), QUESTION_ANSWERING_HELPFULNESS_INPUT(17), QUESTION_ANSWERING_CORRECTNESS_INPUT(18), - RAG_CONTEXT_RECALL_INPUT(11), TOOL_CALL_VALID_INPUT(19), TOOL_NAME_MATCH_INPUT(20), TOOL_PARAMETER_KEY_MATCH_INPUT(21), @@ -129,8 +127,6 @@ public static MetricInputsCase forNumber(int value) { return GROUNDEDNESS_INPUT; case 12: return FULFILLMENT_INPUT; - case 13: - return RESPONSE_RECALL_INPUT; case 7: return SUMMARIZATION_QUALITY_INPUT; case 23: @@ -149,8 +145,6 @@ public static MetricInputsCase forNumber(int value) { return QUESTION_ANSWERING_HELPFULNESS_INPUT; case 18: return QUESTION_ANSWERING_CORRECTNESS_INPUT; - case 11: - return RAG_CONTEXT_RECALL_INPUT; case 19: return TOOL_CALL_VALID_INPUT; case 20: @@ -595,58 +589,6 @@ public com.google.cloud.aiplatform.v1beta1.FulfillmentInput getFulfillmentInput( return com.google.cloud.aiplatform.v1beta1.FulfillmentInput.getDefaultInstance(); } - public static final int RESPONSE_RECALL_INPUT_FIELD_NUMBER = 13; - /** - * - * - *
-   * Input for response recall metric.
-   * 
- * - * .google.cloud.aiplatform.v1beta1.ResponseRecallInput response_recall_input = 13; - * - * @return Whether the responseRecallInput field is set. - */ - @java.lang.Override - public boolean hasResponseRecallInput() { - return metricInputsCase_ == 13; - } - /** - * - * - *
-   * Input for response recall metric.
-   * 
- * - * .google.cloud.aiplatform.v1beta1.ResponseRecallInput response_recall_input = 13; - * - * @return The responseRecallInput. - */ - @java.lang.Override - public com.google.cloud.aiplatform.v1beta1.ResponseRecallInput getResponseRecallInput() { - if (metricInputsCase_ == 13) { - return (com.google.cloud.aiplatform.v1beta1.ResponseRecallInput) metricInputs_; - } - return com.google.cloud.aiplatform.v1beta1.ResponseRecallInput.getDefaultInstance(); - } - /** - * - * - *
-   * Input for response recall metric.
-   * 
- * - * .google.cloud.aiplatform.v1beta1.ResponseRecallInput response_recall_input = 13; - */ - @java.lang.Override - public com.google.cloud.aiplatform.v1beta1.ResponseRecallInputOrBuilder - getResponseRecallInputOrBuilder() { - if (metricInputsCase_ == 13) { - return (com.google.cloud.aiplatform.v1beta1.ResponseRecallInput) metricInputs_; - } - return com.google.cloud.aiplatform.v1beta1.ResponseRecallInput.getDefaultInstance(); - } - public static final int SUMMARIZATION_QUALITY_INPUT_FIELD_NUMBER = 7; /** * @@ -1194,61 +1136,6 @@ public boolean hasQuestionAnsweringCorrectnessInput() { .getDefaultInstance(); } - public static final int RAG_CONTEXT_RECALL_INPUT_FIELD_NUMBER = 11; - /** - * - * - *
-   * Input for rag context recall metric.
-   * 
- * - * .google.cloud.aiplatform.v1beta1.RagContextRecallInput rag_context_recall_input = 11; - * - * - * @return Whether the ragContextRecallInput field is set. - */ - @java.lang.Override - public boolean hasRagContextRecallInput() { - return metricInputsCase_ == 11; - } - /** - * - * - *
-   * Input for rag context recall metric.
-   * 
- * - * .google.cloud.aiplatform.v1beta1.RagContextRecallInput rag_context_recall_input = 11; - * - * - * @return The ragContextRecallInput. - */ - @java.lang.Override - public com.google.cloud.aiplatform.v1beta1.RagContextRecallInput getRagContextRecallInput() { - if (metricInputsCase_ == 11) { - return (com.google.cloud.aiplatform.v1beta1.RagContextRecallInput) metricInputs_; - } - return com.google.cloud.aiplatform.v1beta1.RagContextRecallInput.getDefaultInstance(); - } - /** - * - * - *
-   * Input for rag context recall metric.
-   * 
- * - * .google.cloud.aiplatform.v1beta1.RagContextRecallInput rag_context_recall_input = 11; - * - */ - @java.lang.Override - public com.google.cloud.aiplatform.v1beta1.RagContextRecallInputOrBuilder - getRagContextRecallInputOrBuilder() { - if (metricInputsCase_ == 11) { - return (com.google.cloud.aiplatform.v1beta1.RagContextRecallInput) metricInputs_; - } - return com.google.cloud.aiplatform.v1beta1.RagContextRecallInput.getDefaultInstance(); - } - public static final int TOOL_CALL_VALID_INPUT_FIELD_NUMBER = 19; /** * @@ -1577,17 +1464,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io output.writeMessage( 10, (com.google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityInput) metricInputs_); } - if (metricInputsCase_ == 11) { - output.writeMessage( - 11, (com.google.cloud.aiplatform.v1beta1.RagContextRecallInput) metricInputs_); - } if (metricInputsCase_ == 12) { output.writeMessage(12, (com.google.cloud.aiplatform.v1beta1.FulfillmentInput) metricInputs_); } - if (metricInputsCase_ == 13) { - output.writeMessage( - 13, (com.google.cloud.aiplatform.v1beta1.ResponseRecallInput) metricInputs_); - } if (metricInputsCase_ == 14) { output.writeMessage( 14, (com.google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessInput) metricInputs_); @@ -1695,21 +1574,11 @@ public int getSerializedSize() { 10, (com.google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityInput) metricInputs_); } - if (metricInputsCase_ == 11) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 11, (com.google.cloud.aiplatform.v1beta1.RagContextRecallInput) metricInputs_); - } if (metricInputsCase_ == 12) { size += com.google.protobuf.CodedOutputStream.computeMessageSize( 12, (com.google.cloud.aiplatform.v1beta1.FulfillmentInput) metricInputs_); } - if (metricInputsCase_ == 13) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 13, (com.google.cloud.aiplatform.v1beta1.ResponseRecallInput) metricInputs_); - } if (metricInputsCase_ == 14) { size += com.google.protobuf.CodedOutputStream.computeMessageSize( @@ -1818,9 +1687,6 @@ public boolean equals(final java.lang.Object obj) { case 12: if (!getFulfillmentInput().equals(other.getFulfillmentInput())) return false; break; - case 13: - if (!getResponseRecallInput().equals(other.getResponseRecallInput())) return false; - break; case 7: if (!getSummarizationQualityInput().equals(other.getSummarizationQualityInput())) return false; @@ -1857,9 +1723,6 @@ public boolean equals(final java.lang.Object obj) { if (!getQuestionAnsweringCorrectnessInput() .equals(other.getQuestionAnsweringCorrectnessInput())) return false; break; - case 11: - if (!getRagContextRecallInput().equals(other.getRagContextRecallInput())) return false; - break; case 19: if (!getToolCallValidInput().equals(other.getToolCallValidInput())) return false; break; @@ -1923,10 +1786,6 @@ public int hashCode() { hash = (37 * hash) + FULFILLMENT_INPUT_FIELD_NUMBER; hash = (53 * hash) + getFulfillmentInput().hashCode(); break; - case 13: - hash = (37 * hash) + RESPONSE_RECALL_INPUT_FIELD_NUMBER; - hash = (53 * hash) + getResponseRecallInput().hashCode(); - break; case 7: hash = (37 * hash) + SUMMARIZATION_QUALITY_INPUT_FIELD_NUMBER; hash = (53 * hash) + getSummarizationQualityInput().hashCode(); @@ -1963,10 +1822,6 @@ public int hashCode() { hash = (37 * hash) + QUESTION_ANSWERING_CORRECTNESS_INPUT_FIELD_NUMBER; hash = (53 * hash) + getQuestionAnsweringCorrectnessInput().hashCode(); break; - case 11: - hash = (37 * hash) + RAG_CONTEXT_RECALL_INPUT_FIELD_NUMBER; - hash = (53 * hash) + getRagContextRecallInput().hashCode(); - break; case 19: hash = (37 * hash) + TOOL_CALL_VALID_INPUT_FIELD_NUMBER; hash = (53 * hash) + getToolCallValidInput().hashCode(); @@ -2150,9 +2005,6 @@ public Builder clear() { if (fulfillmentInputBuilder_ != null) { fulfillmentInputBuilder_.clear(); } - if (responseRecallInputBuilder_ != null) { - responseRecallInputBuilder_.clear(); - } if (summarizationQualityInputBuilder_ != null) { summarizationQualityInputBuilder_.clear(); } @@ -2180,9 +2032,6 @@ public Builder clear() { if (questionAnsweringCorrectnessInputBuilder_ != null) { questionAnsweringCorrectnessInputBuilder_.clear(); } - if (ragContextRecallInputBuilder_ != null) { - ragContextRecallInputBuilder_.clear(); - } if (toolCallValidInputBuilder_ != null) { toolCallValidInputBuilder_.clear(); } @@ -2237,7 +2086,7 @@ public com.google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest buildPartial private void buildPartial0( com.google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest result) { int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00800000) != 0)) { + if (((from_bitField0_ & 0x00200000) != 0)) { result.location_ = location_; } } @@ -2270,9 +2119,6 @@ private void buildPartialOneofs( if (metricInputsCase_ == 12 && fulfillmentInputBuilder_ != null) { result.metricInputs_ = fulfillmentInputBuilder_.build(); } - if (metricInputsCase_ == 13 && responseRecallInputBuilder_ != null) { - result.metricInputs_ = responseRecallInputBuilder_.build(); - } if (metricInputsCase_ == 7 && summarizationQualityInputBuilder_ != null) { result.metricInputs_ = summarizationQualityInputBuilder_.build(); } @@ -2300,9 +2146,6 @@ private void buildPartialOneofs( if (metricInputsCase_ == 18 && questionAnsweringCorrectnessInputBuilder_ != null) { result.metricInputs_ = questionAnsweringCorrectnessInputBuilder_.build(); } - if (metricInputsCase_ == 11 && ragContextRecallInputBuilder_ != null) { - result.metricInputs_ = ragContextRecallInputBuilder_.build(); - } if (metricInputsCase_ == 19 && toolCallValidInputBuilder_ != null) { result.metricInputs_ = toolCallValidInputBuilder_.build(); } @@ -2366,7 +2209,7 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.EvaluateInstancesRe return this; if (!other.getLocation().isEmpty()) { location_ = other.location_; - bitField0_ |= 0x00800000; + bitField0_ |= 0x00200000; onChanged(); } switch (other.getMetricInputsCase()) { @@ -2410,11 +2253,6 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.EvaluateInstancesRe mergeFulfillmentInput(other.getFulfillmentInput()); break; } - case RESPONSE_RECALL_INPUT: - { - mergeResponseRecallInput(other.getResponseRecallInput()); - break; - } case SUMMARIZATION_QUALITY_INPUT: { mergeSummarizationQualityInput(other.getSummarizationQualityInput()); @@ -2461,11 +2299,6 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.EvaluateInstancesRe mergeQuestionAnsweringCorrectnessInput(other.getQuestionAnsweringCorrectnessInput()); break; } - case RAG_CONTEXT_RECALL_INPUT: - { - mergeRagContextRecallInput(other.getRagContextRecallInput()); - break; - } case TOOL_CALL_VALID_INPUT: { mergeToolCallValidInput(other.getToolCallValidInput()); @@ -2520,7 +2353,7 @@ public Builder mergeFrom( case 10: { location_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00800000; + bitField0_ |= 0x00200000; break; } // case 10 case 18: @@ -2580,13 +2413,6 @@ public Builder mergeFrom( metricInputsCase_ = 10; break; } // case 82 - case 90: - { - input.readMessage( - getRagContextRecallInputFieldBuilder().getBuilder(), extensionRegistry); - metricInputsCase_ = 11; - break; - } // case 90 case 98: { input.readMessage( @@ -2594,13 +2420,6 @@ public Builder mergeFrom( metricInputsCase_ = 12; break; } // case 98 - case 106: - { - input.readMessage( - getResponseRecallInputFieldBuilder().getBuilder(), extensionRegistry); - metricInputsCase_ = 13; - break; - } // case 106 case 114: { input.readMessage( @@ -4433,221 +4252,6 @@ public Builder clearFulfillmentInput() { return fulfillmentInputBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.aiplatform.v1beta1.ResponseRecallInput, - com.google.cloud.aiplatform.v1beta1.ResponseRecallInput.Builder, - com.google.cloud.aiplatform.v1beta1.ResponseRecallInputOrBuilder> - responseRecallInputBuilder_; - /** - * - * - *
-     * Input for response recall metric.
-     * 
- * - * .google.cloud.aiplatform.v1beta1.ResponseRecallInput response_recall_input = 13; - * - * @return Whether the responseRecallInput field is set. - */ - @java.lang.Override - public boolean hasResponseRecallInput() { - return metricInputsCase_ == 13; - } - /** - * - * - *
-     * Input for response recall metric.
-     * 
- * - * .google.cloud.aiplatform.v1beta1.ResponseRecallInput response_recall_input = 13; - * - * @return The responseRecallInput. - */ - @java.lang.Override - public com.google.cloud.aiplatform.v1beta1.ResponseRecallInput getResponseRecallInput() { - if (responseRecallInputBuilder_ == null) { - if (metricInputsCase_ == 13) { - return (com.google.cloud.aiplatform.v1beta1.ResponseRecallInput) metricInputs_; - } - return com.google.cloud.aiplatform.v1beta1.ResponseRecallInput.getDefaultInstance(); - } else { - if (metricInputsCase_ == 13) { - return responseRecallInputBuilder_.getMessage(); - } - return com.google.cloud.aiplatform.v1beta1.ResponseRecallInput.getDefaultInstance(); - } - } - /** - * - * - *
-     * Input for response recall metric.
-     * 
- * - * .google.cloud.aiplatform.v1beta1.ResponseRecallInput response_recall_input = 13; - */ - public Builder setResponseRecallInput( - com.google.cloud.aiplatform.v1beta1.ResponseRecallInput value) { - if (responseRecallInputBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - metricInputs_ = value; - onChanged(); - } else { - responseRecallInputBuilder_.setMessage(value); - } - metricInputsCase_ = 13; - return this; - } - /** - * - * - *
-     * Input for response recall metric.
-     * 
- * - * .google.cloud.aiplatform.v1beta1.ResponseRecallInput response_recall_input = 13; - */ - public Builder setResponseRecallInput( - com.google.cloud.aiplatform.v1beta1.ResponseRecallInput.Builder builderForValue) { - if (responseRecallInputBuilder_ == null) { - metricInputs_ = builderForValue.build(); - onChanged(); - } else { - responseRecallInputBuilder_.setMessage(builderForValue.build()); - } - metricInputsCase_ = 13; - return this; - } - /** - * - * - *
-     * Input for response recall metric.
-     * 
- * - * .google.cloud.aiplatform.v1beta1.ResponseRecallInput response_recall_input = 13; - */ - public Builder mergeResponseRecallInput( - com.google.cloud.aiplatform.v1beta1.ResponseRecallInput value) { - if (responseRecallInputBuilder_ == null) { - if (metricInputsCase_ == 13 - && metricInputs_ - != com.google.cloud.aiplatform.v1beta1.ResponseRecallInput.getDefaultInstance()) { - metricInputs_ = - com.google.cloud.aiplatform.v1beta1.ResponseRecallInput.newBuilder( - (com.google.cloud.aiplatform.v1beta1.ResponseRecallInput) metricInputs_) - .mergeFrom(value) - .buildPartial(); - } else { - metricInputs_ = value; - } - onChanged(); - } else { - if (metricInputsCase_ == 13) { - responseRecallInputBuilder_.mergeFrom(value); - } else { - responseRecallInputBuilder_.setMessage(value); - } - } - metricInputsCase_ = 13; - return this; - } - /** - * - * - *
-     * Input for response recall metric.
-     * 
- * - * .google.cloud.aiplatform.v1beta1.ResponseRecallInput response_recall_input = 13; - */ - public Builder clearResponseRecallInput() { - if (responseRecallInputBuilder_ == null) { - if (metricInputsCase_ == 13) { - metricInputsCase_ = 0; - metricInputs_ = null; - onChanged(); - } - } else { - if (metricInputsCase_ == 13) { - metricInputsCase_ = 0; - metricInputs_ = null; - } - responseRecallInputBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Input for response recall metric.
-     * 
- * - * .google.cloud.aiplatform.v1beta1.ResponseRecallInput response_recall_input = 13; - */ - public com.google.cloud.aiplatform.v1beta1.ResponseRecallInput.Builder - getResponseRecallInputBuilder() { - return getResponseRecallInputFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Input for response recall metric.
-     * 
- * - * .google.cloud.aiplatform.v1beta1.ResponseRecallInput response_recall_input = 13; - */ - @java.lang.Override - public com.google.cloud.aiplatform.v1beta1.ResponseRecallInputOrBuilder - getResponseRecallInputOrBuilder() { - if ((metricInputsCase_ == 13) && (responseRecallInputBuilder_ != null)) { - return responseRecallInputBuilder_.getMessageOrBuilder(); - } else { - if (metricInputsCase_ == 13) { - return (com.google.cloud.aiplatform.v1beta1.ResponseRecallInput) metricInputs_; - } - return com.google.cloud.aiplatform.v1beta1.ResponseRecallInput.getDefaultInstance(); - } - } - /** - * - * - *
-     * Input for response recall metric.
-     * 
- * - * .google.cloud.aiplatform.v1beta1.ResponseRecallInput response_recall_input = 13; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.aiplatform.v1beta1.ResponseRecallInput, - com.google.cloud.aiplatform.v1beta1.ResponseRecallInput.Builder, - com.google.cloud.aiplatform.v1beta1.ResponseRecallInputOrBuilder> - getResponseRecallInputFieldBuilder() { - if (responseRecallInputBuilder_ == null) { - if (!(metricInputsCase_ == 13)) { - metricInputs_ = - com.google.cloud.aiplatform.v1beta1.ResponseRecallInput.getDefaultInstance(); - } - responseRecallInputBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.aiplatform.v1beta1.ResponseRecallInput, - com.google.cloud.aiplatform.v1beta1.ResponseRecallInput.Builder, - com.google.cloud.aiplatform.v1beta1.ResponseRecallInputOrBuilder>( - (com.google.cloud.aiplatform.v1beta1.ResponseRecallInput) metricInputs_, - getParentForChildren(), - isClean()); - metricInputs_ = null; - } - metricInputsCase_ = 13; - onChanged(); - return responseRecallInputBuilder_; - } - private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.aiplatform.v1beta1.SummarizationQualityInput, com.google.cloud.aiplatform.v1beta1.SummarizationQualityInput.Builder, @@ -6836,230 +6440,6 @@ public Builder clearQuestionAnsweringCorrectnessInput() { return questionAnsweringCorrectnessInputBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.aiplatform.v1beta1.RagContextRecallInput, - com.google.cloud.aiplatform.v1beta1.RagContextRecallInput.Builder, - com.google.cloud.aiplatform.v1beta1.RagContextRecallInputOrBuilder> - ragContextRecallInputBuilder_; - /** - * - * - *
-     * Input for rag context recall metric.
-     * 
- * - * .google.cloud.aiplatform.v1beta1.RagContextRecallInput rag_context_recall_input = 11; - * - * - * @return Whether the ragContextRecallInput field is set. - */ - @java.lang.Override - public boolean hasRagContextRecallInput() { - return metricInputsCase_ == 11; - } - /** - * - * - *
-     * Input for rag context recall metric.
-     * 
- * - * .google.cloud.aiplatform.v1beta1.RagContextRecallInput rag_context_recall_input = 11; - * - * - * @return The ragContextRecallInput. - */ - @java.lang.Override - public com.google.cloud.aiplatform.v1beta1.RagContextRecallInput getRagContextRecallInput() { - if (ragContextRecallInputBuilder_ == null) { - if (metricInputsCase_ == 11) { - return (com.google.cloud.aiplatform.v1beta1.RagContextRecallInput) metricInputs_; - } - return com.google.cloud.aiplatform.v1beta1.RagContextRecallInput.getDefaultInstance(); - } else { - if (metricInputsCase_ == 11) { - return ragContextRecallInputBuilder_.getMessage(); - } - return com.google.cloud.aiplatform.v1beta1.RagContextRecallInput.getDefaultInstance(); - } - } - /** - * - * - *
-     * Input for rag context recall metric.
-     * 
- * - * .google.cloud.aiplatform.v1beta1.RagContextRecallInput rag_context_recall_input = 11; - * - */ - public Builder setRagContextRecallInput( - com.google.cloud.aiplatform.v1beta1.RagContextRecallInput value) { - if (ragContextRecallInputBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - metricInputs_ = value; - onChanged(); - } else { - ragContextRecallInputBuilder_.setMessage(value); - } - metricInputsCase_ = 11; - return this; - } - /** - * - * - *
-     * Input for rag context recall metric.
-     * 
- * - * .google.cloud.aiplatform.v1beta1.RagContextRecallInput rag_context_recall_input = 11; - * - */ - public Builder setRagContextRecallInput( - com.google.cloud.aiplatform.v1beta1.RagContextRecallInput.Builder builderForValue) { - if (ragContextRecallInputBuilder_ == null) { - metricInputs_ = builderForValue.build(); - onChanged(); - } else { - ragContextRecallInputBuilder_.setMessage(builderForValue.build()); - } - metricInputsCase_ = 11; - return this; - } - /** - * - * - *
-     * Input for rag context recall metric.
-     * 
- * - * .google.cloud.aiplatform.v1beta1.RagContextRecallInput rag_context_recall_input = 11; - * - */ - public Builder mergeRagContextRecallInput( - com.google.cloud.aiplatform.v1beta1.RagContextRecallInput value) { - if (ragContextRecallInputBuilder_ == null) { - if (metricInputsCase_ == 11 - && metricInputs_ - != com.google.cloud.aiplatform.v1beta1.RagContextRecallInput.getDefaultInstance()) { - metricInputs_ = - com.google.cloud.aiplatform.v1beta1.RagContextRecallInput.newBuilder( - (com.google.cloud.aiplatform.v1beta1.RagContextRecallInput) metricInputs_) - .mergeFrom(value) - .buildPartial(); - } else { - metricInputs_ = value; - } - onChanged(); - } else { - if (metricInputsCase_ == 11) { - ragContextRecallInputBuilder_.mergeFrom(value); - } else { - ragContextRecallInputBuilder_.setMessage(value); - } - } - metricInputsCase_ = 11; - return this; - } - /** - * - * - *
-     * Input for rag context recall metric.
-     * 
- * - * .google.cloud.aiplatform.v1beta1.RagContextRecallInput rag_context_recall_input = 11; - * - */ - public Builder clearRagContextRecallInput() { - if (ragContextRecallInputBuilder_ == null) { - if (metricInputsCase_ == 11) { - metricInputsCase_ = 0; - metricInputs_ = null; - onChanged(); - } - } else { - if (metricInputsCase_ == 11) { - metricInputsCase_ = 0; - metricInputs_ = null; - } - ragContextRecallInputBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Input for rag context recall metric.
-     * 
- * - * .google.cloud.aiplatform.v1beta1.RagContextRecallInput rag_context_recall_input = 11; - * - */ - public com.google.cloud.aiplatform.v1beta1.RagContextRecallInput.Builder - getRagContextRecallInputBuilder() { - return getRagContextRecallInputFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Input for rag context recall metric.
-     * 
- * - * .google.cloud.aiplatform.v1beta1.RagContextRecallInput rag_context_recall_input = 11; - * - */ - @java.lang.Override - public com.google.cloud.aiplatform.v1beta1.RagContextRecallInputOrBuilder - getRagContextRecallInputOrBuilder() { - if ((metricInputsCase_ == 11) && (ragContextRecallInputBuilder_ != null)) { - return ragContextRecallInputBuilder_.getMessageOrBuilder(); - } else { - if (metricInputsCase_ == 11) { - return (com.google.cloud.aiplatform.v1beta1.RagContextRecallInput) metricInputs_; - } - return com.google.cloud.aiplatform.v1beta1.RagContextRecallInput.getDefaultInstance(); - } - } - /** - * - * - *
-     * Input for rag context recall metric.
-     * 
- * - * .google.cloud.aiplatform.v1beta1.RagContextRecallInput rag_context_recall_input = 11; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.aiplatform.v1beta1.RagContextRecallInput, - com.google.cloud.aiplatform.v1beta1.RagContextRecallInput.Builder, - com.google.cloud.aiplatform.v1beta1.RagContextRecallInputOrBuilder> - getRagContextRecallInputFieldBuilder() { - if (ragContextRecallInputBuilder_ == null) { - if (!(metricInputsCase_ == 11)) { - metricInputs_ = - com.google.cloud.aiplatform.v1beta1.RagContextRecallInput.getDefaultInstance(); - } - ragContextRecallInputBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.aiplatform.v1beta1.RagContextRecallInput, - com.google.cloud.aiplatform.v1beta1.RagContextRecallInput.Builder, - com.google.cloud.aiplatform.v1beta1.RagContextRecallInputOrBuilder>( - (com.google.cloud.aiplatform.v1beta1.RagContextRecallInput) metricInputs_, - getParentForChildren(), - isClean()); - metricInputs_ = null; - } - metricInputsCase_ = 11; - onChanged(); - return ragContextRecallInputBuilder_; - } - private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.aiplatform.v1beta1.ToolCallValidInput, com.google.cloud.aiplatform.v1beta1.ToolCallValidInput.Builder, @@ -8041,7 +7421,7 @@ public Builder setLocation(java.lang.String value) { throw new NullPointerException(); } location_ = value; - bitField0_ |= 0x00800000; + bitField0_ |= 0x00200000; onChanged(); return this; } @@ -8061,7 +7441,7 @@ public Builder setLocation(java.lang.String value) { */ public Builder clearLocation() { location_ = getDefaultInstance().getLocation(); - bitField0_ = (bitField0_ & ~0x00800000); + bitField0_ = (bitField0_ & ~0x00200000); onChanged(); return this; } @@ -8086,7 +7466,7 @@ public Builder setLocationBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); location_ = value; - bitField0_ |= 0x00800000; + bitField0_ |= 0x00200000; onChanged(); return this; } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/EvaluateInstancesRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/EvaluateInstancesRequestOrBuilder.java index 79fbe772c90b..0fe4ec263a35 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/EvaluateInstancesRequestOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/EvaluateInstancesRequestOrBuilder.java @@ -313,42 +313,6 @@ public interface EvaluateInstancesRequestOrBuilder */ com.google.cloud.aiplatform.v1beta1.FulfillmentInputOrBuilder getFulfillmentInputOrBuilder(); - /** - * - * - *
-   * Input for response recall metric.
-   * 
- * - * .google.cloud.aiplatform.v1beta1.ResponseRecallInput response_recall_input = 13; - * - * @return Whether the responseRecallInput field is set. - */ - boolean hasResponseRecallInput(); - /** - * - * - *
-   * Input for response recall metric.
-   * 
- * - * .google.cloud.aiplatform.v1beta1.ResponseRecallInput response_recall_input = 13; - * - * @return The responseRecallInput. - */ - com.google.cloud.aiplatform.v1beta1.ResponseRecallInput getResponseRecallInput(); - /** - * - * - *
-   * Input for response recall metric.
-   * 
- * - * .google.cloud.aiplatform.v1beta1.ResponseRecallInput response_recall_input = 13; - */ - com.google.cloud.aiplatform.v1beta1.ResponseRecallInputOrBuilder - getResponseRecallInputOrBuilder(); - /** * * @@ -740,45 +704,6 @@ public interface EvaluateInstancesRequestOrBuilder com.google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessInputOrBuilder getQuestionAnsweringCorrectnessInputOrBuilder(); - /** - * - * - *
-   * Input for rag context recall metric.
-   * 
- * - * .google.cloud.aiplatform.v1beta1.RagContextRecallInput rag_context_recall_input = 11; - * - * - * @return Whether the ragContextRecallInput field is set. - */ - boolean hasRagContextRecallInput(); - /** - * - * - *
-   * Input for rag context recall metric.
-   * 
- * - * .google.cloud.aiplatform.v1beta1.RagContextRecallInput rag_context_recall_input = 11; - * - * - * @return The ragContextRecallInput. - */ - com.google.cloud.aiplatform.v1beta1.RagContextRecallInput getRagContextRecallInput(); - /** - * - * - *
-   * Input for rag context recall metric.
-   * 
- * - * .google.cloud.aiplatform.v1beta1.RagContextRecallInput rag_context_recall_input = 11; - * - */ - com.google.cloud.aiplatform.v1beta1.RagContextRecallInputOrBuilder - getRagContextRecallInputOrBuilder(); - /** * * diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/EvaluateInstancesResponse.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/EvaluateInstancesResponse.java index 79925426108c..c16679f40e55 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/EvaluateInstancesResponse.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/EvaluateInstancesResponse.java @@ -78,7 +78,6 @@ public enum EvaluationResultsCase SAFETY_RESULT(7), GROUNDEDNESS_RESULT(8), FULFILLMENT_RESULT(11), - RESPONSE_RECALL_RESULT(12), SUMMARIZATION_QUALITY_RESULT(6), PAIRWISE_SUMMARIZATION_QUALITY_RESULT(22), SUMMARIZATION_HELPFULNESS_RESULT(13), @@ -88,7 +87,6 @@ public enum EvaluationResultsCase QUESTION_ANSWERING_RELEVANCE_RESULT(15), QUESTION_ANSWERING_HELPFULNESS_RESULT(16), QUESTION_ANSWERING_CORRECTNESS_RESULT(17), - RAG_CONTEXT_RECALL_RESULT(10), TOOL_CALL_VALID_RESULTS(18), TOOL_NAME_MATCH_RESULTS(19), TOOL_PARAMETER_KEY_MATCH_RESULTS(20), @@ -127,8 +125,6 @@ public static EvaluationResultsCase forNumber(int value) { return GROUNDEDNESS_RESULT; case 11: return FULFILLMENT_RESULT; - case 12: - return RESPONSE_RECALL_RESULT; case 6: return SUMMARIZATION_QUALITY_RESULT; case 22: @@ -147,8 +143,6 @@ public static EvaluationResultsCase forNumber(int value) { return QUESTION_ANSWERING_HELPFULNESS_RESULT; case 17: return QUESTION_ANSWERING_CORRECTNESS_RESULT; - case 10: - return RAG_CONTEXT_RECALL_RESULT; case 18: return TOOL_CALL_VALID_RESULTS; case 19: @@ -594,58 +588,6 @@ public com.google.cloud.aiplatform.v1beta1.FulfillmentResult getFulfillmentResul return com.google.cloud.aiplatform.v1beta1.FulfillmentResult.getDefaultInstance(); } - public static final int RESPONSE_RECALL_RESULT_FIELD_NUMBER = 12; - /** - * - * - *
-   * Result for response recall metric.
-   * 
- * - * .google.cloud.aiplatform.v1beta1.ResponseRecallResult response_recall_result = 12; - * - * @return Whether the responseRecallResult field is set. - */ - @java.lang.Override - public boolean hasResponseRecallResult() { - return evaluationResultsCase_ == 12; - } - /** - * - * - *
-   * Result for response recall metric.
-   * 
- * - * .google.cloud.aiplatform.v1beta1.ResponseRecallResult response_recall_result = 12; - * - * @return The responseRecallResult. - */ - @java.lang.Override - public com.google.cloud.aiplatform.v1beta1.ResponseRecallResult getResponseRecallResult() { - if (evaluationResultsCase_ == 12) { - return (com.google.cloud.aiplatform.v1beta1.ResponseRecallResult) evaluationResults_; - } - return com.google.cloud.aiplatform.v1beta1.ResponseRecallResult.getDefaultInstance(); - } - /** - * - * - *
-   * Result for response recall metric.
-   * 
- * - * .google.cloud.aiplatform.v1beta1.ResponseRecallResult response_recall_result = 12; - */ - @java.lang.Override - public com.google.cloud.aiplatform.v1beta1.ResponseRecallResultOrBuilder - getResponseRecallResultOrBuilder() { - if (evaluationResultsCase_ == 12) { - return (com.google.cloud.aiplatform.v1beta1.ResponseRecallResult) evaluationResults_; - } - return com.google.cloud.aiplatform.v1beta1.ResponseRecallResult.getDefaultInstance(); - } - public static final int SUMMARIZATION_QUALITY_RESULT_FIELD_NUMBER = 6; /** * @@ -1207,64 +1149,6 @@ public boolean hasQuestionAnsweringCorrectnessResult() { .getDefaultInstance(); } - public static final int RAG_CONTEXT_RECALL_RESULT_FIELD_NUMBER = 10; - /** - * - * - *
-   * RAG only metrics.
-   * Result for context recall metric.
-   * 
- * - * .google.cloud.aiplatform.v1beta1.RagContextRecallResult rag_context_recall_result = 10; - * - * - * @return Whether the ragContextRecallResult field is set. - */ - @java.lang.Override - public boolean hasRagContextRecallResult() { - return evaluationResultsCase_ == 10; - } - /** - * - * - *
-   * RAG only metrics.
-   * Result for context recall metric.
-   * 
- * - * .google.cloud.aiplatform.v1beta1.RagContextRecallResult rag_context_recall_result = 10; - * - * - * @return The ragContextRecallResult. - */ - @java.lang.Override - public com.google.cloud.aiplatform.v1beta1.RagContextRecallResult getRagContextRecallResult() { - if (evaluationResultsCase_ == 10) { - return (com.google.cloud.aiplatform.v1beta1.RagContextRecallResult) evaluationResults_; - } - return com.google.cloud.aiplatform.v1beta1.RagContextRecallResult.getDefaultInstance(); - } - /** - * - * - *
-   * RAG only metrics.
-   * Result for context recall metric.
-   * 
- * - * .google.cloud.aiplatform.v1beta1.RagContextRecallResult rag_context_recall_result = 10; - * - */ - @java.lang.Override - public com.google.cloud.aiplatform.v1beta1.RagContextRecallResultOrBuilder - getRagContextRecallResultOrBuilder() { - if (evaluationResultsCase_ == 10) { - return (com.google.cloud.aiplatform.v1beta1.RagContextRecallResult) evaluationResults_; - } - return com.google.cloud.aiplatform.v1beta1.RagContextRecallResult.getDefaultInstance(); - } - public static final int TOOL_CALL_VALID_RESULTS_FIELD_NUMBER = 18; /** * @@ -1544,18 +1428,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io 9, (com.google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityResult) evaluationResults_); } - if (evaluationResultsCase_ == 10) { - output.writeMessage( - 10, (com.google.cloud.aiplatform.v1beta1.RagContextRecallResult) evaluationResults_); - } if (evaluationResultsCase_ == 11) { output.writeMessage( 11, (com.google.cloud.aiplatform.v1beta1.FulfillmentResult) evaluationResults_); } - if (evaluationResultsCase_ == 12) { - output.writeMessage( - 12, (com.google.cloud.aiplatform.v1beta1.ResponseRecallResult) evaluationResults_); - } if (evaluationResultsCase_ == 13) { output.writeMessage( 13, @@ -1670,21 +1546,11 @@ public int getSerializedSize() { (com.google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityResult) evaluationResults_); } - if (evaluationResultsCase_ == 10) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 10, (com.google.cloud.aiplatform.v1beta1.RagContextRecallResult) evaluationResults_); - } if (evaluationResultsCase_ == 11) { size += com.google.protobuf.CodedOutputStream.computeMessageSize( 11, (com.google.cloud.aiplatform.v1beta1.FulfillmentResult) evaluationResults_); } - if (evaluationResultsCase_ == 12) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 12, (com.google.cloud.aiplatform.v1beta1.ResponseRecallResult) evaluationResults_); - } if (evaluationResultsCase_ == 13) { size += com.google.protobuf.CodedOutputStream.computeMessageSize( @@ -1799,9 +1665,6 @@ public boolean equals(final java.lang.Object obj) { case 11: if (!getFulfillmentResult().equals(other.getFulfillmentResult())) return false; break; - case 12: - if (!getResponseRecallResult().equals(other.getResponseRecallResult())) return false; - break; case 6: if (!getSummarizationQualityResult().equals(other.getSummarizationQualityResult())) return false; @@ -1838,9 +1701,6 @@ public boolean equals(final java.lang.Object obj) { if (!getQuestionAnsweringCorrectnessResult() .equals(other.getQuestionAnsweringCorrectnessResult())) return false; break; - case 10: - if (!getRagContextRecallResult().equals(other.getRagContextRecallResult())) return false; - break; case 18: if (!getToolCallValidResults().equals(other.getToolCallValidResults())) return false; break; @@ -1902,10 +1762,6 @@ public int hashCode() { hash = (37 * hash) + FULFILLMENT_RESULT_FIELD_NUMBER; hash = (53 * hash) + getFulfillmentResult().hashCode(); break; - case 12: - hash = (37 * hash) + RESPONSE_RECALL_RESULT_FIELD_NUMBER; - hash = (53 * hash) + getResponseRecallResult().hashCode(); - break; case 6: hash = (37 * hash) + SUMMARIZATION_QUALITY_RESULT_FIELD_NUMBER; hash = (53 * hash) + getSummarizationQualityResult().hashCode(); @@ -1942,10 +1798,6 @@ public int hashCode() { hash = (37 * hash) + QUESTION_ANSWERING_CORRECTNESS_RESULT_FIELD_NUMBER; hash = (53 * hash) + getQuestionAnsweringCorrectnessResult().hashCode(); break; - case 10: - hash = (37 * hash) + RAG_CONTEXT_RECALL_RESULT_FIELD_NUMBER; - hash = (53 * hash) + getRagContextRecallResult().hashCode(); - break; case 18: hash = (37 * hash) + TOOL_CALL_VALID_RESULTS_FIELD_NUMBER; hash = (53 * hash) + getToolCallValidResults().hashCode(); @@ -2129,9 +1981,6 @@ public Builder clear() { if (fulfillmentResultBuilder_ != null) { fulfillmentResultBuilder_.clear(); } - if (responseRecallResultBuilder_ != null) { - responseRecallResultBuilder_.clear(); - } if (summarizationQualityResultBuilder_ != null) { summarizationQualityResultBuilder_.clear(); } @@ -2159,9 +2008,6 @@ public Builder clear() { if (questionAnsweringCorrectnessResultBuilder_ != null) { questionAnsweringCorrectnessResultBuilder_.clear(); } - if (ragContextRecallResultBuilder_ != null) { - ragContextRecallResultBuilder_.clear(); - } if (toolCallValidResultsBuilder_ != null) { toolCallValidResultsBuilder_.clear(); } @@ -2245,9 +2091,6 @@ private void buildPartialOneofs( if (evaluationResultsCase_ == 11 && fulfillmentResultBuilder_ != null) { result.evaluationResults_ = fulfillmentResultBuilder_.build(); } - if (evaluationResultsCase_ == 12 && responseRecallResultBuilder_ != null) { - result.evaluationResults_ = responseRecallResultBuilder_.build(); - } if (evaluationResultsCase_ == 6 && summarizationQualityResultBuilder_ != null) { result.evaluationResults_ = summarizationQualityResultBuilder_.build(); } @@ -2275,9 +2118,6 @@ private void buildPartialOneofs( if (evaluationResultsCase_ == 17 && questionAnsweringCorrectnessResultBuilder_ != null) { result.evaluationResults_ = questionAnsweringCorrectnessResultBuilder_.build(); } - if (evaluationResultsCase_ == 10 && ragContextRecallResultBuilder_ != null) { - result.evaluationResults_ = ragContextRecallResultBuilder_.build(); - } if (evaluationResultsCase_ == 18 && toolCallValidResultsBuilder_ != null) { result.evaluationResults_ = toolCallValidResultsBuilder_.build(); } @@ -2380,11 +2220,6 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.EvaluateInstancesRe mergeFulfillmentResult(other.getFulfillmentResult()); break; } - case RESPONSE_RECALL_RESULT: - { - mergeResponseRecallResult(other.getResponseRecallResult()); - break; - } case SUMMARIZATION_QUALITY_RESULT: { mergeSummarizationQualityResult(other.getSummarizationQualityResult()); @@ -2431,11 +2266,6 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.EvaluateInstancesRe mergeQuestionAnsweringCorrectnessResult(other.getQuestionAnsweringCorrectnessResult()); break; } - case RAG_CONTEXT_RECALL_RESULT: - { - mergeRagContextRecallResult(other.getRagContextRecallResult()); - break; - } case TOOL_CALL_VALID_RESULTS: { mergeToolCallValidResults(other.getToolCallValidResults()); @@ -2546,13 +2376,6 @@ public Builder mergeFrom( evaluationResultsCase_ = 9; break; } // case 74 - case 82: - { - input.readMessage( - getRagContextRecallResultFieldBuilder().getBuilder(), extensionRegistry); - evaluationResultsCase_ = 10; - break; - } // case 82 case 90: { input.readMessage( @@ -2560,13 +2383,6 @@ public Builder mergeFrom( evaluationResultsCase_ = 11; break; } // case 90 - case 98: - { - input.readMessage( - getResponseRecallResultFieldBuilder().getBuilder(), extensionRegistry); - evaluationResultsCase_ = 12; - break; - } // case 98 case 106: { input.readMessage( @@ -4410,230 +4226,6 @@ public Builder clearFulfillmentResult() { return fulfillmentResultBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.aiplatform.v1beta1.ResponseRecallResult, - com.google.cloud.aiplatform.v1beta1.ResponseRecallResult.Builder, - com.google.cloud.aiplatform.v1beta1.ResponseRecallResultOrBuilder> - responseRecallResultBuilder_; - /** - * - * - *
-     * Result for response recall metric.
-     * 
- * - * .google.cloud.aiplatform.v1beta1.ResponseRecallResult response_recall_result = 12; - * - * - * @return Whether the responseRecallResult field is set. - */ - @java.lang.Override - public boolean hasResponseRecallResult() { - return evaluationResultsCase_ == 12; - } - /** - * - * - *
-     * Result for response recall metric.
-     * 
- * - * .google.cloud.aiplatform.v1beta1.ResponseRecallResult response_recall_result = 12; - * - * - * @return The responseRecallResult. - */ - @java.lang.Override - public com.google.cloud.aiplatform.v1beta1.ResponseRecallResult getResponseRecallResult() { - if (responseRecallResultBuilder_ == null) { - if (evaluationResultsCase_ == 12) { - return (com.google.cloud.aiplatform.v1beta1.ResponseRecallResult) evaluationResults_; - } - return com.google.cloud.aiplatform.v1beta1.ResponseRecallResult.getDefaultInstance(); - } else { - if (evaluationResultsCase_ == 12) { - return responseRecallResultBuilder_.getMessage(); - } - return com.google.cloud.aiplatform.v1beta1.ResponseRecallResult.getDefaultInstance(); - } - } - /** - * - * - *
-     * Result for response recall metric.
-     * 
- * - * .google.cloud.aiplatform.v1beta1.ResponseRecallResult response_recall_result = 12; - * - */ - public Builder setResponseRecallResult( - com.google.cloud.aiplatform.v1beta1.ResponseRecallResult value) { - if (responseRecallResultBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - evaluationResults_ = value; - onChanged(); - } else { - responseRecallResultBuilder_.setMessage(value); - } - evaluationResultsCase_ = 12; - return this; - } - /** - * - * - *
-     * Result for response recall metric.
-     * 
- * - * .google.cloud.aiplatform.v1beta1.ResponseRecallResult response_recall_result = 12; - * - */ - public Builder setResponseRecallResult( - com.google.cloud.aiplatform.v1beta1.ResponseRecallResult.Builder builderForValue) { - if (responseRecallResultBuilder_ == null) { - evaluationResults_ = builderForValue.build(); - onChanged(); - } else { - responseRecallResultBuilder_.setMessage(builderForValue.build()); - } - evaluationResultsCase_ = 12; - return this; - } - /** - * - * - *
-     * Result for response recall metric.
-     * 
- * - * .google.cloud.aiplatform.v1beta1.ResponseRecallResult response_recall_result = 12; - * - */ - public Builder mergeResponseRecallResult( - com.google.cloud.aiplatform.v1beta1.ResponseRecallResult value) { - if (responseRecallResultBuilder_ == null) { - if (evaluationResultsCase_ == 12 - && evaluationResults_ - != com.google.cloud.aiplatform.v1beta1.ResponseRecallResult.getDefaultInstance()) { - evaluationResults_ = - com.google.cloud.aiplatform.v1beta1.ResponseRecallResult.newBuilder( - (com.google.cloud.aiplatform.v1beta1.ResponseRecallResult) evaluationResults_) - .mergeFrom(value) - .buildPartial(); - } else { - evaluationResults_ = value; - } - onChanged(); - } else { - if (evaluationResultsCase_ == 12) { - responseRecallResultBuilder_.mergeFrom(value); - } else { - responseRecallResultBuilder_.setMessage(value); - } - } - evaluationResultsCase_ = 12; - return this; - } - /** - * - * - *
-     * Result for response recall metric.
-     * 
- * - * .google.cloud.aiplatform.v1beta1.ResponseRecallResult response_recall_result = 12; - * - */ - public Builder clearResponseRecallResult() { - if (responseRecallResultBuilder_ == null) { - if (evaluationResultsCase_ == 12) { - evaluationResultsCase_ = 0; - evaluationResults_ = null; - onChanged(); - } - } else { - if (evaluationResultsCase_ == 12) { - evaluationResultsCase_ = 0; - evaluationResults_ = null; - } - responseRecallResultBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Result for response recall metric.
-     * 
- * - * .google.cloud.aiplatform.v1beta1.ResponseRecallResult response_recall_result = 12; - * - */ - public com.google.cloud.aiplatform.v1beta1.ResponseRecallResult.Builder - getResponseRecallResultBuilder() { - return getResponseRecallResultFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Result for response recall metric.
-     * 
- * - * .google.cloud.aiplatform.v1beta1.ResponseRecallResult response_recall_result = 12; - * - */ - @java.lang.Override - public com.google.cloud.aiplatform.v1beta1.ResponseRecallResultOrBuilder - getResponseRecallResultOrBuilder() { - if ((evaluationResultsCase_ == 12) && (responseRecallResultBuilder_ != null)) { - return responseRecallResultBuilder_.getMessageOrBuilder(); - } else { - if (evaluationResultsCase_ == 12) { - return (com.google.cloud.aiplatform.v1beta1.ResponseRecallResult) evaluationResults_; - } - return com.google.cloud.aiplatform.v1beta1.ResponseRecallResult.getDefaultInstance(); - } - } - /** - * - * - *
-     * Result for response recall metric.
-     * 
- * - * .google.cloud.aiplatform.v1beta1.ResponseRecallResult response_recall_result = 12; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.aiplatform.v1beta1.ResponseRecallResult, - com.google.cloud.aiplatform.v1beta1.ResponseRecallResult.Builder, - com.google.cloud.aiplatform.v1beta1.ResponseRecallResultOrBuilder> - getResponseRecallResultFieldBuilder() { - if (responseRecallResultBuilder_ == null) { - if (!(evaluationResultsCase_ == 12)) { - evaluationResults_ = - com.google.cloud.aiplatform.v1beta1.ResponseRecallResult.getDefaultInstance(); - } - responseRecallResultBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.aiplatform.v1beta1.ResponseRecallResult, - com.google.cloud.aiplatform.v1beta1.ResponseRecallResult.Builder, - com.google.cloud.aiplatform.v1beta1.ResponseRecallResultOrBuilder>( - (com.google.cloud.aiplatform.v1beta1.ResponseRecallResult) evaluationResults_, - getParentForChildren(), - isClean()); - evaluationResults_ = null; - } - evaluationResultsCase_ = 12; - onChanged(); - return responseRecallResultBuilder_; - } - private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.aiplatform.v1beta1.SummarizationQualityResult, com.google.cloud.aiplatform.v1beta1.SummarizationQualityResult.Builder, @@ -6842,241 +6434,6 @@ public Builder clearQuestionAnsweringCorrectnessResult() { return questionAnsweringCorrectnessResultBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.aiplatform.v1beta1.RagContextRecallResult, - com.google.cloud.aiplatform.v1beta1.RagContextRecallResult.Builder, - com.google.cloud.aiplatform.v1beta1.RagContextRecallResultOrBuilder> - ragContextRecallResultBuilder_; - /** - * - * - *
-     * RAG only metrics.
-     * Result for context recall metric.
-     * 
- * - * .google.cloud.aiplatform.v1beta1.RagContextRecallResult rag_context_recall_result = 10; - * - * - * @return Whether the ragContextRecallResult field is set. - */ - @java.lang.Override - public boolean hasRagContextRecallResult() { - return evaluationResultsCase_ == 10; - } - /** - * - * - *
-     * RAG only metrics.
-     * Result for context recall metric.
-     * 
- * - * .google.cloud.aiplatform.v1beta1.RagContextRecallResult rag_context_recall_result = 10; - * - * - * @return The ragContextRecallResult. - */ - @java.lang.Override - public com.google.cloud.aiplatform.v1beta1.RagContextRecallResult getRagContextRecallResult() { - if (ragContextRecallResultBuilder_ == null) { - if (evaluationResultsCase_ == 10) { - return (com.google.cloud.aiplatform.v1beta1.RagContextRecallResult) evaluationResults_; - } - return com.google.cloud.aiplatform.v1beta1.RagContextRecallResult.getDefaultInstance(); - } else { - if (evaluationResultsCase_ == 10) { - return ragContextRecallResultBuilder_.getMessage(); - } - return com.google.cloud.aiplatform.v1beta1.RagContextRecallResult.getDefaultInstance(); - } - } - /** - * - * - *
-     * RAG only metrics.
-     * Result for context recall metric.
-     * 
- * - * .google.cloud.aiplatform.v1beta1.RagContextRecallResult rag_context_recall_result = 10; - * - */ - public Builder setRagContextRecallResult( - com.google.cloud.aiplatform.v1beta1.RagContextRecallResult value) { - if (ragContextRecallResultBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - evaluationResults_ = value; - onChanged(); - } else { - ragContextRecallResultBuilder_.setMessage(value); - } - evaluationResultsCase_ = 10; - return this; - } - /** - * - * - *
-     * RAG only metrics.
-     * Result for context recall metric.
-     * 
- * - * .google.cloud.aiplatform.v1beta1.RagContextRecallResult rag_context_recall_result = 10; - * - */ - public Builder setRagContextRecallResult( - com.google.cloud.aiplatform.v1beta1.RagContextRecallResult.Builder builderForValue) { - if (ragContextRecallResultBuilder_ == null) { - evaluationResults_ = builderForValue.build(); - onChanged(); - } else { - ragContextRecallResultBuilder_.setMessage(builderForValue.build()); - } - evaluationResultsCase_ = 10; - return this; - } - /** - * - * - *
-     * RAG only metrics.
-     * Result for context recall metric.
-     * 
- * - * .google.cloud.aiplatform.v1beta1.RagContextRecallResult rag_context_recall_result = 10; - * - */ - public Builder mergeRagContextRecallResult( - com.google.cloud.aiplatform.v1beta1.RagContextRecallResult value) { - if (ragContextRecallResultBuilder_ == null) { - if (evaluationResultsCase_ == 10 - && evaluationResults_ - != com.google.cloud.aiplatform.v1beta1.RagContextRecallResult - .getDefaultInstance()) { - evaluationResults_ = - com.google.cloud.aiplatform.v1beta1.RagContextRecallResult.newBuilder( - (com.google.cloud.aiplatform.v1beta1.RagContextRecallResult) - evaluationResults_) - .mergeFrom(value) - .buildPartial(); - } else { - evaluationResults_ = value; - } - onChanged(); - } else { - if (evaluationResultsCase_ == 10) { - ragContextRecallResultBuilder_.mergeFrom(value); - } else { - ragContextRecallResultBuilder_.setMessage(value); - } - } - evaluationResultsCase_ = 10; - return this; - } - /** - * - * - *
-     * RAG only metrics.
-     * Result for context recall metric.
-     * 
- * - * .google.cloud.aiplatform.v1beta1.RagContextRecallResult rag_context_recall_result = 10; - * - */ - public Builder clearRagContextRecallResult() { - if (ragContextRecallResultBuilder_ == null) { - if (evaluationResultsCase_ == 10) { - evaluationResultsCase_ = 0; - evaluationResults_ = null; - onChanged(); - } - } else { - if (evaluationResultsCase_ == 10) { - evaluationResultsCase_ = 0; - evaluationResults_ = null; - } - ragContextRecallResultBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * RAG only metrics.
-     * Result for context recall metric.
-     * 
- * - * .google.cloud.aiplatform.v1beta1.RagContextRecallResult rag_context_recall_result = 10; - * - */ - public com.google.cloud.aiplatform.v1beta1.RagContextRecallResult.Builder - getRagContextRecallResultBuilder() { - return getRagContextRecallResultFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * RAG only metrics.
-     * Result for context recall metric.
-     * 
- * - * .google.cloud.aiplatform.v1beta1.RagContextRecallResult rag_context_recall_result = 10; - * - */ - @java.lang.Override - public com.google.cloud.aiplatform.v1beta1.RagContextRecallResultOrBuilder - getRagContextRecallResultOrBuilder() { - if ((evaluationResultsCase_ == 10) && (ragContextRecallResultBuilder_ != null)) { - return ragContextRecallResultBuilder_.getMessageOrBuilder(); - } else { - if (evaluationResultsCase_ == 10) { - return (com.google.cloud.aiplatform.v1beta1.RagContextRecallResult) evaluationResults_; - } - return com.google.cloud.aiplatform.v1beta1.RagContextRecallResult.getDefaultInstance(); - } - } - /** - * - * - *
-     * RAG only metrics.
-     * Result for context recall metric.
-     * 
- * - * .google.cloud.aiplatform.v1beta1.RagContextRecallResult rag_context_recall_result = 10; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.aiplatform.v1beta1.RagContextRecallResult, - com.google.cloud.aiplatform.v1beta1.RagContextRecallResult.Builder, - com.google.cloud.aiplatform.v1beta1.RagContextRecallResultOrBuilder> - getRagContextRecallResultFieldBuilder() { - if (ragContextRecallResultBuilder_ == null) { - if (!(evaluationResultsCase_ == 10)) { - evaluationResults_ = - com.google.cloud.aiplatform.v1beta1.RagContextRecallResult.getDefaultInstance(); - } - ragContextRecallResultBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.aiplatform.v1beta1.RagContextRecallResult, - com.google.cloud.aiplatform.v1beta1.RagContextRecallResult.Builder, - com.google.cloud.aiplatform.v1beta1.RagContextRecallResultOrBuilder>( - (com.google.cloud.aiplatform.v1beta1.RagContextRecallResult) evaluationResults_, - getParentForChildren(), - isClean()); - evaluationResults_ = null; - } - evaluationResultsCase_ = 10; - onChanged(); - return ragContextRecallResultBuilder_; - } - private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.aiplatform.v1beta1.ToolCallValidResults, com.google.cloud.aiplatform.v1beta1.ToolCallValidResults.Builder, diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/EvaluateInstancesResponseOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/EvaluateInstancesResponseOrBuilder.java index 1a148bd03990..37edb4c75d8d 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/EvaluateInstancesResponseOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/EvaluateInstancesResponseOrBuilder.java @@ -313,42 +313,6 @@ public interface EvaluateInstancesResponseOrBuilder */ com.google.cloud.aiplatform.v1beta1.FulfillmentResultOrBuilder getFulfillmentResultOrBuilder(); - /** - * - * - *
-   * Result for response recall metric.
-   * 
- * - * .google.cloud.aiplatform.v1beta1.ResponseRecallResult response_recall_result = 12; - * - * @return Whether the responseRecallResult field is set. - */ - boolean hasResponseRecallResult(); - /** - * - * - *
-   * Result for response recall metric.
-   * 
- * - * .google.cloud.aiplatform.v1beta1.ResponseRecallResult response_recall_result = 12; - * - * @return The responseRecallResult. - */ - com.google.cloud.aiplatform.v1beta1.ResponseRecallResult getResponseRecallResult(); - /** - * - * - *
-   * Result for response recall metric.
-   * 
- * - * .google.cloud.aiplatform.v1beta1.ResponseRecallResult response_recall_result = 12; - */ - com.google.cloud.aiplatform.v1beta1.ResponseRecallResultOrBuilder - getResponseRecallResultOrBuilder(); - /** * * @@ -741,48 +705,6 @@ public interface EvaluateInstancesResponseOrBuilder com.google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessResultOrBuilder getQuestionAnsweringCorrectnessResultOrBuilder(); - /** - * - * - *
-   * RAG only metrics.
-   * Result for context recall metric.
-   * 
- * - * .google.cloud.aiplatform.v1beta1.RagContextRecallResult rag_context_recall_result = 10; - * - * - * @return Whether the ragContextRecallResult field is set. - */ - boolean hasRagContextRecallResult(); - /** - * - * - *
-   * RAG only metrics.
-   * Result for context recall metric.
-   * 
- * - * .google.cloud.aiplatform.v1beta1.RagContextRecallResult rag_context_recall_result = 10; - * - * - * @return The ragContextRecallResult. - */ - com.google.cloud.aiplatform.v1beta1.RagContextRecallResult getRagContextRecallResult(); - /** - * - * - *
-   * RAG only metrics.
-   * Result for context recall metric.
-   * 
- * - * .google.cloud.aiplatform.v1beta1.RagContextRecallResult rag_context_recall_result = 10; - * - */ - com.google.cloud.aiplatform.v1beta1.RagContextRecallResultOrBuilder - getRagContextRecallResultOrBuilder(); - /** * * diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/EvaluationServiceProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/EvaluationServiceProto.java index b256d59438bb..325016f7f32c 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/EvaluationServiceProto.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/EvaluationServiceProto.java @@ -176,22 +176,6 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_aiplatform_v1beta1_FulfillmentResult_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_aiplatform_v1beta1_FulfillmentResult_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_aiplatform_v1beta1_ResponseRecallInput_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_aiplatform_v1beta1_ResponseRecallInput_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_aiplatform_v1beta1_ResponseRecallInstance_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_aiplatform_v1beta1_ResponseRecallInstance_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_aiplatform_v1beta1_ResponseRecallSpec_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_aiplatform_v1beta1_ResponseRecallSpec_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_aiplatform_v1beta1_ResponseRecallResult_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_aiplatform_v1beta1_ResponseRecallResult_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_aiplatform_v1beta1_SummarizationQualityInput_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -336,22 +320,6 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_aiplatform_v1beta1_QuestionAnsweringCorrectnessResult_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_aiplatform_v1beta1_QuestionAnsweringCorrectnessResult_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_aiplatform_v1beta1_RagContextRecallInput_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_aiplatform_v1beta1_RagContextRecallInput_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_aiplatform_v1beta1_RagContextRecallInstance_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_aiplatform_v1beta1_RagContextRecallInstance_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_aiplatform_v1beta1_RagContextRecallSpec_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_aiplatform_v1beta1_RagContextRecallSpec_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_aiplatform_v1beta1_RagContextRecallResult_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_aiplatform_v1beta1_RagContextRecallResult_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_aiplatform_v1beta1_ToolCallValidInput_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -446,7 +414,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "orm.v1beta1\032\034google/api/annotations.prot" + "o\032\027google/api/client.proto\032\037google/api/f" + "ield_behavior.proto\032\031google/api/resource" - + ".proto\"\316\021\n\030EvaluateInstancesRequest\022M\n\021e" + + ".proto\"\233\020\n\030EvaluateInstancesRequest\022M\n\021e" + "xact_match_input\030\002 \001(\01320.google.cloud.ai" + "platform.v1beta1.ExactMatchInputH\000\022@\n\nbl" + "eu_input\030\003 \001(\0132*.google.cloud.aiplatform" @@ -461,440 +429,407 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ss_input\030\t \001(\01322.google.cloud.aiplatform" + ".v1beta1.GroundednessInputH\000\022N\n\021fulfillm" + "ent_input\030\014 \001(\01321.google.cloud.aiplatfor" - + "m.v1beta1.FulfillmentInputH\000\022U\n\025response" - + "_recall_input\030\r \001(\01324.google.cloud.aipla" - + "tform.v1beta1.ResponseRecallInputH\000\022a\n\033s" - + "ummarization_quality_input\030\007 \001(\0132:.googl" - + "e.cloud.aiplatform.v1beta1.Summarization" - + "QualityInputH\000\022r\n$pairwise_summarization" - + "_quality_input\030\027 \001(\0132B.google.cloud.aipl" - + "atform.v1beta1.PairwiseSummarizationQual" - + "ityInputH\000\022i\n\037summarization_helpfulness_" - + "input\030\016 \001(\0132>.google.cloud.aiplatform.v1" - + "beta1.SummarizationHelpfulnessInputH\000\022e\n" - + "\035summarization_verbosity_input\030\017 \001(\0132<.g" - + "oogle.cloud.aiplatform.v1beta1.Summariza" - + "tionVerbosityInputH\000\022j\n question_answeri" - + "ng_quality_input\030\n \001(\0132>.google.cloud.ai" - + "platform.v1beta1.QuestionAnsweringQualit" - + "yInputH\000\022{\n)pairwise_question_answering_" - + "quality_input\030\030 \001(\0132F.google.cloud.aipla" - + "tform.v1beta1.PairwiseQuestionAnsweringQ" - + "ualityInputH\000\022n\n\"question_answering_rele" - + "vance_input\030\020 \001(\0132@.google.cloud.aiplatf" - + "orm.v1beta1.QuestionAnsweringRelevanceIn" - + "putH\000\022r\n$question_answering_helpfulness_" - + "input\030\021 \001(\0132B.google.cloud.aiplatform.v1" - + "beta1.QuestionAnsweringHelpfulnessInputH" - + "\000\022r\n$question_answering_correctness_inpu" - + "t\030\022 \001(\0132B.google.cloud.aiplatform.v1beta" - + "1.QuestionAnsweringCorrectnessInputH\000\022Z\n" - + "\030rag_context_recall_input\030\013 \001(\01326.google" - + ".cloud.aiplatform.v1beta1.RagContextReca" - + "llInputH\000\022T\n\025tool_call_valid_input\030\023 \001(\013" - + "23.google.cloud.aiplatform.v1beta1.ToolC" - + "allValidInputH\000\022T\n\025tool_name_match_input" - + "\030\024 \001(\01323.google.cloud.aiplatform.v1beta1" - + ".ToolNameMatchInputH\000\022e\n\036tool_parameter_" - + "key_match_input\030\025 \001(\0132;.google.cloud.aip" - + "latform.v1beta1.ToolParameterKeyMatchInp" - + "utH\000\022c\n\035tool_parameter_kv_match_input\030\026 " - + "\001(\0132:.google.cloud.aiplatform.v1beta1.To" - + "olParameterKVMatchInputH\000\022;\n\010location\030\001 " - + "\001(\tB)\340A\002\372A#\n!locations.googleapis.com/Lo" - + "cationB\017\n\rmetric_inputs\"\323\021\n\031EvaluateInst" - + "ancesResponse\022Q\n\023exact_match_results\030\001 \001" - + "(\01322.google.cloud.aiplatform.v1beta1.Exa" - + "ctMatchResultsH\000\022D\n\014bleu_results\030\002 \001(\0132," - + ".google.cloud.aiplatform.v1beta1.BleuRes" - + "ultsH\000\022F\n\rrouge_results\030\003 \001(\0132-.google.c" - + "loud.aiplatform.v1beta1.RougeResultsH\000\022H" - + "\n\016fluency_result\030\004 \001(\0132..google.cloud.ai" - + "platform.v1beta1.FluencyResultH\000\022L\n\020cohe" - + "rence_result\030\005 \001(\01320.google.cloud.aiplat" - + "form.v1beta1.CoherenceResultH\000\022F\n\rsafety" - + "_result\030\007 \001(\0132-.google.cloud.aiplatform." - + "v1beta1.SafetyResultH\000\022R\n\023groundedness_r" - + "esult\030\010 \001(\01323.google.cloud.aiplatform.v1" - + "beta1.GroundednessResultH\000\022P\n\022fulfillmen" - + "t_result\030\013 \001(\01322.google.cloud.aiplatform" - + ".v1beta1.FulfillmentResultH\000\022W\n\026response" - + "_recall_result\030\014 \001(\01325.google.cloud.aipl" - + "atform.v1beta1.ResponseRecallResultH\000\022c\n" - + "\034summarization_quality_result\030\006 \001(\0132;.go" - + "ogle.cloud.aiplatform.v1beta1.Summarizat" - + "ionQualityResultH\000\022t\n%pairwise_summariza" - + "tion_quality_result\030\026 \001(\0132C.google.cloud" - + ".aiplatform.v1beta1.PairwiseSummarizatio" - + "nQualityResultH\000\022k\n summarization_helpfu" - + "lness_result\030\r \001(\0132?.google.cloud.aiplat" - + "form.v1beta1.SummarizationHelpfulnessRes" - + "ultH\000\022g\n\036summarization_verbosity_result\030" - + "\016 \001(\0132=.google.cloud.aiplatform.v1beta1." - + "SummarizationVerbosityResultH\000\022l\n!questi" - + "on_answering_quality_result\030\t \001(\0132?.goog" - + "le.cloud.aiplatform.v1beta1.QuestionAnsw" - + "eringQualityResultH\000\022}\n*pairwise_questio" - + "n_answering_quality_result\030\027 \001(\0132G.googl" - + "e.cloud.aiplatform.v1beta1.PairwiseQuest" - + "ionAnsweringQualityResultH\000\022p\n#question_" - + "answering_relevance_result\030\017 \001(\0132A.googl" - + "e.cloud.aiplatform.v1beta1.QuestionAnswe" - + "ringRelevanceResultH\000\022t\n%question_answer" - + "ing_helpfulness_result\030\020 \001(\0132C.google.cl" - + "oud.aiplatform.v1beta1.QuestionAnswering" - + "HelpfulnessResultH\000\022t\n%question_answerin" - + "g_correctness_result\030\021 \001(\0132C.google.clou" - + "d.aiplatform.v1beta1.QuestionAnsweringCo" - + "rrectnessResultH\000\022\\\n\031rag_context_recall_" - + "result\030\n \001(\01327.google.cloud.aiplatform.v" - + "1beta1.RagContextRecallResultH\000\022X\n\027tool_" - + "call_valid_results\030\022 \001(\01325.google.cloud." - + "aiplatform.v1beta1.ToolCallValidResultsH" - + "\000\022X\n\027tool_name_match_results\030\023 \001(\01325.goo" - + "gle.cloud.aiplatform.v1beta1.ToolNameMat" - + "chResultsH\000\022i\n tool_parameter_key_match_" - + "results\030\024 \001(\0132=.google.cloud.aiplatform." - + "v1beta1.ToolParameterKeyMatchResultsH\000\022g" - + "\n\037tool_parameter_kv_match_results\030\025 \001(\0132" - + "<.google.cloud.aiplatform.v1beta1.ToolPa" - + "rameterKVMatchResultsH\000B\024\n\022evaluation_re" - + "sults\"\251\001\n\017ExactMatchInput\022I\n\013metric_spec" - + "\030\001 \001(\0132/.google.cloud.aiplatform.v1beta1" - + ".ExactMatchSpecB\003\340A\002\022K\n\tinstances\030\002 \003(\0132" - + "3.google.cloud.aiplatform.v1beta1.ExactM" - + "atchInstanceB\003\340A\002\"l\n\022ExactMatchInstance\022" - + "\034\n\nprediction\030\001 \001(\tB\003\340A\002H\000\210\001\001\022\033\n\treferen" - + "ce\030\002 \001(\tB\003\340A\002H\001\210\001\001B\r\n\013_predictionB\014\n\n_re" - + "ference\"\020\n\016ExactMatchSpec\"s\n\021ExactMatchR" - + "esults\022^\n\031exact_match_metric_values\030\001 \003(" - + "\01326.google.cloud.aiplatform.v1beta1.Exac" - + "tMatchMetricValueB\003\340A\003\":\n\025ExactMatchMetr" - + "icValue\022\027\n\005score\030\001 \001(\002B\003\340A\003H\000\210\001\001B\010\n\006_sco" - + "re\"\227\001\n\tBleuInput\022C\n\013metric_spec\030\001 \001(\0132)." - + "google.cloud.aiplatform.v1beta1.BleuSpec" - + "B\003\340A\002\022E\n\tinstances\030\002 \003(\0132-.google.cloud." - + "aiplatform.v1beta1.BleuInstanceB\003\340A\002\"f\n\014" - + "BleuInstance\022\034\n\nprediction\030\001 \001(\tB\003\340A\002H\000\210" - + "\001\001\022\033\n\treference\030\002 \001(\tB\003\340A\002H\001\210\001\001B\r\n\013_pred" - + "ictionB\014\n\n_reference\"\n\n\010BleuSpec\"`\n\013Bleu" - + "Results\022Q\n\022bleu_metric_values\030\001 \003(\01320.go" - + "ogle.cloud.aiplatform.v1beta1.BleuMetric" - + "ValueB\003\340A\003\"4\n\017BleuMetricValue\022\027\n\005score\030\001" - + " \001(\002B\003\340A\003H\000\210\001\001B\010\n\006_score\"\232\001\n\nRougeInput\022" - + "D\n\013metric_spec\030\001 \001(\0132*.google.cloud.aipl" - + "atform.v1beta1.RougeSpecB\003\340A\002\022F\n\tinstanc" - + "es\030\002 \003(\0132..google.cloud.aiplatform.v1bet" - + "a1.RougeInstanceB\003\340A\002\"g\n\rRougeInstance\022\034" - + "\n\nprediction\030\001 \001(\tB\003\340A\002H\000\210\001\001\022\033\n\treferenc" - + "e\030\002 \001(\tB\003\340A\002H\001\210\001\001B\r\n\013_predictionB\014\n\n_ref" - + "erence\"\\\n\tRougeSpec\022\027\n\nrouge_type\030\001 \001(\tB" - + "\003\340A\001\022\030\n\013use_stemmer\030\002 \001(\010B\003\340A\001\022\034\n\017split_" - + "summaries\030\003 \001(\010B\003\340A\001\"c\n\014RougeResults\022S\n\023" - + "rouge_metric_values\030\001 \003(\01321.google.cloud" - + ".aiplatform.v1beta1.RougeMetricValueB\003\340A" - + "\003\"5\n\020RougeMetricValue\022\027\n\005score\030\001 \001(\002B\003\340A" - + "\003H\000\210\001\001B\010\n\006_score\"\245\001\n\016CoherenceInput\022H\n\013m" - + "etric_spec\030\001 \001(\0132..google.cloud.aiplatfo" - + "rm.v1beta1.CoherenceSpecB\003\340A\002\022I\n\010instanc" - + "e\030\002 \001(\01322.google.cloud.aiplatform.v1beta" - + "1.CoherenceInstanceB\003\340A\002\"@\n\021CoherenceIns" - + "tance\022\034\n\nprediction\030\001 \001(\tB\003\340A\002H\000\210\001\001B\r\n\013_" - + "prediction\"%\n\rCoherenceSpec\022\024\n\007version\030\001" - + " \001(\005B\003\340A\001\"{\n\017CoherenceResult\022\027\n\005score\030\001 " - + "\001(\002B\003\340A\003H\000\210\001\001\022\030\n\013explanation\030\002 \001(\tB\003\340A\003\022" - + "\034\n\nconfidence\030\003 \001(\002B\003\340A\003H\001\210\001\001B\010\n\006_scoreB" - + "\r\n\013_confidence\"\237\001\n\014FluencyInput\022F\n\013metri" - + "c_spec\030\001 \001(\0132,.google.cloud.aiplatform.v" - + "1beta1.FluencySpecB\003\340A\002\022G\n\010instance\030\002 \001(" - + "\01320.google.cloud.aiplatform.v1beta1.Flue" - + "ncyInstanceB\003\340A\002\">\n\017FluencyInstance\022\034\n\np" - + "rediction\030\001 \001(\tB\003\340A\002H\000\210\001\001B\r\n\013_prediction" - + "\"#\n\013FluencySpec\022\024\n\007version\030\001 \001(\005B\003\340A\001\"y\n" - + "\rFluencyResult\022\027\n\005score\030\001 \001(\002B\003\340A\003H\000\210\001\001\022" - + "\030\n\013explanation\030\002 \001(\tB\003\340A\003\022\034\n\nconfidence\030" - + "\003 \001(\002B\003\340A\003H\001\210\001\001B\010\n\006_scoreB\r\n\013_confidence" - + "\"\234\001\n\013SafetyInput\022E\n\013metric_spec\030\001 \001(\0132+." - + "google.cloud.aiplatform.v1beta1.SafetySp" - + "ecB\003\340A\002\022F\n\010instance\030\002 \001(\0132/.google.cloud" - + ".aiplatform.v1beta1.SafetyInstanceB\003\340A\002\"" - + "=\n\016SafetyInstance\022\034\n\nprediction\030\001 \001(\tB\003\340" - + "A\002H\000\210\001\001B\r\n\013_prediction\"\"\n\nSafetySpec\022\024\n\007" - + "version\030\001 \001(\005B\003\340A\001\"x\n\014SafetyResult\022\027\n\005sc" - + "ore\030\001 \001(\002B\003\340A\003H\000\210\001\001\022\030\n\013explanation\030\002 \001(\t" - + "B\003\340A\003\022\034\n\nconfidence\030\003 \001(\002B\003\340A\003H\001\210\001\001B\010\n\006_" - + "scoreB\r\n\013_confidence\"\256\001\n\021GroundednessInp" - + "ut\022K\n\013metric_spec\030\001 \001(\01321.google.cloud.a" - + "iplatform.v1beta1.GroundednessSpecB\003\340A\002\022" - + "L\n\010instance\030\002 \001(\01325.google.cloud.aiplatf" - + "orm.v1beta1.GroundednessInstanceB\003\340A\002\"j\n" - + "\024GroundednessInstance\022\034\n\nprediction\030\001 \001(" - + "\tB\003\340A\002H\000\210\001\001\022\031\n\007context\030\002 \001(\tB\003\340A\002H\001\210\001\001B\r" - + "\n\013_predictionB\n\n\010_context\"(\n\020Groundednes" - + "sSpec\022\024\n\007version\030\001 \001(\005B\003\340A\001\"~\n\022Groundedn" - + "essResult\022\027\n\005score\030\001 \001(\002B\003\340A\003H\000\210\001\001\022\030\n\013ex" - + "planation\030\002 \001(\tB\003\340A\003\022\034\n\nconfidence\030\003 \001(\002" - + "B\003\340A\003H\001\210\001\001B\010\n\006_scoreB\r\n\013_confidence\"\253\001\n\020" - + "FulfillmentInput\022J\n\013metric_spec\030\001 \001(\01320." - + "google.cloud.aiplatform.v1beta1.Fulfillm" - + "entSpecB\003\340A\002\022K\n\010instance\030\002 \001(\01324.google." - + "cloud.aiplatform.v1beta1.FulfillmentInst" - + "anceB\003\340A\002\"q\n\023FulfillmentInstance\022\034\n\npred" - + "iction\030\001 \001(\tB\003\340A\002H\000\210\001\001\022\035\n\013instruction\030\002 " - + "\001(\tB\003\340A\002H\001\210\001\001B\r\n\013_predictionB\016\n\014_instruc" - + "tion\"\'\n\017FulfillmentSpec\022\024\n\007version\030\001 \001(\005" - + "B\003\340A\001\"}\n\021FulfillmentResult\022\027\n\005score\030\001 \001(" + + "m.v1beta1.FulfillmentInputH\000\022a\n\033summariz" + + "ation_quality_input\030\007 \001(\0132:.google.cloud" + + ".aiplatform.v1beta1.SummarizationQuality" + + "InputH\000\022r\n$pairwise_summarization_qualit" + + "y_input\030\027 \001(\0132B.google.cloud.aiplatform." + + "v1beta1.PairwiseSummarizationQualityInpu" + + "tH\000\022i\n\037summarization_helpfulness_input\030\016" + + " \001(\0132>.google.cloud.aiplatform.v1beta1.S" + + "ummarizationHelpfulnessInputH\000\022e\n\035summar" + + "ization_verbosity_input\030\017 \001(\0132<.google.c" + + "loud.aiplatform.v1beta1.SummarizationVer" + + "bosityInputH\000\022j\n question_answering_qual" + + "ity_input\030\n \001(\0132>.google.cloud.aiplatfor" + + "m.v1beta1.QuestionAnsweringQualityInputH" + + "\000\022{\n)pairwise_question_answering_quality" + + "_input\030\030 \001(\0132F.google.cloud.aiplatform.v" + + "1beta1.PairwiseQuestionAnsweringQualityI" + + "nputH\000\022n\n\"question_answering_relevance_i" + + "nput\030\020 \001(\0132@.google.cloud.aiplatform.v1b" + + "eta1.QuestionAnsweringRelevanceInputH\000\022r" + + "\n$question_answering_helpfulness_input\030\021" + + " \001(\0132B.google.cloud.aiplatform.v1beta1.Q" + + "uestionAnsweringHelpfulnessInputH\000\022r\n$qu" + + "estion_answering_correctness_input\030\022 \001(\013" + + "2B.google.cloud.aiplatform.v1beta1.Quest" + + "ionAnsweringCorrectnessInputH\000\022T\n\025tool_c" + + "all_valid_input\030\023 \001(\01323.google.cloud.aip" + + "latform.v1beta1.ToolCallValidInputH\000\022T\n\025" + + "tool_name_match_input\030\024 \001(\01323.google.clo" + + "ud.aiplatform.v1beta1.ToolNameMatchInput" + + "H\000\022e\n\036tool_parameter_key_match_input\030\025 \001" + + "(\0132;.google.cloud.aiplatform.v1beta1.Too" + + "lParameterKeyMatchInputH\000\022c\n\035tool_parame" + + "ter_kv_match_input\030\026 \001(\0132:.google.cloud." + + "aiplatform.v1beta1.ToolParameterKVMatchI" + + "nputH\000\022;\n\010location\030\001 \001(\tB)\340A\002\372A#\n!locati" + + "ons.googleapis.com/LocationB\017\n\rmetric_in" + + "puts\"\234\020\n\031EvaluateInstancesResponse\022Q\n\023ex" + + "act_match_results\030\001 \001(\01322.google.cloud.a" + + "iplatform.v1beta1.ExactMatchResultsH\000\022D\n" + + "\014bleu_results\030\002 \001(\0132,.google.cloud.aipla" + + "tform.v1beta1.BleuResultsH\000\022F\n\rrouge_res" + + "ults\030\003 \001(\0132-.google.cloud.aiplatform.v1b" + + "eta1.RougeResultsH\000\022H\n\016fluency_result\030\004 " + + "\001(\0132..google.cloud.aiplatform.v1beta1.Fl" + + "uencyResultH\000\022L\n\020coherence_result\030\005 \001(\0132" + + "0.google.cloud.aiplatform.v1beta1.Cohere" + + "nceResultH\000\022F\n\rsafety_result\030\007 \001(\0132-.goo" + + "gle.cloud.aiplatform.v1beta1.SafetyResul" + + "tH\000\022R\n\023groundedness_result\030\010 \001(\01323.googl" + + "e.cloud.aiplatform.v1beta1.GroundednessR" + + "esultH\000\022P\n\022fulfillment_result\030\013 \001(\01322.go" + + "ogle.cloud.aiplatform.v1beta1.Fulfillmen" + + "tResultH\000\022c\n\034summarization_quality_resul" + + "t\030\006 \001(\0132;.google.cloud.aiplatform.v1beta" + + "1.SummarizationQualityResultH\000\022t\n%pairwi" + + "se_summarization_quality_result\030\026 \001(\0132C." + + "google.cloud.aiplatform.v1beta1.Pairwise" + + "SummarizationQualityResultH\000\022k\n summariz" + + "ation_helpfulness_result\030\r \001(\0132?.google." + + "cloud.aiplatform.v1beta1.SummarizationHe" + + "lpfulnessResultH\000\022g\n\036summarization_verbo" + + "sity_result\030\016 \001(\0132=.google.cloud.aiplatf" + + "orm.v1beta1.SummarizationVerbosityResult" + + "H\000\022l\n!question_answering_quality_result\030" + + "\t \001(\0132?.google.cloud.aiplatform.v1beta1." + + "QuestionAnsweringQualityResultH\000\022}\n*pair" + + "wise_question_answering_quality_result\030\027" + + " \001(\0132G.google.cloud.aiplatform.v1beta1.P" + + "airwiseQuestionAnsweringQualityResultH\000\022" + + "p\n#question_answering_relevance_result\030\017" + + " \001(\0132A.google.cloud.aiplatform.v1beta1.Q" + + "uestionAnsweringRelevanceResultH\000\022t\n%que" + + "stion_answering_helpfulness_result\030\020 \001(\013" + + "2C.google.cloud.aiplatform.v1beta1.Quest" + + "ionAnsweringHelpfulnessResultH\000\022t\n%quest" + + "ion_answering_correctness_result\030\021 \001(\0132C" + + ".google.cloud.aiplatform.v1beta1.Questio" + + "nAnsweringCorrectnessResultH\000\022X\n\027tool_ca" + + "ll_valid_results\030\022 \001(\01325.google.cloud.ai" + + "platform.v1beta1.ToolCallValidResultsH\000\022" + + "X\n\027tool_name_match_results\030\023 \001(\01325.googl" + + "e.cloud.aiplatform.v1beta1.ToolNameMatch" + + "ResultsH\000\022i\n tool_parameter_key_match_re" + + "sults\030\024 \001(\0132=.google.cloud.aiplatform.v1" + + "beta1.ToolParameterKeyMatchResultsH\000\022g\n\037" + + "tool_parameter_kv_match_results\030\025 \001(\0132<." + + "google.cloud.aiplatform.v1beta1.ToolPara" + + "meterKVMatchResultsH\000B\024\n\022evaluation_resu" + + "lts\"\251\001\n\017ExactMatchInput\022I\n\013metric_spec\030\001" + + " \001(\0132/.google.cloud.aiplatform.v1beta1.E" + + "xactMatchSpecB\003\340A\002\022K\n\tinstances\030\002 \003(\01323." + + "google.cloud.aiplatform.v1beta1.ExactMat" + + "chInstanceB\003\340A\002\"l\n\022ExactMatchInstance\022\034\n" + + "\nprediction\030\001 \001(\tB\003\340A\002H\000\210\001\001\022\033\n\treference" + + "\030\002 \001(\tB\003\340A\002H\001\210\001\001B\r\n\013_predictionB\014\n\n_refe" + + "rence\"\020\n\016ExactMatchSpec\"s\n\021ExactMatchRes" + + "ults\022^\n\031exact_match_metric_values\030\001 \003(\0132" + + "6.google.cloud.aiplatform.v1beta1.ExactM" + + "atchMetricValueB\003\340A\003\":\n\025ExactMatchMetric" + + "Value\022\027\n\005score\030\001 \001(\002B\003\340A\003H\000\210\001\001B\010\n\006_score" + + "\"\227\001\n\tBleuInput\022C\n\013metric_spec\030\001 \001(\0132).go" + + "ogle.cloud.aiplatform.v1beta1.BleuSpecB\003" + + "\340A\002\022E\n\tinstances\030\002 \003(\0132-.google.cloud.ai" + + "platform.v1beta1.BleuInstanceB\003\340A\002\"f\n\014Bl" + + "euInstance\022\034\n\nprediction\030\001 \001(\tB\003\340A\002H\000\210\001\001" + + "\022\033\n\treference\030\002 \001(\tB\003\340A\002H\001\210\001\001B\r\n\013_predic" + + "tionB\014\n\n_reference\"\n\n\010BleuSpec\"`\n\013BleuRe" + + "sults\022Q\n\022bleu_metric_values\030\001 \003(\01320.goog" + + "le.cloud.aiplatform.v1beta1.BleuMetricVa" + + "lueB\003\340A\003\"4\n\017BleuMetricValue\022\027\n\005score\030\001 \001" + + "(\002B\003\340A\003H\000\210\001\001B\010\n\006_score\"\232\001\n\nRougeInput\022D\n" + + "\013metric_spec\030\001 \001(\0132*.google.cloud.aiplat" + + "form.v1beta1.RougeSpecB\003\340A\002\022F\n\tinstances" + + "\030\002 \003(\0132..google.cloud.aiplatform.v1beta1" + + ".RougeInstanceB\003\340A\002\"g\n\rRougeInstance\022\034\n\n" + + "prediction\030\001 \001(\tB\003\340A\002H\000\210\001\001\022\033\n\treference\030" + + "\002 \001(\tB\003\340A\002H\001\210\001\001B\r\n\013_predictionB\014\n\n_refer" + + "ence\"\\\n\tRougeSpec\022\027\n\nrouge_type\030\001 \001(\tB\003\340" + + "A\001\022\030\n\013use_stemmer\030\002 \001(\010B\003\340A\001\022\034\n\017split_su" + + "mmaries\030\003 \001(\010B\003\340A\001\"c\n\014RougeResults\022S\n\023ro" + + "uge_metric_values\030\001 \003(\01321.google.cloud.a" + + "iplatform.v1beta1.RougeMetricValueB\003\340A\003\"" + + "5\n\020RougeMetricValue\022\027\n\005score\030\001 \001(\002B\003\340A\003H" + + "\000\210\001\001B\010\n\006_score\"\245\001\n\016CoherenceInput\022H\n\013met" + + "ric_spec\030\001 \001(\0132..google.cloud.aiplatform" + + ".v1beta1.CoherenceSpecB\003\340A\002\022I\n\010instance\030" + + "\002 \001(\01322.google.cloud.aiplatform.v1beta1." + + "CoherenceInstanceB\003\340A\002\"@\n\021CoherenceInsta" + + "nce\022\034\n\nprediction\030\001 \001(\tB\003\340A\002H\000\210\001\001B\r\n\013_pr" + + "ediction\"%\n\rCoherenceSpec\022\024\n\007version\030\001 \001" + + "(\005B\003\340A\001\"{\n\017CoherenceResult\022\027\n\005score\030\001 \001(" + "\002B\003\340A\003H\000\210\001\001\022\030\n\013explanation\030\002 \001(\tB\003\340A\003\022\034\n" + "\nconfidence\030\003 \001(\002B\003\340A\003H\001\210\001\001B\010\n\006_scoreB\r\n" - + "\013_confidence\"\264\001\n\023ResponseRecallInput\022M\n\013" - + "metric_spec\030\001 \001(\01323.google.cloud.aiplatf" - + "orm.v1beta1.ResponseRecallSpecB\003\340A\002\022N\n\010i" - + "nstance\030\002 \001(\01327.google.cloud.aiplatform." - + "v1beta1.ResponseRecallInstanceB\003\340A\002\"p\n\026R" - + "esponseRecallInstance\022\034\n\nprediction\030\001 \001(" - + "\tB\003\340A\002H\000\210\001\001\022\033\n\treference\030\002 \001(\tB\003\340A\002H\001\210\001\001" - + "B\r\n\013_predictionB\014\n\n_reference\"*\n\022Respons" - + "eRecallSpec\022\024\n\007version\030\001 \001(\005B\003\340A\001\"\200\001\n\024Re" - + "sponseRecallResult\022\027\n\005score\030\001 \001(\002B\003\340A\003H\000" - + "\210\001\001\022\030\n\013explanation\030\002 \001(\tB\003\340A\003\022\034\n\nconfide" - + "nce\030\003 \001(\002B\003\340A\003H\001\210\001\001B\010\n\006_scoreB\r\n\013_confid" - + "ence\"\306\001\n\031SummarizationQualityInput\022S\n\013me" - + "tric_spec\030\001 \001(\01329.google.cloud.aiplatfor" - + "m.v1beta1.SummarizationQualitySpecB\003\340A\002\022" - + "T\n\010instance\030\002 \001(\0132=.google.cloud.aiplatf" - + "orm.v1beta1.SummarizationQualityInstance" - + "B\003\340A\002\"\314\001\n\034SummarizationQualityInstance\022\034" - + "\n\nprediction\030\001 \001(\tB\003\340A\002H\000\210\001\001\022\033\n\treferenc" - + "e\030\002 \001(\tB\003\340A\001H\001\210\001\001\022\031\n\007context\030\003 \001(\tB\003\340A\002H" - + "\002\210\001\001\022\035\n\013instruction\030\004 \001(\tB\003\340A\002H\003\210\001\001B\r\n\013_" - + "predictionB\014\n\n_referenceB\n\n\010_contextB\016\n\014" - + "_instruction\"L\n\030SummarizationQualitySpec" - + "\022\032\n\ruse_reference\030\001 \001(\010B\003\340A\001\022\024\n\007version\030" - + "\002 \001(\005B\003\340A\001\"\206\001\n\032SummarizationQualityResul" - + "t\022\027\n\005score\030\001 \001(\002B\003\340A\003H\000\210\001\001\022\030\n\013explanatio" - + "n\030\002 \001(\tB\003\340A\003\022\034\n\nconfidence\030\003 \001(\002B\003\340A\003H\001\210" - + "\001\001B\010\n\006_scoreB\r\n\013_confidence\"\336\001\n!Pairwise" - + "SummarizationQualityInput\022[\n\013metric_spec" - + "\030\001 \001(\0132A.google.cloud.aiplatform.v1beta1" - + ".PairwiseSummarizationQualitySpecB\003\340A\002\022\\" - + "\n\010instance\030\002 \001(\0132E.google.cloud.aiplatfo" - + "rm.v1beta1.PairwiseSummarizationQualityI" - + "nstanceB\003\340A\002\"\223\002\n$PairwiseSummarizationQu" - + "alityInstance\022\034\n\nprediction\030\001 \001(\tB\003\340A\002H\000" - + "\210\001\001\022%\n\023baseline_prediction\030\002 \001(\tB\003\340A\002H\001\210" - + "\001\001\022\033\n\treference\030\003 \001(\tB\003\340A\001H\002\210\001\001\022\031\n\007conte" - + "xt\030\004 \001(\tB\003\340A\002H\003\210\001\001\022\035\n\013instruction\030\005 \001(\tB" - + "\003\340A\002H\004\210\001\001B\r\n\013_predictionB\026\n\024_baseline_pr" - + "edictionB\014\n\n_referenceB\n\n\010_contextB\016\n\014_i" - + "nstruction\"T\n PairwiseSummarizationQuali" + + "\013_confidence\"\237\001\n\014FluencyInput\022F\n\013metric_" + + "spec\030\001 \001(\0132,.google.cloud.aiplatform.v1b" + + "eta1.FluencySpecB\003\340A\002\022G\n\010instance\030\002 \001(\0132" + + "0.google.cloud.aiplatform.v1beta1.Fluenc" + + "yInstanceB\003\340A\002\">\n\017FluencyInstance\022\034\n\npre" + + "diction\030\001 \001(\tB\003\340A\002H\000\210\001\001B\r\n\013_prediction\"#" + + "\n\013FluencySpec\022\024\n\007version\030\001 \001(\005B\003\340A\001\"y\n\rF" + + "luencyResult\022\027\n\005score\030\001 \001(\002B\003\340A\003H\000\210\001\001\022\030\n" + + "\013explanation\030\002 \001(\tB\003\340A\003\022\034\n\nconfidence\030\003 " + + "\001(\002B\003\340A\003H\001\210\001\001B\010\n\006_scoreB\r\n\013_confidence\"\234" + + "\001\n\013SafetyInput\022E\n\013metric_spec\030\001 \001(\0132+.go" + + "ogle.cloud.aiplatform.v1beta1.SafetySpec" + + "B\003\340A\002\022F\n\010instance\030\002 \001(\0132/.google.cloud.a" + + "iplatform.v1beta1.SafetyInstanceB\003\340A\002\"=\n" + + "\016SafetyInstance\022\034\n\nprediction\030\001 \001(\tB\003\340A\002" + + "H\000\210\001\001B\r\n\013_prediction\"\"\n\nSafetySpec\022\024\n\007ve" + + "rsion\030\001 \001(\005B\003\340A\001\"x\n\014SafetyResult\022\027\n\005scor" + + "e\030\001 \001(\002B\003\340A\003H\000\210\001\001\022\030\n\013explanation\030\002 \001(\tB\003" + + "\340A\003\022\034\n\nconfidence\030\003 \001(\002B\003\340A\003H\001\210\001\001B\010\n\006_sc" + + "oreB\r\n\013_confidence\"\256\001\n\021GroundednessInput" + + "\022K\n\013metric_spec\030\001 \001(\01321.google.cloud.aip" + + "latform.v1beta1.GroundednessSpecB\003\340A\002\022L\n" + + "\010instance\030\002 \001(\01325.google.cloud.aiplatfor" + + "m.v1beta1.GroundednessInstanceB\003\340A\002\"j\n\024G" + + "roundednessInstance\022\034\n\nprediction\030\001 \001(\tB" + + "\003\340A\002H\000\210\001\001\022\031\n\007context\030\002 \001(\tB\003\340A\002H\001\210\001\001B\r\n\013" + + "_predictionB\n\n\010_context\"(\n\020GroundednessS" + + "pec\022\024\n\007version\030\001 \001(\005B\003\340A\001\"~\n\022Groundednes" + + "sResult\022\027\n\005score\030\001 \001(\002B\003\340A\003H\000\210\001\001\022\030\n\013expl" + + "anation\030\002 \001(\tB\003\340A\003\022\034\n\nconfidence\030\003 \001(\002B\003" + + "\340A\003H\001\210\001\001B\010\n\006_scoreB\r\n\013_confidence\"\253\001\n\020Fu" + + "lfillmentInput\022J\n\013metric_spec\030\001 \001(\01320.go" + + "ogle.cloud.aiplatform.v1beta1.Fulfillmen" + + "tSpecB\003\340A\002\022K\n\010instance\030\002 \001(\01324.google.cl" + + "oud.aiplatform.v1beta1.FulfillmentInstan" + + "ceB\003\340A\002\"q\n\023FulfillmentInstance\022\034\n\npredic" + + "tion\030\001 \001(\tB\003\340A\002H\000\210\001\001\022\035\n\013instruction\030\002 \001(" + + "\tB\003\340A\002H\001\210\001\001B\r\n\013_predictionB\016\n\014_instructi" + + "on\"\'\n\017FulfillmentSpec\022\024\n\007version\030\001 \001(\005B\003" + + "\340A\001\"}\n\021FulfillmentResult\022\027\n\005score\030\001 \001(\002B" + + "\003\340A\003H\000\210\001\001\022\030\n\013explanation\030\002 \001(\tB\003\340A\003\022\034\n\nc" + + "onfidence\030\003 \001(\002B\003\340A\003H\001\210\001\001B\010\n\006_scoreB\r\n\013_" + + "confidence\"\306\001\n\031SummarizationQualityInput" + + "\022S\n\013metric_spec\030\001 \001(\01329.google.cloud.aip" + + "latform.v1beta1.SummarizationQualitySpec" + + "B\003\340A\002\022T\n\010instance\030\002 \001(\0132=.google.cloud.a" + + "iplatform.v1beta1.SummarizationQualityIn" + + "stanceB\003\340A\002\"\314\001\n\034SummarizationQualityInst" + + "ance\022\034\n\nprediction\030\001 \001(\tB\003\340A\002H\000\210\001\001\022\033\n\tre" + + "ference\030\002 \001(\tB\003\340A\001H\001\210\001\001\022\031\n\007context\030\003 \001(\t" + + "B\003\340A\002H\002\210\001\001\022\035\n\013instruction\030\004 \001(\tB\003\340A\002H\003\210\001" + + "\001B\r\n\013_predictionB\014\n\n_referenceB\n\n\010_conte" + + "xtB\016\n\014_instruction\"L\n\030SummarizationQuali" + "tySpec\022\032\n\ruse_reference\030\001 \001(\010B\003\340A\001\022\024\n\007ve" - + "rsion\030\002 \001(\005B\003\340A\001\"\272\001\n\"PairwiseSummarizati" - + "onQualityResult\022M\n\017pairwise_choice\030\001 \001(\016" - + "2/.google.cloud.aiplatform.v1beta1.Pairw" - + "iseChoiceB\003\340A\003\022\030\n\013explanation\030\002 \001(\tB\003\340A\003" - + "\022\034\n\nconfidence\030\003 \001(\002B\003\340A\003H\000\210\001\001B\r\n\013_confi" - + "dence\"\322\001\n\035SummarizationHelpfulnessInput\022" - + "W\n\013metric_spec\030\001 \001(\0132=.google.cloud.aipl" - + "atform.v1beta1.SummarizationHelpfulnessS" - + "pecB\003\340A\002\022X\n\010instance\030\002 \001(\0132A.google.clou" + + "rsion\030\002 \001(\005B\003\340A\001\"\206\001\n\032SummarizationQualit" + + "yResult\022\027\n\005score\030\001 \001(\002B\003\340A\003H\000\210\001\001\022\030\n\013expl" + + "anation\030\002 \001(\tB\003\340A\003\022\034\n\nconfidence\030\003 \001(\002B\003" + + "\340A\003H\001\210\001\001B\010\n\006_scoreB\r\n\013_confidence\"\336\001\n!Pa" + + "irwiseSummarizationQualityInput\022[\n\013metri" + + "c_spec\030\001 \001(\0132A.google.cloud.aiplatform.v" + + "1beta1.PairwiseSummarizationQualitySpecB" + + "\003\340A\002\022\\\n\010instance\030\002 \001(\0132E.google.cloud.ai" + + "platform.v1beta1.PairwiseSummarizationQu" + + "alityInstanceB\003\340A\002\"\223\002\n$PairwiseSummariza" + + "tionQualityInstance\022\034\n\nprediction\030\001 \001(\tB" + + "\003\340A\002H\000\210\001\001\022%\n\023baseline_prediction\030\002 \001(\tB\003" + + "\340A\002H\001\210\001\001\022\033\n\treference\030\003 \001(\tB\003\340A\001H\002\210\001\001\022\031\n" + + "\007context\030\004 \001(\tB\003\340A\002H\003\210\001\001\022\035\n\013instruction\030" + + "\005 \001(\tB\003\340A\002H\004\210\001\001B\r\n\013_predictionB\026\n\024_basel" + + "ine_predictionB\014\n\n_referenceB\n\n\010_context" + + "B\016\n\014_instruction\"T\n PairwiseSummarizatio" + + "nQualitySpec\022\032\n\ruse_reference\030\001 \001(\010B\003\340A\001" + + "\022\024\n\007version\030\002 \001(\005B\003\340A\001\"\272\001\n\"PairwiseSumma" + + "rizationQualityResult\022M\n\017pairwise_choice" + + "\030\001 \001(\0162/.google.cloud.aiplatform.v1beta1" + + ".PairwiseChoiceB\003\340A\003\022\030\n\013explanation\030\002 \001(" + + "\tB\003\340A\003\022\034\n\nconfidence\030\003 \001(\002B\003\340A\003H\000\210\001\001B\r\n\013" + + "_confidence\"\322\001\n\035SummarizationHelpfulness" + + "Input\022W\n\013metric_spec\030\001 \001(\0132=.google.clou" + "d.aiplatform.v1beta1.SummarizationHelpfu" - + "lnessInstanceB\003\340A\002\"\320\001\n SummarizationHelp" - + "fulnessInstance\022\034\n\nprediction\030\001 \001(\tB\003\340A\002" - + "H\000\210\001\001\022\033\n\treference\030\002 \001(\tB\003\340A\001H\001\210\001\001\022\031\n\007co" - + "ntext\030\003 \001(\tB\003\340A\002H\002\210\001\001\022\035\n\013instruction\030\004 \001" - + "(\tB\003\340A\001H\003\210\001\001B\r\n\013_predictionB\014\n\n_referenc" - + "eB\n\n\010_contextB\016\n\014_instruction\"P\n\034Summari" - + "zationHelpfulnessSpec\022\032\n\ruse_reference\030\001" - + " \001(\010B\003\340A\001\022\024\n\007version\030\002 \001(\005B\003\340A\001\"\212\001\n\036Summ" - + "arizationHelpfulnessResult\022\027\n\005score\030\001 \001(" - + "\002B\003\340A\003H\000\210\001\001\022\030\n\013explanation\030\002 \001(\tB\003\340A\003\022\034\n" - + "\nconfidence\030\003 \001(\002B\003\340A\003H\001\210\001\001B\010\n\006_scoreB\r\n" - + "\013_confidence\"\314\001\n\033SummarizationVerbosityI" - + "nput\022U\n\013metric_spec\030\001 \001(\0132;.google.cloud" - + ".aiplatform.v1beta1.SummarizationVerbosi" - + "tySpecB\003\340A\002\022V\n\010instance\030\002 \001(\0132?.google.c" - + "loud.aiplatform.v1beta1.SummarizationVer" - + "bosityInstanceB\003\340A\002\"\316\001\n\036SummarizationVer" - + "bosityInstance\022\034\n\nprediction\030\001 \001(\tB\003\340A\002H" - + "\000\210\001\001\022\033\n\treference\030\002 \001(\tB\003\340A\001H\001\210\001\001\022\031\n\007con" - + "text\030\003 \001(\tB\003\340A\002H\002\210\001\001\022\035\n\013instruction\030\004 \001(" - + "\tB\003\340A\001H\003\210\001\001B\r\n\013_predictionB\014\n\n_reference" - + "B\n\n\010_contextB\016\n\014_instruction\"N\n\032Summariz" - + "ationVerbositySpec\022\032\n\ruse_reference\030\001 \001(" - + "\010B\003\340A\001\022\024\n\007version\030\002 \001(\005B\003\340A\001\"\210\001\n\034Summari" - + "zationVerbosityResult\022\027\n\005score\030\001 \001(\002B\003\340A" - + "\003H\000\210\001\001\022\030\n\013explanation\030\002 \001(\tB\003\340A\003\022\034\n\nconf" - + "idence\030\003 \001(\002B\003\340A\003H\001\210\001\001B\010\n\006_scoreB\r\n\013_con" - + "fidence\"\322\001\n\035QuestionAnsweringQualityInpu" - + "t\022W\n\013metric_spec\030\001 \001(\0132=.google.cloud.ai" - + "platform.v1beta1.QuestionAnsweringQualit" - + "ySpecB\003\340A\002\022X\n\010instance\030\002 \001(\0132A.google.cl" - + "oud.aiplatform.v1beta1.QuestionAnswering" - + "QualityInstanceB\003\340A\002\"\320\001\n QuestionAnsweri" - + "ngQualityInstance\022\034\n\nprediction\030\001 \001(\tB\003\340" - + "A\002H\000\210\001\001\022\033\n\treference\030\002 \001(\tB\003\340A\001H\001\210\001\001\022\031\n\007" - + "context\030\003 \001(\tB\003\340A\001H\002\210\001\001\022\035\n\013instruction\030\004" - + " \001(\tB\003\340A\002H\003\210\001\001B\r\n\013_predictionB\014\n\n_refere" - + "nceB\n\n\010_contextB\016\n\014_instruction\"P\n\034Quest" - + "ionAnsweringQualitySpec\022\032\n\ruse_reference" - + "\030\001 \001(\010B\003\340A\001\022\024\n\007version\030\002 \001(\005B\003\340A\001\"\212\001\n\036Qu" - + "estionAnsweringQualityResult\022\027\n\005score\030\001 " - + "\001(\002B\003\340A\003H\000\210\001\001\022\030\n\013explanation\030\002 \001(\tB\003\340A\003\022" - + "\034\n\nconfidence\030\003 \001(\002B\003\340A\003H\001\210\001\001B\010\n\006_scoreB" - + "\r\n\013_confidence\"\352\001\n%PairwiseQuestionAnswe" - + "ringQualityInput\022_\n\013metric_spec\030\001 \001(\0132E." - + "google.cloud.aiplatform.v1beta1.Pairwise" - + "QuestionAnsweringQualitySpecB\003\340A\002\022`\n\010ins" - + "tance\030\002 \001(\0132I.google.cloud.aiplatform.v1" - + "beta1.PairwiseQuestionAnsweringQualityIn" - + "stanceB\003\340A\002\"\227\002\n(PairwiseQuestionAnswerin" - + "gQualityInstance\022\034\n\nprediction\030\001 \001(\tB\003\340A" - + "\002H\000\210\001\001\022%\n\023baseline_prediction\030\002 \001(\tB\003\340A\002" - + "H\001\210\001\001\022\033\n\treference\030\003 \001(\tB\003\340A\001H\002\210\001\001\022\031\n\007co" - + "ntext\030\004 \001(\tB\003\340A\001H\003\210\001\001\022\035\n\013instruction\030\005 \001" - + "(\tB\003\340A\002H\004\210\001\001B\r\n\013_predictionB\026\n\024_baseline" - + "_predictionB\014\n\n_referenceB\n\n\010_contextB\016\n" - + "\014_instruction\"X\n$PairwiseQuestionAnsweri" - + "ngQualitySpec\022\032\n\ruse_reference\030\001 \001(\010B\003\340A" - + "\001\022\024\n\007version\030\002 \001(\005B\003\340A\001\"\276\001\n&PairwiseQues" - + "tionAnsweringQualityResult\022M\n\017pairwise_c" - + "hoice\030\001 \001(\0162/.google.cloud.aiplatform.v1" - + "beta1.PairwiseChoiceB\003\340A\003\022\030\n\013explanation" - + "\030\002 \001(\tB\003\340A\003\022\034\n\nconfidence\030\003 \001(\002B\003\340A\003H\000\210\001" - + "\001B\r\n\013_confidence\"\330\001\n\037QuestionAnsweringRe" - + "levanceInput\022Y\n\013metric_spec\030\001 \001(\0132?.goog" - + "le.cloud.aiplatform.v1beta1.QuestionAnsw" - + "eringRelevanceSpecB\003\340A\002\022Z\n\010instance\030\002 \001(" - + "\0132C.google.cloud.aiplatform.v1beta1.Ques" - + "tionAnsweringRelevanceInstanceB\003\340A\002\"\322\001\n\"" - + "QuestionAnsweringRelevanceInstance\022\034\n\npr" - + "ediction\030\001 \001(\tB\003\340A\002H\000\210\001\001\022\033\n\treference\030\002 " - + "\001(\tB\003\340A\001H\001\210\001\001\022\031\n\007context\030\003 \001(\tB\003\340A\001H\002\210\001\001" - + "\022\035\n\013instruction\030\004 \001(\tB\003\340A\002H\003\210\001\001B\r\n\013_pred" - + "ictionB\014\n\n_referenceB\n\n\010_contextB\016\n\014_ins" - + "truction\"R\n\036QuestionAnsweringRelevanceSp" - + "ec\022\032\n\ruse_reference\030\001 \001(\010B\003\340A\001\022\024\n\007versio" - + "n\030\002 \001(\005B\003\340A\001\"\214\001\n QuestionAnsweringReleva" - + "nceResult\022\027\n\005score\030\001 \001(\002B\003\340A\003H\000\210\001\001\022\030\n\013ex" - + "planation\030\002 \001(\tB\003\340A\003\022\034\n\nconfidence\030\003 \001(\002" - + "B\003\340A\003H\001\210\001\001B\010\n\006_scoreB\r\n\013_confidence\"\336\001\n!" - + "QuestionAnsweringHelpfulnessInput\022[\n\013met" - + "ric_spec\030\001 \001(\0132A.google.cloud.aiplatform" - + ".v1beta1.QuestionAnsweringHelpfulnessSpe" - + "cB\003\340A\002\022\\\n\010instance\030\002 \001(\0132E.google.cloud." - + "aiplatform.v1beta1.QuestionAnsweringHelp" - + "fulnessInstanceB\003\340A\002\"\324\001\n$QuestionAnsweri" - + "ngHelpfulnessInstance\022\034\n\nprediction\030\001 \001(" + + "lnessSpecB\003\340A\002\022X\n\010instance\030\002 \001(\0132A.googl" + + "e.cloud.aiplatform.v1beta1.Summarization" + + "HelpfulnessInstanceB\003\340A\002\"\320\001\n Summarizati" + + "onHelpfulnessInstance\022\034\n\nprediction\030\001 \001(" + "\tB\003\340A\002H\000\210\001\001\022\033\n\treference\030\002 \001(\tB\003\340A\001H\001\210\001\001" - + "\022\031\n\007context\030\003 \001(\tB\003\340A\001H\002\210\001\001\022\035\n\013instructi" - + "on\030\004 \001(\tB\003\340A\002H\003\210\001\001B\r\n\013_predictionB\014\n\n_re" - + "ferenceB\n\n\010_contextB\016\n\014_instruction\"T\n Q" - + "uestionAnsweringHelpfulnessSpec\022\032\n\ruse_r" - + "eference\030\001 \001(\010B\003\340A\001\022\024\n\007version\030\002 \001(\005B\003\340A" - + "\001\"\216\001\n\"QuestionAnsweringHelpfulnessResult" - + "\022\027\n\005score\030\001 \001(\002B\003\340A\003H\000\210\001\001\022\030\n\013explanation" - + "\030\002 \001(\tB\003\340A\003\022\034\n\nconfidence\030\003 \001(\002B\003\340A\003H\001\210\001" - + "\001B\010\n\006_scoreB\r\n\013_confidence\"\336\001\n!QuestionA" - + "nsweringCorrectnessInput\022[\n\013metric_spec\030" - + "\001 \001(\0132A.google.cloud.aiplatform.v1beta1." - + "QuestionAnsweringCorrectnessSpecB\003\340A\002\022\\\n" - + "\010instance\030\002 \001(\0132E.google.cloud.aiplatfor" - + "m.v1beta1.QuestionAnsweringCorrectnessIn" - + "stanceB\003\340A\002\"\324\001\n$QuestionAnsweringCorrect" - + "nessInstance\022\034\n\nprediction\030\001 \001(\tB\003\340A\002H\000\210" - + "\001\001\022\033\n\treference\030\002 \001(\tB\003\340A\001H\001\210\001\001\022\031\n\007conte" - + "xt\030\003 \001(\tB\003\340A\001H\002\210\001\001\022\035\n\013instruction\030\004 \001(\tB" - + "\003\340A\002H\003\210\001\001B\r\n\013_predictionB\014\n\n_referenceB\n" - + "\n\010_contextB\016\n\014_instruction\"T\n QuestionAn" - + "sweringCorrectnessSpec\022\032\n\ruse_reference\030" - + "\001 \001(\010B\003\340A\001\022\024\n\007version\030\002 \001(\005B\003\340A\001\"\216\001\n\"Que" - + "stionAnsweringCorrectnessResult\022\027\n\005score" - + "\030\001 \001(\002B\003\340A\003H\000\210\001\001\022\030\n\013explanation\030\002 \001(\tB\003\340" - + "A\003\022\034\n\nconfidence\030\003 \001(\002B\003\340A\003H\001\210\001\001B\010\n\006_sco" - + "reB\r\n\013_confidence\"\272\001\n\025RagContextRecallIn" - + "put\022O\n\013metric_spec\030\001 \001(\01325.google.cloud." - + "aiplatform.v1beta1.RagContextRecallSpecB" - + "\003\340A\002\022P\n\010instance\030\002 \001(\01329.google.cloud.ai" - + "platform.v1beta1.RagContextRecallInstanc" - + "eB\003\340A\002\"l\n\030RagContextRecallInstance\022\033\n\tre" - + "ference\030\001 \001(\tB\003\340A\002H\000\210\001\001\022\031\n\007context\030\002 \001(\t" - + "B\003\340A\002H\001\210\001\001B\014\n\n_referenceB\n\n\010_context\",\n\024" - + "RagContextRecallSpec\022\024\n\007version\030\002 \001(\005B\003\340" - + "A\001\"\202\001\n\026RagContextRecallResult\022\027\n\005score\030\001" - + " \001(\002B\003\340A\003H\000\210\001\001\022\030\n\013explanation\030\002 \001(\tB\003\340A\003" - + "\022\034\n\nconfidence\030\003 \001(\002B\003\340A\003H\001\210\001\001B\010\n\006_score" - + "B\r\n\013_confidence\"\262\001\n\022ToolCallValidInput\022L" - + "\n\013metric_spec\030\001 \001(\01322.google.cloud.aipla" - + "tform.v1beta1.ToolCallValidSpecB\003\340A\002\022N\n\t" - + "instances\030\002 \003(\01326.google.cloud.aiplatfor" - + "m.v1beta1.ToolCallValidInstanceB\003\340A\002\"\023\n\021" - + "ToolCallValidSpec\"o\n\025ToolCallValidInstan" - + "ce\022\034\n\nprediction\030\001 \001(\tB\003\340A\002H\000\210\001\001\022\033\n\trefe" - + "rence\030\002 \001(\tB\003\340A\002H\001\210\001\001B\r\n\013_predictionB\014\n\n" - + "_reference\"}\n\024ToolCallValidResults\022e\n\035to" - + "ol_call_valid_metric_values\030\001 \003(\01329.goog" - + "le.cloud.aiplatform.v1beta1.ToolCallVali" - + "dMetricValueB\003\340A\003\"=\n\030ToolCallValidMetric" - + "Value\022\027\n\005score\030\001 \001(\002B\003\340A\003H\000\210\001\001B\010\n\006_score" - + "\"\262\001\n\022ToolNameMatchInput\022L\n\013metric_spec\030\001" - + " \001(\01322.google.cloud.aiplatform.v1beta1.T" - + "oolNameMatchSpecB\003\340A\002\022N\n\tinstances\030\002 \003(\013" - + "26.google.cloud.aiplatform.v1beta1.ToolN" - + "ameMatchInstanceB\003\340A\002\"\023\n\021ToolNameMatchSp", - "ec\"o\n\025ToolNameMatchInstance\022\034\n\npredictio" + + "\022\031\n\007context\030\003 \001(\tB\003\340A\002H\002\210\001\001\022\035\n\013instructi" + + "on\030\004 \001(\tB\003\340A\001H\003\210\001\001B\r\n\013_predictionB\014\n\n_re" + + "ferenceB\n\n\010_contextB\016\n\014_instruction\"P\n\034S" + + "ummarizationHelpfulnessSpec\022\032\n\ruse_refer" + + "ence\030\001 \001(\010B\003\340A\001\022\024\n\007version\030\002 \001(\005B\003\340A\001\"\212\001" + + "\n\036SummarizationHelpfulnessResult\022\027\n\005scor" + + "e\030\001 \001(\002B\003\340A\003H\000\210\001\001\022\030\n\013explanation\030\002 \001(\tB\003" + + "\340A\003\022\034\n\nconfidence\030\003 \001(\002B\003\340A\003H\001\210\001\001B\010\n\006_sc" + + "oreB\r\n\013_confidence\"\314\001\n\033SummarizationVerb" + + "osityInput\022U\n\013metric_spec\030\001 \001(\0132;.google" + + ".cloud.aiplatform.v1beta1.SummarizationV" + + "erbositySpecB\003\340A\002\022V\n\010instance\030\002 \001(\0132?.go" + + "ogle.cloud.aiplatform.v1beta1.Summarizat" + + "ionVerbosityInstanceB\003\340A\002\"\316\001\n\036Summarizat" + + "ionVerbosityInstance\022\034\n\nprediction\030\001 \001(\t" + + "B\003\340A\002H\000\210\001\001\022\033\n\treference\030\002 \001(\tB\003\340A\001H\001\210\001\001\022" + + "\031\n\007context\030\003 \001(\tB\003\340A\002H\002\210\001\001\022\035\n\013instructio" + + "n\030\004 \001(\tB\003\340A\001H\003\210\001\001B\r\n\013_predictionB\014\n\n_ref" + + "erenceB\n\n\010_contextB\016\n\014_instruction\"N\n\032Su" + + "mmarizationVerbositySpec\022\032\n\ruse_referenc" + + "e\030\001 \001(\010B\003\340A\001\022\024\n\007version\030\002 \001(\005B\003\340A\001\"\210\001\n\034S" + + "ummarizationVerbosityResult\022\027\n\005score\030\001 \001" + + "(\002B\003\340A\003H\000\210\001\001\022\030\n\013explanation\030\002 \001(\tB\003\340A\003\022\034" + + "\n\nconfidence\030\003 \001(\002B\003\340A\003H\001\210\001\001B\010\n\006_scoreB\r" + + "\n\013_confidence\"\322\001\n\035QuestionAnsweringQuali" + + "tyInput\022W\n\013metric_spec\030\001 \001(\0132=.google.cl" + + "oud.aiplatform.v1beta1.QuestionAnswering" + + "QualitySpecB\003\340A\002\022X\n\010instance\030\002 \001(\0132A.goo" + + "gle.cloud.aiplatform.v1beta1.QuestionAns" + + "weringQualityInstanceB\003\340A\002\"\320\001\n QuestionA" + + "nsweringQualityInstance\022\034\n\nprediction\030\001 " + + "\001(\tB\003\340A\002H\000\210\001\001\022\033\n\treference\030\002 \001(\tB\003\340A\001H\001\210" + + "\001\001\022\031\n\007context\030\003 \001(\tB\003\340A\002H\002\210\001\001\022\035\n\013instruc" + + "tion\030\004 \001(\tB\003\340A\002H\003\210\001\001B\r\n\013_predictionB\014\n\n_" + + "referenceB\n\n\010_contextB\016\n\014_instruction\"P\n" + + "\034QuestionAnsweringQualitySpec\022\032\n\ruse_ref" + + "erence\030\001 \001(\010B\003\340A\001\022\024\n\007version\030\002 \001(\005B\003\340A\001\"" + + "\212\001\n\036QuestionAnsweringQualityResult\022\027\n\005sc" + + "ore\030\001 \001(\002B\003\340A\003H\000\210\001\001\022\030\n\013explanation\030\002 \001(\t" + + "B\003\340A\003\022\034\n\nconfidence\030\003 \001(\002B\003\340A\003H\001\210\001\001B\010\n\006_" + + "scoreB\r\n\013_confidence\"\352\001\n%PairwiseQuestio" + + "nAnsweringQualityInput\022_\n\013metric_spec\030\001 " + + "\001(\0132E.google.cloud.aiplatform.v1beta1.Pa" + + "irwiseQuestionAnsweringQualitySpecB\003\340A\002\022" + + "`\n\010instance\030\002 \001(\0132I.google.cloud.aiplatf" + + "orm.v1beta1.PairwiseQuestionAnsweringQua" + + "lityInstanceB\003\340A\002\"\227\002\n(PairwiseQuestionAn" + + "sweringQualityInstance\022\034\n\nprediction\030\001 \001" + + "(\tB\003\340A\002H\000\210\001\001\022%\n\023baseline_prediction\030\002 \001(" + + "\tB\003\340A\002H\001\210\001\001\022\033\n\treference\030\003 \001(\tB\003\340A\001H\002\210\001\001" + + "\022\031\n\007context\030\004 \001(\tB\003\340A\002H\003\210\001\001\022\035\n\013instructi" + + "on\030\005 \001(\tB\003\340A\002H\004\210\001\001B\r\n\013_predictionB\026\n\024_ba" + + "seline_predictionB\014\n\n_referenceB\n\n\010_cont" + + "extB\016\n\014_instruction\"X\n$PairwiseQuestionA" + + "nsweringQualitySpec\022\032\n\ruse_reference\030\001 \001" + + "(\010B\003\340A\001\022\024\n\007version\030\002 \001(\005B\003\340A\001\"\276\001\n&Pairwi" + + "seQuestionAnsweringQualityResult\022M\n\017pair" + + "wise_choice\030\001 \001(\0162/.google.cloud.aiplatf" + + "orm.v1beta1.PairwiseChoiceB\003\340A\003\022\030\n\013expla" + + "nation\030\002 \001(\tB\003\340A\003\022\034\n\nconfidence\030\003 \001(\002B\003\340" + + "A\003H\000\210\001\001B\r\n\013_confidence\"\330\001\n\037QuestionAnswe" + + "ringRelevanceInput\022Y\n\013metric_spec\030\001 \001(\0132" + + "?.google.cloud.aiplatform.v1beta1.Questi" + + "onAnsweringRelevanceSpecB\003\340A\002\022Z\n\010instanc" + + "e\030\002 \001(\0132C.google.cloud.aiplatform.v1beta" + + "1.QuestionAnsweringRelevanceInstanceB\003\340A" + + "\002\"\322\001\n\"QuestionAnsweringRelevanceInstance" + + "\022\034\n\nprediction\030\001 \001(\tB\003\340A\002H\000\210\001\001\022\033\n\trefere" + + "nce\030\002 \001(\tB\003\340A\001H\001\210\001\001\022\031\n\007context\030\003 \001(\tB\003\340A" + + "\001H\002\210\001\001\022\035\n\013instruction\030\004 \001(\tB\003\340A\002H\003\210\001\001B\r\n" + + "\013_predictionB\014\n\n_referenceB\n\n\010_contextB\016" + + "\n\014_instruction\"R\n\036QuestionAnsweringRelev" + + "anceSpec\022\032\n\ruse_reference\030\001 \001(\010B\003\340A\001\022\024\n\007" + + "version\030\002 \001(\005B\003\340A\001\"\214\001\n QuestionAnswering" + + "RelevanceResult\022\027\n\005score\030\001 \001(\002B\003\340A\003H\000\210\001\001" + + "\022\030\n\013explanation\030\002 \001(\tB\003\340A\003\022\034\n\nconfidence" + + "\030\003 \001(\002B\003\340A\003H\001\210\001\001B\010\n\006_scoreB\r\n\013_confidenc" + + "e\"\336\001\n!QuestionAnsweringHelpfulnessInput\022" + + "[\n\013metric_spec\030\001 \001(\0132A.google.cloud.aipl" + + "atform.v1beta1.QuestionAnsweringHelpfuln" + + "essSpecB\003\340A\002\022\\\n\010instance\030\002 \001(\0132E.google." + + "cloud.aiplatform.v1beta1.QuestionAnsweri" + + "ngHelpfulnessInstanceB\003\340A\002\"\324\001\n$QuestionA" + + "nsweringHelpfulnessInstance\022\034\n\npredictio" + "n\030\001 \001(\tB\003\340A\002H\000\210\001\001\022\033\n\treference\030\002 \001(\tB\003\340A" - + "\002H\001\210\001\001B\r\n\013_predictionB\014\n\n_reference\"}\n\024T" - + "oolNameMatchResults\022e\n\035tool_name_match_m" - + "etric_values\030\001 \003(\01329.google.cloud.aiplat" - + "form.v1beta1.ToolNameMatchMetricValueB\003\340" - + "A\003\"=\n\030ToolNameMatchMetricValue\022\027\n\005score\030" - + "\001 \001(\002B\003\340A\003H\000\210\001\001B\010\n\006_score\"\312\001\n\032ToolParame" - + "terKeyMatchInput\022T\n\013metric_spec\030\001 \001(\0132:." - + "google.cloud.aiplatform.v1beta1.ToolPara" - + "meterKeyMatchSpecB\003\340A\002\022V\n\tinstances\030\002 \003(" - + "\0132>.google.cloud.aiplatform.v1beta1.Tool" - + "ParameterKeyMatchInstanceB\003\340A\002\"\033\n\031ToolPa" - + "rameterKeyMatchSpec\"w\n\035ToolParameterKeyM" - + "atchInstance\022\034\n\nprediction\030\001 \001(\tB\003\340A\002H\000\210" - + "\001\001\022\033\n\treference\030\002 \001(\tB\003\340A\002H\001\210\001\001B\r\n\013_pred" - + "ictionB\014\n\n_reference\"\226\001\n\034ToolParameterKe" - + "yMatchResults\022v\n&tool_parameter_key_matc" - + "h_metric_values\030\001 \003(\0132A.google.cloud.aip" - + "latform.v1beta1.ToolParameterKeyMatchMet" - + "ricValueB\003\340A\003\"E\n ToolParameterKeyMatchMe" - + "tricValue\022\027\n\005score\030\001 \001(\002B\003\340A\003H\000\210\001\001B\010\n\006_s" - + "core\"\307\001\n\031ToolParameterKVMatchInput\022S\n\013me" - + "tric_spec\030\001 \001(\01329.google.cloud.aiplatfor" - + "m.v1beta1.ToolParameterKVMatchSpecB\003\340A\002\022" - + "U\n\tinstances\030\002 \003(\0132=.google.cloud.aiplat" - + "form.v1beta1.ToolParameterKVMatchInstanc" - + "eB\003\340A\002\"@\n\030ToolParameterKVMatchSpec\022$\n\027us" - + "e_strict_string_match\030\001 \001(\010B\003\340A\001\"v\n\034Tool" - + "ParameterKVMatchInstance\022\034\n\nprediction\030\001" - + " \001(\tB\003\340A\002H\000\210\001\001\022\033\n\treference\030\002 \001(\tB\003\340A\002H\001" - + "\210\001\001B\r\n\013_predictionB\014\n\n_reference\"\223\001\n\033Too" - + "lParameterKVMatchResults\022t\n%tool_paramet" - + "er_kv_match_metric_values\030\001 \003(\0132@.google" - + ".cloud.aiplatform.v1beta1.ToolParameterK" - + "VMatchMetricValueB\003\340A\003\"D\n\037ToolParameterK" - + "VMatchMetricValue\022\027\n\005score\030\001 \001(\002B\003\340A\003H\000\210" - + "\001\001B\010\n\006_score*W\n\016PairwiseChoice\022\037\n\033PAIRWI" - + "SE_CHOICE_UNSPECIFIED\020\000\022\014\n\010BASELINE\020\001\022\r\n" - + "\tCANDIDATE\020\002\022\007\n\003TIE\020\0032\270\002\n\021EvaluationServ" - + "ice\022\323\001\n\021EvaluateInstances\0229.google.cloud" - + ".aiplatform.v1beta1.EvaluateInstancesReq" - + "uest\032:.google.cloud.aiplatform.v1beta1.E" - + "valuateInstancesResponse\"G\202\323\344\223\002A\".google.cloud.aiplatform.v1be" + + "ta1.ToolParameterKeyMatchInstanceB\003\340A\002\"\033" + + "\n\031ToolParameterKeyMatchSpec\"w\n\035ToolParam" + + "eterKeyMatchInstance\022\034\n\nprediction\030\001 \001(\t" + + "B\003\340A\002H\000\210\001\001\022\033\n\treference\030\002 \001(\tB\003\340A\002H\001\210\001\001B" + + "\r\n\013_predictionB\014\n\n_reference\"\226\001\n\034ToolPar" + + "ameterKeyMatchResults\022v\n&tool_parameter_" + + "key_match_metric_values\030\001 \003(\0132A.google.c" + + "loud.aiplatform.v1beta1.ToolParameterKey" + + "MatchMetricValueB\003\340A\003\"E\n ToolParameterKe" + + "yMatchMetricValue\022\027\n\005score\030\001 \001(\002B\003\340A\003H\000\210" + + "\001\001B\010\n\006_score\"\307\001\n\031ToolParameterKVMatchInp" + + "ut\022S\n\013metric_spec\030\001 \001(\01329.google.cloud.a" + + "iplatform.v1beta1.ToolParameterKVMatchSp" + + "ecB\003\340A\002\022U\n\tinstances\030\002 \003(\0132=.google.clou" + + "d.aiplatform.v1beta1.ToolParameterKVMatc" + + "hInstanceB\003\340A\002\"@\n\030ToolParameterKVMatchSp" + + "ec\022$\n\027use_strict_string_match\030\001 \001(\010B\003\340A\001" + + "\"v\n\034ToolParameterKVMatchInstance\022\034\n\npred" + + "iction\030\001 \001(\tB\003\340A\002H\000\210\001\001\022\033\n\treference\030\002 \001(" + + "\tB\003\340A\002H\001\210\001\001B\r\n\013_predictionB\014\n\n_reference" + + "\"\223\001\n\033ToolParameterKVMatchResults\022t\n%tool", + "_parameter_kv_match_metric_values\030\001 \003(\0132" + + "@.google.cloud.aiplatform.v1beta1.ToolPa" + + "rameterKVMatchMetricValueB\003\340A\003\"D\n\037ToolPa" + + "rameterKVMatchMetricValue\022\027\n\005score\030\001 \001(\002" + + "B\003\340A\003H\000\210\001\001B\010\n\006_score*W\n\016PairwiseChoice\022\037" + + "\n\033PAIRWISE_CHOICE_UNSPECIFIED\020\000\022\014\n\010BASEL" + + "INE\020\001\022\r\n\tCANDIDATE\020\002\022\007\n\003TIE\020\0032\270\002\n\021Evalua" + + "tionService\022\323\001\n\021EvaluateInstances\0229.goog" + + "le.cloud.aiplatform.v1beta1.EvaluateInst" + + "ancesRequest\032:.google.cloud.aiplatform.v" + + "1beta1.EvaluateInstancesResponse\"G\202\323\344\223\002A" + + "\" * Optional. The PrivateServiceConnect config for the extension. - * If specified, the service endpoints associated with the Extension should be - * registered in the provided Service Directory + * If specified, the service endpoints associated with the + * Extension should be registered with private network access in the provided + * Service Directory * (https://cloud.google.com/service-directory/docs/configuring-private-network-access). + * + * If the service contains more than one endpoint with a network, the service + * will arbitrarilty choose one of the endpoints to use for extension + * execution. * * * @@ -688,9 +693,14 @@ public boolean hasPrivateServiceConnectConfig() { * *
    * Optional. The PrivateServiceConnect config for the extension.
-   * If specified, the service endpoints associated with the Extension should be
-   * registered in the provided Service Directory
+   * If specified, the service endpoints associated with the
+   * Extension should be registered with private network access in the provided
+   * Service Directory
    * (https://cloud.google.com/service-directory/docs/configuring-private-network-access).
+   *
+   * If the service contains more than one endpoint with a network, the service
+   * will arbitrarilty choose one of the endpoints to use for extension
+   * execution.
    * 
* * @@ -712,9 +722,14 @@ public boolean hasPrivateServiceConnectConfig() { * *
    * Optional. The PrivateServiceConnect config for the extension.
-   * If specified, the service endpoints associated with the Extension should be
-   * registered in the provided Service Directory
+   * If specified, the service endpoints associated with the
+   * Extension should be registered with private network access in the provided
+   * Service Directory
    * (https://cloud.google.com/service-directory/docs/configuring-private-network-access).
+   *
+   * If the service contains more than one endpoint with a network, the service
+   * will arbitrarilty choose one of the endpoints to use for extension
+   * execution.
    * 
* * @@ -3546,9 +3561,14 @@ public com.google.cloud.aiplatform.v1beta1.ToolUseExample.Builder addToolUseExam * *
      * Optional. The PrivateServiceConnect config for the extension.
-     * If specified, the service endpoints associated with the Extension should be
-     * registered in the provided Service Directory
+     * If specified, the service endpoints associated with the
+     * Extension should be registered with private network access in the provided
+     * Service Directory
      * (https://cloud.google.com/service-directory/docs/configuring-private-network-access).
+     *
+     * If the service contains more than one endpoint with a network, the service
+     * will arbitrarilty choose one of the endpoints to use for extension
+     * execution.
      * 
* * @@ -3565,9 +3585,14 @@ public boolean hasPrivateServiceConnectConfig() { * *
      * Optional. The PrivateServiceConnect config for the extension.
-     * If specified, the service endpoints associated with the Extension should be
-     * registered in the provided Service Directory
+     * If specified, the service endpoints associated with the
+     * Extension should be registered with private network access in the provided
+     * Service Directory
      * (https://cloud.google.com/service-directory/docs/configuring-private-network-access).
+     *
+     * If the service contains more than one endpoint with a network, the service
+     * will arbitrarilty choose one of the endpoints to use for extension
+     * execution.
      * 
* * @@ -3592,9 +3617,14 @@ public boolean hasPrivateServiceConnectConfig() { * *
      * Optional. The PrivateServiceConnect config for the extension.
-     * If specified, the service endpoints associated with the Extension should be
-     * registered in the provided Service Directory
+     * If specified, the service endpoints associated with the
+     * Extension should be registered with private network access in the provided
+     * Service Directory
      * (https://cloud.google.com/service-directory/docs/configuring-private-network-access).
+     *
+     * If the service contains more than one endpoint with a network, the service
+     * will arbitrarilty choose one of the endpoints to use for extension
+     * execution.
      * 
* * @@ -3620,9 +3650,14 @@ public Builder setPrivateServiceConnectConfig( * *
      * Optional. The PrivateServiceConnect config for the extension.
-     * If specified, the service endpoints associated with the Extension should be
-     * registered in the provided Service Directory
+     * If specified, the service endpoints associated with the
+     * Extension should be registered with private network access in the provided
+     * Service Directory
      * (https://cloud.google.com/service-directory/docs/configuring-private-network-access).
+     *
+     * If the service contains more than one endpoint with a network, the service
+     * will arbitrarilty choose one of the endpoints to use for extension
+     * execution.
      * 
* * @@ -3646,9 +3681,14 @@ public Builder setPrivateServiceConnectConfig( * *
      * Optional. The PrivateServiceConnect config for the extension.
-     * If specified, the service endpoints associated with the Extension should be
-     * registered in the provided Service Directory
+     * If specified, the service endpoints associated with the
+     * Extension should be registered with private network access in the provided
+     * Service Directory
      * (https://cloud.google.com/service-directory/docs/configuring-private-network-access).
+     *
+     * If the service contains more than one endpoint with a network, the service
+     * will arbitrarilty choose one of the endpoints to use for extension
+     * execution.
      * 
* * @@ -3681,9 +3721,14 @@ public Builder mergePrivateServiceConnectConfig( * *
      * Optional. The PrivateServiceConnect config for the extension.
-     * If specified, the service endpoints associated with the Extension should be
-     * registered in the provided Service Directory
+     * If specified, the service endpoints associated with the
+     * Extension should be registered with private network access in the provided
+     * Service Directory
      * (https://cloud.google.com/service-directory/docs/configuring-private-network-access).
+     *
+     * If the service contains more than one endpoint with a network, the service
+     * will arbitrarilty choose one of the endpoints to use for extension
+     * execution.
      * 
* * @@ -3705,9 +3750,14 @@ public Builder clearPrivateServiceConnectConfig() { * *
      * Optional. The PrivateServiceConnect config for the extension.
-     * If specified, the service endpoints associated with the Extension should be
-     * registered in the provided Service Directory
+     * If specified, the service endpoints associated with the
+     * Extension should be registered with private network access in the provided
+     * Service Directory
      * (https://cloud.google.com/service-directory/docs/configuring-private-network-access).
+     *
+     * If the service contains more than one endpoint with a network, the service
+     * will arbitrarilty choose one of the endpoints to use for extension
+     * execution.
      * 
* * @@ -3725,9 +3775,14 @@ public Builder clearPrivateServiceConnectConfig() { * *
      * Optional. The PrivateServiceConnect config for the extension.
-     * If specified, the service endpoints associated with the Extension should be
-     * registered in the provided Service Directory
+     * If specified, the service endpoints associated with the
+     * Extension should be registered with private network access in the provided
+     * Service Directory
      * (https://cloud.google.com/service-directory/docs/configuring-private-network-access).
+     *
+     * If the service contains more than one endpoint with a network, the service
+     * will arbitrarilty choose one of the endpoints to use for extension
+     * execution.
      * 
* * @@ -3750,9 +3805,14 @@ public Builder clearPrivateServiceConnectConfig() { * *
      * Optional. The PrivateServiceConnect config for the extension.
-     * If specified, the service endpoints associated with the Extension should be
-     * registered in the provided Service Directory
+     * If specified, the service endpoints associated with the
+     * Extension should be registered with private network access in the provided
+     * Service Directory
      * (https://cloud.google.com/service-directory/docs/configuring-private-network-access).
+     *
+     * If the service contains more than one endpoint with a network, the service
+     * will arbitrarilty choose one of the endpoints to use for extension
+     * execution.
      * 
* * diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ExtensionOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ExtensionOrBuilder.java index ca8a393b296e..c7761b9891c5 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ExtensionOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ExtensionOrBuilder.java @@ -423,9 +423,14 @@ com.google.cloud.aiplatform.v1beta1.ToolUseExampleOrBuilder getToolUseExamplesOr * *
    * Optional. The PrivateServiceConnect config for the extension.
-   * If specified, the service endpoints associated with the Extension should be
-   * registered in the provided Service Directory
+   * If specified, the service endpoints associated with the
+   * Extension should be registered with private network access in the provided
+   * Service Directory
    * (https://cloud.google.com/service-directory/docs/configuring-private-network-access).
+   *
+   * If the service contains more than one endpoint with a network, the service
+   * will arbitrarilty choose one of the endpoints to use for extension
+   * execution.
    * 
* * @@ -440,9 +445,14 @@ com.google.cloud.aiplatform.v1beta1.ToolUseExampleOrBuilder getToolUseExamplesOr * *
    * Optional. The PrivateServiceConnect config for the extension.
-   * If specified, the service endpoints associated with the Extension should be
-   * registered in the provided Service Directory
+   * If specified, the service endpoints associated with the
+   * Extension should be registered with private network access in the provided
+   * Service Directory
    * (https://cloud.google.com/service-directory/docs/configuring-private-network-access).
+   *
+   * If the service contains more than one endpoint with a network, the service
+   * will arbitrarilty choose one of the endpoints to use for extension
+   * execution.
    * 
* * @@ -458,9 +468,14 @@ com.google.cloud.aiplatform.v1beta1.ToolUseExampleOrBuilder getToolUseExamplesOr * *
    * Optional. The PrivateServiceConnect config for the extension.
-   * If specified, the service endpoints associated with the Extension should be
-   * registered in the provided Service Directory
+   * If specified, the service endpoints associated with the
+   * Extension should be registered with private network access in the provided
+   * Service Directory
    * (https://cloud.google.com/service-directory/docs/configuring-private-network-access).
+   *
+   * If the service contains more than one endpoint with a network, the service
+   * will arbitrarilty choose one of the endpoints to use for extension
+   * execution.
    * 
* * diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ExtensionProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ExtensionProto.java index ddd8277fa30a..7ab4c47cd07f 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ExtensionProto.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ExtensionProto.java @@ -48,10 +48,6 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_aiplatform_v1beta1_AuthConfig_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_aiplatform_v1beta1_AuthConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_aiplatform_v1beta1_AuthConfig_NoAuth_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_aiplatform_v1beta1_AuthConfig_NoAuth_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_aiplatform_v1beta1_AuthConfig_ApiKeyConfig_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -133,7 +129,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\n\n\010api_spec\"\203\001\n\022ExtensionOperation\022\024\n\014op" + "eration_id\030\001 \001(\t\022W\n\024function_declaration" + "\030\003 \001(\01324.google.cloud.aiplatform.v1beta1" - + ".FunctionDeclarationB\003\340A\003\"\265\010\n\nAuthConfig" + + ".FunctionDeclarationB\003\340A\003\"\253\010\n\nAuthConfig" + "\022R\n\016api_key_config\030\002 \001(\01328.google.cloud." + "aiplatform.v1beta1.AuthConfig.ApiKeyConf" + "igH\000\022a\n\026http_basic_auth_config\030\003 \001(\0132?.g" @@ -146,58 +142,58 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "fig.OauthConfigH\000\022M\n\013oidc_config\030\007 \001(\01326" + ".google.cloud.aiplatform.v1beta1.AuthCon" + "fig.OidcConfigH\000\022<\n\tauth_type\030e \001(\0162).go" - + "ogle.cloud.aiplatform.v1beta1.AuthType\032\010" - + "\n\006NoAuth\032\307\001\n\014ApiKeyConfig\022\021\n\004name\030\001 \001(\tB" - + "\003\340A\002\022J\n\016api_key_secret\030\002 \001(\tB2\340A\002\372A,\n*se" - + "cretmanager.googleapis.com/SecretVersion" - + "\022X\n\025http_element_location\030\003 \001(\01624.google" - + ".cloud.aiplatform.v1beta1.HttpElementLoc" - + "ationB\003\340A\002\032d\n\023HttpBasicAuthConfig\022M\n\021cre" - + "dential_secret\030\002 \001(\tB2\340A\002\372A,\n*secretmana" - + "ger.googleapis.com/SecretVersion\032:\n\032Goog" - + "leServiceAccountConfig\022\034\n\017service_accoun" - + "t\030\001 \001(\tB\003\340A\001\032P\n\013OauthConfig\022\026\n\014access_to" - + "ken\030\001 \001(\tH\000\022\031\n\017service_account\030\002 \001(\tH\000B\016" - + "\n\014oauth_config\032J\n\nOidcConfig\022\022\n\010id_token" - + "\030\001 \001(\tH\000\022\031\n\017service_account\030\002 \001(\tH\000B\r\n\013o" - + "idc_configB\r\n\013auth_config\"\201\004\n\rRuntimeCon" - + "fig\022v\n\037code_interpreter_runtime_config\030\002" - + " \001(\0132K.google.cloud.aiplatform.v1beta1.R" - + "untimeConfig.CodeInterpreterRuntimeConfi" - + "gH\000\022u\n\037vertex_ai_search_runtime_config\030\006" - + " \001(\0132J.google.cloud.aiplatform.v1beta1.R" - + "untimeConfig.VertexAISearchRuntimeConfig" - + "H\000\0224\n\016default_params\030\004 \001(\0132\027.google.prot" - + "obuf.StructB\003\340A\001\032g\n\034CodeInterpreterRunti" - + "meConfig\022\"\n\025file_input_gcs_bucket\030\001 \001(\tB" - + "\003\340A\001\022#\n\026file_output_gcs_bucket\030\002 \001(\tB\003\340A" - + "\001\032?\n\033VertexAISearchRuntimeConfig\022 \n\023serv" - + "ing_config_name\030\001 \001(\tB\003\340A\002B!\n\037GoogleFirs" - + "tPartyExtensionConfig\"r\n$ExtensionPrivat" - + "eServiceConnectConfig\022J\n\021service_directo" - + "ry\030\001 \001(\tB/\340A\002\372A)\n\'servicedirectory.googl" - + "eapis.com/Service*\215\001\n\023HttpElementLocatio" - + "n\022\027\n\023HTTP_IN_UNSPECIFIED\020\000\022\021\n\rHTTP_IN_QU" - + "ERY\020\001\022\022\n\016HTTP_IN_HEADER\020\002\022\020\n\014HTTP_IN_PAT" - + "H\020\003\022\020\n\014HTTP_IN_BODY\020\004\022\022\n\016HTTP_IN_COOKIE\020" - + "\005*\224\001\n\010AuthType\022\031\n\025AUTH_TYPE_UNSPECIFIED\020" - + "\000\022\013\n\007NO_AUTH\020\001\022\020\n\014API_KEY_AUTH\020\002\022\023\n\017HTTP" - + "_BASIC_AUTH\020\003\022\037\n\033GOOGLE_SERVICE_ACCOUNT_" - + "AUTH\020\004\022\t\n\005OAUTH\020\006\022\r\n\tOIDC_AUTH\020\010B\247\004\n#com" - + ".google.cloud.aiplatform.v1beta1B\016Extens" - + "ionProtoP\001ZCcloud.google.com/go/aiplatfo" - + "rm/apiv1beta1/aiplatformpb;aiplatformpb\252" - + "\002\037Google.Cloud.AIPlatform.V1Beta1\312\002\037Goog" - + "le\\Cloud\\AIPlatform\\V1beta1\352\002\"Google::Cl" - + "oud::AIPlatform::V1beta1\352A\277\001\n*secretmana" - + "ger.googleapis.com/SecretVersion\022=projec" - + "ts/{project}/secrets/{secret}/versions/{" - + "secret_version}\022Rprojects/{project}/loca" - + "tions/{location}/secrets/{secret}/versio" - + "ns/{secret_version}\352A|\n\'servicedirectory" - + ".googleapis.com/Service\022Qprojects/{proje" - + "ct}/locations/{location}/namespaces/{nam" - + "espace}/services/{service}b\006proto3" + + "ogle.cloud.aiplatform.v1beta1.AuthType\032\307" + + "\001\n\014ApiKeyConfig\022\021\n\004name\030\001 \001(\tB\003\340A\002\022J\n\016ap" + + "i_key_secret\030\002 \001(\tB2\340A\002\372A,\n*secretmanage" + + "r.googleapis.com/SecretVersion\022X\n\025http_e" + + "lement_location\030\003 \001(\01624.google.cloud.aip" + + "latform.v1beta1.HttpElementLocationB\003\340A\002" + + "\032d\n\023HttpBasicAuthConfig\022M\n\021credential_se" + + "cret\030\002 \001(\tB2\340A\002\372A,\n*secretmanager.google" + + "apis.com/SecretVersion\032:\n\032GoogleServiceA" + + "ccountConfig\022\034\n\017service_account\030\001 \001(\tB\003\340" + + "A\001\032P\n\013OauthConfig\022\026\n\014access_token\030\001 \001(\tH" + + "\000\022\031\n\017service_account\030\002 \001(\tH\000B\016\n\014oauth_co" + + "nfig\032J\n\nOidcConfig\022\022\n\010id_token\030\001 \001(\tH\000\022\031" + + "\n\017service_account\030\002 \001(\tH\000B\r\n\013oidc_config" + + "B\r\n\013auth_config\"\201\004\n\rRuntimeConfig\022v\n\037cod" + + "e_interpreter_runtime_config\030\002 \001(\0132K.goo" + + "gle.cloud.aiplatform.v1beta1.RuntimeConf" + + "ig.CodeInterpreterRuntimeConfigH\000\022u\n\037ver" + + "tex_ai_search_runtime_config\030\006 \001(\0132J.goo" + + "gle.cloud.aiplatform.v1beta1.RuntimeConf" + + "ig.VertexAISearchRuntimeConfigH\000\0224\n\016defa" + + "ult_params\030\004 \001(\0132\027.google.protobuf.Struc" + + "tB\003\340A\001\032g\n\034CodeInterpreterRuntimeConfig\022\"" + + "\n\025file_input_gcs_bucket\030\001 \001(\tB\003\340A\001\022#\n\026fi" + + "le_output_gcs_bucket\030\002 \001(\tB\003\340A\001\032?\n\033Verte" + + "xAISearchRuntimeConfig\022 \n\023serving_config" + + "_name\030\001 \001(\tB\003\340A\002B!\n\037GoogleFirstPartyExte" + + "nsionConfig\"r\n$ExtensionPrivateServiceCo" + + "nnectConfig\022J\n\021service_directory\030\001 \001(\tB/" + + "\340A\002\372A)\n\'servicedirectory.googleapis.com/" + + "Service*\215\001\n\023HttpElementLocation\022\027\n\023HTTP_" + + "IN_UNSPECIFIED\020\000\022\021\n\rHTTP_IN_QUERY\020\001\022\022\n\016H" + + "TTP_IN_HEADER\020\002\022\020\n\014HTTP_IN_PATH\020\003\022\020\n\014HTT" + + "P_IN_BODY\020\004\022\022\n\016HTTP_IN_COOKIE\020\005*\224\001\n\010Auth" + + "Type\022\031\n\025AUTH_TYPE_UNSPECIFIED\020\000\022\013\n\007NO_AU" + + "TH\020\001\022\020\n\014API_KEY_AUTH\020\002\022\023\n\017HTTP_BASIC_AUT" + + "H\020\003\022\037\n\033GOOGLE_SERVICE_ACCOUNT_AUTH\020\004\022\t\n\005" + + "OAUTH\020\006\022\r\n\tOIDC_AUTH\020\010B\247\004\n#com.google.cl" + + "oud.aiplatform.v1beta1B\016ExtensionProtoP\001" + + "ZCcloud.google.com/go/aiplatform/apiv1be" + + "ta1/aiplatformpb;aiplatformpb\252\002\037Google.C" + + "loud.AIPlatform.V1Beta1\312\002\037Google\\Cloud\\A" + + "IPlatform\\V1beta1\352\002\"Google::Cloud::AIPla" + + "tform::V1beta1\352A\277\001\n*secretmanager.google" + + "apis.com/SecretVersion\022=projects/{projec" + + "t}/secrets/{secret}/versions/{secret_ver" + + "sion}\022Rprojects/{project}/locations/{loc" + + "ation}/secrets/{secret}/versions/{secret" + + "_version}\352A|\n\'servicedirectory.googleapi" + + "s.com/Service\022Qprojects/{project}/locati" + + "ons/{location}/namespaces/{namespace}/se" + + "rvices/{service}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -267,18 +263,10 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "AuthType", "AuthConfig", }); - internal_static_google_cloud_aiplatform_v1beta1_AuthConfig_NoAuth_descriptor = - internal_static_google_cloud_aiplatform_v1beta1_AuthConfig_descriptor - .getNestedTypes() - .get(0); - internal_static_google_cloud_aiplatform_v1beta1_AuthConfig_NoAuth_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_aiplatform_v1beta1_AuthConfig_NoAuth_descriptor, - new java.lang.String[] {}); internal_static_google_cloud_aiplatform_v1beta1_AuthConfig_ApiKeyConfig_descriptor = internal_static_google_cloud_aiplatform_v1beta1_AuthConfig_descriptor .getNestedTypes() - .get(1); + .get(0); internal_static_google_cloud_aiplatform_v1beta1_AuthConfig_ApiKeyConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1beta1_AuthConfig_ApiKeyConfig_descriptor, @@ -288,7 +276,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { internal_static_google_cloud_aiplatform_v1beta1_AuthConfig_HttpBasicAuthConfig_descriptor = internal_static_google_cloud_aiplatform_v1beta1_AuthConfig_descriptor .getNestedTypes() - .get(2); + .get(1); internal_static_google_cloud_aiplatform_v1beta1_AuthConfig_HttpBasicAuthConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1beta1_AuthConfig_HttpBasicAuthConfig_descriptor, @@ -298,7 +286,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { internal_static_google_cloud_aiplatform_v1beta1_AuthConfig_GoogleServiceAccountConfig_descriptor = internal_static_google_cloud_aiplatform_v1beta1_AuthConfig_descriptor .getNestedTypes() - .get(3); + .get(2); internal_static_google_cloud_aiplatform_v1beta1_AuthConfig_GoogleServiceAccountConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1beta1_AuthConfig_GoogleServiceAccountConfig_descriptor, @@ -308,7 +296,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { internal_static_google_cloud_aiplatform_v1beta1_AuthConfig_OauthConfig_descriptor = internal_static_google_cloud_aiplatform_v1beta1_AuthConfig_descriptor .getNestedTypes() - .get(4); + .get(3); internal_static_google_cloud_aiplatform_v1beta1_AuthConfig_OauthConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1beta1_AuthConfig_OauthConfig_descriptor, @@ -318,7 +306,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { internal_static_google_cloud_aiplatform_v1beta1_AuthConfig_OidcConfig_descriptor = internal_static_google_cloud_aiplatform_v1beta1_AuthConfig_descriptor .getNestedTypes() - .get(5); + .get(4); internal_static_google_cloud_aiplatform_v1beta1_AuthConfig_OidcConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1beta1_AuthConfig_OidcConfig_descriptor, diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FeatureOnlineStore.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FeatureOnlineStore.java index 3b63b39e9a82..4187822916a1 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FeatureOnlineStore.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FeatureOnlineStore.java @@ -2401,10 +2401,8 @@ public interface DedicatedServingEndpointOrBuilder * *
    * The dedicated serving endpoint for this FeatureOnlineStore. Only need to
-   * set when you choose Optimized storage type or enable EmbeddingManagement.
-   * Will use public endpoint by default. Note, for EmbeddingManagement use
-   * case, only [DedicatedServingEndpoint.public_endpoint_domain_name] is
-   * available now.
+   * set when you choose Optimized storage type. Public endpoint is provisioned
+   * by default.
    * 
* * Protobuf type {@code @@ -2831,10 +2829,8 @@ protected Builder newBuilderForType( * *
      * The dedicated serving endpoint for this FeatureOnlineStore. Only need to
-     * set when you choose Optimized storage type or enable EmbeddingManagement.
-     * Will use public endpoint by default. Note, for EmbeddingManagement use
-     * case, only [DedicatedServingEndpoint.public_endpoint_domain_name] is
-     * available now.
+     * set when you choose Optimized storage type. Public endpoint is provisioned
+     * by default.
      * 
* * Protobuf type {@code @@ -3634,6 +3630,7 @@ public com.google.protobuf.Parser getParserForType() { } } + @java.lang.Deprecated public interface EmbeddingManagementOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.FeatureOnlineStore.EmbeddingManagement) @@ -3660,11 +3657,14 @@ public interface EmbeddingManagementOrBuilder * * *
+   * Deprecated: This sub message is no longer needed anymore and embedding
+   * management is automatically enabled when specifying Optimized storage type.
    * Contains settings for embedding management.
    * 
* * Protobuf type {@code google.cloud.aiplatform.v1beta1.FeatureOnlineStore.EmbeddingManagement} */ + @java.lang.Deprecated public static final class EmbeddingManagement extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.FeatureOnlineStore.EmbeddingManagement) @@ -3893,6 +3893,8 @@ protected Builder newBuilderForType( * * *
+     * Deprecated: This sub message is no longer needed anymore and embedding
+     * management is automatically enabled when specifying Optimized storage type.
      * Contains settings for embedding management.
      * 
* @@ -4847,16 +4849,20 @@ public boolean hasDedicatedServingEndpoint() { * * *
-   * Optional. The settings for embedding management in FeatureOnlineStore.
+   * Optional. Deprecated: This field is no longer needed anymore and embedding
+   * management is automatically enabled when specifying Optimized storage type.
    * 
* * - * .google.cloud.aiplatform.v1beta1.FeatureOnlineStore.EmbeddingManagement embedding_management = 11 [(.google.api.field_behavior) = OPTIONAL]; + * .google.cloud.aiplatform.v1beta1.FeatureOnlineStore.EmbeddingManagement embedding_management = 11 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; * * + * @deprecated google.cloud.aiplatform.v1beta1.FeatureOnlineStore.embedding_management is + * deprecated. See google/cloud/aiplatform/v1beta1/feature_online_store.proto;l=174 * @return Whether the embeddingManagement field is set. */ @java.lang.Override + @java.lang.Deprecated public boolean hasEmbeddingManagement() { return ((bitField0_ & 0x00000008) != 0); } @@ -4864,16 +4870,20 @@ public boolean hasEmbeddingManagement() { * * *
-   * Optional. The settings for embedding management in FeatureOnlineStore.
+   * Optional. Deprecated: This field is no longer needed anymore and embedding
+   * management is automatically enabled when specifying Optimized storage type.
    * 
* * - * .google.cloud.aiplatform.v1beta1.FeatureOnlineStore.EmbeddingManagement embedding_management = 11 [(.google.api.field_behavior) = OPTIONAL]; + * .google.cloud.aiplatform.v1beta1.FeatureOnlineStore.EmbeddingManagement embedding_management = 11 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; * * + * @deprecated google.cloud.aiplatform.v1beta1.FeatureOnlineStore.embedding_management is + * deprecated. See google/cloud/aiplatform/v1beta1/feature_online_store.proto;l=174 * @return The embeddingManagement. */ @java.lang.Override + @java.lang.Deprecated public com.google.cloud.aiplatform.v1beta1.FeatureOnlineStore.EmbeddingManagement getEmbeddingManagement() { return embeddingManagement_ == null @@ -4885,14 +4895,16 @@ public boolean hasEmbeddingManagement() { * * *
-   * Optional. The settings for embedding management in FeatureOnlineStore.
+   * Optional. Deprecated: This field is no longer needed anymore and embedding
+   * management is automatically enabled when specifying Optimized storage type.
    * 
* * - * .google.cloud.aiplatform.v1beta1.FeatureOnlineStore.EmbeddingManagement embedding_management = 11 [(.google.api.field_behavior) = OPTIONAL]; + * .google.cloud.aiplatform.v1beta1.FeatureOnlineStore.EmbeddingManagement embedding_management = 11 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override + @java.lang.Deprecated public com.google.cloud.aiplatform.v1beta1.FeatureOnlineStore.EmbeddingManagementOrBuilder getEmbeddingManagementOrBuilder() { return embeddingManagement_ == null @@ -7303,15 +7315,19 @@ public Builder clearDedicatedServingEndpoint() { * * *
-     * Optional. The settings for embedding management in FeatureOnlineStore.
+     * Optional. Deprecated: This field is no longer needed anymore and embedding
+     * management is automatically enabled when specifying Optimized storage type.
      * 
* * - * .google.cloud.aiplatform.v1beta1.FeatureOnlineStore.EmbeddingManagement embedding_management = 11 [(.google.api.field_behavior) = OPTIONAL]; + * .google.cloud.aiplatform.v1beta1.FeatureOnlineStore.EmbeddingManagement embedding_management = 11 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; * * + * @deprecated google.cloud.aiplatform.v1beta1.FeatureOnlineStore.embedding_management is + * deprecated. See google/cloud/aiplatform/v1beta1/feature_online_store.proto;l=174 * @return Whether the embeddingManagement field is set. */ + @java.lang.Deprecated public boolean hasEmbeddingManagement() { return ((bitField0_ & 0x00000200) != 0); } @@ -7319,15 +7335,19 @@ public boolean hasEmbeddingManagement() { * * *
-     * Optional. The settings for embedding management in FeatureOnlineStore.
+     * Optional. Deprecated: This field is no longer needed anymore and embedding
+     * management is automatically enabled when specifying Optimized storage type.
      * 
* * - * .google.cloud.aiplatform.v1beta1.FeatureOnlineStore.EmbeddingManagement embedding_management = 11 [(.google.api.field_behavior) = OPTIONAL]; + * .google.cloud.aiplatform.v1beta1.FeatureOnlineStore.EmbeddingManagement embedding_management = 11 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; * * + * @deprecated google.cloud.aiplatform.v1beta1.FeatureOnlineStore.embedding_management is + * deprecated. See google/cloud/aiplatform/v1beta1/feature_online_store.proto;l=174 * @return The embeddingManagement. */ + @java.lang.Deprecated public com.google.cloud.aiplatform.v1beta1.FeatureOnlineStore.EmbeddingManagement getEmbeddingManagement() { if (embeddingManagementBuilder_ == null) { @@ -7343,13 +7363,15 @@ public boolean hasEmbeddingManagement() { * * *
-     * Optional. The settings for embedding management in FeatureOnlineStore.
+     * Optional. Deprecated: This field is no longer needed anymore and embedding
+     * management is automatically enabled when specifying Optimized storage type.
      * 
* * - * .google.cloud.aiplatform.v1beta1.FeatureOnlineStore.EmbeddingManagement embedding_management = 11 [(.google.api.field_behavior) = OPTIONAL]; + * .google.cloud.aiplatform.v1beta1.FeatureOnlineStore.EmbeddingManagement embedding_management = 11 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; * */ + @java.lang.Deprecated public Builder setEmbeddingManagement( com.google.cloud.aiplatform.v1beta1.FeatureOnlineStore.EmbeddingManagement value) { if (embeddingManagementBuilder_ == null) { @@ -7368,13 +7390,15 @@ public Builder setEmbeddingManagement( * * *
-     * Optional. The settings for embedding management in FeatureOnlineStore.
+     * Optional. Deprecated: This field is no longer needed anymore and embedding
+     * management is automatically enabled when specifying Optimized storage type.
      * 
* * - * .google.cloud.aiplatform.v1beta1.FeatureOnlineStore.EmbeddingManagement embedding_management = 11 [(.google.api.field_behavior) = OPTIONAL]; + * .google.cloud.aiplatform.v1beta1.FeatureOnlineStore.EmbeddingManagement embedding_management = 11 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; * */ + @java.lang.Deprecated public Builder setEmbeddingManagement( com.google.cloud.aiplatform.v1beta1.FeatureOnlineStore.EmbeddingManagement.Builder builderForValue) { @@ -7391,13 +7415,15 @@ public Builder setEmbeddingManagement( * * *
-     * Optional. The settings for embedding management in FeatureOnlineStore.
+     * Optional. Deprecated: This field is no longer needed anymore and embedding
+     * management is automatically enabled when specifying Optimized storage type.
      * 
* * - * .google.cloud.aiplatform.v1beta1.FeatureOnlineStore.EmbeddingManagement embedding_management = 11 [(.google.api.field_behavior) = OPTIONAL]; + * .google.cloud.aiplatform.v1beta1.FeatureOnlineStore.EmbeddingManagement embedding_management = 11 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; * */ + @java.lang.Deprecated public Builder mergeEmbeddingManagement( com.google.cloud.aiplatform.v1beta1.FeatureOnlineStore.EmbeddingManagement value) { if (embeddingManagementBuilder_ == null) { @@ -7423,13 +7449,15 @@ public Builder mergeEmbeddingManagement( * * *
-     * Optional. The settings for embedding management in FeatureOnlineStore.
+     * Optional. Deprecated: This field is no longer needed anymore and embedding
+     * management is automatically enabled when specifying Optimized storage type.
      * 
* * - * .google.cloud.aiplatform.v1beta1.FeatureOnlineStore.EmbeddingManagement embedding_management = 11 [(.google.api.field_behavior) = OPTIONAL]; + * .google.cloud.aiplatform.v1beta1.FeatureOnlineStore.EmbeddingManagement embedding_management = 11 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; * */ + @java.lang.Deprecated public Builder clearEmbeddingManagement() { bitField0_ = (bitField0_ & ~0x00000200); embeddingManagement_ = null; @@ -7444,13 +7472,15 @@ public Builder clearEmbeddingManagement() { * * *
-     * Optional. The settings for embedding management in FeatureOnlineStore.
+     * Optional. Deprecated: This field is no longer needed anymore and embedding
+     * management is automatically enabled when specifying Optimized storage type.
      * 
* * - * .google.cloud.aiplatform.v1beta1.FeatureOnlineStore.EmbeddingManagement embedding_management = 11 [(.google.api.field_behavior) = OPTIONAL]; + * .google.cloud.aiplatform.v1beta1.FeatureOnlineStore.EmbeddingManagement embedding_management = 11 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; * */ + @java.lang.Deprecated public com.google.cloud.aiplatform.v1beta1.FeatureOnlineStore.EmbeddingManagement.Builder getEmbeddingManagementBuilder() { bitField0_ |= 0x00000200; @@ -7461,13 +7491,15 @@ public Builder clearEmbeddingManagement() { * * *
-     * Optional. The settings for embedding management in FeatureOnlineStore.
+     * Optional. Deprecated: This field is no longer needed anymore and embedding
+     * management is automatically enabled when specifying Optimized storage type.
      * 
* * - * .google.cloud.aiplatform.v1beta1.FeatureOnlineStore.EmbeddingManagement embedding_management = 11 [(.google.api.field_behavior) = OPTIONAL]; + * .google.cloud.aiplatform.v1beta1.FeatureOnlineStore.EmbeddingManagement embedding_management = 11 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; * */ + @java.lang.Deprecated public com.google.cloud.aiplatform.v1beta1.FeatureOnlineStore.EmbeddingManagementOrBuilder getEmbeddingManagementOrBuilder() { if (embeddingManagementBuilder_ != null) { @@ -7483,11 +7515,12 @@ public Builder clearEmbeddingManagement() { * * *
-     * Optional. The settings for embedding management in FeatureOnlineStore.
+     * Optional. Deprecated: This field is no longer needed anymore and embedding
+     * management is automatically enabled when specifying Optimized storage type.
      * 
* * - * .google.cloud.aiplatform.v1beta1.FeatureOnlineStore.EmbeddingManagement embedding_management = 11 [(.google.api.field_behavior) = OPTIONAL]; + * .google.cloud.aiplatform.v1beta1.FeatureOnlineStore.EmbeddingManagement embedding_management = 11 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; * */ private com.google.protobuf.SingleFieldBuilderV3< diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FeatureOnlineStoreOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FeatureOnlineStoreOrBuilder.java index f79488451bbc..61d614a87351 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FeatureOnlineStoreOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FeatureOnlineStoreOrBuilder.java @@ -429,42 +429,52 @@ java.lang.String getLabelsOrDefault( * * *
-   * Optional. The settings for embedding management in FeatureOnlineStore.
+   * Optional. Deprecated: This field is no longer needed anymore and embedding
+   * management is automatically enabled when specifying Optimized storage type.
    * 
* * - * .google.cloud.aiplatform.v1beta1.FeatureOnlineStore.EmbeddingManagement embedding_management = 11 [(.google.api.field_behavior) = OPTIONAL]; + * .google.cloud.aiplatform.v1beta1.FeatureOnlineStore.EmbeddingManagement embedding_management = 11 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; * * + * @deprecated google.cloud.aiplatform.v1beta1.FeatureOnlineStore.embedding_management is + * deprecated. See google/cloud/aiplatform/v1beta1/feature_online_store.proto;l=174 * @return Whether the embeddingManagement field is set. */ + @java.lang.Deprecated boolean hasEmbeddingManagement(); /** * * *
-   * Optional. The settings for embedding management in FeatureOnlineStore.
+   * Optional. Deprecated: This field is no longer needed anymore and embedding
+   * management is automatically enabled when specifying Optimized storage type.
    * 
* * - * .google.cloud.aiplatform.v1beta1.FeatureOnlineStore.EmbeddingManagement embedding_management = 11 [(.google.api.field_behavior) = OPTIONAL]; + * .google.cloud.aiplatform.v1beta1.FeatureOnlineStore.EmbeddingManagement embedding_management = 11 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; * * + * @deprecated google.cloud.aiplatform.v1beta1.FeatureOnlineStore.embedding_management is + * deprecated. See google/cloud/aiplatform/v1beta1/feature_online_store.proto;l=174 * @return The embeddingManagement. */ + @java.lang.Deprecated com.google.cloud.aiplatform.v1beta1.FeatureOnlineStore.EmbeddingManagement getEmbeddingManagement(); /** * * *
-   * Optional. The settings for embedding management in FeatureOnlineStore.
+   * Optional. Deprecated: This field is no longer needed anymore and embedding
+   * management is automatically enabled when specifying Optimized storage type.
    * 
* * - * .google.cloud.aiplatform.v1beta1.FeatureOnlineStore.EmbeddingManagement embedding_management = 11 [(.google.api.field_behavior) = OPTIONAL]; + * .google.cloud.aiplatform.v1beta1.FeatureOnlineStore.EmbeddingManagement embedding_management = 11 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; * */ + @java.lang.Deprecated com.google.cloud.aiplatform.v1beta1.FeatureOnlineStore.EmbeddingManagementOrBuilder getEmbeddingManagementOrBuilder(); diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FeatureOnlineStoreProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FeatureOnlineStoreProto.java index 719e23077c13..2aa4b535e646 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FeatureOnlineStoreProto.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FeatureOnlineStoreProto.java @@ -71,7 +71,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + ".proto\032\031google/api/resource.proto\0328googl" + "e/cloud/aiplatform/v1beta1/service_netwo" + "rking.proto\032\037google/protobuf/timestamp.p" - + "roto\"\306\013\n\022FeatureOnlineStore\022P\n\010bigtable\030" + + "roto\"\314\013\n\022FeatureOnlineStore\022P\n\010bigtable\030" + "\010 \001(\0132<.google.cloud.aiplatform.v1beta1." + "FeatureOnlineStore.BigtableH\000\022R\n\toptimiz" + "ed\030\014 \001(\0132=.google.cloud.aiplatform.v1bet" @@ -86,35 +86,35 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "reOnlineStore.StateB\003\340A\003\022u\n\032dedicated_se" + "rving_endpoint\030\n \001(\0132L.google.cloud.aipl" + "atform.v1beta1.FeatureOnlineStore.Dedica" - + "tedServingEndpointB\003\340A\001\022j\n\024embedding_man" + + "tedServingEndpointB\003\340A\001\022l\n\024embedding_man" + "agement\030\013 \001(\0132G.google.cloud.aiplatform." + "v1beta1.FeatureOnlineStore.EmbeddingMana" - + "gementB\003\340A\001\032\335\001\n\010Bigtable\022c\n\014auto_scaling" - + "\030\001 \001(\0132H.google.cloud.aiplatform.v1beta1" - + ".FeatureOnlineStore.Bigtable.AutoScaling" - + "B\003\340A\002\032l\n\013AutoScaling\022\033\n\016min_node_count\030\001" - + " \001(\005B\003\340A\002\022\033\n\016max_node_count\030\002 \001(\005B\003\340A\002\022#" - + "\n\026cpu_utilization_target\030\003 \001(\005B\003\340A\001\032\013\n\tO" - + "ptimized\032\320\001\n\030DedicatedServingEndpoint\022(\n" - + "\033public_endpoint_domain_name\030\002 \001(\tB\003\340A\003\022" - + "i\n\036private_service_connect_config\030\003 \001(\0132" - + "<.google.cloud.aiplatform.v1beta1.Privat" - + "eServiceConnectConfigB\003\340A\001\022\037\n\022service_at" - + "tachment\030\004 \001(\tB\003\340A\003\032.\n\023EmbeddingManageme" - + "nt\022\027\n\007enabled\030\001 \001(\010B\006\340A\001\340A\005\032-\n\013LabelsEnt" - + "ry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"8\n\005St" - + "ate\022\025\n\021STATE_UNSPECIFIED\020\000\022\n\n\006STABLE\020\001\022\014" - + "\n\010UPDATING\020\002:\206\001\352A\202\001\n,aiplatform.googleap" - + "is.com/FeatureOnlineStore\022Rprojects/{pro" - + "ject}/locations/{location}/featureOnline" - + "Stores/{feature_online_store}B\016\n\014storage" - + "_typeB\356\001\n#com.google.cloud.aiplatform.v1" - + "beta1B\027FeatureOnlineStoreProtoP\001ZCcloud." - + "google.com/go/aiplatform/apiv1beta1/aipl" - + "atformpb;aiplatformpb\252\002\037Google.Cloud.AIP" - + "latform.V1Beta1\312\002\037Google\\Cloud\\AIPlatfor" - + "m\\V1beta1\352\002\"Google::Cloud::AIPlatform::V" - + "1beta1b\006proto3" + + "gementB\005\030\001\340A\001\032\335\001\n\010Bigtable\022c\n\014auto_scali" + + "ng\030\001 \001(\0132H.google.cloud.aiplatform.v1bet" + + "a1.FeatureOnlineStore.Bigtable.AutoScali" + + "ngB\003\340A\002\032l\n\013AutoScaling\022\033\n\016min_node_count" + + "\030\001 \001(\005B\003\340A\002\022\033\n\016max_node_count\030\002 \001(\005B\003\340A\002" + + "\022#\n\026cpu_utilization_target\030\003 \001(\005B\003\340A\001\032\013\n" + + "\tOptimized\032\320\001\n\030DedicatedServingEndpoint\022" + + "(\n\033public_endpoint_domain_name\030\002 \001(\tB\003\340A" + + "\003\022i\n\036private_service_connect_config\030\003 \001(" + + "\0132<.google.cloud.aiplatform.v1beta1.Priv" + + "ateServiceConnectConfigB\003\340A\001\022\037\n\022service_" + + "attachment\030\004 \001(\tB\003\340A\003\0322\n\023EmbeddingManage" + + "ment\022\027\n\007enabled\030\001 \001(\010B\006\340A\001\340A\005:\002\030\001\032-\n\013Lab" + + "elsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001" + + "\"8\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\n\n\006STAB" + + "LE\020\001\022\014\n\010UPDATING\020\002:\206\001\352A\202\001\n,aiplatform.go" + + "ogleapis.com/FeatureOnlineStore\022Rproject" + + "s/{project}/locations/{location}/feature" + + "OnlineStores/{feature_online_store}B\016\n\014s" + + "torage_typeB\356\001\n#com.google.cloud.aiplatf" + + "orm.v1beta1B\027FeatureOnlineStoreProtoP\001ZC" + + "cloud.google.com/go/aiplatform/apiv1beta" + + "1/aiplatformpb;aiplatformpb\252\002\037Google.Clo" + + "ud.AIPlatform.V1Beta1\312\002\037Google\\Cloud\\AIP" + + "latform\\V1beta1\352\002\"Google::Cloud::AIPlatf" + + "orm::V1beta1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FeatureView.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FeatureView.java index e644c19b1837..3c7b3c3aad7b 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FeatureView.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FeatureView.java @@ -2112,9 +2112,14 @@ public interface VectorSearchConfigOrBuilder * *
      * Optional. Column of crowding. This column contains crowding attribute
-     * which is a constraint on a neighbor list produced by nearest neighbor
-     * search requiring that no more than some value k' of the k neighbors
-     * returned have the same value of crowding_attribute.
+     * which is a constraint on a neighbor list produced by
+     * [FeatureOnlineStoreService.SearchNearestEntities][google.cloud.aiplatform.v1beta1.FeatureOnlineStoreService.SearchNearestEntities]
+     * to diversify search results. If
+     * [NearestNeighborQuery.per_crowding_attribute_neighbor_count][google.cloud.aiplatform.v1beta1.NearestNeighborQuery.per_crowding_attribute_neighbor_count]
+     * is set to K in
+     * [SearchNearestEntitiesRequest][google.cloud.aiplatform.v1beta1.SearchNearestEntitiesRequest],
+     * it's guaranteed that no more than K entities of the same crowding
+     * attribute are returned in the response.
      * 
* * string crowding_column = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -2127,9 +2132,14 @@ public interface VectorSearchConfigOrBuilder * *
      * Optional. Column of crowding. This column contains crowding attribute
-     * which is a constraint on a neighbor list produced by nearest neighbor
-     * search requiring that no more than some value k' of the k neighbors
-     * returned have the same value of crowding_attribute.
+     * which is a constraint on a neighbor list produced by
+     * [FeatureOnlineStoreService.SearchNearestEntities][google.cloud.aiplatform.v1beta1.FeatureOnlineStoreService.SearchNearestEntities]
+     * to diversify search results. If
+     * [NearestNeighborQuery.per_crowding_attribute_neighbor_count][google.cloud.aiplatform.v1beta1.NearestNeighborQuery.per_crowding_attribute_neighbor_count]
+     * is set to K in
+     * [SearchNearestEntitiesRequest][google.cloud.aiplatform.v1beta1.SearchNearestEntitiesRequest],
+     * it's guaranteed that no more than K entities of the same crowding
+     * attribute are returned in the response.
      * 
* * string crowding_column = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -3869,9 +3879,14 @@ public com.google.protobuf.ByteString getFilterColumnsBytes(int index) { * *
      * Optional. Column of crowding. This column contains crowding attribute
-     * which is a constraint on a neighbor list produced by nearest neighbor
-     * search requiring that no more than some value k' of the k neighbors
-     * returned have the same value of crowding_attribute.
+     * which is a constraint on a neighbor list produced by
+     * [FeatureOnlineStoreService.SearchNearestEntities][google.cloud.aiplatform.v1beta1.FeatureOnlineStoreService.SearchNearestEntities]
+     * to diversify search results. If
+     * [NearestNeighborQuery.per_crowding_attribute_neighbor_count][google.cloud.aiplatform.v1beta1.NearestNeighborQuery.per_crowding_attribute_neighbor_count]
+     * is set to K in
+     * [SearchNearestEntitiesRequest][google.cloud.aiplatform.v1beta1.SearchNearestEntitiesRequest],
+     * it's guaranteed that no more than K entities of the same crowding
+     * attribute are returned in the response.
      * 
* * string crowding_column = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -3895,9 +3910,14 @@ public java.lang.String getCrowdingColumn() { * *
      * Optional. Column of crowding. This column contains crowding attribute
-     * which is a constraint on a neighbor list produced by nearest neighbor
-     * search requiring that no more than some value k' of the k neighbors
-     * returned have the same value of crowding_attribute.
+     * which is a constraint on a neighbor list produced by
+     * [FeatureOnlineStoreService.SearchNearestEntities][google.cloud.aiplatform.v1beta1.FeatureOnlineStoreService.SearchNearestEntities]
+     * to diversify search results. If
+     * [NearestNeighborQuery.per_crowding_attribute_neighbor_count][google.cloud.aiplatform.v1beta1.NearestNeighborQuery.per_crowding_attribute_neighbor_count]
+     * is set to K in
+     * [SearchNearestEntitiesRequest][google.cloud.aiplatform.v1beta1.SearchNearestEntitiesRequest],
+     * it's guaranteed that no more than K entities of the same crowding
+     * attribute are returned in the response.
      * 
* * string crowding_column = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -5452,9 +5472,14 @@ public Builder addFilterColumnsBytes(com.google.protobuf.ByteString value) { * *
        * Optional. Column of crowding. This column contains crowding attribute
-       * which is a constraint on a neighbor list produced by nearest neighbor
-       * search requiring that no more than some value k' of the k neighbors
-       * returned have the same value of crowding_attribute.
+       * which is a constraint on a neighbor list produced by
+       * [FeatureOnlineStoreService.SearchNearestEntities][google.cloud.aiplatform.v1beta1.FeatureOnlineStoreService.SearchNearestEntities]
+       * to diversify search results. If
+       * [NearestNeighborQuery.per_crowding_attribute_neighbor_count][google.cloud.aiplatform.v1beta1.NearestNeighborQuery.per_crowding_attribute_neighbor_count]
+       * is set to K in
+       * [SearchNearestEntitiesRequest][google.cloud.aiplatform.v1beta1.SearchNearestEntitiesRequest],
+       * it's guaranteed that no more than K entities of the same crowding
+       * attribute are returned in the response.
        * 
* * string crowding_column = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -5477,9 +5502,14 @@ public java.lang.String getCrowdingColumn() { * *
        * Optional. Column of crowding. This column contains crowding attribute
-       * which is a constraint on a neighbor list produced by nearest neighbor
-       * search requiring that no more than some value k' of the k neighbors
-       * returned have the same value of crowding_attribute.
+       * which is a constraint on a neighbor list produced by
+       * [FeatureOnlineStoreService.SearchNearestEntities][google.cloud.aiplatform.v1beta1.FeatureOnlineStoreService.SearchNearestEntities]
+       * to diversify search results. If
+       * [NearestNeighborQuery.per_crowding_attribute_neighbor_count][google.cloud.aiplatform.v1beta1.NearestNeighborQuery.per_crowding_attribute_neighbor_count]
+       * is set to K in
+       * [SearchNearestEntitiesRequest][google.cloud.aiplatform.v1beta1.SearchNearestEntitiesRequest],
+       * it's guaranteed that no more than K entities of the same crowding
+       * attribute are returned in the response.
        * 
* * string crowding_column = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -5502,9 +5532,14 @@ public com.google.protobuf.ByteString getCrowdingColumnBytes() { * *
        * Optional. Column of crowding. This column contains crowding attribute
-       * which is a constraint on a neighbor list produced by nearest neighbor
-       * search requiring that no more than some value k' of the k neighbors
-       * returned have the same value of crowding_attribute.
+       * which is a constraint on a neighbor list produced by
+       * [FeatureOnlineStoreService.SearchNearestEntities][google.cloud.aiplatform.v1beta1.FeatureOnlineStoreService.SearchNearestEntities]
+       * to diversify search results. If
+       * [NearestNeighborQuery.per_crowding_attribute_neighbor_count][google.cloud.aiplatform.v1beta1.NearestNeighborQuery.per_crowding_attribute_neighbor_count]
+       * is set to K in
+       * [SearchNearestEntitiesRequest][google.cloud.aiplatform.v1beta1.SearchNearestEntitiesRequest],
+       * it's guaranteed that no more than K entities of the same crowding
+       * attribute are returned in the response.
        * 
* * string crowding_column = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -5526,9 +5561,14 @@ public Builder setCrowdingColumn(java.lang.String value) { * *
        * Optional. Column of crowding. This column contains crowding attribute
-       * which is a constraint on a neighbor list produced by nearest neighbor
-       * search requiring that no more than some value k' of the k neighbors
-       * returned have the same value of crowding_attribute.
+       * which is a constraint on a neighbor list produced by
+       * [FeatureOnlineStoreService.SearchNearestEntities][google.cloud.aiplatform.v1beta1.FeatureOnlineStoreService.SearchNearestEntities]
+       * to diversify search results. If
+       * [NearestNeighborQuery.per_crowding_attribute_neighbor_count][google.cloud.aiplatform.v1beta1.NearestNeighborQuery.per_crowding_attribute_neighbor_count]
+       * is set to K in
+       * [SearchNearestEntitiesRequest][google.cloud.aiplatform.v1beta1.SearchNearestEntitiesRequest],
+       * it's guaranteed that no more than K entities of the same crowding
+       * attribute are returned in the response.
        * 
* * string crowding_column = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -5546,9 +5586,14 @@ public Builder clearCrowdingColumn() { * *
        * Optional. Column of crowding. This column contains crowding attribute
-       * which is a constraint on a neighbor list produced by nearest neighbor
-       * search requiring that no more than some value k' of the k neighbors
-       * returned have the same value of crowding_attribute.
+       * which is a constraint on a neighbor list produced by
+       * [FeatureOnlineStoreService.SearchNearestEntities][google.cloud.aiplatform.v1beta1.FeatureOnlineStoreService.SearchNearestEntities]
+       * to diversify search results. If
+       * [NearestNeighborQuery.per_crowding_attribute_neighbor_count][google.cloud.aiplatform.v1beta1.NearestNeighborQuery.per_crowding_attribute_neighbor_count]
+       * is set to K in
+       * [SearchNearestEntitiesRequest][google.cloud.aiplatform.v1beta1.SearchNearestEntitiesRequest],
+       * it's guaranteed that no more than K entities of the same crowding
+       * attribute are returned in the response.
        * 
* * string crowding_column = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -5814,6 +5859,3906 @@ public com.google.protobuf.Parser getParserForType() { } } + public interface IndexConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Optional. Configuration options for the tree-AH algorithm (Shallow tree
+     * + Asymmetric Hashing). Please refer to this paper for more details:
+     * https://arxiv.org/abs/1908.10396
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig tree_ah_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the treeAhConfig field is set. + */ + boolean hasTreeAhConfig(); + /** + * + * + *
+     * Optional. Configuration options for the tree-AH algorithm (Shallow tree
+     * + Asymmetric Hashing). Please refer to this paper for more details:
+     * https://arxiv.org/abs/1908.10396
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig tree_ah_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The treeAhConfig. + */ + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig getTreeAhConfig(); + /** + * + * + *
+     * Optional. Configuration options for the tree-AH algorithm (Shallow tree
+     * + Asymmetric Hashing). Please refer to this paper for more details:
+     * https://arxiv.org/abs/1908.10396
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig tree_ah_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfigOrBuilder + getTreeAhConfigOrBuilder(); + + /** + * + * + *
+     * Optional. Configuration options for using brute force search, which
+     * simply implements the standard linear search in the database for each
+     * query. It is primarily meant for benchmarking and to generate the
+     * ground truth for approximate search.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig brute_force_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the bruteForceConfig field is set. + */ + boolean hasBruteForceConfig(); + /** + * + * + *
+     * Optional. Configuration options for using brute force search, which
+     * simply implements the standard linear search in the database for each
+     * query. It is primarily meant for benchmarking and to generate the
+     * ground truth for approximate search.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig brute_force_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The bruteForceConfig. + */ + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig + getBruteForceConfig(); + /** + * + * + *
+     * Optional. Configuration options for using brute force search, which
+     * simply implements the standard linear search in the database for each
+     * query. It is primarily meant for benchmarking and to generate the
+     * ground truth for approximate search.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig brute_force_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfigOrBuilder + getBruteForceConfigOrBuilder(); + + /** + * + * + *
+     * Optional. Column of embedding. This column contains the source data to
+     * create index for vector search. embedding_column must be set when using
+     * vector search.
+     * 
+ * + * string embedding_column = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The embeddingColumn. + */ + java.lang.String getEmbeddingColumn(); + /** + * + * + *
+     * Optional. Column of embedding. This column contains the source data to
+     * create index for vector search. embedding_column must be set when using
+     * vector search.
+     * 
+ * + * string embedding_column = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for embeddingColumn. + */ + com.google.protobuf.ByteString getEmbeddingColumnBytes(); + + /** + * + * + *
+     * Optional. Columns of features that're used to filter vector search
+     * results.
+     * 
+ * + * repeated string filter_columns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the filterColumns. + */ + java.util.List getFilterColumnsList(); + /** + * + * + *
+     * Optional. Columns of features that're used to filter vector search
+     * results.
+     * 
+ * + * repeated string filter_columns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of filterColumns. + */ + int getFilterColumnsCount(); + /** + * + * + *
+     * Optional. Columns of features that're used to filter vector search
+     * results.
+     * 
+ * + * repeated string filter_columns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The filterColumns at the given index. + */ + java.lang.String getFilterColumns(int index); + /** + * + * + *
+     * Optional. Columns of features that're used to filter vector search
+     * results.
+     * 
+ * + * repeated string filter_columns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the filterColumns at the given index. + */ + com.google.protobuf.ByteString getFilterColumnsBytes(int index); + + /** + * + * + *
+     * Optional. Column of crowding. This column contains crowding attribute
+     * which is a constraint on a neighbor list produced by
+     * [FeatureOnlineStoreService.SearchNearestEntities][google.cloud.aiplatform.v1beta1.FeatureOnlineStoreService.SearchNearestEntities]
+     * to diversify search results. If
+     * [NearestNeighborQuery.per_crowding_attribute_neighbor_count][google.cloud.aiplatform.v1beta1.NearestNeighborQuery.per_crowding_attribute_neighbor_count]
+     * is set to K in
+     * [SearchNearestEntitiesRequest][google.cloud.aiplatform.v1beta1.SearchNearestEntitiesRequest],
+     * it's guaranteed that no more than K entities of the same crowding
+     * attribute are returned in the response.
+     * 
+ * + * string crowding_column = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The crowdingColumn. + */ + java.lang.String getCrowdingColumn(); + /** + * + * + *
+     * Optional. Column of crowding. This column contains crowding attribute
+     * which is a constraint on a neighbor list produced by
+     * [FeatureOnlineStoreService.SearchNearestEntities][google.cloud.aiplatform.v1beta1.FeatureOnlineStoreService.SearchNearestEntities]
+     * to diversify search results. If
+     * [NearestNeighborQuery.per_crowding_attribute_neighbor_count][google.cloud.aiplatform.v1beta1.NearestNeighborQuery.per_crowding_attribute_neighbor_count]
+     * is set to K in
+     * [SearchNearestEntitiesRequest][google.cloud.aiplatform.v1beta1.SearchNearestEntitiesRequest],
+     * it's guaranteed that no more than K entities of the same crowding
+     * attribute are returned in the response.
+     * 
+ * + * string crowding_column = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for crowdingColumn. + */ + com.google.protobuf.ByteString getCrowdingColumnBytes(); + + /** + * + * + *
+     * Optional. The number of dimensions of the input embedding.
+     * 
+ * + * optional int32 embedding_dimension = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the embeddingDimension field is set. + */ + boolean hasEmbeddingDimension(); + /** + * + * + *
+     * Optional. The number of dimensions of the input embedding.
+     * 
+ * + * optional int32 embedding_dimension = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The embeddingDimension. + */ + int getEmbeddingDimension(); + + /** + * + * + *
+     * Optional. The distance measure used in nearest neighbor search.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.DistanceMeasureType distance_measure_type = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for distanceMeasureType. + */ + int getDistanceMeasureTypeValue(); + /** + * + * + *
+     * Optional. The distance measure used in nearest neighbor search.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.DistanceMeasureType distance_measure_type = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The distanceMeasureType. + */ + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.DistanceMeasureType + getDistanceMeasureType(); + + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.AlgorithmConfigCase + getAlgorithmConfigCase(); + } + /** + * + * + *
+   * Configuration for vector indexing.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig} + */ + public static final class IndexConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig) + IndexConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use IndexConfig.newBuilder() to construct. + private IndexConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private IndexConfig() { + embeddingColumn_ = ""; + filterColumns_ = com.google.protobuf.LazyStringArrayList.emptyList(); + crowdingColumn_ = ""; + distanceMeasureType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new IndexConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.FeatureViewProto + .internal_static_google_cloud_aiplatform_v1beta1_FeatureView_IndexConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.FeatureViewProto + .internal_static_google_cloud_aiplatform_v1beta1_FeatureView_IndexConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.class, + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.Builder.class); + } + + /** + * + * + *
+     * The distance measure used in nearest neighbor search.
+     * 
+ * + * Protobuf enum {@code + * google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.DistanceMeasureType} + */ + public enum DistanceMeasureType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Should not be set.
+       * 
+ * + * DISTANCE_MEASURE_TYPE_UNSPECIFIED = 0; + */ + DISTANCE_MEASURE_TYPE_UNSPECIFIED(0), + /** + * + * + *
+       * Euclidean (L_2) Distance.
+       * 
+ * + * SQUARED_L2_DISTANCE = 1; + */ + SQUARED_L2_DISTANCE(1), + /** + * + * + *
+       * Cosine Distance. Defined as 1 - cosine similarity.
+       *
+       * We strongly suggest using DOT_PRODUCT_DISTANCE + UNIT_L2_NORM instead
+       * of COSINE distance. Our algorithms have been more optimized for
+       * DOT_PRODUCT distance which, when combined with UNIT_L2_NORM, is
+       * mathematically equivalent to COSINE distance and results in the same
+       * ranking.
+       * 
+ * + * COSINE_DISTANCE = 2; + */ + COSINE_DISTANCE(2), + /** + * + * + *
+       * Dot Product Distance. Defined as a negative of the dot product.
+       * 
+ * + * DOT_PRODUCT_DISTANCE = 3; + */ + DOT_PRODUCT_DISTANCE(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * Should not be set.
+       * 
+ * + * DISTANCE_MEASURE_TYPE_UNSPECIFIED = 0; + */ + public static final int DISTANCE_MEASURE_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * Euclidean (L_2) Distance.
+       * 
+ * + * SQUARED_L2_DISTANCE = 1; + */ + public static final int SQUARED_L2_DISTANCE_VALUE = 1; + /** + * + * + *
+       * Cosine Distance. Defined as 1 - cosine similarity.
+       *
+       * We strongly suggest using DOT_PRODUCT_DISTANCE + UNIT_L2_NORM instead
+       * of COSINE distance. Our algorithms have been more optimized for
+       * DOT_PRODUCT distance which, when combined with UNIT_L2_NORM, is
+       * mathematically equivalent to COSINE distance and results in the same
+       * ranking.
+       * 
+ * + * COSINE_DISTANCE = 2; + */ + public static final int COSINE_DISTANCE_VALUE = 2; + /** + * + * + *
+       * Dot Product Distance. Defined as a negative of the dot product.
+       * 
+ * + * DOT_PRODUCT_DISTANCE = 3; + */ + public static final int DOT_PRODUCT_DISTANCE_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DistanceMeasureType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static DistanceMeasureType forNumber(int value) { + switch (value) { + case 0: + return DISTANCE_MEASURE_TYPE_UNSPECIFIED; + case 1: + return SQUARED_L2_DISTANCE; + case 2: + return COSINE_DISTANCE; + case 3: + return DOT_PRODUCT_DISTANCE; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public DistanceMeasureType findValueByNumber(int number) { + return DistanceMeasureType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final DistanceMeasureType[] VALUES = values(); + + public static DistanceMeasureType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private DistanceMeasureType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.DistanceMeasureType) + } + + public interface BruteForceConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig) + com.google.protobuf.MessageOrBuilder {} + /** + * + * + *
+     * Configuration options for using brute force search.
+     * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig} + */ + public static final class BruteForceConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig) + BruteForceConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use BruteForceConfig.newBuilder() to construct. + private BruteForceConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BruteForceConfig() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BruteForceConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.FeatureViewProto + .internal_static_google_cloud_aiplatform_v1beta1_FeatureView_IndexConfig_BruteForceConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.FeatureViewProto + .internal_static_google_cloud_aiplatform_v1beta1_FeatureView_IndexConfig_BruteForceConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig.class, + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig.Builder + .class); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig other = + (com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * Configuration options for using brute force search.
+       * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig) + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.FeatureViewProto + .internal_static_google_cloud_aiplatform_v1beta1_FeatureView_IndexConfig_BruteForceConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.FeatureViewProto + .internal_static_google_cloud_aiplatform_v1beta1_FeatureView_IndexConfig_BruteForceConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig + .class, + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig + .Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.FeatureViewProto + .internal_static_google_cloud_aiplatform_v1beta1_FeatureView_IndexConfig_BruteForceConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig + build() { + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig + buildPartial() { + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig result = + new com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig( + this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig other) { + if (other + == com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig + .getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig) + private static final com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig + .BruteForceConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig(); + } + + public static com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BruteForceConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface TreeAHConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Optional. Number of embeddings on each leaf node. The default value is
+       * 1000 if not set.
+       * 
+ * + * + * optional int64 leaf_node_embedding_count = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the leafNodeEmbeddingCount field is set. + */ + boolean hasLeafNodeEmbeddingCount(); + /** + * + * + *
+       * Optional. Number of embeddings on each leaf node. The default value is
+       * 1000 if not set.
+       * 
+ * + * + * optional int64 leaf_node_embedding_count = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The leafNodeEmbeddingCount. + */ + long getLeafNodeEmbeddingCount(); + } + /** + * + * + *
+     * Configuration options for the tree-AH algorithm.
+     * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig} + */ + public static final class TreeAHConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig) + TreeAHConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use TreeAHConfig.newBuilder() to construct. + private TreeAHConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TreeAHConfig() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TreeAHConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.FeatureViewProto + .internal_static_google_cloud_aiplatform_v1beta1_FeatureView_IndexConfig_TreeAHConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.FeatureViewProto + .internal_static_google_cloud_aiplatform_v1beta1_FeatureView_IndexConfig_TreeAHConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig.class, + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig.Builder + .class); + } + + private int bitField0_; + public static final int LEAF_NODE_EMBEDDING_COUNT_FIELD_NUMBER = 1; + private long leafNodeEmbeddingCount_ = 0L; + /** + * + * + *
+       * Optional. Number of embeddings on each leaf node. The default value is
+       * 1000 if not set.
+       * 
+ * + * + * optional int64 leaf_node_embedding_count = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the leafNodeEmbeddingCount field is set. + */ + @java.lang.Override + public boolean hasLeafNodeEmbeddingCount() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+       * Optional. Number of embeddings on each leaf node. The default value is
+       * 1000 if not set.
+       * 
+ * + * + * optional int64 leaf_node_embedding_count = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The leafNodeEmbeddingCount. + */ + @java.lang.Override + public long getLeafNodeEmbeddingCount() { + return leafNodeEmbeddingCount_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeInt64(1, leafNodeEmbeddingCount_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeInt64Size(1, leafNodeEmbeddingCount_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig other = + (com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig) obj; + + if (hasLeafNodeEmbeddingCount() != other.hasLeafNodeEmbeddingCount()) return false; + if (hasLeafNodeEmbeddingCount()) { + if (getLeafNodeEmbeddingCount() != other.getLeafNodeEmbeddingCount()) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasLeafNodeEmbeddingCount()) { + hash = (37 * hash) + LEAF_NODE_EMBEDDING_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getLeafNodeEmbeddingCount()); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * Configuration options for the tree-AH algorithm.
+       * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig) + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.FeatureViewProto + .internal_static_google_cloud_aiplatform_v1beta1_FeatureView_IndexConfig_TreeAHConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.FeatureViewProto + .internal_static_google_cloud_aiplatform_v1beta1_FeatureView_IndexConfig_TreeAHConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig.class, + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig.Builder + .class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + leafNodeEmbeddingCount_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.FeatureViewProto + .internal_static_google_cloud_aiplatform_v1beta1_FeatureView_IndexConfig_TreeAHConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig build() { + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig + buildPartial() { + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig result = + new com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.leafNodeEmbeddingCount_ = leafNodeEmbeddingCount_; + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig other) { + if (other + == com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig + .getDefaultInstance()) return this; + if (other.hasLeafNodeEmbeddingCount()) { + setLeafNodeEmbeddingCount(other.getLeafNodeEmbeddingCount()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + leafNodeEmbeddingCount_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private long leafNodeEmbeddingCount_; + /** + * + * + *
+         * Optional. Number of embeddings on each leaf node. The default value is
+         * 1000 if not set.
+         * 
+ * + * + * optional int64 leaf_node_embedding_count = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the leafNodeEmbeddingCount field is set. + */ + @java.lang.Override + public boolean hasLeafNodeEmbeddingCount() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+         * Optional. Number of embeddings on each leaf node. The default value is
+         * 1000 if not set.
+         * 
+ * + * + * optional int64 leaf_node_embedding_count = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The leafNodeEmbeddingCount. + */ + @java.lang.Override + public long getLeafNodeEmbeddingCount() { + return leafNodeEmbeddingCount_; + } + /** + * + * + *
+         * Optional. Number of embeddings on each leaf node. The default value is
+         * 1000 if not set.
+         * 
+ * + * + * optional int64 leaf_node_embedding_count = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The leafNodeEmbeddingCount to set. + * @return This builder for chaining. + */ + public Builder setLeafNodeEmbeddingCount(long value) { + + leafNodeEmbeddingCount_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * Optional. Number of embeddings on each leaf node. The default value is
+         * 1000 if not set.
+         * 
+ * + * + * optional int64 leaf_node_embedding_count = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearLeafNodeEmbeddingCount() { + bitField0_ = (bitField0_ & ~0x00000001); + leafNodeEmbeddingCount_ = 0L; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig) + private static final com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig(); + } + + public static com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TreeAHConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + private int algorithmConfigCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object algorithmConfig_; + + public enum AlgorithmConfigCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + TREE_AH_CONFIG(6), + BRUTE_FORCE_CONFIG(7), + ALGORITHMCONFIG_NOT_SET(0); + private final int value; + + private AlgorithmConfigCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static AlgorithmConfigCase valueOf(int value) { + return forNumber(value); + } + + public static AlgorithmConfigCase forNumber(int value) { + switch (value) { + case 6: + return TREE_AH_CONFIG; + case 7: + return BRUTE_FORCE_CONFIG; + case 0: + return ALGORITHMCONFIG_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public AlgorithmConfigCase getAlgorithmConfigCase() { + return AlgorithmConfigCase.forNumber(algorithmConfigCase_); + } + + public static final int TREE_AH_CONFIG_FIELD_NUMBER = 6; + /** + * + * + *
+     * Optional. Configuration options for the tree-AH algorithm (Shallow tree
+     * + Asymmetric Hashing). Please refer to this paper for more details:
+     * https://arxiv.org/abs/1908.10396
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig tree_ah_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the treeAhConfig field is set. + */ + @java.lang.Override + public boolean hasTreeAhConfig() { + return algorithmConfigCase_ == 6; + } + /** + * + * + *
+     * Optional. Configuration options for the tree-AH algorithm (Shallow tree
+     * + Asymmetric Hashing). Please refer to this paper for more details:
+     * https://arxiv.org/abs/1908.10396
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig tree_ah_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The treeAhConfig. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig + getTreeAhConfig() { + if (algorithmConfigCase_ == 6) { + return (com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig) + algorithmConfig_; + } + return com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig + .getDefaultInstance(); + } + /** + * + * + *
+     * Optional. Configuration options for the tree-AH algorithm (Shallow tree
+     * + Asymmetric Hashing). Please refer to this paper for more details:
+     * https://arxiv.org/abs/1908.10396
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig tree_ah_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfigOrBuilder + getTreeAhConfigOrBuilder() { + if (algorithmConfigCase_ == 6) { + return (com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig) + algorithmConfig_; + } + return com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig + .getDefaultInstance(); + } + + public static final int BRUTE_FORCE_CONFIG_FIELD_NUMBER = 7; + /** + * + * + *
+     * Optional. Configuration options for using brute force search, which
+     * simply implements the standard linear search in the database for each
+     * query. It is primarily meant for benchmarking and to generate the
+     * ground truth for approximate search.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig brute_force_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the bruteForceConfig field is set. + */ + @java.lang.Override + public boolean hasBruteForceConfig() { + return algorithmConfigCase_ == 7; + } + /** + * + * + *
+     * Optional. Configuration options for using brute force search, which
+     * simply implements the standard linear search in the database for each
+     * query. It is primarily meant for benchmarking and to generate the
+     * ground truth for approximate search.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig brute_force_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The bruteForceConfig. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig + getBruteForceConfig() { + if (algorithmConfigCase_ == 7) { + return (com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig) + algorithmConfig_; + } + return com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig + .getDefaultInstance(); + } + /** + * + * + *
+     * Optional. Configuration options for using brute force search, which
+     * simply implements the standard linear search in the database for each
+     * query. It is primarily meant for benchmarking and to generate the
+     * ground truth for approximate search.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig brute_force_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfigOrBuilder + getBruteForceConfigOrBuilder() { + if (algorithmConfigCase_ == 7) { + return (com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig) + algorithmConfig_; + } + return com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig + .getDefaultInstance(); + } + + public static final int EMBEDDING_COLUMN_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object embeddingColumn_ = ""; + /** + * + * + *
+     * Optional. Column of embedding. This column contains the source data to
+     * create index for vector search. embedding_column must be set when using
+     * vector search.
+     * 
+ * + * string embedding_column = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The embeddingColumn. + */ + @java.lang.Override + public java.lang.String getEmbeddingColumn() { + java.lang.Object ref = embeddingColumn_; + 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(); + embeddingColumn_ = s; + return s; + } + } + /** + * + * + *
+     * Optional. Column of embedding. This column contains the source data to
+     * create index for vector search. embedding_column must be set when using
+     * vector search.
+     * 
+ * + * string embedding_column = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for embeddingColumn. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEmbeddingColumnBytes() { + java.lang.Object ref = embeddingColumn_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + embeddingColumn_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_COLUMNS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList filterColumns_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+     * Optional. Columns of features that're used to filter vector search
+     * results.
+     * 
+ * + * repeated string filter_columns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the filterColumns. + */ + public com.google.protobuf.ProtocolStringList getFilterColumnsList() { + return filterColumns_; + } + /** + * + * + *
+     * Optional. Columns of features that're used to filter vector search
+     * results.
+     * 
+ * + * repeated string filter_columns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of filterColumns. + */ + public int getFilterColumnsCount() { + return filterColumns_.size(); + } + /** + * + * + *
+     * Optional. Columns of features that're used to filter vector search
+     * results.
+     * 
+ * + * repeated string filter_columns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The filterColumns at the given index. + */ + public java.lang.String getFilterColumns(int index) { + return filterColumns_.get(index); + } + /** + * + * + *
+     * Optional. Columns of features that're used to filter vector search
+     * results.
+     * 
+ * + * repeated string filter_columns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the filterColumns at the given index. + */ + public com.google.protobuf.ByteString getFilterColumnsBytes(int index) { + return filterColumns_.getByteString(index); + } + + public static final int CROWDING_COLUMN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object crowdingColumn_ = ""; + /** + * + * + *
+     * Optional. Column of crowding. This column contains crowding attribute
+     * which is a constraint on a neighbor list produced by
+     * [FeatureOnlineStoreService.SearchNearestEntities][google.cloud.aiplatform.v1beta1.FeatureOnlineStoreService.SearchNearestEntities]
+     * to diversify search results. If
+     * [NearestNeighborQuery.per_crowding_attribute_neighbor_count][google.cloud.aiplatform.v1beta1.NearestNeighborQuery.per_crowding_attribute_neighbor_count]
+     * is set to K in
+     * [SearchNearestEntitiesRequest][google.cloud.aiplatform.v1beta1.SearchNearestEntitiesRequest],
+     * it's guaranteed that no more than K entities of the same crowding
+     * attribute are returned in the response.
+     * 
+ * + * string crowding_column = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The crowdingColumn. + */ + @java.lang.Override + public java.lang.String getCrowdingColumn() { + java.lang.Object ref = crowdingColumn_; + 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(); + crowdingColumn_ = s; + return s; + } + } + /** + * + * + *
+     * Optional. Column of crowding. This column contains crowding attribute
+     * which is a constraint on a neighbor list produced by
+     * [FeatureOnlineStoreService.SearchNearestEntities][google.cloud.aiplatform.v1beta1.FeatureOnlineStoreService.SearchNearestEntities]
+     * to diversify search results. If
+     * [NearestNeighborQuery.per_crowding_attribute_neighbor_count][google.cloud.aiplatform.v1beta1.NearestNeighborQuery.per_crowding_attribute_neighbor_count]
+     * is set to K in
+     * [SearchNearestEntitiesRequest][google.cloud.aiplatform.v1beta1.SearchNearestEntitiesRequest],
+     * it's guaranteed that no more than K entities of the same crowding
+     * attribute are returned in the response.
+     * 
+ * + * string crowding_column = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for crowdingColumn. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCrowdingColumnBytes() { + java.lang.Object ref = crowdingColumn_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + crowdingColumn_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EMBEDDING_DIMENSION_FIELD_NUMBER = 4; + private int embeddingDimension_ = 0; + /** + * + * + *
+     * Optional. The number of dimensions of the input embedding.
+     * 
+ * + * optional int32 embedding_dimension = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the embeddingDimension field is set. + */ + @java.lang.Override + public boolean hasEmbeddingDimension() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Optional. The number of dimensions of the input embedding.
+     * 
+ * + * optional int32 embedding_dimension = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The embeddingDimension. + */ + @java.lang.Override + public int getEmbeddingDimension() { + return embeddingDimension_; + } + + public static final int DISTANCE_MEASURE_TYPE_FIELD_NUMBER = 5; + private int distanceMeasureType_ = 0; + /** + * + * + *
+     * Optional. The distance measure used in nearest neighbor search.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.DistanceMeasureType distance_measure_type = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for distanceMeasureType. + */ + @java.lang.Override + public int getDistanceMeasureTypeValue() { + return distanceMeasureType_; + } + /** + * + * + *
+     * Optional. The distance measure used in nearest neighbor search.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.DistanceMeasureType distance_measure_type = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The distanceMeasureType. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.DistanceMeasureType + getDistanceMeasureType() { + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.DistanceMeasureType result = + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.DistanceMeasureType.forNumber( + distanceMeasureType_); + return result == null + ? com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.DistanceMeasureType + .UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(embeddingColumn_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, embeddingColumn_); + } + for (int i = 0; i < filterColumns_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filterColumns_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(crowdingColumn_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, crowdingColumn_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeInt32(4, embeddingDimension_); + } + if (distanceMeasureType_ + != com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.DistanceMeasureType + .DISTANCE_MEASURE_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(5, distanceMeasureType_); + } + if (algorithmConfigCase_ == 6) { + output.writeMessage( + 6, + (com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig) + algorithmConfig_); + } + if (algorithmConfigCase_ == 7) { + output.writeMessage( + 7, + (com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig) + algorithmConfig_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(embeddingColumn_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, embeddingColumn_); + } + { + int dataSize = 0; + for (int i = 0; i < filterColumns_.size(); i++) { + dataSize += computeStringSizeNoTag(filterColumns_.getRaw(i)); + } + size += dataSize; + size += 1 * getFilterColumnsList().size(); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(crowdingColumn_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, crowdingColumn_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, embeddingDimension_); + } + if (distanceMeasureType_ + != com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.DistanceMeasureType + .DISTANCE_MEASURE_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, distanceMeasureType_); + } + if (algorithmConfigCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, + (com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig) + algorithmConfig_); + } + if (algorithmConfigCase_ == 7) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 7, + (com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig) + algorithmConfig_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig other = + (com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig) obj; + + if (!getEmbeddingColumn().equals(other.getEmbeddingColumn())) return false; + if (!getFilterColumnsList().equals(other.getFilterColumnsList())) return false; + if (!getCrowdingColumn().equals(other.getCrowdingColumn())) return false; + if (hasEmbeddingDimension() != other.hasEmbeddingDimension()) return false; + if (hasEmbeddingDimension()) { + if (getEmbeddingDimension() != other.getEmbeddingDimension()) return false; + } + if (distanceMeasureType_ != other.distanceMeasureType_) return false; + if (!getAlgorithmConfigCase().equals(other.getAlgorithmConfigCase())) return false; + switch (algorithmConfigCase_) { + case 6: + if (!getTreeAhConfig().equals(other.getTreeAhConfig())) return false; + break; + case 7: + if (!getBruteForceConfig().equals(other.getBruteForceConfig())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + EMBEDDING_COLUMN_FIELD_NUMBER; + hash = (53 * hash) + getEmbeddingColumn().hashCode(); + if (getFilterColumnsCount() > 0) { + hash = (37 * hash) + FILTER_COLUMNS_FIELD_NUMBER; + hash = (53 * hash) + getFilterColumnsList().hashCode(); + } + hash = (37 * hash) + CROWDING_COLUMN_FIELD_NUMBER; + hash = (53 * hash) + getCrowdingColumn().hashCode(); + if (hasEmbeddingDimension()) { + hash = (37 * hash) + EMBEDDING_DIMENSION_FIELD_NUMBER; + hash = (53 * hash) + getEmbeddingDimension(); + } + hash = (37 * hash) + DISTANCE_MEASURE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + distanceMeasureType_; + switch (algorithmConfigCase_) { + case 6: + hash = (37 * hash) + TREE_AH_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getTreeAhConfig().hashCode(); + break; + case 7: + hash = (37 * hash) + BRUTE_FORCE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getBruteForceConfig().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Configuration for vector indexing.
+     * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig) + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.FeatureViewProto + .internal_static_google_cloud_aiplatform_v1beta1_FeatureView_IndexConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.FeatureViewProto + .internal_static_google_cloud_aiplatform_v1beta1_FeatureView_IndexConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.class, + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (treeAhConfigBuilder_ != null) { + treeAhConfigBuilder_.clear(); + } + if (bruteForceConfigBuilder_ != null) { + bruteForceConfigBuilder_.clear(); + } + embeddingColumn_ = ""; + filterColumns_ = com.google.protobuf.LazyStringArrayList.emptyList(); + crowdingColumn_ = ""; + embeddingDimension_ = 0; + distanceMeasureType_ = 0; + algorithmConfigCase_ = 0; + algorithmConfig_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.FeatureViewProto + .internal_static_google_cloud_aiplatform_v1beta1_FeatureView_IndexConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig build() { + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig buildPartial() { + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig result = + new com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.embeddingColumn_ = embeddingColumn_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + filterColumns_.makeImmutable(); + result.filterColumns_ = filterColumns_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.crowdingColumn_ = crowdingColumn_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000020) != 0)) { + result.embeddingDimension_ = embeddingDimension_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.distanceMeasureType_ = distanceMeasureType_; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs( + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig result) { + result.algorithmConfigCase_ = algorithmConfigCase_; + result.algorithmConfig_ = this.algorithmConfig_; + if (algorithmConfigCase_ == 6 && treeAhConfigBuilder_ != null) { + result.algorithmConfig_ = treeAhConfigBuilder_.build(); + } + if (algorithmConfigCase_ == 7 && bruteForceConfigBuilder_ != null) { + result.algorithmConfig_ = bruteForceConfigBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig other) { + if (other + == com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.getDefaultInstance()) + return this; + if (!other.getEmbeddingColumn().isEmpty()) { + embeddingColumn_ = other.embeddingColumn_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.filterColumns_.isEmpty()) { + if (filterColumns_.isEmpty()) { + filterColumns_ = other.filterColumns_; + bitField0_ |= 0x00000008; + } else { + ensureFilterColumnsIsMutable(); + filterColumns_.addAll(other.filterColumns_); + } + onChanged(); + } + if (!other.getCrowdingColumn().isEmpty()) { + crowdingColumn_ = other.crowdingColumn_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.hasEmbeddingDimension()) { + setEmbeddingDimension(other.getEmbeddingDimension()); + } + if (other.distanceMeasureType_ != 0) { + setDistanceMeasureTypeValue(other.getDistanceMeasureTypeValue()); + } + switch (other.getAlgorithmConfigCase()) { + case TREE_AH_CONFIG: + { + mergeTreeAhConfig(other.getTreeAhConfig()); + break; + } + case BRUTE_FORCE_CONFIG: + { + mergeBruteForceConfig(other.getBruteForceConfig()); + break; + } + case ALGORITHMCONFIG_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + embeddingColumn_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureFilterColumnsIsMutable(); + filterColumns_.add(s); + break; + } // case 18 + case 26: + { + crowdingColumn_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 26 + case 32: + { + embeddingDimension_ = input.readInt32(); + bitField0_ |= 0x00000020; + break; + } // case 32 + case 40: + { + distanceMeasureType_ = input.readEnum(); + bitField0_ |= 0x00000040; + break; + } // case 40 + case 50: + { + input.readMessage(getTreeAhConfigFieldBuilder().getBuilder(), extensionRegistry); + algorithmConfigCase_ = 6; + break; + } // case 50 + case 58: + { + input.readMessage( + getBruteForceConfigFieldBuilder().getBuilder(), extensionRegistry); + algorithmConfigCase_ = 7; + break; + } // case 58 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int algorithmConfigCase_ = 0; + private java.lang.Object algorithmConfig_; + + public AlgorithmConfigCase getAlgorithmConfigCase() { + return AlgorithmConfigCase.forNumber(algorithmConfigCase_); + } + + public Builder clearAlgorithmConfig() { + algorithmConfigCase_ = 0; + algorithmConfig_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig, + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig.Builder, + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfigOrBuilder> + treeAhConfigBuilder_; + /** + * + * + *
+       * Optional. Configuration options for the tree-AH algorithm (Shallow tree
+       * + Asymmetric Hashing). Please refer to this paper for more details:
+       * https://arxiv.org/abs/1908.10396
+       * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig tree_ah_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the treeAhConfig field is set. + */ + @java.lang.Override + public boolean hasTreeAhConfig() { + return algorithmConfigCase_ == 6; + } + /** + * + * + *
+       * Optional. Configuration options for the tree-AH algorithm (Shallow tree
+       * + Asymmetric Hashing). Please refer to this paper for more details:
+       * https://arxiv.org/abs/1908.10396
+       * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig tree_ah_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The treeAhConfig. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig + getTreeAhConfig() { + if (treeAhConfigBuilder_ == null) { + if (algorithmConfigCase_ == 6) { + return (com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig) + algorithmConfig_; + } + return com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig + .getDefaultInstance(); + } else { + if (algorithmConfigCase_ == 6) { + return treeAhConfigBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig + .getDefaultInstance(); + } + } + /** + * + * + *
+       * Optional. Configuration options for the tree-AH algorithm (Shallow tree
+       * + Asymmetric Hashing). Please refer to this paper for more details:
+       * https://arxiv.org/abs/1908.10396
+       * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig tree_ah_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setTreeAhConfig( + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig value) { + if (treeAhConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + algorithmConfig_ = value; + onChanged(); + } else { + treeAhConfigBuilder_.setMessage(value); + } + algorithmConfigCase_ = 6; + return this; + } + /** + * + * + *
+       * Optional. Configuration options for the tree-AH algorithm (Shallow tree
+       * + Asymmetric Hashing). Please refer to this paper for more details:
+       * https://arxiv.org/abs/1908.10396
+       * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig tree_ah_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setTreeAhConfig( + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig.Builder + builderForValue) { + if (treeAhConfigBuilder_ == null) { + algorithmConfig_ = builderForValue.build(); + onChanged(); + } else { + treeAhConfigBuilder_.setMessage(builderForValue.build()); + } + algorithmConfigCase_ = 6; + return this; + } + /** + * + * + *
+       * Optional. Configuration options for the tree-AH algorithm (Shallow tree
+       * + Asymmetric Hashing). Please refer to this paper for more details:
+       * https://arxiv.org/abs/1908.10396
+       * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig tree_ah_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeTreeAhConfig( + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig value) { + if (treeAhConfigBuilder_ == null) { + if (algorithmConfigCase_ == 6 + && algorithmConfig_ + != com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig + .getDefaultInstance()) { + algorithmConfig_ = + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig.newBuilder( + (com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig) + algorithmConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + algorithmConfig_ = value; + } + onChanged(); + } else { + if (algorithmConfigCase_ == 6) { + treeAhConfigBuilder_.mergeFrom(value); + } else { + treeAhConfigBuilder_.setMessage(value); + } + } + algorithmConfigCase_ = 6; + return this; + } + /** + * + * + *
+       * Optional. Configuration options for the tree-AH algorithm (Shallow tree
+       * + Asymmetric Hashing). Please refer to this paper for more details:
+       * https://arxiv.org/abs/1908.10396
+       * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig tree_ah_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearTreeAhConfig() { + if (treeAhConfigBuilder_ == null) { + if (algorithmConfigCase_ == 6) { + algorithmConfigCase_ = 0; + algorithmConfig_ = null; + onChanged(); + } + } else { + if (algorithmConfigCase_ == 6) { + algorithmConfigCase_ = 0; + algorithmConfig_ = null; + } + treeAhConfigBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Optional. Configuration options for the tree-AH algorithm (Shallow tree
+       * + Asymmetric Hashing). Please refer to this paper for more details:
+       * https://arxiv.org/abs/1908.10396
+       * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig tree_ah_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig.Builder + getTreeAhConfigBuilder() { + return getTreeAhConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Optional. Configuration options for the tree-AH algorithm (Shallow tree
+       * + Asymmetric Hashing). Please refer to this paper for more details:
+       * https://arxiv.org/abs/1908.10396
+       * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig tree_ah_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfigOrBuilder + getTreeAhConfigOrBuilder() { + if ((algorithmConfigCase_ == 6) && (treeAhConfigBuilder_ != null)) { + return treeAhConfigBuilder_.getMessageOrBuilder(); + } else { + if (algorithmConfigCase_ == 6) { + return (com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig) + algorithmConfig_; + } + return com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig + .getDefaultInstance(); + } + } + /** + * + * + *
+       * Optional. Configuration options for the tree-AH algorithm (Shallow tree
+       * + Asymmetric Hashing). Please refer to this paper for more details:
+       * https://arxiv.org/abs/1908.10396
+       * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig tree_ah_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig, + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig.Builder, + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfigOrBuilder> + getTreeAhConfigFieldBuilder() { + if (treeAhConfigBuilder_ == null) { + if (!(algorithmConfigCase_ == 6)) { + algorithmConfig_ = + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig + .getDefaultInstance(); + } + treeAhConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig, + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig.Builder, + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig + .TreeAHConfigOrBuilder>( + (com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.TreeAHConfig) + algorithmConfig_, + getParentForChildren(), + isClean()); + algorithmConfig_ = null; + } + algorithmConfigCase_ = 6; + onChanged(); + return treeAhConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig, + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig.Builder, + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfigOrBuilder> + bruteForceConfigBuilder_; + /** + * + * + *
+       * Optional. Configuration options for using brute force search, which
+       * simply implements the standard linear search in the database for each
+       * query. It is primarily meant for benchmarking and to generate the
+       * ground truth for approximate search.
+       * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig brute_force_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the bruteForceConfig field is set. + */ + @java.lang.Override + public boolean hasBruteForceConfig() { + return algorithmConfigCase_ == 7; + } + /** + * + * + *
+       * Optional. Configuration options for using brute force search, which
+       * simply implements the standard linear search in the database for each
+       * query. It is primarily meant for benchmarking and to generate the
+       * ground truth for approximate search.
+       * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig brute_force_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The bruteForceConfig. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig + getBruteForceConfig() { + if (bruteForceConfigBuilder_ == null) { + if (algorithmConfigCase_ == 7) { + return (com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig) + algorithmConfig_; + } + return com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig + .getDefaultInstance(); + } else { + if (algorithmConfigCase_ == 7) { + return bruteForceConfigBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig + .getDefaultInstance(); + } + } + /** + * + * + *
+       * Optional. Configuration options for using brute force search, which
+       * simply implements the standard linear search in the database for each
+       * query. It is primarily meant for benchmarking and to generate the
+       * ground truth for approximate search.
+       * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig brute_force_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setBruteForceConfig( + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig value) { + if (bruteForceConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + algorithmConfig_ = value; + onChanged(); + } else { + bruteForceConfigBuilder_.setMessage(value); + } + algorithmConfigCase_ = 7; + return this; + } + /** + * + * + *
+       * Optional. Configuration options for using brute force search, which
+       * simply implements the standard linear search in the database for each
+       * query. It is primarily meant for benchmarking and to generate the
+       * ground truth for approximate search.
+       * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig brute_force_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setBruteForceConfig( + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig.Builder + builderForValue) { + if (bruteForceConfigBuilder_ == null) { + algorithmConfig_ = builderForValue.build(); + onChanged(); + } else { + bruteForceConfigBuilder_.setMessage(builderForValue.build()); + } + algorithmConfigCase_ = 7; + return this; + } + /** + * + * + *
+       * Optional. Configuration options for using brute force search, which
+       * simply implements the standard linear search in the database for each
+       * query. It is primarily meant for benchmarking and to generate the
+       * ground truth for approximate search.
+       * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig brute_force_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeBruteForceConfig( + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig value) { + if (bruteForceConfigBuilder_ == null) { + if (algorithmConfigCase_ == 7 + && algorithmConfig_ + != com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig + .getDefaultInstance()) { + algorithmConfig_ = + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig + .newBuilder( + (com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig + .BruteForceConfig) + algorithmConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + algorithmConfig_ = value; + } + onChanged(); + } else { + if (algorithmConfigCase_ == 7) { + bruteForceConfigBuilder_.mergeFrom(value); + } else { + bruteForceConfigBuilder_.setMessage(value); + } + } + algorithmConfigCase_ = 7; + return this; + } + /** + * + * + *
+       * Optional. Configuration options for using brute force search, which
+       * simply implements the standard linear search in the database for each
+       * query. It is primarily meant for benchmarking and to generate the
+       * ground truth for approximate search.
+       * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig brute_force_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearBruteForceConfig() { + if (bruteForceConfigBuilder_ == null) { + if (algorithmConfigCase_ == 7) { + algorithmConfigCase_ = 0; + algorithmConfig_ = null; + onChanged(); + } + } else { + if (algorithmConfigCase_ == 7) { + algorithmConfigCase_ = 0; + algorithmConfig_ = null; + } + bruteForceConfigBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Optional. Configuration options for using brute force search, which
+       * simply implements the standard linear search in the database for each
+       * query. It is primarily meant for benchmarking and to generate the
+       * ground truth for approximate search.
+       * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig brute_force_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig.Builder + getBruteForceConfigBuilder() { + return getBruteForceConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Optional. Configuration options for using brute force search, which
+       * simply implements the standard linear search in the database for each
+       * query. It is primarily meant for benchmarking and to generate the
+       * ground truth for approximate search.
+       * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig brute_force_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfigOrBuilder + getBruteForceConfigOrBuilder() { + if ((algorithmConfigCase_ == 7) && (bruteForceConfigBuilder_ != null)) { + return bruteForceConfigBuilder_.getMessageOrBuilder(); + } else { + if (algorithmConfigCase_ == 7) { + return (com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig) + algorithmConfig_; + } + return com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig + .getDefaultInstance(); + } + } + /** + * + * + *
+       * Optional. Configuration options for using brute force search, which
+       * simply implements the standard linear search in the database for each
+       * query. It is primarily meant for benchmarking and to generate the
+       * ground truth for approximate search.
+       * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig brute_force_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig, + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig.Builder, + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfigOrBuilder> + getBruteForceConfigFieldBuilder() { + if (bruteForceConfigBuilder_ == null) { + if (!(algorithmConfigCase_ == 7)) { + algorithmConfig_ = + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig + .getDefaultInstance(); + } + bruteForceConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig, + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig + .Builder, + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig + .BruteForceConfigOrBuilder>( + (com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.BruteForceConfig) + algorithmConfig_, + getParentForChildren(), + isClean()); + algorithmConfig_ = null; + } + algorithmConfigCase_ = 7; + onChanged(); + return bruteForceConfigBuilder_; + } + + private java.lang.Object embeddingColumn_ = ""; + /** + * + * + *
+       * Optional. Column of embedding. This column contains the source data to
+       * create index for vector search. embedding_column must be set when using
+       * vector search.
+       * 
+ * + * string embedding_column = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The embeddingColumn. + */ + public java.lang.String getEmbeddingColumn() { + java.lang.Object ref = embeddingColumn_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + embeddingColumn_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Optional. Column of embedding. This column contains the source data to
+       * create index for vector search. embedding_column must be set when using
+       * vector search.
+       * 
+ * + * string embedding_column = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for embeddingColumn. + */ + public com.google.protobuf.ByteString getEmbeddingColumnBytes() { + java.lang.Object ref = embeddingColumn_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + embeddingColumn_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Optional. Column of embedding. This column contains the source data to
+       * create index for vector search. embedding_column must be set when using
+       * vector search.
+       * 
+ * + * string embedding_column = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The embeddingColumn to set. + * @return This builder for chaining. + */ + public Builder setEmbeddingColumn(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + embeddingColumn_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Column of embedding. This column contains the source data to
+       * create index for vector search. embedding_column must be set when using
+       * vector search.
+       * 
+ * + * string embedding_column = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEmbeddingColumn() { + embeddingColumn_ = getDefaultInstance().getEmbeddingColumn(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Column of embedding. This column contains the source data to
+       * create index for vector search. embedding_column must be set when using
+       * vector search.
+       * 
+ * + * string embedding_column = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for embeddingColumn to set. + * @return This builder for chaining. + */ + public Builder setEmbeddingColumnBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + embeddingColumn_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList filterColumns_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureFilterColumnsIsMutable() { + if (!filterColumns_.isModifiable()) { + filterColumns_ = new com.google.protobuf.LazyStringArrayList(filterColumns_); + } + bitField0_ |= 0x00000008; + } + /** + * + * + *
+       * Optional. Columns of features that're used to filter vector search
+       * results.
+       * 
+ * + * repeated string filter_columns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the filterColumns. + */ + public com.google.protobuf.ProtocolStringList getFilterColumnsList() { + filterColumns_.makeImmutable(); + return filterColumns_; + } + /** + * + * + *
+       * Optional. Columns of features that're used to filter vector search
+       * results.
+       * 
+ * + * repeated string filter_columns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of filterColumns. + */ + public int getFilterColumnsCount() { + return filterColumns_.size(); + } + /** + * + * + *
+       * Optional. Columns of features that're used to filter vector search
+       * results.
+       * 
+ * + * repeated string filter_columns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The filterColumns at the given index. + */ + public java.lang.String getFilterColumns(int index) { + return filterColumns_.get(index); + } + /** + * + * + *
+       * Optional. Columns of features that're used to filter vector search
+       * results.
+       * 
+ * + * repeated string filter_columns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the filterColumns at the given index. + */ + public com.google.protobuf.ByteString getFilterColumnsBytes(int index) { + return filterColumns_.getByteString(index); + } + /** + * + * + *
+       * Optional. Columns of features that're used to filter vector search
+       * results.
+       * 
+ * + * repeated string filter_columns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The filterColumns to set. + * @return This builder for chaining. + */ + public Builder setFilterColumns(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureFilterColumnsIsMutable(); + filterColumns_.set(index, value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Columns of features that're used to filter vector search
+       * results.
+       * 
+ * + * repeated string filter_columns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The filterColumns to add. + * @return This builder for chaining. + */ + public Builder addFilterColumns(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureFilterColumnsIsMutable(); + filterColumns_.add(value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Columns of features that're used to filter vector search
+       * results.
+       * 
+ * + * repeated string filter_columns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The filterColumns to add. + * @return This builder for chaining. + */ + public Builder addAllFilterColumns(java.lang.Iterable values) { + ensureFilterColumnsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, filterColumns_); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Columns of features that're used to filter vector search
+       * results.
+       * 
+ * + * repeated string filter_columns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilterColumns() { + filterColumns_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + ; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Columns of features that're used to filter vector search
+       * results.
+       * 
+ * + * repeated string filter_columns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes of the filterColumns to add. + * @return This builder for chaining. + */ + public Builder addFilterColumnsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureFilterColumnsIsMutable(); + filterColumns_.add(value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object crowdingColumn_ = ""; + /** + * + * + *
+       * Optional. Column of crowding. This column contains crowding attribute
+       * which is a constraint on a neighbor list produced by
+       * [FeatureOnlineStoreService.SearchNearestEntities][google.cloud.aiplatform.v1beta1.FeatureOnlineStoreService.SearchNearestEntities]
+       * to diversify search results. If
+       * [NearestNeighborQuery.per_crowding_attribute_neighbor_count][google.cloud.aiplatform.v1beta1.NearestNeighborQuery.per_crowding_attribute_neighbor_count]
+       * is set to K in
+       * [SearchNearestEntitiesRequest][google.cloud.aiplatform.v1beta1.SearchNearestEntitiesRequest],
+       * it's guaranteed that no more than K entities of the same crowding
+       * attribute are returned in the response.
+       * 
+ * + * string crowding_column = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The crowdingColumn. + */ + public java.lang.String getCrowdingColumn() { + java.lang.Object ref = crowdingColumn_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + crowdingColumn_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Optional. Column of crowding. This column contains crowding attribute
+       * which is a constraint on a neighbor list produced by
+       * [FeatureOnlineStoreService.SearchNearestEntities][google.cloud.aiplatform.v1beta1.FeatureOnlineStoreService.SearchNearestEntities]
+       * to diversify search results. If
+       * [NearestNeighborQuery.per_crowding_attribute_neighbor_count][google.cloud.aiplatform.v1beta1.NearestNeighborQuery.per_crowding_attribute_neighbor_count]
+       * is set to K in
+       * [SearchNearestEntitiesRequest][google.cloud.aiplatform.v1beta1.SearchNearestEntitiesRequest],
+       * it's guaranteed that no more than K entities of the same crowding
+       * attribute are returned in the response.
+       * 
+ * + * string crowding_column = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for crowdingColumn. + */ + public com.google.protobuf.ByteString getCrowdingColumnBytes() { + java.lang.Object ref = crowdingColumn_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + crowdingColumn_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Optional. Column of crowding. This column contains crowding attribute
+       * which is a constraint on a neighbor list produced by
+       * [FeatureOnlineStoreService.SearchNearestEntities][google.cloud.aiplatform.v1beta1.FeatureOnlineStoreService.SearchNearestEntities]
+       * to diversify search results. If
+       * [NearestNeighborQuery.per_crowding_attribute_neighbor_count][google.cloud.aiplatform.v1beta1.NearestNeighborQuery.per_crowding_attribute_neighbor_count]
+       * is set to K in
+       * [SearchNearestEntitiesRequest][google.cloud.aiplatform.v1beta1.SearchNearestEntitiesRequest],
+       * it's guaranteed that no more than K entities of the same crowding
+       * attribute are returned in the response.
+       * 
+ * + * string crowding_column = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The crowdingColumn to set. + * @return This builder for chaining. + */ + public Builder setCrowdingColumn(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + crowdingColumn_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Column of crowding. This column contains crowding attribute
+       * which is a constraint on a neighbor list produced by
+       * [FeatureOnlineStoreService.SearchNearestEntities][google.cloud.aiplatform.v1beta1.FeatureOnlineStoreService.SearchNearestEntities]
+       * to diversify search results. If
+       * [NearestNeighborQuery.per_crowding_attribute_neighbor_count][google.cloud.aiplatform.v1beta1.NearestNeighborQuery.per_crowding_attribute_neighbor_count]
+       * is set to K in
+       * [SearchNearestEntitiesRequest][google.cloud.aiplatform.v1beta1.SearchNearestEntitiesRequest],
+       * it's guaranteed that no more than K entities of the same crowding
+       * attribute are returned in the response.
+       * 
+ * + * string crowding_column = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearCrowdingColumn() { + crowdingColumn_ = getDefaultInstance().getCrowdingColumn(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Column of crowding. This column contains crowding attribute
+       * which is a constraint on a neighbor list produced by
+       * [FeatureOnlineStoreService.SearchNearestEntities][google.cloud.aiplatform.v1beta1.FeatureOnlineStoreService.SearchNearestEntities]
+       * to diversify search results. If
+       * [NearestNeighborQuery.per_crowding_attribute_neighbor_count][google.cloud.aiplatform.v1beta1.NearestNeighborQuery.per_crowding_attribute_neighbor_count]
+       * is set to K in
+       * [SearchNearestEntitiesRequest][google.cloud.aiplatform.v1beta1.SearchNearestEntitiesRequest],
+       * it's guaranteed that no more than K entities of the same crowding
+       * attribute are returned in the response.
+       * 
+ * + * string crowding_column = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for crowdingColumn to set. + * @return This builder for chaining. + */ + public Builder setCrowdingColumnBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + crowdingColumn_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private int embeddingDimension_; + /** + * + * + *
+       * Optional. The number of dimensions of the input embedding.
+       * 
+ * + * optional int32 embedding_dimension = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the embeddingDimension field is set. + */ + @java.lang.Override + public boolean hasEmbeddingDimension() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+       * Optional. The number of dimensions of the input embedding.
+       * 
+ * + * optional int32 embedding_dimension = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The embeddingDimension. + */ + @java.lang.Override + public int getEmbeddingDimension() { + return embeddingDimension_; + } + /** + * + * + *
+       * Optional. The number of dimensions of the input embedding.
+       * 
+ * + * optional int32 embedding_dimension = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The embeddingDimension to set. + * @return This builder for chaining. + */ + public Builder setEmbeddingDimension(int value) { + + embeddingDimension_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. The number of dimensions of the input embedding.
+       * 
+ * + * optional int32 embedding_dimension = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearEmbeddingDimension() { + bitField0_ = (bitField0_ & ~0x00000020); + embeddingDimension_ = 0; + onChanged(); + return this; + } + + private int distanceMeasureType_ = 0; + /** + * + * + *
+       * Optional. The distance measure used in nearest neighbor search.
+       * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.DistanceMeasureType distance_measure_type = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for distanceMeasureType. + */ + @java.lang.Override + public int getDistanceMeasureTypeValue() { + return distanceMeasureType_; + } + /** + * + * + *
+       * Optional. The distance measure used in nearest neighbor search.
+       * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.DistanceMeasureType distance_measure_type = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for distanceMeasureType to set. + * @return This builder for chaining. + */ + public Builder setDistanceMeasureTypeValue(int value) { + distanceMeasureType_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. The distance measure used in nearest neighbor search.
+       * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.DistanceMeasureType distance_measure_type = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The distanceMeasureType. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.DistanceMeasureType + getDistanceMeasureType() { + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.DistanceMeasureType result = + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.DistanceMeasureType + .forNumber(distanceMeasureType_); + return result == null + ? com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.DistanceMeasureType + .UNRECOGNIZED + : result; + } + /** + * + * + *
+       * Optional. The distance measure used in nearest neighbor search.
+       * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.DistanceMeasureType distance_measure_type = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The distanceMeasureType to set. + * @return This builder for chaining. + */ + public Builder setDistanceMeasureType( + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.DistanceMeasureType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000040; + distanceMeasureType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. The distance measure used in nearest neighbor search.
+       * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.DistanceMeasureType distance_measure_type = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearDistanceMeasureType() { + bitField0_ = (bitField0_ & ~0x00000040); + distanceMeasureType_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig) + private static final com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig(); + } + + public static com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IndexConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + public interface FeatureRegistrySourceOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.FeatureView.FeatureRegistrySource) @@ -8718,7 +12663,7 @@ public com.google.cloud.aiplatform.v1beta1.FeatureView.SyncConfig getSyncConfig( *
* * @deprecated google.cloud.aiplatform.v1beta1.FeatureView.vector_search_config is deprecated. See - * google/cloud/aiplatform/v1beta1/feature_view.proto;l=220 + * google/cloud/aiplatform/v1beta1/feature_view.proto;l=304 * @return Whether the vectorSearchConfig field is set. */ @java.lang.Override @@ -8740,7 +12685,7 @@ public boolean hasVectorSearchConfig() { *
* * @deprecated google.cloud.aiplatform.v1beta1.FeatureView.vector_search_config is deprecated. See - * google/cloud/aiplatform/v1beta1/feature_view.proto;l=220 + * google/cloud/aiplatform/v1beta1/feature_view.proto;l=304 * @return The vectorSearchConfig. */ @java.lang.Override @@ -8773,6 +12718,72 @@ public boolean hasVectorSearchConfig() { : vectorSearchConfig_; } + public static final int INDEX_CONFIG_FIELD_NUMBER = 15; + private com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig indexConfig_; + /** + * + * + *
+   * Optional. Configuration for index preparation for vector search. It
+   * contains the required configurations to create an index from source data,
+   * so that approximate nearest neighbor (a.k.a ANN) algorithms search can be
+   * performed during online serving.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig index_config = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the indexConfig field is set. + */ + @java.lang.Override + public boolean hasIndexConfig() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+   * Optional. Configuration for index preparation for vector search. It
+   * contains the required configurations to create an index from source data,
+   * so that approximate nearest neighbor (a.k.a ANN) algorithms search can be
+   * performed during online serving.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig index_config = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The indexConfig. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig getIndexConfig() { + return indexConfig_ == null + ? com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.getDefaultInstance() + : indexConfig_; + } + /** + * + * + *
+   * Optional. Configuration for index preparation for vector search. It
+   * contains the required configurations to create an index from source data,
+   * so that approximate nearest neighbor (a.k.a ANN) algorithms search can be
+   * performed during online serving.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig index_config = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfigOrBuilder + getIndexConfigOrBuilder() { + return indexConfig_ == null + ? com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.getDefaultInstance() + : indexConfig_; + } + public static final int SERVICE_AGENT_TYPE_FIELD_NUMBER = 14; private int serviceAgentType_ = 0; /** @@ -8931,6 +12942,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(14, serviceAgentType_); } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeMessage(15, getIndexConfig()); + } getUnknownFields().writeTo(output); } @@ -8987,6 +13001,9 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(14, serviceAgentType_); } + if (((bitField0_ & 0x00000010) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(15, getIndexConfig()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -9022,6 +13039,10 @@ public boolean equals(final java.lang.Object obj) { if (hasVectorSearchConfig()) { if (!getVectorSearchConfig().equals(other.getVectorSearchConfig())) return false; } + if (hasIndexConfig() != other.hasIndexConfig()) return false; + if (hasIndexConfig()) { + if (!getIndexConfig().equals(other.getIndexConfig())) return false; + } if (serviceAgentType_ != other.serviceAgentType_) return false; if (!getServiceAccountEmail().equals(other.getServiceAccountEmail())) return false; if (!getSourceCase().equals(other.getSourceCase())) return false; @@ -9070,6 +13091,10 @@ public int hashCode() { hash = (37 * hash) + VECTOR_SEARCH_CONFIG_FIELD_NUMBER; hash = (53 * hash) + getVectorSearchConfig().hashCode(); } + if (hasIndexConfig()) { + hash = (37 * hash) + INDEX_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getIndexConfig().hashCode(); + } hash = (37 * hash) + SERVICE_AGENT_TYPE_FIELD_NUMBER; hash = (53 * hash) + serviceAgentType_; hash = (37 * hash) + SERVICE_ACCOUNT_EMAIL_FIELD_NUMBER; @@ -9253,6 +13278,7 @@ private void maybeForceBuilderInitialization() { getUpdateTimeFieldBuilder(); getSyncConfigFieldBuilder(); getVectorSearchConfigFieldBuilder(); + getIndexConfigFieldBuilder(); } } @@ -9289,6 +13315,11 @@ public Builder clear() { vectorSearchConfigBuilder_.dispose(); vectorSearchConfigBuilder_ = null; } + indexConfig_ = null; + if (indexConfigBuilder_ != null) { + indexConfigBuilder_.dispose(); + indexConfigBuilder_ = null; + } serviceAgentType_ = 0; serviceAccountEmail_ = ""; sourceCase_ = 0; @@ -9361,9 +13392,14 @@ private void buildPartial0(com.google.cloud.aiplatform.v1beta1.FeatureView resul to_bitField0_ |= 0x00000008; } if (((from_bitField0_ & 0x00000200) != 0)) { - result.serviceAgentType_ = serviceAgentType_; + result.indexConfig_ = + indexConfigBuilder_ == null ? indexConfig_ : indexConfigBuilder_.build(); + to_bitField0_ |= 0x00000010; } if (((from_bitField0_ & 0x00000400) != 0)) { + result.serviceAgentType_ = serviceAgentType_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { result.serviceAccountEmail_ = serviceAccountEmail_; } result.bitField0_ |= to_bitField0_; @@ -9450,12 +13486,15 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.FeatureView other) if (other.hasVectorSearchConfig()) { mergeVectorSearchConfig(other.getVectorSearchConfig()); } + if (other.hasIndexConfig()) { + mergeIndexConfig(other.getIndexConfig()); + } if (other.serviceAgentType_ != 0) { setServiceAgentTypeValue(other.getServiceAgentTypeValue()); } if (!other.getServiceAccountEmail().isEmpty()) { serviceAccountEmail_ = other.serviceAccountEmail_; - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000800; onChanged(); } switch (other.getSourceCase()) { @@ -9565,15 +13604,21 @@ public Builder mergeFrom( case 106: { serviceAccountEmail_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000800; break; } // case 106 case 112: { serviceAgentType_ = input.readEnum(); - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; break; } // case 112 + case 122: + { + input.readMessage(getIndexConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000200; + break; + } // case 122 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -11190,7 +15235,7 @@ public Builder clearSyncConfig() { *
* * @deprecated google.cloud.aiplatform.v1beta1.FeatureView.vector_search_config is deprecated. - * See google/cloud/aiplatform/v1beta1/feature_view.proto;l=220 + * See google/cloud/aiplatform/v1beta1/feature_view.proto;l=304 * @return Whether the vectorSearchConfig field is set. */ @java.lang.Deprecated @@ -11211,7 +15256,7 @@ public boolean hasVectorSearchConfig() { *
* * @deprecated google.cloud.aiplatform.v1beta1.FeatureView.vector_search_config is deprecated. - * See google/cloud/aiplatform/v1beta1/feature_view.proto;l=220 + * See google/cloud/aiplatform/v1beta1/feature_view.proto;l=304 * @return The vectorSearchConfig. */ @java.lang.Deprecated @@ -11414,6 +15459,243 @@ public Builder clearVectorSearchConfig() { return vectorSearchConfigBuilder_; } + private com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig indexConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig, + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.Builder, + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfigOrBuilder> + indexConfigBuilder_; + /** + * + * + *
+     * Optional. Configuration for index preparation for vector search. It
+     * contains the required configurations to create an index from source data,
+     * so that approximate nearest neighbor (a.k.a ANN) algorithms search can be
+     * performed during online serving.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig index_config = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the indexConfig field is set. + */ + public boolean hasIndexConfig() { + return ((bitField0_ & 0x00000200) != 0); + } + /** + * + * + *
+     * Optional. Configuration for index preparation for vector search. It
+     * contains the required configurations to create an index from source data,
+     * so that approximate nearest neighbor (a.k.a ANN) algorithms search can be
+     * performed during online serving.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig index_config = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The indexConfig. + */ + public com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig getIndexConfig() { + if (indexConfigBuilder_ == null) { + return indexConfig_ == null + ? com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.getDefaultInstance() + : indexConfig_; + } else { + return indexConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Configuration for index preparation for vector search. It
+     * contains the required configurations to create an index from source data,
+     * so that approximate nearest neighbor (a.k.a ANN) algorithms search can be
+     * performed during online serving.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig index_config = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setIndexConfig( + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig value) { + if (indexConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + indexConfig_ = value; + } else { + indexConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Configuration for index preparation for vector search. It
+     * contains the required configurations to create an index from source data,
+     * so that approximate nearest neighbor (a.k.a ANN) algorithms search can be
+     * performed during online serving.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig index_config = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setIndexConfig( + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.Builder builderForValue) { + if (indexConfigBuilder_ == null) { + indexConfig_ = builderForValue.build(); + } else { + indexConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Configuration for index preparation for vector search. It
+     * contains the required configurations to create an index from source data,
+     * so that approximate nearest neighbor (a.k.a ANN) algorithms search can be
+     * performed during online serving.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig index_config = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeIndexConfig( + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig value) { + if (indexConfigBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0) + && indexConfig_ != null + && indexConfig_ + != com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig + .getDefaultInstance()) { + getIndexConfigBuilder().mergeFrom(value); + } else { + indexConfig_ = value; + } + } else { + indexConfigBuilder_.mergeFrom(value); + } + if (indexConfig_ != null) { + bitField0_ |= 0x00000200; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Optional. Configuration for index preparation for vector search. It
+     * contains the required configurations to create an index from source data,
+     * so that approximate nearest neighbor (a.k.a ANN) algorithms search can be
+     * performed during online serving.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig index_config = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearIndexConfig() { + bitField0_ = (bitField0_ & ~0x00000200); + indexConfig_ = null; + if (indexConfigBuilder_ != null) { + indexConfigBuilder_.dispose(); + indexConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Configuration for index preparation for vector search. It
+     * contains the required configurations to create an index from source data,
+     * so that approximate nearest neighbor (a.k.a ANN) algorithms search can be
+     * performed during online serving.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig index_config = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.Builder + getIndexConfigBuilder() { + bitField0_ |= 0x00000200; + onChanged(); + return getIndexConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Configuration for index preparation for vector search. It
+     * contains the required configurations to create an index from source data,
+     * so that approximate nearest neighbor (a.k.a ANN) algorithms search can be
+     * performed during online serving.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig index_config = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfigOrBuilder + getIndexConfigOrBuilder() { + if (indexConfigBuilder_ != null) { + return indexConfigBuilder_.getMessageOrBuilder(); + } else { + return indexConfig_ == null + ? com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.getDefaultInstance() + : indexConfig_; + } + } + /** + * + * + *
+     * Optional. Configuration for index preparation for vector search. It
+     * contains the required configurations to create an index from source data,
+     * so that approximate nearest neighbor (a.k.a ANN) algorithms search can be
+     * performed during online serving.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig index_config = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig, + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.Builder, + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfigOrBuilder> + getIndexConfigFieldBuilder() { + if (indexConfigBuilder_ == null) { + indexConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig, + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig.Builder, + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfigOrBuilder>( + getIndexConfig(), getParentForChildren(), isClean()); + indexConfig_ = null; + } + return indexConfigBuilder_; + } + private int serviceAgentType_ = 0; /** * @@ -11458,7 +15740,7 @@ public int getServiceAgentTypeValue() { */ public Builder setServiceAgentTypeValue(int value) { serviceAgentType_ = value; - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; onChanged(); return this; } @@ -11513,7 +15795,7 @@ public Builder setServiceAgentType( if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; serviceAgentType_ = value.getNumber(); onChanged(); return this; @@ -11537,7 +15819,7 @@ public Builder setServiceAgentType( * @return This builder for chaining. */ public Builder clearServiceAgentType() { - bitField0_ = (bitField0_ & ~0x00000200); + bitField0_ = (bitField0_ & ~0x00000400); serviceAgentType_ = 0; onChanged(); return this; @@ -11611,7 +15893,7 @@ public Builder setServiceAccountEmail(java.lang.String value) { throw new NullPointerException(); } serviceAccountEmail_ = value; - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000800; onChanged(); return this; } @@ -11630,7 +15912,7 @@ public Builder setServiceAccountEmail(java.lang.String value) { */ public Builder clearServiceAccountEmail() { serviceAccountEmail_ = getDefaultInstance().getServiceAccountEmail(); - bitField0_ = (bitField0_ & ~0x00000400); + bitField0_ = (bitField0_ & ~0x00000800); onChanged(); return this; } @@ -11654,7 +15936,7 @@ public Builder setServiceAccountEmailBytes(com.google.protobuf.ByteString value) } checkByteStringIsUtf8(value); serviceAccountEmail_ = value; - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000800; onChanged(); return this; } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FeatureViewOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FeatureViewOrBuilder.java index b366395a0d13..b5c68e53c4f0 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FeatureViewOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FeatureViewOrBuilder.java @@ -407,7 +407,7 @@ java.lang.String getLabelsOrDefault( *
* * @deprecated google.cloud.aiplatform.v1beta1.FeatureView.vector_search_config is deprecated. See - * google/cloud/aiplatform/v1beta1/feature_view.proto;l=220 + * google/cloud/aiplatform/v1beta1/feature_view.proto;l=304 * @return Whether the vectorSearchConfig field is set. */ @java.lang.Deprecated @@ -426,7 +426,7 @@ java.lang.String getLabelsOrDefault( *
* * @deprecated google.cloud.aiplatform.v1beta1.FeatureView.vector_search_config is deprecated. See - * google/cloud/aiplatform/v1beta1/feature_view.proto;l=220 + * google/cloud/aiplatform/v1beta1/feature_view.proto;l=304 * @return The vectorSearchConfig. */ @java.lang.Deprecated @@ -448,6 +448,56 @@ java.lang.String getLabelsOrDefault( com.google.cloud.aiplatform.v1beta1.FeatureView.VectorSearchConfigOrBuilder getVectorSearchConfigOrBuilder(); + /** + * + * + *
+   * Optional. Configuration for index preparation for vector search. It
+   * contains the required configurations to create an index from source data,
+   * so that approximate nearest neighbor (a.k.a ANN) algorithms search can be
+   * performed during online serving.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig index_config = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the indexConfig field is set. + */ + boolean hasIndexConfig(); + /** + * + * + *
+   * Optional. Configuration for index preparation for vector search. It
+   * contains the required configurations to create an index from source data,
+   * so that approximate nearest neighbor (a.k.a ANN) algorithms search can be
+   * performed during online serving.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig index_config = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The indexConfig. + */ + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig getIndexConfig(); + /** + * + * + *
+   * Optional. Configuration for index preparation for vector search. It
+   * contains the required configurations to create an index from source data,
+   * so that approximate nearest neighbor (a.k.a ANN) algorithms search can be
+   * performed during online serving.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.FeatureView.IndexConfig index_config = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.aiplatform.v1beta1.FeatureView.IndexConfigOrBuilder getIndexConfigOrBuilder(); + /** * * diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FeatureViewProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FeatureViewProto.java index d8241a09c662..39316f5f184c 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FeatureViewProto.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FeatureViewProto.java @@ -52,6 +52,18 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_aiplatform_v1beta1_FeatureView_VectorSearchConfig_TreeAHConfig_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_aiplatform_v1beta1_FeatureView_VectorSearchConfig_TreeAHConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_FeatureView_IndexConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_FeatureView_IndexConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_FeatureView_IndexConfig_BruteForceConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_FeatureView_IndexConfig_BruteForceConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_FeatureView_IndexConfig_TreeAHConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_FeatureView_IndexConfig_TreeAHConfig_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_aiplatform_v1beta1_FeatureView_FeatureRegistrySource_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -77,7 +89,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "e_view.proto\022\037google.cloud.aiplatform.v1" + "beta1\032\037google/api/field_behavior.proto\032\031" + "google/api/resource.proto\032\037google/protob" - + "uf/timestamp.proto\"\303\021\n\013FeatureView\022\\\n\020bi" + + "uf/timestamp.proto\"\221\030\n\013FeatureView\022\\\n\020bi" + "g_query_source\030\006 \001(\0132;.google.cloud.aipl" + "atform.v1beta1.FeatureView.BigQuerySourc" + "eB\003\340A\001H\000\022j\n\027feature_registry_source\030\t \001(" @@ -93,53 +105,74 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "tureView.SyncConfig\022d\n\024vector_search_con" + "fig\030\010 \001(\0132?.google.cloud.aiplatform.v1be" + "ta1.FeatureView.VectorSearchConfigB\005\030\001\340A" - + "\001\022^\n\022service_agent_type\030\016 \001(\0162=.google.c" - + "loud.aiplatform.v1beta1.FeatureView.Serv" - + "iceAgentTypeB\003\340A\001\022\"\n\025service_account_ema" - + "il\030\r \001(\tB\003\340A\003\032B\n\016BigQuerySource\022\020\n\003uri\030\001" - + " \001(\tB\003\340A\002\022\036\n\021entity_id_columns\030\002 \003(\tB\003\340A" - + "\002\032\032\n\nSyncConfig\022\014\n\004cron\030\001 \001(\t\032\226\006\n\022Vector" - + "SearchConfig\022k\n\016tree_ah_config\030\010 \001(\0132L.g" - + "oogle.cloud.aiplatform.v1beta1.FeatureVi" - + "ew.VectorSearchConfig.TreeAHConfigB\003\340A\001H" - + "\000\022s\n\022brute_force_config\030\t \001(\0132P.google.c" - + "loud.aiplatform.v1beta1.FeatureView.Vect" - + "orSearchConfig.BruteForceConfigB\003\340A\001H\000\022\035" - + "\n\020embedding_column\030\003 \001(\tB\003\340A\001\022\033\n\016filter_" - + "columns\030\004 \003(\tB\003\340A\001\022\034\n\017crowding_column\030\005 " - + "\001(\tB\003\340A\001\022%\n\023embedding_dimension\030\006 \001(\005B\003\340" - + "A\001H\001\210\001\001\022w\n\025distance_measure_type\030\007 \001(\0162S" + + "\001\022S\n\014index_config\030\017 \001(\01328.google.cloud.a" + + "iplatform.v1beta1.FeatureView.IndexConfi" + + "gB\003\340A\001\022^\n\022service_agent_type\030\016 \001(\0162=.goo" + + "gle.cloud.aiplatform.v1beta1.FeatureView" + + ".ServiceAgentTypeB\003\340A\001\022\"\n\025service_accoun" + + "t_email\030\r \001(\tB\003\340A\003\032B\n\016BigQuerySource\022\020\n\003" + + "uri\030\001 \001(\tB\003\340A\002\022\036\n\021entity_id_columns\030\002 \003(" + + "\tB\003\340A\002\032\032\n\nSyncConfig\022\014\n\004cron\030\001 \001(\t\032\226\006\n\022V" + + "ectorSearchConfig\022k\n\016tree_ah_config\030\010 \001(" + + "\0132L.google.cloud.aiplatform.v1beta1.Feat" + + "ureView.VectorSearchConfig.TreeAHConfigB" + + "\003\340A\001H\000\022s\n\022brute_force_config\030\t \001(\0132P.goo" + + "gle.cloud.aiplatform.v1beta1.FeatureView" + + ".VectorSearchConfig.BruteForceConfigB\003\340A" + + "\001H\000\022\035\n\020embedding_column\030\003 \001(\tB\003\340A\001\022\033\n\016fi" + + "lter_columns\030\004 \003(\tB\003\340A\001\022\034\n\017crowding_colu" + + "mn\030\005 \001(\tB\003\340A\001\022%\n\023embedding_dimension\030\006 \001" + + "(\005B\003\340A\001H\001\210\001\001\022w\n\025distance_measure_type\030\007 " + + "\001(\0162S.google.cloud.aiplatform.v1beta1.Fe" + + "atureView.VectorSearchConfig.DistanceMea" + + "sureTypeB\003\340A\001\032\022\n\020BruteForceConfig\032Y\n\014Tre" + + "eAHConfig\022+\n\031leaf_node_embedding_count\030\001" + + " \001(\003B\003\340A\001H\000\210\001\001B\034\n\032_leaf_node_embedding_c" + + "ount\"\204\001\n\023DistanceMeasureType\022%\n!DISTANCE" + + "_MEASURE_TYPE_UNSPECIFIED\020\000\022\027\n\023SQUARED_L" + + "2_DISTANCE\020\001\022\023\n\017COSINE_DISTANCE\020\002\022\030\n\024DOT" + + "_PRODUCT_DISTANCE\020\003:\002\030\001B\022\n\020algorithm_con" + + "figB\026\n\024_embedding_dimension\032\366\005\n\013IndexCon" + + "fig\022d\n\016tree_ah_config\030\006 \001(\0132E.google.clo" + + "ud.aiplatform.v1beta1.FeatureView.IndexC" + + "onfig.TreeAHConfigB\003\340A\001H\000\022l\n\022brute_force" + + "_config\030\007 \001(\0132I.google.cloud.aiplatform." + + "v1beta1.FeatureView.IndexConfig.BruteFor" + + "ceConfigB\003\340A\001H\000\022\035\n\020embedding_column\030\001 \001(" + + "\tB\003\340A\001\022\033\n\016filter_columns\030\002 \003(\tB\003\340A\001\022\034\n\017c" + + "rowding_column\030\003 \001(\tB\003\340A\001\022%\n\023embedding_d" + + "imension\030\004 \001(\005B\003\340A\001H\001\210\001\001\022p\n\025distance_mea" + + "sure_type\030\005 \001(\0162L.google.cloud.aiplatfor" + + "m.v1beta1.FeatureView.IndexConfig.Distan" + + "ceMeasureTypeB\003\340A\001\032\022\n\020BruteForceConfig\032Y" + + "\n\014TreeAHConfig\022+\n\031leaf_node_embedding_co" + + "unt\030\001 \001(\003B\003\340A\001H\000\210\001\001B\034\n\032_leaf_node_embedd" + + "ing_count\"\204\001\n\023DistanceMeasureType\022%\n!DIS" + + "TANCE_MEASURE_TYPE_UNSPECIFIED\020\000\022\027\n\023SQUA" + + "RED_L2_DISTANCE\020\001\022\023\n\017COSINE_DISTANCE\020\002\022\030" + + "\n\024DOT_PRODUCT_DISTANCE\020\003B\022\n\020algorithm_co" + + "nfigB\026\n\024_embedding_dimension\032\203\002\n\025Feature" + + "RegistrySource\022l\n\016feature_groups\030\001 \003(\0132O" + ".google.cloud.aiplatform.v1beta1.Feature" - + "View.VectorSearchConfig.DistanceMeasureT" - + "ypeB\003\340A\001\032\022\n\020BruteForceConfig\032Y\n\014TreeAHCo" - + "nfig\022+\n\031leaf_node_embedding_count\030\001 \001(\003B" - + "\003\340A\001H\000\210\001\001B\034\n\032_leaf_node_embedding_count\"" - + "\204\001\n\023DistanceMeasureType\022%\n!DISTANCE_MEAS" - + "URE_TYPE_UNSPECIFIED\020\000\022\027\n\023SQUARED_L2_DIS" - + "TANCE\020\001\022\023\n\017COSINE_DISTANCE\020\002\022\030\n\024DOT_PROD" - + "UCT_DISTANCE\020\003:\002\030\001B\022\n\020algorithm_configB\026" - + "\n\024_embedding_dimension\032\203\002\n\025FeatureRegist" - + "rySource\022l\n\016feature_groups\030\001 \003(\0132O.googl" - + "e.cloud.aiplatform.v1beta1.FeatureView.F" - + "eatureRegistrySource.FeatureGroupB\003\340A\002\022 " - + "\n\016project_number\030\002 \001(\003B\003\340A\001H\000\210\001\001\032G\n\014Feat" - + "ureGroup\022\035\n\020feature_group_id\030\001 \001(\tB\003\340A\002\022" - + "\030\n\013feature_ids\030\002 \003(\tB\003\340A\002B\021\n\017_project_nu" - + "mber\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005valu" - + "e\030\002 \001(\t:\0028\001\"{\n\020ServiceAgentType\022\"\n\036SERVI" - + "CE_AGENT_TYPE_UNSPECIFIED\020\000\022\036\n\032SERVICE_A" - + "GENT_TYPE_PROJECT\020\001\022#\n\037SERVICE_AGENT_TYP" - + "E_FEATURE_VIEW\020\002:\233\001\352A\227\001\n%aiplatform.goog" - + "leapis.com/FeatureView\022nprojects/{projec" - + "t}/locations/{location}/featureOnlineSto" - + "res/{feature_online_store}/featureViews/" - + "{feature_view}B\010\n\006sourceB\347\001\n#com.google." - + "cloud.aiplatform.v1beta1B\020FeatureViewPro" - + "toP\001ZCcloud.google.com/go/aiplatform/api" - + "v1beta1/aiplatformpb;aiplatformpb\252\002\037Goog" - + "le.Cloud.AIPlatform.V1Beta1\312\002\037Google\\Clo" - + "ud\\AIPlatform\\V1beta1\352\002\"Google::Cloud::A" - + "IPlatform::V1beta1b\006proto3" + + "View.FeatureRegistrySource.FeatureGroupB" + + "\003\340A\002\022 \n\016project_number\030\002 \001(\003B\003\340A\001H\000\210\001\001\032G" + + "\n\014FeatureGroup\022\035\n\020feature_group_id\030\001 \001(\t" + + "B\003\340A\002\022\030\n\013feature_ids\030\002 \003(\tB\003\340A\002B\021\n\017_proj" + + "ect_number\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r" + + "\n\005value\030\002 \001(\t:\0028\001\"{\n\020ServiceAgentType\022\"\n" + + "\036SERVICE_AGENT_TYPE_UNSPECIFIED\020\000\022\036\n\032SER" + + "VICE_AGENT_TYPE_PROJECT\020\001\022#\n\037SERVICE_AGE" + + "NT_TYPE_FEATURE_VIEW\020\002:\233\001\352A\227\001\n%aiplatfor" + + "m.googleapis.com/FeatureView\022nprojects/{" + + "project}/locations/{location}/featureOnl" + + "ineStores/{feature_online_store}/feature" + + "Views/{feature_view}B\010\n\006sourceB\347\001\n#com.g" + + "oogle.cloud.aiplatform.v1beta1B\020FeatureV" + + "iewProtoP\001ZCcloud.google.com/go/aiplatfo" + + "rm/apiv1beta1/aiplatformpb;aiplatformpb\252" + + "\002\037Google.Cloud.AIPlatform.V1Beta1\312\002\037Goog" + + "le\\Cloud\\AIPlatform\\V1beta1\352\002\"Google::Cl" + + "oud::AIPlatform::V1beta1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -164,6 +197,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Labels", "SyncConfig", "VectorSearchConfig", + "IndexConfig", "ServiceAgentType", "ServiceAccountEmail", "Source", @@ -223,10 +257,45 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "LeafNodeEmbeddingCount", }); - internal_static_google_cloud_aiplatform_v1beta1_FeatureView_FeatureRegistrySource_descriptor = + internal_static_google_cloud_aiplatform_v1beta1_FeatureView_IndexConfig_descriptor = internal_static_google_cloud_aiplatform_v1beta1_FeatureView_descriptor .getNestedTypes() .get(3); + internal_static_google_cloud_aiplatform_v1beta1_FeatureView_IndexConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_FeatureView_IndexConfig_descriptor, + new java.lang.String[] { + "TreeAhConfig", + "BruteForceConfig", + "EmbeddingColumn", + "FilterColumns", + "CrowdingColumn", + "EmbeddingDimension", + "DistanceMeasureType", + "AlgorithmConfig", + }); + internal_static_google_cloud_aiplatform_v1beta1_FeatureView_IndexConfig_BruteForceConfig_descriptor = + internal_static_google_cloud_aiplatform_v1beta1_FeatureView_IndexConfig_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_aiplatform_v1beta1_FeatureView_IndexConfig_BruteForceConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_FeatureView_IndexConfig_BruteForceConfig_descriptor, + new java.lang.String[] {}); + internal_static_google_cloud_aiplatform_v1beta1_FeatureView_IndexConfig_TreeAHConfig_descriptor = + internal_static_google_cloud_aiplatform_v1beta1_FeatureView_IndexConfig_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_aiplatform_v1beta1_FeatureView_IndexConfig_TreeAHConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_FeatureView_IndexConfig_TreeAHConfig_descriptor, + new java.lang.String[] { + "LeafNodeEmbeddingCount", + }); + internal_static_google_cloud_aiplatform_v1beta1_FeatureView_FeatureRegistrySource_descriptor = + internal_static_google_cloud_aiplatform_v1beta1_FeatureView_descriptor + .getNestedTypes() + .get(4); internal_static_google_cloud_aiplatform_v1beta1_FeatureView_FeatureRegistrySource_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1beta1_FeatureView_FeatureRegistrySource_descriptor, @@ -246,7 +315,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { internal_static_google_cloud_aiplatform_v1beta1_FeatureView_LabelsEntry_descriptor = internal_static_google_cloud_aiplatform_v1beta1_FeatureView_descriptor .getNestedTypes() - .get(4); + .get(5); internal_static_google_cloud_aiplatform_v1beta1_FeatureView_LabelsEntry_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1beta1_FeatureView_LabelsEntry_descriptor, diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FunctionCallingConfig.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FunctionCallingConfig.java index 21ea6da4881d..3607e0022a02 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FunctionCallingConfig.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FunctionCallingConfig.java @@ -261,7 +261,7 @@ private Mode(int value) { * * *
-   * Function calling mode.
+   * Optional. Function calling mode.
    * 
* * @@ -278,7 +278,7 @@ public int getModeValue() { * * *
-   * Function calling mode.
+   * Optional. Function calling mode.
    * 
* * @@ -305,9 +305,9 @@ public com.google.cloud.aiplatform.v1beta1.FunctionCallingConfig.Mode getMode() * * *
-   * Function names to call. Only set when the Mode is ANY. Function names
-   * should match [FunctionDeclaration.name]. With mode set to ANY, model will
-   * predict a function call from the set of function names provided.
+   * Optional. Function names to call. Only set when the Mode is ANY. Function
+   * names should match [FunctionDeclaration.name]. With mode set to ANY, model
+   * will predict a function call from the set of function names provided.
    * 
* * repeated string allowed_function_names = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -322,9 +322,9 @@ public com.google.protobuf.ProtocolStringList getAllowedFunctionNamesList() { * * *
-   * Function names to call. Only set when the Mode is ANY. Function names
-   * should match [FunctionDeclaration.name]. With mode set to ANY, model will
-   * predict a function call from the set of function names provided.
+   * Optional. Function names to call. Only set when the Mode is ANY. Function
+   * names should match [FunctionDeclaration.name]. With mode set to ANY, model
+   * will predict a function call from the set of function names provided.
    * 
* * repeated string allowed_function_names = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -339,9 +339,9 @@ public int getAllowedFunctionNamesCount() { * * *
-   * Function names to call. Only set when the Mode is ANY. Function names
-   * should match [FunctionDeclaration.name]. With mode set to ANY, model will
-   * predict a function call from the set of function names provided.
+   * Optional. Function names to call. Only set when the Mode is ANY. Function
+   * names should match [FunctionDeclaration.name]. With mode set to ANY, model
+   * will predict a function call from the set of function names provided.
    * 
* * repeated string allowed_function_names = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -357,9 +357,9 @@ public java.lang.String getAllowedFunctionNames(int index) { * * *
-   * Function names to call. Only set when the Mode is ANY. Function names
-   * should match [FunctionDeclaration.name]. With mode set to ANY, model will
-   * predict a function call from the set of function names provided.
+   * Optional. Function names to call. Only set when the Mode is ANY. Function
+   * names should match [FunctionDeclaration.name]. With mode set to ANY, model
+   * will predict a function call from the set of function names provided.
    * 
* * repeated string allowed_function_names = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -761,7 +761,7 @@ public Builder mergeFrom( * * *
-     * Function calling mode.
+     * Optional. Function calling mode.
      * 
* * @@ -778,7 +778,7 @@ public int getModeValue() { * * *
-     * Function calling mode.
+     * Optional. Function calling mode.
      * 
* * @@ -798,7 +798,7 @@ public Builder setModeValue(int value) { * * *
-     * Function calling mode.
+     * Optional. Function calling mode.
      * 
* * @@ -819,7 +819,7 @@ public com.google.cloud.aiplatform.v1beta1.FunctionCallingConfig.Mode getMode() * * *
-     * Function calling mode.
+     * Optional. Function calling mode.
      * 
* * @@ -842,7 +842,7 @@ public Builder setMode(com.google.cloud.aiplatform.v1beta1.FunctionCallingConfig * * *
-     * Function calling mode.
+     * Optional. Function calling mode.
      * 
* * @@ -871,9 +871,9 @@ private void ensureAllowedFunctionNamesIsMutable() { * * *
-     * Function names to call. Only set when the Mode is ANY. Function names
-     * should match [FunctionDeclaration.name]. With mode set to ANY, model will
-     * predict a function call from the set of function names provided.
+     * Optional. Function names to call. Only set when the Mode is ANY. Function
+     * names should match [FunctionDeclaration.name]. With mode set to ANY, model
+     * will predict a function call from the set of function names provided.
      * 
* * repeated string allowed_function_names = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -889,9 +889,9 @@ public com.google.protobuf.ProtocolStringList getAllowedFunctionNamesList() { * * *
-     * Function names to call. Only set when the Mode is ANY. Function names
-     * should match [FunctionDeclaration.name]. With mode set to ANY, model will
-     * predict a function call from the set of function names provided.
+     * Optional. Function names to call. Only set when the Mode is ANY. Function
+     * names should match [FunctionDeclaration.name]. With mode set to ANY, model
+     * will predict a function call from the set of function names provided.
      * 
* * repeated string allowed_function_names = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -906,9 +906,9 @@ public int getAllowedFunctionNamesCount() { * * *
-     * Function names to call. Only set when the Mode is ANY. Function names
-     * should match [FunctionDeclaration.name]. With mode set to ANY, model will
-     * predict a function call from the set of function names provided.
+     * Optional. Function names to call. Only set when the Mode is ANY. Function
+     * names should match [FunctionDeclaration.name]. With mode set to ANY, model
+     * will predict a function call from the set of function names provided.
      * 
* * repeated string allowed_function_names = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -924,9 +924,9 @@ public java.lang.String getAllowedFunctionNames(int index) { * * *
-     * Function names to call. Only set when the Mode is ANY. Function names
-     * should match [FunctionDeclaration.name]. With mode set to ANY, model will
-     * predict a function call from the set of function names provided.
+     * Optional. Function names to call. Only set when the Mode is ANY. Function
+     * names should match [FunctionDeclaration.name]. With mode set to ANY, model
+     * will predict a function call from the set of function names provided.
      * 
* * repeated string allowed_function_names = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -942,9 +942,9 @@ public com.google.protobuf.ByteString getAllowedFunctionNamesBytes(int index) { * * *
-     * Function names to call. Only set when the Mode is ANY. Function names
-     * should match [FunctionDeclaration.name]. With mode set to ANY, model will
-     * predict a function call from the set of function names provided.
+     * Optional. Function names to call. Only set when the Mode is ANY. Function
+     * names should match [FunctionDeclaration.name]. With mode set to ANY, model
+     * will predict a function call from the set of function names provided.
      * 
* * repeated string allowed_function_names = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -968,9 +968,9 @@ public Builder setAllowedFunctionNames(int index, java.lang.String value) { * * *
-     * Function names to call. Only set when the Mode is ANY. Function names
-     * should match [FunctionDeclaration.name]. With mode set to ANY, model will
-     * predict a function call from the set of function names provided.
+     * Optional. Function names to call. Only set when the Mode is ANY. Function
+     * names should match [FunctionDeclaration.name]. With mode set to ANY, model
+     * will predict a function call from the set of function names provided.
      * 
* * repeated string allowed_function_names = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -993,9 +993,9 @@ public Builder addAllowedFunctionNames(java.lang.String value) { * * *
-     * Function names to call. Only set when the Mode is ANY. Function names
-     * should match [FunctionDeclaration.name]. With mode set to ANY, model will
-     * predict a function call from the set of function names provided.
+     * Optional. Function names to call. Only set when the Mode is ANY. Function
+     * names should match [FunctionDeclaration.name]. With mode set to ANY, model
+     * will predict a function call from the set of function names provided.
      * 
* * repeated string allowed_function_names = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -1015,9 +1015,9 @@ public Builder addAllAllowedFunctionNames(java.lang.Iterable v * * *
-     * Function names to call. Only set when the Mode is ANY. Function names
-     * should match [FunctionDeclaration.name]. With mode set to ANY, model will
-     * predict a function call from the set of function names provided.
+     * Optional. Function names to call. Only set when the Mode is ANY. Function
+     * names should match [FunctionDeclaration.name]. With mode set to ANY, model
+     * will predict a function call from the set of function names provided.
      * 
* * repeated string allowed_function_names = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -1036,9 +1036,9 @@ public Builder clearAllowedFunctionNames() { * * *
-     * Function names to call. Only set when the Mode is ANY. Function names
-     * should match [FunctionDeclaration.name]. With mode set to ANY, model will
-     * predict a function call from the set of function names provided.
+     * Optional. Function names to call. Only set when the Mode is ANY. Function
+     * names should match [FunctionDeclaration.name]. With mode set to ANY, model
+     * will predict a function call from the set of function names provided.
      * 
* * repeated string allowed_function_names = 2 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FunctionCallingConfigOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FunctionCallingConfigOrBuilder.java index 2ff7d4362b6f..89122b2c233f 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FunctionCallingConfigOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/FunctionCallingConfigOrBuilder.java @@ -28,7 +28,7 @@ public interface FunctionCallingConfigOrBuilder * * *
-   * Function calling mode.
+   * Optional. Function calling mode.
    * 
* * @@ -42,7 +42,7 @@ public interface FunctionCallingConfigOrBuilder * * *
-   * Function calling mode.
+   * Optional. Function calling mode.
    * 
* * @@ -57,9 +57,9 @@ public interface FunctionCallingConfigOrBuilder * * *
-   * Function names to call. Only set when the Mode is ANY. Function names
-   * should match [FunctionDeclaration.name]. With mode set to ANY, model will
-   * predict a function call from the set of function names provided.
+   * Optional. Function names to call. Only set when the Mode is ANY. Function
+   * names should match [FunctionDeclaration.name]. With mode set to ANY, model
+   * will predict a function call from the set of function names provided.
    * 
* * repeated string allowed_function_names = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -72,9 +72,9 @@ public interface FunctionCallingConfigOrBuilder * * *
-   * Function names to call. Only set when the Mode is ANY. Function names
-   * should match [FunctionDeclaration.name]. With mode set to ANY, model will
-   * predict a function call from the set of function names provided.
+   * Optional. Function names to call. Only set when the Mode is ANY. Function
+   * names should match [FunctionDeclaration.name]. With mode set to ANY, model
+   * will predict a function call from the set of function names provided.
    * 
* * repeated string allowed_function_names = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -87,9 +87,9 @@ public interface FunctionCallingConfigOrBuilder * * *
-   * Function names to call. Only set when the Mode is ANY. Function names
-   * should match [FunctionDeclaration.name]. With mode set to ANY, model will
-   * predict a function call from the set of function names provided.
+   * Optional. Function names to call. Only set when the Mode is ANY. Function
+   * names should match [FunctionDeclaration.name]. With mode set to ANY, model
+   * will predict a function call from the set of function names provided.
    * 
* * repeated string allowed_function_names = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -103,9 +103,9 @@ public interface FunctionCallingConfigOrBuilder * * *
-   * Function names to call. Only set when the Mode is ANY. Function names
-   * should match [FunctionDeclaration.name]. With mode set to ANY, model will
-   * predict a function call from the set of function names provided.
+   * Optional. Function names to call. Only set when the Mode is ANY. Function
+   * names should match [FunctionDeclaration.name]. With mode set to ANY, model
+   * will predict a function call from the set of function names provided.
    * 
* * repeated string allowed_function_names = 2 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GenerateContentRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GenerateContentRequest.java index a2bf21b6a87b..d149dd0cf3b2 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GenerateContentRequest.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GenerateContentRequest.java @@ -223,6 +223,68 @@ public com.google.cloud.aiplatform.v1beta1.ContentOrBuilder getContentsOrBuilder return contents_.get(index); } + public static final int SYSTEM_INSTRUCTION_FIELD_NUMBER = 8; + private com.google.cloud.aiplatform.v1beta1.Content systemInstruction_; + /** + * + * + *
+   * Optional. The user provided system instructions for the model.
+   * Note: only text should be used in parts and content in each part will be in
+   * a separate paragraph.
+   * 
+ * + * + * optional .google.cloud.aiplatform.v1beta1.Content system_instruction = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the systemInstruction field is set. + */ + @java.lang.Override + public boolean hasSystemInstruction() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Optional. The user provided system instructions for the model.
+   * Note: only text should be used in parts and content in each part will be in
+   * a separate paragraph.
+   * 
+ * + * + * optional .google.cloud.aiplatform.v1beta1.Content system_instruction = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The systemInstruction. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.Content getSystemInstruction() { + return systemInstruction_ == null + ? com.google.cloud.aiplatform.v1beta1.Content.getDefaultInstance() + : systemInstruction_; + } + /** + * + * + *
+   * Optional. The user provided system instructions for the model.
+   * Note: only text should be used in parts and content in each part will be in
+   * a separate paragraph.
+   * 
+ * + * + * optional .google.cloud.aiplatform.v1beta1.Content system_instruction = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ContentOrBuilder getSystemInstructionOrBuilder() { + return systemInstruction_ == null + ? com.google.cloud.aiplatform.v1beta1.Content.getDefaultInstance() + : systemInstruction_; + } + public static final int TOOLS_FIELD_NUMBER = 6; @SuppressWarnings("serial") @@ -335,7 +397,8 @@ public com.google.cloud.aiplatform.v1beta1.ToolOrBuilder getToolsOrBuilder(int i * * *
-   * Tool config. This config is shared for all tools provided in the request.
+   * Optional. Tool config. This config is shared for all tools provided in the
+   * request.
    * 
* * @@ -346,13 +409,14 @@ public com.google.cloud.aiplatform.v1beta1.ToolOrBuilder getToolsOrBuilder(int i */ @java.lang.Override public boolean hasToolConfig() { - return ((bitField0_ & 0x00000001) != 0); + return ((bitField0_ & 0x00000002) != 0); } /** * * *
-   * Tool config. This config is shared for all tools provided in the request.
+   * Optional. Tool config. This config is shared for all tools provided in the
+   * request.
    * 
* * @@ -371,7 +435,8 @@ public com.google.cloud.aiplatform.v1beta1.ToolConfig getToolConfig() { * * *
-   * Tool config. This config is shared for all tools provided in the request.
+   * Optional. Tool config. This config is shared for all tools provided in the
+   * request.
    * 
* * @@ -489,7 +554,7 @@ public com.google.cloud.aiplatform.v1beta1.SafetySettingOrBuilder getSafetySetti */ @java.lang.Override public boolean hasGenerationConfig() { - return ((bitField0_ & 0x00000002) != 0); + return ((bitField0_ & 0x00000004) != 0); } /** * @@ -549,7 +614,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < safetySettings_.size(); i++) { output.writeMessage(3, safetySettings_.get(i)); } - if (((bitField0_ & 0x00000002) != 0)) { + if (((bitField0_ & 0x00000004) != 0)) { output.writeMessage(4, getGenerationConfig()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) { @@ -558,9 +623,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < tools_.size(); i++) { output.writeMessage(6, tools_.get(i)); } - if (((bitField0_ & 0x00000001) != 0)) { + if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(7, getToolConfig()); } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(8, getSystemInstruction()); + } getUnknownFields().writeTo(output); } @@ -576,7 +644,7 @@ public int getSerializedSize() { for (int i = 0; i < safetySettings_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, safetySettings_.get(i)); } - if (((bitField0_ & 0x00000002) != 0)) { + if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getGenerationConfig()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) { @@ -585,9 +653,12 @@ public int getSerializedSize() { for (int i = 0; i < tools_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, tools_.get(i)); } - if (((bitField0_ & 0x00000001) != 0)) { + if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getToolConfig()); } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getSystemInstruction()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -606,6 +677,10 @@ public boolean equals(final java.lang.Object obj) { if (!getModel().equals(other.getModel())) return false; if (!getContentsList().equals(other.getContentsList())) return false; + if (hasSystemInstruction() != other.hasSystemInstruction()) return false; + if (hasSystemInstruction()) { + if (!getSystemInstruction().equals(other.getSystemInstruction())) return false; + } if (!getToolsList().equals(other.getToolsList())) return false; if (hasToolConfig() != other.hasToolConfig()) return false; if (hasToolConfig()) { @@ -633,6 +708,10 @@ public int hashCode() { hash = (37 * hash) + CONTENTS_FIELD_NUMBER; hash = (53 * hash) + getContentsList().hashCode(); } + if (hasSystemInstruction()) { + hash = (37 * hash) + SYSTEM_INSTRUCTION_FIELD_NUMBER; + hash = (53 * hash) + getSystemInstruction().hashCode(); + } if (getToolsCount() > 0) { hash = (37 * hash) + TOOLS_FIELD_NUMBER; hash = (53 * hash) + getToolsList().hashCode(); @@ -791,6 +870,7 @@ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { getContentsFieldBuilder(); + getSystemInstructionFieldBuilder(); getToolsFieldBuilder(); getToolConfigFieldBuilder(); getSafetySettingsFieldBuilder(); @@ -810,13 +890,18 @@ public Builder clear() { contentsBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000002); + systemInstruction_ = null; + if (systemInstructionBuilder_ != null) { + systemInstructionBuilder_.dispose(); + systemInstructionBuilder_ = null; + } if (toolsBuilder_ == null) { tools_ = java.util.Collections.emptyList(); } else { tools_ = null; toolsBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000008); toolConfig_ = null; if (toolConfigBuilder_ != null) { toolConfigBuilder_.dispose(); @@ -828,7 +913,7 @@ public Builder clear() { safetySettings_ = null; safetySettingsBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000020); generationConfig_ = null; if (generationConfigBuilder_ != null) { generationConfigBuilder_.dispose(); @@ -881,18 +966,18 @@ private void buildPartialRepeatedFields( result.contents_ = contentsBuilder_.build(); } if (toolsBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { + if (((bitField0_ & 0x00000008) != 0)) { tools_ = java.util.Collections.unmodifiableList(tools_); - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000008); } result.tools_ = tools_; } else { result.tools_ = toolsBuilder_.build(); } if (safetySettingsBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0)) { + if (((bitField0_ & 0x00000020) != 0)) { safetySettings_ = java.util.Collections.unmodifiableList(safetySettings_); - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000020); } result.safetySettings_ = safetySettings_; } else { @@ -906,14 +991,21 @@ private void buildPartial0(com.google.cloud.aiplatform.v1beta1.GenerateContentRe result.model_ = model_; } int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000008) != 0)) { - result.toolConfig_ = toolConfigBuilder_ == null ? toolConfig_ : toolConfigBuilder_.build(); + if (((from_bitField0_ & 0x00000004) != 0)) { + result.systemInstruction_ = + systemInstructionBuilder_ == null + ? systemInstruction_ + : systemInstructionBuilder_.build(); to_bitField0_ |= 0x00000001; } - if (((from_bitField0_ & 0x00000020) != 0)) { + if (((from_bitField0_ & 0x00000010) != 0)) { + result.toolConfig_ = toolConfigBuilder_ == null ? toolConfig_ : toolConfigBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000040) != 0)) { result.generationConfig_ = generationConfigBuilder_ == null ? generationConfig_ : generationConfigBuilder_.build(); - to_bitField0_ |= 0x00000002; + to_bitField0_ |= 0x00000004; } result.bitField0_ |= to_bitField0_; } @@ -996,11 +1088,14 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.GenerateContentRequ } } } + if (other.hasSystemInstruction()) { + mergeSystemInstruction(other.getSystemInstruction()); + } if (toolsBuilder_ == null) { if (!other.tools_.isEmpty()) { if (tools_.isEmpty()) { tools_ = other.tools_; - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000008); } else { ensureToolsIsMutable(); tools_.addAll(other.tools_); @@ -1013,7 +1108,7 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.GenerateContentRequ toolsBuilder_.dispose(); toolsBuilder_ = null; tools_ = other.tools_; - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000008); toolsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getToolsFieldBuilder() @@ -1030,7 +1125,7 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.GenerateContentRequ if (!other.safetySettings_.isEmpty()) { if (safetySettings_.isEmpty()) { safetySettings_ = other.safetySettings_; - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000020); } else { ensureSafetySettingsIsMutable(); safetySettings_.addAll(other.safetySettings_); @@ -1043,7 +1138,7 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.GenerateContentRequ safetySettingsBuilder_.dispose(); safetySettingsBuilder_ = null; safetySettings_ = other.safetySettings_; - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000020); safetySettingsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getSafetySettingsFieldBuilder() @@ -1113,7 +1208,7 @@ public Builder mergeFrom( { input.readMessage( getGenerationConfigFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; break; } // case 34 case 42: @@ -1138,9 +1233,16 @@ public Builder mergeFrom( case 58: { input.readMessage(getToolConfigFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; break; } // case 58 + case 66: + { + input.readMessage( + getSystemInstructionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 66 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1734,13 +1836,236 @@ public com.google.cloud.aiplatform.v1beta1.Content.Builder addContentsBuilder(in return contentsBuilder_; } + private com.google.cloud.aiplatform.v1beta1.Content systemInstruction_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.Content, + com.google.cloud.aiplatform.v1beta1.Content.Builder, + com.google.cloud.aiplatform.v1beta1.ContentOrBuilder> + systemInstructionBuilder_; + /** + * + * + *
+     * Optional. The user provided system instructions for the model.
+     * Note: only text should be used in parts and content in each part will be in
+     * a separate paragraph.
+     * 
+ * + * + * optional .google.cloud.aiplatform.v1beta1.Content system_instruction = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the systemInstruction field is set. + */ + public boolean hasSystemInstruction() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Optional. The user provided system instructions for the model.
+     * Note: only text should be used in parts and content in each part will be in
+     * a separate paragraph.
+     * 
+ * + * + * optional .google.cloud.aiplatform.v1beta1.Content system_instruction = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The systemInstruction. + */ + public com.google.cloud.aiplatform.v1beta1.Content getSystemInstruction() { + if (systemInstructionBuilder_ == null) { + return systemInstruction_ == null + ? com.google.cloud.aiplatform.v1beta1.Content.getDefaultInstance() + : systemInstruction_; + } else { + return systemInstructionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. The user provided system instructions for the model.
+     * Note: only text should be used in parts and content in each part will be in
+     * a separate paragraph.
+     * 
+ * + * + * optional .google.cloud.aiplatform.v1beta1.Content system_instruction = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSystemInstruction(com.google.cloud.aiplatform.v1beta1.Content value) { + if (systemInstructionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + systemInstruction_ = value; + } else { + systemInstructionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The user provided system instructions for the model.
+     * Note: only text should be used in parts and content in each part will be in
+     * a separate paragraph.
+     * 
+ * + * + * optional .google.cloud.aiplatform.v1beta1.Content system_instruction = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSystemInstruction( + com.google.cloud.aiplatform.v1beta1.Content.Builder builderForValue) { + if (systemInstructionBuilder_ == null) { + systemInstruction_ = builderForValue.build(); + } else { + systemInstructionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The user provided system instructions for the model.
+     * Note: only text should be used in parts and content in each part will be in
+     * a separate paragraph.
+     * 
+ * + * + * optional .google.cloud.aiplatform.v1beta1.Content system_instruction = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeSystemInstruction(com.google.cloud.aiplatform.v1beta1.Content value) { + if (systemInstructionBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && systemInstruction_ != null + && systemInstruction_ + != com.google.cloud.aiplatform.v1beta1.Content.getDefaultInstance()) { + getSystemInstructionBuilder().mergeFrom(value); + } else { + systemInstruction_ = value; + } + } else { + systemInstructionBuilder_.mergeFrom(value); + } + if (systemInstruction_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Optional. The user provided system instructions for the model.
+     * Note: only text should be used in parts and content in each part will be in
+     * a separate paragraph.
+     * 
+ * + * + * optional .google.cloud.aiplatform.v1beta1.Content system_instruction = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearSystemInstruction() { + bitField0_ = (bitField0_ & ~0x00000004); + systemInstruction_ = null; + if (systemInstructionBuilder_ != null) { + systemInstructionBuilder_.dispose(); + systemInstructionBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The user provided system instructions for the model.
+     * Note: only text should be used in parts and content in each part will be in
+     * a separate paragraph.
+     * 
+ * + * + * optional .google.cloud.aiplatform.v1beta1.Content system_instruction = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1beta1.Content.Builder getSystemInstructionBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getSystemInstructionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The user provided system instructions for the model.
+     * Note: only text should be used in parts and content in each part will be in
+     * a separate paragraph.
+     * 
+ * + * + * optional .google.cloud.aiplatform.v1beta1.Content system_instruction = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1beta1.ContentOrBuilder getSystemInstructionOrBuilder() { + if (systemInstructionBuilder_ != null) { + return systemInstructionBuilder_.getMessageOrBuilder(); + } else { + return systemInstruction_ == null + ? com.google.cloud.aiplatform.v1beta1.Content.getDefaultInstance() + : systemInstruction_; + } + } + /** + * + * + *
+     * Optional. The user provided system instructions for the model.
+     * Note: only text should be used in parts and content in each part will be in
+     * a separate paragraph.
+     * 
+ * + * + * optional .google.cloud.aiplatform.v1beta1.Content system_instruction = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.Content, + com.google.cloud.aiplatform.v1beta1.Content.Builder, + com.google.cloud.aiplatform.v1beta1.ContentOrBuilder> + getSystemInstructionFieldBuilder() { + if (systemInstructionBuilder_ == null) { + systemInstructionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.Content, + com.google.cloud.aiplatform.v1beta1.Content.Builder, + com.google.cloud.aiplatform.v1beta1.ContentOrBuilder>( + getSystemInstruction(), getParentForChildren(), isClean()); + systemInstruction_ = null; + } + return systemInstructionBuilder_; + } + private java.util.List tools_ = java.util.Collections.emptyList(); private void ensureToolsIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { + if (!((bitField0_ & 0x00000008) != 0)) { tools_ = new java.util.ArrayList(tools_); - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; } } @@ -2032,7 +2357,7 @@ public Builder addAllTools( public Builder clearTools() { if (toolsBuilder_ == null) { tools_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000008); onChanged(); } else { toolsBuilder_.clear(); @@ -2202,7 +2527,7 @@ public java.util.List getTools com.google.cloud.aiplatform.v1beta1.Tool, com.google.cloud.aiplatform.v1beta1.Tool.Builder, com.google.cloud.aiplatform.v1beta1.ToolOrBuilder>( - tools_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + tools_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); tools_ = null; } return toolsBuilder_; @@ -2218,7 +2543,8 @@ public java.util.List getTools * * *
-     * Tool config. This config is shared for all tools provided in the request.
+     * Optional. Tool config. This config is shared for all tools provided in the
+     * request.
      * 
* * @@ -2228,13 +2554,14 @@ public java.util.List getTools * @return Whether the toolConfig field is set. */ public boolean hasToolConfig() { - return ((bitField0_ & 0x00000008) != 0); + return ((bitField0_ & 0x00000010) != 0); } /** * * *
-     * Tool config. This config is shared for all tools provided in the request.
+     * Optional. Tool config. This config is shared for all tools provided in the
+     * request.
      * 
* * @@ -2256,7 +2583,8 @@ public com.google.cloud.aiplatform.v1beta1.ToolConfig getToolConfig() { * * *
-     * Tool config. This config is shared for all tools provided in the request.
+     * Optional. Tool config. This config is shared for all tools provided in the
+     * request.
      * 
* * @@ -2272,7 +2600,7 @@ public Builder setToolConfig(com.google.cloud.aiplatform.v1beta1.ToolConfig valu } else { toolConfigBuilder_.setMessage(value); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -2280,7 +2608,8 @@ public Builder setToolConfig(com.google.cloud.aiplatform.v1beta1.ToolConfig valu * * *
-     * Tool config. This config is shared for all tools provided in the request.
+     * Optional. Tool config. This config is shared for all tools provided in the
+     * request.
      * 
* * @@ -2294,7 +2623,7 @@ public Builder setToolConfig( } else { toolConfigBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -2302,7 +2631,8 @@ public Builder setToolConfig( * * *
-     * Tool config. This config is shared for all tools provided in the request.
+     * Optional. Tool config. This config is shared for all tools provided in the
+     * request.
      * 
* * @@ -2311,7 +2641,7 @@ public Builder setToolConfig( */ public Builder mergeToolConfig(com.google.cloud.aiplatform.v1beta1.ToolConfig value) { if (toolConfigBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) + if (((bitField0_ & 0x00000010) != 0) && toolConfig_ != null && toolConfig_ != com.google.cloud.aiplatform.v1beta1.ToolConfig.getDefaultInstance()) { getToolConfigBuilder().mergeFrom(value); @@ -2322,7 +2652,7 @@ public Builder mergeToolConfig(com.google.cloud.aiplatform.v1beta1.ToolConfig va toolConfigBuilder_.mergeFrom(value); } if (toolConfig_ != null) { - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); } return this; @@ -2331,7 +2661,8 @@ public Builder mergeToolConfig(com.google.cloud.aiplatform.v1beta1.ToolConfig va * * *
-     * Tool config. This config is shared for all tools provided in the request.
+     * Optional. Tool config. This config is shared for all tools provided in the
+     * request.
      * 
* * @@ -2339,7 +2670,7 @@ public Builder mergeToolConfig(com.google.cloud.aiplatform.v1beta1.ToolConfig va * */ public Builder clearToolConfig() { - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000010); toolConfig_ = null; if (toolConfigBuilder_ != null) { toolConfigBuilder_.dispose(); @@ -2352,7 +2683,8 @@ public Builder clearToolConfig() { * * *
-     * Tool config. This config is shared for all tools provided in the request.
+     * Optional. Tool config. This config is shared for all tools provided in the
+     * request.
      * 
* * @@ -2360,7 +2692,7 @@ public Builder clearToolConfig() { * */ public com.google.cloud.aiplatform.v1beta1.ToolConfig.Builder getToolConfigBuilder() { - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return getToolConfigFieldBuilder().getBuilder(); } @@ -2368,7 +2700,8 @@ public com.google.cloud.aiplatform.v1beta1.ToolConfig.Builder getToolConfigBuild * * *
-     * Tool config. This config is shared for all tools provided in the request.
+     * Optional. Tool config. This config is shared for all tools provided in the
+     * request.
      * 
* * @@ -2388,7 +2721,8 @@ public com.google.cloud.aiplatform.v1beta1.ToolConfigOrBuilder getToolConfigOrBu * * *
-     * Tool config. This config is shared for all tools provided in the request.
+     * Optional. Tool config. This config is shared for all tools provided in the
+     * request.
      * 
* * @@ -2416,11 +2750,11 @@ public com.google.cloud.aiplatform.v1beta1.ToolConfigOrBuilder getToolConfigOrBu java.util.Collections.emptyList(); private void ensureSafetySettingsIsMutable() { - if (!((bitField0_ & 0x00000010) != 0)) { + if (!((bitField0_ & 0x00000020) != 0)) { safetySettings_ = new java.util.ArrayList( safetySettings_); - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; } } @@ -2672,7 +3006,7 @@ public Builder addAllSafetySettings( public Builder clearSafetySettings() { if (safetySettingsBuilder_ == null) { safetySettings_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000020); onChanged(); } else { safetySettingsBuilder_.clear(); @@ -2820,7 +3154,7 @@ public com.google.cloud.aiplatform.v1beta1.SafetySetting.Builder addSafetySettin com.google.cloud.aiplatform.v1beta1.SafetySetting.Builder, com.google.cloud.aiplatform.v1beta1.SafetySettingOrBuilder>( safetySettings_, - ((bitField0_ & 0x00000010) != 0), + ((bitField0_ & 0x00000020) != 0), getParentForChildren(), isClean()); safetySettings_ = null; @@ -2848,7 +3182,7 @@ public com.google.cloud.aiplatform.v1beta1.SafetySetting.Builder addSafetySettin * @return Whether the generationConfig field is set. */ public boolean hasGenerationConfig() { - return ((bitField0_ & 0x00000020) != 0); + return ((bitField0_ & 0x00000040) != 0); } /** * @@ -2892,7 +3226,7 @@ public Builder setGenerationConfig(com.google.cloud.aiplatform.v1beta1.Generatio } else { generationConfigBuilder_.setMessage(value); } - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -2914,7 +3248,7 @@ public Builder setGenerationConfig( } else { generationConfigBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -2932,7 +3266,7 @@ public Builder setGenerationConfig( public Builder mergeGenerationConfig( com.google.cloud.aiplatform.v1beta1.GenerationConfig value) { if (generationConfigBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0) + if (((bitField0_ & 0x00000040) != 0) && generationConfig_ != null && generationConfig_ != com.google.cloud.aiplatform.v1beta1.GenerationConfig.getDefaultInstance()) { @@ -2944,7 +3278,7 @@ public Builder mergeGenerationConfig( generationConfigBuilder_.mergeFrom(value); } if (generationConfig_ != null) { - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); } return this; @@ -2961,7 +3295,7 @@ public Builder mergeGenerationConfig( * */ public Builder clearGenerationConfig() { - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000040); generationConfig_ = null; if (generationConfigBuilder_ != null) { generationConfigBuilder_.dispose(); @@ -2983,7 +3317,7 @@ public Builder clearGenerationConfig() { */ public com.google.cloud.aiplatform.v1beta1.GenerationConfig.Builder getGenerationConfigBuilder() { - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); return getGenerationConfigFieldBuilder().getBuilder(); } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GenerateContentRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GenerateContentRequestOrBuilder.java index e1c7722dbccd..4955906b06ad 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GenerateContentRequestOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GenerateContentRequestOrBuilder.java @@ -135,6 +135,53 @@ public interface GenerateContentRequestOrBuilder */ com.google.cloud.aiplatform.v1beta1.ContentOrBuilder getContentsOrBuilder(int index); + /** + * + * + *
+   * Optional. The user provided system instructions for the model.
+   * Note: only text should be used in parts and content in each part will be in
+   * a separate paragraph.
+   * 
+ * + * + * optional .google.cloud.aiplatform.v1beta1.Content system_instruction = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the systemInstruction field is set. + */ + boolean hasSystemInstruction(); + /** + * + * + *
+   * Optional. The user provided system instructions for the model.
+   * Note: only text should be used in parts and content in each part will be in
+   * a separate paragraph.
+   * 
+ * + * + * optional .google.cloud.aiplatform.v1beta1.Content system_instruction = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The systemInstruction. + */ + com.google.cloud.aiplatform.v1beta1.Content getSystemInstruction(); + /** + * + * + *
+   * Optional. The user provided system instructions for the model.
+   * Note: only text should be used in parts and content in each part will be in
+   * a separate paragraph.
+   * 
+ * + * + * optional .google.cloud.aiplatform.v1beta1.Content system_instruction = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.aiplatform.v1beta1.ContentOrBuilder getSystemInstructionOrBuilder(); + /** * * @@ -226,7 +273,8 @@ public interface GenerateContentRequestOrBuilder * * *
-   * Tool config. This config is shared for all tools provided in the request.
+   * Optional. Tool config. This config is shared for all tools provided in the
+   * request.
    * 
* * @@ -240,7 +288,8 @@ public interface GenerateContentRequestOrBuilder * * *
-   * Tool config. This config is shared for all tools provided in the request.
+   * Optional. Tool config. This config is shared for all tools provided in the
+   * request.
    * 
* * @@ -254,7 +303,8 @@ public interface GenerateContentRequestOrBuilder * * *
-   * Tool config. This config is shared for all tools provided in the request.
+   * Optional. Tool config. This config is shared for all tools provided in the
+   * request.
    * 
* * diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GenerateContentResponse.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GenerateContentResponse.java index ac118e23f746..b4b3bcd90eca 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GenerateContentResponse.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GenerateContentResponse.java @@ -273,6 +273,27 @@ public enum BlockedReason implements com.google.protobuf.ProtocolMessageEnum { * OTHER = 2; */ OTHER(2), + /** + * + * + *
+       * Candidates blocked due to the terms which are included from the
+       * terminology blocklist.
+       * 
+ * + * BLOCKLIST = 3; + */ + BLOCKLIST(3), + /** + * + * + *
+       * Candidates blocked due to prohibited content.
+       * 
+ * + * PROHIBITED_CONTENT = 4; + */ + PROHIBITED_CONTENT(4), UNRECOGNIZED(-1), ; @@ -306,6 +327,27 @@ public enum BlockedReason implements com.google.protobuf.ProtocolMessageEnum { * OTHER = 2; */ public static final int OTHER_VALUE = 2; + /** + * + * + *
+       * Candidates blocked due to the terms which are included from the
+       * terminology blocklist.
+       * 
+ * + * BLOCKLIST = 3; + */ + public static final int BLOCKLIST_VALUE = 3; + /** + * + * + *
+       * Candidates blocked due to prohibited content.
+       * 
+ * + * PROHIBITED_CONTENT = 4; + */ + public static final int PROHIBITED_CONTENT_VALUE = 4; public final int getNumber() { if (this == UNRECOGNIZED) { @@ -337,6 +379,10 @@ public static BlockedReason forNumber(int value) { return SAFETY; case 2: return OTHER; + case 3: + return BLOCKLIST; + case 4: + return PROHIBITED_CONTENT; default: return null; } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GenerationConfig.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GenerationConfig.java index 91f85ac9fe05..b0b7c4a9bcaf 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GenerationConfig.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GenerationConfig.java @@ -40,6 +40,7 @@ private GenerationConfig(com.google.protobuf.GeneratedMessageV3.Builder build private GenerationConfig() { stopSequences_ = com.google.protobuf.LazyStringArrayList.emptyList(); + responseMimeType_ = ""; } @java.lang.Override @@ -293,6 +294,135 @@ public com.google.protobuf.ByteString getStopSequencesBytes(int index) { return stopSequences_.getByteString(index); } + public static final int PRESENCE_PENALTY_FIELD_NUMBER = 8; + private float presencePenalty_ = 0F; + /** + * + * + *
+   * Optional. Positive penalties.
+   * 
+ * + * optional float presence_penalty = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the presencePenalty field is set. + */ + @java.lang.Override + public boolean hasPresencePenalty() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+   * Optional. Positive penalties.
+   * 
+ * + * optional float presence_penalty = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The presencePenalty. + */ + @java.lang.Override + public float getPresencePenalty() { + return presencePenalty_; + } + + public static final int FREQUENCY_PENALTY_FIELD_NUMBER = 9; + private float frequencyPenalty_ = 0F; + /** + * + * + *
+   * Optional. Frequency penalties.
+   * 
+ * + * optional float frequency_penalty = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the frequencyPenalty field is set. + */ + @java.lang.Override + public boolean hasFrequencyPenalty() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+   * Optional. Frequency penalties.
+   * 
+ * + * optional float frequency_penalty = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The frequencyPenalty. + */ + @java.lang.Override + public float getFrequencyPenalty() { + return frequencyPenalty_; + } + + public static final int RESPONSE_MIME_TYPE_FIELD_NUMBER = 13; + + @SuppressWarnings("serial") + private volatile java.lang.Object responseMimeType_ = ""; + /** + * + * + *
+   * Optional. Output response mimetype of the generated candidate text.
+   * Supported mimetype:
+   * - `text/plain`: (default) Text output.
+   * - `application/json`: JSON response in the candidates.
+   * The model needs to be prompted to output the appropriate response type,
+   * otherwise the behavior is undefined.
+   * This is a preview feature.
+   * 
+ * + * string response_mime_type = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The responseMimeType. + */ + @java.lang.Override + public java.lang.String getResponseMimeType() { + java.lang.Object ref = responseMimeType_; + 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(); + responseMimeType_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Output response mimetype of the generated candidate text.
+   * Supported mimetype:
+   * - `text/plain`: (default) Text output.
+   * - `application/json`: JSON response in the candidates.
+   * The model needs to be prompted to output the appropriate response type,
+   * otherwise the behavior is undefined.
+   * This is a preview feature.
+   * 
+ * + * string response_mime_type = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for responseMimeType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResponseMimeTypeBytes() { + java.lang.Object ref = responseMimeType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + responseMimeType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -325,6 +455,15 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < stopSequences_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, stopSequences_.getRaw(i)); } + if (((bitField0_ & 0x00000020) != 0)) { + output.writeFloat(8, presencePenalty_); + } + if (((bitField0_ & 0x00000040) != 0)) { + output.writeFloat(9, frequencyPenalty_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(responseMimeType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 13, responseMimeType_); + } getUnknownFields().writeTo(output); } @@ -357,6 +496,15 @@ public int getSerializedSize() { size += dataSize; size += 1 * getStopSequencesList().size(); } + if (((bitField0_ & 0x00000020) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(8, presencePenalty_); + } + if (((bitField0_ & 0x00000040) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(9, frequencyPenalty_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(responseMimeType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, responseMimeType_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -397,6 +545,17 @@ public boolean equals(final java.lang.Object obj) { if (getMaxOutputTokens() != other.getMaxOutputTokens()) return false; } if (!getStopSequencesList().equals(other.getStopSequencesList())) return false; + if (hasPresencePenalty() != other.hasPresencePenalty()) return false; + if (hasPresencePenalty()) { + if (java.lang.Float.floatToIntBits(getPresencePenalty()) + != java.lang.Float.floatToIntBits(other.getPresencePenalty())) return false; + } + if (hasFrequencyPenalty() != other.hasFrequencyPenalty()) return false; + if (hasFrequencyPenalty()) { + if (java.lang.Float.floatToIntBits(getFrequencyPenalty()) + != java.lang.Float.floatToIntBits(other.getFrequencyPenalty())) return false; + } + if (!getResponseMimeType().equals(other.getResponseMimeType())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -432,6 +591,16 @@ public int hashCode() { hash = (37 * hash) + STOP_SEQUENCES_FIELD_NUMBER; hash = (53 * hash) + getStopSequencesList().hashCode(); } + if (hasPresencePenalty()) { + hash = (37 * hash) + PRESENCE_PENALTY_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getPresencePenalty()); + } + if (hasFrequencyPenalty()) { + hash = (37 * hash) + FREQUENCY_PENALTY_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getFrequencyPenalty()); + } + hash = (37 * hash) + RESPONSE_MIME_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getResponseMimeType().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -577,6 +746,9 @@ public Builder clear() { candidateCount_ = 0; maxOutputTokens_ = 0; stopSequences_ = com.google.protobuf.LazyStringArrayList.emptyList(); + presencePenalty_ = 0F; + frequencyPenalty_ = 0F; + responseMimeType_ = ""; return this; } @@ -638,6 +810,17 @@ private void buildPartial0(com.google.cloud.aiplatform.v1beta1.GenerationConfig stopSequences_.makeImmutable(); result.stopSequences_ = stopSequences_; } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.presencePenalty_ = presencePenalty_; + to_bitField0_ |= 0x00000020; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.frequencyPenalty_ = frequencyPenalty_; + to_bitField0_ |= 0x00000040; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.responseMimeType_ = responseMimeType_; + } result.bitField0_ |= to_bitField0_; } @@ -712,6 +895,17 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.GenerationConfig ot } onChanged(); } + if (other.hasPresencePenalty()) { + setPresencePenalty(other.getPresencePenalty()); + } + if (other.hasFrequencyPenalty()) { + setFrequencyPenalty(other.getFrequencyPenalty()); + } + if (!other.getResponseMimeType().isEmpty()) { + responseMimeType_ = other.responseMimeType_; + bitField0_ |= 0x00000100; + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -775,6 +969,24 @@ public Builder mergeFrom( stopSequences_.add(s); break; } // case 50 + case 69: + { + presencePenalty_ = input.readFloat(); + bitField0_ |= 0x00000040; + break; + } // case 69 + case 77: + { + frequencyPenalty_ = input.readFloat(); + bitField0_ |= 0x00000080; + break; + } // case 77 + case 106: + { + responseMimeType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 106 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1308,6 +1520,278 @@ public Builder addStopSequencesBytes(com.google.protobuf.ByteString value) { return this; } + private float presencePenalty_; + /** + * + * + *
+     * Optional. Positive penalties.
+     * 
+ * + * optional float presence_penalty = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the presencePenalty field is set. + */ + @java.lang.Override + public boolean hasPresencePenalty() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+     * Optional. Positive penalties.
+     * 
+ * + * optional float presence_penalty = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The presencePenalty. + */ + @java.lang.Override + public float getPresencePenalty() { + return presencePenalty_; + } + /** + * + * + *
+     * Optional. Positive penalties.
+     * 
+ * + * optional float presence_penalty = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The presencePenalty to set. + * @return This builder for chaining. + */ + public Builder setPresencePenalty(float value) { + + presencePenalty_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Positive penalties.
+     * 
+ * + * optional float presence_penalty = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPresencePenalty() { + bitField0_ = (bitField0_ & ~0x00000040); + presencePenalty_ = 0F; + onChanged(); + return this; + } + + private float frequencyPenalty_; + /** + * + * + *
+     * Optional. Frequency penalties.
+     * 
+ * + * optional float frequency_penalty = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the frequencyPenalty field is set. + */ + @java.lang.Override + public boolean hasFrequencyPenalty() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * + * + *
+     * Optional. Frequency penalties.
+     * 
+ * + * optional float frequency_penalty = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The frequencyPenalty. + */ + @java.lang.Override + public float getFrequencyPenalty() { + return frequencyPenalty_; + } + /** + * + * + *
+     * Optional. Frequency penalties.
+     * 
+ * + * optional float frequency_penalty = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The frequencyPenalty to set. + * @return This builder for chaining. + */ + public Builder setFrequencyPenalty(float value) { + + frequencyPenalty_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Frequency penalties.
+     * 
+ * + * optional float frequency_penalty = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFrequencyPenalty() { + bitField0_ = (bitField0_ & ~0x00000080); + frequencyPenalty_ = 0F; + onChanged(); + return this; + } + + private java.lang.Object responseMimeType_ = ""; + /** + * + * + *
+     * Optional. Output response mimetype of the generated candidate text.
+     * Supported mimetype:
+     * - `text/plain`: (default) Text output.
+     * - `application/json`: JSON response in the candidates.
+     * The model needs to be prompted to output the appropriate response type,
+     * otherwise the behavior is undefined.
+     * This is a preview feature.
+     * 
+ * + * string response_mime_type = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The responseMimeType. + */ + public java.lang.String getResponseMimeType() { + java.lang.Object ref = responseMimeType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + responseMimeType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Output response mimetype of the generated candidate text.
+     * Supported mimetype:
+     * - `text/plain`: (default) Text output.
+     * - `application/json`: JSON response in the candidates.
+     * The model needs to be prompted to output the appropriate response type,
+     * otherwise the behavior is undefined.
+     * This is a preview feature.
+     * 
+ * + * string response_mime_type = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for responseMimeType. + */ + public com.google.protobuf.ByteString getResponseMimeTypeBytes() { + java.lang.Object ref = responseMimeType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + responseMimeType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Output response mimetype of the generated candidate text.
+     * Supported mimetype:
+     * - `text/plain`: (default) Text output.
+     * - `application/json`: JSON response in the candidates.
+     * The model needs to be prompted to output the appropriate response type,
+     * otherwise the behavior is undefined.
+     * This is a preview feature.
+     * 
+ * + * string response_mime_type = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The responseMimeType to set. + * @return This builder for chaining. + */ + public Builder setResponseMimeType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + responseMimeType_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Output response mimetype of the generated candidate text.
+     * Supported mimetype:
+     * - `text/plain`: (default) Text output.
+     * - `application/json`: JSON response in the candidates.
+     * The model needs to be prompted to output the appropriate response type,
+     * otherwise the behavior is undefined.
+     * This is a preview feature.
+     * 
+ * + * string response_mime_type = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearResponseMimeType() { + responseMimeType_ = getDefaultInstance().getResponseMimeType(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Output response mimetype of the generated candidate text.
+     * Supported mimetype:
+     * - `text/plain`: (default) Text output.
+     * - `application/json`: JSON response in the candidates.
+     * The model needs to be prompted to output the appropriate response type,
+     * otherwise the behavior is undefined.
+     * This is a preview feature.
+     * 
+ * + * string response_mime_type = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for responseMimeType to set. + * @return This builder for chaining. + */ + public Builder setResponseMimeTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + responseMimeType_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GenerationConfigOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GenerationConfigOrBuilder.java index 6656eda4aa25..aac8d2f5446a 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GenerationConfigOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GenerationConfigOrBuilder.java @@ -199,4 +199,91 @@ public interface GenerationConfigOrBuilder * @return The bytes of the stopSequences at the given index. */ com.google.protobuf.ByteString getStopSequencesBytes(int index); + + /** + * + * + *
+   * Optional. Positive penalties.
+   * 
+ * + * optional float presence_penalty = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the presencePenalty field is set. + */ + boolean hasPresencePenalty(); + /** + * + * + *
+   * Optional. Positive penalties.
+   * 
+ * + * optional float presence_penalty = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The presencePenalty. + */ + float getPresencePenalty(); + + /** + * + * + *
+   * Optional. Frequency penalties.
+   * 
+ * + * optional float frequency_penalty = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the frequencyPenalty field is set. + */ + boolean hasFrequencyPenalty(); + /** + * + * + *
+   * Optional. Frequency penalties.
+   * 
+ * + * optional float frequency_penalty = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The frequencyPenalty. + */ + float getFrequencyPenalty(); + + /** + * + * + *
+   * Optional. Output response mimetype of the generated candidate text.
+   * Supported mimetype:
+   * - `text/plain`: (default) Text output.
+   * - `application/json`: JSON response in the candidates.
+   * The model needs to be prompted to output the appropriate response type,
+   * otherwise the behavior is undefined.
+   * This is a preview feature.
+   * 
+ * + * string response_mime_type = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The responseMimeType. + */ + java.lang.String getResponseMimeType(); + /** + * + * + *
+   * Optional. Output response mimetype of the generated candidate text.
+   * Supported mimetype:
+   * - `text/plain`: (default) Text output.
+   * - `application/json`: JSON response in the candidates.
+   * The model needs to be prompted to output the appropriate response type,
+   * otherwise the behavior is undefined.
+   * This is a preview feature.
+   * 
+ * + * string response_mime_type = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for responseMimeType. + */ + com.google.protobuf.ByteString getResponseMimeTypeBytes(); } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GetNotebookRuntimeRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GetNotebookRuntimeRequest.java new file mode 100644 index 000000000000..96e164be46fd --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GetNotebookRuntimeRequest.java @@ -0,0 +1,667 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/notebook_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Request message for
+ * [NotebookService.GetNotebookRuntime][google.cloud.aiplatform.v1beta1.NotebookService.GetNotebookRuntime]
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.GetNotebookRuntimeRequest} + */ +public final class GetNotebookRuntimeRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.GetNotebookRuntimeRequest) + GetNotebookRuntimeRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetNotebookRuntimeRequest.newBuilder() to construct. + private GetNotebookRuntimeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetNotebookRuntimeRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetNotebookRuntimeRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_GetNotebookRuntimeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_GetNotebookRuntimeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeRequest.class, + com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the NotebookRuntime resource.
+   * Instead of checking whether the name is in valid NotebookRuntime resource
+   * name format, directly throw NotFound exception if there is no such
+   * NotebookRuntime in spanner.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the NotebookRuntime resource.
+   * Instead of checking whether the name is in valid NotebookRuntime resource
+   * name format, directly throw NotFound exception if there is no such
+   * NotebookRuntime in spanner.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeRequest other = + (com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for
+   * [NotebookService.GetNotebookRuntime][google.cloud.aiplatform.v1beta1.NotebookService.GetNotebookRuntime]
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.GetNotebookRuntimeRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.GetNotebookRuntimeRequest) + com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_GetNotebookRuntimeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_GetNotebookRuntimeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeRequest.class, + com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_GetNotebookRuntimeRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeRequest + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeRequest build() { + com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeRequest buildPartial() { + com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeRequest result = + new com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeRequest other) { + if (other + == com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the NotebookRuntime resource.
+     * Instead of checking whether the name is in valid NotebookRuntime resource
+     * name format, directly throw NotFound exception if there is no such
+     * NotebookRuntime in spanner.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the NotebookRuntime resource.
+     * Instead of checking whether the name is in valid NotebookRuntime resource
+     * name format, directly throw NotFound exception if there is no such
+     * NotebookRuntime in spanner.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the NotebookRuntime resource.
+     * Instead of checking whether the name is in valid NotebookRuntime resource
+     * name format, directly throw NotFound exception if there is no such
+     * NotebookRuntime in spanner.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the NotebookRuntime resource.
+     * Instead of checking whether the name is in valid NotebookRuntime resource
+     * name format, directly throw NotFound exception if there is no such
+     * NotebookRuntime in spanner.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the NotebookRuntime resource.
+     * Instead of checking whether the name is in valid NotebookRuntime resource
+     * name format, directly throw NotFound exception if there is no such
+     * NotebookRuntime in spanner.
+     * 
+ * + * + * 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. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.GetNotebookRuntimeRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.GetNotebookRuntimeRequest) + private static final com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeRequest(); + } + + public static com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetNotebookRuntimeRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GetNotebookRuntimeRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GetNotebookRuntimeRequestOrBuilder.java new file mode 100644 index 000000000000..69926cb34b98 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GetNotebookRuntimeRequestOrBuilder.java @@ -0,0 +1,61 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/notebook_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +public interface GetNotebookRuntimeRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.GetNotebookRuntimeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the NotebookRuntime resource.
+   * Instead of checking whether the name is in valid NotebookRuntime resource
+   * name format, directly throw NotFound exception if there is no such
+   * NotebookRuntime in spanner.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the NotebookRuntime resource.
+   * Instead of checking whether the name is in valid NotebookRuntime resource
+   * name format, directly throw NotFound exception if there is no such
+   * NotebookRuntime in spanner.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GetNotebookRuntimeTemplateRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GetNotebookRuntimeTemplateRequest.java new file mode 100644 index 000000000000..8d00853cb819 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GetNotebookRuntimeTemplateRequest.java @@ -0,0 +1,668 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/notebook_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Request message for
+ * [NotebookService.GetNotebookRuntimeTemplate][google.cloud.aiplatform.v1beta1.NotebookService.GetNotebookRuntimeTemplate]
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.GetNotebookRuntimeTemplateRequest} + */ +public final class GetNotebookRuntimeTemplateRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.GetNotebookRuntimeTemplateRequest) + GetNotebookRuntimeTemplateRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetNotebookRuntimeTemplateRequest.newBuilder() to construct. + private GetNotebookRuntimeTemplateRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetNotebookRuntimeTemplateRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetNotebookRuntimeTemplateRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_GetNotebookRuntimeTemplateRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_GetNotebookRuntimeTemplateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeTemplateRequest.class, + com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeTemplateRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the NotebookRuntimeTemplate resource.
+   * Format:
+   * `projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the NotebookRuntimeTemplate resource.
+   * Format:
+   * `projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeTemplateRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeTemplateRequest other = + (com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeTemplateRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeTemplateRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeTemplateRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeTemplateRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeTemplateRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeTemplateRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeTemplateRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeTemplateRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeTemplateRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeTemplateRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeTemplateRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeTemplateRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeTemplateRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeTemplateRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for
+   * [NotebookService.GetNotebookRuntimeTemplate][google.cloud.aiplatform.v1beta1.NotebookService.GetNotebookRuntimeTemplate]
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.GetNotebookRuntimeTemplateRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.GetNotebookRuntimeTemplateRequest) + com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeTemplateRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_GetNotebookRuntimeTemplateRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_GetNotebookRuntimeTemplateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeTemplateRequest.class, + com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeTemplateRequest.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeTemplateRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_GetNotebookRuntimeTemplateRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeTemplateRequest + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeTemplateRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeTemplateRequest build() { + com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeTemplateRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeTemplateRequest buildPartial() { + com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeTemplateRequest result = + new com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeTemplateRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeTemplateRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeTemplateRequest) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeTemplateRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeTemplateRequest other) { + if (other + == com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeTemplateRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the NotebookRuntimeTemplate resource.
+     * Format:
+     * `projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the NotebookRuntimeTemplate resource.
+     * Format:
+     * `projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the NotebookRuntimeTemplate resource.
+     * Format:
+     * `projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the NotebookRuntimeTemplate resource.
+     * Format:
+     * `projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the NotebookRuntimeTemplate resource.
+     * Format:
+     * `projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}`
+     * 
+ * + * + * 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. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.GetNotebookRuntimeTemplateRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.GetNotebookRuntimeTemplateRequest) + private static final com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeTemplateRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeTemplateRequest(); + } + + public static com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeTemplateRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetNotebookRuntimeTemplateRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeTemplateRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GetNotebookRuntimeTemplateRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GetNotebookRuntimeTemplateRequestOrBuilder.java new file mode 100644 index 000000000000..a47597b97f20 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GetNotebookRuntimeTemplateRequestOrBuilder.java @@ -0,0 +1,59 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/notebook_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +public interface GetNotebookRuntimeTemplateRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.GetNotebookRuntimeTemplateRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the NotebookRuntimeTemplate resource.
+   * Format:
+   * `projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the NotebookRuntimeTemplate resource.
+   * Format:
+   * `projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GetRagCorpusRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GetRagCorpusRequest.java new file mode 100644 index 000000000000..f0fda9a4c651 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GetRagCorpusRequest.java @@ -0,0 +1,656 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/vertex_rag_data_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Request message for
+ * [VertexRagDataService.GetRagCorpus][google.cloud.aiplatform.v1beta1.VertexRagDataService.GetRagCorpus]
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.GetRagCorpusRequest} + */ +public final class GetRagCorpusRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.GetRagCorpusRequest) + GetRagCorpusRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetRagCorpusRequest.newBuilder() to construct. + private GetRagCorpusRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetRagCorpusRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetRagCorpusRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_GetRagCorpusRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_GetRagCorpusRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.GetRagCorpusRequest.class, + com.google.cloud.aiplatform.v1beta1.GetRagCorpusRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the RagCorpus resource.
+   * Format:
+   * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the RagCorpus resource.
+   * Format:
+   * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.GetRagCorpusRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.GetRagCorpusRequest other = + (com.google.cloud.aiplatform.v1beta1.GetRagCorpusRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.GetRagCorpusRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.GetRagCorpusRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.GetRagCorpusRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.GetRagCorpusRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.GetRagCorpusRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.GetRagCorpusRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.GetRagCorpusRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.GetRagCorpusRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.GetRagCorpusRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.GetRagCorpusRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.GetRagCorpusRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.GetRagCorpusRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.GetRagCorpusRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for
+   * [VertexRagDataService.GetRagCorpus][google.cloud.aiplatform.v1beta1.VertexRagDataService.GetRagCorpus]
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.GetRagCorpusRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.GetRagCorpusRequest) + com.google.cloud.aiplatform.v1beta1.GetRagCorpusRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_GetRagCorpusRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_GetRagCorpusRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.GetRagCorpusRequest.class, + com.google.cloud.aiplatform.v1beta1.GetRagCorpusRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.GetRagCorpusRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_GetRagCorpusRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GetRagCorpusRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.GetRagCorpusRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GetRagCorpusRequest build() { + com.google.cloud.aiplatform.v1beta1.GetRagCorpusRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GetRagCorpusRequest buildPartial() { + com.google.cloud.aiplatform.v1beta1.GetRagCorpusRequest result = + new com.google.cloud.aiplatform.v1beta1.GetRagCorpusRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1beta1.GetRagCorpusRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1beta1.GetRagCorpusRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.GetRagCorpusRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.GetRagCorpusRequest other) { + if (other == com.google.cloud.aiplatform.v1beta1.GetRagCorpusRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the RagCorpus resource.
+     * Format:
+     * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the RagCorpus resource.
+     * Format:
+     * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the RagCorpus resource.
+     * Format:
+     * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the RagCorpus resource.
+     * Format:
+     * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the RagCorpus resource.
+     * Format:
+     * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
+     * 
+ * + * + * 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. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.GetRagCorpusRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.GetRagCorpusRequest) + private static final com.google.cloud.aiplatform.v1beta1.GetRagCorpusRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.GetRagCorpusRequest(); + } + + public static com.google.cloud.aiplatform.v1beta1.GetRagCorpusRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetRagCorpusRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GetRagCorpusRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GetRagCorpusRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GetRagCorpusRequestOrBuilder.java new file mode 100644 index 000000000000..199d937ea165 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GetRagCorpusRequestOrBuilder.java @@ -0,0 +1,59 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/vertex_rag_data_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +public interface GetRagCorpusRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.GetRagCorpusRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the RagCorpus resource.
+   * Format:
+   * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the RagCorpus resource.
+   * Format:
+   * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GetRagFileRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GetRagFileRequest.java new file mode 100644 index 000000000000..e2a23193b9c1 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GetRagFileRequest.java @@ -0,0 +1,656 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/vertex_rag_data_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Request message for
+ * [VertexRagDataService.GetRagFile][google.cloud.aiplatform.v1beta1.VertexRagDataService.GetRagFile]
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.GetRagFileRequest} + */ +public final class GetRagFileRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.GetRagFileRequest) + GetRagFileRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetRagFileRequest.newBuilder() to construct. + private GetRagFileRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetRagFileRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetRagFileRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_GetRagFileRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_GetRagFileRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.GetRagFileRequest.class, + com.google.cloud.aiplatform.v1beta1.GetRagFileRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the RagFile resource.
+   * Format:
+   * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}/ragFiles/{rag_file}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the RagFile resource.
+   * Format:
+   * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}/ragFiles/{rag_file}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.GetRagFileRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.GetRagFileRequest other = + (com.google.cloud.aiplatform.v1beta1.GetRagFileRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.GetRagFileRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.GetRagFileRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.GetRagFileRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.GetRagFileRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.GetRagFileRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.GetRagFileRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.GetRagFileRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.GetRagFileRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.GetRagFileRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.GetRagFileRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.GetRagFileRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.GetRagFileRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.GetRagFileRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for
+   * [VertexRagDataService.GetRagFile][google.cloud.aiplatform.v1beta1.VertexRagDataService.GetRagFile]
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.GetRagFileRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.GetRagFileRequest) + com.google.cloud.aiplatform.v1beta1.GetRagFileRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_GetRagFileRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_GetRagFileRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.GetRagFileRequest.class, + com.google.cloud.aiplatform.v1beta1.GetRagFileRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.GetRagFileRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_GetRagFileRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GetRagFileRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.GetRagFileRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GetRagFileRequest build() { + com.google.cloud.aiplatform.v1beta1.GetRagFileRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GetRagFileRequest buildPartial() { + com.google.cloud.aiplatform.v1beta1.GetRagFileRequest result = + new com.google.cloud.aiplatform.v1beta1.GetRagFileRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1beta1.GetRagFileRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1beta1.GetRagFileRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.GetRagFileRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.GetRagFileRequest other) { + if (other == com.google.cloud.aiplatform.v1beta1.GetRagFileRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the RagFile resource.
+     * Format:
+     * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}/ragFiles/{rag_file}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the RagFile resource.
+     * Format:
+     * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}/ragFiles/{rag_file}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the RagFile resource.
+     * Format:
+     * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}/ragFiles/{rag_file}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the RagFile resource.
+     * Format:
+     * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}/ragFiles/{rag_file}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the RagFile resource.
+     * Format:
+     * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}/ragFiles/{rag_file}`
+     * 
+ * + * + * 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. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.GetRagFileRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.GetRagFileRequest) + private static final com.google.cloud.aiplatform.v1beta1.GetRagFileRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.GetRagFileRequest(); + } + + public static com.google.cloud.aiplatform.v1beta1.GetRagFileRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetRagFileRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GetRagFileRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GetRagFileRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GetRagFileRequestOrBuilder.java new file mode 100644 index 000000000000..4de2c9cc0d8f --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GetRagFileRequestOrBuilder.java @@ -0,0 +1,59 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/vertex_rag_data_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +public interface GetRagFileRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.GetRagFileRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the RagFile resource.
+   * Format:
+   * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}/ragFiles/{rag_file}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the RagFile resource.
+   * Format:
+   * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}/ragFiles/{rag_file}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GoogleDriveSource.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GoogleDriveSource.java new file mode 100644 index 000000000000..af5decb31ae6 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GoogleDriveSource.java @@ -0,0 +1,2032 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/io.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * The Google Drive location for the input content.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.GoogleDriveSource} + */ +public final class GoogleDriveSource extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.GoogleDriveSource) + GoogleDriveSourceOrBuilder { + private static final long serialVersionUID = 0L; + // Use GoogleDriveSource.newBuilder() to construct. + private GoogleDriveSource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GoogleDriveSource() { + resourceIds_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GoogleDriveSource(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.IoProto + .internal_static_google_cloud_aiplatform_v1beta1_GoogleDriveSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.IoProto + .internal_static_google_cloud_aiplatform_v1beta1_GoogleDriveSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.class, + com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.Builder.class); + } + + public interface ResourceIdOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The type of the Google Drive resource.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId.ResourceType resource_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for resourceType. + */ + int getResourceTypeValue(); + /** + * + * + *
+     * Required. The type of the Google Drive resource.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId.ResourceType resource_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The resourceType. + */ + com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId.ResourceType getResourceType(); + + /** + * + * + *
+     * Required. The ID of the Google Drive resource.
+     * 
+ * + * string resource_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The resourceId. + */ + java.lang.String getResourceId(); + /** + * + * + *
+     * Required. The ID of the Google Drive resource.
+     * 
+ * + * string resource_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for resourceId. + */ + com.google.protobuf.ByteString getResourceIdBytes(); + } + /** + * + * + *
+   * The type and ID of the Google Drive resource.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId} + */ + public static final class ResourceId extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId) + ResourceIdOrBuilder { + private static final long serialVersionUID = 0L; + // Use ResourceId.newBuilder() to construct. + private ResourceId(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ResourceId() { + resourceType_ = 0; + resourceId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ResourceId(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.IoProto + .internal_static_google_cloud_aiplatform_v1beta1_GoogleDriveSource_ResourceId_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.IoProto + .internal_static_google_cloud_aiplatform_v1beta1_GoogleDriveSource_ResourceId_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId.class, + com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId.Builder.class); + } + + /** + * + * + *
+     * The type of the Google Drive resource.
+     * 
+ * + * Protobuf enum {@code + * google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId.ResourceType} + */ + public enum ResourceType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Unspecified resource type.
+       * 
+ * + * RESOURCE_TYPE_UNSPECIFIED = 0; + */ + RESOURCE_TYPE_UNSPECIFIED(0), + /** + * + * + *
+       * File resource type.
+       * 
+ * + * RESOURCE_TYPE_FILE = 1; + */ + RESOURCE_TYPE_FILE(1), + /** + * + * + *
+       * Folder resource type.
+       * 
+ * + * RESOURCE_TYPE_FOLDER = 2; + */ + RESOURCE_TYPE_FOLDER(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * Unspecified resource type.
+       * 
+ * + * RESOURCE_TYPE_UNSPECIFIED = 0; + */ + public static final int RESOURCE_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * File resource type.
+       * 
+ * + * RESOURCE_TYPE_FILE = 1; + */ + public static final int RESOURCE_TYPE_FILE_VALUE = 1; + /** + * + * + *
+       * Folder resource type.
+       * 
+ * + * RESOURCE_TYPE_FOLDER = 2; + */ + public static final int RESOURCE_TYPE_FOLDER_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ResourceType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ResourceType forNumber(int value) { + switch (value) { + case 0: + return RESOURCE_TYPE_UNSPECIFIED; + case 1: + return RESOURCE_TYPE_FILE; + case 2: + return RESOURCE_TYPE_FOLDER; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ResourceType findValueByNumber(int number) { + return ResourceType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final ResourceType[] VALUES = values(); + + public static ResourceType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ResourceType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId.ResourceType) + } + + public static final int RESOURCE_TYPE_FIELD_NUMBER = 1; + private int resourceType_ = 0; + /** + * + * + *
+     * Required. The type of the Google Drive resource.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId.ResourceType resource_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for resourceType. + */ + @java.lang.Override + public int getResourceTypeValue() { + return resourceType_; + } + /** + * + * + *
+     * Required. The type of the Google Drive resource.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId.ResourceType resource_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The resourceType. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId.ResourceType + getResourceType() { + com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId.ResourceType result = + com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId.ResourceType.forNumber( + resourceType_); + return result == null + ? com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId.ResourceType + .UNRECOGNIZED + : result; + } + + public static final int RESOURCE_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object resourceId_ = ""; + /** + * + * + *
+     * Required. The ID of the Google Drive resource.
+     * 
+ * + * string resource_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The resourceId. + */ + @java.lang.Override + public java.lang.String getResourceId() { + java.lang.Object ref = resourceId_; + 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(); + resourceId_ = s; + return s; + } + } + /** + * + * + *
+     * Required. The ID of the Google Drive resource.
+     * 
+ * + * string resource_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for resourceId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResourceIdBytes() { + java.lang.Object ref = resourceId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (resourceType_ + != com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId.ResourceType + .RESOURCE_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, resourceType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, resourceId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (resourceType_ + != com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId.ResourceType + .RESOURCE_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, resourceType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, resourceId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId other = + (com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId) obj; + + if (resourceType_ != other.resourceType_) return false; + if (!getResourceId().equals(other.getResourceId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + RESOURCE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + resourceType_; + hash = (37 * hash) + RESOURCE_ID_FIELD_NUMBER; + hash = (53 * hash) + getResourceId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * The type and ID of the Google Drive resource.
+     * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId) + com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceIdOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.IoProto + .internal_static_google_cloud_aiplatform_v1beta1_GoogleDriveSource_ResourceId_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.IoProto + .internal_static_google_cloud_aiplatform_v1beta1_GoogleDriveSource_ResourceId_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId.class, + com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + resourceType_ = 0; + resourceId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.IoProto + .internal_static_google_cloud_aiplatform_v1beta1_GoogleDriveSource_ResourceId_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId build() { + com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId buildPartial() { + com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId result = + new com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.resourceType_ = resourceType_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.resourceId_ = resourceId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId other) { + if (other + == com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId + .getDefaultInstance()) return this; + if (other.resourceType_ != 0) { + setResourceTypeValue(other.getResourceTypeValue()); + } + if (!other.getResourceId().isEmpty()) { + resourceId_ = other.resourceId_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + resourceType_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + resourceId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int resourceType_ = 0; + /** + * + * + *
+       * Required. The type of the Google Drive resource.
+       * 
+ * + * + * .google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId.ResourceType resource_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for resourceType. + */ + @java.lang.Override + public int getResourceTypeValue() { + return resourceType_; + } + /** + * + * + *
+       * Required. The type of the Google Drive resource.
+       * 
+ * + * + * .google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId.ResourceType resource_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for resourceType to set. + * @return This builder for chaining. + */ + public Builder setResourceTypeValue(int value) { + resourceType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The type of the Google Drive resource.
+       * 
+ * + * + * .google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId.ResourceType resource_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The resourceType. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId.ResourceType + getResourceType() { + com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId.ResourceType result = + com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId.ResourceType.forNumber( + resourceType_); + return result == null + ? com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId.ResourceType + .UNRECOGNIZED + : result; + } + /** + * + * + *
+       * Required. The type of the Google Drive resource.
+       * 
+ * + * + * .google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId.ResourceType resource_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The resourceType to set. + * @return This builder for chaining. + */ + public Builder setResourceType( + com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId.ResourceType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + resourceType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The type of the Google Drive resource.
+       * 
+ * + * + * .google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId.ResourceType resource_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearResourceType() { + bitField0_ = (bitField0_ & ~0x00000001); + resourceType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object resourceId_ = ""; + /** + * + * + *
+       * Required. The ID of the Google Drive resource.
+       * 
+ * + * string resource_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The resourceId. + */ + public java.lang.String getResourceId() { + java.lang.Object ref = resourceId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. The ID of the Google Drive resource.
+       * 
+ * + * string resource_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for resourceId. + */ + public com.google.protobuf.ByteString getResourceIdBytes() { + java.lang.Object ref = resourceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. The ID of the Google Drive resource.
+       * 
+ * + * string resource_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The resourceId to set. + * @return This builder for chaining. + */ + public Builder setResourceId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + resourceId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The ID of the Google Drive resource.
+       * 
+ * + * string resource_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearResourceId() { + resourceId_ = getDefaultInstance().getResourceId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The ID of the Google Drive resource.
+       * 
+ * + * string resource_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for resourceId to set. + * @return This builder for chaining. + */ + public Builder setResourceIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + resourceId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId) + private static final com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId(); + } + + public static com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ResourceId parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int RESOURCE_IDS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List + resourceIds_; + /** + * + * + *
+   * Required. Google Drive resource IDs.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId resource_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getResourceIdsList() { + return resourceIds_; + } + /** + * + * + *
+   * Required. Google Drive resource IDs.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId resource_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceIdOrBuilder> + getResourceIdsOrBuilderList() { + return resourceIds_; + } + /** + * + * + *
+   * Required. Google Drive resource IDs.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId resource_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getResourceIdsCount() { + return resourceIds_.size(); + } + /** + * + * + *
+   * Required. Google Drive resource IDs.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId resource_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId getResourceIds( + int index) { + return resourceIds_.get(index); + } + /** + * + * + *
+   * Required. Google Drive resource IDs.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId resource_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceIdOrBuilder + getResourceIdsOrBuilder(int index) { + return resourceIds_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < resourceIds_.size(); i++) { + output.writeMessage(1, resourceIds_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < resourceIds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, resourceIds_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.GoogleDriveSource)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.GoogleDriveSource other = + (com.google.cloud.aiplatform.v1beta1.GoogleDriveSource) obj; + + if (!getResourceIdsList().equals(other.getResourceIdsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getResourceIdsCount() > 0) { + hash = (37 * hash) + RESOURCE_IDS_FIELD_NUMBER; + hash = (53 * hash) + getResourceIdsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.GoogleDriveSource parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.GoogleDriveSource parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.GoogleDriveSource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.GoogleDriveSource parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.GoogleDriveSource parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.GoogleDriveSource parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.GoogleDriveSource parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.GoogleDriveSource parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.GoogleDriveSource parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.GoogleDriveSource parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.GoogleDriveSource parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.GoogleDriveSource parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.GoogleDriveSource prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The Google Drive location for the input content.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.GoogleDriveSource} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.GoogleDriveSource) + com.google.cloud.aiplatform.v1beta1.GoogleDriveSourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.IoProto + .internal_static_google_cloud_aiplatform_v1beta1_GoogleDriveSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.IoProto + .internal_static_google_cloud_aiplatform_v1beta1_GoogleDriveSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.class, + com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (resourceIdsBuilder_ == null) { + resourceIds_ = java.util.Collections.emptyList(); + } else { + resourceIds_ = null; + resourceIdsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.IoProto + .internal_static_google_cloud_aiplatform_v1beta1_GoogleDriveSource_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GoogleDriveSource getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GoogleDriveSource build() { + com.google.cloud.aiplatform.v1beta1.GoogleDriveSource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GoogleDriveSource buildPartial() { + com.google.cloud.aiplatform.v1beta1.GoogleDriveSource result = + new com.google.cloud.aiplatform.v1beta1.GoogleDriveSource(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.aiplatform.v1beta1.GoogleDriveSource result) { + if (resourceIdsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + resourceIds_ = java.util.Collections.unmodifiableList(resourceIds_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.resourceIds_ = resourceIds_; + } else { + result.resourceIds_ = resourceIdsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.aiplatform.v1beta1.GoogleDriveSource result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1beta1.GoogleDriveSource) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.GoogleDriveSource) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.GoogleDriveSource other) { + if (other == com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.getDefaultInstance()) + return this; + if (resourceIdsBuilder_ == null) { + if (!other.resourceIds_.isEmpty()) { + if (resourceIds_.isEmpty()) { + resourceIds_ = other.resourceIds_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureResourceIdsIsMutable(); + resourceIds_.addAll(other.resourceIds_); + } + onChanged(); + } + } else { + if (!other.resourceIds_.isEmpty()) { + if (resourceIdsBuilder_.isEmpty()) { + resourceIdsBuilder_.dispose(); + resourceIdsBuilder_ = null; + resourceIds_ = other.resourceIds_; + bitField0_ = (bitField0_ & ~0x00000001); + resourceIdsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getResourceIdsFieldBuilder() + : null; + } else { + resourceIdsBuilder_.addAllMessages(other.resourceIds_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId m = + input.readMessage( + com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId.parser(), + extensionRegistry); + if (resourceIdsBuilder_ == null) { + ensureResourceIdsIsMutable(); + resourceIds_.add(m); + } else { + resourceIdsBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List + resourceIds_ = java.util.Collections.emptyList(); + + private void ensureResourceIdsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + resourceIds_ = + new java.util.ArrayList< + com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId>(resourceIds_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId, + com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId.Builder, + com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceIdOrBuilder> + resourceIdsBuilder_; + + /** + * + * + *
+     * Required. Google Drive resource IDs.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId resource_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getResourceIdsList() { + if (resourceIdsBuilder_ == null) { + return java.util.Collections.unmodifiableList(resourceIds_); + } else { + return resourceIdsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Required. Google Drive resource IDs.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId resource_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getResourceIdsCount() { + if (resourceIdsBuilder_ == null) { + return resourceIds_.size(); + } else { + return resourceIdsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Required. Google Drive resource IDs.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId resource_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId getResourceIds( + int index) { + if (resourceIdsBuilder_ == null) { + return resourceIds_.get(index); + } else { + return resourceIdsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Required. Google Drive resource IDs.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId resource_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setResourceIds( + int index, com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId value) { + if (resourceIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResourceIdsIsMutable(); + resourceIds_.set(index, value); + onChanged(); + } else { + resourceIdsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. Google Drive resource IDs.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId resource_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setResourceIds( + int index, + com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId.Builder builderForValue) { + if (resourceIdsBuilder_ == null) { + ensureResourceIdsIsMutable(); + resourceIds_.set(index, builderForValue.build()); + onChanged(); + } else { + resourceIdsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. Google Drive resource IDs.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId resource_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addResourceIds( + com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId value) { + if (resourceIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResourceIdsIsMutable(); + resourceIds_.add(value); + onChanged(); + } else { + resourceIdsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Required. Google Drive resource IDs.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId resource_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addResourceIds( + int index, com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId value) { + if (resourceIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResourceIdsIsMutable(); + resourceIds_.add(index, value); + onChanged(); + } else { + resourceIdsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. Google Drive resource IDs.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId resource_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addResourceIds( + com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId.Builder builderForValue) { + if (resourceIdsBuilder_ == null) { + ensureResourceIdsIsMutable(); + resourceIds_.add(builderForValue.build()); + onChanged(); + } else { + resourceIdsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. Google Drive resource IDs.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId resource_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addResourceIds( + int index, + com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId.Builder builderForValue) { + if (resourceIdsBuilder_ == null) { + ensureResourceIdsIsMutable(); + resourceIds_.add(index, builderForValue.build()); + onChanged(); + } else { + resourceIdsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. Google Drive resource IDs.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId resource_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllResourceIds( + java.lang.Iterable< + ? extends com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId> + values) { + if (resourceIdsBuilder_ == null) { + ensureResourceIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, resourceIds_); + onChanged(); + } else { + resourceIdsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Required. Google Drive resource IDs.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId resource_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearResourceIds() { + if (resourceIdsBuilder_ == null) { + resourceIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + resourceIdsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Required. Google Drive resource IDs.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId resource_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeResourceIds(int index) { + if (resourceIdsBuilder_ == null) { + ensureResourceIdsIsMutable(); + resourceIds_.remove(index); + onChanged(); + } else { + resourceIdsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Required. Google Drive resource IDs.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId resource_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId.Builder + getResourceIdsBuilder(int index) { + return getResourceIdsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Required. Google Drive resource IDs.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId resource_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceIdOrBuilder + getResourceIdsOrBuilder(int index) { + if (resourceIdsBuilder_ == null) { + return resourceIds_.get(index); + } else { + return resourceIdsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Required. Google Drive resource IDs.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId resource_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List< + ? extends com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceIdOrBuilder> + getResourceIdsOrBuilderList() { + if (resourceIdsBuilder_ != null) { + return resourceIdsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(resourceIds_); + } + } + /** + * + * + *
+     * Required. Google Drive resource IDs.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId resource_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId.Builder + addResourceIdsBuilder() { + return getResourceIdsFieldBuilder() + .addBuilder( + com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId + .getDefaultInstance()); + } + /** + * + * + *
+     * Required. Google Drive resource IDs.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId resource_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId.Builder + addResourceIdsBuilder(int index) { + return getResourceIdsFieldBuilder() + .addBuilder( + index, + com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId + .getDefaultInstance()); + } + /** + * + * + *
+     * Required. Google Drive resource IDs.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId resource_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getResourceIdsBuilderList() { + return getResourceIdsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId, + com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId.Builder, + com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceIdOrBuilder> + getResourceIdsFieldBuilder() { + if (resourceIdsBuilder_ == null) { + resourceIdsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId, + com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId.Builder, + com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceIdOrBuilder>( + resourceIds_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + resourceIds_ = null; + } + return resourceIdsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.GoogleDriveSource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.GoogleDriveSource) + private static final com.google.cloud.aiplatform.v1beta1.GoogleDriveSource DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.GoogleDriveSource(); + } + + public static com.google.cloud.aiplatform.v1beta1.GoogleDriveSource getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GoogleDriveSource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GoogleDriveSource getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GoogleDriveSourceOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GoogleDriveSourceOrBuilder.java new file mode 100644 index 000000000000..c6f543e707e8 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GoogleDriveSourceOrBuilder.java @@ -0,0 +1,91 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/io.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +public interface GoogleDriveSourceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.GoogleDriveSource) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Google Drive resource IDs.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId resource_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getResourceIdsList(); + /** + * + * + *
+   * Required. Google Drive resource IDs.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId resource_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId getResourceIds(int index); + /** + * + * + *
+   * Required. Google Drive resource IDs.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId resource_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getResourceIdsCount(); + /** + * + * + *
+   * Required. Google Drive resource IDs.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId resource_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List< + ? extends com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceIdOrBuilder> + getResourceIdsOrBuilderList(); + /** + * + * + *
+   * Required. Google Drive resource IDs.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceId resource_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.ResourceIdOrBuilder getResourceIdsOrBuilder( + int index); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GroundingAttribution.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GroundingAttribution.java index 6ccf31cd9fef..cb8f96382515 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GroundingAttribution.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GroundingAttribution.java @@ -916,6 +916,878 @@ public com.google.protobuf.Parser getParserForType() { } } + public interface RetrievedContextOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Output only. URI reference of the attribution.
+     * 
+ * + * string uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uri. + */ + java.lang.String getUri(); + /** + * + * + *
+     * Output only. URI reference of the attribution.
+     * 
+ * + * string uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + + /** + * + * + *
+     * Output only. Title of the attribution.
+     * 
+ * + * string title = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The title. + */ + java.lang.String getTitle(); + /** + * + * + *
+     * Output only. Title of the attribution.
+     * 
+ * + * string title = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for title. + */ + com.google.protobuf.ByteString getTitleBytes(); + } + /** + * + * + *
+   * Attribution from context retrieved by the retrieval tools.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext} + */ + public static final class RetrievedContext extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext) + RetrievedContextOrBuilder { + private static final long serialVersionUID = 0L; + // Use RetrievedContext.newBuilder() to construct. + private RetrievedContext(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RetrievedContext() { + uri_ = ""; + title_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RetrievedContext(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.ContentProto + .internal_static_google_cloud_aiplatform_v1beta1_GroundingAttribution_RetrievedContext_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.ContentProto + .internal_static_google_cloud_aiplatform_v1beta1_GroundingAttribution_RetrievedContext_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext.class, + com.google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext.Builder + .class); + } + + public static final int URI_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object uri_ = ""; + /** + * + * + *
+     * Output only. URI reference of the attribution.
+     * 
+ * + * string uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + 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(); + uri_ = s; + return s; + } + } + /** + * + * + *
+     * Output only. URI reference of the attribution.
+     * 
+ * + * string uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TITLE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object title_ = ""; + /** + * + * + *
+     * Output only. Title of the attribution.
+     * 
+ * + * string title = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The title. + */ + @java.lang.Override + public java.lang.String getTitle() { + java.lang.Object ref = title_; + 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(); + title_ = s; + return s; + } + } + /** + * + * + *
+     * Output only. Title of the attribution.
+     * 
+ * + * string title = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for title. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, title_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, title_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext other = + (com.google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext) obj; + + if (!getUri().equals(other.getUri())) return false; + if (!getTitle().equals(other.getTitle())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (37 * hash) + TITLE_FIELD_NUMBER; + hash = (53 * hash) + getTitle().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Attribution from context retrieved by the retrieval tools.
+     * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext) + com.google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContextOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.ContentProto + .internal_static_google_cloud_aiplatform_v1beta1_GroundingAttribution_RetrievedContext_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.ContentProto + .internal_static_google_cloud_aiplatform_v1beta1_GroundingAttribution_RetrievedContext_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext.class, + com.google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext.Builder + .class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + uri_ = ""; + title_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.ContentProto + .internal_static_google_cloud_aiplatform_v1beta1_GroundingAttribution_RetrievedContext_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext build() { + com.google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext + buildPartial() { + com.google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext result = + new com.google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.uri_ = uri_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.title_ = title_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext other) { + if (other + == com.google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext + .getDefaultInstance()) return this; + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getTitle().isEmpty()) { + title_ = other.title_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + uri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + title_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object uri_ = ""; + /** + * + * + *
+       * Output only. URI reference of the attribution.
+       * 
+ * + * string uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Output only. URI reference of the attribution.
+       * 
+ * + * string uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Output only. URI reference of the attribution.
+       * 
+ * + * string uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. URI reference of the attribution.
+       * 
+ * + * string uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + uri_ = getDefaultInstance().getUri(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. URI reference of the attribution.
+       * 
+ * + * string uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object title_ = ""; + /** + * + * + *
+       * Output only. Title of the attribution.
+       * 
+ * + * string title = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The title. + */ + public java.lang.String getTitle() { + java.lang.Object ref = title_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + title_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Output only. Title of the attribution.
+       * 
+ * + * string title = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for title. + */ + public com.google.protobuf.ByteString getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Output only. Title of the attribution.
+       * 
+ * + * string title = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The title to set. + * @return This builder for chaining. + */ + public Builder setTitle(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + title_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. Title of the attribution.
+       * 
+ * + * string title = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearTitle() { + title_ = getDefaultInstance().getTitle(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. Title of the attribution.
+       * 
+ * + * string title = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for title to set. + * @return This builder for chaining. + */ + public Builder setTitleBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + title_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext) + private static final com.google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext(); + } + + public static com.google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RetrievedContext parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + private int bitField0_; private int referenceCase_ = 0; @@ -927,6 +1799,7 @@ public enum ReferenceCase com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { WEB(3), + RETRIEVED_CONTEXT(4), REFERENCE_NOT_SET(0); private final int value; @@ -947,6 +1820,8 @@ public static ReferenceCase forNumber(int value) { switch (value) { case 3: return WEB; + case 4: + return RETRIEVED_CONTEXT; case 0: return REFERENCE_NOT_SET; default: @@ -1020,6 +1895,67 @@ public com.google.cloud.aiplatform.v1beta1.GroundingAttribution.WebOrBuilder get return com.google.cloud.aiplatform.v1beta1.GroundingAttribution.Web.getDefaultInstance(); } + public static final int RETRIEVED_CONTEXT_FIELD_NUMBER = 4; + /** + * + * + *
+   * Optional. Attribution from context retrieved by the retrieval tools.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext retrieved_context = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the retrievedContext field is set. + */ + @java.lang.Override + public boolean hasRetrievedContext() { + return referenceCase_ == 4; + } + /** + * + * + *
+   * Optional. Attribution from context retrieved by the retrieval tools.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext retrieved_context = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The retrievedContext. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext + getRetrievedContext() { + if (referenceCase_ == 4) { + return (com.google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext) reference_; + } + return com.google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext + .getDefaultInstance(); + } + /** + * + * + *
+   * Optional. Attribution from context retrieved by the retrieval tools.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext retrieved_context = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContextOrBuilder + getRetrievedContextOrBuilder() { + if (referenceCase_ == 4) { + return (com.google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext) reference_; + } + return com.google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext + .getDefaultInstance(); + } + public static final int SEGMENT_FIELD_NUMBER = 1; private com.google.cloud.aiplatform.v1beta1.Segment segment_; /** @@ -1139,6 +2075,11 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io output.writeMessage( 3, (com.google.cloud.aiplatform.v1beta1.GroundingAttribution.Web) reference_); } + if (referenceCase_ == 4) { + output.writeMessage( + 4, + (com.google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext) reference_); + } getUnknownFields().writeTo(output); } @@ -1159,6 +2100,13 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 3, (com.google.cloud.aiplatform.v1beta1.GroundingAttribution.Web) reference_); } + if (referenceCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, + (com.google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext) + reference_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -1189,6 +2137,9 @@ public boolean equals(final java.lang.Object obj) { case 3: if (!getWeb().equals(other.getWeb())) return false; break; + case 4: + if (!getRetrievedContext().equals(other.getRetrievedContext())) return false; + break; case 0: default: } @@ -1216,6 +2167,10 @@ public int hashCode() { hash = (37 * hash) + WEB_FIELD_NUMBER; hash = (53 * hash) + getWeb().hashCode(); break; + case 4: + hash = (37 * hash) + RETRIEVED_CONTEXT_FIELD_NUMBER; + hash = (53 * hash) + getRetrievedContext().hashCode(); + break; case 0: default: } @@ -1371,6 +2326,9 @@ public Builder clear() { if (webBuilder_ != null) { webBuilder_.clear(); } + if (retrievedContextBuilder_ != null) { + retrievedContextBuilder_.clear(); + } segment_ = null; if (segmentBuilder_ != null) { segmentBuilder_.dispose(); @@ -1417,11 +2375,11 @@ public com.google.cloud.aiplatform.v1beta1.GroundingAttribution buildPartial() { private void buildPartial0(com.google.cloud.aiplatform.v1beta1.GroundingAttribution result) { int from_bitField0_ = bitField0_; int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000002) != 0)) { + if (((from_bitField0_ & 0x00000004) != 0)) { result.segment_ = segmentBuilder_ == null ? segment_ : segmentBuilder_.build(); to_bitField0_ |= 0x00000001; } - if (((from_bitField0_ & 0x00000004) != 0)) { + if (((from_bitField0_ & 0x00000008) != 0)) { result.confidenceScore_ = confidenceScore_; to_bitField0_ |= 0x00000002; } @@ -1435,6 +2393,9 @@ private void buildPartialOneofs( if (referenceCase_ == 3 && webBuilder_ != null) { result.reference_ = webBuilder_.build(); } + if (referenceCase_ == 4 && retrievedContextBuilder_ != null) { + result.reference_ = retrievedContextBuilder_.build(); + } } @java.lang.Override @@ -1495,6 +2456,11 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.GroundingAttributio mergeWeb(other.getWeb()); break; } + case RETRIEVED_CONTEXT: + { + mergeRetrievedContext(other.getRetrievedContext()); + break; + } case REFERENCE_NOT_SET: { break; @@ -1529,13 +2495,13 @@ public Builder mergeFrom( case 10: { input.readMessage(getSegmentFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000004; break; } // case 10 case 21: { confidenceScore_ = input.readFloat(); - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; break; } // case 21 case 26: @@ -1544,6 +2510,13 @@ public Builder mergeFrom( referenceCase_ = 3; break; } // case 26 + case 34: + { + input.readMessage( + getRetrievedContextFieldBuilder().getBuilder(), extensionRegistry); + referenceCase_ = 4; + break; + } // case 34 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1807,6 +2780,250 @@ public com.google.cloud.aiplatform.v1beta1.GroundingAttribution.WebOrBuilder get return webBuilder_; } + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext, + com.google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext.Builder, + com.google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContextOrBuilder> + retrievedContextBuilder_; + /** + * + * + *
+     * Optional. Attribution from context retrieved by the retrieval tools.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext retrieved_context = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the retrievedContext field is set. + */ + @java.lang.Override + public boolean hasRetrievedContext() { + return referenceCase_ == 4; + } + /** + * + * + *
+     * Optional. Attribution from context retrieved by the retrieval tools.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext retrieved_context = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The retrievedContext. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext + getRetrievedContext() { + if (retrievedContextBuilder_ == null) { + if (referenceCase_ == 4) { + return (com.google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext) + reference_; + } + return com.google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext + .getDefaultInstance(); + } else { + if (referenceCase_ == 4) { + return retrievedContextBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Optional. Attribution from context retrieved by the retrieval tools.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext retrieved_context = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRetrievedContext( + com.google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext value) { + if (retrievedContextBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + reference_ = value; + onChanged(); + } else { + retrievedContextBuilder_.setMessage(value); + } + referenceCase_ = 4; + return this; + } + /** + * + * + *
+     * Optional. Attribution from context retrieved by the retrieval tools.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext retrieved_context = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRetrievedContext( + com.google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext.Builder + builderForValue) { + if (retrievedContextBuilder_ == null) { + reference_ = builderForValue.build(); + onChanged(); + } else { + retrievedContextBuilder_.setMessage(builderForValue.build()); + } + referenceCase_ = 4; + return this; + } + /** + * + * + *
+     * Optional. Attribution from context retrieved by the retrieval tools.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext retrieved_context = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeRetrievedContext( + com.google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext value) { + if (retrievedContextBuilder_ == null) { + if (referenceCase_ == 4 + && reference_ + != com.google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext + .getDefaultInstance()) { + reference_ = + com.google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext.newBuilder( + (com.google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext) + reference_) + .mergeFrom(value) + .buildPartial(); + } else { + reference_ = value; + } + onChanged(); + } else { + if (referenceCase_ == 4) { + retrievedContextBuilder_.mergeFrom(value); + } else { + retrievedContextBuilder_.setMessage(value); + } + } + referenceCase_ = 4; + return this; + } + /** + * + * + *
+     * Optional. Attribution from context retrieved by the retrieval tools.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext retrieved_context = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearRetrievedContext() { + if (retrievedContextBuilder_ == null) { + if (referenceCase_ == 4) { + referenceCase_ = 0; + reference_ = null; + onChanged(); + } + } else { + if (referenceCase_ == 4) { + referenceCase_ = 0; + reference_ = null; + } + retrievedContextBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Optional. Attribution from context retrieved by the retrieval tools.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext retrieved_context = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext.Builder + getRetrievedContextBuilder() { + return getRetrievedContextFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Attribution from context retrieved by the retrieval tools.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext retrieved_context = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContextOrBuilder + getRetrievedContextOrBuilder() { + if ((referenceCase_ == 4) && (retrievedContextBuilder_ != null)) { + return retrievedContextBuilder_.getMessageOrBuilder(); + } else { + if (referenceCase_ == 4) { + return (com.google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext) + reference_; + } + return com.google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Optional. Attribution from context retrieved by the retrieval tools.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext retrieved_context = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext, + com.google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext.Builder, + com.google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContextOrBuilder> + getRetrievedContextFieldBuilder() { + if (retrievedContextBuilder_ == null) { + if (!(referenceCase_ == 4)) { + reference_ = + com.google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext + .getDefaultInstance(); + } + retrievedContextBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext, + com.google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext.Builder, + com.google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContextOrBuilder>( + (com.google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext) + reference_, + getParentForChildren(), + isClean()); + reference_ = null; + } + referenceCase_ = 4; + onChanged(); + return retrievedContextBuilder_; + } + private com.google.cloud.aiplatform.v1beta1.Segment segment_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.aiplatform.v1beta1.Segment, @@ -1827,7 +3044,7 @@ public com.google.cloud.aiplatform.v1beta1.GroundingAttribution.WebOrBuilder get * @return Whether the segment field is set. */ public boolean hasSegment() { - return ((bitField0_ & 0x00000002) != 0); + return ((bitField0_ & 0x00000004) != 0); } /** * @@ -1871,7 +3088,7 @@ public Builder setSegment(com.google.cloud.aiplatform.v1beta1.Segment value) { } else { segmentBuilder_.setMessage(value); } - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -1892,7 +3109,7 @@ public Builder setSegment(com.google.cloud.aiplatform.v1beta1.Segment.Builder bu } else { segmentBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -1909,7 +3126,7 @@ public Builder setSegment(com.google.cloud.aiplatform.v1beta1.Segment.Builder bu */ public Builder mergeSegment(com.google.cloud.aiplatform.v1beta1.Segment value) { if (segmentBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) + if (((bitField0_ & 0x00000004) != 0) && segment_ != null && segment_ != com.google.cloud.aiplatform.v1beta1.Segment.getDefaultInstance()) { getSegmentBuilder().mergeFrom(value); @@ -1920,7 +3137,7 @@ public Builder mergeSegment(com.google.cloud.aiplatform.v1beta1.Segment value) { segmentBuilder_.mergeFrom(value); } if (segment_ != null) { - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000004; onChanged(); } return this; @@ -1937,7 +3154,7 @@ public Builder mergeSegment(com.google.cloud.aiplatform.v1beta1.Segment value) { *
*/ public Builder clearSegment() { - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000004); segment_ = null; if (segmentBuilder_ != null) { segmentBuilder_.dispose(); @@ -1958,7 +3175,7 @@ public Builder clearSegment() { *
*/ public com.google.cloud.aiplatform.v1beta1.Segment.Builder getSegmentBuilder() { - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000004; onChanged(); return getSegmentFieldBuilder().getBuilder(); } @@ -2027,7 +3244,7 @@ public com.google.cloud.aiplatform.v1beta1.SegmentOrBuilder getSegmentOrBuilder( */ @java.lang.Override public boolean hasConfidenceScore() { - return ((bitField0_ & 0x00000004) != 0); + return ((bitField0_ & 0x00000008) != 0); } /** * @@ -2065,7 +3282,7 @@ public float getConfidenceScore() { public Builder setConfidenceScore(float value) { confidenceScore_ = value; - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -2084,7 +3301,7 @@ public Builder setConfidenceScore(float value) { * @return This builder for chaining. */ public Builder clearConfidenceScore() { - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000008); confidenceScore_ = 0F; onChanged(); return this; diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GroundingAttributionOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GroundingAttributionOrBuilder.java index ec377978b4ce..1032855eb940 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GroundingAttributionOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GroundingAttributionOrBuilder.java @@ -65,6 +65,48 @@ public interface GroundingAttributionOrBuilder */ com.google.cloud.aiplatform.v1beta1.GroundingAttribution.WebOrBuilder getWebOrBuilder(); + /** + * + * + *
+   * Optional. Attribution from context retrieved by the retrieval tools.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext retrieved_context = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the retrievedContext field is set. + */ + boolean hasRetrievedContext(); + /** + * + * + *
+   * Optional. Attribution from context retrieved by the retrieval tools.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext retrieved_context = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The retrievedContext. + */ + com.google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext getRetrievedContext(); + /** + * + * + *
+   * Optional. Attribution from context retrieved by the retrieval tools.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContext retrieved_context = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.aiplatform.v1beta1.GroundingAttribution.RetrievedContextOrBuilder + getRetrievedContextOrBuilder(); + /** * * diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GroundingMetadata.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GroundingMetadata.java index 5588c9e3e3fb..ff6a18b584c3 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GroundingMetadata.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GroundingMetadata.java @@ -40,6 +40,7 @@ private GroundingMetadata(com.google.protobuf.GeneratedMessageV3.Builder buil private GroundingMetadata() { webSearchQueries_ = com.google.protobuf.LazyStringArrayList.emptyList(); + retrievalQueries_ = com.google.protobuf.LazyStringArrayList.emptyList(); groundingAttributions_ = java.util.Collections.emptyList(); } @@ -128,6 +129,70 @@ public com.google.protobuf.ByteString getWebSearchQueriesBytes(int index) { return webSearchQueries_.getByteString(index); } + public static final int RETRIEVAL_QUERIES_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList retrievalQueries_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Optional. Queries executed by the retrieval tools.
+   * 
+ * + * repeated string retrieval_queries = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the retrievalQueries. + */ + public com.google.protobuf.ProtocolStringList getRetrievalQueriesList() { + return retrievalQueries_; + } + /** + * + * + *
+   * Optional. Queries executed by the retrieval tools.
+   * 
+ * + * repeated string retrieval_queries = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of retrievalQueries. + */ + public int getRetrievalQueriesCount() { + return retrievalQueries_.size(); + } + /** + * + * + *
+   * Optional. Queries executed by the retrieval tools.
+   * 
+ * + * repeated string retrieval_queries = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The retrievalQueries at the given index. + */ + public java.lang.String getRetrievalQueries(int index) { + return retrievalQueries_.get(index); + } + /** + * + * + *
+   * Optional. Queries executed by the retrieval tools.
+   * 
+ * + * repeated string retrieval_queries = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the retrievalQueries at the given index. + */ + public com.google.protobuf.ByteString getRetrievalQueriesBytes(int index) { + return retrievalQueries_.getByteString(index); + } + public static final int GROUNDING_ATTRIBUTIONS_FIELD_NUMBER = 2; @SuppressWarnings("serial") @@ -233,6 +298,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < groundingAttributions_.size(); i++) { output.writeMessage(2, groundingAttributions_.get(i)); } + for (int i = 0; i < retrievalQueries_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, retrievalQueries_.getRaw(i)); + } getUnknownFields().writeTo(output); } @@ -255,6 +323,14 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 2, groundingAttributions_.get(i)); } + { + int dataSize = 0; + for (int i = 0; i < retrievalQueries_.size(); i++) { + dataSize += computeStringSizeNoTag(retrievalQueries_.getRaw(i)); + } + size += dataSize; + size += 1 * getRetrievalQueriesList().size(); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -272,6 +348,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.aiplatform.v1beta1.GroundingMetadata) obj; if (!getWebSearchQueriesList().equals(other.getWebSearchQueriesList())) return false; + if (!getRetrievalQueriesList().equals(other.getRetrievalQueriesList())) return false; if (!getGroundingAttributionsList().equals(other.getGroundingAttributionsList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; @@ -288,6 +365,10 @@ public int hashCode() { hash = (37 * hash) + WEB_SEARCH_QUERIES_FIELD_NUMBER; hash = (53 * hash) + getWebSearchQueriesList().hashCode(); } + if (getRetrievalQueriesCount() > 0) { + hash = (37 * hash) + RETRIEVAL_QUERIES_FIELD_NUMBER; + hash = (53 * hash) + getRetrievalQueriesList().hashCode(); + } if (getGroundingAttributionsCount() > 0) { hash = (37 * hash) + GROUNDING_ATTRIBUTIONS_FIELD_NUMBER; hash = (53 * hash) + getGroundingAttributionsList().hashCode(); @@ -433,13 +514,14 @@ public Builder clear() { super.clear(); bitField0_ = 0; webSearchQueries_ = com.google.protobuf.LazyStringArrayList.emptyList(); + retrievalQueries_ = com.google.protobuf.LazyStringArrayList.emptyList(); if (groundingAttributionsBuilder_ == null) { groundingAttributions_ = java.util.Collections.emptyList(); } else { groundingAttributions_ = null; groundingAttributionsBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000004); return this; } @@ -478,9 +560,9 @@ public com.google.cloud.aiplatform.v1beta1.GroundingMetadata buildPartial() { private void buildPartialRepeatedFields( com.google.cloud.aiplatform.v1beta1.GroundingMetadata result) { if (groundingAttributionsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { + if (((bitField0_ & 0x00000004) != 0)) { groundingAttributions_ = java.util.Collections.unmodifiableList(groundingAttributions_); - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000004); } result.groundingAttributions_ = groundingAttributions_; } else { @@ -494,6 +576,10 @@ private void buildPartial0(com.google.cloud.aiplatform.v1beta1.GroundingMetadata webSearchQueries_.makeImmutable(); result.webSearchQueries_ = webSearchQueries_; } + if (((from_bitField0_ & 0x00000002) != 0)) { + retrievalQueries_.makeImmutable(); + result.retrievalQueries_ = retrievalQueries_; + } } @java.lang.Override @@ -552,11 +638,21 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.GroundingMetadata o } onChanged(); } + if (!other.retrievalQueries_.isEmpty()) { + if (retrievalQueries_.isEmpty()) { + retrievalQueries_ = other.retrievalQueries_; + bitField0_ |= 0x00000002; + } else { + ensureRetrievalQueriesIsMutable(); + retrievalQueries_.addAll(other.retrievalQueries_); + } + onChanged(); + } if (groundingAttributionsBuilder_ == null) { if (!other.groundingAttributions_.isEmpty()) { if (groundingAttributions_.isEmpty()) { groundingAttributions_ = other.groundingAttributions_; - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000004); } else { ensureGroundingAttributionsIsMutable(); groundingAttributions_.addAll(other.groundingAttributions_); @@ -569,7 +665,7 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.GroundingMetadata o groundingAttributionsBuilder_.dispose(); groundingAttributionsBuilder_ = null; groundingAttributions_ = other.groundingAttributions_; - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000004); groundingAttributionsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getGroundingAttributionsFieldBuilder() @@ -626,6 +722,13 @@ public Builder mergeFrom( } break; } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureRetrievalQueriesIsMutable(); + retrievalQueries_.add(s); + break; + } // case 26 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -828,15 +931,189 @@ public Builder addWebSearchQueriesBytes(com.google.protobuf.ByteString value) { return this; } + private com.google.protobuf.LazyStringArrayList retrievalQueries_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureRetrievalQueriesIsMutable() { + if (!retrievalQueries_.isModifiable()) { + retrievalQueries_ = new com.google.protobuf.LazyStringArrayList(retrievalQueries_); + } + bitField0_ |= 0x00000002; + } + /** + * + * + *
+     * Optional. Queries executed by the retrieval tools.
+     * 
+ * + * repeated string retrieval_queries = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the retrievalQueries. + */ + public com.google.protobuf.ProtocolStringList getRetrievalQueriesList() { + retrievalQueries_.makeImmutable(); + return retrievalQueries_; + } + /** + * + * + *
+     * Optional. Queries executed by the retrieval tools.
+     * 
+ * + * repeated string retrieval_queries = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of retrievalQueries. + */ + public int getRetrievalQueriesCount() { + return retrievalQueries_.size(); + } + /** + * + * + *
+     * Optional. Queries executed by the retrieval tools.
+     * 
+ * + * repeated string retrieval_queries = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The retrievalQueries at the given index. + */ + public java.lang.String getRetrievalQueries(int index) { + return retrievalQueries_.get(index); + } + /** + * + * + *
+     * Optional. Queries executed by the retrieval tools.
+     * 
+ * + * repeated string retrieval_queries = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the retrievalQueries at the given index. + */ + public com.google.protobuf.ByteString getRetrievalQueriesBytes(int index) { + return retrievalQueries_.getByteString(index); + } + /** + * + * + *
+     * Optional. Queries executed by the retrieval tools.
+     * 
+ * + * repeated string retrieval_queries = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The retrievalQueries to set. + * @return This builder for chaining. + */ + public Builder setRetrievalQueries(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRetrievalQueriesIsMutable(); + retrievalQueries_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Queries executed by the retrieval tools.
+     * 
+ * + * repeated string retrieval_queries = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The retrievalQueries to add. + * @return This builder for chaining. + */ + public Builder addRetrievalQueries(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRetrievalQueriesIsMutable(); + retrievalQueries_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Queries executed by the retrieval tools.
+     * 
+ * + * repeated string retrieval_queries = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The retrievalQueries to add. + * @return This builder for chaining. + */ + public Builder addAllRetrievalQueries(java.lang.Iterable values) { + ensureRetrievalQueriesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, retrievalQueries_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Queries executed by the retrieval tools.
+     * 
+ * + * repeated string retrieval_queries = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRetrievalQueries() { + retrievalQueries_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Queries executed by the retrieval tools.
+     * 
+ * + * repeated string retrieval_queries = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes of the retrievalQueries to add. + * @return This builder for chaining. + */ + public Builder addRetrievalQueriesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureRetrievalQueriesIsMutable(); + retrievalQueries_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + private java.util.List groundingAttributions_ = java.util.Collections.emptyList(); private void ensureGroundingAttributionsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { + if (!((bitField0_ & 0x00000004) != 0)) { groundingAttributions_ = new java.util.ArrayList( groundingAttributions_); - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000004; } } @@ -1082,7 +1359,7 @@ public Builder addAllGroundingAttributions( public Builder clearGroundingAttributions() { if (groundingAttributionsBuilder_ == null) { groundingAttributions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000004); onChanged(); } else { groundingAttributionsBuilder_.clear(); @@ -1226,7 +1503,7 @@ public Builder removeGroundingAttributions(int index) { com.google.cloud.aiplatform.v1beta1.GroundingAttribution.Builder, com.google.cloud.aiplatform.v1beta1.GroundingAttributionOrBuilder>( groundingAttributions_, - ((bitField0_ & 0x00000002) != 0), + ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); groundingAttributions_ = null; diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GroundingMetadataOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GroundingMetadataOrBuilder.java index 464bf6523b36..c60d1ca4f3bf 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GroundingMetadataOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GroundingMetadataOrBuilder.java @@ -75,6 +75,57 @@ public interface GroundingMetadataOrBuilder */ com.google.protobuf.ByteString getWebSearchQueriesBytes(int index); + /** + * + * + *
+   * Optional. Queries executed by the retrieval tools.
+   * 
+ * + * repeated string retrieval_queries = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the retrievalQueries. + */ + java.util.List getRetrievalQueriesList(); + /** + * + * + *
+   * Optional. Queries executed by the retrieval tools.
+   * 
+ * + * repeated string retrieval_queries = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of retrievalQueries. + */ + int getRetrievalQueriesCount(); + /** + * + * + *
+   * Optional. Queries executed by the retrieval tools.
+   * 
+ * + * repeated string retrieval_queries = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The retrievalQueries at the given index. + */ + java.lang.String getRetrievalQueries(int index); + /** + * + * + *
+   * Optional. Queries executed by the retrieval tools.
+   * 
+ * + * repeated string retrieval_queries = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the retrievalQueries at the given index. + */ + com.google.protobuf.ByteString getRetrievalQueriesBytes(int index); + /** * * diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ImportRagFilesConfig.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ImportRagFilesConfig.java new file mode 100644 index 000000000000..9362254b72c0 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ImportRagFilesConfig.java @@ -0,0 +1,1474 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/vertex_rag_data.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Config for importing RagFiles.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.ImportRagFilesConfig} + */ +public final class ImportRagFilesConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.ImportRagFilesConfig) + ImportRagFilesConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImportRagFilesConfig.newBuilder() to construct. + private ImportRagFilesConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ImportRagFilesConfig() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ImportRagFilesConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataProto + .internal_static_google_cloud_aiplatform_v1beta1_ImportRagFilesConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataProto + .internal_static_google_cloud_aiplatform_v1beta1_ImportRagFilesConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.ImportRagFilesConfig.class, + com.google.cloud.aiplatform.v1beta1.ImportRagFilesConfig.Builder.class); + } + + private int bitField0_; + private int importSourceCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object importSource_; + + public enum ImportSourceCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + GCS_SOURCE(2), + GOOGLE_DRIVE_SOURCE(3), + IMPORTSOURCE_NOT_SET(0); + private final int value; + + private ImportSourceCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ImportSourceCase valueOf(int value) { + return forNumber(value); + } + + public static ImportSourceCase forNumber(int value) { + switch (value) { + case 2: + return GCS_SOURCE; + case 3: + return GOOGLE_DRIVE_SOURCE; + case 0: + return IMPORTSOURCE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ImportSourceCase getImportSourceCase() { + return ImportSourceCase.forNumber(importSourceCase_); + } + + public static final int GCS_SOURCE_FIELD_NUMBER = 2; + /** + * + * + *
+   * Google Cloud Storage location. Supports importing individual files as
+   * well as entire Google Cloud Storage directories. Sample formats:
+   * - `gs://bucket_name/my_directory/object_name/my_file.txt`
+   * - `gs://bucket_name/my_directory`
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.GcsSource gcs_source = 2; + * + * @return Whether the gcsSource field is set. + */ + @java.lang.Override + public boolean hasGcsSource() { + return importSourceCase_ == 2; + } + /** + * + * + *
+   * Google Cloud Storage location. Supports importing individual files as
+   * well as entire Google Cloud Storage directories. Sample formats:
+   * - `gs://bucket_name/my_directory/object_name/my_file.txt`
+   * - `gs://bucket_name/my_directory`
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.GcsSource gcs_source = 2; + * + * @return The gcsSource. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GcsSource getGcsSource() { + if (importSourceCase_ == 2) { + return (com.google.cloud.aiplatform.v1beta1.GcsSource) importSource_; + } + return com.google.cloud.aiplatform.v1beta1.GcsSource.getDefaultInstance(); + } + /** + * + * + *
+   * Google Cloud Storage location. Supports importing individual files as
+   * well as entire Google Cloud Storage directories. Sample formats:
+   * - `gs://bucket_name/my_directory/object_name/my_file.txt`
+   * - `gs://bucket_name/my_directory`
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.GcsSource gcs_source = 2; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GcsSourceOrBuilder getGcsSourceOrBuilder() { + if (importSourceCase_ == 2) { + return (com.google.cloud.aiplatform.v1beta1.GcsSource) importSource_; + } + return com.google.cloud.aiplatform.v1beta1.GcsSource.getDefaultInstance(); + } + + public static final int GOOGLE_DRIVE_SOURCE_FIELD_NUMBER = 3; + /** + * + * + *
+   * Google Drive location. Supports importing individual files as
+   * well as Google Drive folders.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.GoogleDriveSource google_drive_source = 3; + * + * @return Whether the googleDriveSource field is set. + */ + @java.lang.Override + public boolean hasGoogleDriveSource() { + return importSourceCase_ == 3; + } + /** + * + * + *
+   * Google Drive location. Supports importing individual files as
+   * well as Google Drive folders.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.GoogleDriveSource google_drive_source = 3; + * + * @return The googleDriveSource. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GoogleDriveSource getGoogleDriveSource() { + if (importSourceCase_ == 3) { + return (com.google.cloud.aiplatform.v1beta1.GoogleDriveSource) importSource_; + } + return com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.getDefaultInstance(); + } + /** + * + * + *
+   * Google Drive location. Supports importing individual files as
+   * well as Google Drive folders.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.GoogleDriveSource google_drive_source = 3; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GoogleDriveSourceOrBuilder + getGoogleDriveSourceOrBuilder() { + if (importSourceCase_ == 3) { + return (com.google.cloud.aiplatform.v1beta1.GoogleDriveSource) importSource_; + } + return com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.getDefaultInstance(); + } + + public static final int RAG_FILE_CHUNKING_CONFIG_FIELD_NUMBER = 4; + private com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig ragFileChunkingConfig_; + /** + * + * + *
+   * Specifies the size and overlap of chunks after importing RagFiles.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.RagFileChunkingConfig rag_file_chunking_config = 4; + * + * + * @return Whether the ragFileChunkingConfig field is set. + */ + @java.lang.Override + public boolean hasRagFileChunkingConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Specifies the size and overlap of chunks after importing RagFiles.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.RagFileChunkingConfig rag_file_chunking_config = 4; + * + * + * @return The ragFileChunkingConfig. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig getRagFileChunkingConfig() { + return ragFileChunkingConfig_ == null + ? com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig.getDefaultInstance() + : ragFileChunkingConfig_; + } + /** + * + * + *
+   * Specifies the size and overlap of chunks after importing RagFiles.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.RagFileChunkingConfig rag_file_chunking_config = 4; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfigOrBuilder + getRagFileChunkingConfigOrBuilder() { + return ragFileChunkingConfig_ == null + ? com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig.getDefaultInstance() + : ragFileChunkingConfig_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (importSourceCase_ == 2) { + output.writeMessage(2, (com.google.cloud.aiplatform.v1beta1.GcsSource) importSource_); + } + if (importSourceCase_ == 3) { + output.writeMessage(3, (com.google.cloud.aiplatform.v1beta1.GoogleDriveSource) importSource_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(4, getRagFileChunkingConfig()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (importSourceCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.aiplatform.v1beta1.GcsSource) importSource_); + } + if (importSourceCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, (com.google.cloud.aiplatform.v1beta1.GoogleDriveSource) importSource_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(4, getRagFileChunkingConfig()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.ImportRagFilesConfig)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.ImportRagFilesConfig other = + (com.google.cloud.aiplatform.v1beta1.ImportRagFilesConfig) obj; + + if (hasRagFileChunkingConfig() != other.hasRagFileChunkingConfig()) return false; + if (hasRagFileChunkingConfig()) { + if (!getRagFileChunkingConfig().equals(other.getRagFileChunkingConfig())) return false; + } + if (!getImportSourceCase().equals(other.getImportSourceCase())) return false; + switch (importSourceCase_) { + case 2: + if (!getGcsSource().equals(other.getGcsSource())) return false; + break; + case 3: + if (!getGoogleDriveSource().equals(other.getGoogleDriveSource())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasRagFileChunkingConfig()) { + hash = (37 * hash) + RAG_FILE_CHUNKING_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getRagFileChunkingConfig().hashCode(); + } + switch (importSourceCase_) { + case 2: + hash = (37 * hash) + GCS_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getGcsSource().hashCode(); + break; + case 3: + hash = (37 * hash) + GOOGLE_DRIVE_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getGoogleDriveSource().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.ImportRagFilesConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.ImportRagFilesConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ImportRagFilesConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.ImportRagFilesConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ImportRagFilesConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.ImportRagFilesConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ImportRagFilesConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.ImportRagFilesConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ImportRagFilesConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.ImportRagFilesConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ImportRagFilesConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.ImportRagFilesConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.ImportRagFilesConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Config for importing RagFiles.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.ImportRagFilesConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.ImportRagFilesConfig) + com.google.cloud.aiplatform.v1beta1.ImportRagFilesConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataProto + .internal_static_google_cloud_aiplatform_v1beta1_ImportRagFilesConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataProto + .internal_static_google_cloud_aiplatform_v1beta1_ImportRagFilesConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.ImportRagFilesConfig.class, + com.google.cloud.aiplatform.v1beta1.ImportRagFilesConfig.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.ImportRagFilesConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getRagFileChunkingConfigFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (gcsSourceBuilder_ != null) { + gcsSourceBuilder_.clear(); + } + if (googleDriveSourceBuilder_ != null) { + googleDriveSourceBuilder_.clear(); + } + ragFileChunkingConfig_ = null; + if (ragFileChunkingConfigBuilder_ != null) { + ragFileChunkingConfigBuilder_.dispose(); + ragFileChunkingConfigBuilder_ = null; + } + importSourceCase_ = 0; + importSource_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataProto + .internal_static_google_cloud_aiplatform_v1beta1_ImportRagFilesConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ImportRagFilesConfig getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.ImportRagFilesConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ImportRagFilesConfig build() { + com.google.cloud.aiplatform.v1beta1.ImportRagFilesConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ImportRagFilesConfig buildPartial() { + com.google.cloud.aiplatform.v1beta1.ImportRagFilesConfig result = + new com.google.cloud.aiplatform.v1beta1.ImportRagFilesConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1beta1.ImportRagFilesConfig result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.ragFileChunkingConfig_ = + ragFileChunkingConfigBuilder_ == null + ? ragFileChunkingConfig_ + : ragFileChunkingConfigBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs( + com.google.cloud.aiplatform.v1beta1.ImportRagFilesConfig result) { + result.importSourceCase_ = importSourceCase_; + result.importSource_ = this.importSource_; + if (importSourceCase_ == 2 && gcsSourceBuilder_ != null) { + result.importSource_ = gcsSourceBuilder_.build(); + } + if (importSourceCase_ == 3 && googleDriveSourceBuilder_ != null) { + result.importSource_ = googleDriveSourceBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1beta1.ImportRagFilesConfig) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.ImportRagFilesConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.ImportRagFilesConfig other) { + if (other == com.google.cloud.aiplatform.v1beta1.ImportRagFilesConfig.getDefaultInstance()) + return this; + if (other.hasRagFileChunkingConfig()) { + mergeRagFileChunkingConfig(other.getRagFileChunkingConfig()); + } + switch (other.getImportSourceCase()) { + case GCS_SOURCE: + { + mergeGcsSource(other.getGcsSource()); + break; + } + case GOOGLE_DRIVE_SOURCE: + { + mergeGoogleDriveSource(other.getGoogleDriveSource()); + break; + } + case IMPORTSOURCE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + input.readMessage(getGcsSourceFieldBuilder().getBuilder(), extensionRegistry); + importSourceCase_ = 2; + break; + } // case 18 + case 26: + { + input.readMessage( + getGoogleDriveSourceFieldBuilder().getBuilder(), extensionRegistry); + importSourceCase_ = 3; + break; + } // case 26 + case 34: + { + input.readMessage( + getRagFileChunkingConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int importSourceCase_ = 0; + private java.lang.Object importSource_; + + public ImportSourceCase getImportSourceCase() { + return ImportSourceCase.forNumber(importSourceCase_); + } + + public Builder clearImportSource() { + importSourceCase_ = 0; + importSource_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.GcsSource, + com.google.cloud.aiplatform.v1beta1.GcsSource.Builder, + com.google.cloud.aiplatform.v1beta1.GcsSourceOrBuilder> + gcsSourceBuilder_; + /** + * + * + *
+     * Google Cloud Storage location. Supports importing individual files as
+     * well as entire Google Cloud Storage directories. Sample formats:
+     * - `gs://bucket_name/my_directory/object_name/my_file.txt`
+     * - `gs://bucket_name/my_directory`
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GcsSource gcs_source = 2; + * + * @return Whether the gcsSource field is set. + */ + @java.lang.Override + public boolean hasGcsSource() { + return importSourceCase_ == 2; + } + /** + * + * + *
+     * Google Cloud Storage location. Supports importing individual files as
+     * well as entire Google Cloud Storage directories. Sample formats:
+     * - `gs://bucket_name/my_directory/object_name/my_file.txt`
+     * - `gs://bucket_name/my_directory`
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GcsSource gcs_source = 2; + * + * @return The gcsSource. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GcsSource getGcsSource() { + if (gcsSourceBuilder_ == null) { + if (importSourceCase_ == 2) { + return (com.google.cloud.aiplatform.v1beta1.GcsSource) importSource_; + } + return com.google.cloud.aiplatform.v1beta1.GcsSource.getDefaultInstance(); + } else { + if (importSourceCase_ == 2) { + return gcsSourceBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1beta1.GcsSource.getDefaultInstance(); + } + } + /** + * + * + *
+     * Google Cloud Storage location. Supports importing individual files as
+     * well as entire Google Cloud Storage directories. Sample formats:
+     * - `gs://bucket_name/my_directory/object_name/my_file.txt`
+     * - `gs://bucket_name/my_directory`
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GcsSource gcs_source = 2; + */ + public Builder setGcsSource(com.google.cloud.aiplatform.v1beta1.GcsSource value) { + if (gcsSourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + importSource_ = value; + onChanged(); + } else { + gcsSourceBuilder_.setMessage(value); + } + importSourceCase_ = 2; + return this; + } + /** + * + * + *
+     * Google Cloud Storage location. Supports importing individual files as
+     * well as entire Google Cloud Storage directories. Sample formats:
+     * - `gs://bucket_name/my_directory/object_name/my_file.txt`
+     * - `gs://bucket_name/my_directory`
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GcsSource gcs_source = 2; + */ + public Builder setGcsSource( + com.google.cloud.aiplatform.v1beta1.GcsSource.Builder builderForValue) { + if (gcsSourceBuilder_ == null) { + importSource_ = builderForValue.build(); + onChanged(); + } else { + gcsSourceBuilder_.setMessage(builderForValue.build()); + } + importSourceCase_ = 2; + return this; + } + /** + * + * + *
+     * Google Cloud Storage location. Supports importing individual files as
+     * well as entire Google Cloud Storage directories. Sample formats:
+     * - `gs://bucket_name/my_directory/object_name/my_file.txt`
+     * - `gs://bucket_name/my_directory`
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GcsSource gcs_source = 2; + */ + public Builder mergeGcsSource(com.google.cloud.aiplatform.v1beta1.GcsSource value) { + if (gcsSourceBuilder_ == null) { + if (importSourceCase_ == 2 + && importSource_ + != com.google.cloud.aiplatform.v1beta1.GcsSource.getDefaultInstance()) { + importSource_ = + com.google.cloud.aiplatform.v1beta1.GcsSource.newBuilder( + (com.google.cloud.aiplatform.v1beta1.GcsSource) importSource_) + .mergeFrom(value) + .buildPartial(); + } else { + importSource_ = value; + } + onChanged(); + } else { + if (importSourceCase_ == 2) { + gcsSourceBuilder_.mergeFrom(value); + } else { + gcsSourceBuilder_.setMessage(value); + } + } + importSourceCase_ = 2; + return this; + } + /** + * + * + *
+     * Google Cloud Storage location. Supports importing individual files as
+     * well as entire Google Cloud Storage directories. Sample formats:
+     * - `gs://bucket_name/my_directory/object_name/my_file.txt`
+     * - `gs://bucket_name/my_directory`
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GcsSource gcs_source = 2; + */ + public Builder clearGcsSource() { + if (gcsSourceBuilder_ == null) { + if (importSourceCase_ == 2) { + importSourceCase_ = 0; + importSource_ = null; + onChanged(); + } + } else { + if (importSourceCase_ == 2) { + importSourceCase_ = 0; + importSource_ = null; + } + gcsSourceBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Google Cloud Storage location. Supports importing individual files as
+     * well as entire Google Cloud Storage directories. Sample formats:
+     * - `gs://bucket_name/my_directory/object_name/my_file.txt`
+     * - `gs://bucket_name/my_directory`
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GcsSource gcs_source = 2; + */ + public com.google.cloud.aiplatform.v1beta1.GcsSource.Builder getGcsSourceBuilder() { + return getGcsSourceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Google Cloud Storage location. Supports importing individual files as
+     * well as entire Google Cloud Storage directories. Sample formats:
+     * - `gs://bucket_name/my_directory/object_name/my_file.txt`
+     * - `gs://bucket_name/my_directory`
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GcsSource gcs_source = 2; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GcsSourceOrBuilder getGcsSourceOrBuilder() { + if ((importSourceCase_ == 2) && (gcsSourceBuilder_ != null)) { + return gcsSourceBuilder_.getMessageOrBuilder(); + } else { + if (importSourceCase_ == 2) { + return (com.google.cloud.aiplatform.v1beta1.GcsSource) importSource_; + } + return com.google.cloud.aiplatform.v1beta1.GcsSource.getDefaultInstance(); + } + } + /** + * + * + *
+     * Google Cloud Storage location. Supports importing individual files as
+     * well as entire Google Cloud Storage directories. Sample formats:
+     * - `gs://bucket_name/my_directory/object_name/my_file.txt`
+     * - `gs://bucket_name/my_directory`
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GcsSource gcs_source = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.GcsSource, + com.google.cloud.aiplatform.v1beta1.GcsSource.Builder, + com.google.cloud.aiplatform.v1beta1.GcsSourceOrBuilder> + getGcsSourceFieldBuilder() { + if (gcsSourceBuilder_ == null) { + if (!(importSourceCase_ == 2)) { + importSource_ = com.google.cloud.aiplatform.v1beta1.GcsSource.getDefaultInstance(); + } + gcsSourceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.GcsSource, + com.google.cloud.aiplatform.v1beta1.GcsSource.Builder, + com.google.cloud.aiplatform.v1beta1.GcsSourceOrBuilder>( + (com.google.cloud.aiplatform.v1beta1.GcsSource) importSource_, + getParentForChildren(), + isClean()); + importSource_ = null; + } + importSourceCase_ = 2; + onChanged(); + return gcsSourceBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.GoogleDriveSource, + com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.Builder, + com.google.cloud.aiplatform.v1beta1.GoogleDriveSourceOrBuilder> + googleDriveSourceBuilder_; + /** + * + * + *
+     * Google Drive location. Supports importing individual files as
+     * well as Google Drive folders.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GoogleDriveSource google_drive_source = 3; + * + * @return Whether the googleDriveSource field is set. + */ + @java.lang.Override + public boolean hasGoogleDriveSource() { + return importSourceCase_ == 3; + } + /** + * + * + *
+     * Google Drive location. Supports importing individual files as
+     * well as Google Drive folders.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GoogleDriveSource google_drive_source = 3; + * + * @return The googleDriveSource. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GoogleDriveSource getGoogleDriveSource() { + if (googleDriveSourceBuilder_ == null) { + if (importSourceCase_ == 3) { + return (com.google.cloud.aiplatform.v1beta1.GoogleDriveSource) importSource_; + } + return com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.getDefaultInstance(); + } else { + if (importSourceCase_ == 3) { + return googleDriveSourceBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.getDefaultInstance(); + } + } + /** + * + * + *
+     * Google Drive location. Supports importing individual files as
+     * well as Google Drive folders.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GoogleDriveSource google_drive_source = 3; + */ + public Builder setGoogleDriveSource( + com.google.cloud.aiplatform.v1beta1.GoogleDriveSource value) { + if (googleDriveSourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + importSource_ = value; + onChanged(); + } else { + googleDriveSourceBuilder_.setMessage(value); + } + importSourceCase_ = 3; + return this; + } + /** + * + * + *
+     * Google Drive location. Supports importing individual files as
+     * well as Google Drive folders.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GoogleDriveSource google_drive_source = 3; + */ + public Builder setGoogleDriveSource( + com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.Builder builderForValue) { + if (googleDriveSourceBuilder_ == null) { + importSource_ = builderForValue.build(); + onChanged(); + } else { + googleDriveSourceBuilder_.setMessage(builderForValue.build()); + } + importSourceCase_ = 3; + return this; + } + /** + * + * + *
+     * Google Drive location. Supports importing individual files as
+     * well as Google Drive folders.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GoogleDriveSource google_drive_source = 3; + */ + public Builder mergeGoogleDriveSource( + com.google.cloud.aiplatform.v1beta1.GoogleDriveSource value) { + if (googleDriveSourceBuilder_ == null) { + if (importSourceCase_ == 3 + && importSource_ + != com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.getDefaultInstance()) { + importSource_ = + com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.newBuilder( + (com.google.cloud.aiplatform.v1beta1.GoogleDriveSource) importSource_) + .mergeFrom(value) + .buildPartial(); + } else { + importSource_ = value; + } + onChanged(); + } else { + if (importSourceCase_ == 3) { + googleDriveSourceBuilder_.mergeFrom(value); + } else { + googleDriveSourceBuilder_.setMessage(value); + } + } + importSourceCase_ = 3; + return this; + } + /** + * + * + *
+     * Google Drive location. Supports importing individual files as
+     * well as Google Drive folders.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GoogleDriveSource google_drive_source = 3; + */ + public Builder clearGoogleDriveSource() { + if (googleDriveSourceBuilder_ == null) { + if (importSourceCase_ == 3) { + importSourceCase_ = 0; + importSource_ = null; + onChanged(); + } + } else { + if (importSourceCase_ == 3) { + importSourceCase_ = 0; + importSource_ = null; + } + googleDriveSourceBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Google Drive location. Supports importing individual files as
+     * well as Google Drive folders.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GoogleDriveSource google_drive_source = 3; + */ + public com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.Builder + getGoogleDriveSourceBuilder() { + return getGoogleDriveSourceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Google Drive location. Supports importing individual files as
+     * well as Google Drive folders.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GoogleDriveSource google_drive_source = 3; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GoogleDriveSourceOrBuilder + getGoogleDriveSourceOrBuilder() { + if ((importSourceCase_ == 3) && (googleDriveSourceBuilder_ != null)) { + return googleDriveSourceBuilder_.getMessageOrBuilder(); + } else { + if (importSourceCase_ == 3) { + return (com.google.cloud.aiplatform.v1beta1.GoogleDriveSource) importSource_; + } + return com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.getDefaultInstance(); + } + } + /** + * + * + *
+     * Google Drive location. Supports importing individual files as
+     * well as Google Drive folders.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GoogleDriveSource google_drive_source = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.GoogleDriveSource, + com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.Builder, + com.google.cloud.aiplatform.v1beta1.GoogleDriveSourceOrBuilder> + getGoogleDriveSourceFieldBuilder() { + if (googleDriveSourceBuilder_ == null) { + if (!(importSourceCase_ == 3)) { + importSource_ = + com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.getDefaultInstance(); + } + googleDriveSourceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.GoogleDriveSource, + com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.Builder, + com.google.cloud.aiplatform.v1beta1.GoogleDriveSourceOrBuilder>( + (com.google.cloud.aiplatform.v1beta1.GoogleDriveSource) importSource_, + getParentForChildren(), + isClean()); + importSource_ = null; + } + importSourceCase_ = 3; + onChanged(); + return googleDriveSourceBuilder_; + } + + private com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig ragFileChunkingConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig, + com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig.Builder, + com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfigOrBuilder> + ragFileChunkingConfigBuilder_; + /** + * + * + *
+     * Specifies the size and overlap of chunks after importing RagFiles.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.RagFileChunkingConfig rag_file_chunking_config = 4; + * + * + * @return Whether the ragFileChunkingConfig field is set. + */ + public boolean hasRagFileChunkingConfig() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Specifies the size and overlap of chunks after importing RagFiles.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.RagFileChunkingConfig rag_file_chunking_config = 4; + * + * + * @return The ragFileChunkingConfig. + */ + public com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig getRagFileChunkingConfig() { + if (ragFileChunkingConfigBuilder_ == null) { + return ragFileChunkingConfig_ == null + ? com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig.getDefaultInstance() + : ragFileChunkingConfig_; + } else { + return ragFileChunkingConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Specifies the size and overlap of chunks after importing RagFiles.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.RagFileChunkingConfig rag_file_chunking_config = 4; + * + */ + public Builder setRagFileChunkingConfig( + com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig value) { + if (ragFileChunkingConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ragFileChunkingConfig_ = value; + } else { + ragFileChunkingConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies the size and overlap of chunks after importing RagFiles.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.RagFileChunkingConfig rag_file_chunking_config = 4; + * + */ + public Builder setRagFileChunkingConfig( + com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig.Builder builderForValue) { + if (ragFileChunkingConfigBuilder_ == null) { + ragFileChunkingConfig_ = builderForValue.build(); + } else { + ragFileChunkingConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies the size and overlap of chunks after importing RagFiles.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.RagFileChunkingConfig rag_file_chunking_config = 4; + * + */ + public Builder mergeRagFileChunkingConfig( + com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig value) { + if (ragFileChunkingConfigBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && ragFileChunkingConfig_ != null + && ragFileChunkingConfig_ + != com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig.getDefaultInstance()) { + getRagFileChunkingConfigBuilder().mergeFrom(value); + } else { + ragFileChunkingConfig_ = value; + } + } else { + ragFileChunkingConfigBuilder_.mergeFrom(value); + } + if (ragFileChunkingConfig_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Specifies the size and overlap of chunks after importing RagFiles.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.RagFileChunkingConfig rag_file_chunking_config = 4; + * + */ + public Builder clearRagFileChunkingConfig() { + bitField0_ = (bitField0_ & ~0x00000004); + ragFileChunkingConfig_ = null; + if (ragFileChunkingConfigBuilder_ != null) { + ragFileChunkingConfigBuilder_.dispose(); + ragFileChunkingConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies the size and overlap of chunks after importing RagFiles.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.RagFileChunkingConfig rag_file_chunking_config = 4; + * + */ + public com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig.Builder + getRagFileChunkingConfigBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getRagFileChunkingConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Specifies the size and overlap of chunks after importing RagFiles.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.RagFileChunkingConfig rag_file_chunking_config = 4; + * + */ + public com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfigOrBuilder + getRagFileChunkingConfigOrBuilder() { + if (ragFileChunkingConfigBuilder_ != null) { + return ragFileChunkingConfigBuilder_.getMessageOrBuilder(); + } else { + return ragFileChunkingConfig_ == null + ? com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig.getDefaultInstance() + : ragFileChunkingConfig_; + } + } + /** + * + * + *
+     * Specifies the size and overlap of chunks after importing RagFiles.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.RagFileChunkingConfig rag_file_chunking_config = 4; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig, + com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig.Builder, + com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfigOrBuilder> + getRagFileChunkingConfigFieldBuilder() { + if (ragFileChunkingConfigBuilder_ == null) { + ragFileChunkingConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig, + com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig.Builder, + com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfigOrBuilder>( + getRagFileChunkingConfig(), getParentForChildren(), isClean()); + ragFileChunkingConfig_ = null; + } + return ragFileChunkingConfigBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.ImportRagFilesConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.ImportRagFilesConfig) + private static final com.google.cloud.aiplatform.v1beta1.ImportRagFilesConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.ImportRagFilesConfig(); + } + + public static com.google.cloud.aiplatform.v1beta1.ImportRagFilesConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImportRagFilesConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ImportRagFilesConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ImportRagFilesConfigOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ImportRagFilesConfigOrBuilder.java new file mode 100644 index 000000000000..4e9739f13fd4 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ImportRagFilesConfigOrBuilder.java @@ -0,0 +1,149 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/vertex_rag_data.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +public interface ImportRagFilesConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.ImportRagFilesConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Google Cloud Storage location. Supports importing individual files as
+   * well as entire Google Cloud Storage directories. Sample formats:
+   * - `gs://bucket_name/my_directory/object_name/my_file.txt`
+   * - `gs://bucket_name/my_directory`
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.GcsSource gcs_source = 2; + * + * @return Whether the gcsSource field is set. + */ + boolean hasGcsSource(); + /** + * + * + *
+   * Google Cloud Storage location. Supports importing individual files as
+   * well as entire Google Cloud Storage directories. Sample formats:
+   * - `gs://bucket_name/my_directory/object_name/my_file.txt`
+   * - `gs://bucket_name/my_directory`
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.GcsSource gcs_source = 2; + * + * @return The gcsSource. + */ + com.google.cloud.aiplatform.v1beta1.GcsSource getGcsSource(); + /** + * + * + *
+   * Google Cloud Storage location. Supports importing individual files as
+   * well as entire Google Cloud Storage directories. Sample formats:
+   * - `gs://bucket_name/my_directory/object_name/my_file.txt`
+   * - `gs://bucket_name/my_directory`
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.GcsSource gcs_source = 2; + */ + com.google.cloud.aiplatform.v1beta1.GcsSourceOrBuilder getGcsSourceOrBuilder(); + + /** + * + * + *
+   * Google Drive location. Supports importing individual files as
+   * well as Google Drive folders.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.GoogleDriveSource google_drive_source = 3; + * + * @return Whether the googleDriveSource field is set. + */ + boolean hasGoogleDriveSource(); + /** + * + * + *
+   * Google Drive location. Supports importing individual files as
+   * well as Google Drive folders.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.GoogleDriveSource google_drive_source = 3; + * + * @return The googleDriveSource. + */ + com.google.cloud.aiplatform.v1beta1.GoogleDriveSource getGoogleDriveSource(); + /** + * + * + *
+   * Google Drive location. Supports importing individual files as
+   * well as Google Drive folders.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.GoogleDriveSource google_drive_source = 3; + */ + com.google.cloud.aiplatform.v1beta1.GoogleDriveSourceOrBuilder getGoogleDriveSourceOrBuilder(); + + /** + * + * + *
+   * Specifies the size and overlap of chunks after importing RagFiles.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.RagFileChunkingConfig rag_file_chunking_config = 4; + * + * + * @return Whether the ragFileChunkingConfig field is set. + */ + boolean hasRagFileChunkingConfig(); + /** + * + * + *
+   * Specifies the size and overlap of chunks after importing RagFiles.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.RagFileChunkingConfig rag_file_chunking_config = 4; + * + * + * @return The ragFileChunkingConfig. + */ + com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig getRagFileChunkingConfig(); + /** + * + * + *
+   * Specifies the size and overlap of chunks after importing RagFiles.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.RagFileChunkingConfig rag_file_chunking_config = 4; + * + */ + com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfigOrBuilder + getRagFileChunkingConfigOrBuilder(); + + com.google.cloud.aiplatform.v1beta1.ImportRagFilesConfig.ImportSourceCase getImportSourceCase(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ImportRagFilesOperationMetadata.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ImportRagFilesOperationMetadata.java new file mode 100644 index 000000000000..275ead00550e --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ImportRagFilesOperationMetadata.java @@ -0,0 +1,838 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/vertex_rag_data_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Runtime operation information for
+ * [VertexRagDataService.ImportRagFiles][google.cloud.aiplatform.v1beta1.VertexRagDataService.ImportRagFiles].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.ImportRagFilesOperationMetadata} + */ +public final class ImportRagFilesOperationMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.ImportRagFilesOperationMetadata) + ImportRagFilesOperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImportRagFilesOperationMetadata.newBuilder() to construct. + private ImportRagFilesOperationMetadata( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ImportRagFilesOperationMetadata() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ImportRagFilesOperationMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ImportRagFilesOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ImportRagFilesOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.ImportRagFilesOperationMetadata.class, + com.google.cloud.aiplatform.v1beta1.ImportRagFilesOperationMetadata.Builder.class); + } + + private int bitField0_; + public static final int GENERIC_METADATA_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata genericMetadata_; + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + @java.lang.Override + public boolean hasGenericMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata getGenericMetadata() { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder() { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + + public static final int RAG_CORPUS_ID_FIELD_NUMBER = 2; + private long ragCorpusId_ = 0L; + /** + * + * + *
+   * The resource ID of RagCorpus that this operation is executed on.
+   * 
+ * + * int64 rag_corpus_id = 2; + * + * @return The ragCorpusId. + */ + @java.lang.Override + public long getRagCorpusId() { + return ragCorpusId_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getGenericMetadata()); + } + if (ragCorpusId_ != 0L) { + output.writeInt64(2, ragCorpusId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getGenericMetadata()); + } + if (ragCorpusId_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, ragCorpusId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.ImportRagFilesOperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.ImportRagFilesOperationMetadata other = + (com.google.cloud.aiplatform.v1beta1.ImportRagFilesOperationMetadata) obj; + + if (hasGenericMetadata() != other.hasGenericMetadata()) return false; + if (hasGenericMetadata()) { + if (!getGenericMetadata().equals(other.getGenericMetadata())) return false; + } + if (getRagCorpusId() != other.getRagCorpusId()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasGenericMetadata()) { + hash = (37 * hash) + GENERIC_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getGenericMetadata().hashCode(); + } + hash = (37 * hash) + RAG_CORPUS_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getRagCorpusId()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.ImportRagFilesOperationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.ImportRagFilesOperationMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ImportRagFilesOperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.ImportRagFilesOperationMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ImportRagFilesOperationMetadata parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.ImportRagFilesOperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ImportRagFilesOperationMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.ImportRagFilesOperationMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ImportRagFilesOperationMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.ImportRagFilesOperationMetadata + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ImportRagFilesOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.ImportRagFilesOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.ImportRagFilesOperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Runtime operation information for
+   * [VertexRagDataService.ImportRagFiles][google.cloud.aiplatform.v1beta1.VertexRagDataService.ImportRagFiles].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.ImportRagFilesOperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.ImportRagFilesOperationMetadata) + com.google.cloud.aiplatform.v1beta1.ImportRagFilesOperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ImportRagFilesOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ImportRagFilesOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.ImportRagFilesOperationMetadata.class, + com.google.cloud.aiplatform.v1beta1.ImportRagFilesOperationMetadata.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.ImportRagFilesOperationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getGenericMetadataFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + genericMetadata_ = null; + if (genericMetadataBuilder_ != null) { + genericMetadataBuilder_.dispose(); + genericMetadataBuilder_ = null; + } + ragCorpusId_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ImportRagFilesOperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ImportRagFilesOperationMetadata + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.ImportRagFilesOperationMetadata + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ImportRagFilesOperationMetadata build() { + com.google.cloud.aiplatform.v1beta1.ImportRagFilesOperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ImportRagFilesOperationMetadata buildPartial() { + com.google.cloud.aiplatform.v1beta1.ImportRagFilesOperationMetadata result = + new com.google.cloud.aiplatform.v1beta1.ImportRagFilesOperationMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1beta1.ImportRagFilesOperationMetadata result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.genericMetadata_ = + genericMetadataBuilder_ == null ? genericMetadata_ : genericMetadataBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.ragCorpusId_ = ragCorpusId_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1beta1.ImportRagFilesOperationMetadata) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.ImportRagFilesOperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.ImportRagFilesOperationMetadata other) { + if (other + == com.google.cloud.aiplatform.v1beta1.ImportRagFilesOperationMetadata + .getDefaultInstance()) return this; + if (other.hasGenericMetadata()) { + mergeGenericMetadata(other.getGenericMetadata()); + } + if (other.getRagCorpusId() != 0L) { + setRagCorpusId(other.getRagCorpusId()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getGenericMetadataFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + ragCorpusId_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata genericMetadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadataOrBuilder> + genericMetadataBuilder_; + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + public boolean hasGenericMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + public com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata getGenericMetadata() { + if (genericMetadataBuilder_ == null) { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } else { + return genericMetadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder setGenericMetadata( + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata value) { + if (genericMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + genericMetadata_ = value; + } else { + genericMetadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder setGenericMetadata( + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.Builder builderForValue) { + if (genericMetadataBuilder_ == null) { + genericMetadata_ = builderForValue.build(); + } else { + genericMetadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder mergeGenericMetadata( + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata value) { + if (genericMetadataBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && genericMetadata_ != null + && genericMetadata_ + != com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata + .getDefaultInstance()) { + getGenericMetadataBuilder().mergeFrom(value); + } else { + genericMetadata_ = value; + } + } else { + genericMetadataBuilder_.mergeFrom(value); + } + if (genericMetadata_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder clearGenericMetadata() { + bitField0_ = (bitField0_ & ~0x00000001); + genericMetadata_ = null; + if (genericMetadataBuilder_ != null) { + genericMetadataBuilder_.dispose(); + genericMetadataBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + public com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.Builder + getGenericMetadataBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getGenericMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + public com.google.cloud.aiplatform.v1beta1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder() { + if (genericMetadataBuilder_ != null) { + return genericMetadataBuilder_.getMessageOrBuilder(); + } else { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadataOrBuilder> + getGenericMetadataFieldBuilder() { + if (genericMetadataBuilder_ == null) { + genericMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadataOrBuilder>( + getGenericMetadata(), getParentForChildren(), isClean()); + genericMetadata_ = null; + } + return genericMetadataBuilder_; + } + + private long ragCorpusId_; + /** + * + * + *
+     * The resource ID of RagCorpus that this operation is executed on.
+     * 
+ * + * int64 rag_corpus_id = 2; + * + * @return The ragCorpusId. + */ + @java.lang.Override + public long getRagCorpusId() { + return ragCorpusId_; + } + /** + * + * + *
+     * The resource ID of RagCorpus that this operation is executed on.
+     * 
+ * + * int64 rag_corpus_id = 2; + * + * @param value The ragCorpusId to set. + * @return This builder for chaining. + */ + public Builder setRagCorpusId(long value) { + + ragCorpusId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The resource ID of RagCorpus that this operation is executed on.
+     * 
+ * + * int64 rag_corpus_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearRagCorpusId() { + bitField0_ = (bitField0_ & ~0x00000002); + ragCorpusId_ = 0L; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.ImportRagFilesOperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.ImportRagFilesOperationMetadata) + private static final com.google.cloud.aiplatform.v1beta1.ImportRagFilesOperationMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.ImportRagFilesOperationMetadata(); + } + + public static com.google.cloud.aiplatform.v1beta1.ImportRagFilesOperationMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImportRagFilesOperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ImportRagFilesOperationMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ImportRagFilesOperationMetadataOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ImportRagFilesOperationMetadataOrBuilder.java new file mode 100644 index 000000000000..822630a25ed1 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ImportRagFilesOperationMetadataOrBuilder.java @@ -0,0 +1,75 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/vertex_rag_data_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +public interface ImportRagFilesOperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.ImportRagFilesOperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + boolean hasGenericMetadata(); + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata getGenericMetadata(); + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder(); + + /** + * + * + *
+   * The resource ID of RagCorpus that this operation is executed on.
+   * 
+ * + * int64 rag_corpus_id = 2; + * + * @return The ragCorpusId. + */ + long getRagCorpusId(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ImportRagFilesRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ImportRagFilesRequest.java new file mode 100644 index 000000000000..570ef16c8744 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ImportRagFilesRequest.java @@ -0,0 +1,995 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/vertex_rag_data_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Request message for
+ * [VertexRagDataService.ImportRagFiles][google.cloud.aiplatform.v1beta1.VertexRagDataService.ImportRagFiles].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.ImportRagFilesRequest} + */ +public final class ImportRagFilesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.ImportRagFilesRequest) + ImportRagFilesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImportRagFilesRequest.newBuilder() to construct. + private ImportRagFilesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ImportRagFilesRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ImportRagFilesRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ImportRagFilesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ImportRagFilesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.ImportRagFilesRequest.class, + com.google.cloud.aiplatform.v1beta1.ImportRagFilesRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The name of the RagCorpus resource into which to import files.
+   * Format:
+   * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the RagCorpus resource into which to import files.
+   * Format:
+   * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IMPORT_RAG_FILES_CONFIG_FIELD_NUMBER = 2; + private com.google.cloud.aiplatform.v1beta1.ImportRagFilesConfig importRagFilesConfig_; + /** + * + * + *
+   * Required. The config for the RagFiles to be synced and imported into the
+   * RagCorpus.
+   * [VertexRagDataService.ImportRagFiles][google.cloud.aiplatform.v1beta1.VertexRagDataService.ImportRagFiles].
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.ImportRagFilesConfig import_rag_files_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the importRagFilesConfig field is set. + */ + @java.lang.Override + public boolean hasImportRagFilesConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. The config for the RagFiles to be synced and imported into the
+   * RagCorpus.
+   * [VertexRagDataService.ImportRagFiles][google.cloud.aiplatform.v1beta1.VertexRagDataService.ImportRagFiles].
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.ImportRagFilesConfig import_rag_files_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The importRagFilesConfig. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ImportRagFilesConfig getImportRagFilesConfig() { + return importRagFilesConfig_ == null + ? com.google.cloud.aiplatform.v1beta1.ImportRagFilesConfig.getDefaultInstance() + : importRagFilesConfig_; + } + /** + * + * + *
+   * Required. The config for the RagFiles to be synced and imported into the
+   * RagCorpus.
+   * [VertexRagDataService.ImportRagFiles][google.cloud.aiplatform.v1beta1.VertexRagDataService.ImportRagFiles].
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.ImportRagFilesConfig import_rag_files_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ImportRagFilesConfigOrBuilder + getImportRagFilesConfigOrBuilder() { + return importRagFilesConfig_ == null + ? com.google.cloud.aiplatform.v1beta1.ImportRagFilesConfig.getDefaultInstance() + : importRagFilesConfig_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getImportRagFilesConfig()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(2, getImportRagFilesConfig()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.ImportRagFilesRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.ImportRagFilesRequest other = + (com.google.cloud.aiplatform.v1beta1.ImportRagFilesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasImportRagFilesConfig() != other.hasImportRagFilesConfig()) return false; + if (hasImportRagFilesConfig()) { + if (!getImportRagFilesConfig().equals(other.getImportRagFilesConfig())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasImportRagFilesConfig()) { + hash = (37 * hash) + IMPORT_RAG_FILES_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getImportRagFilesConfig().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.ImportRagFilesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.ImportRagFilesRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ImportRagFilesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.ImportRagFilesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ImportRagFilesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.ImportRagFilesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ImportRagFilesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.ImportRagFilesRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ImportRagFilesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.ImportRagFilesRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ImportRagFilesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.ImportRagFilesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.ImportRagFilesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for
+   * [VertexRagDataService.ImportRagFiles][google.cloud.aiplatform.v1beta1.VertexRagDataService.ImportRagFiles].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.ImportRagFilesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.ImportRagFilesRequest) + com.google.cloud.aiplatform.v1beta1.ImportRagFilesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ImportRagFilesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ImportRagFilesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.ImportRagFilesRequest.class, + com.google.cloud.aiplatform.v1beta1.ImportRagFilesRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.ImportRagFilesRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getImportRagFilesConfigFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + importRagFilesConfig_ = null; + if (importRagFilesConfigBuilder_ != null) { + importRagFilesConfigBuilder_.dispose(); + importRagFilesConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ImportRagFilesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ImportRagFilesRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.ImportRagFilesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ImportRagFilesRequest build() { + com.google.cloud.aiplatform.v1beta1.ImportRagFilesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ImportRagFilesRequest buildPartial() { + com.google.cloud.aiplatform.v1beta1.ImportRagFilesRequest result = + new com.google.cloud.aiplatform.v1beta1.ImportRagFilesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1beta1.ImportRagFilesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.importRagFilesConfig_ = + importRagFilesConfigBuilder_ == null + ? importRagFilesConfig_ + : importRagFilesConfigBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1beta1.ImportRagFilesRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.ImportRagFilesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.ImportRagFilesRequest other) { + if (other == com.google.cloud.aiplatform.v1beta1.ImportRagFilesRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasImportRagFilesConfig()) { + mergeImportRagFilesConfig(other.getImportRagFilesConfig()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + getImportRagFilesConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The name of the RagCorpus resource into which to import files.
+     * Format:
+     * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the RagCorpus resource into which to import files.
+     * Format:
+     * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the RagCorpus resource into which to import files.
+     * Format:
+     * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the RagCorpus resource into which to import files.
+     * Format:
+     * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the RagCorpus resource into which to import files.
+     * Format:
+     * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.cloud.aiplatform.v1beta1.ImportRagFilesConfig importRagFilesConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.ImportRagFilesConfig, + com.google.cloud.aiplatform.v1beta1.ImportRagFilesConfig.Builder, + com.google.cloud.aiplatform.v1beta1.ImportRagFilesConfigOrBuilder> + importRagFilesConfigBuilder_; + /** + * + * + *
+     * Required. The config for the RagFiles to be synced and imported into the
+     * RagCorpus.
+     * [VertexRagDataService.ImportRagFiles][google.cloud.aiplatform.v1beta1.VertexRagDataService.ImportRagFiles].
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.ImportRagFilesConfig import_rag_files_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the importRagFilesConfig field is set. + */ + public boolean hasImportRagFilesConfig() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. The config for the RagFiles to be synced and imported into the
+     * RagCorpus.
+     * [VertexRagDataService.ImportRagFiles][google.cloud.aiplatform.v1beta1.VertexRagDataService.ImportRagFiles].
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.ImportRagFilesConfig import_rag_files_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The importRagFilesConfig. + */ + public com.google.cloud.aiplatform.v1beta1.ImportRagFilesConfig getImportRagFilesConfig() { + if (importRagFilesConfigBuilder_ == null) { + return importRagFilesConfig_ == null + ? com.google.cloud.aiplatform.v1beta1.ImportRagFilesConfig.getDefaultInstance() + : importRagFilesConfig_; + } else { + return importRagFilesConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The config for the RagFiles to be synced and imported into the
+     * RagCorpus.
+     * [VertexRagDataService.ImportRagFiles][google.cloud.aiplatform.v1beta1.VertexRagDataService.ImportRagFiles].
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.ImportRagFilesConfig import_rag_files_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setImportRagFilesConfig( + com.google.cloud.aiplatform.v1beta1.ImportRagFilesConfig value) { + if (importRagFilesConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + importRagFilesConfig_ = value; + } else { + importRagFilesConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The config for the RagFiles to be synced and imported into the
+     * RagCorpus.
+     * [VertexRagDataService.ImportRagFiles][google.cloud.aiplatform.v1beta1.VertexRagDataService.ImportRagFiles].
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.ImportRagFilesConfig import_rag_files_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setImportRagFilesConfig( + com.google.cloud.aiplatform.v1beta1.ImportRagFilesConfig.Builder builderForValue) { + if (importRagFilesConfigBuilder_ == null) { + importRagFilesConfig_ = builderForValue.build(); + } else { + importRagFilesConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The config for the RagFiles to be synced and imported into the
+     * RagCorpus.
+     * [VertexRagDataService.ImportRagFiles][google.cloud.aiplatform.v1beta1.VertexRagDataService.ImportRagFiles].
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.ImportRagFilesConfig import_rag_files_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeImportRagFilesConfig( + com.google.cloud.aiplatform.v1beta1.ImportRagFilesConfig value) { + if (importRagFilesConfigBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && importRagFilesConfig_ != null + && importRagFilesConfig_ + != com.google.cloud.aiplatform.v1beta1.ImportRagFilesConfig.getDefaultInstance()) { + getImportRagFilesConfigBuilder().mergeFrom(value); + } else { + importRagFilesConfig_ = value; + } + } else { + importRagFilesConfigBuilder_.mergeFrom(value); + } + if (importRagFilesConfig_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. The config for the RagFiles to be synced and imported into the
+     * RagCorpus.
+     * [VertexRagDataService.ImportRagFiles][google.cloud.aiplatform.v1beta1.VertexRagDataService.ImportRagFiles].
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.ImportRagFilesConfig import_rag_files_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearImportRagFilesConfig() { + bitField0_ = (bitField0_ & ~0x00000002); + importRagFilesConfig_ = null; + if (importRagFilesConfigBuilder_ != null) { + importRagFilesConfigBuilder_.dispose(); + importRagFilesConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The config for the RagFiles to be synced and imported into the
+     * RagCorpus.
+     * [VertexRagDataService.ImportRagFiles][google.cloud.aiplatform.v1beta1.VertexRagDataService.ImportRagFiles].
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.ImportRagFilesConfig import_rag_files_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1beta1.ImportRagFilesConfig.Builder + getImportRagFilesConfigBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getImportRagFilesConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The config for the RagFiles to be synced and imported into the
+     * RagCorpus.
+     * [VertexRagDataService.ImportRagFiles][google.cloud.aiplatform.v1beta1.VertexRagDataService.ImportRagFiles].
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.ImportRagFilesConfig import_rag_files_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1beta1.ImportRagFilesConfigOrBuilder + getImportRagFilesConfigOrBuilder() { + if (importRagFilesConfigBuilder_ != null) { + return importRagFilesConfigBuilder_.getMessageOrBuilder(); + } else { + return importRagFilesConfig_ == null + ? com.google.cloud.aiplatform.v1beta1.ImportRagFilesConfig.getDefaultInstance() + : importRagFilesConfig_; + } + } + /** + * + * + *
+     * Required. The config for the RagFiles to be synced and imported into the
+     * RagCorpus.
+     * [VertexRagDataService.ImportRagFiles][google.cloud.aiplatform.v1beta1.VertexRagDataService.ImportRagFiles].
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.ImportRagFilesConfig import_rag_files_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.ImportRagFilesConfig, + com.google.cloud.aiplatform.v1beta1.ImportRagFilesConfig.Builder, + com.google.cloud.aiplatform.v1beta1.ImportRagFilesConfigOrBuilder> + getImportRagFilesConfigFieldBuilder() { + if (importRagFilesConfigBuilder_ == null) { + importRagFilesConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.ImportRagFilesConfig, + com.google.cloud.aiplatform.v1beta1.ImportRagFilesConfig.Builder, + com.google.cloud.aiplatform.v1beta1.ImportRagFilesConfigOrBuilder>( + getImportRagFilesConfig(), getParentForChildren(), isClean()); + importRagFilesConfig_ = null; + } + return importRagFilesConfigBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.ImportRagFilesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.ImportRagFilesRequest) + private static final com.google.cloud.aiplatform.v1beta1.ImportRagFilesRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.ImportRagFilesRequest(); + } + + public static com.google.cloud.aiplatform.v1beta1.ImportRagFilesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImportRagFilesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ImportRagFilesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ImportRagFilesRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ImportRagFilesRequestOrBuilder.java new file mode 100644 index 000000000000..86d75559b4a4 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ImportRagFilesRequestOrBuilder.java @@ -0,0 +1,107 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/vertex_rag_data_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +public interface ImportRagFilesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.ImportRagFilesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the RagCorpus resource into which to import files.
+   * Format:
+   * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The name of the RagCorpus resource into which to import files.
+   * Format:
+   * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The config for the RagFiles to be synced and imported into the
+   * RagCorpus.
+   * [VertexRagDataService.ImportRagFiles][google.cloud.aiplatform.v1beta1.VertexRagDataService.ImportRagFiles].
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.ImportRagFilesConfig import_rag_files_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the importRagFilesConfig field is set. + */ + boolean hasImportRagFilesConfig(); + /** + * + * + *
+   * Required. The config for the RagFiles to be synced and imported into the
+   * RagCorpus.
+   * [VertexRagDataService.ImportRagFiles][google.cloud.aiplatform.v1beta1.VertexRagDataService.ImportRagFiles].
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.ImportRagFilesConfig import_rag_files_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The importRagFilesConfig. + */ + com.google.cloud.aiplatform.v1beta1.ImportRagFilesConfig getImportRagFilesConfig(); + /** + * + * + *
+   * Required. The config for the RagFiles to be synced and imported into the
+   * RagCorpus.
+   * [VertexRagDataService.ImportRagFiles][google.cloud.aiplatform.v1beta1.VertexRagDataService.ImportRagFiles].
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.ImportRagFilesConfig import_rag_files_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1beta1.ImportRagFilesConfigOrBuilder + getImportRagFilesConfigOrBuilder(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ResponseRecallSpec.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ImportRagFilesResponse.java similarity index 61% rename from java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ResponseRecallSpec.java rename to java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ImportRagFilesResponse.java index 87f988327bd5..b6fc99d5e18e 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ResponseRecallSpec.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ImportRagFilesResponse.java @@ -14,7 +14,7 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/aiplatform/v1beta1/evaluation_service.proto +// source: google/cloud/aiplatform/v1beta1/vertex_rag_data_service.proto // Protobuf Java Version: 3.25.2 package com.google.cloud.aiplatform.v1beta1; @@ -23,60 +23,61 @@ * * *
- * Spec for response recall metric.
+ * Response message for
+ * [VertexRagDataService.ImportRagFiles][google.cloud.aiplatform.v1beta1.VertexRagDataService.ImportRagFiles].
  * 
* - * Protobuf type {@code google.cloud.aiplatform.v1beta1.ResponseRecallSpec} + * Protobuf type {@code google.cloud.aiplatform.v1beta1.ImportRagFilesResponse} */ -public final class ResponseRecallSpec extends com.google.protobuf.GeneratedMessageV3 +public final class ImportRagFilesResponse extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.ResponseRecallSpec) - ResponseRecallSpecOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.ImportRagFilesResponse) + ImportRagFilesResponseOrBuilder { private static final long serialVersionUID = 0L; - // Use ResponseRecallSpec.newBuilder() to construct. - private ResponseRecallSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use ImportRagFilesResponse.newBuilder() to construct. + private ImportRagFilesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private ResponseRecallSpec() {} + private ImportRagFilesResponse() {} @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ResponseRecallSpec(); + return new ImportRagFilesResponse(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.aiplatform.v1beta1.EvaluationServiceProto - .internal_static_google_cloud_aiplatform_v1beta1_ResponseRecallSpec_descriptor; + return com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ImportRagFilesResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.aiplatform.v1beta1.EvaluationServiceProto - .internal_static_google_cloud_aiplatform_v1beta1_ResponseRecallSpec_fieldAccessorTable + return com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ImportRagFilesResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.aiplatform.v1beta1.ResponseRecallSpec.class, - com.google.cloud.aiplatform.v1beta1.ResponseRecallSpec.Builder.class); + com.google.cloud.aiplatform.v1beta1.ImportRagFilesResponse.class, + com.google.cloud.aiplatform.v1beta1.ImportRagFilesResponse.Builder.class); } - public static final int VERSION_FIELD_NUMBER = 1; - private int version_ = 0; + public static final int IMPORTED_RAG_FILES_COUNT_FIELD_NUMBER = 1; + private long importedRagFilesCount_ = 0L; /** * * *
-   * Optional. Which version to use for evaluation.
+   * The number of RagFiles that had been imported into the RagCorpus.
    * 
* - * int32 version = 1 [(.google.api.field_behavior) = OPTIONAL]; + * int64 imported_rag_files_count = 1; * - * @return The version. + * @return The importedRagFilesCount. */ @java.lang.Override - public int getVersion() { - return version_; + public long getImportedRagFilesCount() { + return importedRagFilesCount_; } private byte memoizedIsInitialized = -1; @@ -93,8 +94,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (version_ != 0) { - output.writeInt32(1, version_); + if (importedRagFilesCount_ != 0L) { + output.writeInt64(1, importedRagFilesCount_); } getUnknownFields().writeTo(output); } @@ -105,8 +106,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (version_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, version_); + if (importedRagFilesCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, importedRagFilesCount_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -118,13 +119,13 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.ResponseRecallSpec)) { + if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.ImportRagFilesResponse)) { return super.equals(obj); } - com.google.cloud.aiplatform.v1beta1.ResponseRecallSpec other = - (com.google.cloud.aiplatform.v1beta1.ResponseRecallSpec) obj; + com.google.cloud.aiplatform.v1beta1.ImportRagFilesResponse other = + (com.google.cloud.aiplatform.v1beta1.ImportRagFilesResponse) obj; - if (getVersion() != other.getVersion()) return false; + if (getImportedRagFilesCount() != other.getImportedRagFilesCount()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -136,78 +137,78 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + VERSION_FIELD_NUMBER; - hash = (53 * hash) + getVersion(); + hash = (37 * hash) + IMPORTED_RAG_FILES_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getImportedRagFilesCount()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.cloud.aiplatform.v1beta1.ResponseRecallSpec parseFrom( + public static com.google.cloud.aiplatform.v1beta1.ImportRagFilesResponse parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.aiplatform.v1beta1.ResponseRecallSpec parseFrom( + public static com.google.cloud.aiplatform.v1beta1.ImportRagFilesResponse parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.aiplatform.v1beta1.ResponseRecallSpec parseFrom( + public static com.google.cloud.aiplatform.v1beta1.ImportRagFilesResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.aiplatform.v1beta1.ResponseRecallSpec parseFrom( + public static com.google.cloud.aiplatform.v1beta1.ImportRagFilesResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.aiplatform.v1beta1.ResponseRecallSpec parseFrom(byte[] data) + public static com.google.cloud.aiplatform.v1beta1.ImportRagFilesResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.aiplatform.v1beta1.ResponseRecallSpec parseFrom( + public static com.google.cloud.aiplatform.v1beta1.ImportRagFilesResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.aiplatform.v1beta1.ResponseRecallSpec parseFrom( + public static com.google.cloud.aiplatform.v1beta1.ImportRagFilesResponse parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.aiplatform.v1beta1.ResponseRecallSpec parseFrom( + public static com.google.cloud.aiplatform.v1beta1.ImportRagFilesResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.aiplatform.v1beta1.ResponseRecallSpec parseDelimitedFrom( + public static com.google.cloud.aiplatform.v1beta1.ImportRagFilesResponse parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.aiplatform.v1beta1.ResponseRecallSpec parseDelimitedFrom( + public static com.google.cloud.aiplatform.v1beta1.ImportRagFilesResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.aiplatform.v1beta1.ResponseRecallSpec parseFrom( + public static com.google.cloud.aiplatform.v1beta1.ImportRagFilesResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.aiplatform.v1beta1.ResponseRecallSpec parseFrom( + public static com.google.cloud.aiplatform.v1beta1.ImportRagFilesResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -225,7 +226,7 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.cloud.aiplatform.v1beta1.ResponseRecallSpec prototype) { + com.google.cloud.aiplatform.v1beta1.ImportRagFilesResponse prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -243,31 +244,32 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Spec for response recall metric.
+   * Response message for
+   * [VertexRagDataService.ImportRagFiles][google.cloud.aiplatform.v1beta1.VertexRagDataService.ImportRagFiles].
    * 
* - * Protobuf type {@code google.cloud.aiplatform.v1beta1.ResponseRecallSpec} + * Protobuf type {@code google.cloud.aiplatform.v1beta1.ImportRagFilesResponse} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.ResponseRecallSpec) - com.google.cloud.aiplatform.v1beta1.ResponseRecallSpecOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.ImportRagFilesResponse) + com.google.cloud.aiplatform.v1beta1.ImportRagFilesResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.aiplatform.v1beta1.EvaluationServiceProto - .internal_static_google_cloud_aiplatform_v1beta1_ResponseRecallSpec_descriptor; + return com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ImportRagFilesResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.aiplatform.v1beta1.EvaluationServiceProto - .internal_static_google_cloud_aiplatform_v1beta1_ResponseRecallSpec_fieldAccessorTable + return com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ImportRagFilesResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.aiplatform.v1beta1.ResponseRecallSpec.class, - com.google.cloud.aiplatform.v1beta1.ResponseRecallSpec.Builder.class); + com.google.cloud.aiplatform.v1beta1.ImportRagFilesResponse.class, + com.google.cloud.aiplatform.v1beta1.ImportRagFilesResponse.Builder.class); } - // Construct using com.google.cloud.aiplatform.v1beta1.ResponseRecallSpec.newBuilder() + // Construct using com.google.cloud.aiplatform.v1beta1.ImportRagFilesResponse.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { @@ -278,24 +280,24 @@ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { public Builder clear() { super.clear(); bitField0_ = 0; - version_ = 0; + importedRagFilesCount_ = 0L; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.aiplatform.v1beta1.EvaluationServiceProto - .internal_static_google_cloud_aiplatform_v1beta1_ResponseRecallSpec_descriptor; + return com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ImportRagFilesResponse_descriptor; } @java.lang.Override - public com.google.cloud.aiplatform.v1beta1.ResponseRecallSpec getDefaultInstanceForType() { - return com.google.cloud.aiplatform.v1beta1.ResponseRecallSpec.getDefaultInstance(); + public com.google.cloud.aiplatform.v1beta1.ImportRagFilesResponse getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.ImportRagFilesResponse.getDefaultInstance(); } @java.lang.Override - public com.google.cloud.aiplatform.v1beta1.ResponseRecallSpec build() { - com.google.cloud.aiplatform.v1beta1.ResponseRecallSpec result = buildPartial(); + public com.google.cloud.aiplatform.v1beta1.ImportRagFilesResponse build() { + com.google.cloud.aiplatform.v1beta1.ImportRagFilesResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -303,9 +305,9 @@ public com.google.cloud.aiplatform.v1beta1.ResponseRecallSpec build() { } @java.lang.Override - public com.google.cloud.aiplatform.v1beta1.ResponseRecallSpec buildPartial() { - com.google.cloud.aiplatform.v1beta1.ResponseRecallSpec result = - new com.google.cloud.aiplatform.v1beta1.ResponseRecallSpec(this); + public com.google.cloud.aiplatform.v1beta1.ImportRagFilesResponse buildPartial() { + com.google.cloud.aiplatform.v1beta1.ImportRagFilesResponse result = + new com.google.cloud.aiplatform.v1beta1.ImportRagFilesResponse(this); if (bitField0_ != 0) { buildPartial0(result); } @@ -313,10 +315,10 @@ public com.google.cloud.aiplatform.v1beta1.ResponseRecallSpec buildPartial() { return result; } - private void buildPartial0(com.google.cloud.aiplatform.v1beta1.ResponseRecallSpec result) { + private void buildPartial0(com.google.cloud.aiplatform.v1beta1.ImportRagFilesResponse result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { - result.version_ = version_; + result.importedRagFilesCount_ = importedRagFilesCount_; } } @@ -355,19 +357,19 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.aiplatform.v1beta1.ResponseRecallSpec) { - return mergeFrom((com.google.cloud.aiplatform.v1beta1.ResponseRecallSpec) other); + if (other instanceof com.google.cloud.aiplatform.v1beta1.ImportRagFilesResponse) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.ImportRagFilesResponse) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.ResponseRecallSpec other) { - if (other == com.google.cloud.aiplatform.v1beta1.ResponseRecallSpec.getDefaultInstance()) + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.ImportRagFilesResponse other) { + if (other == com.google.cloud.aiplatform.v1beta1.ImportRagFilesResponse.getDefaultInstance()) return this; - if (other.getVersion() != 0) { - setVersion(other.getVersion()); + if (other.getImportedRagFilesCount() != 0L) { + setImportedRagFilesCount(other.getImportedRagFilesCount()); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); @@ -397,7 +399,7 @@ public Builder mergeFrom( break; case 8: { - version_ = input.readInt32(); + importedRagFilesCount_ = input.readInt64(); bitField0_ |= 0x00000001; break; } // case 8 @@ -420,37 +422,37 @@ public Builder mergeFrom( private int bitField0_; - private int version_; + private long importedRagFilesCount_; /** * * *
-     * Optional. Which version to use for evaluation.
+     * The number of RagFiles that had been imported into the RagCorpus.
      * 
* - * int32 version = 1 [(.google.api.field_behavior) = OPTIONAL]; + * int64 imported_rag_files_count = 1; * - * @return The version. + * @return The importedRagFilesCount. */ @java.lang.Override - public int getVersion() { - return version_; + public long getImportedRagFilesCount() { + return importedRagFilesCount_; } /** * * *
-     * Optional. Which version to use for evaluation.
+     * The number of RagFiles that had been imported into the RagCorpus.
      * 
* - * int32 version = 1 [(.google.api.field_behavior) = OPTIONAL]; + * int64 imported_rag_files_count = 1; * - * @param value The version to set. + * @param value The importedRagFilesCount to set. * @return This builder for chaining. */ - public Builder setVersion(int value) { + public Builder setImportedRagFilesCount(long value) { - version_ = value; + importedRagFilesCount_ = value; bitField0_ |= 0x00000001; onChanged(); return this; @@ -459,16 +461,16 @@ public Builder setVersion(int value) { * * *
-     * Optional. Which version to use for evaluation.
+     * The number of RagFiles that had been imported into the RagCorpus.
      * 
* - * int32 version = 1 [(.google.api.field_behavior) = OPTIONAL]; + * int64 imported_rag_files_count = 1; * * @return This builder for chaining. */ - public Builder clearVersion() { + public Builder clearImportedRagFilesCount() { bitField0_ = (bitField0_ & ~0x00000001); - version_ = 0; + importedRagFilesCount_ = 0L; onChanged(); return this; } @@ -484,24 +486,24 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.ResponseRecallSpec) + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.ImportRagFilesResponse) } - // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.ResponseRecallSpec) - private static final com.google.cloud.aiplatform.v1beta1.ResponseRecallSpec DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.ImportRagFilesResponse) + private static final com.google.cloud.aiplatform.v1beta1.ImportRagFilesResponse DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.ResponseRecallSpec(); + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.ImportRagFilesResponse(); } - public static com.google.cloud.aiplatform.v1beta1.ResponseRecallSpec getDefaultInstance() { + public static com.google.cloud.aiplatform.v1beta1.ImportRagFilesResponse getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public ResponseRecallSpec parsePartialFrom( + public ImportRagFilesResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -520,17 +522,17 @@ public ResponseRecallSpec parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.cloud.aiplatform.v1beta1.ResponseRecallSpec getDefaultInstanceForType() { + public com.google.cloud.aiplatform.v1beta1.ImportRagFilesResponse getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RagContextRecallSpecOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ImportRagFilesResponseOrBuilder.java similarity index 71% rename from java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RagContextRecallSpecOrBuilder.java rename to java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ImportRagFilesResponseOrBuilder.java index c1507d99beab..fdc3a214dd9c 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RagContextRecallSpecOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ImportRagFilesResponseOrBuilder.java @@ -14,26 +14,26 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/aiplatform/v1beta1/evaluation_service.proto +// source: google/cloud/aiplatform/v1beta1/vertex_rag_data_service.proto // Protobuf Java Version: 3.25.2 package com.google.cloud.aiplatform.v1beta1; -public interface RagContextRecallSpecOrBuilder +public interface ImportRagFilesResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.RagContextRecallSpec) + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.ImportRagFilesResponse) com.google.protobuf.MessageOrBuilder { /** * * *
-   * Optional. Which version to use for evaluation.
+   * The number of RagFiles that had been imported into the RagCorpus.
    * 
* - * int32 version = 2 [(.google.api.field_behavior) = OPTIONAL]; + * int64 imported_rag_files_count = 1; * - * @return The version. + * @return The importedRagFilesCount. */ - int getVersion(); + long getImportedRagFilesCount(); } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/IoProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/IoProto.java index 5025a580fc11..604330ca26cc 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/IoProto.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/IoProto.java @@ -64,6 +64,18 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_aiplatform_v1beta1_ContainerRegistryDestination_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_aiplatform_v1beta1_ContainerRegistryDestination_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_GoogleDriveSource_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_GoogleDriveSource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_GoogleDriveSource_ResourceId_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_GoogleDriveSource_ResourceId_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_DirectUploadSource_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_DirectUploadSource_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -90,13 +102,22 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ation\022M\n\017gcs_destination\030\001 \001(\0132/.google." + "cloud.aiplatform.v1beta1.GcsDestinationB" + "\003\340A\002\"7\n\034ContainerRegistryDestination\022\027\n\n" - + "output_uri\030\001 \001(\tB\003\340A\002B\336\001\n#com.google.clo" - + "ud.aiplatform.v1beta1B\007IoProtoP\001ZCcloud." - + "google.com/go/aiplatform/apiv1beta1/aipl" - + "atformpb;aiplatformpb\252\002\037Google.Cloud.AIP" - + "latform.V1Beta1\312\002\037Google\\Cloud\\AIPlatfor" - + "m\\V1beta1\352\002\"Google::Cloud::AIPlatform::V" - + "1beta1b\006proto3" + + "output_uri\030\001 \001(\tB\003\340A\002\"\337\002\n\021GoogleDriveSou" + + "rce\022X\n\014resource_ids\030\001 \003(\0132=.google.cloud" + + ".aiplatform.v1beta1.GoogleDriveSource.Re" + + "sourceIdB\003\340A\002\032\357\001\n\nResourceId\022f\n\rresource" + + "_type\030\001 \001(\0162J.google.cloud.aiplatform.v1" + + "beta1.GoogleDriveSource.ResourceId.Resou" + + "rceTypeB\003\340A\002\022\030\n\013resource_id\030\002 \001(\tB\003\340A\002\"_" + + "\n\014ResourceType\022\035\n\031RESOURCE_TYPE_UNSPECIF" + + "IED\020\000\022\026\n\022RESOURCE_TYPE_FILE\020\001\022\030\n\024RESOURC" + + "E_TYPE_FOLDER\020\002\"\024\n\022DirectUploadSourceB\336\001" + + "\n#com.google.cloud.aiplatform.v1beta1B\007I" + + "oProtoP\001ZCcloud.google.com/go/aiplatform" + + "/apiv1beta1/aiplatformpb;aiplatformpb\252\002\037" + + "Google.Cloud.AIPlatform.V1Beta1\312\002\037Google" + + "\\Cloud\\AIPlatform\\V1beta1\352\002\"Google::Clou" + + "d::AIPlatform::V1beta1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -176,6 +197,30 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "OutputUri", }); + internal_static_google_cloud_aiplatform_v1beta1_GoogleDriveSource_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_aiplatform_v1beta1_GoogleDriveSource_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_GoogleDriveSource_descriptor, + new java.lang.String[] { + "ResourceIds", + }); + internal_static_google_cloud_aiplatform_v1beta1_GoogleDriveSource_ResourceId_descriptor = + internal_static_google_cloud_aiplatform_v1beta1_GoogleDriveSource_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_aiplatform_v1beta1_GoogleDriveSource_ResourceId_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_GoogleDriveSource_ResourceId_descriptor, + new java.lang.String[] { + "ResourceType", "ResourceId", + }); + internal_static_google_cloud_aiplatform_v1beta1_DirectUploadSource_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_aiplatform_v1beta1_DirectUploadSource_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_DirectUploadSource_descriptor, + new java.lang.String[] {}); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListEndpointsRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListEndpointsRequest.java index 4a3a193aede2..bb006ca0cb98 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListEndpointsRequest.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListEndpointsRequest.java @@ -135,15 +135,15 @@ public com.google.protobuf.ByteString getParentBytes() { * Optional. An expression for filtering the results of the request. For field * names both snake_case and camelCase are supported. * - * * `endpoint` supports = and !=. `endpoint` represents the Endpoint ID, - * i.e. the last segment of the Endpoint's [resource - * name][google.cloud.aiplatform.v1beta1.Endpoint.name]. - * * `display_name` supports = and, != + * * `endpoint` supports `=` and `!=`. `endpoint` represents the Endpoint + * ID, i.e. the last segment of the Endpoint's + * [resource name][google.cloud.aiplatform.v1beta1.Endpoint.name]. + * * `display_name` supports `=` and `!=`. * * `labels` supports general map functions that is: * * `labels.key=value` - key:value equality - * * `labels.key:* or labels:key - key existence + * * `labels.key:*` or `labels:key` - key existence * * A key including a space must be quoted. `labels."a key"`. - * * `base_model_name` only supports = + * * `base_model_name` only supports `=`. * * Some examples: * @@ -176,15 +176,15 @@ public java.lang.String getFilter() { * Optional. An expression for filtering the results of the request. For field * names both snake_case and camelCase are supported. * - * * `endpoint` supports = and !=. `endpoint` represents the Endpoint ID, - * i.e. the last segment of the Endpoint's [resource - * name][google.cloud.aiplatform.v1beta1.Endpoint.name]. - * * `display_name` supports = and, != + * * `endpoint` supports `=` and `!=`. `endpoint` represents the Endpoint + * ID, i.e. the last segment of the Endpoint's + * [resource name][google.cloud.aiplatform.v1beta1.Endpoint.name]. + * * `display_name` supports `=` and `!=`. * * `labels` supports general map functions that is: * * `labels.key=value` - key:value equality - * * `labels.key:* or labels:key - key existence + * * `labels.key:*` or `labels:key` - key existence * * A key including a space must be quoted. `labels."a key"`. - * * `base_model_name` only supports = + * * `base_model_name` only supports `=`. * * Some examples: * @@ -925,15 +925,15 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * Optional. An expression for filtering the results of the request. For field * names both snake_case and camelCase are supported. * - * * `endpoint` supports = and !=. `endpoint` represents the Endpoint ID, - * i.e. the last segment of the Endpoint's [resource - * name][google.cloud.aiplatform.v1beta1.Endpoint.name]. - * * `display_name` supports = and, != + * * `endpoint` supports `=` and `!=`. `endpoint` represents the Endpoint + * ID, i.e. the last segment of the Endpoint's + * [resource name][google.cloud.aiplatform.v1beta1.Endpoint.name]. + * * `display_name` supports `=` and `!=`. * * `labels` supports general map functions that is: * * `labels.key=value` - key:value equality - * * `labels.key:* or labels:key - key existence + * * `labels.key:*` or `labels:key` - key existence * * A key including a space must be quoted. `labels."a key"`. - * * `base_model_name` only supports = + * * `base_model_name` only supports `=`. * * Some examples: * @@ -965,15 +965,15 @@ public java.lang.String getFilter() { * Optional. An expression for filtering the results of the request. For field * names both snake_case and camelCase are supported. * - * * `endpoint` supports = and !=. `endpoint` represents the Endpoint ID, - * i.e. the last segment of the Endpoint's [resource - * name][google.cloud.aiplatform.v1beta1.Endpoint.name]. - * * `display_name` supports = and, != + * * `endpoint` supports `=` and `!=`. `endpoint` represents the Endpoint + * ID, i.e. the last segment of the Endpoint's + * [resource name][google.cloud.aiplatform.v1beta1.Endpoint.name]. + * * `display_name` supports `=` and `!=`. * * `labels` supports general map functions that is: * * `labels.key=value` - key:value equality - * * `labels.key:* or labels:key - key existence + * * `labels.key:*` or `labels:key` - key existence * * A key including a space must be quoted. `labels."a key"`. - * * `base_model_name` only supports = + * * `base_model_name` only supports `=`. * * Some examples: * @@ -1005,15 +1005,15 @@ public com.google.protobuf.ByteString getFilterBytes() { * Optional. An expression for filtering the results of the request. For field * names both snake_case and camelCase are supported. * - * * `endpoint` supports = and !=. `endpoint` represents the Endpoint ID, - * i.e. the last segment of the Endpoint's [resource - * name][google.cloud.aiplatform.v1beta1.Endpoint.name]. - * * `display_name` supports = and, != + * * `endpoint` supports `=` and `!=`. `endpoint` represents the Endpoint + * ID, i.e. the last segment of the Endpoint's + * [resource name][google.cloud.aiplatform.v1beta1.Endpoint.name]. + * * `display_name` supports `=` and `!=`. * * `labels` supports general map functions that is: * * `labels.key=value` - key:value equality - * * `labels.key:* or labels:key - key existence + * * `labels.key:*` or `labels:key` - key existence * * A key including a space must be quoted. `labels."a key"`. - * * `base_model_name` only supports = + * * `base_model_name` only supports `=`. * * Some examples: * @@ -1044,15 +1044,15 @@ public Builder setFilter(java.lang.String value) { * Optional. An expression for filtering the results of the request. For field * names both snake_case and camelCase are supported. * - * * `endpoint` supports = and !=. `endpoint` represents the Endpoint ID, - * i.e. the last segment of the Endpoint's [resource - * name][google.cloud.aiplatform.v1beta1.Endpoint.name]. - * * `display_name` supports = and, != + * * `endpoint` supports `=` and `!=`. `endpoint` represents the Endpoint + * ID, i.e. the last segment of the Endpoint's + * [resource name][google.cloud.aiplatform.v1beta1.Endpoint.name]. + * * `display_name` supports `=` and `!=`. * * `labels` supports general map functions that is: * * `labels.key=value` - key:value equality - * * `labels.key:* or labels:key - key existence + * * `labels.key:*` or `labels:key` - key existence * * A key including a space must be quoted. `labels."a key"`. - * * `base_model_name` only supports = + * * `base_model_name` only supports `=`. * * Some examples: * @@ -1079,15 +1079,15 @@ public Builder clearFilter() { * Optional. An expression for filtering the results of the request. For field * names both snake_case and camelCase are supported. * - * * `endpoint` supports = and !=. `endpoint` represents the Endpoint ID, - * i.e. the last segment of the Endpoint's [resource - * name][google.cloud.aiplatform.v1beta1.Endpoint.name]. - * * `display_name` supports = and, != + * * `endpoint` supports `=` and `!=`. `endpoint` represents the Endpoint + * ID, i.e. the last segment of the Endpoint's + * [resource name][google.cloud.aiplatform.v1beta1.Endpoint.name]. + * * `display_name` supports `=` and `!=`. * * `labels` supports general map functions that is: * * `labels.key=value` - key:value equality - * * `labels.key:* or labels:key - key existence + * * `labels.key:*` or `labels:key` - key existence * * A key including a space must be quoted. `labels."a key"`. - * * `base_model_name` only supports = + * * `base_model_name` only supports `=`. * * Some examples: * diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListEndpointsRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListEndpointsRequestOrBuilder.java index ab11a4cdbfac..6f5f381bfa81 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListEndpointsRequestOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListEndpointsRequestOrBuilder.java @@ -62,15 +62,15 @@ public interface ListEndpointsRequestOrBuilder * Optional. An expression for filtering the results of the request. For field * names both snake_case and camelCase are supported. * - * * `endpoint` supports = and !=. `endpoint` represents the Endpoint ID, - * i.e. the last segment of the Endpoint's [resource - * name][google.cloud.aiplatform.v1beta1.Endpoint.name]. - * * `display_name` supports = and, != + * * `endpoint` supports `=` and `!=`. `endpoint` represents the Endpoint + * ID, i.e. the last segment of the Endpoint's + * [resource name][google.cloud.aiplatform.v1beta1.Endpoint.name]. + * * `display_name` supports `=` and `!=`. * * `labels` supports general map functions that is: * * `labels.key=value` - key:value equality - * * `labels.key:* or labels:key - key existence + * * `labels.key:*` or `labels:key` - key existence * * A key including a space must be quoted. `labels."a key"`. - * * `base_model_name` only supports = + * * `base_model_name` only supports `=`. * * Some examples: * @@ -92,15 +92,15 @@ public interface ListEndpointsRequestOrBuilder * Optional. An expression for filtering the results of the request. For field * names both snake_case and camelCase are supported. * - * * `endpoint` supports = and !=. `endpoint` represents the Endpoint ID, - * i.e. the last segment of the Endpoint's [resource - * name][google.cloud.aiplatform.v1beta1.Endpoint.name]. - * * `display_name` supports = and, != + * * `endpoint` supports `=` and `!=`. `endpoint` represents the Endpoint + * ID, i.e. the last segment of the Endpoint's + * [resource name][google.cloud.aiplatform.v1beta1.Endpoint.name]. + * * `display_name` supports `=` and `!=`. * * `labels` supports general map functions that is: * * `labels.key=value` - key:value equality - * * `labels.key:* or labels:key - key existence + * * `labels.key:*` or `labels:key` - key existence * * A key including a space must be quoted. `labels."a key"`. - * * `base_model_name` only supports = + * * `base_model_name` only supports `=`. * * Some examples: * diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListNotebookRuntimeTemplatesRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListNotebookRuntimeTemplatesRequest.java new file mode 100644 index 000000000000..6adede273f51 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListNotebookRuntimeTemplatesRequest.java @@ -0,0 +1,1819 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/notebook_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Request message for
+ * [NotebookService.ListNotebookRuntimeTemplates][google.cloud.aiplatform.v1beta1.NotebookService.ListNotebookRuntimeTemplates].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesRequest} + */ +public final class ListNotebookRuntimeTemplatesRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesRequest) + ListNotebookRuntimeTemplatesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListNotebookRuntimeTemplatesRequest.newBuilder() to construct. + private ListNotebookRuntimeTemplatesRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListNotebookRuntimeTemplatesRequest() { + parent_ = ""; + filter_ = ""; + pageToken_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListNotebookRuntimeTemplatesRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListNotebookRuntimeTemplatesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListNotebookRuntimeTemplatesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesRequest.class, + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The resource name of the Location from which to list the
+   * NotebookRuntimeTemplates.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the Location from which to list the
+   * NotebookRuntimeTemplates.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + * + * + *
+   * Optional. An expression for filtering the results of the request. For field
+   * names both snake_case and camelCase are supported.
+   *
+   *   * `notebookRuntimeTemplate` supports = and !=. `notebookRuntimeTemplate`
+   *     represents the NotebookRuntimeTemplate ID,
+   *     i.e. the last segment of the NotebookRuntimeTemplate's [resource name]
+   *     [google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate.name].
+   *   * `display_name` supports = and !=
+   *   * `labels` supports general map functions that is:
+   *     * `labels.key=value` - key:value equality
+   *     * `labels.key:* or labels:key - key existence
+   *     * A key including a space must be quoted. `labels."a key"`.
+   *   * `notebookRuntimeType` supports = and !=. notebookRuntimeType enum:
+   *   [USER_DEFINED, ONE_CLICK].
+   *
+   * Some examples:
+   *
+   *   * `notebookRuntimeTemplate=notebookRuntimeTemplate123`
+   *   * `displayName="myDisplayName"`
+   *   * `labels.myKey="myValue"`
+   *   * `notebookRuntimeType=USER_DEFINED`
+   * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + 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(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An expression for filtering the results of the request. For field
+   * names both snake_case and camelCase are supported.
+   *
+   *   * `notebookRuntimeTemplate` supports = and !=. `notebookRuntimeTemplate`
+   *     represents the NotebookRuntimeTemplate ID,
+   *     i.e. the last segment of the NotebookRuntimeTemplate's [resource name]
+   *     [google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate.name].
+   *   * `display_name` supports = and !=
+   *   * `labels` supports general map functions that is:
+   *     * `labels.key=value` - key:value equality
+   *     * `labels.key:* or labels:key - key existence
+   *     * A key including a space must be quoted. `labels."a key"`.
+   *   * `notebookRuntimeType` supports = and !=. notebookRuntimeType enum:
+   *   [USER_DEFINED, ONE_CLICK].
+   *
+   * Some examples:
+   *
+   *   * `notebookRuntimeTemplate=notebookRuntimeTemplate123`
+   *   * `displayName="myDisplayName"`
+   *   * `labels.myKey="myValue"`
+   *   * `notebookRuntimeType=USER_DEFINED`
+   * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 3; + private int pageSize_ = 0; + /** + * + * + *
+   * Optional. The standard list page size.
+   * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * Optional. The standard list page token.
+   * Typically obtained via
+   * [ListNotebookRuntimeTemplatesResponse.next_page_token][google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesResponse.next_page_token]
+   * of the previous
+   * [NotebookService.ListNotebookRuntimeTemplates][google.cloud.aiplatform.v1beta1.NotebookService.ListNotebookRuntimeTemplates]
+   * call.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + 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(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The standard list page token.
+   * Typically obtained via
+   * [ListNotebookRuntimeTemplatesResponse.next_page_token][google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesResponse.next_page_token]
+   * of the previous
+   * [NotebookService.ListNotebookRuntimeTemplates][google.cloud.aiplatform.v1beta1.NotebookService.ListNotebookRuntimeTemplates]
+   * call.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int READ_MASK_FIELD_NUMBER = 5; + private com.google.protobuf.FieldMask readMask_; + /** + * + * + *
+   * Optional. Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the readMask field is set. + */ + @java.lang.Override + public boolean hasReadMask() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Optional. Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The readMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getReadMask() { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } + /** + * + * + *
+   * Optional. Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder() { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } + + public static final int ORDER_BY_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + /** + * + * + *
+   * Optional. A comma-separated list of fields to order by, sorted in ascending
+   * order. Use "desc" after a field name for descending. Supported fields:
+   *
+   *   * `display_name`
+   *   * `create_time`
+   *   * `update_time`
+   *
+   * Example: `display_name, create_time desc`.
+   * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + 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(); + orderBy_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. A comma-separated list of fields to order by, sorted in ascending
+   * order. Use "desc" after a field name for descending. Supported fields:
+   *
+   *   * `display_name`
+   *   * `create_time`
+   *   * `update_time`
+   *
+   * Example: `display_name, create_time desc`.
+   * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); + } + if (pageSize_ != 0) { + output.writeInt32(3, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(5, getReadMask()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, orderBy_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pageToken_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getReadMask()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, orderBy_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesRequest other = + (com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (hasReadMask() != other.hasReadMask()) return false; + if (hasReadMask()) { + if (!getReadMask().equals(other.getReadMask())) return false; + } + if (!getOrderBy().equals(other.getOrderBy())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + if (hasReadMask()) { + hash = (37 * hash) + READ_MASK_FIELD_NUMBER; + hash = (53 * hash) + getReadMask().hashCode(); + } + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for
+   * [NotebookService.ListNotebookRuntimeTemplates][google.cloud.aiplatform.v1beta1.NotebookService.ListNotebookRuntimeTemplates].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesRequest) + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListNotebookRuntimeTemplatesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListNotebookRuntimeTemplatesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesRequest.class, + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getReadMaskFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + filter_ = ""; + pageSize_ = 0; + pageToken_ = ""; + readMask_ = null; + if (readMaskBuilder_ != null) { + readMaskBuilder_.dispose(); + readMaskBuilder_ = null; + } + orderBy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListNotebookRuntimeTemplatesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesRequest + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesRequest build() { + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesRequest buildPartial() { + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesRequest result = + new com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.pageToken_ = pageToken_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000010) != 0)) { + result.readMask_ = readMaskBuilder_ == null ? readMask_ : readMaskBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.orderBy_ = orderBy_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesRequest) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesRequest other) { + if (other + == com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.hasReadMask()) { + mergeReadMask(other.getReadMask()); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000020; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + input.readMessage(getReadMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of the Location from which to list the
+     * NotebookRuntimeTemplates.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Location from which to list the
+     * NotebookRuntimeTemplates.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Location from which to list the
+     * NotebookRuntimeTemplates.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Location from which to list the
+     * NotebookRuntimeTemplates.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Location from which to list the
+     * NotebookRuntimeTemplates.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Optional. An expression for filtering the results of the request. For field
+     * names both snake_case and camelCase are supported.
+     *
+     *   * `notebookRuntimeTemplate` supports = and !=. `notebookRuntimeTemplate`
+     *     represents the NotebookRuntimeTemplate ID,
+     *     i.e. the last segment of the NotebookRuntimeTemplate's [resource name]
+     *     [google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate.name].
+     *   * `display_name` supports = and !=
+     *   * `labels` supports general map functions that is:
+     *     * `labels.key=value` - key:value equality
+     *     * `labels.key:* or labels:key - key existence
+     *     * A key including a space must be quoted. `labels."a key"`.
+     *   * `notebookRuntimeType` supports = and !=. notebookRuntimeType enum:
+     *   [USER_DEFINED, ONE_CLICK].
+     *
+     * Some examples:
+     *
+     *   * `notebookRuntimeTemplate=notebookRuntimeTemplate123`
+     *   * `displayName="myDisplayName"`
+     *   * `labels.myKey="myValue"`
+     *   * `notebookRuntimeType=USER_DEFINED`
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An expression for filtering the results of the request. For field
+     * names both snake_case and camelCase are supported.
+     *
+     *   * `notebookRuntimeTemplate` supports = and !=. `notebookRuntimeTemplate`
+     *     represents the NotebookRuntimeTemplate ID,
+     *     i.e. the last segment of the NotebookRuntimeTemplate's [resource name]
+     *     [google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate.name].
+     *   * `display_name` supports = and !=
+     *   * `labels` supports general map functions that is:
+     *     * `labels.key=value` - key:value equality
+     *     * `labels.key:* or labels:key - key existence
+     *     * A key including a space must be quoted. `labels."a key"`.
+     *   * `notebookRuntimeType` supports = and !=. notebookRuntimeType enum:
+     *   [USER_DEFINED, ONE_CLICK].
+     *
+     * Some examples:
+     *
+     *   * `notebookRuntimeTemplate=notebookRuntimeTemplate123`
+     *   * `displayName="myDisplayName"`
+     *   * `labels.myKey="myValue"`
+     *   * `notebookRuntimeType=USER_DEFINED`
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An expression for filtering the results of the request. For field
+     * names both snake_case and camelCase are supported.
+     *
+     *   * `notebookRuntimeTemplate` supports = and !=. `notebookRuntimeTemplate`
+     *     represents the NotebookRuntimeTemplate ID,
+     *     i.e. the last segment of the NotebookRuntimeTemplate's [resource name]
+     *     [google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate.name].
+     *   * `display_name` supports = and !=
+     *   * `labels` supports general map functions that is:
+     *     * `labels.key=value` - key:value equality
+     *     * `labels.key:* or labels:key - key existence
+     *     * A key including a space must be quoted. `labels."a key"`.
+     *   * `notebookRuntimeType` supports = and !=. notebookRuntimeType enum:
+     *   [USER_DEFINED, ONE_CLICK].
+     *
+     * Some examples:
+     *
+     *   * `notebookRuntimeTemplate=notebookRuntimeTemplate123`
+     *   * `displayName="myDisplayName"`
+     *   * `labels.myKey="myValue"`
+     *   * `notebookRuntimeType=USER_DEFINED`
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An expression for filtering the results of the request. For field
+     * names both snake_case and camelCase are supported.
+     *
+     *   * `notebookRuntimeTemplate` supports = and !=. `notebookRuntimeTemplate`
+     *     represents the NotebookRuntimeTemplate ID,
+     *     i.e. the last segment of the NotebookRuntimeTemplate's [resource name]
+     *     [google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate.name].
+     *   * `display_name` supports = and !=
+     *   * `labels` supports general map functions that is:
+     *     * `labels.key=value` - key:value equality
+     *     * `labels.key:* or labels:key - key existence
+     *     * A key including a space must be quoted. `labels."a key"`.
+     *   * `notebookRuntimeType` supports = and !=. notebookRuntimeType enum:
+     *   [USER_DEFINED, ONE_CLICK].
+     *
+     * Some examples:
+     *
+     *   * `notebookRuntimeTemplate=notebookRuntimeTemplate123`
+     *   * `displayName="myDisplayName"`
+     *   * `labels.myKey="myValue"`
+     *   * `notebookRuntimeType=USER_DEFINED`
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An expression for filtering the results of the request. For field
+     * names both snake_case and camelCase are supported.
+     *
+     *   * `notebookRuntimeTemplate` supports = and !=. `notebookRuntimeTemplate`
+     *     represents the NotebookRuntimeTemplate ID,
+     *     i.e. the last segment of the NotebookRuntimeTemplate's [resource name]
+     *     [google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate.name].
+     *   * `display_name` supports = and !=
+     *   * `labels` supports general map functions that is:
+     *     * `labels.key=value` - key:value equality
+     *     * `labels.key:* or labels:key - key existence
+     *     * A key including a space must be quoted. `labels."a key"`.
+     *   * `notebookRuntimeType` supports = and !=. notebookRuntimeType enum:
+     *   [USER_DEFINED, ONE_CLICK].
+     *
+     * Some examples:
+     *
+     *   * `notebookRuntimeTemplate=notebookRuntimeTemplate123`
+     *   * `displayName="myDisplayName"`
+     *   * `labels.myKey="myValue"`
+     *   * `notebookRuntimeType=USER_DEFINED`
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Optional. The standard list page size.
+     * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Optional. The standard list page size.
+     * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard list page size.
+     * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000004); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * Optional. The standard list page token.
+     * Typically obtained via
+     * [ListNotebookRuntimeTemplatesResponse.next_page_token][google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesResponse.next_page_token]
+     * of the previous
+     * [NotebookService.ListNotebookRuntimeTemplates][google.cloud.aiplatform.v1beta1.NotebookService.ListNotebookRuntimeTemplates]
+     * call.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The standard list page token.
+     * Typically obtained via
+     * [ListNotebookRuntimeTemplatesResponse.next_page_token][google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesResponse.next_page_token]
+     * of the previous
+     * [NotebookService.ListNotebookRuntimeTemplates][google.cloud.aiplatform.v1beta1.NotebookService.ListNotebookRuntimeTemplates]
+     * call.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The standard list page token.
+     * Typically obtained via
+     * [ListNotebookRuntimeTemplatesResponse.next_page_token][google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesResponse.next_page_token]
+     * of the previous
+     * [NotebookService.ListNotebookRuntimeTemplates][google.cloud.aiplatform.v1beta1.NotebookService.ListNotebookRuntimeTemplates]
+     * call.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard list page token.
+     * Typically obtained via
+     * [ListNotebookRuntimeTemplatesResponse.next_page_token][google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesResponse.next_page_token]
+     * of the previous
+     * [NotebookService.ListNotebookRuntimeTemplates][google.cloud.aiplatform.v1beta1.NotebookService.ListNotebookRuntimeTemplates]
+     * call.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard list page token.
+     * Typically obtained via
+     * [ListNotebookRuntimeTemplatesResponse.next_page_token][google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesResponse.next_page_token]
+     * of the previous
+     * [NotebookService.ListNotebookRuntimeTemplates][google.cloud.aiplatform.v1beta1.NotebookService.ListNotebookRuntimeTemplates]
+     * call.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private com.google.protobuf.FieldMask readMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + readMaskBuilder_; + /** + * + * + *
+     * Optional. Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the readMask field is set. + */ + public boolean hasReadMask() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * Optional. Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The readMask. + */ + public com.google.protobuf.FieldMask getReadMask() { + if (readMaskBuilder_ == null) { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } else { + return readMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setReadMask(com.google.protobuf.FieldMask value) { + if (readMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + readMask_ = value; + } else { + readMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setReadMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (readMaskBuilder_ == null) { + readMask_ = builderForValue.build(); + } else { + readMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeReadMask(com.google.protobuf.FieldMask value) { + if (readMaskBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && readMask_ != null + && readMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getReadMaskBuilder().mergeFrom(value); + } else { + readMask_ = value; + } + } else { + readMaskBuilder_.mergeFrom(value); + } + if (readMask_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Optional. Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearReadMask() { + bitField0_ = (bitField0_ & ~0x00000010); + readMask_ = null; + if (readMaskBuilder_ != null) { + readMaskBuilder_.dispose(); + readMaskBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMask.Builder getReadMaskBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getReadMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder() { + if (readMaskBuilder_ != null) { + return readMaskBuilder_.getMessageOrBuilder(); + } else { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } + } + /** + * + * + *
+     * Optional. Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getReadMaskFieldBuilder() { + if (readMaskBuilder_ == null) { + readMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getReadMask(), getParentForChildren(), isClean()); + readMask_ = null; + } + return readMaskBuilder_; + } + + private java.lang.Object orderBy_ = ""; + /** + * + * + *
+     * Optional. A comma-separated list of fields to order by, sorted in ascending
+     * order. Use "desc" after a field name for descending. Supported fields:
+     *
+     *   * `display_name`
+     *   * `create_time`
+     *   * `update_time`
+     *
+     * Example: `display_name, create_time desc`.
+     * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. A comma-separated list of fields to order by, sorted in ascending
+     * order. Use "desc" after a field name for descending. Supported fields:
+     *
+     *   * `display_name`
+     *   * `create_time`
+     *   * `update_time`
+     *
+     * Example: `display_name, create_time desc`.
+     * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. A comma-separated list of fields to order by, sorted in ascending
+     * order. Use "desc" after a field name for descending. Supported fields:
+     *
+     *   * `display_name`
+     *   * `create_time`
+     *   * `update_time`
+     *
+     * Example: `display_name, create_time desc`.
+     * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + orderBy_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A comma-separated list of fields to order by, sorted in ascending
+     * order. Use "desc" after a field name for descending. Supported fields:
+     *
+     *   * `display_name`
+     *   * `create_time`
+     *   * `update_time`
+     *
+     * Example: `display_name, create_time desc`.
+     * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A comma-separated list of fields to order by, sorted in ascending
+     * order. Use "desc" after a field name for descending. Supported fields:
+     *
+     *   * `display_name`
+     *   * `create_time`
+     *   * `update_time`
+     *
+     * Example: `display_name, create_time desc`.
+     * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesRequest) + private static final com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesRequest(); + } + + public static com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListNotebookRuntimeTemplatesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListNotebookRuntimeTemplatesRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListNotebookRuntimeTemplatesRequestOrBuilder.java new file mode 100644 index 000000000000..fd4004d1a805 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListNotebookRuntimeTemplatesRequestOrBuilder.java @@ -0,0 +1,249 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/notebook_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +public interface ListNotebookRuntimeTemplatesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the Location from which to list the
+   * NotebookRuntimeTemplates.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The resource name of the Location from which to list the
+   * NotebookRuntimeTemplates.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. An expression for filtering the results of the request. For field
+   * names both snake_case and camelCase are supported.
+   *
+   *   * `notebookRuntimeTemplate` supports = and !=. `notebookRuntimeTemplate`
+   *     represents the NotebookRuntimeTemplate ID,
+   *     i.e. the last segment of the NotebookRuntimeTemplate's [resource name]
+   *     [google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate.name].
+   *   * `display_name` supports = and !=
+   *   * `labels` supports general map functions that is:
+   *     * `labels.key=value` - key:value equality
+   *     * `labels.key:* or labels:key - key existence
+   *     * A key including a space must be quoted. `labels."a key"`.
+   *   * `notebookRuntimeType` supports = and !=. notebookRuntimeType enum:
+   *   [USER_DEFINED, ONE_CLICK].
+   *
+   * Some examples:
+   *
+   *   * `notebookRuntimeTemplate=notebookRuntimeTemplate123`
+   *   * `displayName="myDisplayName"`
+   *   * `labels.myKey="myValue"`
+   *   * `notebookRuntimeType=USER_DEFINED`
+   * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Optional. An expression for filtering the results of the request. For field
+   * names both snake_case and camelCase are supported.
+   *
+   *   * `notebookRuntimeTemplate` supports = and !=. `notebookRuntimeTemplate`
+   *     represents the NotebookRuntimeTemplate ID,
+   *     i.e. the last segment of the NotebookRuntimeTemplate's [resource name]
+   *     [google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate.name].
+   *   * `display_name` supports = and !=
+   *   * `labels` supports general map functions that is:
+   *     * `labels.key=value` - key:value equality
+   *     * `labels.key:* or labels:key - key existence
+   *     * A key including a space must be quoted. `labels."a key"`.
+   *   * `notebookRuntimeType` supports = and !=. notebookRuntimeType enum:
+   *   [USER_DEFINED, ONE_CLICK].
+   *
+   * Some examples:
+   *
+   *   * `notebookRuntimeTemplate=notebookRuntimeTemplate123`
+   *   * `displayName="myDisplayName"`
+   *   * `labels.myKey="myValue"`
+   *   * `notebookRuntimeType=USER_DEFINED`
+   * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Optional. The standard list page size.
+   * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. The standard list page token.
+   * Typically obtained via
+   * [ListNotebookRuntimeTemplatesResponse.next_page_token][google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesResponse.next_page_token]
+   * of the previous
+   * [NotebookService.ListNotebookRuntimeTemplates][google.cloud.aiplatform.v1beta1.NotebookService.ListNotebookRuntimeTemplates]
+   * call.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * Optional. The standard list page token.
+   * Typically obtained via
+   * [ListNotebookRuntimeTemplatesResponse.next_page_token][google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesResponse.next_page_token]
+   * of the previous
+   * [NotebookService.ListNotebookRuntimeTemplates][google.cloud.aiplatform.v1beta1.NotebookService.ListNotebookRuntimeTemplates]
+   * call.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the readMask field is set. + */ + boolean hasReadMask(); + /** + * + * + *
+   * Optional. Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The readMask. + */ + com.google.protobuf.FieldMask getReadMask(); + /** + * + * + *
+   * Optional. Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder(); + + /** + * + * + *
+   * Optional. A comma-separated list of fields to order by, sorted in ascending
+   * order. Use "desc" after a field name for descending. Supported fields:
+   *
+   *   * `display_name`
+   *   * `create_time`
+   *   * `update_time`
+   *
+   * Example: `display_name, create_time desc`.
+   * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * Optional. A comma-separated list of fields to order by, sorted in ascending
+   * order. Use "desc" after a field name for descending. Supported fields:
+   *
+   *   * `display_name`
+   *   * `create_time`
+   *   * `update_time`
+   *
+   * Example: `display_name, create_time desc`.
+   * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListNotebookRuntimeTemplatesResponse.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListNotebookRuntimeTemplatesResponse.java new file mode 100644 index 000000000000..bc3f7be795ae --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListNotebookRuntimeTemplatesResponse.java @@ -0,0 +1,1238 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/notebook_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Response message for
+ * [NotebookService.ListNotebookRuntimeTemplates][google.cloud.aiplatform.v1beta1.NotebookService.ListNotebookRuntimeTemplates].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesResponse} + */ +public final class ListNotebookRuntimeTemplatesResponse + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesResponse) + ListNotebookRuntimeTemplatesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListNotebookRuntimeTemplatesResponse.newBuilder() to construct. + private ListNotebookRuntimeTemplatesResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListNotebookRuntimeTemplatesResponse() { + notebookRuntimeTemplates_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListNotebookRuntimeTemplatesResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListNotebookRuntimeTemplatesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListNotebookRuntimeTemplatesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesResponse.class, + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesResponse.Builder.class); + } + + public static final int NOTEBOOK_RUNTIME_TEMPLATES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List + notebookRuntimeTemplates_; + /** + * + * + *
+   * List of NotebookRuntimeTemplates in the requested page.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate notebook_runtime_templates = 1; + * + */ + @java.lang.Override + public java.util.List + getNotebookRuntimeTemplatesList() { + return notebookRuntimeTemplates_; + } + /** + * + * + *
+   * List of NotebookRuntimeTemplates in the requested page.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate notebook_runtime_templates = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateOrBuilder> + getNotebookRuntimeTemplatesOrBuilderList() { + return notebookRuntimeTemplates_; + } + /** + * + * + *
+   * List of NotebookRuntimeTemplates in the requested page.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate notebook_runtime_templates = 1; + * + */ + @java.lang.Override + public int getNotebookRuntimeTemplatesCount() { + return notebookRuntimeTemplates_.size(); + } + /** + * + * + *
+   * List of NotebookRuntimeTemplates in the requested page.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate notebook_runtime_templates = 1; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate getNotebookRuntimeTemplates( + int index) { + return notebookRuntimeTemplates_.get(index); + } + /** + * + * + *
+   * List of NotebookRuntimeTemplates in the requested page.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate notebook_runtime_templates = 1; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateOrBuilder + getNotebookRuntimeTemplatesOrBuilder(int index) { + return notebookRuntimeTemplates_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * A token to retrieve next page of results.
+   * Pass to
+   * [ListNotebookRuntimeTemplatesRequest.page_token][google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesRequest.page_token]
+   * to obtain that page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + 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(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token to retrieve next page of results.
+   * Pass to
+   * [ListNotebookRuntimeTemplatesRequest.page_token][google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesRequest.page_token]
+   * to obtain that page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < notebookRuntimeTemplates_.size(); i++) { + output.writeMessage(1, notebookRuntimeTemplates_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < notebookRuntimeTemplates_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, notebookRuntimeTemplates_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesResponse)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesResponse other = + (com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesResponse) obj; + + if (!getNotebookRuntimeTemplatesList().equals(other.getNotebookRuntimeTemplatesList())) + return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getNotebookRuntimeTemplatesCount() > 0) { + hash = (37 * hash) + NOTEBOOK_RUNTIME_TEMPLATES_FIELD_NUMBER; + hash = (53 * hash) + getNotebookRuntimeTemplatesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for
+   * [NotebookService.ListNotebookRuntimeTemplates][google.cloud.aiplatform.v1beta1.NotebookService.ListNotebookRuntimeTemplates].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesResponse) + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListNotebookRuntimeTemplatesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListNotebookRuntimeTemplatesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesResponse.class, + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesResponse.Builder + .class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (notebookRuntimeTemplatesBuilder_ == null) { + notebookRuntimeTemplates_ = java.util.Collections.emptyList(); + } else { + notebookRuntimeTemplates_ = null; + notebookRuntimeTemplatesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListNotebookRuntimeTemplatesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesResponse + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesResponse build() { + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesResponse buildPartial() { + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesResponse result = + new com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesResponse result) { + if (notebookRuntimeTemplatesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + notebookRuntimeTemplates_ = + java.util.Collections.unmodifiableList(notebookRuntimeTemplates_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.notebookRuntimeTemplates_ = notebookRuntimeTemplates_; + } else { + result.notebookRuntimeTemplates_ = notebookRuntimeTemplatesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesResponse) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesResponse other) { + if (other + == com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesResponse + .getDefaultInstance()) return this; + if (notebookRuntimeTemplatesBuilder_ == null) { + if (!other.notebookRuntimeTemplates_.isEmpty()) { + if (notebookRuntimeTemplates_.isEmpty()) { + notebookRuntimeTemplates_ = other.notebookRuntimeTemplates_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureNotebookRuntimeTemplatesIsMutable(); + notebookRuntimeTemplates_.addAll(other.notebookRuntimeTemplates_); + } + onChanged(); + } + } else { + if (!other.notebookRuntimeTemplates_.isEmpty()) { + if (notebookRuntimeTemplatesBuilder_.isEmpty()) { + notebookRuntimeTemplatesBuilder_.dispose(); + notebookRuntimeTemplatesBuilder_ = null; + notebookRuntimeTemplates_ = other.notebookRuntimeTemplates_; + bitField0_ = (bitField0_ & ~0x00000001); + notebookRuntimeTemplatesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getNotebookRuntimeTemplatesFieldBuilder() + : null; + } else { + notebookRuntimeTemplatesBuilder_.addAllMessages(other.notebookRuntimeTemplates_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate m = + input.readMessage( + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate.parser(), + extensionRegistry); + if (notebookRuntimeTemplatesBuilder_ == null) { + ensureNotebookRuntimeTemplatesIsMutable(); + notebookRuntimeTemplates_.add(m); + } else { + notebookRuntimeTemplatesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List + notebookRuntimeTemplates_ = java.util.Collections.emptyList(); + + private void ensureNotebookRuntimeTemplatesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + notebookRuntimeTemplates_ = + new java.util.ArrayList( + notebookRuntimeTemplates_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate, + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate.Builder, + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateOrBuilder> + notebookRuntimeTemplatesBuilder_; + + /** + * + * + *
+     * List of NotebookRuntimeTemplates in the requested page.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate notebook_runtime_templates = 1; + * + */ + public java.util.List + getNotebookRuntimeTemplatesList() { + if (notebookRuntimeTemplatesBuilder_ == null) { + return java.util.Collections.unmodifiableList(notebookRuntimeTemplates_); + } else { + return notebookRuntimeTemplatesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of NotebookRuntimeTemplates in the requested page.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate notebook_runtime_templates = 1; + * + */ + public int getNotebookRuntimeTemplatesCount() { + if (notebookRuntimeTemplatesBuilder_ == null) { + return notebookRuntimeTemplates_.size(); + } else { + return notebookRuntimeTemplatesBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of NotebookRuntimeTemplates in the requested page.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate notebook_runtime_templates = 1; + * + */ + public com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate getNotebookRuntimeTemplates( + int index) { + if (notebookRuntimeTemplatesBuilder_ == null) { + return notebookRuntimeTemplates_.get(index); + } else { + return notebookRuntimeTemplatesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of NotebookRuntimeTemplates in the requested page.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate notebook_runtime_templates = 1; + * + */ + public Builder setNotebookRuntimeTemplates( + int index, com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate value) { + if (notebookRuntimeTemplatesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNotebookRuntimeTemplatesIsMutable(); + notebookRuntimeTemplates_.set(index, value); + onChanged(); + } else { + notebookRuntimeTemplatesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of NotebookRuntimeTemplates in the requested page.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate notebook_runtime_templates = 1; + * + */ + public Builder setNotebookRuntimeTemplates( + int index, + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate.Builder builderForValue) { + if (notebookRuntimeTemplatesBuilder_ == null) { + ensureNotebookRuntimeTemplatesIsMutable(); + notebookRuntimeTemplates_.set(index, builderForValue.build()); + onChanged(); + } else { + notebookRuntimeTemplatesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of NotebookRuntimeTemplates in the requested page.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate notebook_runtime_templates = 1; + * + */ + public Builder addNotebookRuntimeTemplates( + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate value) { + if (notebookRuntimeTemplatesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNotebookRuntimeTemplatesIsMutable(); + notebookRuntimeTemplates_.add(value); + onChanged(); + } else { + notebookRuntimeTemplatesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of NotebookRuntimeTemplates in the requested page.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate notebook_runtime_templates = 1; + * + */ + public Builder addNotebookRuntimeTemplates( + int index, com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate value) { + if (notebookRuntimeTemplatesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNotebookRuntimeTemplatesIsMutable(); + notebookRuntimeTemplates_.add(index, value); + onChanged(); + } else { + notebookRuntimeTemplatesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of NotebookRuntimeTemplates in the requested page.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate notebook_runtime_templates = 1; + * + */ + public Builder addNotebookRuntimeTemplates( + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate.Builder builderForValue) { + if (notebookRuntimeTemplatesBuilder_ == null) { + ensureNotebookRuntimeTemplatesIsMutable(); + notebookRuntimeTemplates_.add(builderForValue.build()); + onChanged(); + } else { + notebookRuntimeTemplatesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of NotebookRuntimeTemplates in the requested page.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate notebook_runtime_templates = 1; + * + */ + public Builder addNotebookRuntimeTemplates( + int index, + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate.Builder builderForValue) { + if (notebookRuntimeTemplatesBuilder_ == null) { + ensureNotebookRuntimeTemplatesIsMutable(); + notebookRuntimeTemplates_.add(index, builderForValue.build()); + onChanged(); + } else { + notebookRuntimeTemplatesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of NotebookRuntimeTemplates in the requested page.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate notebook_runtime_templates = 1; + * + */ + public Builder addAllNotebookRuntimeTemplates( + java.lang.Iterable + values) { + if (notebookRuntimeTemplatesBuilder_ == null) { + ensureNotebookRuntimeTemplatesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, notebookRuntimeTemplates_); + onChanged(); + } else { + notebookRuntimeTemplatesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of NotebookRuntimeTemplates in the requested page.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate notebook_runtime_templates = 1; + * + */ + public Builder clearNotebookRuntimeTemplates() { + if (notebookRuntimeTemplatesBuilder_ == null) { + notebookRuntimeTemplates_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + notebookRuntimeTemplatesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of NotebookRuntimeTemplates in the requested page.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate notebook_runtime_templates = 1; + * + */ + public Builder removeNotebookRuntimeTemplates(int index) { + if (notebookRuntimeTemplatesBuilder_ == null) { + ensureNotebookRuntimeTemplatesIsMutable(); + notebookRuntimeTemplates_.remove(index); + onChanged(); + } else { + notebookRuntimeTemplatesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of NotebookRuntimeTemplates in the requested page.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate notebook_runtime_templates = 1; + * + */ + public com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate.Builder + getNotebookRuntimeTemplatesBuilder(int index) { + return getNotebookRuntimeTemplatesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of NotebookRuntimeTemplates in the requested page.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate notebook_runtime_templates = 1; + * + */ + public com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateOrBuilder + getNotebookRuntimeTemplatesOrBuilder(int index) { + if (notebookRuntimeTemplatesBuilder_ == null) { + return notebookRuntimeTemplates_.get(index); + } else { + return notebookRuntimeTemplatesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of NotebookRuntimeTemplates in the requested page.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate notebook_runtime_templates = 1; + * + */ + public java.util.List< + ? extends com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateOrBuilder> + getNotebookRuntimeTemplatesOrBuilderList() { + if (notebookRuntimeTemplatesBuilder_ != null) { + return notebookRuntimeTemplatesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(notebookRuntimeTemplates_); + } + } + /** + * + * + *
+     * List of NotebookRuntimeTemplates in the requested page.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate notebook_runtime_templates = 1; + * + */ + public com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate.Builder + addNotebookRuntimeTemplatesBuilder() { + return getNotebookRuntimeTemplatesFieldBuilder() + .addBuilder( + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate.getDefaultInstance()); + } + /** + * + * + *
+     * List of NotebookRuntimeTemplates in the requested page.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate notebook_runtime_templates = 1; + * + */ + public com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate.Builder + addNotebookRuntimeTemplatesBuilder(int index) { + return getNotebookRuntimeTemplatesFieldBuilder() + .addBuilder( + index, + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate.getDefaultInstance()); + } + /** + * + * + *
+     * List of NotebookRuntimeTemplates in the requested page.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate notebook_runtime_templates = 1; + * + */ + public java.util.List + getNotebookRuntimeTemplatesBuilderList() { + return getNotebookRuntimeTemplatesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate, + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate.Builder, + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateOrBuilder> + getNotebookRuntimeTemplatesFieldBuilder() { + if (notebookRuntimeTemplatesBuilder_ == null) { + notebookRuntimeTemplatesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate, + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate.Builder, + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateOrBuilder>( + notebookRuntimeTemplates_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + notebookRuntimeTemplates_ = null; + } + return notebookRuntimeTemplatesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token to retrieve next page of results.
+     * Pass to
+     * [ListNotebookRuntimeTemplatesRequest.page_token][google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesRequest.page_token]
+     * to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token to retrieve next page of results.
+     * Pass to
+     * [ListNotebookRuntimeTemplatesRequest.page_token][google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesRequest.page_token]
+     * to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token to retrieve next page of results.
+     * Pass to
+     * [ListNotebookRuntimeTemplatesRequest.page_token][google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesRequest.page_token]
+     * to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * A token to retrieve next page of results.
+     * Pass to
+     * [ListNotebookRuntimeTemplatesRequest.page_token][google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesRequest.page_token]
+     * to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A token to retrieve next page of results.
+     * Pass to
+     * [ListNotebookRuntimeTemplatesRequest.page_token][google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesRequest.page_token]
+     * to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesResponse) + private static final com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesResponse(); + } + + public static com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListNotebookRuntimeTemplatesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListNotebookRuntimeTemplatesResponseOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListNotebookRuntimeTemplatesResponseOrBuilder.java new file mode 100644 index 000000000000..42490182b091 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListNotebookRuntimeTemplatesResponseOrBuilder.java @@ -0,0 +1,122 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/notebook_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +public interface ListNotebookRuntimeTemplatesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * List of NotebookRuntimeTemplates in the requested page.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate notebook_runtime_templates = 1; + * + */ + java.util.List + getNotebookRuntimeTemplatesList(); + /** + * + * + *
+   * List of NotebookRuntimeTemplates in the requested page.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate notebook_runtime_templates = 1; + * + */ + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate getNotebookRuntimeTemplates( + int index); + /** + * + * + *
+   * List of NotebookRuntimeTemplates in the requested page.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate notebook_runtime_templates = 1; + * + */ + int getNotebookRuntimeTemplatesCount(); + /** + * + * + *
+   * List of NotebookRuntimeTemplates in the requested page.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate notebook_runtime_templates = 1; + * + */ + java.util.List + getNotebookRuntimeTemplatesOrBuilderList(); + /** + * + * + *
+   * List of NotebookRuntimeTemplates in the requested page.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate notebook_runtime_templates = 1; + * + */ + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateOrBuilder + getNotebookRuntimeTemplatesOrBuilder(int index); + + /** + * + * + *
+   * A token to retrieve next page of results.
+   * Pass to
+   * [ListNotebookRuntimeTemplatesRequest.page_token][google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesRequest.page_token]
+   * to obtain that page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token to retrieve next page of results.
+   * Pass to
+   * [ListNotebookRuntimeTemplatesRequest.page_token][google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesRequest.page_token]
+   * to obtain that page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListNotebookRuntimesRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListNotebookRuntimesRequest.java new file mode 100644 index 000000000000..741fce3ab2cb --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListNotebookRuntimesRequest.java @@ -0,0 +1,1907 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/notebook_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Request message for
+ * [NotebookService.ListNotebookRuntimes][google.cloud.aiplatform.v1beta1.NotebookService.ListNotebookRuntimes].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.ListNotebookRuntimesRequest} + */ +public final class ListNotebookRuntimesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.ListNotebookRuntimesRequest) + ListNotebookRuntimesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListNotebookRuntimesRequest.newBuilder() to construct. + private ListNotebookRuntimesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListNotebookRuntimesRequest() { + parent_ = ""; + filter_ = ""; + pageToken_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListNotebookRuntimesRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListNotebookRuntimesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListNotebookRuntimesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesRequest.class, + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The resource name of the Location from which to list the
+   * NotebookRuntimes.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the Location from which to list the
+   * NotebookRuntimes.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + * + * + *
+   * Optional. An expression for filtering the results of the request. For field
+   * names both snake_case and camelCase are supported.
+   *
+   *   * `notebookRuntime` supports = and !=. `notebookRuntime` represents the
+   *     NotebookRuntime ID,
+   *     i.e. the last segment of the NotebookRuntime's [resource name]
+   *     [google.cloud.aiplatform.v1beta1.NotebookRuntime.name].
+   *   * `displayName` supports = and != and regex.
+   *   * `notebookRuntimeTemplate` supports = and !=. `notebookRuntimeTemplate`
+   *     represents the NotebookRuntimeTemplate ID,
+   *     i.e. the last segment of the NotebookRuntimeTemplate's [resource name]
+   *     [google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate.name].
+   *   * `healthState` supports = and !=. healthState enum: [HEALTHY, UNHEALTHY,
+   *   HEALTH_STATE_UNSPECIFIED].
+   *   * `runtimeState` supports = and !=. runtimeState enum:
+   *   [RUNTIME_STATE_UNSPECIFIED, RUNNING, BEING_STARTED, BEING_STOPPED,
+   *   STOPPED, BEING_UPGRADED, ERROR, INVALID].
+   *   * `runtimeUser` supports = and !=.
+   *   * API version is UI only: `uiState` supports = and !=. uiState enum:
+   *   [UI_RESOURCE_STATE_UNSPECIFIED, UI_RESOURCE_STATE_BEING_CREATED,
+   *   UI_RESOURCE_STATE_ACTIVE, UI_RESOURCE_STATE_BEING_DELETED,
+   *   UI_RESOURCE_STATE_CREATION_FAILED].
+   *   * `notebookRuntimeType` supports = and !=. notebookRuntimeType enum:
+   *   [USER_DEFINED, ONE_CLICK].
+   *
+   * Some examples:
+   *
+   *   * `notebookRuntime="notebookRuntime123"`
+   *   * `displayName="myDisplayName"` and `displayName=~"myDisplayNameRegex"`
+   *   * `notebookRuntimeTemplate="notebookRuntimeTemplate321"`
+   *   * `healthState=HEALTHY`
+   *   * `runtimeState=RUNNING`
+   *   * `runtimeUser="test@google.com"`
+   *   * `uiState=UI_RESOURCE_STATE_BEING_DELETED`
+   *   * `notebookRuntimeType=USER_DEFINED`
+   * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + 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(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An expression for filtering the results of the request. For field
+   * names both snake_case and camelCase are supported.
+   *
+   *   * `notebookRuntime` supports = and !=. `notebookRuntime` represents the
+   *     NotebookRuntime ID,
+   *     i.e. the last segment of the NotebookRuntime's [resource name]
+   *     [google.cloud.aiplatform.v1beta1.NotebookRuntime.name].
+   *   * `displayName` supports = and != and regex.
+   *   * `notebookRuntimeTemplate` supports = and !=. `notebookRuntimeTemplate`
+   *     represents the NotebookRuntimeTemplate ID,
+   *     i.e. the last segment of the NotebookRuntimeTemplate's [resource name]
+   *     [google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate.name].
+   *   * `healthState` supports = and !=. healthState enum: [HEALTHY, UNHEALTHY,
+   *   HEALTH_STATE_UNSPECIFIED].
+   *   * `runtimeState` supports = and !=. runtimeState enum:
+   *   [RUNTIME_STATE_UNSPECIFIED, RUNNING, BEING_STARTED, BEING_STOPPED,
+   *   STOPPED, BEING_UPGRADED, ERROR, INVALID].
+   *   * `runtimeUser` supports = and !=.
+   *   * API version is UI only: `uiState` supports = and !=. uiState enum:
+   *   [UI_RESOURCE_STATE_UNSPECIFIED, UI_RESOURCE_STATE_BEING_CREATED,
+   *   UI_RESOURCE_STATE_ACTIVE, UI_RESOURCE_STATE_BEING_DELETED,
+   *   UI_RESOURCE_STATE_CREATION_FAILED].
+   *   * `notebookRuntimeType` supports = and !=. notebookRuntimeType enum:
+   *   [USER_DEFINED, ONE_CLICK].
+   *
+   * Some examples:
+   *
+   *   * `notebookRuntime="notebookRuntime123"`
+   *   * `displayName="myDisplayName"` and `displayName=~"myDisplayNameRegex"`
+   *   * `notebookRuntimeTemplate="notebookRuntimeTemplate321"`
+   *   * `healthState=HEALTHY`
+   *   * `runtimeState=RUNNING`
+   *   * `runtimeUser="test@google.com"`
+   *   * `uiState=UI_RESOURCE_STATE_BEING_DELETED`
+   *   * `notebookRuntimeType=USER_DEFINED`
+   * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 3; + private int pageSize_ = 0; + /** + * + * + *
+   * Optional. The standard list page size.
+   * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * Optional. The standard list page token.
+   * Typically obtained via
+   * [ListNotebookRuntimesResponse.next_page_token][google.cloud.aiplatform.v1beta1.ListNotebookRuntimesResponse.next_page_token]
+   * of the previous
+   * [NotebookService.ListNotebookRuntimes][google.cloud.aiplatform.v1beta1.NotebookService.ListNotebookRuntimes]
+   * call.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + 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(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The standard list page token.
+   * Typically obtained via
+   * [ListNotebookRuntimesResponse.next_page_token][google.cloud.aiplatform.v1beta1.ListNotebookRuntimesResponse.next_page_token]
+   * of the previous
+   * [NotebookService.ListNotebookRuntimes][google.cloud.aiplatform.v1beta1.NotebookService.ListNotebookRuntimes]
+   * call.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int READ_MASK_FIELD_NUMBER = 5; + private com.google.protobuf.FieldMask readMask_; + /** + * + * + *
+   * Optional. Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the readMask field is set. + */ + @java.lang.Override + public boolean hasReadMask() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Optional. Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The readMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getReadMask() { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } + /** + * + * + *
+   * Optional. Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder() { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } + + public static final int ORDER_BY_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + /** + * + * + *
+   * Optional. A comma-separated list of fields to order by, sorted in ascending
+   * order. Use "desc" after a field name for descending. Supported fields:
+   *
+   *   * `display_name`
+   *   * `create_time`
+   *   * `update_time`
+   *
+   * Example: `display_name, create_time desc`.
+   * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + 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(); + orderBy_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. A comma-separated list of fields to order by, sorted in ascending
+   * order. Use "desc" after a field name for descending. Supported fields:
+   *
+   *   * `display_name`
+   *   * `create_time`
+   *   * `update_time`
+   *
+   * Example: `display_name, create_time desc`.
+   * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); + } + if (pageSize_ != 0) { + output.writeInt32(3, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(5, getReadMask()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, orderBy_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pageToken_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getReadMask()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, orderBy_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesRequest other = + (com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (hasReadMask() != other.hasReadMask()) return false; + if (hasReadMask()) { + if (!getReadMask().equals(other.getReadMask())) return false; + } + if (!getOrderBy().equals(other.getOrderBy())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + if (hasReadMask()) { + hash = (37 * hash) + READ_MASK_FIELD_NUMBER; + hash = (53 * hash) + getReadMask().hashCode(); + } + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for
+   * [NotebookService.ListNotebookRuntimes][google.cloud.aiplatform.v1beta1.NotebookService.ListNotebookRuntimes].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.ListNotebookRuntimesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.ListNotebookRuntimesRequest) + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListNotebookRuntimesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListNotebookRuntimesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesRequest.class, + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getReadMaskFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + filter_ = ""; + pageSize_ = 0; + pageToken_ = ""; + readMask_ = null; + if (readMaskBuilder_ != null) { + readMaskBuilder_.dispose(); + readMaskBuilder_ = null; + } + orderBy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListNotebookRuntimesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesRequest + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesRequest build() { + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesRequest buildPartial() { + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesRequest result = + new com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.pageToken_ = pageToken_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000010) != 0)) { + result.readMask_ = readMaskBuilder_ == null ? readMask_ : readMaskBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.orderBy_ = orderBy_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesRequest other) { + if (other + == com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.hasReadMask()) { + mergeReadMask(other.getReadMask()); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000020; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + input.readMessage(getReadMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of the Location from which to list the
+     * NotebookRuntimes.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Location from which to list the
+     * NotebookRuntimes.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Location from which to list the
+     * NotebookRuntimes.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Location from which to list the
+     * NotebookRuntimes.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Location from which to list the
+     * NotebookRuntimes.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Optional. An expression for filtering the results of the request. For field
+     * names both snake_case and camelCase are supported.
+     *
+     *   * `notebookRuntime` supports = and !=. `notebookRuntime` represents the
+     *     NotebookRuntime ID,
+     *     i.e. the last segment of the NotebookRuntime's [resource name]
+     *     [google.cloud.aiplatform.v1beta1.NotebookRuntime.name].
+     *   * `displayName` supports = and != and regex.
+     *   * `notebookRuntimeTemplate` supports = and !=. `notebookRuntimeTemplate`
+     *     represents the NotebookRuntimeTemplate ID,
+     *     i.e. the last segment of the NotebookRuntimeTemplate's [resource name]
+     *     [google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate.name].
+     *   * `healthState` supports = and !=. healthState enum: [HEALTHY, UNHEALTHY,
+     *   HEALTH_STATE_UNSPECIFIED].
+     *   * `runtimeState` supports = and !=. runtimeState enum:
+     *   [RUNTIME_STATE_UNSPECIFIED, RUNNING, BEING_STARTED, BEING_STOPPED,
+     *   STOPPED, BEING_UPGRADED, ERROR, INVALID].
+     *   * `runtimeUser` supports = and !=.
+     *   * API version is UI only: `uiState` supports = and !=. uiState enum:
+     *   [UI_RESOURCE_STATE_UNSPECIFIED, UI_RESOURCE_STATE_BEING_CREATED,
+     *   UI_RESOURCE_STATE_ACTIVE, UI_RESOURCE_STATE_BEING_DELETED,
+     *   UI_RESOURCE_STATE_CREATION_FAILED].
+     *   * `notebookRuntimeType` supports = and !=. notebookRuntimeType enum:
+     *   [USER_DEFINED, ONE_CLICK].
+     *
+     * Some examples:
+     *
+     *   * `notebookRuntime="notebookRuntime123"`
+     *   * `displayName="myDisplayName"` and `displayName=~"myDisplayNameRegex"`
+     *   * `notebookRuntimeTemplate="notebookRuntimeTemplate321"`
+     *   * `healthState=HEALTHY`
+     *   * `runtimeState=RUNNING`
+     *   * `runtimeUser="test@google.com"`
+     *   * `uiState=UI_RESOURCE_STATE_BEING_DELETED`
+     *   * `notebookRuntimeType=USER_DEFINED`
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An expression for filtering the results of the request. For field
+     * names both snake_case and camelCase are supported.
+     *
+     *   * `notebookRuntime` supports = and !=. `notebookRuntime` represents the
+     *     NotebookRuntime ID,
+     *     i.e. the last segment of the NotebookRuntime's [resource name]
+     *     [google.cloud.aiplatform.v1beta1.NotebookRuntime.name].
+     *   * `displayName` supports = and != and regex.
+     *   * `notebookRuntimeTemplate` supports = and !=. `notebookRuntimeTemplate`
+     *     represents the NotebookRuntimeTemplate ID,
+     *     i.e. the last segment of the NotebookRuntimeTemplate's [resource name]
+     *     [google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate.name].
+     *   * `healthState` supports = and !=. healthState enum: [HEALTHY, UNHEALTHY,
+     *   HEALTH_STATE_UNSPECIFIED].
+     *   * `runtimeState` supports = and !=. runtimeState enum:
+     *   [RUNTIME_STATE_UNSPECIFIED, RUNNING, BEING_STARTED, BEING_STOPPED,
+     *   STOPPED, BEING_UPGRADED, ERROR, INVALID].
+     *   * `runtimeUser` supports = and !=.
+     *   * API version is UI only: `uiState` supports = and !=. uiState enum:
+     *   [UI_RESOURCE_STATE_UNSPECIFIED, UI_RESOURCE_STATE_BEING_CREATED,
+     *   UI_RESOURCE_STATE_ACTIVE, UI_RESOURCE_STATE_BEING_DELETED,
+     *   UI_RESOURCE_STATE_CREATION_FAILED].
+     *   * `notebookRuntimeType` supports = and !=. notebookRuntimeType enum:
+     *   [USER_DEFINED, ONE_CLICK].
+     *
+     * Some examples:
+     *
+     *   * `notebookRuntime="notebookRuntime123"`
+     *   * `displayName="myDisplayName"` and `displayName=~"myDisplayNameRegex"`
+     *   * `notebookRuntimeTemplate="notebookRuntimeTemplate321"`
+     *   * `healthState=HEALTHY`
+     *   * `runtimeState=RUNNING`
+     *   * `runtimeUser="test@google.com"`
+     *   * `uiState=UI_RESOURCE_STATE_BEING_DELETED`
+     *   * `notebookRuntimeType=USER_DEFINED`
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An expression for filtering the results of the request. For field
+     * names both snake_case and camelCase are supported.
+     *
+     *   * `notebookRuntime` supports = and !=. `notebookRuntime` represents the
+     *     NotebookRuntime ID,
+     *     i.e. the last segment of the NotebookRuntime's [resource name]
+     *     [google.cloud.aiplatform.v1beta1.NotebookRuntime.name].
+     *   * `displayName` supports = and != and regex.
+     *   * `notebookRuntimeTemplate` supports = and !=. `notebookRuntimeTemplate`
+     *     represents the NotebookRuntimeTemplate ID,
+     *     i.e. the last segment of the NotebookRuntimeTemplate's [resource name]
+     *     [google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate.name].
+     *   * `healthState` supports = and !=. healthState enum: [HEALTHY, UNHEALTHY,
+     *   HEALTH_STATE_UNSPECIFIED].
+     *   * `runtimeState` supports = and !=. runtimeState enum:
+     *   [RUNTIME_STATE_UNSPECIFIED, RUNNING, BEING_STARTED, BEING_STOPPED,
+     *   STOPPED, BEING_UPGRADED, ERROR, INVALID].
+     *   * `runtimeUser` supports = and !=.
+     *   * API version is UI only: `uiState` supports = and !=. uiState enum:
+     *   [UI_RESOURCE_STATE_UNSPECIFIED, UI_RESOURCE_STATE_BEING_CREATED,
+     *   UI_RESOURCE_STATE_ACTIVE, UI_RESOURCE_STATE_BEING_DELETED,
+     *   UI_RESOURCE_STATE_CREATION_FAILED].
+     *   * `notebookRuntimeType` supports = and !=. notebookRuntimeType enum:
+     *   [USER_DEFINED, ONE_CLICK].
+     *
+     * Some examples:
+     *
+     *   * `notebookRuntime="notebookRuntime123"`
+     *   * `displayName="myDisplayName"` and `displayName=~"myDisplayNameRegex"`
+     *   * `notebookRuntimeTemplate="notebookRuntimeTemplate321"`
+     *   * `healthState=HEALTHY`
+     *   * `runtimeState=RUNNING`
+     *   * `runtimeUser="test@google.com"`
+     *   * `uiState=UI_RESOURCE_STATE_BEING_DELETED`
+     *   * `notebookRuntimeType=USER_DEFINED`
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An expression for filtering the results of the request. For field
+     * names both snake_case and camelCase are supported.
+     *
+     *   * `notebookRuntime` supports = and !=. `notebookRuntime` represents the
+     *     NotebookRuntime ID,
+     *     i.e. the last segment of the NotebookRuntime's [resource name]
+     *     [google.cloud.aiplatform.v1beta1.NotebookRuntime.name].
+     *   * `displayName` supports = and != and regex.
+     *   * `notebookRuntimeTemplate` supports = and !=. `notebookRuntimeTemplate`
+     *     represents the NotebookRuntimeTemplate ID,
+     *     i.e. the last segment of the NotebookRuntimeTemplate's [resource name]
+     *     [google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate.name].
+     *   * `healthState` supports = and !=. healthState enum: [HEALTHY, UNHEALTHY,
+     *   HEALTH_STATE_UNSPECIFIED].
+     *   * `runtimeState` supports = and !=. runtimeState enum:
+     *   [RUNTIME_STATE_UNSPECIFIED, RUNNING, BEING_STARTED, BEING_STOPPED,
+     *   STOPPED, BEING_UPGRADED, ERROR, INVALID].
+     *   * `runtimeUser` supports = and !=.
+     *   * API version is UI only: `uiState` supports = and !=. uiState enum:
+     *   [UI_RESOURCE_STATE_UNSPECIFIED, UI_RESOURCE_STATE_BEING_CREATED,
+     *   UI_RESOURCE_STATE_ACTIVE, UI_RESOURCE_STATE_BEING_DELETED,
+     *   UI_RESOURCE_STATE_CREATION_FAILED].
+     *   * `notebookRuntimeType` supports = and !=. notebookRuntimeType enum:
+     *   [USER_DEFINED, ONE_CLICK].
+     *
+     * Some examples:
+     *
+     *   * `notebookRuntime="notebookRuntime123"`
+     *   * `displayName="myDisplayName"` and `displayName=~"myDisplayNameRegex"`
+     *   * `notebookRuntimeTemplate="notebookRuntimeTemplate321"`
+     *   * `healthState=HEALTHY`
+     *   * `runtimeState=RUNNING`
+     *   * `runtimeUser="test@google.com"`
+     *   * `uiState=UI_RESOURCE_STATE_BEING_DELETED`
+     *   * `notebookRuntimeType=USER_DEFINED`
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An expression for filtering the results of the request. For field
+     * names both snake_case and camelCase are supported.
+     *
+     *   * `notebookRuntime` supports = and !=. `notebookRuntime` represents the
+     *     NotebookRuntime ID,
+     *     i.e. the last segment of the NotebookRuntime's [resource name]
+     *     [google.cloud.aiplatform.v1beta1.NotebookRuntime.name].
+     *   * `displayName` supports = and != and regex.
+     *   * `notebookRuntimeTemplate` supports = and !=. `notebookRuntimeTemplate`
+     *     represents the NotebookRuntimeTemplate ID,
+     *     i.e. the last segment of the NotebookRuntimeTemplate's [resource name]
+     *     [google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate.name].
+     *   * `healthState` supports = and !=. healthState enum: [HEALTHY, UNHEALTHY,
+     *   HEALTH_STATE_UNSPECIFIED].
+     *   * `runtimeState` supports = and !=. runtimeState enum:
+     *   [RUNTIME_STATE_UNSPECIFIED, RUNNING, BEING_STARTED, BEING_STOPPED,
+     *   STOPPED, BEING_UPGRADED, ERROR, INVALID].
+     *   * `runtimeUser` supports = and !=.
+     *   * API version is UI only: `uiState` supports = and !=. uiState enum:
+     *   [UI_RESOURCE_STATE_UNSPECIFIED, UI_RESOURCE_STATE_BEING_CREATED,
+     *   UI_RESOURCE_STATE_ACTIVE, UI_RESOURCE_STATE_BEING_DELETED,
+     *   UI_RESOURCE_STATE_CREATION_FAILED].
+     *   * `notebookRuntimeType` supports = and !=. notebookRuntimeType enum:
+     *   [USER_DEFINED, ONE_CLICK].
+     *
+     * Some examples:
+     *
+     *   * `notebookRuntime="notebookRuntime123"`
+     *   * `displayName="myDisplayName"` and `displayName=~"myDisplayNameRegex"`
+     *   * `notebookRuntimeTemplate="notebookRuntimeTemplate321"`
+     *   * `healthState=HEALTHY`
+     *   * `runtimeState=RUNNING`
+     *   * `runtimeUser="test@google.com"`
+     *   * `uiState=UI_RESOURCE_STATE_BEING_DELETED`
+     *   * `notebookRuntimeType=USER_DEFINED`
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Optional. The standard list page size.
+     * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Optional. The standard list page size.
+     * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard list page size.
+     * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000004); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * Optional. The standard list page token.
+     * Typically obtained via
+     * [ListNotebookRuntimesResponse.next_page_token][google.cloud.aiplatform.v1beta1.ListNotebookRuntimesResponse.next_page_token]
+     * of the previous
+     * [NotebookService.ListNotebookRuntimes][google.cloud.aiplatform.v1beta1.NotebookService.ListNotebookRuntimes]
+     * call.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The standard list page token.
+     * Typically obtained via
+     * [ListNotebookRuntimesResponse.next_page_token][google.cloud.aiplatform.v1beta1.ListNotebookRuntimesResponse.next_page_token]
+     * of the previous
+     * [NotebookService.ListNotebookRuntimes][google.cloud.aiplatform.v1beta1.NotebookService.ListNotebookRuntimes]
+     * call.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The standard list page token.
+     * Typically obtained via
+     * [ListNotebookRuntimesResponse.next_page_token][google.cloud.aiplatform.v1beta1.ListNotebookRuntimesResponse.next_page_token]
+     * of the previous
+     * [NotebookService.ListNotebookRuntimes][google.cloud.aiplatform.v1beta1.NotebookService.ListNotebookRuntimes]
+     * call.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard list page token.
+     * Typically obtained via
+     * [ListNotebookRuntimesResponse.next_page_token][google.cloud.aiplatform.v1beta1.ListNotebookRuntimesResponse.next_page_token]
+     * of the previous
+     * [NotebookService.ListNotebookRuntimes][google.cloud.aiplatform.v1beta1.NotebookService.ListNotebookRuntimes]
+     * call.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard list page token.
+     * Typically obtained via
+     * [ListNotebookRuntimesResponse.next_page_token][google.cloud.aiplatform.v1beta1.ListNotebookRuntimesResponse.next_page_token]
+     * of the previous
+     * [NotebookService.ListNotebookRuntimes][google.cloud.aiplatform.v1beta1.NotebookService.ListNotebookRuntimes]
+     * call.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private com.google.protobuf.FieldMask readMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + readMaskBuilder_; + /** + * + * + *
+     * Optional. Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the readMask field is set. + */ + public boolean hasReadMask() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * Optional. Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The readMask. + */ + public com.google.protobuf.FieldMask getReadMask() { + if (readMaskBuilder_ == null) { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } else { + return readMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setReadMask(com.google.protobuf.FieldMask value) { + if (readMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + readMask_ = value; + } else { + readMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setReadMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (readMaskBuilder_ == null) { + readMask_ = builderForValue.build(); + } else { + readMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeReadMask(com.google.protobuf.FieldMask value) { + if (readMaskBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && readMask_ != null + && readMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getReadMaskBuilder().mergeFrom(value); + } else { + readMask_ = value; + } + } else { + readMaskBuilder_.mergeFrom(value); + } + if (readMask_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Optional. Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearReadMask() { + bitField0_ = (bitField0_ & ~0x00000010); + readMask_ = null; + if (readMaskBuilder_ != null) { + readMaskBuilder_.dispose(); + readMaskBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMask.Builder getReadMaskBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getReadMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder() { + if (readMaskBuilder_ != null) { + return readMaskBuilder_.getMessageOrBuilder(); + } else { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } + } + /** + * + * + *
+     * Optional. Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getReadMaskFieldBuilder() { + if (readMaskBuilder_ == null) { + readMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getReadMask(), getParentForChildren(), isClean()); + readMask_ = null; + } + return readMaskBuilder_; + } + + private java.lang.Object orderBy_ = ""; + /** + * + * + *
+     * Optional. A comma-separated list of fields to order by, sorted in ascending
+     * order. Use "desc" after a field name for descending. Supported fields:
+     *
+     *   * `display_name`
+     *   * `create_time`
+     *   * `update_time`
+     *
+     * Example: `display_name, create_time desc`.
+     * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. A comma-separated list of fields to order by, sorted in ascending
+     * order. Use "desc" after a field name for descending. Supported fields:
+     *
+     *   * `display_name`
+     *   * `create_time`
+     *   * `update_time`
+     *
+     * Example: `display_name, create_time desc`.
+     * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. A comma-separated list of fields to order by, sorted in ascending
+     * order. Use "desc" after a field name for descending. Supported fields:
+     *
+     *   * `display_name`
+     *   * `create_time`
+     *   * `update_time`
+     *
+     * Example: `display_name, create_time desc`.
+     * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + orderBy_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A comma-separated list of fields to order by, sorted in ascending
+     * order. Use "desc" after a field name for descending. Supported fields:
+     *
+     *   * `display_name`
+     *   * `create_time`
+     *   * `update_time`
+     *
+     * Example: `display_name, create_time desc`.
+     * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A comma-separated list of fields to order by, sorted in ascending
+     * order. Use "desc" after a field name for descending. Supported fields:
+     *
+     *   * `display_name`
+     *   * `create_time`
+     *   * `update_time`
+     *
+     * Example: `display_name, create_time desc`.
+     * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.ListNotebookRuntimesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.ListNotebookRuntimesRequest) + private static final com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesRequest(); + } + + public static com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListNotebookRuntimesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListNotebookRuntimesRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListNotebookRuntimesRequestOrBuilder.java new file mode 100644 index 000000000000..fa72f09f4648 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListNotebookRuntimesRequestOrBuilder.java @@ -0,0 +1,277 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/notebook_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +public interface ListNotebookRuntimesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.ListNotebookRuntimesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the Location from which to list the
+   * NotebookRuntimes.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The resource name of the Location from which to list the
+   * NotebookRuntimes.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. An expression for filtering the results of the request. For field
+   * names both snake_case and camelCase are supported.
+   *
+   *   * `notebookRuntime` supports = and !=. `notebookRuntime` represents the
+   *     NotebookRuntime ID,
+   *     i.e. the last segment of the NotebookRuntime's [resource name]
+   *     [google.cloud.aiplatform.v1beta1.NotebookRuntime.name].
+   *   * `displayName` supports = and != and regex.
+   *   * `notebookRuntimeTemplate` supports = and !=. `notebookRuntimeTemplate`
+   *     represents the NotebookRuntimeTemplate ID,
+   *     i.e. the last segment of the NotebookRuntimeTemplate's [resource name]
+   *     [google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate.name].
+   *   * `healthState` supports = and !=. healthState enum: [HEALTHY, UNHEALTHY,
+   *   HEALTH_STATE_UNSPECIFIED].
+   *   * `runtimeState` supports = and !=. runtimeState enum:
+   *   [RUNTIME_STATE_UNSPECIFIED, RUNNING, BEING_STARTED, BEING_STOPPED,
+   *   STOPPED, BEING_UPGRADED, ERROR, INVALID].
+   *   * `runtimeUser` supports = and !=.
+   *   * API version is UI only: `uiState` supports = and !=. uiState enum:
+   *   [UI_RESOURCE_STATE_UNSPECIFIED, UI_RESOURCE_STATE_BEING_CREATED,
+   *   UI_RESOURCE_STATE_ACTIVE, UI_RESOURCE_STATE_BEING_DELETED,
+   *   UI_RESOURCE_STATE_CREATION_FAILED].
+   *   * `notebookRuntimeType` supports = and !=. notebookRuntimeType enum:
+   *   [USER_DEFINED, ONE_CLICK].
+   *
+   * Some examples:
+   *
+   *   * `notebookRuntime="notebookRuntime123"`
+   *   * `displayName="myDisplayName"` and `displayName=~"myDisplayNameRegex"`
+   *   * `notebookRuntimeTemplate="notebookRuntimeTemplate321"`
+   *   * `healthState=HEALTHY`
+   *   * `runtimeState=RUNNING`
+   *   * `runtimeUser="test@google.com"`
+   *   * `uiState=UI_RESOURCE_STATE_BEING_DELETED`
+   *   * `notebookRuntimeType=USER_DEFINED`
+   * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Optional. An expression for filtering the results of the request. For field
+   * names both snake_case and camelCase are supported.
+   *
+   *   * `notebookRuntime` supports = and !=. `notebookRuntime` represents the
+   *     NotebookRuntime ID,
+   *     i.e. the last segment of the NotebookRuntime's [resource name]
+   *     [google.cloud.aiplatform.v1beta1.NotebookRuntime.name].
+   *   * `displayName` supports = and != and regex.
+   *   * `notebookRuntimeTemplate` supports = and !=. `notebookRuntimeTemplate`
+   *     represents the NotebookRuntimeTemplate ID,
+   *     i.e. the last segment of the NotebookRuntimeTemplate's [resource name]
+   *     [google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate.name].
+   *   * `healthState` supports = and !=. healthState enum: [HEALTHY, UNHEALTHY,
+   *   HEALTH_STATE_UNSPECIFIED].
+   *   * `runtimeState` supports = and !=. runtimeState enum:
+   *   [RUNTIME_STATE_UNSPECIFIED, RUNNING, BEING_STARTED, BEING_STOPPED,
+   *   STOPPED, BEING_UPGRADED, ERROR, INVALID].
+   *   * `runtimeUser` supports = and !=.
+   *   * API version is UI only: `uiState` supports = and !=. uiState enum:
+   *   [UI_RESOURCE_STATE_UNSPECIFIED, UI_RESOURCE_STATE_BEING_CREATED,
+   *   UI_RESOURCE_STATE_ACTIVE, UI_RESOURCE_STATE_BEING_DELETED,
+   *   UI_RESOURCE_STATE_CREATION_FAILED].
+   *   * `notebookRuntimeType` supports = and !=. notebookRuntimeType enum:
+   *   [USER_DEFINED, ONE_CLICK].
+   *
+   * Some examples:
+   *
+   *   * `notebookRuntime="notebookRuntime123"`
+   *   * `displayName="myDisplayName"` and `displayName=~"myDisplayNameRegex"`
+   *   * `notebookRuntimeTemplate="notebookRuntimeTemplate321"`
+   *   * `healthState=HEALTHY`
+   *   * `runtimeState=RUNNING`
+   *   * `runtimeUser="test@google.com"`
+   *   * `uiState=UI_RESOURCE_STATE_BEING_DELETED`
+   *   * `notebookRuntimeType=USER_DEFINED`
+   * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Optional. The standard list page size.
+   * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. The standard list page token.
+   * Typically obtained via
+   * [ListNotebookRuntimesResponse.next_page_token][google.cloud.aiplatform.v1beta1.ListNotebookRuntimesResponse.next_page_token]
+   * of the previous
+   * [NotebookService.ListNotebookRuntimes][google.cloud.aiplatform.v1beta1.NotebookService.ListNotebookRuntimes]
+   * call.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * Optional. The standard list page token.
+   * Typically obtained via
+   * [ListNotebookRuntimesResponse.next_page_token][google.cloud.aiplatform.v1beta1.ListNotebookRuntimesResponse.next_page_token]
+   * of the previous
+   * [NotebookService.ListNotebookRuntimes][google.cloud.aiplatform.v1beta1.NotebookService.ListNotebookRuntimes]
+   * call.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the readMask field is set. + */ + boolean hasReadMask(); + /** + * + * + *
+   * Optional. Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The readMask. + */ + com.google.protobuf.FieldMask getReadMask(); + /** + * + * + *
+   * Optional. Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder(); + + /** + * + * + *
+   * Optional. A comma-separated list of fields to order by, sorted in ascending
+   * order. Use "desc" after a field name for descending. Supported fields:
+   *
+   *   * `display_name`
+   *   * `create_time`
+   *   * `update_time`
+   *
+   * Example: `display_name, create_time desc`.
+   * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * Optional. A comma-separated list of fields to order by, sorted in ascending
+   * order. Use "desc" after a field name for descending. Supported fields:
+   *
+   *   * `display_name`
+   *   * `create_time`
+   *   * `update_time`
+   *
+   * Example: `display_name, create_time desc`.
+   * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListNotebookRuntimesResponse.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListNotebookRuntimesResponse.java new file mode 100644 index 000000000000..8ac7ed4cf2be --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListNotebookRuntimesResponse.java @@ -0,0 +1,1166 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/notebook_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Response message for
+ * [NotebookService.ListNotebookRuntimes][google.cloud.aiplatform.v1beta1.NotebookService.ListNotebookRuntimes].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.ListNotebookRuntimesResponse} + */ +public final class ListNotebookRuntimesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.ListNotebookRuntimesResponse) + ListNotebookRuntimesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListNotebookRuntimesResponse.newBuilder() to construct. + private ListNotebookRuntimesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListNotebookRuntimesResponse() { + notebookRuntimes_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListNotebookRuntimesResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListNotebookRuntimesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListNotebookRuntimesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesResponse.class, + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesResponse.Builder.class); + } + + public static final int NOTEBOOK_RUNTIMES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List notebookRuntimes_; + /** + * + * + *
+   * List of NotebookRuntimes in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NotebookRuntime notebook_runtimes = 1; + */ + @java.lang.Override + public java.util.List + getNotebookRuntimesList() { + return notebookRuntimes_; + } + /** + * + * + *
+   * List of NotebookRuntimes in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NotebookRuntime notebook_runtimes = 1; + */ + @java.lang.Override + public java.util.List + getNotebookRuntimesOrBuilderList() { + return notebookRuntimes_; + } + /** + * + * + *
+   * List of NotebookRuntimes in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NotebookRuntime notebook_runtimes = 1; + */ + @java.lang.Override + public int getNotebookRuntimesCount() { + return notebookRuntimes_.size(); + } + /** + * + * + *
+   * List of NotebookRuntimes in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NotebookRuntime notebook_runtimes = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NotebookRuntime getNotebookRuntimes(int index) { + return notebookRuntimes_.get(index); + } + /** + * + * + *
+   * List of NotebookRuntimes in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NotebookRuntime notebook_runtimes = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NotebookRuntimeOrBuilder getNotebookRuntimesOrBuilder( + int index) { + return notebookRuntimes_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * A token to retrieve next page of results.
+   * Pass to
+   * [ListNotebookRuntimesRequest.page_token][google.cloud.aiplatform.v1beta1.ListNotebookRuntimesRequest.page_token]
+   * to obtain that page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + 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(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token to retrieve next page of results.
+   * Pass to
+   * [ListNotebookRuntimesRequest.page_token][google.cloud.aiplatform.v1beta1.ListNotebookRuntimesRequest.page_token]
+   * to obtain that page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < notebookRuntimes_.size(); i++) { + output.writeMessage(1, notebookRuntimes_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < notebookRuntimes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, notebookRuntimes_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesResponse)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesResponse other = + (com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesResponse) obj; + + if (!getNotebookRuntimesList().equals(other.getNotebookRuntimesList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getNotebookRuntimesCount() > 0) { + hash = (37 * hash) + NOTEBOOK_RUNTIMES_FIELD_NUMBER; + hash = (53 * hash) + getNotebookRuntimesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for
+   * [NotebookService.ListNotebookRuntimes][google.cloud.aiplatform.v1beta1.NotebookService.ListNotebookRuntimes].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.ListNotebookRuntimesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.ListNotebookRuntimesResponse) + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListNotebookRuntimesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListNotebookRuntimesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesResponse.class, + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesResponse.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (notebookRuntimesBuilder_ == null) { + notebookRuntimes_ = java.util.Collections.emptyList(); + } else { + notebookRuntimes_ = null; + notebookRuntimesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListNotebookRuntimesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesResponse + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesResponse build() { + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesResponse buildPartial() { + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesResponse result = + new com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesResponse result) { + if (notebookRuntimesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + notebookRuntimes_ = java.util.Collections.unmodifiableList(notebookRuntimes_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.notebookRuntimes_ = notebookRuntimes_; + } else { + result.notebookRuntimes_ = notebookRuntimesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesResponse) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesResponse other) { + if (other + == com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesResponse.getDefaultInstance()) + return this; + if (notebookRuntimesBuilder_ == null) { + if (!other.notebookRuntimes_.isEmpty()) { + if (notebookRuntimes_.isEmpty()) { + notebookRuntimes_ = other.notebookRuntimes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureNotebookRuntimesIsMutable(); + notebookRuntimes_.addAll(other.notebookRuntimes_); + } + onChanged(); + } + } else { + if (!other.notebookRuntimes_.isEmpty()) { + if (notebookRuntimesBuilder_.isEmpty()) { + notebookRuntimesBuilder_.dispose(); + notebookRuntimesBuilder_ = null; + notebookRuntimes_ = other.notebookRuntimes_; + bitField0_ = (bitField0_ & ~0x00000001); + notebookRuntimesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getNotebookRuntimesFieldBuilder() + : null; + } else { + notebookRuntimesBuilder_.addAllMessages(other.notebookRuntimes_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.aiplatform.v1beta1.NotebookRuntime m = + input.readMessage( + com.google.cloud.aiplatform.v1beta1.NotebookRuntime.parser(), + extensionRegistry); + if (notebookRuntimesBuilder_ == null) { + ensureNotebookRuntimesIsMutable(); + notebookRuntimes_.add(m); + } else { + notebookRuntimesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List notebookRuntimes_ = + java.util.Collections.emptyList(); + + private void ensureNotebookRuntimesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + notebookRuntimes_ = + new java.util.ArrayList( + notebookRuntimes_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.NotebookRuntime, + com.google.cloud.aiplatform.v1beta1.NotebookRuntime.Builder, + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeOrBuilder> + notebookRuntimesBuilder_; + + /** + * + * + *
+     * List of NotebookRuntimes in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NotebookRuntime notebook_runtimes = 1; + */ + public java.util.List + getNotebookRuntimesList() { + if (notebookRuntimesBuilder_ == null) { + return java.util.Collections.unmodifiableList(notebookRuntimes_); + } else { + return notebookRuntimesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of NotebookRuntimes in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NotebookRuntime notebook_runtimes = 1; + */ + public int getNotebookRuntimesCount() { + if (notebookRuntimesBuilder_ == null) { + return notebookRuntimes_.size(); + } else { + return notebookRuntimesBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of NotebookRuntimes in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NotebookRuntime notebook_runtimes = 1; + */ + public com.google.cloud.aiplatform.v1beta1.NotebookRuntime getNotebookRuntimes(int index) { + if (notebookRuntimesBuilder_ == null) { + return notebookRuntimes_.get(index); + } else { + return notebookRuntimesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of NotebookRuntimes in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NotebookRuntime notebook_runtimes = 1; + */ + public Builder setNotebookRuntimes( + int index, com.google.cloud.aiplatform.v1beta1.NotebookRuntime value) { + if (notebookRuntimesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNotebookRuntimesIsMutable(); + notebookRuntimes_.set(index, value); + onChanged(); + } else { + notebookRuntimesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of NotebookRuntimes in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NotebookRuntime notebook_runtimes = 1; + */ + public Builder setNotebookRuntimes( + int index, com.google.cloud.aiplatform.v1beta1.NotebookRuntime.Builder builderForValue) { + if (notebookRuntimesBuilder_ == null) { + ensureNotebookRuntimesIsMutable(); + notebookRuntimes_.set(index, builderForValue.build()); + onChanged(); + } else { + notebookRuntimesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of NotebookRuntimes in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NotebookRuntime notebook_runtimes = 1; + */ + public Builder addNotebookRuntimes(com.google.cloud.aiplatform.v1beta1.NotebookRuntime value) { + if (notebookRuntimesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNotebookRuntimesIsMutable(); + notebookRuntimes_.add(value); + onChanged(); + } else { + notebookRuntimesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of NotebookRuntimes in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NotebookRuntime notebook_runtimes = 1; + */ + public Builder addNotebookRuntimes( + int index, com.google.cloud.aiplatform.v1beta1.NotebookRuntime value) { + if (notebookRuntimesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNotebookRuntimesIsMutable(); + notebookRuntimes_.add(index, value); + onChanged(); + } else { + notebookRuntimesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of NotebookRuntimes in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NotebookRuntime notebook_runtimes = 1; + */ + public Builder addNotebookRuntimes( + com.google.cloud.aiplatform.v1beta1.NotebookRuntime.Builder builderForValue) { + if (notebookRuntimesBuilder_ == null) { + ensureNotebookRuntimesIsMutable(); + notebookRuntimes_.add(builderForValue.build()); + onChanged(); + } else { + notebookRuntimesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of NotebookRuntimes in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NotebookRuntime notebook_runtimes = 1; + */ + public Builder addNotebookRuntimes( + int index, com.google.cloud.aiplatform.v1beta1.NotebookRuntime.Builder builderForValue) { + if (notebookRuntimesBuilder_ == null) { + ensureNotebookRuntimesIsMutable(); + notebookRuntimes_.add(index, builderForValue.build()); + onChanged(); + } else { + notebookRuntimesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of NotebookRuntimes in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NotebookRuntime notebook_runtimes = 1; + */ + public Builder addAllNotebookRuntimes( + java.lang.Iterable values) { + if (notebookRuntimesBuilder_ == null) { + ensureNotebookRuntimesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, notebookRuntimes_); + onChanged(); + } else { + notebookRuntimesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of NotebookRuntimes in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NotebookRuntime notebook_runtimes = 1; + */ + public Builder clearNotebookRuntimes() { + if (notebookRuntimesBuilder_ == null) { + notebookRuntimes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + notebookRuntimesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of NotebookRuntimes in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NotebookRuntime notebook_runtimes = 1; + */ + public Builder removeNotebookRuntimes(int index) { + if (notebookRuntimesBuilder_ == null) { + ensureNotebookRuntimesIsMutable(); + notebookRuntimes_.remove(index); + onChanged(); + } else { + notebookRuntimesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of NotebookRuntimes in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NotebookRuntime notebook_runtimes = 1; + */ + public com.google.cloud.aiplatform.v1beta1.NotebookRuntime.Builder getNotebookRuntimesBuilder( + int index) { + return getNotebookRuntimesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of NotebookRuntimes in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NotebookRuntime notebook_runtimes = 1; + */ + public com.google.cloud.aiplatform.v1beta1.NotebookRuntimeOrBuilder + getNotebookRuntimesOrBuilder(int index) { + if (notebookRuntimesBuilder_ == null) { + return notebookRuntimes_.get(index); + } else { + return notebookRuntimesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of NotebookRuntimes in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NotebookRuntime notebook_runtimes = 1; + */ + public java.util.List + getNotebookRuntimesOrBuilderList() { + if (notebookRuntimesBuilder_ != null) { + return notebookRuntimesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(notebookRuntimes_); + } + } + /** + * + * + *
+     * List of NotebookRuntimes in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NotebookRuntime notebook_runtimes = 1; + */ + public com.google.cloud.aiplatform.v1beta1.NotebookRuntime.Builder + addNotebookRuntimesBuilder() { + return getNotebookRuntimesFieldBuilder() + .addBuilder(com.google.cloud.aiplatform.v1beta1.NotebookRuntime.getDefaultInstance()); + } + /** + * + * + *
+     * List of NotebookRuntimes in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NotebookRuntime notebook_runtimes = 1; + */ + public com.google.cloud.aiplatform.v1beta1.NotebookRuntime.Builder addNotebookRuntimesBuilder( + int index) { + return getNotebookRuntimesFieldBuilder() + .addBuilder( + index, com.google.cloud.aiplatform.v1beta1.NotebookRuntime.getDefaultInstance()); + } + /** + * + * + *
+     * List of NotebookRuntimes in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NotebookRuntime notebook_runtimes = 1; + */ + public java.util.List + getNotebookRuntimesBuilderList() { + return getNotebookRuntimesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.NotebookRuntime, + com.google.cloud.aiplatform.v1beta1.NotebookRuntime.Builder, + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeOrBuilder> + getNotebookRuntimesFieldBuilder() { + if (notebookRuntimesBuilder_ == null) { + notebookRuntimesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.NotebookRuntime, + com.google.cloud.aiplatform.v1beta1.NotebookRuntime.Builder, + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeOrBuilder>( + notebookRuntimes_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + notebookRuntimes_ = null; + } + return notebookRuntimesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token to retrieve next page of results.
+     * Pass to
+     * [ListNotebookRuntimesRequest.page_token][google.cloud.aiplatform.v1beta1.ListNotebookRuntimesRequest.page_token]
+     * to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token to retrieve next page of results.
+     * Pass to
+     * [ListNotebookRuntimesRequest.page_token][google.cloud.aiplatform.v1beta1.ListNotebookRuntimesRequest.page_token]
+     * to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token to retrieve next page of results.
+     * Pass to
+     * [ListNotebookRuntimesRequest.page_token][google.cloud.aiplatform.v1beta1.ListNotebookRuntimesRequest.page_token]
+     * to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * A token to retrieve next page of results.
+     * Pass to
+     * [ListNotebookRuntimesRequest.page_token][google.cloud.aiplatform.v1beta1.ListNotebookRuntimesRequest.page_token]
+     * to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A token to retrieve next page of results.
+     * Pass to
+     * [ListNotebookRuntimesRequest.page_token][google.cloud.aiplatform.v1beta1.ListNotebookRuntimesRequest.page_token]
+     * to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.ListNotebookRuntimesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.ListNotebookRuntimesResponse) + private static final com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesResponse(); + } + + public static com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListNotebookRuntimesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListNotebookRuntimesResponseOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListNotebookRuntimesResponseOrBuilder.java new file mode 100644 index 000000000000..1604e16f0c56 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListNotebookRuntimesResponseOrBuilder.java @@ -0,0 +1,110 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/notebook_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +public interface ListNotebookRuntimesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.ListNotebookRuntimesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * List of NotebookRuntimes in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NotebookRuntime notebook_runtimes = 1; + */ + java.util.List getNotebookRuntimesList(); + /** + * + * + *
+   * List of NotebookRuntimes in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NotebookRuntime notebook_runtimes = 1; + */ + com.google.cloud.aiplatform.v1beta1.NotebookRuntime getNotebookRuntimes(int index); + /** + * + * + *
+   * List of NotebookRuntimes in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NotebookRuntime notebook_runtimes = 1; + */ + int getNotebookRuntimesCount(); + /** + * + * + *
+   * List of NotebookRuntimes in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NotebookRuntime notebook_runtimes = 1; + */ + java.util.List + getNotebookRuntimesOrBuilderList(); + /** + * + * + *
+   * List of NotebookRuntimes in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NotebookRuntime notebook_runtimes = 1; + */ + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeOrBuilder getNotebookRuntimesOrBuilder( + int index); + + /** + * + * + *
+   * A token to retrieve next page of results.
+   * Pass to
+   * [ListNotebookRuntimesRequest.page_token][google.cloud.aiplatform.v1beta1.ListNotebookRuntimesRequest.page_token]
+   * to obtain that page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token to retrieve next page of results.
+   * Pass to
+   * [ListNotebookRuntimesRequest.page_token][google.cloud.aiplatform.v1beta1.ListNotebookRuntimesRequest.page_token]
+   * to obtain that page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListRagCorporaRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListRagCorporaRequest.java new file mode 100644 index 000000000000..936aa727abaf --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListRagCorporaRequest.java @@ -0,0 +1,959 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/vertex_rag_data_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Request message for
+ * [VertexRagDataService.ListRagCorpora][google.cloud.aiplatform.v1beta1.VertexRagDataService.ListRagCorpora].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.ListRagCorporaRequest} + */ +public final class ListRagCorporaRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.ListRagCorporaRequest) + ListRagCorporaRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListRagCorporaRequest.newBuilder() to construct. + private ListRagCorporaRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListRagCorporaRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListRagCorporaRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListRagCorporaRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListRagCorporaRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.ListRagCorporaRequest.class, + com.google.cloud.aiplatform.v1beta1.ListRagCorporaRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The resource name of the Location from which to list the
+   * RagCorpora. Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the Location from which to list the
+   * RagCorpora. Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + * + * + *
+   * Optional. The standard list page size.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * Optional. The standard list page token.
+   * Typically obtained via
+   * [ListRagCorporaResponse.next_page_token][google.cloud.aiplatform.v1beta1.ListRagCorporaResponse.next_page_token]
+   * of the previous
+   * [VertexRagDataService.ListRagCorpora][google.cloud.aiplatform.v1beta1.VertexRagDataService.ListRagCorpora]
+   * call.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + 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(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The standard list page token.
+   * Typically obtained via
+   * [ListRagCorporaResponse.next_page_token][google.cloud.aiplatform.v1beta1.ListRagCorporaResponse.next_page_token]
+   * of the previous
+   * [VertexRagDataService.ListRagCorpora][google.cloud.aiplatform.v1beta1.VertexRagDataService.ListRagCorpora]
+   * call.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.ListRagCorporaRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.ListRagCorporaRequest other = + (com.google.cloud.aiplatform.v1beta1.ListRagCorporaRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.ListRagCorporaRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.ListRagCorporaRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ListRagCorporaRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.ListRagCorporaRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ListRagCorporaRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.ListRagCorporaRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ListRagCorporaRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.ListRagCorporaRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ListRagCorporaRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.ListRagCorporaRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ListRagCorporaRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.ListRagCorporaRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.ListRagCorporaRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for
+   * [VertexRagDataService.ListRagCorpora][google.cloud.aiplatform.v1beta1.VertexRagDataService.ListRagCorpora].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.ListRagCorporaRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.ListRagCorporaRequest) + com.google.cloud.aiplatform.v1beta1.ListRagCorporaRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListRagCorporaRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListRagCorporaRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.ListRagCorporaRequest.class, + com.google.cloud.aiplatform.v1beta1.ListRagCorporaRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.ListRagCorporaRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListRagCorporaRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ListRagCorporaRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.ListRagCorporaRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ListRagCorporaRequest build() { + com.google.cloud.aiplatform.v1beta1.ListRagCorporaRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ListRagCorporaRequest buildPartial() { + com.google.cloud.aiplatform.v1beta1.ListRagCorporaRequest result = + new com.google.cloud.aiplatform.v1beta1.ListRagCorporaRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1beta1.ListRagCorporaRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1beta1.ListRagCorporaRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.ListRagCorporaRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.ListRagCorporaRequest other) { + if (other == com.google.cloud.aiplatform.v1beta1.ListRagCorporaRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of the Location from which to list the
+     * RagCorpora. Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Location from which to list the
+     * RagCorpora. Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Location from which to list the
+     * RagCorpora. Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Location from which to list the
+     * RagCorpora. Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Location from which to list the
+     * RagCorpora. Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Optional. The standard list page size.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Optional. The standard list page size.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard list page size.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * Optional. The standard list page token.
+     * Typically obtained via
+     * [ListRagCorporaResponse.next_page_token][google.cloud.aiplatform.v1beta1.ListRagCorporaResponse.next_page_token]
+     * of the previous
+     * [VertexRagDataService.ListRagCorpora][google.cloud.aiplatform.v1beta1.VertexRagDataService.ListRagCorpora]
+     * call.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The standard list page token.
+     * Typically obtained via
+     * [ListRagCorporaResponse.next_page_token][google.cloud.aiplatform.v1beta1.ListRagCorporaResponse.next_page_token]
+     * of the previous
+     * [VertexRagDataService.ListRagCorpora][google.cloud.aiplatform.v1beta1.VertexRagDataService.ListRagCorpora]
+     * call.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The standard list page token.
+     * Typically obtained via
+     * [ListRagCorporaResponse.next_page_token][google.cloud.aiplatform.v1beta1.ListRagCorporaResponse.next_page_token]
+     * of the previous
+     * [VertexRagDataService.ListRagCorpora][google.cloud.aiplatform.v1beta1.VertexRagDataService.ListRagCorpora]
+     * call.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard list page token.
+     * Typically obtained via
+     * [ListRagCorporaResponse.next_page_token][google.cloud.aiplatform.v1beta1.ListRagCorporaResponse.next_page_token]
+     * of the previous
+     * [VertexRagDataService.ListRagCorpora][google.cloud.aiplatform.v1beta1.VertexRagDataService.ListRagCorpora]
+     * call.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard list page token.
+     * Typically obtained via
+     * [ListRagCorporaResponse.next_page_token][google.cloud.aiplatform.v1beta1.ListRagCorporaResponse.next_page_token]
+     * of the previous
+     * [VertexRagDataService.ListRagCorpora][google.cloud.aiplatform.v1beta1.VertexRagDataService.ListRagCorpora]
+     * call.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.ListRagCorporaRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.ListRagCorporaRequest) + private static final com.google.cloud.aiplatform.v1beta1.ListRagCorporaRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.ListRagCorporaRequest(); + } + + public static com.google.cloud.aiplatform.v1beta1.ListRagCorporaRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListRagCorporaRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ListRagCorporaRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListRagCorporaRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListRagCorporaRequestOrBuilder.java new file mode 100644 index 000000000000..6d9828464f3d --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListRagCorporaRequestOrBuilder.java @@ -0,0 +1,105 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/vertex_rag_data_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +public interface ListRagCorporaRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.ListRagCorporaRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the Location from which to list the
+   * RagCorpora. Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The resource name of the Location from which to list the
+   * RagCorpora. Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. The standard list page size.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. The standard list page token.
+   * Typically obtained via
+   * [ListRagCorporaResponse.next_page_token][google.cloud.aiplatform.v1beta1.ListRagCorporaResponse.next_page_token]
+   * of the previous
+   * [VertexRagDataService.ListRagCorpora][google.cloud.aiplatform.v1beta1.VertexRagDataService.ListRagCorpora]
+   * call.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * Optional. The standard list page token.
+   * Typically obtained via
+   * [ListRagCorporaResponse.next_page_token][google.cloud.aiplatform.v1beta1.ListRagCorporaResponse.next_page_token]
+   * of the previous
+   * [VertexRagDataService.ListRagCorpora][google.cloud.aiplatform.v1beta1.VertexRagDataService.ListRagCorpora]
+   * call.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListRagCorporaResponse.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListRagCorporaResponse.java new file mode 100644 index 000000000000..560fe994336f --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListRagCorporaResponse.java @@ -0,0 +1,1145 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/vertex_rag_data_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Response message for
+ * [VertexRagDataService.ListRagCorpora][google.cloud.aiplatform.v1beta1.VertexRagDataService.ListRagCorpora].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.ListRagCorporaResponse} + */ +public final class ListRagCorporaResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.ListRagCorporaResponse) + ListRagCorporaResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListRagCorporaResponse.newBuilder() to construct. + private ListRagCorporaResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListRagCorporaResponse() { + ragCorpora_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListRagCorporaResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListRagCorporaResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListRagCorporaResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.ListRagCorporaResponse.class, + com.google.cloud.aiplatform.v1beta1.ListRagCorporaResponse.Builder.class); + } + + public static final int RAG_CORPORA_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List ragCorpora_; + /** + * + * + *
+   * List of RagCorpora in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagCorpus rag_corpora = 1; + */ + @java.lang.Override + public java.util.List getRagCorporaList() { + return ragCorpora_; + } + /** + * + * + *
+   * List of RagCorpora in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagCorpus rag_corpora = 1; + */ + @java.lang.Override + public java.util.List + getRagCorporaOrBuilderList() { + return ragCorpora_; + } + /** + * + * + *
+   * List of RagCorpora in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagCorpus rag_corpora = 1; + */ + @java.lang.Override + public int getRagCorporaCount() { + return ragCorpora_.size(); + } + /** + * + * + *
+   * List of RagCorpora in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagCorpus rag_corpora = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.RagCorpus getRagCorpora(int index) { + return ragCorpora_.get(index); + } + /** + * + * + *
+   * List of RagCorpora in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagCorpus rag_corpora = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.RagCorpusOrBuilder getRagCorporaOrBuilder(int index) { + return ragCorpora_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * Pass to
+   * [ListRagCorporaRequest.page_token][google.cloud.aiplatform.v1beta1.ListRagCorporaRequest.page_token]
+   * to obtain that page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + 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(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * Pass to
+   * [ListRagCorporaRequest.page_token][google.cloud.aiplatform.v1beta1.ListRagCorporaRequest.page_token]
+   * to obtain that page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < ragCorpora_.size(); i++) { + output.writeMessage(1, ragCorpora_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < ragCorpora_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, ragCorpora_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.ListRagCorporaResponse)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.ListRagCorporaResponse other = + (com.google.cloud.aiplatform.v1beta1.ListRagCorporaResponse) obj; + + if (!getRagCorporaList().equals(other.getRagCorporaList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getRagCorporaCount() > 0) { + hash = (37 * hash) + RAG_CORPORA_FIELD_NUMBER; + hash = (53 * hash) + getRagCorporaList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.ListRagCorporaResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.ListRagCorporaResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ListRagCorporaResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.ListRagCorporaResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ListRagCorporaResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.ListRagCorporaResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ListRagCorporaResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.ListRagCorporaResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ListRagCorporaResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.ListRagCorporaResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ListRagCorporaResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.ListRagCorporaResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.ListRagCorporaResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for
+   * [VertexRagDataService.ListRagCorpora][google.cloud.aiplatform.v1beta1.VertexRagDataService.ListRagCorpora].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.ListRagCorporaResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.ListRagCorporaResponse) + com.google.cloud.aiplatform.v1beta1.ListRagCorporaResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListRagCorporaResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListRagCorporaResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.ListRagCorporaResponse.class, + com.google.cloud.aiplatform.v1beta1.ListRagCorporaResponse.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.ListRagCorporaResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (ragCorporaBuilder_ == null) { + ragCorpora_ = java.util.Collections.emptyList(); + } else { + ragCorpora_ = null; + ragCorporaBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListRagCorporaResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ListRagCorporaResponse getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.ListRagCorporaResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ListRagCorporaResponse build() { + com.google.cloud.aiplatform.v1beta1.ListRagCorporaResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ListRagCorporaResponse buildPartial() { + com.google.cloud.aiplatform.v1beta1.ListRagCorporaResponse result = + new com.google.cloud.aiplatform.v1beta1.ListRagCorporaResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.aiplatform.v1beta1.ListRagCorporaResponse result) { + if (ragCorporaBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + ragCorpora_ = java.util.Collections.unmodifiableList(ragCorpora_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.ragCorpora_ = ragCorpora_; + } else { + result.ragCorpora_ = ragCorporaBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.aiplatform.v1beta1.ListRagCorporaResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1beta1.ListRagCorporaResponse) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.ListRagCorporaResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.ListRagCorporaResponse other) { + if (other == com.google.cloud.aiplatform.v1beta1.ListRagCorporaResponse.getDefaultInstance()) + return this; + if (ragCorporaBuilder_ == null) { + if (!other.ragCorpora_.isEmpty()) { + if (ragCorpora_.isEmpty()) { + ragCorpora_ = other.ragCorpora_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRagCorporaIsMutable(); + ragCorpora_.addAll(other.ragCorpora_); + } + onChanged(); + } + } else { + if (!other.ragCorpora_.isEmpty()) { + if (ragCorporaBuilder_.isEmpty()) { + ragCorporaBuilder_.dispose(); + ragCorporaBuilder_ = null; + ragCorpora_ = other.ragCorpora_; + bitField0_ = (bitField0_ & ~0x00000001); + ragCorporaBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getRagCorporaFieldBuilder() + : null; + } else { + ragCorporaBuilder_.addAllMessages(other.ragCorpora_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.aiplatform.v1beta1.RagCorpus m = + input.readMessage( + com.google.cloud.aiplatform.v1beta1.RagCorpus.parser(), extensionRegistry); + if (ragCorporaBuilder_ == null) { + ensureRagCorporaIsMutable(); + ragCorpora_.add(m); + } else { + ragCorporaBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List ragCorpora_ = + java.util.Collections.emptyList(); + + private void ensureRagCorporaIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + ragCorpora_ = + new java.util.ArrayList(ragCorpora_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.RagCorpus, + com.google.cloud.aiplatform.v1beta1.RagCorpus.Builder, + com.google.cloud.aiplatform.v1beta1.RagCorpusOrBuilder> + ragCorporaBuilder_; + + /** + * + * + *
+     * List of RagCorpora in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagCorpus rag_corpora = 1; + */ + public java.util.List getRagCorporaList() { + if (ragCorporaBuilder_ == null) { + return java.util.Collections.unmodifiableList(ragCorpora_); + } else { + return ragCorporaBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of RagCorpora in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagCorpus rag_corpora = 1; + */ + public int getRagCorporaCount() { + if (ragCorporaBuilder_ == null) { + return ragCorpora_.size(); + } else { + return ragCorporaBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of RagCorpora in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagCorpus rag_corpora = 1; + */ + public com.google.cloud.aiplatform.v1beta1.RagCorpus getRagCorpora(int index) { + if (ragCorporaBuilder_ == null) { + return ragCorpora_.get(index); + } else { + return ragCorporaBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of RagCorpora in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagCorpus rag_corpora = 1; + */ + public Builder setRagCorpora(int index, com.google.cloud.aiplatform.v1beta1.RagCorpus value) { + if (ragCorporaBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRagCorporaIsMutable(); + ragCorpora_.set(index, value); + onChanged(); + } else { + ragCorporaBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of RagCorpora in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagCorpus rag_corpora = 1; + */ + public Builder setRagCorpora( + int index, com.google.cloud.aiplatform.v1beta1.RagCorpus.Builder builderForValue) { + if (ragCorporaBuilder_ == null) { + ensureRagCorporaIsMutable(); + ragCorpora_.set(index, builderForValue.build()); + onChanged(); + } else { + ragCorporaBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of RagCorpora in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagCorpus rag_corpora = 1; + */ + public Builder addRagCorpora(com.google.cloud.aiplatform.v1beta1.RagCorpus value) { + if (ragCorporaBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRagCorporaIsMutable(); + ragCorpora_.add(value); + onChanged(); + } else { + ragCorporaBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of RagCorpora in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagCorpus rag_corpora = 1; + */ + public Builder addRagCorpora(int index, com.google.cloud.aiplatform.v1beta1.RagCorpus value) { + if (ragCorporaBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRagCorporaIsMutable(); + ragCorpora_.add(index, value); + onChanged(); + } else { + ragCorporaBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of RagCorpora in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagCorpus rag_corpora = 1; + */ + public Builder addRagCorpora( + com.google.cloud.aiplatform.v1beta1.RagCorpus.Builder builderForValue) { + if (ragCorporaBuilder_ == null) { + ensureRagCorporaIsMutable(); + ragCorpora_.add(builderForValue.build()); + onChanged(); + } else { + ragCorporaBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of RagCorpora in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagCorpus rag_corpora = 1; + */ + public Builder addRagCorpora( + int index, com.google.cloud.aiplatform.v1beta1.RagCorpus.Builder builderForValue) { + if (ragCorporaBuilder_ == null) { + ensureRagCorporaIsMutable(); + ragCorpora_.add(index, builderForValue.build()); + onChanged(); + } else { + ragCorporaBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of RagCorpora in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagCorpus rag_corpora = 1; + */ + public Builder addAllRagCorpora( + java.lang.Iterable values) { + if (ragCorporaBuilder_ == null) { + ensureRagCorporaIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, ragCorpora_); + onChanged(); + } else { + ragCorporaBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of RagCorpora in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagCorpus rag_corpora = 1; + */ + public Builder clearRagCorpora() { + if (ragCorporaBuilder_ == null) { + ragCorpora_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + ragCorporaBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of RagCorpora in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagCorpus rag_corpora = 1; + */ + public Builder removeRagCorpora(int index) { + if (ragCorporaBuilder_ == null) { + ensureRagCorporaIsMutable(); + ragCorpora_.remove(index); + onChanged(); + } else { + ragCorporaBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of RagCorpora in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagCorpus rag_corpora = 1; + */ + public com.google.cloud.aiplatform.v1beta1.RagCorpus.Builder getRagCorporaBuilder(int index) { + return getRagCorporaFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of RagCorpora in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagCorpus rag_corpora = 1; + */ + public com.google.cloud.aiplatform.v1beta1.RagCorpusOrBuilder getRagCorporaOrBuilder( + int index) { + if (ragCorporaBuilder_ == null) { + return ragCorpora_.get(index); + } else { + return ragCorporaBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of RagCorpora in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagCorpus rag_corpora = 1; + */ + public java.util.List + getRagCorporaOrBuilderList() { + if (ragCorporaBuilder_ != null) { + return ragCorporaBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(ragCorpora_); + } + } + /** + * + * + *
+     * List of RagCorpora in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagCorpus rag_corpora = 1; + */ + public com.google.cloud.aiplatform.v1beta1.RagCorpus.Builder addRagCorporaBuilder() { + return getRagCorporaFieldBuilder() + .addBuilder(com.google.cloud.aiplatform.v1beta1.RagCorpus.getDefaultInstance()); + } + /** + * + * + *
+     * List of RagCorpora in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagCorpus rag_corpora = 1; + */ + public com.google.cloud.aiplatform.v1beta1.RagCorpus.Builder addRagCorporaBuilder(int index) { + return getRagCorporaFieldBuilder() + .addBuilder(index, com.google.cloud.aiplatform.v1beta1.RagCorpus.getDefaultInstance()); + } + /** + * + * + *
+     * List of RagCorpora in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagCorpus rag_corpora = 1; + */ + public java.util.List + getRagCorporaBuilderList() { + return getRagCorporaFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.RagCorpus, + com.google.cloud.aiplatform.v1beta1.RagCorpus.Builder, + com.google.cloud.aiplatform.v1beta1.RagCorpusOrBuilder> + getRagCorporaFieldBuilder() { + if (ragCorporaBuilder_ == null) { + ragCorporaBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.RagCorpus, + com.google.cloud.aiplatform.v1beta1.RagCorpus.Builder, + com.google.cloud.aiplatform.v1beta1.RagCorpusOrBuilder>( + ragCorpora_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + ragCorpora_ = null; + } + return ragCorporaBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to
+     * [ListRagCorporaRequest.page_token][google.cloud.aiplatform.v1beta1.ListRagCorporaRequest.page_token]
+     * to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to
+     * [ListRagCorporaRequest.page_token][google.cloud.aiplatform.v1beta1.ListRagCorporaRequest.page_token]
+     * to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to
+     * [ListRagCorporaRequest.page_token][google.cloud.aiplatform.v1beta1.ListRagCorporaRequest.page_token]
+     * to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to
+     * [ListRagCorporaRequest.page_token][google.cloud.aiplatform.v1beta1.ListRagCorporaRequest.page_token]
+     * to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to
+     * [ListRagCorporaRequest.page_token][google.cloud.aiplatform.v1beta1.ListRagCorporaRequest.page_token]
+     * to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.ListRagCorporaResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.ListRagCorporaResponse) + private static final com.google.cloud.aiplatform.v1beta1.ListRagCorporaResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.ListRagCorporaResponse(); + } + + public static com.google.cloud.aiplatform.v1beta1.ListRagCorporaResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListRagCorporaResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ListRagCorporaResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListRagCorporaResponseOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListRagCorporaResponseOrBuilder.java new file mode 100644 index 000000000000..596dc67a1b75 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListRagCorporaResponseOrBuilder.java @@ -0,0 +1,109 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/vertex_rag_data_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +public interface ListRagCorporaResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.ListRagCorporaResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * List of RagCorpora in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagCorpus rag_corpora = 1; + */ + java.util.List getRagCorporaList(); + /** + * + * + *
+   * List of RagCorpora in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagCorpus rag_corpora = 1; + */ + com.google.cloud.aiplatform.v1beta1.RagCorpus getRagCorpora(int index); + /** + * + * + *
+   * List of RagCorpora in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagCorpus rag_corpora = 1; + */ + int getRagCorporaCount(); + /** + * + * + *
+   * List of RagCorpora in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagCorpus rag_corpora = 1; + */ + java.util.List + getRagCorporaOrBuilderList(); + /** + * + * + *
+   * List of RagCorpora in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagCorpus rag_corpora = 1; + */ + com.google.cloud.aiplatform.v1beta1.RagCorpusOrBuilder getRagCorporaOrBuilder(int index); + + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * Pass to
+   * [ListRagCorporaRequest.page_token][google.cloud.aiplatform.v1beta1.ListRagCorporaRequest.page_token]
+   * to obtain that page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * Pass to
+   * [ListRagCorporaRequest.page_token][google.cloud.aiplatform.v1beta1.ListRagCorporaRequest.page_token]
+   * to obtain that page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListRagFilesRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListRagFilesRequest.java new file mode 100644 index 000000000000..7898e3c3f44b --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListRagFilesRequest.java @@ -0,0 +1,966 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/vertex_rag_data_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Request message for
+ * [VertexRagDataService.ListRagFiles][google.cloud.aiplatform.v1beta1.VertexRagDataService.ListRagFiles].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.ListRagFilesRequest} + */ +public final class ListRagFilesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.ListRagFilesRequest) + ListRagFilesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListRagFilesRequest.newBuilder() to construct. + private ListRagFilesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListRagFilesRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListRagFilesRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListRagFilesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListRagFilesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.ListRagFilesRequest.class, + com.google.cloud.aiplatform.v1beta1.ListRagFilesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The resource name of the RagCorpus from which to list the
+   * RagFiles. Format:
+   * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the RagCorpus from which to list the
+   * RagFiles. Format:
+   * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + * + * + *
+   * Optional. The standard list page size.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * Optional. The standard list page token.
+   * Typically obtained via
+   * [ListRagFilesResponse.next_page_token][google.cloud.aiplatform.v1beta1.ListRagFilesResponse.next_page_token]
+   * of the previous
+   * [VertexRagDataService.ListRagFiles][google.cloud.aiplatform.v1beta1.VertexRagDataService.ListRagFiles]
+   * call.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + 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(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The standard list page token.
+   * Typically obtained via
+   * [ListRagFilesResponse.next_page_token][google.cloud.aiplatform.v1beta1.ListRagFilesResponse.next_page_token]
+   * of the previous
+   * [VertexRagDataService.ListRagFiles][google.cloud.aiplatform.v1beta1.VertexRagDataService.ListRagFiles]
+   * call.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.ListRagFilesRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.ListRagFilesRequest other = + (com.google.cloud.aiplatform.v1beta1.ListRagFilesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.ListRagFilesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.ListRagFilesRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ListRagFilesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.ListRagFilesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ListRagFilesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.ListRagFilesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ListRagFilesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.ListRagFilesRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ListRagFilesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.ListRagFilesRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ListRagFilesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.ListRagFilesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.ListRagFilesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for
+   * [VertexRagDataService.ListRagFiles][google.cloud.aiplatform.v1beta1.VertexRagDataService.ListRagFiles].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.ListRagFilesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.ListRagFilesRequest) + com.google.cloud.aiplatform.v1beta1.ListRagFilesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListRagFilesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListRagFilesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.ListRagFilesRequest.class, + com.google.cloud.aiplatform.v1beta1.ListRagFilesRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.ListRagFilesRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListRagFilesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ListRagFilesRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.ListRagFilesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ListRagFilesRequest build() { + com.google.cloud.aiplatform.v1beta1.ListRagFilesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ListRagFilesRequest buildPartial() { + com.google.cloud.aiplatform.v1beta1.ListRagFilesRequest result = + new com.google.cloud.aiplatform.v1beta1.ListRagFilesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1beta1.ListRagFilesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1beta1.ListRagFilesRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.ListRagFilesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.ListRagFilesRequest other) { + if (other == com.google.cloud.aiplatform.v1beta1.ListRagFilesRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of the RagCorpus from which to list the
+     * RagFiles. Format:
+     * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the RagCorpus from which to list the
+     * RagFiles. Format:
+     * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the RagCorpus from which to list the
+     * RagFiles. Format:
+     * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the RagCorpus from which to list the
+     * RagFiles. Format:
+     * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the RagCorpus from which to list the
+     * RagFiles. Format:
+     * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Optional. The standard list page size.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Optional. The standard list page size.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard list page size.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * Optional. The standard list page token.
+     * Typically obtained via
+     * [ListRagFilesResponse.next_page_token][google.cloud.aiplatform.v1beta1.ListRagFilesResponse.next_page_token]
+     * of the previous
+     * [VertexRagDataService.ListRagFiles][google.cloud.aiplatform.v1beta1.VertexRagDataService.ListRagFiles]
+     * call.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The standard list page token.
+     * Typically obtained via
+     * [ListRagFilesResponse.next_page_token][google.cloud.aiplatform.v1beta1.ListRagFilesResponse.next_page_token]
+     * of the previous
+     * [VertexRagDataService.ListRagFiles][google.cloud.aiplatform.v1beta1.VertexRagDataService.ListRagFiles]
+     * call.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The standard list page token.
+     * Typically obtained via
+     * [ListRagFilesResponse.next_page_token][google.cloud.aiplatform.v1beta1.ListRagFilesResponse.next_page_token]
+     * of the previous
+     * [VertexRagDataService.ListRagFiles][google.cloud.aiplatform.v1beta1.VertexRagDataService.ListRagFiles]
+     * call.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard list page token.
+     * Typically obtained via
+     * [ListRagFilesResponse.next_page_token][google.cloud.aiplatform.v1beta1.ListRagFilesResponse.next_page_token]
+     * of the previous
+     * [VertexRagDataService.ListRagFiles][google.cloud.aiplatform.v1beta1.VertexRagDataService.ListRagFiles]
+     * call.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard list page token.
+     * Typically obtained via
+     * [ListRagFilesResponse.next_page_token][google.cloud.aiplatform.v1beta1.ListRagFilesResponse.next_page_token]
+     * of the previous
+     * [VertexRagDataService.ListRagFiles][google.cloud.aiplatform.v1beta1.VertexRagDataService.ListRagFiles]
+     * call.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.ListRagFilesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.ListRagFilesRequest) + private static final com.google.cloud.aiplatform.v1beta1.ListRagFilesRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.ListRagFilesRequest(); + } + + public static com.google.cloud.aiplatform.v1beta1.ListRagFilesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListRagFilesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ListRagFilesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListRagFilesRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListRagFilesRequestOrBuilder.java new file mode 100644 index 000000000000..7d691aa85276 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListRagFilesRequestOrBuilder.java @@ -0,0 +1,107 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/vertex_rag_data_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +public interface ListRagFilesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.ListRagFilesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the RagCorpus from which to list the
+   * RagFiles. Format:
+   * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The resource name of the RagCorpus from which to list the
+   * RagFiles. Format:
+   * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. The standard list page size.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. The standard list page token.
+   * Typically obtained via
+   * [ListRagFilesResponse.next_page_token][google.cloud.aiplatform.v1beta1.ListRagFilesResponse.next_page_token]
+   * of the previous
+   * [VertexRagDataService.ListRagFiles][google.cloud.aiplatform.v1beta1.VertexRagDataService.ListRagFiles]
+   * call.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * Optional. The standard list page token.
+   * Typically obtained via
+   * [ListRagFilesResponse.next_page_token][google.cloud.aiplatform.v1beta1.ListRagFilesResponse.next_page_token]
+   * of the previous
+   * [VertexRagDataService.ListRagFiles][google.cloud.aiplatform.v1beta1.VertexRagDataService.ListRagFiles]
+   * call.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListRagFilesResponse.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListRagFilesResponse.java new file mode 100644 index 000000000000..00ea026fe285 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListRagFilesResponse.java @@ -0,0 +1,1143 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/vertex_rag_data_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Response message for
+ * [VertexRagDataService.ListRagFiles][google.cloud.aiplatform.v1beta1.VertexRagDataService.ListRagFiles].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.ListRagFilesResponse} + */ +public final class ListRagFilesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.ListRagFilesResponse) + ListRagFilesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListRagFilesResponse.newBuilder() to construct. + private ListRagFilesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListRagFilesResponse() { + ragFiles_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListRagFilesResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListRagFilesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListRagFilesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.ListRagFilesResponse.class, + com.google.cloud.aiplatform.v1beta1.ListRagFilesResponse.Builder.class); + } + + public static final int RAG_FILES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List ragFiles_; + /** + * + * + *
+   * List of RagFiles in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagFile rag_files = 1; + */ + @java.lang.Override + public java.util.List getRagFilesList() { + return ragFiles_; + } + /** + * + * + *
+   * List of RagFiles in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagFile rag_files = 1; + */ + @java.lang.Override + public java.util.List + getRagFilesOrBuilderList() { + return ragFiles_; + } + /** + * + * + *
+   * List of RagFiles in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagFile rag_files = 1; + */ + @java.lang.Override + public int getRagFilesCount() { + return ragFiles_.size(); + } + /** + * + * + *
+   * List of RagFiles in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagFile rag_files = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.RagFile getRagFiles(int index) { + return ragFiles_.get(index); + } + /** + * + * + *
+   * List of RagFiles in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagFile rag_files = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.RagFileOrBuilder getRagFilesOrBuilder(int index) { + return ragFiles_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * Pass to
+   * [ListRagFilesRequest.page_token][google.cloud.aiplatform.v1beta1.ListRagFilesRequest.page_token]
+   * to obtain that page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + 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(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * Pass to
+   * [ListRagFilesRequest.page_token][google.cloud.aiplatform.v1beta1.ListRagFilesRequest.page_token]
+   * to obtain that page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < ragFiles_.size(); i++) { + output.writeMessage(1, ragFiles_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < ragFiles_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, ragFiles_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.ListRagFilesResponse)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.ListRagFilesResponse other = + (com.google.cloud.aiplatform.v1beta1.ListRagFilesResponse) obj; + + if (!getRagFilesList().equals(other.getRagFilesList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getRagFilesCount() > 0) { + hash = (37 * hash) + RAG_FILES_FIELD_NUMBER; + hash = (53 * hash) + getRagFilesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.ListRagFilesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.ListRagFilesResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ListRagFilesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.ListRagFilesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ListRagFilesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.ListRagFilesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ListRagFilesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.ListRagFilesResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ListRagFilesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.ListRagFilesResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ListRagFilesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.ListRagFilesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.ListRagFilesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for
+   * [VertexRagDataService.ListRagFiles][google.cloud.aiplatform.v1beta1.VertexRagDataService.ListRagFiles].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.ListRagFilesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.ListRagFilesResponse) + com.google.cloud.aiplatform.v1beta1.ListRagFilesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListRagFilesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListRagFilesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.ListRagFilesResponse.class, + com.google.cloud.aiplatform.v1beta1.ListRagFilesResponse.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.ListRagFilesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (ragFilesBuilder_ == null) { + ragFiles_ = java.util.Collections.emptyList(); + } else { + ragFiles_ = null; + ragFilesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListRagFilesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ListRagFilesResponse getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.ListRagFilesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ListRagFilesResponse build() { + com.google.cloud.aiplatform.v1beta1.ListRagFilesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ListRagFilesResponse buildPartial() { + com.google.cloud.aiplatform.v1beta1.ListRagFilesResponse result = + new com.google.cloud.aiplatform.v1beta1.ListRagFilesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.aiplatform.v1beta1.ListRagFilesResponse result) { + if (ragFilesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + ragFiles_ = java.util.Collections.unmodifiableList(ragFiles_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.ragFiles_ = ragFiles_; + } else { + result.ragFiles_ = ragFilesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.aiplatform.v1beta1.ListRagFilesResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1beta1.ListRagFilesResponse) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.ListRagFilesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.ListRagFilesResponse other) { + if (other == com.google.cloud.aiplatform.v1beta1.ListRagFilesResponse.getDefaultInstance()) + return this; + if (ragFilesBuilder_ == null) { + if (!other.ragFiles_.isEmpty()) { + if (ragFiles_.isEmpty()) { + ragFiles_ = other.ragFiles_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRagFilesIsMutable(); + ragFiles_.addAll(other.ragFiles_); + } + onChanged(); + } + } else { + if (!other.ragFiles_.isEmpty()) { + if (ragFilesBuilder_.isEmpty()) { + ragFilesBuilder_.dispose(); + ragFilesBuilder_ = null; + ragFiles_ = other.ragFiles_; + bitField0_ = (bitField0_ & ~0x00000001); + ragFilesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getRagFilesFieldBuilder() + : null; + } else { + ragFilesBuilder_.addAllMessages(other.ragFiles_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.aiplatform.v1beta1.RagFile m = + input.readMessage( + com.google.cloud.aiplatform.v1beta1.RagFile.parser(), extensionRegistry); + if (ragFilesBuilder_ == null) { + ensureRagFilesIsMutable(); + ragFiles_.add(m); + } else { + ragFilesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List ragFiles_ = + java.util.Collections.emptyList(); + + private void ensureRagFilesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + ragFiles_ = new java.util.ArrayList(ragFiles_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.RagFile, + com.google.cloud.aiplatform.v1beta1.RagFile.Builder, + com.google.cloud.aiplatform.v1beta1.RagFileOrBuilder> + ragFilesBuilder_; + + /** + * + * + *
+     * List of RagFiles in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagFile rag_files = 1; + */ + public java.util.List getRagFilesList() { + if (ragFilesBuilder_ == null) { + return java.util.Collections.unmodifiableList(ragFiles_); + } else { + return ragFilesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of RagFiles in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagFile rag_files = 1; + */ + public int getRagFilesCount() { + if (ragFilesBuilder_ == null) { + return ragFiles_.size(); + } else { + return ragFilesBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of RagFiles in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagFile rag_files = 1; + */ + public com.google.cloud.aiplatform.v1beta1.RagFile getRagFiles(int index) { + if (ragFilesBuilder_ == null) { + return ragFiles_.get(index); + } else { + return ragFilesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of RagFiles in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagFile rag_files = 1; + */ + public Builder setRagFiles(int index, com.google.cloud.aiplatform.v1beta1.RagFile value) { + if (ragFilesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRagFilesIsMutable(); + ragFiles_.set(index, value); + onChanged(); + } else { + ragFilesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of RagFiles in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagFile rag_files = 1; + */ + public Builder setRagFiles( + int index, com.google.cloud.aiplatform.v1beta1.RagFile.Builder builderForValue) { + if (ragFilesBuilder_ == null) { + ensureRagFilesIsMutable(); + ragFiles_.set(index, builderForValue.build()); + onChanged(); + } else { + ragFilesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of RagFiles in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagFile rag_files = 1; + */ + public Builder addRagFiles(com.google.cloud.aiplatform.v1beta1.RagFile value) { + if (ragFilesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRagFilesIsMutable(); + ragFiles_.add(value); + onChanged(); + } else { + ragFilesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of RagFiles in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagFile rag_files = 1; + */ + public Builder addRagFiles(int index, com.google.cloud.aiplatform.v1beta1.RagFile value) { + if (ragFilesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRagFilesIsMutable(); + ragFiles_.add(index, value); + onChanged(); + } else { + ragFilesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of RagFiles in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagFile rag_files = 1; + */ + public Builder addRagFiles( + com.google.cloud.aiplatform.v1beta1.RagFile.Builder builderForValue) { + if (ragFilesBuilder_ == null) { + ensureRagFilesIsMutable(); + ragFiles_.add(builderForValue.build()); + onChanged(); + } else { + ragFilesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of RagFiles in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagFile rag_files = 1; + */ + public Builder addRagFiles( + int index, com.google.cloud.aiplatform.v1beta1.RagFile.Builder builderForValue) { + if (ragFilesBuilder_ == null) { + ensureRagFilesIsMutable(); + ragFiles_.add(index, builderForValue.build()); + onChanged(); + } else { + ragFilesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of RagFiles in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagFile rag_files = 1; + */ + public Builder addAllRagFiles( + java.lang.Iterable values) { + if (ragFilesBuilder_ == null) { + ensureRagFilesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, ragFiles_); + onChanged(); + } else { + ragFilesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of RagFiles in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagFile rag_files = 1; + */ + public Builder clearRagFiles() { + if (ragFilesBuilder_ == null) { + ragFiles_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + ragFilesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of RagFiles in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagFile rag_files = 1; + */ + public Builder removeRagFiles(int index) { + if (ragFilesBuilder_ == null) { + ensureRagFilesIsMutable(); + ragFiles_.remove(index); + onChanged(); + } else { + ragFilesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of RagFiles in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagFile rag_files = 1; + */ + public com.google.cloud.aiplatform.v1beta1.RagFile.Builder getRagFilesBuilder(int index) { + return getRagFilesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of RagFiles in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagFile rag_files = 1; + */ + public com.google.cloud.aiplatform.v1beta1.RagFileOrBuilder getRagFilesOrBuilder(int index) { + if (ragFilesBuilder_ == null) { + return ragFiles_.get(index); + } else { + return ragFilesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of RagFiles in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagFile rag_files = 1; + */ + public java.util.List + getRagFilesOrBuilderList() { + if (ragFilesBuilder_ != null) { + return ragFilesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(ragFiles_); + } + } + /** + * + * + *
+     * List of RagFiles in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagFile rag_files = 1; + */ + public com.google.cloud.aiplatform.v1beta1.RagFile.Builder addRagFilesBuilder() { + return getRagFilesFieldBuilder() + .addBuilder(com.google.cloud.aiplatform.v1beta1.RagFile.getDefaultInstance()); + } + /** + * + * + *
+     * List of RagFiles in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagFile rag_files = 1; + */ + public com.google.cloud.aiplatform.v1beta1.RagFile.Builder addRagFilesBuilder(int index) { + return getRagFilesFieldBuilder() + .addBuilder(index, com.google.cloud.aiplatform.v1beta1.RagFile.getDefaultInstance()); + } + /** + * + * + *
+     * List of RagFiles in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagFile rag_files = 1; + */ + public java.util.List + getRagFilesBuilderList() { + return getRagFilesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.RagFile, + com.google.cloud.aiplatform.v1beta1.RagFile.Builder, + com.google.cloud.aiplatform.v1beta1.RagFileOrBuilder> + getRagFilesFieldBuilder() { + if (ragFilesBuilder_ == null) { + ragFilesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.RagFile, + com.google.cloud.aiplatform.v1beta1.RagFile.Builder, + com.google.cloud.aiplatform.v1beta1.RagFileOrBuilder>( + ragFiles_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + ragFiles_ = null; + } + return ragFilesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to
+     * [ListRagFilesRequest.page_token][google.cloud.aiplatform.v1beta1.ListRagFilesRequest.page_token]
+     * to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to
+     * [ListRagFilesRequest.page_token][google.cloud.aiplatform.v1beta1.ListRagFilesRequest.page_token]
+     * to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to
+     * [ListRagFilesRequest.page_token][google.cloud.aiplatform.v1beta1.ListRagFilesRequest.page_token]
+     * to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to
+     * [ListRagFilesRequest.page_token][google.cloud.aiplatform.v1beta1.ListRagFilesRequest.page_token]
+     * to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to
+     * [ListRagFilesRequest.page_token][google.cloud.aiplatform.v1beta1.ListRagFilesRequest.page_token]
+     * to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.ListRagFilesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.ListRagFilesResponse) + private static final com.google.cloud.aiplatform.v1beta1.ListRagFilesResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.ListRagFilesResponse(); + } + + public static com.google.cloud.aiplatform.v1beta1.ListRagFilesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListRagFilesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ListRagFilesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListRagFilesResponseOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListRagFilesResponseOrBuilder.java new file mode 100644 index 000000000000..aa210d3d41b4 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListRagFilesResponseOrBuilder.java @@ -0,0 +1,109 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/vertex_rag_data_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +public interface ListRagFilesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.ListRagFilesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * List of RagFiles in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagFile rag_files = 1; + */ + java.util.List getRagFilesList(); + /** + * + * + *
+   * List of RagFiles in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagFile rag_files = 1; + */ + com.google.cloud.aiplatform.v1beta1.RagFile getRagFiles(int index); + /** + * + * + *
+   * List of RagFiles in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagFile rag_files = 1; + */ + int getRagFilesCount(); + /** + * + * + *
+   * List of RagFiles in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagFile rag_files = 1; + */ + java.util.List + getRagFilesOrBuilderList(); + /** + * + * + *
+   * List of RagFiles in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagFile rag_files = 1; + */ + com.google.cloud.aiplatform.v1beta1.RagFileOrBuilder getRagFilesOrBuilder(int index); + + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * Pass to
+   * [ListRagFilesRequest.page_token][google.cloud.aiplatform.v1beta1.ListRagFilesRequest.page_token]
+   * to obtain that page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * Pass to
+   * [ListRagFilesRequest.page_token][google.cloud.aiplatform.v1beta1.ListRagFilesRequest.page_token]
+   * to obtain that page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/MachineResourcesProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/MachineResourcesProto.java index 0d8535e545b5..9281e8d831c4 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/MachineResourcesProto.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/MachineResourcesProto.java @@ -64,6 +64,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_aiplatform_v1beta1_AutoscalingMetricSpec_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_aiplatform_v1beta1_AutoscalingMetricSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_ShieldedVmConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_ShieldedVmConfig_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -102,14 +106,15 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ize_gb\030\002 \001(\003\"L\n\010NfsMount\022\023\n\006server\030\001 \001(\t" + "B\003\340A\002\022\021\n\004path\030\002 \001(\tB\003\340A\002\022\030\n\013mount_point\030" + "\003 \001(\tB\003\340A\002\"A\n\025AutoscalingMetricSpec\022\030\n\013m" - + "etric_name\030\001 \001(\tB\003\340A\002\022\016\n\006target\030\002 \001(\005B\354\001" - + "\n#com.google.cloud.aiplatform.v1beta1B\025M" - + "achineResourcesProtoP\001ZCcloud.google.com" - + "/go/aiplatform/apiv1beta1/aiplatformpb;a" - + "iplatformpb\252\002\037Google.Cloud.AIPlatform.V1" - + "Beta1\312\002\037Google\\Cloud\\AIPlatform\\V1beta1\352" - + "\002\"Google::Cloud::AIPlatform::V1beta1b\006pr" - + "oto3" + + "etric_name\030\001 \001(\tB\003\340A\002\022\016\n\006target\030\002 \001(\005\".\n" + + "\020ShieldedVmConfig\022\032\n\022enable_secure_boot\030" + + "\001 \001(\010B\354\001\n#com.google.cloud.aiplatform.v1" + + "beta1B\025MachineResourcesProtoP\001ZCcloud.go" + + "ogle.com/go/aiplatform/apiv1beta1/aiplat" + + "formpb;aiplatformpb\252\002\037Google.Cloud.AIPla" + + "tform.V1Beta1\312\002\037Google\\Cloud\\AIPlatform\\" + + "V1beta1\352\002\"Google::Cloud::AIPlatform::V1b" + + "eta1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -190,6 +195,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "MetricName", "Target", }); + internal_static_google_cloud_aiplatform_v1beta1_ShieldedVmConfig_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_aiplatform_v1beta1_ShieldedVmConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_ShieldedVmConfig_descriptor, + new java.lang.String[] { + "EnableSecureBoot", + }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RagContextRecallResult.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NetworkSpec.java similarity index 50% rename from java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RagContextRecallResult.java rename to java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NetworkSpec.java index 82b9c8999cd9..21cb8192ac55 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RagContextRecallResult.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NetworkSpec.java @@ -14,7 +14,7 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/aiplatform/v1beta1/evaluation_service.proto +// source: google/cloud/aiplatform/v1beta1/network_spec.proto // Protobuf Java Version: 3.25.2 package com.google.cloud.aiplatform.v1beta1; @@ -23,104 +23,90 @@ * * *
- * Spec for rag context recall result.
+ * Network spec.
  * 
* - * Protobuf type {@code google.cloud.aiplatform.v1beta1.RagContextRecallResult} + * Protobuf type {@code google.cloud.aiplatform.v1beta1.NetworkSpec} */ -public final class RagContextRecallResult extends com.google.protobuf.GeneratedMessageV3 +public final class NetworkSpec extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.RagContextRecallResult) - RagContextRecallResultOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.NetworkSpec) + NetworkSpecOrBuilder { private static final long serialVersionUID = 0L; - // Use RagContextRecallResult.newBuilder() to construct. - private RagContextRecallResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use NetworkSpec.newBuilder() to construct. + private NetworkSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private RagContextRecallResult() { - explanation_ = ""; + private NetworkSpec() { + network_ = ""; + subnetwork_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new RagContextRecallResult(); + return new NetworkSpec(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.aiplatform.v1beta1.EvaluationServiceProto - .internal_static_google_cloud_aiplatform_v1beta1_RagContextRecallResult_descriptor; + return com.google.cloud.aiplatform.v1beta1.NetworkSpecProto + .internal_static_google_cloud_aiplatform_v1beta1_NetworkSpec_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.aiplatform.v1beta1.EvaluationServiceProto - .internal_static_google_cloud_aiplatform_v1beta1_RagContextRecallResult_fieldAccessorTable + return com.google.cloud.aiplatform.v1beta1.NetworkSpecProto + .internal_static_google_cloud_aiplatform_v1beta1_NetworkSpec_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.aiplatform.v1beta1.RagContextRecallResult.class, - com.google.cloud.aiplatform.v1beta1.RagContextRecallResult.Builder.class); + com.google.cloud.aiplatform.v1beta1.NetworkSpec.class, + com.google.cloud.aiplatform.v1beta1.NetworkSpec.Builder.class); } - private int bitField0_; - public static final int SCORE_FIELD_NUMBER = 1; - private float score_ = 0F; + public static final int ENABLE_INTERNET_ACCESS_FIELD_NUMBER = 1; + private boolean enableInternetAccess_ = false; /** * * *
-   * Output only. RagContextRecall score.
+   * Whether to enable public internet access. Default false.
    * 
* - * optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * bool enable_internet_access = 1; * - * @return Whether the score field is set. + * @return The enableInternetAccess. */ @java.lang.Override - public boolean hasScore() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * - * - *
-   * Output only. RagContextRecall score.
-   * 
- * - * optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The score. - */ - @java.lang.Override - public float getScore() { - return score_; + public boolean getEnableInternetAccess() { + return enableInternetAccess_; } - public static final int EXPLANATION_FIELD_NUMBER = 2; + public static final int NETWORK_FIELD_NUMBER = 2; @SuppressWarnings("serial") - private volatile java.lang.Object explanation_ = ""; + private volatile java.lang.Object network_ = ""; /** * * *
-   * Output only. Explanation for rag context recall score.
+   * The full name of the Google Compute Engine
+   * [network](https://cloud.google.com//compute/docs/networks-and-firewalls#networks)
    * 
* - * string explanation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string network = 2 [(.google.api.resource_reference) = { ... } * - * @return The explanation. + * @return The network. */ @java.lang.Override - public java.lang.String getExplanation() { - java.lang.Object ref = explanation_; + public java.lang.String getNetwork() { + java.lang.Object ref = network_; 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(); - explanation_ = s; + network_ = s; return s; } } @@ -128,57 +114,80 @@ public java.lang.String getExplanation() { * * *
-   * Output only. Explanation for rag context recall score.
+   * The full name of the Google Compute Engine
+   * [network](https://cloud.google.com//compute/docs/networks-and-firewalls#networks)
    * 
* - * string explanation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string network = 2 [(.google.api.resource_reference) = { ... } * - * @return The bytes for explanation. + * @return The bytes for network. */ @java.lang.Override - public com.google.protobuf.ByteString getExplanationBytes() { - java.lang.Object ref = explanation_; + public com.google.protobuf.ByteString getNetworkBytes() { + java.lang.Object ref = network_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - explanation_ = b; + network_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - public static final int CONFIDENCE_FIELD_NUMBER = 3; - private float confidence_ = 0F; + public static final int SUBNETWORK_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object subnetwork_ = ""; /** * * *
-   * Output only. Confidence for rag context recall score.
+   * The name of the subnet that this instance is in.
+   * Format:
+   * `projects/{project_id_or_number}/regions/{region}/subnetworks/{subnetwork_id}`
    * 
* - * optional float confidence = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string subnetwork = 3 [(.google.api.resource_reference) = { ... } * - * @return Whether the confidence field is set. + * @return The subnetwork. */ @java.lang.Override - public boolean hasConfidence() { - return ((bitField0_ & 0x00000002) != 0); + public java.lang.String getSubnetwork() { + java.lang.Object ref = subnetwork_; + 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(); + subnetwork_ = s; + return s; + } } /** * * *
-   * Output only. Confidence for rag context recall score.
+   * The name of the subnet that this instance is in.
+   * Format:
+   * `projects/{project_id_or_number}/regions/{region}/subnetworks/{subnetwork_id}`
    * 
* - * optional float confidence = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string subnetwork = 3 [(.google.api.resource_reference) = { ... } * - * @return The confidence. + * @return The bytes for subnetwork. */ @java.lang.Override - public float getConfidence() { - return confidence_; + public com.google.protobuf.ByteString getSubnetworkBytes() { + java.lang.Object ref = subnetwork_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + subnetwork_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } private byte memoizedIsInitialized = -1; @@ -195,14 +204,14 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeFloat(1, score_); + if (enableInternetAccess_ != false) { + output.writeBool(1, enableInternetAccess_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(explanation_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, explanation_); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(network_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, network_); } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeFloat(3, confidence_); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subnetwork_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, subnetwork_); } getUnknownFields().writeTo(output); } @@ -213,14 +222,14 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, score_); + if (enableInternetAccess_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, enableInternetAccess_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(explanation_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, explanation_); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(network_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, network_); } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(3, confidence_); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subnetwork_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, subnetwork_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -232,23 +241,15 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.RagContextRecallResult)) { + if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.NetworkSpec)) { return super.equals(obj); } - com.google.cloud.aiplatform.v1beta1.RagContextRecallResult other = - (com.google.cloud.aiplatform.v1beta1.RagContextRecallResult) obj; + com.google.cloud.aiplatform.v1beta1.NetworkSpec other = + (com.google.cloud.aiplatform.v1beta1.NetworkSpec) obj; - if (hasScore() != other.hasScore()) return false; - if (hasScore()) { - if (java.lang.Float.floatToIntBits(getScore()) - != java.lang.Float.floatToIntBits(other.getScore())) return false; - } - if (!getExplanation().equals(other.getExplanation())) return false; - if (hasConfidence() != other.hasConfidence()) return false; - if (hasConfidence()) { - if (java.lang.Float.floatToIntBits(getConfidence()) - != java.lang.Float.floatToIntBits(other.getConfidence())) return false; - } + if (getEnableInternetAccess() != other.getEnableInternetAccess()) return false; + if (!getNetwork().equals(other.getNetwork())) return false; + if (!getSubnetwork().equals(other.getSubnetwork())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -260,86 +261,82 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (hasScore()) { - hash = (37 * hash) + SCORE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getScore()); - } - hash = (37 * hash) + EXPLANATION_FIELD_NUMBER; - hash = (53 * hash) + getExplanation().hashCode(); - if (hasConfidence()) { - hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getConfidence()); - } + hash = (37 * hash) + ENABLE_INTERNET_ACCESS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableInternetAccess()); + hash = (37 * hash) + NETWORK_FIELD_NUMBER; + hash = (53 * hash) + getNetwork().hashCode(); + hash = (37 * hash) + SUBNETWORK_FIELD_NUMBER; + hash = (53 * hash) + getSubnetwork().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.cloud.aiplatform.v1beta1.RagContextRecallResult parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.cloud.aiplatform.v1beta1.NetworkSpec parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.aiplatform.v1beta1.RagContextRecallResult parseFrom( + public static com.google.cloud.aiplatform.v1beta1.NetworkSpec parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.aiplatform.v1beta1.RagContextRecallResult parseFrom( + public static com.google.cloud.aiplatform.v1beta1.NetworkSpec parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.aiplatform.v1beta1.RagContextRecallResult parseFrom( + public static com.google.cloud.aiplatform.v1beta1.NetworkSpec parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.aiplatform.v1beta1.RagContextRecallResult parseFrom(byte[] data) + public static com.google.cloud.aiplatform.v1beta1.NetworkSpec parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.aiplatform.v1beta1.RagContextRecallResult parseFrom( + public static com.google.cloud.aiplatform.v1beta1.NetworkSpec parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.aiplatform.v1beta1.RagContextRecallResult parseFrom( - java.io.InputStream input) throws java.io.IOException { + public static com.google.cloud.aiplatform.v1beta1.NetworkSpec parseFrom(java.io.InputStream input) + throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.aiplatform.v1beta1.RagContextRecallResult parseFrom( + public static com.google.cloud.aiplatform.v1beta1.NetworkSpec parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.aiplatform.v1beta1.RagContextRecallResult parseDelimitedFrom( + public static com.google.cloud.aiplatform.v1beta1.NetworkSpec parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.aiplatform.v1beta1.RagContextRecallResult parseDelimitedFrom( + public static com.google.cloud.aiplatform.v1beta1.NetworkSpec parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.aiplatform.v1beta1.RagContextRecallResult parseFrom( + public static com.google.cloud.aiplatform.v1beta1.NetworkSpec parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.aiplatform.v1beta1.RagContextRecallResult parseFrom( + public static com.google.cloud.aiplatform.v1beta1.NetworkSpec parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -356,8 +353,7 @@ public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder( - com.google.cloud.aiplatform.v1beta1.RagContextRecallResult prototype) { + public static Builder newBuilder(com.google.cloud.aiplatform.v1beta1.NetworkSpec prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -375,31 +371,31 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Spec for rag context recall result.
+   * Network spec.
    * 
* - * Protobuf type {@code google.cloud.aiplatform.v1beta1.RagContextRecallResult} + * Protobuf type {@code google.cloud.aiplatform.v1beta1.NetworkSpec} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.RagContextRecallResult) - com.google.cloud.aiplatform.v1beta1.RagContextRecallResultOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.NetworkSpec) + com.google.cloud.aiplatform.v1beta1.NetworkSpecOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.aiplatform.v1beta1.EvaluationServiceProto - .internal_static_google_cloud_aiplatform_v1beta1_RagContextRecallResult_descriptor; + return com.google.cloud.aiplatform.v1beta1.NetworkSpecProto + .internal_static_google_cloud_aiplatform_v1beta1_NetworkSpec_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.aiplatform.v1beta1.EvaluationServiceProto - .internal_static_google_cloud_aiplatform_v1beta1_RagContextRecallResult_fieldAccessorTable + return com.google.cloud.aiplatform.v1beta1.NetworkSpecProto + .internal_static_google_cloud_aiplatform_v1beta1_NetworkSpec_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.aiplatform.v1beta1.RagContextRecallResult.class, - com.google.cloud.aiplatform.v1beta1.RagContextRecallResult.Builder.class); + com.google.cloud.aiplatform.v1beta1.NetworkSpec.class, + com.google.cloud.aiplatform.v1beta1.NetworkSpec.Builder.class); } - // Construct using com.google.cloud.aiplatform.v1beta1.RagContextRecallResult.newBuilder() + // Construct using com.google.cloud.aiplatform.v1beta1.NetworkSpec.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { @@ -410,26 +406,26 @@ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { public Builder clear() { super.clear(); bitField0_ = 0; - score_ = 0F; - explanation_ = ""; - confidence_ = 0F; + enableInternetAccess_ = false; + network_ = ""; + subnetwork_ = ""; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.aiplatform.v1beta1.EvaluationServiceProto - .internal_static_google_cloud_aiplatform_v1beta1_RagContextRecallResult_descriptor; + return com.google.cloud.aiplatform.v1beta1.NetworkSpecProto + .internal_static_google_cloud_aiplatform_v1beta1_NetworkSpec_descriptor; } @java.lang.Override - public com.google.cloud.aiplatform.v1beta1.RagContextRecallResult getDefaultInstanceForType() { - return com.google.cloud.aiplatform.v1beta1.RagContextRecallResult.getDefaultInstance(); + public com.google.cloud.aiplatform.v1beta1.NetworkSpec getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.NetworkSpec.getDefaultInstance(); } @java.lang.Override - public com.google.cloud.aiplatform.v1beta1.RagContextRecallResult build() { - com.google.cloud.aiplatform.v1beta1.RagContextRecallResult result = buildPartial(); + public com.google.cloud.aiplatform.v1beta1.NetworkSpec build() { + com.google.cloud.aiplatform.v1beta1.NetworkSpec result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -437,9 +433,9 @@ public com.google.cloud.aiplatform.v1beta1.RagContextRecallResult build() { } @java.lang.Override - public com.google.cloud.aiplatform.v1beta1.RagContextRecallResult buildPartial() { - com.google.cloud.aiplatform.v1beta1.RagContextRecallResult result = - new com.google.cloud.aiplatform.v1beta1.RagContextRecallResult(this); + public com.google.cloud.aiplatform.v1beta1.NetworkSpec buildPartial() { + com.google.cloud.aiplatform.v1beta1.NetworkSpec result = + new com.google.cloud.aiplatform.v1beta1.NetworkSpec(this); if (bitField0_ != 0) { buildPartial0(result); } @@ -447,21 +443,17 @@ public com.google.cloud.aiplatform.v1beta1.RagContextRecallResult buildPartial() return result; } - private void buildPartial0(com.google.cloud.aiplatform.v1beta1.RagContextRecallResult result) { + private void buildPartial0(com.google.cloud.aiplatform.v1beta1.NetworkSpec result) { int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { - result.score_ = score_; - to_bitField0_ |= 0x00000001; + result.enableInternetAccess_ = enableInternetAccess_; } if (((from_bitField0_ & 0x00000002) != 0)) { - result.explanation_ = explanation_; + result.network_ = network_; } if (((from_bitField0_ & 0x00000004) != 0)) { - result.confidence_ = confidence_; - to_bitField0_ |= 0x00000002; + result.subnetwork_ = subnetwork_; } - result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -499,27 +491,29 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.aiplatform.v1beta1.RagContextRecallResult) { - return mergeFrom((com.google.cloud.aiplatform.v1beta1.RagContextRecallResult) other); + if (other instanceof com.google.cloud.aiplatform.v1beta1.NetworkSpec) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.NetworkSpec) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.RagContextRecallResult other) { - if (other == com.google.cloud.aiplatform.v1beta1.RagContextRecallResult.getDefaultInstance()) + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.NetworkSpec other) { + if (other == com.google.cloud.aiplatform.v1beta1.NetworkSpec.getDefaultInstance()) return this; - if (other.hasScore()) { - setScore(other.getScore()); + if (other.getEnableInternetAccess() != false) { + setEnableInternetAccess(other.getEnableInternetAccess()); } - if (!other.getExplanation().isEmpty()) { - explanation_ = other.explanation_; + if (!other.getNetwork().isEmpty()) { + network_ = other.network_; bitField0_ |= 0x00000002; onChanged(); } - if (other.hasConfidence()) { - setConfidence(other.getConfidence()); + if (!other.getSubnetwork().isEmpty()) { + subnetwork_ = other.subnetwork_; + bitField0_ |= 0x00000004; + onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); @@ -547,24 +541,24 @@ public Builder mergeFrom( case 0: done = true; break; - case 13: + case 8: { - score_ = input.readFloat(); + enableInternetAccess_ = input.readBool(); bitField0_ |= 0x00000001; break; - } // case 13 + } // case 8 case 18: { - explanation_ = input.readStringRequireUtf8(); + network_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000002; break; } // case 18 - case 29: + case 26: { - confidence_ = input.readFloat(); + subnetwork_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000004; break; - } // case 29 + } // case 26 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -584,52 +578,37 @@ public Builder mergeFrom( private int bitField0_; - private float score_; + private boolean enableInternetAccess_; /** * * *
-     * Output only. RagContextRecall score.
+     * Whether to enable public internet access. Default false.
      * 
* - * optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * bool enable_internet_access = 1; * - * @return Whether the score field is set. + * @return The enableInternetAccess. */ @java.lang.Override - public boolean hasScore() { - return ((bitField0_ & 0x00000001) != 0); + public boolean getEnableInternetAccess() { + return enableInternetAccess_; } /** * * *
-     * Output only. RagContextRecall score.
+     * Whether to enable public internet access. Default false.
      * 
* - * optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The score. - */ - @java.lang.Override - public float getScore() { - return score_; - } - /** - * + * bool enable_internet_access = 1; * - *
-     * Output only. RagContextRecall score.
-     * 
- * - * optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The score to set. + * @param value The enableInternetAccess to set. * @return This builder for chaining. */ - public Builder setScore(float value) { + public Builder setEnableInternetAccess(boolean value) { - score_ = value; + enableInternetAccess_ = value; bitField0_ |= 0x00000001; onChanged(); return this; @@ -638,38 +617,39 @@ public Builder setScore(float value) { * * *
-     * Output only. RagContextRecall score.
+     * Whether to enable public internet access. Default false.
      * 
* - * optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * bool enable_internet_access = 1; * * @return This builder for chaining. */ - public Builder clearScore() { + public Builder clearEnableInternetAccess() { bitField0_ = (bitField0_ & ~0x00000001); - score_ = 0F; + enableInternetAccess_ = false; onChanged(); return this; } - private java.lang.Object explanation_ = ""; + private java.lang.Object network_ = ""; /** * * *
-     * Output only. Explanation for rag context recall score.
+     * The full name of the Google Compute Engine
+     * [network](https://cloud.google.com//compute/docs/networks-and-firewalls#networks)
      * 
* - * string explanation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string network = 2 [(.google.api.resource_reference) = { ... } * - * @return The explanation. + * @return The network. */ - public java.lang.String getExplanation() { - java.lang.Object ref = explanation_; + public java.lang.String getNetwork() { + java.lang.Object ref = network_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - explanation_ = s; + network_ = s; return s; } else { return (java.lang.String) ref; @@ -679,19 +659,20 @@ public java.lang.String getExplanation() { * * *
-     * Output only. Explanation for rag context recall score.
+     * The full name of the Google Compute Engine
+     * [network](https://cloud.google.com//compute/docs/networks-and-firewalls#networks)
      * 
* - * string explanation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string network = 2 [(.google.api.resource_reference) = { ... } * - * @return The bytes for explanation. + * @return The bytes for network. */ - public com.google.protobuf.ByteString getExplanationBytes() { - java.lang.Object ref = explanation_; + public com.google.protobuf.ByteString getNetworkBytes() { + java.lang.Object ref = network_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - explanation_ = b; + network_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -701,19 +682,20 @@ public com.google.protobuf.ByteString getExplanationBytes() { * * *
-     * Output only. Explanation for rag context recall score.
+     * The full name of the Google Compute Engine
+     * [network](https://cloud.google.com//compute/docs/networks-and-firewalls#networks)
      * 
* - * string explanation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string network = 2 [(.google.api.resource_reference) = { ... } * - * @param value The explanation to set. + * @param value The network to set. * @return This builder for chaining. */ - public Builder setExplanation(java.lang.String value) { + public Builder setNetwork(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - explanation_ = value; + network_ = value; bitField0_ |= 0x00000002; onChanged(); return this; @@ -722,15 +704,16 @@ public Builder setExplanation(java.lang.String value) { * * *
-     * Output only. Explanation for rag context recall score.
+     * The full name of the Google Compute Engine
+     * [network](https://cloud.google.com//compute/docs/networks-and-firewalls#networks)
      * 
* - * string explanation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string network = 2 [(.google.api.resource_reference) = { ... } * * @return This builder for chaining. */ - public Builder clearExplanation() { - explanation_ = getDefaultInstance().getExplanation(); + public Builder clearNetwork() { + network_ = getDefaultInstance().getNetwork(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; @@ -739,71 +722,94 @@ public Builder clearExplanation() { * * *
-     * Output only. Explanation for rag context recall score.
+     * The full name of the Google Compute Engine
+     * [network](https://cloud.google.com//compute/docs/networks-and-firewalls#networks)
      * 
* - * string explanation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string network = 2 [(.google.api.resource_reference) = { ... } * - * @param value The bytes for explanation to set. + * @param value The bytes for network to set. * @return This builder for chaining. */ - public Builder setExplanationBytes(com.google.protobuf.ByteString value) { + public Builder setNetworkBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); - explanation_ = value; + network_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } - private float confidence_; + private java.lang.Object subnetwork_ = ""; /** * * *
-     * Output only. Confidence for rag context recall score.
+     * The name of the subnet that this instance is in.
+     * Format:
+     * `projects/{project_id_or_number}/regions/{region}/subnetworks/{subnetwork_id}`
      * 
* - * optional float confidence = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string subnetwork = 3 [(.google.api.resource_reference) = { ... } * - * @return Whether the confidence field is set. + * @return The subnetwork. */ - @java.lang.Override - public boolean hasConfidence() { - return ((bitField0_ & 0x00000004) != 0); + public java.lang.String getSubnetwork() { + java.lang.Object ref = subnetwork_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + subnetwork_ = s; + return s; + } else { + return (java.lang.String) ref; + } } /** * * *
-     * Output only. Confidence for rag context recall score.
+     * The name of the subnet that this instance is in.
+     * Format:
+     * `projects/{project_id_or_number}/regions/{region}/subnetworks/{subnetwork_id}`
      * 
* - * optional float confidence = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string subnetwork = 3 [(.google.api.resource_reference) = { ... } * - * @return The confidence. + * @return The bytes for subnetwork. */ - @java.lang.Override - public float getConfidence() { - return confidence_; + public com.google.protobuf.ByteString getSubnetworkBytes() { + java.lang.Object ref = subnetwork_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + subnetwork_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } /** * * *
-     * Output only. Confidence for rag context recall score.
+     * The name of the subnet that this instance is in.
+     * Format:
+     * `projects/{project_id_or_number}/regions/{region}/subnetworks/{subnetwork_id}`
      * 
* - * optional float confidence = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string subnetwork = 3 [(.google.api.resource_reference) = { ... } * - * @param value The confidence to set. + * @param value The subnetwork to set. * @return This builder for chaining. */ - public Builder setConfidence(float value) { - - confidence_ = value; + public Builder setSubnetwork(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + subnetwork_ = value; bitField0_ |= 0x00000004; onChanged(); return this; @@ -812,16 +818,42 @@ public Builder setConfidence(float value) { * * *
-     * Output only. Confidence for rag context recall score.
+     * The name of the subnet that this instance is in.
+     * Format:
+     * `projects/{project_id_or_number}/regions/{region}/subnetworks/{subnetwork_id}`
      * 
* - * optional float confidence = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string subnetwork = 3 [(.google.api.resource_reference) = { ... } * * @return This builder for chaining. */ - public Builder clearConfidence() { + public Builder clearSubnetwork() { + subnetwork_ = getDefaultInstance().getSubnetwork(); bitField0_ = (bitField0_ & ~0x00000004); - confidence_ = 0F; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the subnet that this instance is in.
+     * Format:
+     * `projects/{project_id_or_number}/regions/{region}/subnetworks/{subnetwork_id}`
+     * 
+ * + * string subnetwork = 3 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for subnetwork to set. + * @return This builder for chaining. + */ + public Builder setSubnetworkBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + subnetwork_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -837,24 +869,24 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.RagContextRecallResult) + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.NetworkSpec) } - // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.RagContextRecallResult) - private static final com.google.cloud.aiplatform.v1beta1.RagContextRecallResult DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.NetworkSpec) + private static final com.google.cloud.aiplatform.v1beta1.NetworkSpec DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.RagContextRecallResult(); + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.NetworkSpec(); } - public static com.google.cloud.aiplatform.v1beta1.RagContextRecallResult getDefaultInstance() { + public static com.google.cloud.aiplatform.v1beta1.NetworkSpec getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public RagContextRecallResult parsePartialFrom( + public NetworkSpec parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -873,17 +905,17 @@ public RagContextRecallResult parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.cloud.aiplatform.v1beta1.RagContextRecallResult getDefaultInstanceForType() { + public com.google.cloud.aiplatform.v1beta1.NetworkSpec getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NetworkSpecOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NetworkSpecOrBuilder.java new file mode 100644 index 000000000000..275ef7923778 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NetworkSpecOrBuilder.java @@ -0,0 +1,95 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/network_spec.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +public interface NetworkSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.NetworkSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Whether to enable public internet access. Default false.
+   * 
+ * + * bool enable_internet_access = 1; + * + * @return The enableInternetAccess. + */ + boolean getEnableInternetAccess(); + + /** + * + * + *
+   * The full name of the Google Compute Engine
+   * [network](https://cloud.google.com//compute/docs/networks-and-firewalls#networks)
+   * 
+ * + * string network = 2 [(.google.api.resource_reference) = { ... } + * + * @return The network. + */ + java.lang.String getNetwork(); + /** + * + * + *
+   * The full name of the Google Compute Engine
+   * [network](https://cloud.google.com//compute/docs/networks-and-firewalls#networks)
+   * 
+ * + * string network = 2 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for network. + */ + com.google.protobuf.ByteString getNetworkBytes(); + + /** + * + * + *
+   * The name of the subnet that this instance is in.
+   * Format:
+   * `projects/{project_id_or_number}/regions/{region}/subnetworks/{subnetwork_id}`
+   * 
+ * + * string subnetwork = 3 [(.google.api.resource_reference) = { ... } + * + * @return The subnetwork. + */ + java.lang.String getSubnetwork(); + /** + * + * + *
+   * The name of the subnet that this instance is in.
+   * Format:
+   * `projects/{project_id_or_number}/regions/{region}/subnetworks/{subnetwork_id}`
+   * 
+ * + * string subnetwork = 3 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for subnetwork. + */ + com.google.protobuf.ByteString getSubnetworkBytes(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NetworkSpecProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NetworkSpecProto.java new file mode 100644 index 000000000000..f7a4a0f21d5d --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NetworkSpecProto.java @@ -0,0 +1,85 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/network_spec.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +public final class NetworkSpecProto { + private NetworkSpecProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_NetworkSpec_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_NetworkSpec_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n2google/cloud/aiplatform/v1beta1/networ" + + "k_spec.proto\022\037google.cloud.aiplatform.v1" + + "beta1\032\031google/api/resource.proto\"\237\001\n\013Net" + + "workSpec\022\036\n\026enable_internet_access\030\001 \001(\010" + + "\0224\n\007network\030\002 \001(\tB#\372A \n\036compute.googleap" + + "is.com/Network\022:\n\nsubnetwork\030\003 \001(\tB&\372A#\n" + + "!compute.googleapis.com/SubnetworkB\313\002\n#c" + + "om.google.cloud.aiplatform.v1beta1B\020Netw" + + "orkSpecProtoP\001ZCcloud.google.com/go/aipl" + + "atform/apiv1beta1/aiplatformpb;aiplatfor" + + "mpb\252\002\037Google.Cloud.AIPlatform.V1Beta1\312\002\037" + + "Google\\Cloud\\AIPlatform\\V1beta1\352\002\"Google" + + "::Cloud::AIPlatform::V1beta1\352Aa\n!compute" + + ".googleapis.com/Subnetwork\022 + * The euc configuration of NotebookRuntimeTemplate. + * + * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.NotebookEucConfig} + */ +public final class NotebookEucConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.NotebookEucConfig) + NotebookEucConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use NotebookEucConfig.newBuilder() to construct. + private NotebookEucConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private NotebookEucConfig() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new NotebookEucConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.NotebookEucConfigProto + .internal_static_google_cloud_aiplatform_v1beta1_NotebookEucConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.NotebookEucConfigProto + .internal_static_google_cloud_aiplatform_v1beta1_NotebookEucConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.NotebookEucConfig.class, + com.google.cloud.aiplatform.v1beta1.NotebookEucConfig.Builder.class); + } + + public static final int EUC_DISABLED_FIELD_NUMBER = 1; + private boolean eucDisabled_ = false; + /** + * + * + *
+   * Input only. Whether EUC is disabled in this NotebookRuntimeTemplate.
+   * In proto3, the default value of a boolean is false. In this way, by default
+   * EUC will be enabled for NotebookRuntimeTemplate.
+   * 
+ * + * bool euc_disabled = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The eucDisabled. + */ + @java.lang.Override + public boolean getEucDisabled() { + return eucDisabled_; + } + + public static final int BYPASS_ACTAS_CHECK_FIELD_NUMBER = 2; + private boolean bypassActasCheck_ = false; + /** + * + * + *
+   * Output only. Whether ActAs check is bypassed for service account attached
+   * to the VM. If false, we need ActAs check for the default Compute Engine
+   * Service account. When a Runtime is created, a VM is allocated using Default
+   * Compute Engine Service Account. Any user requesting to use this Runtime
+   * requires Service Account User (ActAs) permission over this SA. If true,
+   * Runtime owner is using EUC and does not require the above permission as VM
+   * no longer use default Compute Engine SA, but a P4SA.
+   * 
+ * + * bool bypass_actas_check = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bypassActasCheck. + */ + @java.lang.Override + public boolean getBypassActasCheck() { + return bypassActasCheck_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (eucDisabled_ != false) { + output.writeBool(1, eucDisabled_); + } + if (bypassActasCheck_ != false) { + output.writeBool(2, bypassActasCheck_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (eucDisabled_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, eucDisabled_); + } + if (bypassActasCheck_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, bypassActasCheck_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.NotebookEucConfig)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.NotebookEucConfig other = + (com.google.cloud.aiplatform.v1beta1.NotebookEucConfig) obj; + + if (getEucDisabled() != other.getEucDisabled()) return false; + if (getBypassActasCheck() != other.getBypassActasCheck()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + EUC_DISABLED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEucDisabled()); + hash = (37 * hash) + BYPASS_ACTAS_CHECK_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getBypassActasCheck()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.NotebookEucConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.NotebookEucConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.NotebookEucConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.NotebookEucConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.NotebookEucConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.NotebookEucConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.NotebookEucConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.NotebookEucConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.NotebookEucConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.NotebookEucConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.NotebookEucConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.NotebookEucConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.NotebookEucConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The euc configuration of NotebookRuntimeTemplate.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.NotebookEucConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.NotebookEucConfig) + com.google.cloud.aiplatform.v1beta1.NotebookEucConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.NotebookEucConfigProto + .internal_static_google_cloud_aiplatform_v1beta1_NotebookEucConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.NotebookEucConfigProto + .internal_static_google_cloud_aiplatform_v1beta1_NotebookEucConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.NotebookEucConfig.class, + com.google.cloud.aiplatform.v1beta1.NotebookEucConfig.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.NotebookEucConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + eucDisabled_ = false; + bypassActasCheck_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.NotebookEucConfigProto + .internal_static_google_cloud_aiplatform_v1beta1_NotebookEucConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NotebookEucConfig getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.NotebookEucConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NotebookEucConfig build() { + com.google.cloud.aiplatform.v1beta1.NotebookEucConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NotebookEucConfig buildPartial() { + com.google.cloud.aiplatform.v1beta1.NotebookEucConfig result = + new com.google.cloud.aiplatform.v1beta1.NotebookEucConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1beta1.NotebookEucConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.eucDisabled_ = eucDisabled_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.bypassActasCheck_ = bypassActasCheck_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1beta1.NotebookEucConfig) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.NotebookEucConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.NotebookEucConfig other) { + if (other == com.google.cloud.aiplatform.v1beta1.NotebookEucConfig.getDefaultInstance()) + return this; + if (other.getEucDisabled() != false) { + setEucDisabled(other.getEucDisabled()); + } + if (other.getBypassActasCheck() != false) { + setBypassActasCheck(other.getBypassActasCheck()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + eucDisabled_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + bypassActasCheck_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private boolean eucDisabled_; + /** + * + * + *
+     * Input only. Whether EUC is disabled in this NotebookRuntimeTemplate.
+     * In proto3, the default value of a boolean is false. In this way, by default
+     * EUC will be enabled for NotebookRuntimeTemplate.
+     * 
+ * + * bool euc_disabled = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The eucDisabled. + */ + @java.lang.Override + public boolean getEucDisabled() { + return eucDisabled_; + } + /** + * + * + *
+     * Input only. Whether EUC is disabled in this NotebookRuntimeTemplate.
+     * In proto3, the default value of a boolean is false. In this way, by default
+     * EUC will be enabled for NotebookRuntimeTemplate.
+     * 
+ * + * bool euc_disabled = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @param value The eucDisabled to set. + * @return This builder for chaining. + */ + public Builder setEucDisabled(boolean value) { + + eucDisabled_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Input only. Whether EUC is disabled in this NotebookRuntimeTemplate.
+     * In proto3, the default value of a boolean is false. In this way, by default
+     * EUC will be enabled for NotebookRuntimeTemplate.
+     * 
+ * + * bool euc_disabled = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearEucDisabled() { + bitField0_ = (bitField0_ & ~0x00000001); + eucDisabled_ = false; + onChanged(); + return this; + } + + private boolean bypassActasCheck_; + /** + * + * + *
+     * Output only. Whether ActAs check is bypassed for service account attached
+     * to the VM. If false, we need ActAs check for the default Compute Engine
+     * Service account. When a Runtime is created, a VM is allocated using Default
+     * Compute Engine Service Account. Any user requesting to use this Runtime
+     * requires Service Account User (ActAs) permission over this SA. If true,
+     * Runtime owner is using EUC and does not require the above permission as VM
+     * no longer use default Compute Engine SA, but a P4SA.
+     * 
+ * + * bool bypass_actas_check = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bypassActasCheck. + */ + @java.lang.Override + public boolean getBypassActasCheck() { + return bypassActasCheck_; + } + /** + * + * + *
+     * Output only. Whether ActAs check is bypassed for service account attached
+     * to the VM. If false, we need ActAs check for the default Compute Engine
+     * Service account. When a Runtime is created, a VM is allocated using Default
+     * Compute Engine Service Account. Any user requesting to use this Runtime
+     * requires Service Account User (ActAs) permission over this SA. If true,
+     * Runtime owner is using EUC and does not require the above permission as VM
+     * no longer use default Compute Engine SA, but a P4SA.
+     * 
+ * + * bool bypass_actas_check = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bypassActasCheck to set. + * @return This builder for chaining. + */ + public Builder setBypassActasCheck(boolean value) { + + bypassActasCheck_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Whether ActAs check is bypassed for service account attached
+     * to the VM. If false, we need ActAs check for the default Compute Engine
+     * Service account. When a Runtime is created, a VM is allocated using Default
+     * Compute Engine Service Account. Any user requesting to use this Runtime
+     * requires Service Account User (ActAs) permission over this SA. If true,
+     * Runtime owner is using EUC and does not require the above permission as VM
+     * no longer use default Compute Engine SA, but a P4SA.
+     * 
+ * + * bool bypass_actas_check = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearBypassActasCheck() { + bitField0_ = (bitField0_ & ~0x00000002); + bypassActasCheck_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.NotebookEucConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.NotebookEucConfig) + private static final com.google.cloud.aiplatform.v1beta1.NotebookEucConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.NotebookEucConfig(); + } + + public static com.google.cloud.aiplatform.v1beta1.NotebookEucConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NotebookEucConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NotebookEucConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NotebookEucConfigOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NotebookEucConfigOrBuilder.java new file mode 100644 index 000000000000..80f3be8d0389 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NotebookEucConfigOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/notebook_euc_config.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +public interface NotebookEucConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.NotebookEucConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Input only. Whether EUC is disabled in this NotebookRuntimeTemplate.
+   * In proto3, the default value of a boolean is false. In this way, by default
+   * EUC will be enabled for NotebookRuntimeTemplate.
+   * 
+ * + * bool euc_disabled = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The eucDisabled. + */ + boolean getEucDisabled(); + + /** + * + * + *
+   * Output only. Whether ActAs check is bypassed for service account attached
+   * to the VM. If false, we need ActAs check for the default Compute Engine
+   * Service account. When a Runtime is created, a VM is allocated using Default
+   * Compute Engine Service Account. Any user requesting to use this Runtime
+   * requires Service Account User (ActAs) permission over this SA. If true,
+   * Runtime owner is using EUC and does not require the above permission as VM
+   * no longer use default Compute Engine SA, but a P4SA.
+   * 
+ * + * bool bypass_actas_check = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bypassActasCheck. + */ + boolean getBypassActasCheck(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NotebookEucConfigProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NotebookEucConfigProto.java new file mode 100644 index 000000000000..4e49f78096fb --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NotebookEucConfigProto.java @@ -0,0 +1,80 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/notebook_euc_config.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +public final class NotebookEucConfigProto { + private NotebookEucConfigProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_NotebookEucConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_NotebookEucConfig_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n9google/cloud/aiplatform/v1beta1/notebo" + + "ok_euc_config.proto\022\037google.cloud.aiplat" + + "form.v1beta1\032\037google/api/field_behavior." + + "proto\"O\n\021NotebookEucConfig\022\031\n\014euc_disabl" + + "ed\030\001 \001(\010B\003\340A\004\022\037\n\022bypass_actas_check\030\002 \001(" + + "\010B\003\340A\003B\355\001\n#com.google.cloud.aiplatform.v" + + "1beta1B\026NotebookEucConfigProtoP\001ZCcloud." + + "google.com/go/aiplatform/apiv1beta1/aipl" + + "atformpb;aiplatformpb\252\002\037Google.Cloud.AIP" + + "latform.V1Beta1\312\002\037Google\\Cloud\\AIPlatfor" + + "m\\V1beta1\352\002\"Google::Cloud::AIPlatform::V" + + "1beta1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1beta1_NotebookEucConfig_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1beta1_NotebookEucConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_NotebookEucConfig_descriptor, + new java.lang.String[] { + "EucDisabled", "BypassActasCheck", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NotebookIdleShutdownConfig.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NotebookIdleShutdownConfig.java new file mode 100644 index 000000000000..caf43a24aa9f --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NotebookIdleShutdownConfig.java @@ -0,0 +1,856 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/notebook_idle_shutdown_config.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * The idle shutdown configuration of NotebookRuntimeTemplate, which contains
+ * the idle_timeout as required field.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig} + */ +public final class NotebookIdleShutdownConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig) + NotebookIdleShutdownConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use NotebookIdleShutdownConfig.newBuilder() to construct. + private NotebookIdleShutdownConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private NotebookIdleShutdownConfig() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new NotebookIdleShutdownConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfigProto + .internal_static_google_cloud_aiplatform_v1beta1_NotebookIdleShutdownConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfigProto + .internal_static_google_cloud_aiplatform_v1beta1_NotebookIdleShutdownConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig.class, + com.google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig.Builder.class); + } + + private int bitField0_; + public static final int IDLE_TIMEOUT_FIELD_NUMBER = 1; + private com.google.protobuf.Duration idleTimeout_; + /** + * + * + *
+   * Required. Duration is accurate to the second. In Notebook, Idle Timeout is
+   * accurate to minute so the range of idle_timeout (second) is: 10 * 60 ~ 1440
+   * * 60.
+   * 
+ * + * .google.protobuf.Duration idle_timeout = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the idleTimeout field is set. + */ + @java.lang.Override + public boolean hasIdleTimeout() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. Duration is accurate to the second. In Notebook, Idle Timeout is
+   * accurate to minute so the range of idle_timeout (second) is: 10 * 60 ~ 1440
+   * * 60.
+   * 
+ * + * .google.protobuf.Duration idle_timeout = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The idleTimeout. + */ + @java.lang.Override + public com.google.protobuf.Duration getIdleTimeout() { + return idleTimeout_ == null ? com.google.protobuf.Duration.getDefaultInstance() : idleTimeout_; + } + /** + * + * + *
+   * Required. Duration is accurate to the second. In Notebook, Idle Timeout is
+   * accurate to minute so the range of idle_timeout (second) is: 10 * 60 ~ 1440
+   * * 60.
+   * 
+ * + * .google.protobuf.Duration idle_timeout = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getIdleTimeoutOrBuilder() { + return idleTimeout_ == null ? com.google.protobuf.Duration.getDefaultInstance() : idleTimeout_; + } + + public static final int IDLE_SHUTDOWN_DISABLED_FIELD_NUMBER = 2; + private boolean idleShutdownDisabled_ = false; + /** + * + * + *
+   * Whether Idle Shutdown is disabled in this NotebookRuntimeTemplate.
+   * 
+ * + * bool idle_shutdown_disabled = 2; + * + * @return The idleShutdownDisabled. + */ + @java.lang.Override + public boolean getIdleShutdownDisabled() { + return idleShutdownDisabled_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getIdleTimeout()); + } + if (idleShutdownDisabled_ != false) { + output.writeBool(2, idleShutdownDisabled_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getIdleTimeout()); + } + if (idleShutdownDisabled_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, idleShutdownDisabled_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig other = + (com.google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig) obj; + + if (hasIdleTimeout() != other.hasIdleTimeout()) return false; + if (hasIdleTimeout()) { + if (!getIdleTimeout().equals(other.getIdleTimeout())) return false; + } + if (getIdleShutdownDisabled() != other.getIdleShutdownDisabled()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasIdleTimeout()) { + hash = (37 * hash) + IDLE_TIMEOUT_FIELD_NUMBER; + hash = (53 * hash) + getIdleTimeout().hashCode(); + } + hash = (37 * hash) + IDLE_SHUTDOWN_DISABLED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIdleShutdownDisabled()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The idle shutdown configuration of NotebookRuntimeTemplate, which contains
+   * the idle_timeout as required field.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig) + com.google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfigProto + .internal_static_google_cloud_aiplatform_v1beta1_NotebookIdleShutdownConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfigProto + .internal_static_google_cloud_aiplatform_v1beta1_NotebookIdleShutdownConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig.class, + com.google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getIdleTimeoutFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + idleTimeout_ = null; + if (idleTimeoutBuilder_ != null) { + idleTimeoutBuilder_.dispose(); + idleTimeoutBuilder_ = null; + } + idleShutdownDisabled_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfigProto + .internal_static_google_cloud_aiplatform_v1beta1_NotebookIdleShutdownConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig build() { + com.google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig buildPartial() { + com.google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig result = + new com.google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.idleTimeout_ = + idleTimeoutBuilder_ == null ? idleTimeout_ : idleTimeoutBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.idleShutdownDisabled_ = idleShutdownDisabled_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig other) { + if (other + == com.google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig.getDefaultInstance()) + return this; + if (other.hasIdleTimeout()) { + mergeIdleTimeout(other.getIdleTimeout()); + } + if (other.getIdleShutdownDisabled() != false) { + setIdleShutdownDisabled(other.getIdleShutdownDisabled()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getIdleTimeoutFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + idleShutdownDisabled_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.Duration idleTimeout_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + idleTimeoutBuilder_; + /** + * + * + *
+     * Required. Duration is accurate to the second. In Notebook, Idle Timeout is
+     * accurate to minute so the range of idle_timeout (second) is: 10 * 60 ~ 1440
+     * * 60.
+     * 
+ * + * .google.protobuf.Duration idle_timeout = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the idleTimeout field is set. + */ + public boolean hasIdleTimeout() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Required. Duration is accurate to the second. In Notebook, Idle Timeout is
+     * accurate to minute so the range of idle_timeout (second) is: 10 * 60 ~ 1440
+     * * 60.
+     * 
+ * + * .google.protobuf.Duration idle_timeout = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The idleTimeout. + */ + public com.google.protobuf.Duration getIdleTimeout() { + if (idleTimeoutBuilder_ == null) { + return idleTimeout_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : idleTimeout_; + } else { + return idleTimeoutBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Duration is accurate to the second. In Notebook, Idle Timeout is
+     * accurate to minute so the range of idle_timeout (second) is: 10 * 60 ~ 1440
+     * * 60.
+     * 
+ * + * .google.protobuf.Duration idle_timeout = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setIdleTimeout(com.google.protobuf.Duration value) { + if (idleTimeoutBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + idleTimeout_ = value; + } else { + idleTimeoutBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Duration is accurate to the second. In Notebook, Idle Timeout is
+     * accurate to minute so the range of idle_timeout (second) is: 10 * 60 ~ 1440
+     * * 60.
+     * 
+ * + * .google.protobuf.Duration idle_timeout = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setIdleTimeout(com.google.protobuf.Duration.Builder builderForValue) { + if (idleTimeoutBuilder_ == null) { + idleTimeout_ = builderForValue.build(); + } else { + idleTimeoutBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Duration is accurate to the second. In Notebook, Idle Timeout is
+     * accurate to minute so the range of idle_timeout (second) is: 10 * 60 ~ 1440
+     * * 60.
+     * 
+ * + * .google.protobuf.Duration idle_timeout = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeIdleTimeout(com.google.protobuf.Duration value) { + if (idleTimeoutBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && idleTimeout_ != null + && idleTimeout_ != com.google.protobuf.Duration.getDefaultInstance()) { + getIdleTimeoutBuilder().mergeFrom(value); + } else { + idleTimeout_ = value; + } + } else { + idleTimeoutBuilder_.mergeFrom(value); + } + if (idleTimeout_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. Duration is accurate to the second. In Notebook, Idle Timeout is
+     * accurate to minute so the range of idle_timeout (second) is: 10 * 60 ~ 1440
+     * * 60.
+     * 
+ * + * .google.protobuf.Duration idle_timeout = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearIdleTimeout() { + bitField0_ = (bitField0_ & ~0x00000001); + idleTimeout_ = null; + if (idleTimeoutBuilder_ != null) { + idleTimeoutBuilder_.dispose(); + idleTimeoutBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Duration is accurate to the second. In Notebook, Idle Timeout is
+     * accurate to minute so the range of idle_timeout (second) is: 10 * 60 ~ 1440
+     * * 60.
+     * 
+ * + * .google.protobuf.Duration idle_timeout = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.Duration.Builder getIdleTimeoutBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getIdleTimeoutFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Duration is accurate to the second. In Notebook, Idle Timeout is
+     * accurate to minute so the range of idle_timeout (second) is: 10 * 60 ~ 1440
+     * * 60.
+     * 
+ * + * .google.protobuf.Duration idle_timeout = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.DurationOrBuilder getIdleTimeoutOrBuilder() { + if (idleTimeoutBuilder_ != null) { + return idleTimeoutBuilder_.getMessageOrBuilder(); + } else { + return idleTimeout_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : idleTimeout_; + } + } + /** + * + * + *
+     * Required. Duration is accurate to the second. In Notebook, Idle Timeout is
+     * accurate to minute so the range of idle_timeout (second) is: 10 * 60 ~ 1440
+     * * 60.
+     * 
+ * + * .google.protobuf.Duration idle_timeout = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getIdleTimeoutFieldBuilder() { + if (idleTimeoutBuilder_ == null) { + idleTimeoutBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getIdleTimeout(), getParentForChildren(), isClean()); + idleTimeout_ = null; + } + return idleTimeoutBuilder_; + } + + private boolean idleShutdownDisabled_; + /** + * + * + *
+     * Whether Idle Shutdown is disabled in this NotebookRuntimeTemplate.
+     * 
+ * + * bool idle_shutdown_disabled = 2; + * + * @return The idleShutdownDisabled. + */ + @java.lang.Override + public boolean getIdleShutdownDisabled() { + return idleShutdownDisabled_; + } + /** + * + * + *
+     * Whether Idle Shutdown is disabled in this NotebookRuntimeTemplate.
+     * 
+ * + * bool idle_shutdown_disabled = 2; + * + * @param value The idleShutdownDisabled to set. + * @return This builder for chaining. + */ + public Builder setIdleShutdownDisabled(boolean value) { + + idleShutdownDisabled_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Whether Idle Shutdown is disabled in this NotebookRuntimeTemplate.
+     * 
+ * + * bool idle_shutdown_disabled = 2; + * + * @return This builder for chaining. + */ + public Builder clearIdleShutdownDisabled() { + bitField0_ = (bitField0_ & ~0x00000002); + idleShutdownDisabled_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig) + private static final com.google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig(); + } + + public static com.google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NotebookIdleShutdownConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NotebookIdleShutdownConfigOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NotebookIdleShutdownConfigOrBuilder.java new file mode 100644 index 000000000000..6f46433e3e3e --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NotebookIdleShutdownConfigOrBuilder.java @@ -0,0 +1,83 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/notebook_idle_shutdown_config.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +public interface NotebookIdleShutdownConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Duration is accurate to the second. In Notebook, Idle Timeout is
+   * accurate to minute so the range of idle_timeout (second) is: 10 * 60 ~ 1440
+   * * 60.
+   * 
+ * + * .google.protobuf.Duration idle_timeout = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the idleTimeout field is set. + */ + boolean hasIdleTimeout(); + /** + * + * + *
+   * Required. Duration is accurate to the second. In Notebook, Idle Timeout is
+   * accurate to minute so the range of idle_timeout (second) is: 10 * 60 ~ 1440
+   * * 60.
+   * 
+ * + * .google.protobuf.Duration idle_timeout = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The idleTimeout. + */ + com.google.protobuf.Duration getIdleTimeout(); + /** + * + * + *
+   * Required. Duration is accurate to the second. In Notebook, Idle Timeout is
+   * accurate to minute so the range of idle_timeout (second) is: 10 * 60 ~ 1440
+   * * 60.
+   * 
+ * + * .google.protobuf.Duration idle_timeout = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.DurationOrBuilder getIdleTimeoutOrBuilder(); + + /** + * + * + *
+   * Whether Idle Shutdown is disabled in this NotebookRuntimeTemplate.
+   * 
+ * + * bool idle_shutdown_disabled = 2; + * + * @return The idleShutdownDisabled. + */ + boolean getIdleShutdownDisabled(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NotebookIdleShutdownConfigProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NotebookIdleShutdownConfigProto.java new file mode 100644 index 000000000000..f197bd2b43b7 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NotebookIdleShutdownConfigProto.java @@ -0,0 +1,84 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/notebook_idle_shutdown_config.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +public final class NotebookIdleShutdownConfigProto { + private NotebookIdleShutdownConfigProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_NotebookIdleShutdownConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_NotebookIdleShutdownConfig_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\nCgoogle/cloud/aiplatform/v1beta1/notebo" + + "ok_idle_shutdown_config.proto\022\037google.cl" + + "oud.aiplatform.v1beta1\032\037google/api/field" + + "_behavior.proto\032\036google/protobuf/duratio" + + "n.proto\"r\n\032NotebookIdleShutdownConfig\0224\n" + + "\014idle_timeout\030\001 \001(\0132\031.google.protobuf.Du" + + "rationB\003\340A\002\022\036\n\026idle_shutdown_disabled\030\002 " + + "\001(\010B\366\001\n#com.google.cloud.aiplatform.v1be" + + "ta1B\037NotebookIdleShutdownConfigProtoP\001ZC" + + "cloud.google.com/go/aiplatform/apiv1beta" + + "1/aiplatformpb;aiplatformpb\252\002\037Google.Clo" + + "ud.AIPlatform.V1Beta1\312\002\037Google\\Cloud\\AIP" + + "latform\\V1beta1\352\002\"Google::Cloud::AIPlatf" + + "orm::V1beta1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.protobuf.DurationProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1beta1_NotebookIdleShutdownConfig_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1beta1_NotebookIdleShutdownConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_NotebookIdleShutdownConfig_descriptor, + new java.lang.String[] { + "IdleTimeout", "IdleShutdownDisabled", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.protobuf.DurationProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NotebookRuntime.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NotebookRuntime.java new file mode 100644 index 000000000000..37daca755619 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NotebookRuntime.java @@ -0,0 +1,4831 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/notebook_runtime.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * A runtime is a virtual machine allocated to a particular user for a
+ * particular Notebook file on temporary basis with lifetime limited to 24
+ * hours.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.NotebookRuntime} + */ +public final class NotebookRuntime extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.NotebookRuntime) + NotebookRuntimeOrBuilder { + private static final long serialVersionUID = 0L; + // Use NotebookRuntime.newBuilder() to construct. + private NotebookRuntime(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private NotebookRuntime() { + name_ = ""; + runtimeUser_ = ""; + proxyUri_ = ""; + healthState_ = 0; + displayName_ = ""; + description_ = ""; + serviceAccount_ = ""; + runtimeState_ = 0; + version_ = ""; + notebookRuntimeType_ = 0; + networkTags_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new NotebookRuntime(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.NotebookRuntimeProto + .internal_static_google_cloud_aiplatform_v1beta1_NotebookRuntime_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 16: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.NotebookRuntimeProto + .internal_static_google_cloud_aiplatform_v1beta1_NotebookRuntime_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.NotebookRuntime.class, + com.google.cloud.aiplatform.v1beta1.NotebookRuntime.Builder.class); + } + + /** + * + * + *
+   * The substate of the NotebookRuntime to display health information.
+   * 
+ * + * Protobuf enum {@code google.cloud.aiplatform.v1beta1.NotebookRuntime.HealthState} + */ + public enum HealthState implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified health state.
+     * 
+ * + * HEALTH_STATE_UNSPECIFIED = 0; + */ + HEALTH_STATE_UNSPECIFIED(0), + /** + * + * + *
+     * NotebookRuntime is in healthy state. Applies to ACTIVE state.
+     * 
+ * + * HEALTHY = 1; + */ + HEALTHY(1), + /** + * + * + *
+     * NotebookRuntime is in unhealthy state. Applies to ACTIVE state.
+     * 
+ * + * UNHEALTHY = 2; + */ + UNHEALTHY(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified health state.
+     * 
+ * + * HEALTH_STATE_UNSPECIFIED = 0; + */ + public static final int HEALTH_STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * NotebookRuntime is in healthy state. Applies to ACTIVE state.
+     * 
+ * + * HEALTHY = 1; + */ + public static final int HEALTHY_VALUE = 1; + /** + * + * + *
+     * NotebookRuntime is in unhealthy state. Applies to ACTIVE state.
+     * 
+ * + * UNHEALTHY = 2; + */ + public static final int UNHEALTHY_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static HealthState valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static HealthState forNumber(int value) { + switch (value) { + case 0: + return HEALTH_STATE_UNSPECIFIED; + case 1: + return HEALTHY; + case 2: + return UNHEALTHY; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public HealthState findValueByNumber(int number) { + return HealthState.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.NotebookRuntime.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final HealthState[] VALUES = values(); + + public static HealthState valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private HealthState(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.aiplatform.v1beta1.NotebookRuntime.HealthState) + } + + /** + * + * + *
+   * The substate of the NotebookRuntime to display state of runtime.
+   * The resource of NotebookRuntime is in ACTIVE state for these sub state.
+   * 
+ * + * Protobuf enum {@code google.cloud.aiplatform.v1beta1.NotebookRuntime.RuntimeState} + */ + public enum RuntimeState implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified runtime state.
+     * 
+ * + * RUNTIME_STATE_UNSPECIFIED = 0; + */ + RUNTIME_STATE_UNSPECIFIED(0), + /** + * + * + *
+     * NotebookRuntime is in running state.
+     * 
+ * + * RUNNING = 1; + */ + RUNNING(1), + /** + * + * + *
+     * NotebookRuntime is in starting state.
+     * 
+ * + * BEING_STARTED = 2; + */ + BEING_STARTED(2), + /** + * + * + *
+     * NotebookRuntime is in stopping state.
+     * 
+ * + * BEING_STOPPED = 3; + */ + BEING_STOPPED(3), + /** + * + * + *
+     * NotebookRuntime is in stopped state.
+     * 
+ * + * STOPPED = 4; + */ + STOPPED(4), + /** + * + * + *
+     * NotebookRuntime is in upgrading state. It is in the middle of upgrading
+     * process.
+     * 
+ * + * BEING_UPGRADED = 5; + */ + BEING_UPGRADED(5), + /** + * + * + *
+     * NotebookRuntime was unable to start/stop properly.
+     * 
+ * + * ERROR = 100; + */ + ERROR(100), + /** + * + * + *
+     * NotebookRuntime is in invalid state. Cannot be recovered.
+     * 
+ * + * INVALID = 101; + */ + INVALID(101), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified runtime state.
+     * 
+ * + * RUNTIME_STATE_UNSPECIFIED = 0; + */ + public static final int RUNTIME_STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * NotebookRuntime is in running state.
+     * 
+ * + * RUNNING = 1; + */ + public static final int RUNNING_VALUE = 1; + /** + * + * + *
+     * NotebookRuntime is in starting state.
+     * 
+ * + * BEING_STARTED = 2; + */ + public static final int BEING_STARTED_VALUE = 2; + /** + * + * + *
+     * NotebookRuntime is in stopping state.
+     * 
+ * + * BEING_STOPPED = 3; + */ + public static final int BEING_STOPPED_VALUE = 3; + /** + * + * + *
+     * NotebookRuntime is in stopped state.
+     * 
+ * + * STOPPED = 4; + */ + public static final int STOPPED_VALUE = 4; + /** + * + * + *
+     * NotebookRuntime is in upgrading state. It is in the middle of upgrading
+     * process.
+     * 
+ * + * BEING_UPGRADED = 5; + */ + public static final int BEING_UPGRADED_VALUE = 5; + /** + * + * + *
+     * NotebookRuntime was unable to start/stop properly.
+     * 
+ * + * ERROR = 100; + */ + public static final int ERROR_VALUE = 100; + /** + * + * + *
+     * NotebookRuntime is in invalid state. Cannot be recovered.
+     * 
+ * + * INVALID = 101; + */ + public static final int INVALID_VALUE = 101; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static RuntimeState valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static RuntimeState forNumber(int value) { + switch (value) { + case 0: + return RUNTIME_STATE_UNSPECIFIED; + case 1: + return RUNNING; + case 2: + return BEING_STARTED; + case 3: + return BEING_STOPPED; + case 4: + return STOPPED; + case 5: + return BEING_UPGRADED; + case 100: + return ERROR; + case 101: + return INVALID; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public RuntimeState findValueByNumber(int number) { + return RuntimeState.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.NotebookRuntime.getDescriptor() + .getEnumTypes() + .get(1); + } + + private static final RuntimeState[] VALUES = values(); + + public static RuntimeState valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private RuntimeState(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.aiplatform.v1beta1.NotebookRuntime.RuntimeState) + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Output only. The resource name of the NotebookRuntime.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The resource name of the NotebookRuntime.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RUNTIME_USER_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object runtimeUser_ = ""; + /** + * + * + *
+   * Required. The user email of the NotebookRuntime.
+   * 
+ * + * string runtime_user = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The runtimeUser. + */ + @java.lang.Override + public java.lang.String getRuntimeUser() { + java.lang.Object ref = runtimeUser_; + 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(); + runtimeUser_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The user email of the NotebookRuntime.
+   * 
+ * + * string runtime_user = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for runtimeUser. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRuntimeUserBytes() { + java.lang.Object ref = runtimeUser_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + runtimeUser_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NOTEBOOK_RUNTIME_TEMPLATE_REF_FIELD_NUMBER = 3; + private com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef + notebookRuntimeTemplateRef_; + /** + * + * + *
+   * Output only. The pointer to NotebookRuntimeTemplate this NotebookRuntime is
+   * created from.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef notebook_runtime_template_ref = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the notebookRuntimeTemplateRef field is set. + */ + @java.lang.Override + public boolean hasNotebookRuntimeTemplateRef() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Output only. The pointer to NotebookRuntimeTemplate this NotebookRuntime is
+   * created from.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef notebook_runtime_template_ref = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The notebookRuntimeTemplateRef. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef + getNotebookRuntimeTemplateRef() { + return notebookRuntimeTemplateRef_ == null + ? com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef.getDefaultInstance() + : notebookRuntimeTemplateRef_; + } + /** + * + * + *
+   * Output only. The pointer to NotebookRuntimeTemplate this NotebookRuntime is
+   * created from.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef notebook_runtime_template_ref = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRefOrBuilder + getNotebookRuntimeTemplateRefOrBuilder() { + return notebookRuntimeTemplateRef_ == null + ? com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef.getDefaultInstance() + : notebookRuntimeTemplateRef_; + } + + public static final int PROXY_URI_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object proxyUri_ = ""; + /** + * + * + *
+   * Output only. The proxy endpoint used to access the NotebookRuntime.
+   * 
+ * + * string proxy_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The proxyUri. + */ + @java.lang.Override + public java.lang.String getProxyUri() { + java.lang.Object ref = proxyUri_; + 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(); + proxyUri_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The proxy endpoint used to access the NotebookRuntime.
+   * 
+ * + * string proxy_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for proxyUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProxyUriBytes() { + java.lang.Object ref = proxyUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + proxyUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. Timestamp when this NotebookRuntime was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Output only. Timestamp when this NotebookRuntime was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. Timestamp when this NotebookRuntime was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. Timestamp when this NotebookRuntime was most recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+   * Output only. Timestamp when this NotebookRuntime was most recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. Timestamp when this NotebookRuntime was most recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int HEALTH_STATE_FIELD_NUMBER = 8; + private int healthState_ = 0; + /** + * + * + *
+   * Output only. The health state of the NotebookRuntime.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntime.HealthState health_state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for healthState. + */ + @java.lang.Override + public int getHealthStateValue() { + return healthState_; + } + /** + * + * + *
+   * Output only. The health state of the NotebookRuntime.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntime.HealthState health_state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The healthState. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NotebookRuntime.HealthState getHealthState() { + com.google.cloud.aiplatform.v1beta1.NotebookRuntime.HealthState result = + com.google.cloud.aiplatform.v1beta1.NotebookRuntime.HealthState.forNumber(healthState_); + return result == null + ? com.google.cloud.aiplatform.v1beta1.NotebookRuntime.HealthState.UNRECOGNIZED + : result; + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 10; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + /** + * + * + *
+   * Required. The display name of the NotebookRuntime.
+   * The name can be up to 128 characters long and can consist of any UTF-8
+   * characters.
+   * 
+ * + * string display_name = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + 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(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The display name of the NotebookRuntime.
+   * The name can be up to 128 characters long and can consist of any UTF-8
+   * characters.
+   * 
+ * + * string display_name = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 11; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + * + * + *
+   * The description of the NotebookRuntime.
+   * 
+ * + * string description = 11; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + 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(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * The description of the NotebookRuntime.
+   * 
+ * + * string description = 11; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SERVICE_ACCOUNT_FIELD_NUMBER = 13; + + @SuppressWarnings("serial") + private volatile java.lang.Object serviceAccount_ = ""; + /** + * + * + *
+   * Output only. The service account that the NotebookRuntime workload runs as.
+   * 
+ * + * string service_account = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The serviceAccount. + */ + @java.lang.Override + public java.lang.String getServiceAccount() { + java.lang.Object ref = serviceAccount_; + 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(); + serviceAccount_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The service account that the NotebookRuntime workload runs as.
+   * 
+ * + * string service_account = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for serviceAccount. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServiceAccountBytes() { + java.lang.Object ref = serviceAccount_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceAccount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RUNTIME_STATE_FIELD_NUMBER = 14; + private int runtimeState_ = 0; + /** + * + * + *
+   * Output only. The runtime (instance) state of the NotebookRuntime.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntime.RuntimeState runtime_state = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for runtimeState. + */ + @java.lang.Override + public int getRuntimeStateValue() { + return runtimeState_; + } + /** + * + * + *
+   * Output only. The runtime (instance) state of the NotebookRuntime.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntime.RuntimeState runtime_state = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The runtimeState. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NotebookRuntime.RuntimeState getRuntimeState() { + com.google.cloud.aiplatform.v1beta1.NotebookRuntime.RuntimeState result = + com.google.cloud.aiplatform.v1beta1.NotebookRuntime.RuntimeState.forNumber(runtimeState_); + return result == null + ? com.google.cloud.aiplatform.v1beta1.NotebookRuntime.RuntimeState.UNRECOGNIZED + : result; + } + + public static final int IS_UPGRADABLE_FIELD_NUMBER = 15; + private boolean isUpgradable_ = false; + /** + * + * + *
+   * Output only. Whether NotebookRuntime is upgradable.
+   * 
+ * + * bool is_upgradable = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The isUpgradable. + */ + @java.lang.Override + public boolean getIsUpgradable() { + return isUpgradable_; + } + + public static final int LABELS_FIELD_NUMBER = 16; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeProto + .internal_static_google_cloud_aiplatform_v1beta1_NotebookRuntime_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * The labels with user-defined metadata to organize your
+   * NotebookRuntime.
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one NotebookRuntime
+   * (System labels are excluded).
+   *
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+   * and are immutable. Following system labels exist for NotebookRuntime:
+   *
+   * * "aiplatform.googleapis.com/notebook_runtime_gce_instance_id": output
+   * only, its value is the Compute Engine instance id.
+   * * "aiplatform.googleapis.com/colab_enterprise_entry_service": its value is
+   * either "bigquery" or "vertex"; if absent, it should be "vertex". This is to
+   * describe the entry service, either BigQuery or Vertex.
+   * 
+ * + * map<string, string> labels = 16; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * The labels with user-defined metadata to organize your
+   * NotebookRuntime.
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one NotebookRuntime
+   * (System labels are excluded).
+   *
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+   * and are immutable. Following system labels exist for NotebookRuntime:
+   *
+   * * "aiplatform.googleapis.com/notebook_runtime_gce_instance_id": output
+   * only, its value is the Compute Engine instance id.
+   * * "aiplatform.googleapis.com/colab_enterprise_entry_service": its value is
+   * either "bigquery" or "vertex"; if absent, it should be "vertex". This is to
+   * describe the entry service, either BigQuery or Vertex.
+   * 
+ * + * map<string, string> labels = 16; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * The labels with user-defined metadata to organize your
+   * NotebookRuntime.
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one NotebookRuntime
+   * (System labels are excluded).
+   *
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+   * and are immutable. Following system labels exist for NotebookRuntime:
+   *
+   * * "aiplatform.googleapis.com/notebook_runtime_gce_instance_id": output
+   * only, its value is the Compute Engine instance id.
+   * * "aiplatform.googleapis.com/colab_enterprise_entry_service": its value is
+   * either "bigquery" or "vertex"; if absent, it should be "vertex". This is to
+   * describe the entry service, either BigQuery or Vertex.
+   * 
+ * + * map<string, string> labels = 16; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * The labels with user-defined metadata to organize your
+   * NotebookRuntime.
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one NotebookRuntime
+   * (System labels are excluded).
+   *
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+   * and are immutable. Following system labels exist for NotebookRuntime:
+   *
+   * * "aiplatform.googleapis.com/notebook_runtime_gce_instance_id": output
+   * only, its value is the Compute Engine instance id.
+   * * "aiplatform.googleapis.com/colab_enterprise_entry_service": its value is
+   * either "bigquery" or "vertex"; if absent, it should be "vertex". This is to
+   * describe the entry service, either BigQuery or Vertex.
+   * 
+ * + * map<string, string> labels = 16; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int EXPIRATION_TIME_FIELD_NUMBER = 17; + private com.google.protobuf.Timestamp expirationTime_; + /** + * + * + *
+   * Output only. Timestamp when this NotebookRuntime will be expired:
+   * 1. System Predefined NotebookRuntime: 24 hours after creation. After
+   * expiration, system predifined runtime will be deleted.
+   * 2. User created NotebookRuntime: 6 months after last upgrade. After
+   * expiration, user created runtime will be stopped and allowed for upgrade.
+   * 
+ * + * + * .google.protobuf.Timestamp expiration_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the expirationTime field is set. + */ + @java.lang.Override + public boolean hasExpirationTime() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+   * Output only. Timestamp when this NotebookRuntime will be expired:
+   * 1. System Predefined NotebookRuntime: 24 hours after creation. After
+   * expiration, system predifined runtime will be deleted.
+   * 2. User created NotebookRuntime: 6 months after last upgrade. After
+   * expiration, user created runtime will be stopped and allowed for upgrade.
+   * 
+ * + * + * .google.protobuf.Timestamp expiration_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The expirationTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getExpirationTime() { + return expirationTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : expirationTime_; + } + /** + * + * + *
+   * Output only. Timestamp when this NotebookRuntime will be expired:
+   * 1. System Predefined NotebookRuntime: 24 hours after creation. After
+   * expiration, system predifined runtime will be deleted.
+   * 2. User created NotebookRuntime: 6 months after last upgrade. After
+   * expiration, user created runtime will be stopped and allowed for upgrade.
+   * 
+ * + * + * .google.protobuf.Timestamp expiration_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getExpirationTimeOrBuilder() { + return expirationTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : expirationTime_; + } + + public static final int VERSION_FIELD_NUMBER = 18; + + @SuppressWarnings("serial") + private volatile java.lang.Object version_ = ""; + /** + * + * + *
+   * Output only. The VM os image version of NotebookRuntime.
+   * 
+ * + * string version = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The version. + */ + @java.lang.Override + public java.lang.String getVersion() { + java.lang.Object ref = version_; + 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(); + version_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The VM os image version of NotebookRuntime.
+   * 
+ * + * string version = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for version. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NOTEBOOK_RUNTIME_TYPE_FIELD_NUMBER = 19; + private int notebookRuntimeType_ = 0; + /** + * + * + *
+   * Output only. The type of the notebook runtime.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntimeType notebook_runtime_type = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for notebookRuntimeType. + */ + @java.lang.Override + public int getNotebookRuntimeTypeValue() { + return notebookRuntimeType_; + } + /** + * + * + *
+   * Output only. The type of the notebook runtime.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntimeType notebook_runtime_type = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The notebookRuntimeType. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NotebookRuntimeType getNotebookRuntimeType() { + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeType result = + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeType.forNumber(notebookRuntimeType_); + return result == null + ? com.google.cloud.aiplatform.v1beta1.NotebookRuntimeType.UNRECOGNIZED + : result; + } + + public static final int NETWORK_TAGS_FIELD_NUMBER = 25; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList networkTags_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Optional. The Compute Engine tags to add to runtime (see [Tagging
+   * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).
+   * 
+ * + * repeated string network_tags = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the networkTags. + */ + public com.google.protobuf.ProtocolStringList getNetworkTagsList() { + return networkTags_; + } + /** + * + * + *
+   * Optional. The Compute Engine tags to add to runtime (see [Tagging
+   * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).
+   * 
+ * + * repeated string network_tags = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of networkTags. + */ + public int getNetworkTagsCount() { + return networkTags_.size(); + } + /** + * + * + *
+   * Optional. The Compute Engine tags to add to runtime (see [Tagging
+   * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).
+   * 
+ * + * repeated string network_tags = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The networkTags at the given index. + */ + public java.lang.String getNetworkTags(int index) { + return networkTags_.get(index); + } + /** + * + * + *
+   * Optional. The Compute Engine tags to add to runtime (see [Tagging
+   * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).
+   * 
+ * + * repeated string network_tags = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the networkTags at the given index. + */ + public com.google.protobuf.ByteString getNetworkTagsBytes(int index) { + return networkTags_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(runtimeUser_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, runtimeUser_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getNotebookRuntimeTemplateRef()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(proxyUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, proxyUri_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(6, getCreateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(7, getUpdateTime()); + } + if (healthState_ + != com.google.cloud.aiplatform.v1beta1.NotebookRuntime.HealthState.HEALTH_STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(8, healthState_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 10, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 11, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccount_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 13, serviceAccount_); + } + if (runtimeState_ + != com.google.cloud.aiplatform.v1beta1.NotebookRuntime.RuntimeState + .RUNTIME_STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(14, runtimeState_); + } + if (isUpgradable_ != false) { + output.writeBool(15, isUpgradable_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 16); + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(17, getExpirationTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 18, version_); + } + if (notebookRuntimeType_ + != com.google.cloud.aiplatform.v1beta1.NotebookRuntimeType.NOTEBOOK_RUNTIME_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(19, notebookRuntimeType_); + } + for (int i = 0; i < networkTags_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 25, networkTags_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(runtimeUser_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, runtimeUser_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, getNotebookRuntimeTemplateRef()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(proxyUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, proxyUri_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getCreateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getUpdateTime()); + } + if (healthState_ + != com.google.cloud.aiplatform.v1beta1.NotebookRuntime.HealthState.HEALTH_STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(8, healthState_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccount_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, serviceAccount_); + } + if (runtimeState_ + != com.google.cloud.aiplatform.v1beta1.NotebookRuntime.RuntimeState + .RUNTIME_STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(14, runtimeState_); + } + if (isUpgradable_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(15, isUpgradable_); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(16, labels__); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(17, getExpirationTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(18, version_); + } + if (notebookRuntimeType_ + != com.google.cloud.aiplatform.v1beta1.NotebookRuntimeType.NOTEBOOK_RUNTIME_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(19, notebookRuntimeType_); + } + { + int dataSize = 0; + for (int i = 0; i < networkTags_.size(); i++) { + dataSize += computeStringSizeNoTag(networkTags_.getRaw(i)); + } + size += dataSize; + size += 2 * getNetworkTagsList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.NotebookRuntime)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.NotebookRuntime other = + (com.google.cloud.aiplatform.v1beta1.NotebookRuntime) obj; + + if (!getName().equals(other.getName())) return false; + if (!getRuntimeUser().equals(other.getRuntimeUser())) return false; + if (hasNotebookRuntimeTemplateRef() != other.hasNotebookRuntimeTemplateRef()) return false; + if (hasNotebookRuntimeTemplateRef()) { + if (!getNotebookRuntimeTemplateRef().equals(other.getNotebookRuntimeTemplateRef())) + return false; + } + if (!getProxyUri().equals(other.getProxyUri())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (healthState_ != other.healthState_) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!getServiceAccount().equals(other.getServiceAccount())) return false; + if (runtimeState_ != other.runtimeState_) return false; + if (getIsUpgradable() != other.getIsUpgradable()) return false; + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (hasExpirationTime() != other.hasExpirationTime()) return false; + if (hasExpirationTime()) { + if (!getExpirationTime().equals(other.getExpirationTime())) return false; + } + if (!getVersion().equals(other.getVersion())) return false; + if (notebookRuntimeType_ != other.notebookRuntimeType_) return false; + if (!getNetworkTagsList().equals(other.getNetworkTagsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + RUNTIME_USER_FIELD_NUMBER; + hash = (53 * hash) + getRuntimeUser().hashCode(); + if (hasNotebookRuntimeTemplateRef()) { + hash = (37 * hash) + NOTEBOOK_RUNTIME_TEMPLATE_REF_FIELD_NUMBER; + hash = (53 * hash) + getNotebookRuntimeTemplateRef().hashCode(); + } + hash = (37 * hash) + PROXY_URI_FIELD_NUMBER; + hash = (53 * hash) + getProxyUri().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (37 * hash) + HEALTH_STATE_FIELD_NUMBER; + hash = (53 * hash) + healthState_; + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + SERVICE_ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getServiceAccount().hashCode(); + hash = (37 * hash) + RUNTIME_STATE_FIELD_NUMBER; + hash = (53 * hash) + runtimeState_; + hash = (37 * hash) + IS_UPGRADABLE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIsUpgradable()); + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + if (hasExpirationTime()) { + hash = (37 * hash) + EXPIRATION_TIME_FIELD_NUMBER; + hash = (53 * hash) + getExpirationTime().hashCode(); + } + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + hash = (37 * hash) + NOTEBOOK_RUNTIME_TYPE_FIELD_NUMBER; + hash = (53 * hash) + notebookRuntimeType_; + if (getNetworkTagsCount() > 0) { + hash = (37 * hash) + NETWORK_TAGS_FIELD_NUMBER; + hash = (53 * hash) + getNetworkTagsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.NotebookRuntime parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.NotebookRuntime parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.NotebookRuntime parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.NotebookRuntime parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.NotebookRuntime parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.NotebookRuntime parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.NotebookRuntime parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.NotebookRuntime parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.NotebookRuntime parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.NotebookRuntime parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.NotebookRuntime parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.NotebookRuntime parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.aiplatform.v1beta1.NotebookRuntime prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A runtime is a virtual machine allocated to a particular user for a
+   * particular Notebook file on temporary basis with lifetime limited to 24
+   * hours.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.NotebookRuntime} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.NotebookRuntime) + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.NotebookRuntimeProto + .internal_static_google_cloud_aiplatform_v1beta1_NotebookRuntime_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 16: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 16: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.NotebookRuntimeProto + .internal_static_google_cloud_aiplatform_v1beta1_NotebookRuntime_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.NotebookRuntime.class, + com.google.cloud.aiplatform.v1beta1.NotebookRuntime.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.NotebookRuntime.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getNotebookRuntimeTemplateRefFieldBuilder(); + getCreateTimeFieldBuilder(); + getUpdateTimeFieldBuilder(); + getExpirationTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + runtimeUser_ = ""; + notebookRuntimeTemplateRef_ = null; + if (notebookRuntimeTemplateRefBuilder_ != null) { + notebookRuntimeTemplateRefBuilder_.dispose(); + notebookRuntimeTemplateRefBuilder_ = null; + } + proxyUri_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + healthState_ = 0; + displayName_ = ""; + description_ = ""; + serviceAccount_ = ""; + runtimeState_ = 0; + isUpgradable_ = false; + internalGetMutableLabels().clear(); + expirationTime_ = null; + if (expirationTimeBuilder_ != null) { + expirationTimeBuilder_.dispose(); + expirationTimeBuilder_ = null; + } + version_ = ""; + notebookRuntimeType_ = 0; + networkTags_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.NotebookRuntimeProto + .internal_static_google_cloud_aiplatform_v1beta1_NotebookRuntime_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NotebookRuntime getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.NotebookRuntime.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NotebookRuntime build() { + com.google.cloud.aiplatform.v1beta1.NotebookRuntime result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NotebookRuntime buildPartial() { + com.google.cloud.aiplatform.v1beta1.NotebookRuntime result = + new com.google.cloud.aiplatform.v1beta1.NotebookRuntime(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1beta1.NotebookRuntime result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.runtimeUser_ = runtimeUser_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.notebookRuntimeTemplateRef_ = + notebookRuntimeTemplateRefBuilder_ == null + ? notebookRuntimeTemplateRef_ + : notebookRuntimeTemplateRefBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.proxyUri_ = proxyUri_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.healthState_ = healthState_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.serviceAccount_ = serviceAccount_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.runtimeState_ = runtimeState_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.isUpgradable_ = isUpgradable_; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.expirationTime_ = + expirationTimeBuilder_ == null ? expirationTime_ : expirationTimeBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.version_ = version_; + } + if (((from_bitField0_ & 0x00008000) != 0)) { + result.notebookRuntimeType_ = notebookRuntimeType_; + } + if (((from_bitField0_ & 0x00010000) != 0)) { + networkTags_.makeImmutable(); + result.networkTags_ = networkTags_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1beta1.NotebookRuntime) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.NotebookRuntime) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.NotebookRuntime other) { + if (other == com.google.cloud.aiplatform.v1beta1.NotebookRuntime.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRuntimeUser().isEmpty()) { + runtimeUser_ = other.runtimeUser_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasNotebookRuntimeTemplateRef()) { + mergeNotebookRuntimeTemplateRef(other.getNotebookRuntimeTemplateRef()); + } + if (!other.getProxyUri().isEmpty()) { + proxyUri_ = other.proxyUri_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.healthState_ != 0) { + setHealthStateValue(other.getHealthStateValue()); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000080; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000100; + onChanged(); + } + if (!other.getServiceAccount().isEmpty()) { + serviceAccount_ = other.serviceAccount_; + bitField0_ |= 0x00000200; + onChanged(); + } + if (other.runtimeState_ != 0) { + setRuntimeStateValue(other.getRuntimeStateValue()); + } + if (other.getIsUpgradable() != false) { + setIsUpgradable(other.getIsUpgradable()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00001000; + if (other.hasExpirationTime()) { + mergeExpirationTime(other.getExpirationTime()); + } + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + bitField0_ |= 0x00004000; + onChanged(); + } + if (other.notebookRuntimeType_ != 0) { + setNotebookRuntimeTypeValue(other.getNotebookRuntimeTypeValue()); + } + if (!other.networkTags_.isEmpty()) { + if (networkTags_.isEmpty()) { + networkTags_ = other.networkTags_; + bitField0_ |= 0x00010000; + } else { + ensureNetworkTagsIsMutable(); + networkTags_.addAll(other.networkTags_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + runtimeUser_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + getNotebookRuntimeTemplateRefFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 42: + { + proxyUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 42 + case 50: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 50 + case 58: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 58 + case 64: + { + healthState_ = input.readEnum(); + bitField0_ |= 0x00000040; + break; + } // case 64 + case 82: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 82 + case 90: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 90 + case 106: + { + serviceAccount_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case 106 + case 112: + { + runtimeState_ = input.readEnum(); + bitField0_ |= 0x00000400; + break; + } // case 112 + case 120: + { + isUpgradable_ = input.readBool(); + bitField0_ |= 0x00000800; + break; + } // case 120 + case 130: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00001000; + break; + } // case 130 + case 138: + { + input.readMessage(getExpirationTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00002000; + break; + } // case 138 + case 146: + { + version_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00004000; + break; + } // case 146 + case 152: + { + notebookRuntimeType_ = input.readEnum(); + bitField0_ |= 0x00008000; + break; + } // case 152 + case 202: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureNetworkTagsIsMutable(); + networkTags_.add(s); + break; + } // case 202 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. The resource name of the NotebookRuntime.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The resource name of the NotebookRuntime.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The resource name of the NotebookRuntime.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The resource name of the NotebookRuntime.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The resource name of the NotebookRuntime.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object runtimeUser_ = ""; + /** + * + * + *
+     * Required. The user email of the NotebookRuntime.
+     * 
+ * + * string runtime_user = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The runtimeUser. + */ + public java.lang.String getRuntimeUser() { + java.lang.Object ref = runtimeUser_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + runtimeUser_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The user email of the NotebookRuntime.
+     * 
+ * + * string runtime_user = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for runtimeUser. + */ + public com.google.protobuf.ByteString getRuntimeUserBytes() { + java.lang.Object ref = runtimeUser_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + runtimeUser_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The user email of the NotebookRuntime.
+     * 
+ * + * string runtime_user = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The runtimeUser to set. + * @return This builder for chaining. + */ + public Builder setRuntimeUser(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + runtimeUser_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The user email of the NotebookRuntime.
+     * 
+ * + * string runtime_user = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearRuntimeUser() { + runtimeUser_ = getDefaultInstance().getRuntimeUser(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The user email of the NotebookRuntime.
+     * 
+ * + * string runtime_user = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for runtimeUser to set. + * @return This builder for chaining. + */ + public Builder setRuntimeUserBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + runtimeUser_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef + notebookRuntimeTemplateRef_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef, + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef.Builder, + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRefOrBuilder> + notebookRuntimeTemplateRefBuilder_; + /** + * + * + *
+     * Output only. The pointer to NotebookRuntimeTemplate this NotebookRuntime is
+     * created from.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef notebook_runtime_template_ref = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the notebookRuntimeTemplateRef field is set. + */ + public boolean hasNotebookRuntimeTemplateRef() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Output only. The pointer to NotebookRuntimeTemplate this NotebookRuntime is
+     * created from.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef notebook_runtime_template_ref = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The notebookRuntimeTemplateRef. + */ + public com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef + getNotebookRuntimeTemplateRef() { + if (notebookRuntimeTemplateRefBuilder_ == null) { + return notebookRuntimeTemplateRef_ == null + ? com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef.getDefaultInstance() + : notebookRuntimeTemplateRef_; + } else { + return notebookRuntimeTemplateRefBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The pointer to NotebookRuntimeTemplate this NotebookRuntime is
+     * created from.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef notebook_runtime_template_ref = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setNotebookRuntimeTemplateRef( + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef value) { + if (notebookRuntimeTemplateRefBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + notebookRuntimeTemplateRef_ = value; + } else { + notebookRuntimeTemplateRefBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The pointer to NotebookRuntimeTemplate this NotebookRuntime is
+     * created from.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef notebook_runtime_template_ref = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setNotebookRuntimeTemplateRef( + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef.Builder builderForValue) { + if (notebookRuntimeTemplateRefBuilder_ == null) { + notebookRuntimeTemplateRef_ = builderForValue.build(); + } else { + notebookRuntimeTemplateRefBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The pointer to NotebookRuntimeTemplate this NotebookRuntime is
+     * created from.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef notebook_runtime_template_ref = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeNotebookRuntimeTemplateRef( + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef value) { + if (notebookRuntimeTemplateRefBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && notebookRuntimeTemplateRef_ != null + && notebookRuntimeTemplateRef_ + != com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef + .getDefaultInstance()) { + getNotebookRuntimeTemplateRefBuilder().mergeFrom(value); + } else { + notebookRuntimeTemplateRef_ = value; + } + } else { + notebookRuntimeTemplateRefBuilder_.mergeFrom(value); + } + if (notebookRuntimeTemplateRef_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. The pointer to NotebookRuntimeTemplate this NotebookRuntime is
+     * created from.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef notebook_runtime_template_ref = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearNotebookRuntimeTemplateRef() { + bitField0_ = (bitField0_ & ~0x00000004); + notebookRuntimeTemplateRef_ = null; + if (notebookRuntimeTemplateRefBuilder_ != null) { + notebookRuntimeTemplateRefBuilder_.dispose(); + notebookRuntimeTemplateRefBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The pointer to NotebookRuntimeTemplate this NotebookRuntime is
+     * created from.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef notebook_runtime_template_ref = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef.Builder + getNotebookRuntimeTemplateRefBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getNotebookRuntimeTemplateRefFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The pointer to NotebookRuntimeTemplate this NotebookRuntime is
+     * created from.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef notebook_runtime_template_ref = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRefOrBuilder + getNotebookRuntimeTemplateRefOrBuilder() { + if (notebookRuntimeTemplateRefBuilder_ != null) { + return notebookRuntimeTemplateRefBuilder_.getMessageOrBuilder(); + } else { + return notebookRuntimeTemplateRef_ == null + ? com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef.getDefaultInstance() + : notebookRuntimeTemplateRef_; + } + } + /** + * + * + *
+     * Output only. The pointer to NotebookRuntimeTemplate this NotebookRuntime is
+     * created from.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef notebook_runtime_template_ref = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef, + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef.Builder, + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRefOrBuilder> + getNotebookRuntimeTemplateRefFieldBuilder() { + if (notebookRuntimeTemplateRefBuilder_ == null) { + notebookRuntimeTemplateRefBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef, + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef.Builder, + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRefOrBuilder>( + getNotebookRuntimeTemplateRef(), getParentForChildren(), isClean()); + notebookRuntimeTemplateRef_ = null; + } + return notebookRuntimeTemplateRefBuilder_; + } + + private java.lang.Object proxyUri_ = ""; + /** + * + * + *
+     * Output only. The proxy endpoint used to access the NotebookRuntime.
+     * 
+ * + * string proxy_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The proxyUri. + */ + public java.lang.String getProxyUri() { + java.lang.Object ref = proxyUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + proxyUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The proxy endpoint used to access the NotebookRuntime.
+     * 
+ * + * string proxy_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for proxyUri. + */ + public com.google.protobuf.ByteString getProxyUriBytes() { + java.lang.Object ref = proxyUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + proxyUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The proxy endpoint used to access the NotebookRuntime.
+     * 
+ * + * string proxy_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The proxyUri to set. + * @return This builder for chaining. + */ + public Builder setProxyUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + proxyUri_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The proxy endpoint used to access the NotebookRuntime.
+     * 
+ * + * string proxy_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearProxyUri() { + proxyUri_ = getDefaultInstance().getProxyUri(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The proxy endpoint used to access the NotebookRuntime.
+     * 
+ * + * string proxy_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for proxyUri to set. + * @return This builder for chaining. + */ + public Builder setProxyUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + proxyUri_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntime was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntime was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntime was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntime was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntime was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntime was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000010); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntime was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntime was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntime was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntime was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntime was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntime was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntime was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntime was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntime was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000020); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntime was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntime was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntime was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private int healthState_ = 0; + /** + * + * + *
+     * Output only. The health state of the NotebookRuntime.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntime.HealthState health_state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for healthState. + */ + @java.lang.Override + public int getHealthStateValue() { + return healthState_; + } + /** + * + * + *
+     * Output only. The health state of the NotebookRuntime.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntime.HealthState health_state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for healthState to set. + * @return This builder for chaining. + */ + public Builder setHealthStateValue(int value) { + healthState_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The health state of the NotebookRuntime.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntime.HealthState health_state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The healthState. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NotebookRuntime.HealthState getHealthState() { + com.google.cloud.aiplatform.v1beta1.NotebookRuntime.HealthState result = + com.google.cloud.aiplatform.v1beta1.NotebookRuntime.HealthState.forNumber(healthState_); + return result == null + ? com.google.cloud.aiplatform.v1beta1.NotebookRuntime.HealthState.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Output only. The health state of the NotebookRuntime.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntime.HealthState health_state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The healthState to set. + * @return This builder for chaining. + */ + public Builder setHealthState( + com.google.cloud.aiplatform.v1beta1.NotebookRuntime.HealthState value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000040; + healthState_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The health state of the NotebookRuntime.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntime.HealthState health_state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearHealthState() { + bitField0_ = (bitField0_ & ~0x00000040); + healthState_ = 0; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Required. The display name of the NotebookRuntime.
+     * The name can be up to 128 characters long and can consist of any UTF-8
+     * characters.
+     * 
+ * + * string display_name = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The display name of the NotebookRuntime.
+     * The name can be up to 128 characters long and can consist of any UTF-8
+     * characters.
+     * 
+ * + * string display_name = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The display name of the NotebookRuntime.
+     * The name can be up to 128 characters long and can consist of any UTF-8
+     * characters.
+     * 
+ * + * string display_name = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The display name of the NotebookRuntime.
+     * The name can be up to 128 characters long and can consist of any UTF-8
+     * characters.
+     * 
+ * + * string display_name = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The display name of the NotebookRuntime.
+     * The name can be up to 128 characters long and can consist of any UTF-8
+     * characters.
+     * 
+ * + * string display_name = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * The description of the NotebookRuntime.
+     * 
+ * + * string description = 11; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The description of the NotebookRuntime.
+     * 
+ * + * string description = 11; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The description of the NotebookRuntime.
+     * 
+ * + * string description = 11; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * The description of the NotebookRuntime.
+     * 
+ * + * string description = 11; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + /** + * + * + *
+     * The description of the NotebookRuntime.
+     * 
+ * + * string description = 11; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + private java.lang.Object serviceAccount_ = ""; + /** + * + * + *
+     * Output only. The service account that the NotebookRuntime workload runs as.
+     * 
+ * + * string service_account = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The serviceAccount. + */ + public java.lang.String getServiceAccount() { + java.lang.Object ref = serviceAccount_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceAccount_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The service account that the NotebookRuntime workload runs as.
+     * 
+ * + * string service_account = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for serviceAccount. + */ + public com.google.protobuf.ByteString getServiceAccountBytes() { + java.lang.Object ref = serviceAccount_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceAccount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The service account that the NotebookRuntime workload runs as.
+     * 
+ * + * string service_account = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The serviceAccount to set. + * @return This builder for chaining. + */ + public Builder setServiceAccount(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + serviceAccount_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The service account that the NotebookRuntime workload runs as.
+     * 
+ * + * string service_account = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearServiceAccount() { + serviceAccount_ = getDefaultInstance().getServiceAccount(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The service account that the NotebookRuntime workload runs as.
+     * 
+ * + * string service_account = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for serviceAccount to set. + * @return This builder for chaining. + */ + public Builder setServiceAccountBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + serviceAccount_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + private int runtimeState_ = 0; + /** + * + * + *
+     * Output only. The runtime (instance) state of the NotebookRuntime.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntime.RuntimeState runtime_state = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for runtimeState. + */ + @java.lang.Override + public int getRuntimeStateValue() { + return runtimeState_; + } + /** + * + * + *
+     * Output only. The runtime (instance) state of the NotebookRuntime.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntime.RuntimeState runtime_state = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for runtimeState to set. + * @return This builder for chaining. + */ + public Builder setRuntimeStateValue(int value) { + runtimeState_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The runtime (instance) state of the NotebookRuntime.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntime.RuntimeState runtime_state = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The runtimeState. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NotebookRuntime.RuntimeState getRuntimeState() { + com.google.cloud.aiplatform.v1beta1.NotebookRuntime.RuntimeState result = + com.google.cloud.aiplatform.v1beta1.NotebookRuntime.RuntimeState.forNumber(runtimeState_); + return result == null + ? com.google.cloud.aiplatform.v1beta1.NotebookRuntime.RuntimeState.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Output only. The runtime (instance) state of the NotebookRuntime.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntime.RuntimeState runtime_state = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The runtimeState to set. + * @return This builder for chaining. + */ + public Builder setRuntimeState( + com.google.cloud.aiplatform.v1beta1.NotebookRuntime.RuntimeState value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000400; + runtimeState_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The runtime (instance) state of the NotebookRuntime.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntime.RuntimeState runtime_state = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearRuntimeState() { + bitField0_ = (bitField0_ & ~0x00000400); + runtimeState_ = 0; + onChanged(); + return this; + } + + private boolean isUpgradable_; + /** + * + * + *
+     * Output only. Whether NotebookRuntime is upgradable.
+     * 
+ * + * bool is_upgradable = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The isUpgradable. + */ + @java.lang.Override + public boolean getIsUpgradable() { + return isUpgradable_; + } + /** + * + * + *
+     * Output only. Whether NotebookRuntime is upgradable.
+     * 
+ * + * bool is_upgradable = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The isUpgradable to set. + * @return This builder for chaining. + */ + public Builder setIsUpgradable(boolean value) { + + isUpgradable_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Whether NotebookRuntime is upgradable.
+     * 
+ * + * bool is_upgradable = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearIsUpgradable() { + bitField0_ = (bitField0_ & ~0x00000800); + isUpgradable_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00001000; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * The labels with user-defined metadata to organize your
+     * NotebookRuntime.
+     *
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * No more than 64 user labels can be associated with one NotebookRuntime
+     * (System labels are excluded).
+     *
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+     * and are immutable. Following system labels exist for NotebookRuntime:
+     *
+     * * "aiplatform.googleapis.com/notebook_runtime_gce_instance_id": output
+     * only, its value is the Compute Engine instance id.
+     * * "aiplatform.googleapis.com/colab_enterprise_entry_service": its value is
+     * either "bigquery" or "vertex"; if absent, it should be "vertex". This is to
+     * describe the entry service, either BigQuery or Vertex.
+     * 
+ * + * map<string, string> labels = 16; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * The labels with user-defined metadata to organize your
+     * NotebookRuntime.
+     *
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * No more than 64 user labels can be associated with one NotebookRuntime
+     * (System labels are excluded).
+     *
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+     * and are immutable. Following system labels exist for NotebookRuntime:
+     *
+     * * "aiplatform.googleapis.com/notebook_runtime_gce_instance_id": output
+     * only, its value is the Compute Engine instance id.
+     * * "aiplatform.googleapis.com/colab_enterprise_entry_service": its value is
+     * either "bigquery" or "vertex"; if absent, it should be "vertex". This is to
+     * describe the entry service, either BigQuery or Vertex.
+     * 
+ * + * map<string, string> labels = 16; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * The labels with user-defined metadata to organize your
+     * NotebookRuntime.
+     *
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * No more than 64 user labels can be associated with one NotebookRuntime
+     * (System labels are excluded).
+     *
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+     * and are immutable. Following system labels exist for NotebookRuntime:
+     *
+     * * "aiplatform.googleapis.com/notebook_runtime_gce_instance_id": output
+     * only, its value is the Compute Engine instance id.
+     * * "aiplatform.googleapis.com/colab_enterprise_entry_service": its value is
+     * either "bigquery" or "vertex"; if absent, it should be "vertex". This is to
+     * describe the entry service, either BigQuery or Vertex.
+     * 
+ * + * map<string, string> labels = 16; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * The labels with user-defined metadata to organize your
+     * NotebookRuntime.
+     *
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * No more than 64 user labels can be associated with one NotebookRuntime
+     * (System labels are excluded).
+     *
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+     * and are immutable. Following system labels exist for NotebookRuntime:
+     *
+     * * "aiplatform.googleapis.com/notebook_runtime_gce_instance_id": output
+     * only, its value is the Compute Engine instance id.
+     * * "aiplatform.googleapis.com/colab_enterprise_entry_service": its value is
+     * either "bigquery" or "vertex"; if absent, it should be "vertex". This is to
+     * describe the entry service, either BigQuery or Vertex.
+     * 
+ * + * map<string, string> labels = 16; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00001000); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * The labels with user-defined metadata to organize your
+     * NotebookRuntime.
+     *
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * No more than 64 user labels can be associated with one NotebookRuntime
+     * (System labels are excluded).
+     *
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+     * and are immutable. Following system labels exist for NotebookRuntime:
+     *
+     * * "aiplatform.googleapis.com/notebook_runtime_gce_instance_id": output
+     * only, its value is the Compute Engine instance id.
+     * * "aiplatform.googleapis.com/colab_enterprise_entry_service": its value is
+     * either "bigquery" or "vertex"; if absent, it should be "vertex". This is to
+     * describe the entry service, either BigQuery or Vertex.
+     * 
+ * + * map<string, string> labels = 16; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + bitField0_ |= 0x00001000; + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * The labels with user-defined metadata to organize your
+     * NotebookRuntime.
+     *
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * No more than 64 user labels can be associated with one NotebookRuntime
+     * (System labels are excluded).
+     *
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+     * and are immutable. Following system labels exist for NotebookRuntime:
+     *
+     * * "aiplatform.googleapis.com/notebook_runtime_gce_instance_id": output
+     * only, its value is the Compute Engine instance id.
+     * * "aiplatform.googleapis.com/colab_enterprise_entry_service": its value is
+     * either "bigquery" or "vertex"; if absent, it should be "vertex". This is to
+     * describe the entry service, either BigQuery or Vertex.
+     * 
+ * + * map<string, string> labels = 16; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00001000; + return this; + } + /** + * + * + *
+     * The labels with user-defined metadata to organize your
+     * NotebookRuntime.
+     *
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * No more than 64 user labels can be associated with one NotebookRuntime
+     * (System labels are excluded).
+     *
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+     * and are immutable. Following system labels exist for NotebookRuntime:
+     *
+     * * "aiplatform.googleapis.com/notebook_runtime_gce_instance_id": output
+     * only, its value is the Compute Engine instance id.
+     * * "aiplatform.googleapis.com/colab_enterprise_entry_service": its value is
+     * either "bigquery" or "vertex"; if absent, it should be "vertex". This is to
+     * describe the entry service, either BigQuery or Vertex.
+     * 
+ * + * map<string, string> labels = 16; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00001000; + return this; + } + + private com.google.protobuf.Timestamp expirationTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + expirationTimeBuilder_; + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntime will be expired:
+     * 1. System Predefined NotebookRuntime: 24 hours after creation. After
+     * expiration, system predifined runtime will be deleted.
+     * 2. User created NotebookRuntime: 6 months after last upgrade. After
+     * expiration, user created runtime will be stopped and allowed for upgrade.
+     * 
+ * + * + * .google.protobuf.Timestamp expiration_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the expirationTime field is set. + */ + public boolean hasExpirationTime() { + return ((bitField0_ & 0x00002000) != 0); + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntime will be expired:
+     * 1. System Predefined NotebookRuntime: 24 hours after creation. After
+     * expiration, system predifined runtime will be deleted.
+     * 2. User created NotebookRuntime: 6 months after last upgrade. After
+     * expiration, user created runtime will be stopped and allowed for upgrade.
+     * 
+ * + * + * .google.protobuf.Timestamp expiration_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The expirationTime. + */ + public com.google.protobuf.Timestamp getExpirationTime() { + if (expirationTimeBuilder_ == null) { + return expirationTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : expirationTime_; + } else { + return expirationTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntime will be expired:
+     * 1. System Predefined NotebookRuntime: 24 hours after creation. After
+     * expiration, system predifined runtime will be deleted.
+     * 2. User created NotebookRuntime: 6 months after last upgrade. After
+     * expiration, user created runtime will be stopped and allowed for upgrade.
+     * 
+ * + * + * .google.protobuf.Timestamp expiration_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setExpirationTime(com.google.protobuf.Timestamp value) { + if (expirationTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + expirationTime_ = value; + } else { + expirationTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntime will be expired:
+     * 1. System Predefined NotebookRuntime: 24 hours after creation. After
+     * expiration, system predifined runtime will be deleted.
+     * 2. User created NotebookRuntime: 6 months after last upgrade. After
+     * expiration, user created runtime will be stopped and allowed for upgrade.
+     * 
+ * + * + * .google.protobuf.Timestamp expiration_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setExpirationTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (expirationTimeBuilder_ == null) { + expirationTime_ = builderForValue.build(); + } else { + expirationTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntime will be expired:
+     * 1. System Predefined NotebookRuntime: 24 hours after creation. After
+     * expiration, system predifined runtime will be deleted.
+     * 2. User created NotebookRuntime: 6 months after last upgrade. After
+     * expiration, user created runtime will be stopped and allowed for upgrade.
+     * 
+ * + * + * .google.protobuf.Timestamp expiration_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeExpirationTime(com.google.protobuf.Timestamp value) { + if (expirationTimeBuilder_ == null) { + if (((bitField0_ & 0x00002000) != 0) + && expirationTime_ != null + && expirationTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getExpirationTimeBuilder().mergeFrom(value); + } else { + expirationTime_ = value; + } + } else { + expirationTimeBuilder_.mergeFrom(value); + } + if (expirationTime_ != null) { + bitField0_ |= 0x00002000; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntime will be expired:
+     * 1. System Predefined NotebookRuntime: 24 hours after creation. After
+     * expiration, system predifined runtime will be deleted.
+     * 2. User created NotebookRuntime: 6 months after last upgrade. After
+     * expiration, user created runtime will be stopped and allowed for upgrade.
+     * 
+ * + * + * .google.protobuf.Timestamp expiration_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearExpirationTime() { + bitField0_ = (bitField0_ & ~0x00002000); + expirationTime_ = null; + if (expirationTimeBuilder_ != null) { + expirationTimeBuilder_.dispose(); + expirationTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntime will be expired:
+     * 1. System Predefined NotebookRuntime: 24 hours after creation. After
+     * expiration, system predifined runtime will be deleted.
+     * 2. User created NotebookRuntime: 6 months after last upgrade. After
+     * expiration, user created runtime will be stopped and allowed for upgrade.
+     * 
+ * + * + * .google.protobuf.Timestamp expiration_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getExpirationTimeBuilder() { + bitField0_ |= 0x00002000; + onChanged(); + return getExpirationTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntime will be expired:
+     * 1. System Predefined NotebookRuntime: 24 hours after creation. After
+     * expiration, system predifined runtime will be deleted.
+     * 2. User created NotebookRuntime: 6 months after last upgrade. After
+     * expiration, user created runtime will be stopped and allowed for upgrade.
+     * 
+ * + * + * .google.protobuf.Timestamp expiration_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getExpirationTimeOrBuilder() { + if (expirationTimeBuilder_ != null) { + return expirationTimeBuilder_.getMessageOrBuilder(); + } else { + return expirationTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : expirationTime_; + } + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntime will be expired:
+     * 1. System Predefined NotebookRuntime: 24 hours after creation. After
+     * expiration, system predifined runtime will be deleted.
+     * 2. User created NotebookRuntime: 6 months after last upgrade. After
+     * expiration, user created runtime will be stopped and allowed for upgrade.
+     * 
+ * + * + * .google.protobuf.Timestamp expiration_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getExpirationTimeFieldBuilder() { + if (expirationTimeBuilder_ == null) { + expirationTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getExpirationTime(), getParentForChildren(), isClean()); + expirationTime_ = null; + } + return expirationTimeBuilder_; + } + + private java.lang.Object version_ = ""; + /** + * + * + *
+     * Output only. The VM os image version of NotebookRuntime.
+     * 
+ * + * string version = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The VM os image version of NotebookRuntime.
+     * 
+ * + * string version = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for version. + */ + public com.google.protobuf.ByteString getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The VM os image version of NotebookRuntime.
+     * 
+ * + * string version = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + version_ = value; + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The VM os image version of NotebookRuntime.
+     * 
+ * + * string version = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearVersion() { + version_ = getDefaultInstance().getVersion(); + bitField0_ = (bitField0_ & ~0x00004000); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The VM os image version of NotebookRuntime.
+     * 
+ * + * string version = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + version_ = value; + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + + private int notebookRuntimeType_ = 0; + /** + * + * + *
+     * Output only. The type of the notebook runtime.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntimeType notebook_runtime_type = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for notebookRuntimeType. + */ + @java.lang.Override + public int getNotebookRuntimeTypeValue() { + return notebookRuntimeType_; + } + /** + * + * + *
+     * Output only. The type of the notebook runtime.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntimeType notebook_runtime_type = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for notebookRuntimeType to set. + * @return This builder for chaining. + */ + public Builder setNotebookRuntimeTypeValue(int value) { + notebookRuntimeType_ = value; + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The type of the notebook runtime.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntimeType notebook_runtime_type = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The notebookRuntimeType. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NotebookRuntimeType getNotebookRuntimeType() { + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeType result = + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeType.forNumber(notebookRuntimeType_); + return result == null + ? com.google.cloud.aiplatform.v1beta1.NotebookRuntimeType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Output only. The type of the notebook runtime.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntimeType notebook_runtime_type = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The notebookRuntimeType to set. + * @return This builder for chaining. + */ + public Builder setNotebookRuntimeType( + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00008000; + notebookRuntimeType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The type of the notebook runtime.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntimeType notebook_runtime_type = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearNotebookRuntimeType() { + bitField0_ = (bitField0_ & ~0x00008000); + notebookRuntimeType_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList networkTags_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureNetworkTagsIsMutable() { + if (!networkTags_.isModifiable()) { + networkTags_ = new com.google.protobuf.LazyStringArrayList(networkTags_); + } + bitField0_ |= 0x00010000; + } + /** + * + * + *
+     * Optional. The Compute Engine tags to add to runtime (see [Tagging
+     * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).
+     * 
+ * + * repeated string network_tags = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the networkTags. + */ + public com.google.protobuf.ProtocolStringList getNetworkTagsList() { + networkTags_.makeImmutable(); + return networkTags_; + } + /** + * + * + *
+     * Optional. The Compute Engine tags to add to runtime (see [Tagging
+     * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).
+     * 
+ * + * repeated string network_tags = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of networkTags. + */ + public int getNetworkTagsCount() { + return networkTags_.size(); + } + /** + * + * + *
+     * Optional. The Compute Engine tags to add to runtime (see [Tagging
+     * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).
+     * 
+ * + * repeated string network_tags = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The networkTags at the given index. + */ + public java.lang.String getNetworkTags(int index) { + return networkTags_.get(index); + } + /** + * + * + *
+     * Optional. The Compute Engine tags to add to runtime (see [Tagging
+     * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).
+     * 
+ * + * repeated string network_tags = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the networkTags at the given index. + */ + public com.google.protobuf.ByteString getNetworkTagsBytes(int index) { + return networkTags_.getByteString(index); + } + /** + * + * + *
+     * Optional. The Compute Engine tags to add to runtime (see [Tagging
+     * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).
+     * 
+ * + * repeated string network_tags = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The networkTags to set. + * @return This builder for chaining. + */ + public Builder setNetworkTags(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureNetworkTagsIsMutable(); + networkTags_.set(index, value); + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Compute Engine tags to add to runtime (see [Tagging
+     * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).
+     * 
+ * + * repeated string network_tags = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The networkTags to add. + * @return This builder for chaining. + */ + public Builder addNetworkTags(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureNetworkTagsIsMutable(); + networkTags_.add(value); + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Compute Engine tags to add to runtime (see [Tagging
+     * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).
+     * 
+ * + * repeated string network_tags = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The networkTags to add. + * @return This builder for chaining. + */ + public Builder addAllNetworkTags(java.lang.Iterable values) { + ensureNetworkTagsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, networkTags_); + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Compute Engine tags to add to runtime (see [Tagging
+     * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).
+     * 
+ * + * repeated string network_tags = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearNetworkTags() { + networkTags_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00010000); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Compute Engine tags to add to runtime (see [Tagging
+     * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).
+     * 
+ * + * repeated string network_tags = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes of the networkTags to add. + * @return This builder for chaining. + */ + public Builder addNetworkTagsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureNetworkTagsIsMutable(); + networkTags_.add(value); + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.NotebookRuntime) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.NotebookRuntime) + private static final com.google.cloud.aiplatform.v1beta1.NotebookRuntime DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.NotebookRuntime(); + } + + public static com.google.cloud.aiplatform.v1beta1.NotebookRuntime getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NotebookRuntime parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NotebookRuntime getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NotebookRuntimeName.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NotebookRuntimeName.java new file mode 100644 index 000000000000..81cdb7625254 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NotebookRuntimeName.java @@ -0,0 +1,227 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1; + +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 NotebookRuntimeName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_NOTEBOOK_RUNTIME = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/notebookRuntimes/{notebook_runtime}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String notebookRuntime; + + @Deprecated + protected NotebookRuntimeName() { + project = null; + location = null; + notebookRuntime = null; + } + + private NotebookRuntimeName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + notebookRuntime = Preconditions.checkNotNull(builder.getNotebookRuntime()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getNotebookRuntime() { + return notebookRuntime; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static NotebookRuntimeName of(String project, String location, String notebookRuntime) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setNotebookRuntime(notebookRuntime) + .build(); + } + + public static String format(String project, String location, String notebookRuntime) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setNotebookRuntime(notebookRuntime) + .build() + .toString(); + } + + public static NotebookRuntimeName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_NOTEBOOK_RUNTIME.validatedMatch( + formattedString, "NotebookRuntimeName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("notebook_runtime")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (NotebookRuntimeName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_NOTEBOOK_RUNTIME.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (notebookRuntime != null) { + fieldMapBuilder.put("notebook_runtime", notebookRuntime); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_NOTEBOOK_RUNTIME.instantiate( + "project", project, "location", location, "notebook_runtime", notebookRuntime); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + NotebookRuntimeName that = ((NotebookRuntimeName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.notebookRuntime, that.notebookRuntime); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(notebookRuntime); + return h; + } + + /** Builder for projects/{project}/locations/{location}/notebookRuntimes/{notebook_runtime}. */ + public static class Builder { + private String project; + private String location; + private String notebookRuntime; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getNotebookRuntime() { + return notebookRuntime; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setNotebookRuntime(String notebookRuntime) { + this.notebookRuntime = notebookRuntime; + return this; + } + + private Builder(NotebookRuntimeName notebookRuntimeName) { + this.project = notebookRuntimeName.project; + this.location = notebookRuntimeName.location; + this.notebookRuntime = notebookRuntimeName.notebookRuntime; + } + + public NotebookRuntimeName build() { + return new NotebookRuntimeName(this); + } + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NotebookRuntimeOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NotebookRuntimeOrBuilder.java new file mode 100644 index 000000000000..7103ad0ff2b8 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NotebookRuntimeOrBuilder.java @@ -0,0 +1,677 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/notebook_runtime.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +public interface NotebookRuntimeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.NotebookRuntime) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The resource name of the NotebookRuntime.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. The resource name of the NotebookRuntime.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The user email of the NotebookRuntime.
+   * 
+ * + * string runtime_user = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The runtimeUser. + */ + java.lang.String getRuntimeUser(); + /** + * + * + *
+   * Required. The user email of the NotebookRuntime.
+   * 
+ * + * string runtime_user = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for runtimeUser. + */ + com.google.protobuf.ByteString getRuntimeUserBytes(); + + /** + * + * + *
+   * Output only. The pointer to NotebookRuntimeTemplate this NotebookRuntime is
+   * created from.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef notebook_runtime_template_ref = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the notebookRuntimeTemplateRef field is set. + */ + boolean hasNotebookRuntimeTemplateRef(); + /** + * + * + *
+   * Output only. The pointer to NotebookRuntimeTemplate this NotebookRuntime is
+   * created from.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef notebook_runtime_template_ref = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The notebookRuntimeTemplateRef. + */ + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef getNotebookRuntimeTemplateRef(); + /** + * + * + *
+   * Output only. The pointer to NotebookRuntimeTemplate this NotebookRuntime is
+   * created from.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef notebook_runtime_template_ref = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRefOrBuilder + getNotebookRuntimeTemplateRefOrBuilder(); + + /** + * + * + *
+   * Output only. The proxy endpoint used to access the NotebookRuntime.
+   * 
+ * + * string proxy_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The proxyUri. + */ + java.lang.String getProxyUri(); + /** + * + * + *
+   * Output only. The proxy endpoint used to access the NotebookRuntime.
+   * 
+ * + * string proxy_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for proxyUri. + */ + com.google.protobuf.ByteString getProxyUriBytes(); + + /** + * + * + *
+   * Output only. Timestamp when this NotebookRuntime was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Timestamp when this NotebookRuntime was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Timestamp when this NotebookRuntime was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Timestamp when this NotebookRuntime was most recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. Timestamp when this NotebookRuntime was most recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. Timestamp when this NotebookRuntime was most recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The health state of the NotebookRuntime.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntime.HealthState health_state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for healthState. + */ + int getHealthStateValue(); + /** + * + * + *
+   * Output only. The health state of the NotebookRuntime.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntime.HealthState health_state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The healthState. + */ + com.google.cloud.aiplatform.v1beta1.NotebookRuntime.HealthState getHealthState(); + + /** + * + * + *
+   * Required. The display name of the NotebookRuntime.
+   * The name can be up to 128 characters long and can consist of any UTF-8
+   * characters.
+   * 
+ * + * string display_name = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Required. The display name of the NotebookRuntime.
+   * The name can be up to 128 characters long and can consist of any UTF-8
+   * characters.
+   * 
+ * + * string display_name = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * The description of the NotebookRuntime.
+   * 
+ * + * string description = 11; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * The description of the NotebookRuntime.
+   * 
+ * + * string description = 11; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Output only. The service account that the NotebookRuntime workload runs as.
+   * 
+ * + * string service_account = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The serviceAccount. + */ + java.lang.String getServiceAccount(); + /** + * + * + *
+   * Output only. The service account that the NotebookRuntime workload runs as.
+   * 
+ * + * string service_account = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for serviceAccount. + */ + com.google.protobuf.ByteString getServiceAccountBytes(); + + /** + * + * + *
+   * Output only. The runtime (instance) state of the NotebookRuntime.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntime.RuntimeState runtime_state = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for runtimeState. + */ + int getRuntimeStateValue(); + /** + * + * + *
+   * Output only. The runtime (instance) state of the NotebookRuntime.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntime.RuntimeState runtime_state = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The runtimeState. + */ + com.google.cloud.aiplatform.v1beta1.NotebookRuntime.RuntimeState getRuntimeState(); + + /** + * + * + *
+   * Output only. Whether NotebookRuntime is upgradable.
+   * 
+ * + * bool is_upgradable = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The isUpgradable. + */ + boolean getIsUpgradable(); + + /** + * + * + *
+   * The labels with user-defined metadata to organize your
+   * NotebookRuntime.
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one NotebookRuntime
+   * (System labels are excluded).
+   *
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+   * and are immutable. Following system labels exist for NotebookRuntime:
+   *
+   * * "aiplatform.googleapis.com/notebook_runtime_gce_instance_id": output
+   * only, its value is the Compute Engine instance id.
+   * * "aiplatform.googleapis.com/colab_enterprise_entry_service": its value is
+   * either "bigquery" or "vertex"; if absent, it should be "vertex". This is to
+   * describe the entry service, either BigQuery or Vertex.
+   * 
+ * + * map<string, string> labels = 16; + */ + int getLabelsCount(); + /** + * + * + *
+   * The labels with user-defined metadata to organize your
+   * NotebookRuntime.
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one NotebookRuntime
+   * (System labels are excluded).
+   *
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+   * and are immutable. Following system labels exist for NotebookRuntime:
+   *
+   * * "aiplatform.googleapis.com/notebook_runtime_gce_instance_id": output
+   * only, its value is the Compute Engine instance id.
+   * * "aiplatform.googleapis.com/colab_enterprise_entry_service": its value is
+   * either "bigquery" or "vertex"; if absent, it should be "vertex". This is to
+   * describe the entry service, either BigQuery or Vertex.
+   * 
+ * + * map<string, string> labels = 16; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * The labels with user-defined metadata to organize your
+   * NotebookRuntime.
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one NotebookRuntime
+   * (System labels are excluded).
+   *
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+   * and are immutable. Following system labels exist for NotebookRuntime:
+   *
+   * * "aiplatform.googleapis.com/notebook_runtime_gce_instance_id": output
+   * only, its value is the Compute Engine instance id.
+   * * "aiplatform.googleapis.com/colab_enterprise_entry_service": its value is
+   * either "bigquery" or "vertex"; if absent, it should be "vertex". This is to
+   * describe the entry service, either BigQuery or Vertex.
+   * 
+ * + * map<string, string> labels = 16; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * The labels with user-defined metadata to organize your
+   * NotebookRuntime.
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one NotebookRuntime
+   * (System labels are excluded).
+   *
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+   * and are immutable. Following system labels exist for NotebookRuntime:
+   *
+   * * "aiplatform.googleapis.com/notebook_runtime_gce_instance_id": output
+   * only, its value is the Compute Engine instance id.
+   * * "aiplatform.googleapis.com/colab_enterprise_entry_service": its value is
+   * either "bigquery" or "vertex"; if absent, it should be "vertex". This is to
+   * describe the entry service, either BigQuery or Vertex.
+   * 
+ * + * map<string, string> labels = 16; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * The labels with user-defined metadata to organize your
+   * NotebookRuntime.
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one NotebookRuntime
+   * (System labels are excluded).
+   *
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+   * and are immutable. Following system labels exist for NotebookRuntime:
+   *
+   * * "aiplatform.googleapis.com/notebook_runtime_gce_instance_id": output
+   * only, its value is the Compute Engine instance id.
+   * * "aiplatform.googleapis.com/colab_enterprise_entry_service": its value is
+   * either "bigquery" or "vertex"; if absent, it should be "vertex". This is to
+   * describe the entry service, either BigQuery or Vertex.
+   * 
+ * + * map<string, string> labels = 16; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Output only. Timestamp when this NotebookRuntime will be expired:
+   * 1. System Predefined NotebookRuntime: 24 hours after creation. After
+   * expiration, system predifined runtime will be deleted.
+   * 2. User created NotebookRuntime: 6 months after last upgrade. After
+   * expiration, user created runtime will be stopped and allowed for upgrade.
+   * 
+ * + * + * .google.protobuf.Timestamp expiration_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the expirationTime field is set. + */ + boolean hasExpirationTime(); + /** + * + * + *
+   * Output only. Timestamp when this NotebookRuntime will be expired:
+   * 1. System Predefined NotebookRuntime: 24 hours after creation. After
+   * expiration, system predifined runtime will be deleted.
+   * 2. User created NotebookRuntime: 6 months after last upgrade. After
+   * expiration, user created runtime will be stopped and allowed for upgrade.
+   * 
+ * + * + * .google.protobuf.Timestamp expiration_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The expirationTime. + */ + com.google.protobuf.Timestamp getExpirationTime(); + /** + * + * + *
+   * Output only. Timestamp when this NotebookRuntime will be expired:
+   * 1. System Predefined NotebookRuntime: 24 hours after creation. After
+   * expiration, system predifined runtime will be deleted.
+   * 2. User created NotebookRuntime: 6 months after last upgrade. After
+   * expiration, user created runtime will be stopped and allowed for upgrade.
+   * 
+ * + * + * .google.protobuf.Timestamp expiration_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getExpirationTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The VM os image version of NotebookRuntime.
+   * 
+ * + * string version = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The version. + */ + java.lang.String getVersion(); + /** + * + * + *
+   * Output only. The VM os image version of NotebookRuntime.
+   * 
+ * + * string version = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for version. + */ + com.google.protobuf.ByteString getVersionBytes(); + + /** + * + * + *
+   * Output only. The type of the notebook runtime.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntimeType notebook_runtime_type = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for notebookRuntimeType. + */ + int getNotebookRuntimeTypeValue(); + /** + * + * + *
+   * Output only. The type of the notebook runtime.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntimeType notebook_runtime_type = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The notebookRuntimeType. + */ + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeType getNotebookRuntimeType(); + + /** + * + * + *
+   * Optional. The Compute Engine tags to add to runtime (see [Tagging
+   * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).
+   * 
+ * + * repeated string network_tags = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the networkTags. + */ + java.util.List getNetworkTagsList(); + /** + * + * + *
+   * Optional. The Compute Engine tags to add to runtime (see [Tagging
+   * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).
+   * 
+ * + * repeated string network_tags = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of networkTags. + */ + int getNetworkTagsCount(); + /** + * + * + *
+   * Optional. The Compute Engine tags to add to runtime (see [Tagging
+   * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).
+   * 
+ * + * repeated string network_tags = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The networkTags at the given index. + */ + java.lang.String getNetworkTags(int index); + /** + * + * + *
+   * Optional. The Compute Engine tags to add to runtime (see [Tagging
+   * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).
+   * 
+ * + * repeated string network_tags = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the networkTags at the given index. + */ + com.google.protobuf.ByteString getNetworkTagsBytes(int index); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NotebookRuntimeProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NotebookRuntimeProto.java new file mode 100644 index 000000000000..7924f08c0460 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NotebookRuntimeProto.java @@ -0,0 +1,237 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/notebook_runtime.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +public final class NotebookRuntimeProto { + private NotebookRuntimeProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_NotebookRuntimeTemplate_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_NotebookRuntimeTemplate_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_NotebookRuntimeTemplate_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_NotebookRuntimeTemplate_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_NotebookRuntime_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_NotebookRuntime_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_NotebookRuntime_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_NotebookRuntime_LabelsEntry_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n6google/cloud/aiplatform/v1beta1/notebo" + + "ok_runtime.proto\022\037google.cloud.aiplatfor" + + "m.v1beta1\032\037google/api/field_behavior.pro" + + "to\032\031google/api/resource.proto\0327google/cl" + + "oud/aiplatform/v1beta1/machine_resources" + + ".proto\0322google/cloud/aiplatform/v1beta1/" + + "network_spec.proto\0329google/cloud/aiplatf" + + "orm/v1beta1/notebook_euc_config.proto\032Cg" + + "oogle/cloud/aiplatform/v1beta1/notebook_" + + "idle_shutdown_config.proto\032Cgoogle/cloud" + + "/aiplatform/v1beta1/notebook_runtime_tem" + + "plate_ref.proto\032\037google/protobuf/timesta" + + "mp.proto\"\211\t\n\027NotebookRuntimeTemplate\022\021\n\004" + + "name\030\001 \001(\tB\003\340A\003\022\031\n\014display_name\030\002 \001(\tB\003\340" + + "A\002\022\023\n\013description\030\003 \001(\t\022\027\n\nis_default\030\004 " + + "\001(\010B\003\340A\003\022J\n\014machine_spec\030\005 \001(\0132,.google." + + "cloud.aiplatform.v1beta1.MachineSpecB\006\340A" + + "\001\340A\005\022[\n\031data_persistent_disk_spec\030\010 \001(\0132" + + "3.google.cloud.aiplatform.v1beta1.Persis" + + "tentDiskSpecB\003\340A\001\022G\n\014network_spec\030\014 \001(\0132" + + ",.google.cloud.aiplatform.v1beta1.Networ" + + "kSpecB\003\340A\001\022\027\n\017service_account\030\r \001(\t\022\014\n\004e" + + "tag\030\016 \001(\t\022T\n\006labels\030\017 \003(\0132D.google.cloud" + + ".aiplatform.v1beta1.NotebookRuntimeTempl" + + "ate.LabelsEntry\022Y\n\024idle_shutdown_config\030" + + "\021 \001(\0132;.google.cloud.aiplatform.v1beta1." + + "NotebookIdleShutdownConfig\022F\n\neuc_config" + + "\030\022 \001(\01322.google.cloud.aiplatform.v1beta1" + + ".NotebookEucConfig\0224\n\013create_time\030\n \001(\0132" + + "\032.google.protobuf.TimestampB\003\340A\003\0224\n\013upda" + + "te_time\030\013 \001(\0132\032.google.protobuf.Timestam" + + "pB\003\340A\003\022[\n\025notebook_runtime_type\030\023 \001(\01624." + + "google.cloud.aiplatform.v1beta1.Notebook" + + "RuntimeTypeB\006\340A\001\340A\005\022U\n\022shielded_vm_confi" + + "g\030\024 \001(\01321.google.cloud.aiplatform.v1beta" + + "1.ShieldedVmConfigB\006\340A\001\340A\005\022\031\n\014network_ta" + + "gs\030\025 \003(\tB\003\340A\001\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(" + + "\t\022\r\n\005value\030\002 \001(\t:\0028\001:\225\001\352A\221\001\n1aiplatform." + + "googleapis.com/NotebookRuntimeTemplate\022\\" + + "projects/{project}/locations/{location}/" + + "notebookRuntimeTemplates/{notebook_runti" + + "me_template}\"\356\t\n\017NotebookRuntime\022\021\n\004name" + + "\030\001 \001(\tB\003\340A\003\022\031\n\014runtime_user\030\002 \001(\tB\003\340A\002\022g" + + "\n\035notebook_runtime_template_ref\030\003 \001(\0132;." + + "google.cloud.aiplatform.v1beta1.Notebook" + + "RuntimeTemplateRefB\003\340A\003\022\026\n\tproxy_uri\030\005 \001" + + "(\tB\003\340A\003\0224\n\013create_time\030\006 \001(\0132\032.google.pr" + + "otobuf.TimestampB\003\340A\003\0224\n\013update_time\030\007 \001" + + "(\0132\032.google.protobuf.TimestampB\003\340A\003\022W\n\014h" + + "ealth_state\030\010 \001(\0162<.google.cloud.aiplatf" + + "orm.v1beta1.NotebookRuntime.HealthStateB" + + "\003\340A\003\022\031\n\014display_name\030\n \001(\tB\003\340A\002\022\023\n\013descr" + + "iption\030\013 \001(\t\022\034\n\017service_account\030\r \001(\tB\003\340" + + "A\003\022Y\n\rruntime_state\030\016 \001(\0162=.google.cloud" + + ".aiplatform.v1beta1.NotebookRuntime.Runt" + + "imeStateB\003\340A\003\022\032\n\ris_upgradable\030\017 \001(\010B\003\340A" + + "\003\022L\n\006labels\030\020 \003(\0132<.google.cloud.aiplatf" + + "orm.v1beta1.NotebookRuntime.LabelsEntry\022" + + "8\n\017expiration_time\030\021 \001(\0132\032.google.protob" + + "uf.TimestampB\003\340A\003\022\024\n\007version\030\022 \001(\tB\003\340A\003\022" + + "X\n\025notebook_runtime_type\030\023 \001(\01624.google." + + "cloud.aiplatform.v1beta1.NotebookRuntime" + + "TypeB\003\340A\003\022\031\n\014network_tags\030\031 \003(\tB\003\340A\001\032-\n\013" + + "LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:" + + "\0028\001\"G\n\013HealthState\022\034\n\030HEALTH_STATE_UNSPE" + + "CIFIED\020\000\022\013\n\007HEALTHY\020\001\022\r\n\tUNHEALTHY\020\002\"\231\001\n" + + "\014RuntimeState\022\035\n\031RUNTIME_STATE_UNSPECIFI" + + "ED\020\000\022\013\n\007RUNNING\020\001\022\021\n\rBEING_STARTED\020\002\022\021\n\r" + + "BEING_STOPPED\020\003\022\013\n\007STOPPED\020\004\022\022\n\016BEING_UP" + + "GRADED\020\005\022\t\n\005ERROR\020d\022\013\n\007INVALID\020e:{\352Ax\n)a" + + "iplatform.googleapis.com/NotebookRuntime" + + "\022Kprojects/{project}/locations/{location" + + "}/notebookRuntimes/{notebook_runtime}*]\n" + + "\023NotebookRuntimeType\022%\n!NOTEBOOK_RUNTIME" + + "_TYPE_UNSPECIFIED\020\000\022\020\n\014USER_DEFINED\020\001\022\r\n" + + "\tONE_CLICK\020\002B\353\001\n#com.google.cloud.aiplat" + + "form.v1beta1B\024NotebookRuntimeProtoP\001ZCcl" + + "oud.google.com/go/aiplatform/apiv1beta1/" + + "aiplatformpb;aiplatformpb\252\002\037Google.Cloud" + + ".AIPlatform.V1Beta1\312\002\037Google\\Cloud\\AIPla" + + "tform\\V1beta1\352\002\"Google::Cloud::AIPlatfor" + + "m::V1beta1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.aiplatform.v1beta1.MachineResourcesProto.getDescriptor(), + com.google.cloud.aiplatform.v1beta1.NetworkSpecProto.getDescriptor(), + com.google.cloud.aiplatform.v1beta1.NotebookEucConfigProto.getDescriptor(), + com.google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfigProto.getDescriptor(), + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRefProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1beta1_NotebookRuntimeTemplate_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1beta1_NotebookRuntimeTemplate_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_NotebookRuntimeTemplate_descriptor, + new java.lang.String[] { + "Name", + "DisplayName", + "Description", + "IsDefault", + "MachineSpec", + "DataPersistentDiskSpec", + "NetworkSpec", + "ServiceAccount", + "Etag", + "Labels", + "IdleShutdownConfig", + "EucConfig", + "CreateTime", + "UpdateTime", + "NotebookRuntimeType", + "ShieldedVmConfig", + "NetworkTags", + }); + internal_static_google_cloud_aiplatform_v1beta1_NotebookRuntimeTemplate_LabelsEntry_descriptor = + internal_static_google_cloud_aiplatform_v1beta1_NotebookRuntimeTemplate_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_aiplatform_v1beta1_NotebookRuntimeTemplate_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_NotebookRuntimeTemplate_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_aiplatform_v1beta1_NotebookRuntime_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_aiplatform_v1beta1_NotebookRuntime_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_NotebookRuntime_descriptor, + new java.lang.String[] { + "Name", + "RuntimeUser", + "NotebookRuntimeTemplateRef", + "ProxyUri", + "CreateTime", + "UpdateTime", + "HealthState", + "DisplayName", + "Description", + "ServiceAccount", + "RuntimeState", + "IsUpgradable", + "Labels", + "ExpirationTime", + "Version", + "NotebookRuntimeType", + "NetworkTags", + }); + internal_static_google_cloud_aiplatform_v1beta1_NotebookRuntime_LabelsEntry_descriptor = + internal_static_google_cloud_aiplatform_v1beta1_NotebookRuntime_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_aiplatform_v1beta1_NotebookRuntime_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_NotebookRuntime_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.aiplatform.v1beta1.MachineResourcesProto.getDescriptor(); + com.google.cloud.aiplatform.v1beta1.NetworkSpecProto.getDescriptor(); + com.google.cloud.aiplatform.v1beta1.NotebookEucConfigProto.getDescriptor(); + com.google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfigProto.getDescriptor(); + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRefProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NotebookRuntimeTemplate.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NotebookRuntimeTemplate.java new file mode 100644 index 000000000000..53c65dcba815 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NotebookRuntimeTemplate.java @@ -0,0 +1,4784 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/notebook_runtime.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * A template that specifies runtime configurations such as machine type,
+ * runtime version, network configurations, etc.
+ * Multiple runtimes can be created from a runtime template.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate} + */ +public final class NotebookRuntimeTemplate extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate) + NotebookRuntimeTemplateOrBuilder { + private static final long serialVersionUID = 0L; + // Use NotebookRuntimeTemplate.newBuilder() to construct. + private NotebookRuntimeTemplate(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private NotebookRuntimeTemplate() { + name_ = ""; + displayName_ = ""; + description_ = ""; + serviceAccount_ = ""; + etag_ = ""; + notebookRuntimeType_ = 0; + networkTags_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new NotebookRuntimeTemplate(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.NotebookRuntimeProto + .internal_static_google_cloud_aiplatform_v1beta1_NotebookRuntimeTemplate_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 15: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.NotebookRuntimeProto + .internal_static_google_cloud_aiplatform_v1beta1_NotebookRuntimeTemplate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate.class, + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Output only. The resource name of the NotebookRuntimeTemplate.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The resource name of the NotebookRuntimeTemplate.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + /** + * + * + *
+   * Required. The display name of the NotebookRuntimeTemplate.
+   * The name can be up to 128 characters long and can consist of any UTF-8
+   * characters.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + 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(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The display name of the NotebookRuntimeTemplate.
+   * The name can be up to 128 characters long and can consist of any UTF-8
+   * characters.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + * + * + *
+   * The description of the NotebookRuntimeTemplate.
+   * 
+ * + * string description = 3; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + 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(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * The description of the NotebookRuntimeTemplate.
+   * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IS_DEFAULT_FIELD_NUMBER = 4; + private boolean isDefault_ = false; + /** + * + * + *
+   * Output only. The default template to use if not specified.
+   * 
+ * + * bool is_default = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The isDefault. + */ + @java.lang.Override + public boolean getIsDefault() { + return isDefault_; + } + + public static final int MACHINE_SPEC_FIELD_NUMBER = 5; + private com.google.cloud.aiplatform.v1beta1.MachineSpec machineSpec_; + /** + * + * + *
+   * Optional. Immutable. The specification of a single machine for the
+   * template.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.MachineSpec machine_spec = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the machineSpec field is set. + */ + @java.lang.Override + public boolean hasMachineSpec() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Optional. Immutable. The specification of a single machine for the
+   * template.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.MachineSpec machine_spec = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The machineSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.MachineSpec getMachineSpec() { + return machineSpec_ == null + ? com.google.cloud.aiplatform.v1beta1.MachineSpec.getDefaultInstance() + : machineSpec_; + } + /** + * + * + *
+   * Optional. Immutable. The specification of a single machine for the
+   * template.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.MachineSpec machine_spec = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.MachineSpecOrBuilder getMachineSpecOrBuilder() { + return machineSpec_ == null + ? com.google.cloud.aiplatform.v1beta1.MachineSpec.getDefaultInstance() + : machineSpec_; + } + + public static final int DATA_PERSISTENT_DISK_SPEC_FIELD_NUMBER = 8; + private com.google.cloud.aiplatform.v1beta1.PersistentDiskSpec dataPersistentDiskSpec_; + /** + * + * + *
+   * Optional. The specification of [persistent
+   * disk][https://cloud.google.com/compute/docs/disks/persistent-disks]
+   * attached to the runtime as data disk storage.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.PersistentDiskSpec data_persistent_disk_spec = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the dataPersistentDiskSpec field is set. + */ + @java.lang.Override + public boolean hasDataPersistentDiskSpec() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Optional. The specification of [persistent
+   * disk][https://cloud.google.com/compute/docs/disks/persistent-disks]
+   * attached to the runtime as data disk storage.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.PersistentDiskSpec data_persistent_disk_spec = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The dataPersistentDiskSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.PersistentDiskSpec getDataPersistentDiskSpec() { + return dataPersistentDiskSpec_ == null + ? com.google.cloud.aiplatform.v1beta1.PersistentDiskSpec.getDefaultInstance() + : dataPersistentDiskSpec_; + } + /** + * + * + *
+   * Optional. The specification of [persistent
+   * disk][https://cloud.google.com/compute/docs/disks/persistent-disks]
+   * attached to the runtime as data disk storage.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.PersistentDiskSpec data_persistent_disk_spec = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.PersistentDiskSpecOrBuilder + getDataPersistentDiskSpecOrBuilder() { + return dataPersistentDiskSpec_ == null + ? com.google.cloud.aiplatform.v1beta1.PersistentDiskSpec.getDefaultInstance() + : dataPersistentDiskSpec_; + } + + public static final int NETWORK_SPEC_FIELD_NUMBER = 12; + private com.google.cloud.aiplatform.v1beta1.NetworkSpec networkSpec_; + /** + * + * + *
+   * Optional. Network spec.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NetworkSpec network_spec = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the networkSpec field is set. + */ + @java.lang.Override + public boolean hasNetworkSpec() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+   * Optional. Network spec.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NetworkSpec network_spec = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The networkSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NetworkSpec getNetworkSpec() { + return networkSpec_ == null + ? com.google.cloud.aiplatform.v1beta1.NetworkSpec.getDefaultInstance() + : networkSpec_; + } + /** + * + * + *
+   * Optional. Network spec.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NetworkSpec network_spec = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NetworkSpecOrBuilder getNetworkSpecOrBuilder() { + return networkSpec_ == null + ? com.google.cloud.aiplatform.v1beta1.NetworkSpec.getDefaultInstance() + : networkSpec_; + } + + public static final int SERVICE_ACCOUNT_FIELD_NUMBER = 13; + + @SuppressWarnings("serial") + private volatile java.lang.Object serviceAccount_ = ""; + /** + * + * + *
+   * The service account that the runtime workload runs as.
+   * You can use any service account within the same project, but you
+   * must have the service account user permission to use the instance.
+   *
+   * If not specified, the [Compute Engine default service
+   * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account)
+   * is used.
+   * 
+ * + * string service_account = 13; + * + * @return The serviceAccount. + */ + @java.lang.Override + public java.lang.String getServiceAccount() { + java.lang.Object ref = serviceAccount_; + 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(); + serviceAccount_ = s; + return s; + } + } + /** + * + * + *
+   * The service account that the runtime workload runs as.
+   * You can use any service account within the same project, but you
+   * must have the service account user permission to use the instance.
+   *
+   * If not specified, the [Compute Engine default service
+   * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account)
+   * is used.
+   * 
+ * + * string service_account = 13; + * + * @return The bytes for serviceAccount. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServiceAccountBytes() { + java.lang.Object ref = serviceAccount_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceAccount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ETAG_FIELD_NUMBER = 14; + + @SuppressWarnings("serial") + private volatile java.lang.Object etag_ = ""; + /** + * + * + *
+   * Used to perform consistent read-modify-write updates. If not set, a blind
+   * "overwrite" update happens.
+   * 
+ * + * string etag = 14; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + 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(); + etag_ = s; + return s; + } + } + /** + * + * + *
+   * Used to perform consistent read-modify-write updates. If not set, a blind
+   * "overwrite" update happens.
+   * 
+ * + * string etag = 14; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LABELS_FIELD_NUMBER = 15; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeProto + .internal_static_google_cloud_aiplatform_v1beta1_NotebookRuntimeTemplate_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * The labels with user-defined metadata to organize the
+   * NotebookRuntimeTemplates.
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   *
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 15; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * The labels with user-defined metadata to organize the
+   * NotebookRuntimeTemplates.
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   *
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 15; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * The labels with user-defined metadata to organize the
+   * NotebookRuntimeTemplates.
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   *
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 15; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * The labels with user-defined metadata to organize the
+   * NotebookRuntimeTemplates.
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   *
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 15; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int IDLE_SHUTDOWN_CONFIG_FIELD_NUMBER = 17; + private com.google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig idleShutdownConfig_; + /** + * + * + *
+   * The idle shutdown configuration of NotebookRuntimeTemplate. This config
+   * will only be set when idle shutdown is enabled.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig idle_shutdown_config = 17; + * + * + * @return Whether the idleShutdownConfig field is set. + */ + @java.lang.Override + public boolean hasIdleShutdownConfig() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+   * The idle shutdown configuration of NotebookRuntimeTemplate. This config
+   * will only be set when idle shutdown is enabled.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig idle_shutdown_config = 17; + * + * + * @return The idleShutdownConfig. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig getIdleShutdownConfig() { + return idleShutdownConfig_ == null + ? com.google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig.getDefaultInstance() + : idleShutdownConfig_; + } + /** + * + * + *
+   * The idle shutdown configuration of NotebookRuntimeTemplate. This config
+   * will only be set when idle shutdown is enabled.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig idle_shutdown_config = 17; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfigOrBuilder + getIdleShutdownConfigOrBuilder() { + return idleShutdownConfig_ == null + ? com.google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig.getDefaultInstance() + : idleShutdownConfig_; + } + + public static final int EUC_CONFIG_FIELD_NUMBER = 18; + private com.google.cloud.aiplatform.v1beta1.NotebookEucConfig eucConfig_; + /** + * + * + *
+   * EUC configuration of the NotebookRuntimeTemplate.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.NotebookEucConfig euc_config = 18; + * + * @return Whether the eucConfig field is set. + */ + @java.lang.Override + public boolean hasEucConfig() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+   * EUC configuration of the NotebookRuntimeTemplate.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.NotebookEucConfig euc_config = 18; + * + * @return The eucConfig. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NotebookEucConfig getEucConfig() { + return eucConfig_ == null + ? com.google.cloud.aiplatform.v1beta1.NotebookEucConfig.getDefaultInstance() + : eucConfig_; + } + /** + * + * + *
+   * EUC configuration of the NotebookRuntimeTemplate.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.NotebookEucConfig euc_config = 18; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NotebookEucConfigOrBuilder getEucConfigOrBuilder() { + return eucConfig_ == null + ? com.google.cloud.aiplatform.v1beta1.NotebookEucConfig.getDefaultInstance() + : eucConfig_; + } + + public static final int CREATE_TIME_FIELD_NUMBER = 10; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. Timestamp when this NotebookRuntimeTemplate was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+   * Output only. Timestamp when this NotebookRuntimeTemplate was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. Timestamp when this NotebookRuntimeTemplate was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 11; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. Timestamp when this NotebookRuntimeTemplate was most recently
+   * updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+   * Output only. Timestamp when this NotebookRuntimeTemplate was most recently
+   * updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. Timestamp when this NotebookRuntimeTemplate was most recently
+   * updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int NOTEBOOK_RUNTIME_TYPE_FIELD_NUMBER = 19; + private int notebookRuntimeType_ = 0; + /** + * + * + *
+   * Optional. Immutable. The type of the notebook runtime template.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntimeType notebook_runtime_type = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The enum numeric value on the wire for notebookRuntimeType. + */ + @java.lang.Override + public int getNotebookRuntimeTypeValue() { + return notebookRuntimeType_; + } + /** + * + * + *
+   * Optional. Immutable. The type of the notebook runtime template.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntimeType notebook_runtime_type = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The notebookRuntimeType. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NotebookRuntimeType getNotebookRuntimeType() { + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeType result = + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeType.forNumber(notebookRuntimeType_); + return result == null + ? com.google.cloud.aiplatform.v1beta1.NotebookRuntimeType.UNRECOGNIZED + : result; + } + + public static final int SHIELDED_VM_CONFIG_FIELD_NUMBER = 20; + private com.google.cloud.aiplatform.v1beta1.ShieldedVmConfig shieldedVmConfig_; + /** + * + * + *
+   * Optional. Immutable. Runtime Shielded VM spec.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.ShieldedVmConfig shielded_vm_config = 20 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the shieldedVmConfig field is set. + */ + @java.lang.Override + public boolean hasShieldedVmConfig() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * + * + *
+   * Optional. Immutable. Runtime Shielded VM spec.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.ShieldedVmConfig shielded_vm_config = 20 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The shieldedVmConfig. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ShieldedVmConfig getShieldedVmConfig() { + return shieldedVmConfig_ == null + ? com.google.cloud.aiplatform.v1beta1.ShieldedVmConfig.getDefaultInstance() + : shieldedVmConfig_; + } + /** + * + * + *
+   * Optional. Immutable. Runtime Shielded VM spec.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.ShieldedVmConfig shielded_vm_config = 20 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ShieldedVmConfigOrBuilder + getShieldedVmConfigOrBuilder() { + return shieldedVmConfig_ == null + ? com.google.cloud.aiplatform.v1beta1.ShieldedVmConfig.getDefaultInstance() + : shieldedVmConfig_; + } + + public static final int NETWORK_TAGS_FIELD_NUMBER = 21; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList networkTags_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Optional. The Compute Engine tags to add to runtime (see [Tagging
+   * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).
+   * 
+ * + * repeated string network_tags = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the networkTags. + */ + public com.google.protobuf.ProtocolStringList getNetworkTagsList() { + return networkTags_; + } + /** + * + * + *
+   * Optional. The Compute Engine tags to add to runtime (see [Tagging
+   * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).
+   * 
+ * + * repeated string network_tags = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of networkTags. + */ + public int getNetworkTagsCount() { + return networkTags_.size(); + } + /** + * + * + *
+   * Optional. The Compute Engine tags to add to runtime (see [Tagging
+   * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).
+   * 
+ * + * repeated string network_tags = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The networkTags at the given index. + */ + public java.lang.String getNetworkTags(int index) { + return networkTags_.get(index); + } + /** + * + * + *
+   * Optional. The Compute Engine tags to add to runtime (see [Tagging
+   * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).
+   * 
+ * + * repeated string network_tags = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the networkTags at the given index. + */ + public com.google.protobuf.ByteString getNetworkTagsBytes(int index) { + return networkTags_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + if (isDefault_ != false) { + output.writeBool(4, isDefault_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(5, getMachineSpec()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(8, getDataPersistentDiskSpec()); + } + if (((bitField0_ & 0x00000020) != 0)) { + output.writeMessage(10, getCreateTime()); + } + if (((bitField0_ & 0x00000040) != 0)) { + output.writeMessage(11, getUpdateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(12, getNetworkSpec()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccount_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 13, serviceAccount_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 14, etag_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 15); + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(17, getIdleShutdownConfig()); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeMessage(18, getEucConfig()); + } + if (notebookRuntimeType_ + != com.google.cloud.aiplatform.v1beta1.NotebookRuntimeType.NOTEBOOK_RUNTIME_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(19, notebookRuntimeType_); + } + if (((bitField0_ & 0x00000080) != 0)) { + output.writeMessage(20, getShieldedVmConfig()); + } + for (int i = 0; i < networkTags_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 21, networkTags_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + if (isDefault_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, isDefault_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getMachineSpec()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(8, getDataPersistentDiskSpec()); + } + if (((bitField0_ & 0x00000020) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getCreateTime()); + } + if (((bitField0_ & 0x00000040) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getUpdateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getNetworkSpec()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccount_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, serviceAccount_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(14, etag_); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(15, labels__); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(17, getIdleShutdownConfig()); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(18, getEucConfig()); + } + if (notebookRuntimeType_ + != com.google.cloud.aiplatform.v1beta1.NotebookRuntimeType.NOTEBOOK_RUNTIME_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(19, notebookRuntimeType_); + } + if (((bitField0_ & 0x00000080) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(20, getShieldedVmConfig()); + } + { + int dataSize = 0; + for (int i = 0; i < networkTags_.size(); i++) { + dataSize += computeStringSizeNoTag(networkTags_.getRaw(i)); + } + size += dataSize; + size += 2 * getNetworkTagsList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate other = + (com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (getIsDefault() != other.getIsDefault()) return false; + if (hasMachineSpec() != other.hasMachineSpec()) return false; + if (hasMachineSpec()) { + if (!getMachineSpec().equals(other.getMachineSpec())) return false; + } + if (hasDataPersistentDiskSpec() != other.hasDataPersistentDiskSpec()) return false; + if (hasDataPersistentDiskSpec()) { + if (!getDataPersistentDiskSpec().equals(other.getDataPersistentDiskSpec())) return false; + } + if (hasNetworkSpec() != other.hasNetworkSpec()) return false; + if (hasNetworkSpec()) { + if (!getNetworkSpec().equals(other.getNetworkSpec())) return false; + } + if (!getServiceAccount().equals(other.getServiceAccount())) return false; + if (!getEtag().equals(other.getEtag())) return false; + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (hasIdleShutdownConfig() != other.hasIdleShutdownConfig()) return false; + if (hasIdleShutdownConfig()) { + if (!getIdleShutdownConfig().equals(other.getIdleShutdownConfig())) return false; + } + if (hasEucConfig() != other.hasEucConfig()) return false; + if (hasEucConfig()) { + if (!getEucConfig().equals(other.getEucConfig())) return false; + } + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (notebookRuntimeType_ != other.notebookRuntimeType_) return false; + if (hasShieldedVmConfig() != other.hasShieldedVmConfig()) return false; + if (hasShieldedVmConfig()) { + if (!getShieldedVmConfig().equals(other.getShieldedVmConfig())) return false; + } + if (!getNetworkTagsList().equals(other.getNetworkTagsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + IS_DEFAULT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIsDefault()); + if (hasMachineSpec()) { + hash = (37 * hash) + MACHINE_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getMachineSpec().hashCode(); + } + if (hasDataPersistentDiskSpec()) { + hash = (37 * hash) + DATA_PERSISTENT_DISK_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getDataPersistentDiskSpec().hashCode(); + } + if (hasNetworkSpec()) { + hash = (37 * hash) + NETWORK_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getNetworkSpec().hashCode(); + } + hash = (37 * hash) + SERVICE_ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getServiceAccount().hashCode(); + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + if (hasIdleShutdownConfig()) { + hash = (37 * hash) + IDLE_SHUTDOWN_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getIdleShutdownConfig().hashCode(); + } + if (hasEucConfig()) { + hash = (37 * hash) + EUC_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getEucConfig().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (37 * hash) + NOTEBOOK_RUNTIME_TYPE_FIELD_NUMBER; + hash = (53 * hash) + notebookRuntimeType_; + if (hasShieldedVmConfig()) { + hash = (37 * hash) + SHIELDED_VM_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getShieldedVmConfig().hashCode(); + } + if (getNetworkTagsCount() > 0) { + hash = (37 * hash) + NETWORK_TAGS_FIELD_NUMBER; + hash = (53 * hash) + getNetworkTagsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A template that specifies runtime configurations such as machine type,
+   * runtime version, network configurations, etc.
+   * Multiple runtimes can be created from a runtime template.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate) + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.NotebookRuntimeProto + .internal_static_google_cloud_aiplatform_v1beta1_NotebookRuntimeTemplate_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 15: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 15: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.NotebookRuntimeProto + .internal_static_google_cloud_aiplatform_v1beta1_NotebookRuntimeTemplate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate.class, + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getMachineSpecFieldBuilder(); + getDataPersistentDiskSpecFieldBuilder(); + getNetworkSpecFieldBuilder(); + getIdleShutdownConfigFieldBuilder(); + getEucConfigFieldBuilder(); + getCreateTimeFieldBuilder(); + getUpdateTimeFieldBuilder(); + getShieldedVmConfigFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + displayName_ = ""; + description_ = ""; + isDefault_ = false; + machineSpec_ = null; + if (machineSpecBuilder_ != null) { + machineSpecBuilder_.dispose(); + machineSpecBuilder_ = null; + } + dataPersistentDiskSpec_ = null; + if (dataPersistentDiskSpecBuilder_ != null) { + dataPersistentDiskSpecBuilder_.dispose(); + dataPersistentDiskSpecBuilder_ = null; + } + networkSpec_ = null; + if (networkSpecBuilder_ != null) { + networkSpecBuilder_.dispose(); + networkSpecBuilder_ = null; + } + serviceAccount_ = ""; + etag_ = ""; + internalGetMutableLabels().clear(); + idleShutdownConfig_ = null; + if (idleShutdownConfigBuilder_ != null) { + idleShutdownConfigBuilder_.dispose(); + idleShutdownConfigBuilder_ = null; + } + eucConfig_ = null; + if (eucConfigBuilder_ != null) { + eucConfigBuilder_.dispose(); + eucConfigBuilder_ = null; + } + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + notebookRuntimeType_ = 0; + shieldedVmConfig_ = null; + if (shieldedVmConfigBuilder_ != null) { + shieldedVmConfigBuilder_.dispose(); + shieldedVmConfigBuilder_ = null; + } + networkTags_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.NotebookRuntimeProto + .internal_static_google_cloud_aiplatform_v1beta1_NotebookRuntimeTemplate_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate build() { + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate buildPartial() { + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate result = + new com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.isDefault_ = isDefault_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000010) != 0)) { + result.machineSpec_ = + machineSpecBuilder_ == null ? machineSpec_ : machineSpecBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.dataPersistentDiskSpec_ = + dataPersistentDiskSpecBuilder_ == null + ? dataPersistentDiskSpec_ + : dataPersistentDiskSpecBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.networkSpec_ = + networkSpecBuilder_ == null ? networkSpec_ : networkSpecBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.serviceAccount_ = serviceAccount_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.etag_ = etag_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.idleShutdownConfig_ = + idleShutdownConfigBuilder_ == null + ? idleShutdownConfig_ + : idleShutdownConfigBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.eucConfig_ = eucConfigBuilder_ == null ? eucConfig_ : eucConfigBuilder_.build(); + to_bitField0_ |= 0x00000010; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000020; + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000040; + } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.notebookRuntimeType_ = notebookRuntimeType_; + } + if (((from_bitField0_ & 0x00008000) != 0)) { + result.shieldedVmConfig_ = + shieldedVmConfigBuilder_ == null ? shieldedVmConfig_ : shieldedVmConfigBuilder_.build(); + to_bitField0_ |= 0x00000080; + } + if (((from_bitField0_ & 0x00010000) != 0)) { + networkTags_.makeImmutable(); + result.networkTags_ = networkTags_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate other) { + if (other == com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.getIsDefault() != false) { + setIsDefault(other.getIsDefault()); + } + if (other.hasMachineSpec()) { + mergeMachineSpec(other.getMachineSpec()); + } + if (other.hasDataPersistentDiskSpec()) { + mergeDataPersistentDiskSpec(other.getDataPersistentDiskSpec()); + } + if (other.hasNetworkSpec()) { + mergeNetworkSpec(other.getNetworkSpec()); + } + if (!other.getServiceAccount().isEmpty()) { + serviceAccount_ = other.serviceAccount_; + bitField0_ |= 0x00000080; + onChanged(); + } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + bitField0_ |= 0x00000100; + onChanged(); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000200; + if (other.hasIdleShutdownConfig()) { + mergeIdleShutdownConfig(other.getIdleShutdownConfig()); + } + if (other.hasEucConfig()) { + mergeEucConfig(other.getEucConfig()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.notebookRuntimeType_ != 0) { + setNotebookRuntimeTypeValue(other.getNotebookRuntimeTypeValue()); + } + if (other.hasShieldedVmConfig()) { + mergeShieldedVmConfig(other.getShieldedVmConfig()); + } + if (!other.networkTags_.isEmpty()) { + if (networkTags_.isEmpty()) { + networkTags_ = other.networkTags_; + bitField0_ |= 0x00010000; + } else { + ensureNetworkTagsIsMutable(); + networkTags_.addAll(other.networkTags_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + isDefault_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: + { + input.readMessage(getMachineSpecFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 66: + { + input.readMessage( + getDataPersistentDiskSpecFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 66 + case 82: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00001000; + break; + } // case 82 + case 90: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00002000; + break; + } // case 90 + case 98: + { + input.readMessage(getNetworkSpecFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 98 + case 106: + { + serviceAccount_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 106 + case 114: + { + etag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 114 + case 122: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000200; + break; + } // case 122 + case 138: + { + input.readMessage( + getIdleShutdownConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000400; + break; + } // case 138 + case 146: + { + input.readMessage(getEucConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000800; + break; + } // case 146 + case 152: + { + notebookRuntimeType_ = input.readEnum(); + bitField0_ |= 0x00004000; + break; + } // case 152 + case 162: + { + input.readMessage( + getShieldedVmConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00008000; + break; + } // case 162 + case 170: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureNetworkTagsIsMutable(); + networkTags_.add(s); + break; + } // case 170 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. The resource name of the NotebookRuntimeTemplate.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The resource name of the NotebookRuntimeTemplate.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The resource name of the NotebookRuntimeTemplate.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The resource name of the NotebookRuntimeTemplate.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The resource name of the NotebookRuntimeTemplate.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Required. The display name of the NotebookRuntimeTemplate.
+     * The name can be up to 128 characters long and can consist of any UTF-8
+     * characters.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The display name of the NotebookRuntimeTemplate.
+     * The name can be up to 128 characters long and can consist of any UTF-8
+     * characters.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The display name of the NotebookRuntimeTemplate.
+     * The name can be up to 128 characters long and can consist of any UTF-8
+     * characters.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The display name of the NotebookRuntimeTemplate.
+     * The name can be up to 128 characters long and can consist of any UTF-8
+     * characters.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The display name of the NotebookRuntimeTemplate.
+     * The name can be up to 128 characters long and can consist of any UTF-8
+     * characters.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * The description of the NotebookRuntimeTemplate.
+     * 
+ * + * string description = 3; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The description of the NotebookRuntimeTemplate.
+     * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The description of the NotebookRuntimeTemplate.
+     * 
+ * + * string description = 3; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The description of the NotebookRuntimeTemplate.
+     * 
+ * + * string description = 3; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * The description of the NotebookRuntimeTemplate.
+     * 
+ * + * string description = 3; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private boolean isDefault_; + /** + * + * + *
+     * Output only. The default template to use if not specified.
+     * 
+ * + * bool is_default = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The isDefault. + */ + @java.lang.Override + public boolean getIsDefault() { + return isDefault_; + } + /** + * + * + *
+     * Output only. The default template to use if not specified.
+     * 
+ * + * bool is_default = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The isDefault to set. + * @return This builder for chaining. + */ + public Builder setIsDefault(boolean value) { + + isDefault_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The default template to use if not specified.
+     * 
+ * + * bool is_default = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearIsDefault() { + bitField0_ = (bitField0_ & ~0x00000008); + isDefault_ = false; + onChanged(); + return this; + } + + private com.google.cloud.aiplatform.v1beta1.MachineSpec machineSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.MachineSpec, + com.google.cloud.aiplatform.v1beta1.MachineSpec.Builder, + com.google.cloud.aiplatform.v1beta1.MachineSpecOrBuilder> + machineSpecBuilder_; + /** + * + * + *
+     * Optional. Immutable. The specification of a single machine for the
+     * template.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.MachineSpec machine_spec = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the machineSpec field is set. + */ + public boolean hasMachineSpec() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * Optional. Immutable. The specification of a single machine for the
+     * template.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.MachineSpec machine_spec = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The machineSpec. + */ + public com.google.cloud.aiplatform.v1beta1.MachineSpec getMachineSpec() { + if (machineSpecBuilder_ == null) { + return machineSpec_ == null + ? com.google.cloud.aiplatform.v1beta1.MachineSpec.getDefaultInstance() + : machineSpec_; + } else { + return machineSpecBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Immutable. The specification of a single machine for the
+     * template.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.MachineSpec machine_spec = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder setMachineSpec(com.google.cloud.aiplatform.v1beta1.MachineSpec value) { + if (machineSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + machineSpec_ = value; + } else { + machineSpecBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Immutable. The specification of a single machine for the
+     * template.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.MachineSpec machine_spec = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder setMachineSpec( + com.google.cloud.aiplatform.v1beta1.MachineSpec.Builder builderForValue) { + if (machineSpecBuilder_ == null) { + machineSpec_ = builderForValue.build(); + } else { + machineSpecBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Immutable. The specification of a single machine for the
+     * template.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.MachineSpec machine_spec = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder mergeMachineSpec(com.google.cloud.aiplatform.v1beta1.MachineSpec value) { + if (machineSpecBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && machineSpec_ != null + && machineSpec_ + != com.google.cloud.aiplatform.v1beta1.MachineSpec.getDefaultInstance()) { + getMachineSpecBuilder().mergeFrom(value); + } else { + machineSpec_ = value; + } + } else { + machineSpecBuilder_.mergeFrom(value); + } + if (machineSpec_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Optional. Immutable. The specification of a single machine for the
+     * template.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.MachineSpec machine_spec = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder clearMachineSpec() { + bitField0_ = (bitField0_ & ~0x00000010); + machineSpec_ = null; + if (machineSpecBuilder_ != null) { + machineSpecBuilder_.dispose(); + machineSpecBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Immutable. The specification of a single machine for the
+     * template.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.MachineSpec machine_spec = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public com.google.cloud.aiplatform.v1beta1.MachineSpec.Builder getMachineSpecBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getMachineSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Immutable. The specification of a single machine for the
+     * template.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.MachineSpec machine_spec = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public com.google.cloud.aiplatform.v1beta1.MachineSpecOrBuilder getMachineSpecOrBuilder() { + if (machineSpecBuilder_ != null) { + return machineSpecBuilder_.getMessageOrBuilder(); + } else { + return machineSpec_ == null + ? com.google.cloud.aiplatform.v1beta1.MachineSpec.getDefaultInstance() + : machineSpec_; + } + } + /** + * + * + *
+     * Optional. Immutable. The specification of a single machine for the
+     * template.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.MachineSpec machine_spec = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.MachineSpec, + com.google.cloud.aiplatform.v1beta1.MachineSpec.Builder, + com.google.cloud.aiplatform.v1beta1.MachineSpecOrBuilder> + getMachineSpecFieldBuilder() { + if (machineSpecBuilder_ == null) { + machineSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.MachineSpec, + com.google.cloud.aiplatform.v1beta1.MachineSpec.Builder, + com.google.cloud.aiplatform.v1beta1.MachineSpecOrBuilder>( + getMachineSpec(), getParentForChildren(), isClean()); + machineSpec_ = null; + } + return machineSpecBuilder_; + } + + private com.google.cloud.aiplatform.v1beta1.PersistentDiskSpec dataPersistentDiskSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.PersistentDiskSpec, + com.google.cloud.aiplatform.v1beta1.PersistentDiskSpec.Builder, + com.google.cloud.aiplatform.v1beta1.PersistentDiskSpecOrBuilder> + dataPersistentDiskSpecBuilder_; + /** + * + * + *
+     * Optional. The specification of [persistent
+     * disk][https://cloud.google.com/compute/docs/disks/persistent-disks]
+     * attached to the runtime as data disk storage.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.PersistentDiskSpec data_persistent_disk_spec = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the dataPersistentDiskSpec field is set. + */ + public boolean hasDataPersistentDiskSpec() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+     * Optional. The specification of [persistent
+     * disk][https://cloud.google.com/compute/docs/disks/persistent-disks]
+     * attached to the runtime as data disk storage.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.PersistentDiskSpec data_persistent_disk_spec = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The dataPersistentDiskSpec. + */ + public com.google.cloud.aiplatform.v1beta1.PersistentDiskSpec getDataPersistentDiskSpec() { + if (dataPersistentDiskSpecBuilder_ == null) { + return dataPersistentDiskSpec_ == null + ? com.google.cloud.aiplatform.v1beta1.PersistentDiskSpec.getDefaultInstance() + : dataPersistentDiskSpec_; + } else { + return dataPersistentDiskSpecBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. The specification of [persistent
+     * disk][https://cloud.google.com/compute/docs/disks/persistent-disks]
+     * attached to the runtime as data disk storage.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.PersistentDiskSpec data_persistent_disk_spec = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDataPersistentDiskSpec( + com.google.cloud.aiplatform.v1beta1.PersistentDiskSpec value) { + if (dataPersistentDiskSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dataPersistentDiskSpec_ = value; + } else { + dataPersistentDiskSpecBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The specification of [persistent
+     * disk][https://cloud.google.com/compute/docs/disks/persistent-disks]
+     * attached to the runtime as data disk storage.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.PersistentDiskSpec data_persistent_disk_spec = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDataPersistentDiskSpec( + com.google.cloud.aiplatform.v1beta1.PersistentDiskSpec.Builder builderForValue) { + if (dataPersistentDiskSpecBuilder_ == null) { + dataPersistentDiskSpec_ = builderForValue.build(); + } else { + dataPersistentDiskSpecBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The specification of [persistent
+     * disk][https://cloud.google.com/compute/docs/disks/persistent-disks]
+     * attached to the runtime as data disk storage.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.PersistentDiskSpec data_persistent_disk_spec = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeDataPersistentDiskSpec( + com.google.cloud.aiplatform.v1beta1.PersistentDiskSpec value) { + if (dataPersistentDiskSpecBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && dataPersistentDiskSpec_ != null + && dataPersistentDiskSpec_ + != com.google.cloud.aiplatform.v1beta1.PersistentDiskSpec.getDefaultInstance()) { + getDataPersistentDiskSpecBuilder().mergeFrom(value); + } else { + dataPersistentDiskSpec_ = value; + } + } else { + dataPersistentDiskSpecBuilder_.mergeFrom(value); + } + if (dataPersistentDiskSpec_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Optional. The specification of [persistent
+     * disk][https://cloud.google.com/compute/docs/disks/persistent-disks]
+     * attached to the runtime as data disk storage.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.PersistentDiskSpec data_persistent_disk_spec = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearDataPersistentDiskSpec() { + bitField0_ = (bitField0_ & ~0x00000020); + dataPersistentDiskSpec_ = null; + if (dataPersistentDiskSpecBuilder_ != null) { + dataPersistentDiskSpecBuilder_.dispose(); + dataPersistentDiskSpecBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The specification of [persistent
+     * disk][https://cloud.google.com/compute/docs/disks/persistent-disks]
+     * attached to the runtime as data disk storage.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.PersistentDiskSpec data_persistent_disk_spec = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1beta1.PersistentDiskSpec.Builder + getDataPersistentDiskSpecBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getDataPersistentDiskSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The specification of [persistent
+     * disk][https://cloud.google.com/compute/docs/disks/persistent-disks]
+     * attached to the runtime as data disk storage.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.PersistentDiskSpec data_persistent_disk_spec = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1beta1.PersistentDiskSpecOrBuilder + getDataPersistentDiskSpecOrBuilder() { + if (dataPersistentDiskSpecBuilder_ != null) { + return dataPersistentDiskSpecBuilder_.getMessageOrBuilder(); + } else { + return dataPersistentDiskSpec_ == null + ? com.google.cloud.aiplatform.v1beta1.PersistentDiskSpec.getDefaultInstance() + : dataPersistentDiskSpec_; + } + } + /** + * + * + *
+     * Optional. The specification of [persistent
+     * disk][https://cloud.google.com/compute/docs/disks/persistent-disks]
+     * attached to the runtime as data disk storage.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.PersistentDiskSpec data_persistent_disk_spec = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.PersistentDiskSpec, + com.google.cloud.aiplatform.v1beta1.PersistentDiskSpec.Builder, + com.google.cloud.aiplatform.v1beta1.PersistentDiskSpecOrBuilder> + getDataPersistentDiskSpecFieldBuilder() { + if (dataPersistentDiskSpecBuilder_ == null) { + dataPersistentDiskSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.PersistentDiskSpec, + com.google.cloud.aiplatform.v1beta1.PersistentDiskSpec.Builder, + com.google.cloud.aiplatform.v1beta1.PersistentDiskSpecOrBuilder>( + getDataPersistentDiskSpec(), getParentForChildren(), isClean()); + dataPersistentDiskSpec_ = null; + } + return dataPersistentDiskSpecBuilder_; + } + + private com.google.cloud.aiplatform.v1beta1.NetworkSpec networkSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.NetworkSpec, + com.google.cloud.aiplatform.v1beta1.NetworkSpec.Builder, + com.google.cloud.aiplatform.v1beta1.NetworkSpecOrBuilder> + networkSpecBuilder_; + /** + * + * + *
+     * Optional. Network spec.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NetworkSpec network_spec = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the networkSpec field is set. + */ + public boolean hasNetworkSpec() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+     * Optional. Network spec.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NetworkSpec network_spec = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The networkSpec. + */ + public com.google.cloud.aiplatform.v1beta1.NetworkSpec getNetworkSpec() { + if (networkSpecBuilder_ == null) { + return networkSpec_ == null + ? com.google.cloud.aiplatform.v1beta1.NetworkSpec.getDefaultInstance() + : networkSpec_; + } else { + return networkSpecBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Network spec.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NetworkSpec network_spec = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setNetworkSpec(com.google.cloud.aiplatform.v1beta1.NetworkSpec value) { + if (networkSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + networkSpec_ = value; + } else { + networkSpecBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Network spec.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NetworkSpec network_spec = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setNetworkSpec( + com.google.cloud.aiplatform.v1beta1.NetworkSpec.Builder builderForValue) { + if (networkSpecBuilder_ == null) { + networkSpec_ = builderForValue.build(); + } else { + networkSpecBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Network spec.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NetworkSpec network_spec = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeNetworkSpec(com.google.cloud.aiplatform.v1beta1.NetworkSpec value) { + if (networkSpecBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && networkSpec_ != null + && networkSpec_ + != com.google.cloud.aiplatform.v1beta1.NetworkSpec.getDefaultInstance()) { + getNetworkSpecBuilder().mergeFrom(value); + } else { + networkSpec_ = value; + } + } else { + networkSpecBuilder_.mergeFrom(value); + } + if (networkSpec_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Optional. Network spec.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NetworkSpec network_spec = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearNetworkSpec() { + bitField0_ = (bitField0_ & ~0x00000040); + networkSpec_ = null; + if (networkSpecBuilder_ != null) { + networkSpecBuilder_.dispose(); + networkSpecBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Network spec.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NetworkSpec network_spec = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1beta1.NetworkSpec.Builder getNetworkSpecBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getNetworkSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Network spec.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NetworkSpec network_spec = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1beta1.NetworkSpecOrBuilder getNetworkSpecOrBuilder() { + if (networkSpecBuilder_ != null) { + return networkSpecBuilder_.getMessageOrBuilder(); + } else { + return networkSpec_ == null + ? com.google.cloud.aiplatform.v1beta1.NetworkSpec.getDefaultInstance() + : networkSpec_; + } + } + /** + * + * + *
+     * Optional. Network spec.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NetworkSpec network_spec = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.NetworkSpec, + com.google.cloud.aiplatform.v1beta1.NetworkSpec.Builder, + com.google.cloud.aiplatform.v1beta1.NetworkSpecOrBuilder> + getNetworkSpecFieldBuilder() { + if (networkSpecBuilder_ == null) { + networkSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.NetworkSpec, + com.google.cloud.aiplatform.v1beta1.NetworkSpec.Builder, + com.google.cloud.aiplatform.v1beta1.NetworkSpecOrBuilder>( + getNetworkSpec(), getParentForChildren(), isClean()); + networkSpec_ = null; + } + return networkSpecBuilder_; + } + + private java.lang.Object serviceAccount_ = ""; + /** + * + * + *
+     * The service account that the runtime workload runs as.
+     * You can use any service account within the same project, but you
+     * must have the service account user permission to use the instance.
+     *
+     * If not specified, the [Compute Engine default service
+     * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account)
+     * is used.
+     * 
+ * + * string service_account = 13; + * + * @return The serviceAccount. + */ + public java.lang.String getServiceAccount() { + java.lang.Object ref = serviceAccount_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceAccount_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The service account that the runtime workload runs as.
+     * You can use any service account within the same project, but you
+     * must have the service account user permission to use the instance.
+     *
+     * If not specified, the [Compute Engine default service
+     * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account)
+     * is used.
+     * 
+ * + * string service_account = 13; + * + * @return The bytes for serviceAccount. + */ + public com.google.protobuf.ByteString getServiceAccountBytes() { + java.lang.Object ref = serviceAccount_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceAccount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The service account that the runtime workload runs as.
+     * You can use any service account within the same project, but you
+     * must have the service account user permission to use the instance.
+     *
+     * If not specified, the [Compute Engine default service
+     * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account)
+     * is used.
+     * 
+ * + * string service_account = 13; + * + * @param value The serviceAccount to set. + * @return This builder for chaining. + */ + public Builder setServiceAccount(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + serviceAccount_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * The service account that the runtime workload runs as.
+     * You can use any service account within the same project, but you
+     * must have the service account user permission to use the instance.
+     *
+     * If not specified, the [Compute Engine default service
+     * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account)
+     * is used.
+     * 
+ * + * string service_account = 13; + * + * @return This builder for chaining. + */ + public Builder clearServiceAccount() { + serviceAccount_ = getDefaultInstance().getServiceAccount(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + /** + * + * + *
+     * The service account that the runtime workload runs as.
+     * You can use any service account within the same project, but you
+     * must have the service account user permission to use the instance.
+     *
+     * If not specified, the [Compute Engine default service
+     * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account)
+     * is used.
+     * 
+ * + * string service_account = 13; + * + * @param value The bytes for serviceAccount to set. + * @return This builder for chaining. + */ + public Builder setServiceAccountBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + serviceAccount_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + private java.lang.Object etag_ = ""; + /** + * + * + *
+     * Used to perform consistent read-modify-write updates. If not set, a blind
+     * "overwrite" update happens.
+     * 
+ * + * string etag = 14; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Used to perform consistent read-modify-write updates. If not set, a blind
+     * "overwrite" update happens.
+     * 
+ * + * string etag = 14; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Used to perform consistent read-modify-write updates. If not set, a blind
+     * "overwrite" update happens.
+     * 
+ * + * string etag = 14; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + etag_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Used to perform consistent read-modify-write updates. If not set, a blind
+     * "overwrite" update happens.
+     * 
+ * + * string etag = 14; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + etag_ = getDefaultInstance().getEtag(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + /** + * + * + *
+     * Used to perform consistent read-modify-write updates. If not set, a blind
+     * "overwrite" update happens.
+     * 
+ * + * string etag = 14; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + etag_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000200; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * The labels with user-defined metadata to organize the
+     * NotebookRuntimeTemplates.
+     *
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     *
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * 
+ * + * map<string, string> labels = 15; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * The labels with user-defined metadata to organize the
+     * NotebookRuntimeTemplates.
+     *
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     *
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * 
+ * + * map<string, string> labels = 15; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * The labels with user-defined metadata to organize the
+     * NotebookRuntimeTemplates.
+     *
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     *
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * 
+ * + * map<string, string> labels = 15; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * The labels with user-defined metadata to organize the
+     * NotebookRuntimeTemplates.
+     *
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     *
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * 
+ * + * map<string, string> labels = 15; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000200); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * The labels with user-defined metadata to organize the
+     * NotebookRuntimeTemplates.
+     *
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     *
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * 
+ * + * map<string, string> labels = 15; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + bitField0_ |= 0x00000200; + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * The labels with user-defined metadata to organize the
+     * NotebookRuntimeTemplates.
+     *
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     *
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * 
+ * + * map<string, string> labels = 15; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00000200; + return this; + } + /** + * + * + *
+     * The labels with user-defined metadata to organize the
+     * NotebookRuntimeTemplates.
+     *
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     *
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * 
+ * + * map<string, string> labels = 15; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000200; + return this; + } + + private com.google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig idleShutdownConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig, + com.google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig.Builder, + com.google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfigOrBuilder> + idleShutdownConfigBuilder_; + /** + * + * + *
+     * The idle shutdown configuration of NotebookRuntimeTemplate. This config
+     * will only be set when idle shutdown is enabled.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig idle_shutdown_config = 17; + * + * + * @return Whether the idleShutdownConfig field is set. + */ + public boolean hasIdleShutdownConfig() { + return ((bitField0_ & 0x00000400) != 0); + } + /** + * + * + *
+     * The idle shutdown configuration of NotebookRuntimeTemplate. This config
+     * will only be set when idle shutdown is enabled.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig idle_shutdown_config = 17; + * + * + * @return The idleShutdownConfig. + */ + public com.google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig getIdleShutdownConfig() { + if (idleShutdownConfigBuilder_ == null) { + return idleShutdownConfig_ == null + ? com.google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig.getDefaultInstance() + : idleShutdownConfig_; + } else { + return idleShutdownConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The idle shutdown configuration of NotebookRuntimeTemplate. This config
+     * will only be set when idle shutdown is enabled.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig idle_shutdown_config = 17; + * + */ + public Builder setIdleShutdownConfig( + com.google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig value) { + if (idleShutdownConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + idleShutdownConfig_ = value; + } else { + idleShutdownConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * The idle shutdown configuration of NotebookRuntimeTemplate. This config
+     * will only be set when idle shutdown is enabled.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig idle_shutdown_config = 17; + * + */ + public Builder setIdleShutdownConfig( + com.google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig.Builder builderForValue) { + if (idleShutdownConfigBuilder_ == null) { + idleShutdownConfig_ = builderForValue.build(); + } else { + idleShutdownConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * The idle shutdown configuration of NotebookRuntimeTemplate. This config
+     * will only be set when idle shutdown is enabled.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig idle_shutdown_config = 17; + * + */ + public Builder mergeIdleShutdownConfig( + com.google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig value) { + if (idleShutdownConfigBuilder_ == null) { + if (((bitField0_ & 0x00000400) != 0) + && idleShutdownConfig_ != null + && idleShutdownConfig_ + != com.google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig + .getDefaultInstance()) { + getIdleShutdownConfigBuilder().mergeFrom(value); + } else { + idleShutdownConfig_ = value; + } + } else { + idleShutdownConfigBuilder_.mergeFrom(value); + } + if (idleShutdownConfig_ != null) { + bitField0_ |= 0x00000400; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The idle shutdown configuration of NotebookRuntimeTemplate. This config
+     * will only be set when idle shutdown is enabled.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig idle_shutdown_config = 17; + * + */ + public Builder clearIdleShutdownConfig() { + bitField0_ = (bitField0_ & ~0x00000400); + idleShutdownConfig_ = null; + if (idleShutdownConfigBuilder_ != null) { + idleShutdownConfigBuilder_.dispose(); + idleShutdownConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The idle shutdown configuration of NotebookRuntimeTemplate. This config
+     * will only be set when idle shutdown is enabled.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig idle_shutdown_config = 17; + * + */ + public com.google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig.Builder + getIdleShutdownConfigBuilder() { + bitField0_ |= 0x00000400; + onChanged(); + return getIdleShutdownConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The idle shutdown configuration of NotebookRuntimeTemplate. This config
+     * will only be set when idle shutdown is enabled.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig idle_shutdown_config = 17; + * + */ + public com.google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfigOrBuilder + getIdleShutdownConfigOrBuilder() { + if (idleShutdownConfigBuilder_ != null) { + return idleShutdownConfigBuilder_.getMessageOrBuilder(); + } else { + return idleShutdownConfig_ == null + ? com.google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig.getDefaultInstance() + : idleShutdownConfig_; + } + } + /** + * + * + *
+     * The idle shutdown configuration of NotebookRuntimeTemplate. This config
+     * will only be set when idle shutdown is enabled.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig idle_shutdown_config = 17; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig, + com.google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig.Builder, + com.google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfigOrBuilder> + getIdleShutdownConfigFieldBuilder() { + if (idleShutdownConfigBuilder_ == null) { + idleShutdownConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig, + com.google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig.Builder, + com.google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfigOrBuilder>( + getIdleShutdownConfig(), getParentForChildren(), isClean()); + idleShutdownConfig_ = null; + } + return idleShutdownConfigBuilder_; + } + + private com.google.cloud.aiplatform.v1beta1.NotebookEucConfig eucConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.NotebookEucConfig, + com.google.cloud.aiplatform.v1beta1.NotebookEucConfig.Builder, + com.google.cloud.aiplatform.v1beta1.NotebookEucConfigOrBuilder> + eucConfigBuilder_; + /** + * + * + *
+     * EUC configuration of the NotebookRuntimeTemplate.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.NotebookEucConfig euc_config = 18; + * + * @return Whether the eucConfig field is set. + */ + public boolean hasEucConfig() { + return ((bitField0_ & 0x00000800) != 0); + } + /** + * + * + *
+     * EUC configuration of the NotebookRuntimeTemplate.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.NotebookEucConfig euc_config = 18; + * + * @return The eucConfig. + */ + public com.google.cloud.aiplatform.v1beta1.NotebookEucConfig getEucConfig() { + if (eucConfigBuilder_ == null) { + return eucConfig_ == null + ? com.google.cloud.aiplatform.v1beta1.NotebookEucConfig.getDefaultInstance() + : eucConfig_; + } else { + return eucConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * EUC configuration of the NotebookRuntimeTemplate.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.NotebookEucConfig euc_config = 18; + */ + public Builder setEucConfig(com.google.cloud.aiplatform.v1beta1.NotebookEucConfig value) { + if (eucConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + eucConfig_ = value; + } else { + eucConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+     * EUC configuration of the NotebookRuntimeTemplate.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.NotebookEucConfig euc_config = 18; + */ + public Builder setEucConfig( + com.google.cloud.aiplatform.v1beta1.NotebookEucConfig.Builder builderForValue) { + if (eucConfigBuilder_ == null) { + eucConfig_ = builderForValue.build(); + } else { + eucConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+     * EUC configuration of the NotebookRuntimeTemplate.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.NotebookEucConfig euc_config = 18; + */ + public Builder mergeEucConfig(com.google.cloud.aiplatform.v1beta1.NotebookEucConfig value) { + if (eucConfigBuilder_ == null) { + if (((bitField0_ & 0x00000800) != 0) + && eucConfig_ != null + && eucConfig_ + != com.google.cloud.aiplatform.v1beta1.NotebookEucConfig.getDefaultInstance()) { + getEucConfigBuilder().mergeFrom(value); + } else { + eucConfig_ = value; + } + } else { + eucConfigBuilder_.mergeFrom(value); + } + if (eucConfig_ != null) { + bitField0_ |= 0x00000800; + onChanged(); + } + return this; + } + /** + * + * + *
+     * EUC configuration of the NotebookRuntimeTemplate.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.NotebookEucConfig euc_config = 18; + */ + public Builder clearEucConfig() { + bitField0_ = (bitField0_ & ~0x00000800); + eucConfig_ = null; + if (eucConfigBuilder_ != null) { + eucConfigBuilder_.dispose(); + eucConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * EUC configuration of the NotebookRuntimeTemplate.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.NotebookEucConfig euc_config = 18; + */ + public com.google.cloud.aiplatform.v1beta1.NotebookEucConfig.Builder getEucConfigBuilder() { + bitField0_ |= 0x00000800; + onChanged(); + return getEucConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * EUC configuration of the NotebookRuntimeTemplate.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.NotebookEucConfig euc_config = 18; + */ + public com.google.cloud.aiplatform.v1beta1.NotebookEucConfigOrBuilder getEucConfigOrBuilder() { + if (eucConfigBuilder_ != null) { + return eucConfigBuilder_.getMessageOrBuilder(); + } else { + return eucConfig_ == null + ? com.google.cloud.aiplatform.v1beta1.NotebookEucConfig.getDefaultInstance() + : eucConfig_; + } + } + /** + * + * + *
+     * EUC configuration of the NotebookRuntimeTemplate.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.NotebookEucConfig euc_config = 18; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.NotebookEucConfig, + com.google.cloud.aiplatform.v1beta1.NotebookEucConfig.Builder, + com.google.cloud.aiplatform.v1beta1.NotebookEucConfigOrBuilder> + getEucConfigFieldBuilder() { + if (eucConfigBuilder_ == null) { + eucConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.NotebookEucConfig, + com.google.cloud.aiplatform.v1beta1.NotebookEucConfig.Builder, + com.google.cloud.aiplatform.v1beta1.NotebookEucConfigOrBuilder>( + getEucConfig(), getParentForChildren(), isClean()); + eucConfig_ = null; + } + return eucConfigBuilder_; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntimeTemplate was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00001000) != 0); + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntimeTemplate was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntimeTemplate was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntimeTemplate was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntimeTemplate was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00001000) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00001000; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntimeTemplate was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00001000); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntimeTemplate was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00001000; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntimeTemplate was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntimeTemplate was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntimeTemplate was most recently
+     * updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00002000) != 0); + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntimeTemplate was most recently
+     * updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntimeTemplate was most recently
+     * updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntimeTemplate was most recently
+     * updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntimeTemplate was most recently
+     * updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00002000) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00002000; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntimeTemplate was most recently
+     * updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00002000); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntimeTemplate was most recently
+     * updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00002000; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntimeTemplate was most recently
+     * updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. Timestamp when this NotebookRuntimeTemplate was most recently
+     * updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private int notebookRuntimeType_ = 0; + /** + * + * + *
+     * Optional. Immutable. The type of the notebook runtime template.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntimeType notebook_runtime_type = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The enum numeric value on the wire for notebookRuntimeType. + */ + @java.lang.Override + public int getNotebookRuntimeTypeValue() { + return notebookRuntimeType_; + } + /** + * + * + *
+     * Optional. Immutable. The type of the notebook runtime template.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntimeType notebook_runtime_type = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The enum numeric value on the wire for notebookRuntimeType to set. + * @return This builder for chaining. + */ + public Builder setNotebookRuntimeTypeValue(int value) { + notebookRuntimeType_ = value; + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Immutable. The type of the notebook runtime template.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntimeType notebook_runtime_type = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The notebookRuntimeType. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NotebookRuntimeType getNotebookRuntimeType() { + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeType result = + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeType.forNumber(notebookRuntimeType_); + return result == null + ? com.google.cloud.aiplatform.v1beta1.NotebookRuntimeType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Optional. Immutable. The type of the notebook runtime template.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntimeType notebook_runtime_type = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The notebookRuntimeType to set. + * @return This builder for chaining. + */ + public Builder setNotebookRuntimeType( + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00004000; + notebookRuntimeType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Immutable. The type of the notebook runtime template.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntimeType notebook_runtime_type = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return This builder for chaining. + */ + public Builder clearNotebookRuntimeType() { + bitField0_ = (bitField0_ & ~0x00004000); + notebookRuntimeType_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.aiplatform.v1beta1.ShieldedVmConfig shieldedVmConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.ShieldedVmConfig, + com.google.cloud.aiplatform.v1beta1.ShieldedVmConfig.Builder, + com.google.cloud.aiplatform.v1beta1.ShieldedVmConfigOrBuilder> + shieldedVmConfigBuilder_; + /** + * + * + *
+     * Optional. Immutable. Runtime Shielded VM spec.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.ShieldedVmConfig shielded_vm_config = 20 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the shieldedVmConfig field is set. + */ + public boolean hasShieldedVmConfig() { + return ((bitField0_ & 0x00008000) != 0); + } + /** + * + * + *
+     * Optional. Immutable. Runtime Shielded VM spec.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.ShieldedVmConfig shielded_vm_config = 20 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The shieldedVmConfig. + */ + public com.google.cloud.aiplatform.v1beta1.ShieldedVmConfig getShieldedVmConfig() { + if (shieldedVmConfigBuilder_ == null) { + return shieldedVmConfig_ == null + ? com.google.cloud.aiplatform.v1beta1.ShieldedVmConfig.getDefaultInstance() + : shieldedVmConfig_; + } else { + return shieldedVmConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Immutable. Runtime Shielded VM spec.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.ShieldedVmConfig shielded_vm_config = 20 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder setShieldedVmConfig(com.google.cloud.aiplatform.v1beta1.ShieldedVmConfig value) { + if (shieldedVmConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + shieldedVmConfig_ = value; + } else { + shieldedVmConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Immutable. Runtime Shielded VM spec.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.ShieldedVmConfig shielded_vm_config = 20 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder setShieldedVmConfig( + com.google.cloud.aiplatform.v1beta1.ShieldedVmConfig.Builder builderForValue) { + if (shieldedVmConfigBuilder_ == null) { + shieldedVmConfig_ = builderForValue.build(); + } else { + shieldedVmConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Immutable. Runtime Shielded VM spec.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.ShieldedVmConfig shielded_vm_config = 20 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder mergeShieldedVmConfig( + com.google.cloud.aiplatform.v1beta1.ShieldedVmConfig value) { + if (shieldedVmConfigBuilder_ == null) { + if (((bitField0_ & 0x00008000) != 0) + && shieldedVmConfig_ != null + && shieldedVmConfig_ + != com.google.cloud.aiplatform.v1beta1.ShieldedVmConfig.getDefaultInstance()) { + getShieldedVmConfigBuilder().mergeFrom(value); + } else { + shieldedVmConfig_ = value; + } + } else { + shieldedVmConfigBuilder_.mergeFrom(value); + } + if (shieldedVmConfig_ != null) { + bitField0_ |= 0x00008000; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Optional. Immutable. Runtime Shielded VM spec.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.ShieldedVmConfig shielded_vm_config = 20 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder clearShieldedVmConfig() { + bitField0_ = (bitField0_ & ~0x00008000); + shieldedVmConfig_ = null; + if (shieldedVmConfigBuilder_ != null) { + shieldedVmConfigBuilder_.dispose(); + shieldedVmConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Immutable. Runtime Shielded VM spec.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.ShieldedVmConfig shielded_vm_config = 20 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public com.google.cloud.aiplatform.v1beta1.ShieldedVmConfig.Builder + getShieldedVmConfigBuilder() { + bitField0_ |= 0x00008000; + onChanged(); + return getShieldedVmConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Immutable. Runtime Shielded VM spec.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.ShieldedVmConfig shielded_vm_config = 20 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public com.google.cloud.aiplatform.v1beta1.ShieldedVmConfigOrBuilder + getShieldedVmConfigOrBuilder() { + if (shieldedVmConfigBuilder_ != null) { + return shieldedVmConfigBuilder_.getMessageOrBuilder(); + } else { + return shieldedVmConfig_ == null + ? com.google.cloud.aiplatform.v1beta1.ShieldedVmConfig.getDefaultInstance() + : shieldedVmConfig_; + } + } + /** + * + * + *
+     * Optional. Immutable. Runtime Shielded VM spec.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.ShieldedVmConfig shielded_vm_config = 20 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.ShieldedVmConfig, + com.google.cloud.aiplatform.v1beta1.ShieldedVmConfig.Builder, + com.google.cloud.aiplatform.v1beta1.ShieldedVmConfigOrBuilder> + getShieldedVmConfigFieldBuilder() { + if (shieldedVmConfigBuilder_ == null) { + shieldedVmConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.ShieldedVmConfig, + com.google.cloud.aiplatform.v1beta1.ShieldedVmConfig.Builder, + com.google.cloud.aiplatform.v1beta1.ShieldedVmConfigOrBuilder>( + getShieldedVmConfig(), getParentForChildren(), isClean()); + shieldedVmConfig_ = null; + } + return shieldedVmConfigBuilder_; + } + + private com.google.protobuf.LazyStringArrayList networkTags_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureNetworkTagsIsMutable() { + if (!networkTags_.isModifiable()) { + networkTags_ = new com.google.protobuf.LazyStringArrayList(networkTags_); + } + bitField0_ |= 0x00010000; + } + /** + * + * + *
+     * Optional. The Compute Engine tags to add to runtime (see [Tagging
+     * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).
+     * 
+ * + * repeated string network_tags = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the networkTags. + */ + public com.google.protobuf.ProtocolStringList getNetworkTagsList() { + networkTags_.makeImmutable(); + return networkTags_; + } + /** + * + * + *
+     * Optional. The Compute Engine tags to add to runtime (see [Tagging
+     * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).
+     * 
+ * + * repeated string network_tags = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of networkTags. + */ + public int getNetworkTagsCount() { + return networkTags_.size(); + } + /** + * + * + *
+     * Optional. The Compute Engine tags to add to runtime (see [Tagging
+     * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).
+     * 
+ * + * repeated string network_tags = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The networkTags at the given index. + */ + public java.lang.String getNetworkTags(int index) { + return networkTags_.get(index); + } + /** + * + * + *
+     * Optional. The Compute Engine tags to add to runtime (see [Tagging
+     * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).
+     * 
+ * + * repeated string network_tags = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the networkTags at the given index. + */ + public com.google.protobuf.ByteString getNetworkTagsBytes(int index) { + return networkTags_.getByteString(index); + } + /** + * + * + *
+     * Optional. The Compute Engine tags to add to runtime (see [Tagging
+     * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).
+     * 
+ * + * repeated string network_tags = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The networkTags to set. + * @return This builder for chaining. + */ + public Builder setNetworkTags(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureNetworkTagsIsMutable(); + networkTags_.set(index, value); + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Compute Engine tags to add to runtime (see [Tagging
+     * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).
+     * 
+ * + * repeated string network_tags = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The networkTags to add. + * @return This builder for chaining. + */ + public Builder addNetworkTags(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureNetworkTagsIsMutable(); + networkTags_.add(value); + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Compute Engine tags to add to runtime (see [Tagging
+     * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).
+     * 
+ * + * repeated string network_tags = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The networkTags to add. + * @return This builder for chaining. + */ + public Builder addAllNetworkTags(java.lang.Iterable values) { + ensureNetworkTagsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, networkTags_); + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Compute Engine tags to add to runtime (see [Tagging
+     * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).
+     * 
+ * + * repeated string network_tags = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearNetworkTags() { + networkTags_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00010000); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Compute Engine tags to add to runtime (see [Tagging
+     * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).
+     * 
+ * + * repeated string network_tags = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes of the networkTags to add. + * @return This builder for chaining. + */ + public Builder addNetworkTagsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureNetworkTagsIsMutable(); + networkTags_.add(value); + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate) + private static final com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate(); + } + + public static com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NotebookRuntimeTemplate parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NotebookRuntimeTemplateName.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NotebookRuntimeTemplateName.java new file mode 100644 index 000000000000..3f82b54f2eb4 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NotebookRuntimeTemplateName.java @@ -0,0 +1,240 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1; + +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 NotebookRuntimeTemplateName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_NOTEBOOK_RUNTIME_TEMPLATE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String notebookRuntimeTemplate; + + @Deprecated + protected NotebookRuntimeTemplateName() { + project = null; + location = null; + notebookRuntimeTemplate = null; + } + + private NotebookRuntimeTemplateName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + notebookRuntimeTemplate = Preconditions.checkNotNull(builder.getNotebookRuntimeTemplate()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getNotebookRuntimeTemplate() { + return notebookRuntimeTemplate; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static NotebookRuntimeTemplateName of( + String project, String location, String notebookRuntimeTemplate) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setNotebookRuntimeTemplate(notebookRuntimeTemplate) + .build(); + } + + public static String format(String project, String location, String notebookRuntimeTemplate) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setNotebookRuntimeTemplate(notebookRuntimeTemplate) + .build() + .toString(); + } + + public static NotebookRuntimeTemplateName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_NOTEBOOK_RUNTIME_TEMPLATE.validatedMatch( + formattedString, + "NotebookRuntimeTemplateName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("notebook_runtime_template")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (NotebookRuntimeTemplateName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_NOTEBOOK_RUNTIME_TEMPLATE.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (notebookRuntimeTemplate != null) { + fieldMapBuilder.put("notebook_runtime_template", notebookRuntimeTemplate); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_NOTEBOOK_RUNTIME_TEMPLATE.instantiate( + "project", + project, + "location", + location, + "notebook_runtime_template", + notebookRuntimeTemplate); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + NotebookRuntimeTemplateName that = ((NotebookRuntimeTemplateName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.notebookRuntimeTemplate, that.notebookRuntimeTemplate); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(notebookRuntimeTemplate); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}. + */ + public static class Builder { + private String project; + private String location; + private String notebookRuntimeTemplate; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getNotebookRuntimeTemplate() { + return notebookRuntimeTemplate; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setNotebookRuntimeTemplate(String notebookRuntimeTemplate) { + this.notebookRuntimeTemplate = notebookRuntimeTemplate; + return this; + } + + private Builder(NotebookRuntimeTemplateName notebookRuntimeTemplateName) { + this.project = notebookRuntimeTemplateName.project; + this.location = notebookRuntimeTemplateName.location; + this.notebookRuntimeTemplate = notebookRuntimeTemplateName.notebookRuntimeTemplate; + } + + public NotebookRuntimeTemplateName build() { + return new NotebookRuntimeTemplateName(this); + } + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NotebookRuntimeTemplateOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NotebookRuntimeTemplateOrBuilder.java new file mode 100644 index 000000000000..4f89c14e2734 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NotebookRuntimeTemplateOrBuilder.java @@ -0,0 +1,689 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/notebook_runtime.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +public interface NotebookRuntimeTemplateOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The resource name of the NotebookRuntimeTemplate.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. The resource name of the NotebookRuntimeTemplate.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The display name of the NotebookRuntimeTemplate.
+   * The name can be up to 128 characters long and can consist of any UTF-8
+   * characters.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Required. The display name of the NotebookRuntimeTemplate.
+   * The name can be up to 128 characters long and can consist of any UTF-8
+   * characters.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * The description of the NotebookRuntimeTemplate.
+   * 
+ * + * string description = 3; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * The description of the NotebookRuntimeTemplate.
+   * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Output only. The default template to use if not specified.
+   * 
+ * + * bool is_default = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The isDefault. + */ + boolean getIsDefault(); + + /** + * + * + *
+   * Optional. Immutable. The specification of a single machine for the
+   * template.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.MachineSpec machine_spec = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the machineSpec field is set. + */ + boolean hasMachineSpec(); + /** + * + * + *
+   * Optional. Immutable. The specification of a single machine for the
+   * template.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.MachineSpec machine_spec = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The machineSpec. + */ + com.google.cloud.aiplatform.v1beta1.MachineSpec getMachineSpec(); + /** + * + * + *
+   * Optional. Immutable. The specification of a single machine for the
+   * template.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.MachineSpec machine_spec = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + com.google.cloud.aiplatform.v1beta1.MachineSpecOrBuilder getMachineSpecOrBuilder(); + + /** + * + * + *
+   * Optional. The specification of [persistent
+   * disk][https://cloud.google.com/compute/docs/disks/persistent-disks]
+   * attached to the runtime as data disk storage.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.PersistentDiskSpec data_persistent_disk_spec = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the dataPersistentDiskSpec field is set. + */ + boolean hasDataPersistentDiskSpec(); + /** + * + * + *
+   * Optional. The specification of [persistent
+   * disk][https://cloud.google.com/compute/docs/disks/persistent-disks]
+   * attached to the runtime as data disk storage.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.PersistentDiskSpec data_persistent_disk_spec = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The dataPersistentDiskSpec. + */ + com.google.cloud.aiplatform.v1beta1.PersistentDiskSpec getDataPersistentDiskSpec(); + /** + * + * + *
+   * Optional. The specification of [persistent
+   * disk][https://cloud.google.com/compute/docs/disks/persistent-disks]
+   * attached to the runtime as data disk storage.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.PersistentDiskSpec data_persistent_disk_spec = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.aiplatform.v1beta1.PersistentDiskSpecOrBuilder + getDataPersistentDiskSpecOrBuilder(); + + /** + * + * + *
+   * Optional. Network spec.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NetworkSpec network_spec = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the networkSpec field is set. + */ + boolean hasNetworkSpec(); + /** + * + * + *
+   * Optional. Network spec.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NetworkSpec network_spec = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The networkSpec. + */ + com.google.cloud.aiplatform.v1beta1.NetworkSpec getNetworkSpec(); + /** + * + * + *
+   * Optional. Network spec.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NetworkSpec network_spec = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.aiplatform.v1beta1.NetworkSpecOrBuilder getNetworkSpecOrBuilder(); + + /** + * + * + *
+   * The service account that the runtime workload runs as.
+   * You can use any service account within the same project, but you
+   * must have the service account user permission to use the instance.
+   *
+   * If not specified, the [Compute Engine default service
+   * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account)
+   * is used.
+   * 
+ * + * string service_account = 13; + * + * @return The serviceAccount. + */ + java.lang.String getServiceAccount(); + /** + * + * + *
+   * The service account that the runtime workload runs as.
+   * You can use any service account within the same project, but you
+   * must have the service account user permission to use the instance.
+   *
+   * If not specified, the [Compute Engine default service
+   * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account)
+   * is used.
+   * 
+ * + * string service_account = 13; + * + * @return The bytes for serviceAccount. + */ + com.google.protobuf.ByteString getServiceAccountBytes(); + + /** + * + * + *
+   * Used to perform consistent read-modify-write updates. If not set, a blind
+   * "overwrite" update happens.
+   * 
+ * + * string etag = 14; + * + * @return The etag. + */ + java.lang.String getEtag(); + /** + * + * + *
+   * Used to perform consistent read-modify-write updates. If not set, a blind
+   * "overwrite" update happens.
+   * 
+ * + * string etag = 14; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); + + /** + * + * + *
+   * The labels with user-defined metadata to organize the
+   * NotebookRuntimeTemplates.
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   *
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 15; + */ + int getLabelsCount(); + /** + * + * + *
+   * The labels with user-defined metadata to organize the
+   * NotebookRuntimeTemplates.
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   *
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 15; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * The labels with user-defined metadata to organize the
+   * NotebookRuntimeTemplates.
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   *
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 15; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * The labels with user-defined metadata to organize the
+   * NotebookRuntimeTemplates.
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   *
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 15; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * The labels with user-defined metadata to organize the
+   * NotebookRuntimeTemplates.
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   *
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 15; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * The idle shutdown configuration of NotebookRuntimeTemplate. This config
+   * will only be set when idle shutdown is enabled.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig idle_shutdown_config = 17; + * + * + * @return Whether the idleShutdownConfig field is set. + */ + boolean hasIdleShutdownConfig(); + /** + * + * + *
+   * The idle shutdown configuration of NotebookRuntimeTemplate. This config
+   * will only be set when idle shutdown is enabled.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig idle_shutdown_config = 17; + * + * + * @return The idleShutdownConfig. + */ + com.google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig getIdleShutdownConfig(); + /** + * + * + *
+   * The idle shutdown configuration of NotebookRuntimeTemplate. This config
+   * will only be set when idle shutdown is enabled.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfig idle_shutdown_config = 17; + * + */ + com.google.cloud.aiplatform.v1beta1.NotebookIdleShutdownConfigOrBuilder + getIdleShutdownConfigOrBuilder(); + + /** + * + * + *
+   * EUC configuration of the NotebookRuntimeTemplate.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.NotebookEucConfig euc_config = 18; + * + * @return Whether the eucConfig field is set. + */ + boolean hasEucConfig(); + /** + * + * + *
+   * EUC configuration of the NotebookRuntimeTemplate.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.NotebookEucConfig euc_config = 18; + * + * @return The eucConfig. + */ + com.google.cloud.aiplatform.v1beta1.NotebookEucConfig getEucConfig(); + /** + * + * + *
+   * EUC configuration of the NotebookRuntimeTemplate.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.NotebookEucConfig euc_config = 18; + */ + com.google.cloud.aiplatform.v1beta1.NotebookEucConfigOrBuilder getEucConfigOrBuilder(); + + /** + * + * + *
+   * Output only. Timestamp when this NotebookRuntimeTemplate was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Timestamp when this NotebookRuntimeTemplate was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Timestamp when this NotebookRuntimeTemplate was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Timestamp when this NotebookRuntimeTemplate was most recently
+   * updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. Timestamp when this NotebookRuntimeTemplate was most recently
+   * updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. Timestamp when this NotebookRuntimeTemplate was most recently
+   * updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Optional. Immutable. The type of the notebook runtime template.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntimeType notebook_runtime_type = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The enum numeric value on the wire for notebookRuntimeType. + */ + int getNotebookRuntimeTypeValue(); + /** + * + * + *
+   * Optional. Immutable. The type of the notebook runtime template.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NotebookRuntimeType notebook_runtime_type = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The notebookRuntimeType. + */ + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeType getNotebookRuntimeType(); + + /** + * + * + *
+   * Optional. Immutable. Runtime Shielded VM spec.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.ShieldedVmConfig shielded_vm_config = 20 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the shieldedVmConfig field is set. + */ + boolean hasShieldedVmConfig(); + /** + * + * + *
+   * Optional. Immutable. Runtime Shielded VM spec.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.ShieldedVmConfig shielded_vm_config = 20 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The shieldedVmConfig. + */ + com.google.cloud.aiplatform.v1beta1.ShieldedVmConfig getShieldedVmConfig(); + /** + * + * + *
+   * Optional. Immutable. Runtime Shielded VM spec.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.ShieldedVmConfig shielded_vm_config = 20 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + com.google.cloud.aiplatform.v1beta1.ShieldedVmConfigOrBuilder getShieldedVmConfigOrBuilder(); + + /** + * + * + *
+   * Optional. The Compute Engine tags to add to runtime (see [Tagging
+   * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).
+   * 
+ * + * repeated string network_tags = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the networkTags. + */ + java.util.List getNetworkTagsList(); + /** + * + * + *
+   * Optional. The Compute Engine tags to add to runtime (see [Tagging
+   * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).
+   * 
+ * + * repeated string network_tags = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of networkTags. + */ + int getNetworkTagsCount(); + /** + * + * + *
+   * Optional. The Compute Engine tags to add to runtime (see [Tagging
+   * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).
+   * 
+ * + * repeated string network_tags = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The networkTags at the given index. + */ + java.lang.String getNetworkTags(int index); + /** + * + * + *
+   * Optional. The Compute Engine tags to add to runtime (see [Tagging
+   * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).
+   * 
+ * + * repeated string network_tags = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the networkTags at the given index. + */ + com.google.protobuf.ByteString getNetworkTagsBytes(int index); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NotebookRuntimeTemplateRef.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NotebookRuntimeTemplateRef.java new file mode 100644 index 000000000000..a49926627a4a --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NotebookRuntimeTemplateRef.java @@ -0,0 +1,646 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/notebook_runtime_template_ref.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Points to a NotebookRuntimeTemplateRef.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef} + */ +public final class NotebookRuntimeTemplateRef extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef) + NotebookRuntimeTemplateRefOrBuilder { + private static final long serialVersionUID = 0L; + // Use NotebookRuntimeTemplateRef.newBuilder() to construct. + private NotebookRuntimeTemplateRef(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private NotebookRuntimeTemplateRef() { + notebookRuntimeTemplate_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new NotebookRuntimeTemplateRef(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRefProto + .internal_static_google_cloud_aiplatform_v1beta1_NotebookRuntimeTemplateRef_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRefProto + .internal_static_google_cloud_aiplatform_v1beta1_NotebookRuntimeTemplateRef_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef.class, + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef.Builder.class); + } + + public static final int NOTEBOOK_RUNTIME_TEMPLATE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object notebookRuntimeTemplate_ = ""; + /** + * + * + *
+   * Immutable. A resource name of the NotebookRuntimeTemplate.
+   * 
+ * + * + * string notebook_runtime_template = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The notebookRuntimeTemplate. + */ + @java.lang.Override + public java.lang.String getNotebookRuntimeTemplate() { + java.lang.Object ref = notebookRuntimeTemplate_; + 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(); + notebookRuntimeTemplate_ = s; + return s; + } + } + /** + * + * + *
+   * Immutable. A resource name of the NotebookRuntimeTemplate.
+   * 
+ * + * + * string notebook_runtime_template = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for notebookRuntimeTemplate. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNotebookRuntimeTemplateBytes() { + java.lang.Object ref = notebookRuntimeTemplate_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + notebookRuntimeTemplate_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(notebookRuntimeTemplate_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, notebookRuntimeTemplate_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(notebookRuntimeTemplate_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, notebookRuntimeTemplate_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef other = + (com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef) obj; + + if (!getNotebookRuntimeTemplate().equals(other.getNotebookRuntimeTemplate())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NOTEBOOK_RUNTIME_TEMPLATE_FIELD_NUMBER; + hash = (53 * hash) + getNotebookRuntimeTemplate().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Points to a NotebookRuntimeTemplateRef.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef) + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRefOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRefProto + .internal_static_google_cloud_aiplatform_v1beta1_NotebookRuntimeTemplateRef_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRefProto + .internal_static_google_cloud_aiplatform_v1beta1_NotebookRuntimeTemplateRef_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef.class, + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + notebookRuntimeTemplate_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRefProto + .internal_static_google_cloud_aiplatform_v1beta1_NotebookRuntimeTemplateRef_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef build() { + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef buildPartial() { + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef result = + new com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.notebookRuntimeTemplate_ = notebookRuntimeTemplate_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef other) { + if (other + == com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef.getDefaultInstance()) + return this; + if (!other.getNotebookRuntimeTemplate().isEmpty()) { + notebookRuntimeTemplate_ = other.notebookRuntimeTemplate_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + notebookRuntimeTemplate_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object notebookRuntimeTemplate_ = ""; + /** + * + * + *
+     * Immutable. A resource name of the NotebookRuntimeTemplate.
+     * 
+ * + * + * string notebook_runtime_template = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The notebookRuntimeTemplate. + */ + public java.lang.String getNotebookRuntimeTemplate() { + java.lang.Object ref = notebookRuntimeTemplate_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + notebookRuntimeTemplate_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Immutable. A resource name of the NotebookRuntimeTemplate.
+     * 
+ * + * + * string notebook_runtime_template = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for notebookRuntimeTemplate. + */ + public com.google.protobuf.ByteString getNotebookRuntimeTemplateBytes() { + java.lang.Object ref = notebookRuntimeTemplate_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + notebookRuntimeTemplate_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Immutable. A resource name of the NotebookRuntimeTemplate.
+     * 
+ * + * + * string notebook_runtime_template = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @param value The notebookRuntimeTemplate to set. + * @return This builder for chaining. + */ + public Builder setNotebookRuntimeTemplate(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + notebookRuntimeTemplate_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. A resource name of the NotebookRuntimeTemplate.
+     * 
+ * + * + * string notebook_runtime_template = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearNotebookRuntimeTemplate() { + notebookRuntimeTemplate_ = getDefaultInstance().getNotebookRuntimeTemplate(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. A resource name of the NotebookRuntimeTemplate.
+     * 
+ * + * + * string notebook_runtime_template = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for notebookRuntimeTemplate to set. + * @return This builder for chaining. + */ + public Builder setNotebookRuntimeTemplateBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + notebookRuntimeTemplate_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef) + private static final com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef(); + } + + public static com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NotebookRuntimeTemplateRef parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NotebookRuntimeTemplateRefOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NotebookRuntimeTemplateRefOrBuilder.java new file mode 100644 index 000000000000..78e5d693b43b --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NotebookRuntimeTemplateRefOrBuilder.java @@ -0,0 +1,55 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/notebook_runtime_template_ref.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +public interface NotebookRuntimeTemplateRefOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateRef) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Immutable. A resource name of the NotebookRuntimeTemplate.
+   * 
+ * + * + * string notebook_runtime_template = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The notebookRuntimeTemplate. + */ + java.lang.String getNotebookRuntimeTemplate(); + /** + * + * + *
+   * Immutable. A resource name of the NotebookRuntimeTemplate.
+   * 
+ * + * + * string notebook_runtime_template = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for notebookRuntimeTemplate. + */ + com.google.protobuf.ByteString getNotebookRuntimeTemplateBytes(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NotebookRuntimeTemplateRefProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NotebookRuntimeTemplateRefProto.java new file mode 100644 index 000000000000..d4f74fe5b9c1 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NotebookRuntimeTemplateRefProto.java @@ -0,0 +1,85 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/notebook_runtime_template_ref.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +public final class NotebookRuntimeTemplateRefProto { + private NotebookRuntimeTemplateRefProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_NotebookRuntimeTemplateRef_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_NotebookRuntimeTemplateRef_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\nCgoogle/cloud/aiplatform/v1beta1/notebo" + + "ok_runtime_template_ref.proto\022\037google.cl" + + "oud.aiplatform.v1beta1\032\037google/api/field" + + "_behavior.proto\032\031google/api/resource.pro" + + "to\"z\n\032NotebookRuntimeTemplateRef\022\\\n\031note" + + "book_runtime_template\030\001 \001(\tB9\340A\005\372A3\n1aip" + + "latform.googleapis.com/NotebookRuntimeTe" + + "mplateB\366\001\n#com.google.cloud.aiplatform.v" + + "1beta1B\037NotebookRuntimeTemplateRefProtoP" + + "\001ZCcloud.google.com/go/aiplatform/apiv1b" + + "eta1/aiplatformpb;aiplatformpb\252\002\037Google." + + "Cloud.AIPlatform.V1Beta1\312\002\037Google\\Cloud\\" + + "AIPlatform\\V1beta1\352\002\"Google::Cloud::AIPl" + + "atform::V1beta1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1beta1_NotebookRuntimeTemplateRef_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1beta1_NotebookRuntimeTemplateRef_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_NotebookRuntimeTemplateRef_descriptor, + new java.lang.String[] { + "NotebookRuntimeTemplate", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NotebookRuntimeType.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NotebookRuntimeType.java new file mode 100644 index 000000000000..ffd15f3a27c6 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NotebookRuntimeType.java @@ -0,0 +1,184 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/notebook_runtime.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Represents a notebook runtime type.
+ * 
+ * + * Protobuf enum {@code google.cloud.aiplatform.v1beta1.NotebookRuntimeType} + */ +public enum NotebookRuntimeType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Unspecified notebook runtime type, NotebookRuntimeType will default to
+   * USER_DEFINED.
+   * 
+ * + * NOTEBOOK_RUNTIME_TYPE_UNSPECIFIED = 0; + */ + NOTEBOOK_RUNTIME_TYPE_UNSPECIFIED(0), + /** + * + * + *
+   * runtime or template with coustomized configurations from user.
+   * 
+ * + * USER_DEFINED = 1; + */ + USER_DEFINED(1), + /** + * + * + *
+   * runtime or template with system defined configurations.
+   * 
+ * + * ONE_CLICK = 2; + */ + ONE_CLICK(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Unspecified notebook runtime type, NotebookRuntimeType will default to
+   * USER_DEFINED.
+   * 
+ * + * NOTEBOOK_RUNTIME_TYPE_UNSPECIFIED = 0; + */ + public static final int NOTEBOOK_RUNTIME_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * runtime or template with coustomized configurations from user.
+   * 
+ * + * USER_DEFINED = 1; + */ + public static final int USER_DEFINED_VALUE = 1; + /** + * + * + *
+   * runtime or template with system defined configurations.
+   * 
+ * + * ONE_CLICK = 2; + */ + public static final int ONE_CLICK_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static NotebookRuntimeType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static NotebookRuntimeType forNumber(int value) { + switch (value) { + case 0: + return NOTEBOOK_RUNTIME_TYPE_UNSPECIFIED; + case 1: + return USER_DEFINED; + case 2: + return ONE_CLICK; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public NotebookRuntimeType findValueByNumber(int number) { + return NotebookRuntimeType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.NotebookRuntimeProto.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final NotebookRuntimeType[] VALUES = values(); + + public static NotebookRuntimeType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private NotebookRuntimeType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.aiplatform.v1beta1.NotebookRuntimeType) +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NotebookServiceProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NotebookServiceProto.java new file mode 100644 index 000000000000..63eb4ff5a1f1 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NotebookServiceProto.java @@ -0,0 +1,442 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/notebook_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +public final class NotebookServiceProto { + private NotebookServiceProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_CreateNotebookRuntimeTemplateRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_CreateNotebookRuntimeTemplateRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_CreateNotebookRuntimeTemplateOperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_CreateNotebookRuntimeTemplateOperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_GetNotebookRuntimeTemplateRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_GetNotebookRuntimeTemplateRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_ListNotebookRuntimeTemplatesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_ListNotebookRuntimeTemplatesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_ListNotebookRuntimeTemplatesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_ListNotebookRuntimeTemplatesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_DeleteNotebookRuntimeTemplateRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_DeleteNotebookRuntimeTemplateRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_AssignNotebookRuntimeRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_AssignNotebookRuntimeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_AssignNotebookRuntimeOperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_AssignNotebookRuntimeOperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_GetNotebookRuntimeRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_GetNotebookRuntimeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_ListNotebookRuntimesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_ListNotebookRuntimesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_ListNotebookRuntimesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_ListNotebookRuntimesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_DeleteNotebookRuntimeRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_DeleteNotebookRuntimeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_UpgradeNotebookRuntimeRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_UpgradeNotebookRuntimeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_UpgradeNotebookRuntimeOperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_UpgradeNotebookRuntimeOperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_UpgradeNotebookRuntimeResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_UpgradeNotebookRuntimeResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_StartNotebookRuntimeRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_StartNotebookRuntimeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_StartNotebookRuntimeOperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_StartNotebookRuntimeOperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_StartNotebookRuntimeResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_StartNotebookRuntimeResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n6google/cloud/aiplatform/v1beta1/notebo" + + "ok_service.proto\022\037google.cloud.aiplatfor" + + "m.v1beta1\032\034google/api/annotations.proto\032" + + "\027google/api/client.proto\032\037google/api/fie" + + "ld_behavior.proto\032\031google/api/resource.p" + + "roto\0326google/cloud/aiplatform/v1beta1/no" + + "tebook_runtime.proto\032/google/cloud/aipla" + + "tform/v1beta1/operation.proto\032#google/lo" + + "ngrunning/operations.proto\032\033google/proto" + + "buf/empty.proto\032 google/protobuf/field_m" + + "ask.proto\"\356\001\n$CreateNotebookRuntimeTempl" + + "ateRequest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!loca" + + "tions.googleapis.com/Location\022`\n\031noteboo" + + "k_runtime_template\030\002 \001(\01328.google.cloud." + + "aiplatform.v1beta1.NotebookRuntimeTempla" + + "teB\003\340A\002\022)\n\034notebook_runtime_template_id\030" + + "\003 \001(\tB\003\340A\001\"\205\001\n.CreateNotebookRuntimeTemp" + + "lateOperationMetadata\022S\n\020generic_metadat" + + "a\030\001 \001(\01329.google.cloud.aiplatform.v1beta" + + "1.GenericOperationMetadata\"l\n!GetNoteboo" + + "kRuntimeTemplateRequest\022G\n\004name\030\001 \001(\tB9\340" + + "A\002\372A3\n1aiplatform.googleapis.com/Noteboo" + + "kRuntimeTemplate\"\361\001\n#ListNotebookRuntime" + + "TemplatesRequest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#" + + "\n!locations.googleapis.com/Location\022\023\n\006f" + + "ilter\030\002 \001(\tB\003\340A\001\022\026\n\tpage_size\030\003 \001(\005B\003\340A\001" + + "\022\027\n\npage_token\030\004 \001(\tB\003\340A\001\0222\n\tread_mask\030\005" + + " \001(\0132\032.google.protobuf.FieldMaskB\003\340A\001\022\025\n" + + "\010order_by\030\006 \001(\tB\003\340A\001\"\235\001\n$ListNotebookRun" + + "timeTemplatesResponse\022\\\n\032notebook_runtim" + + "e_templates\030\001 \003(\01328.google.cloud.aiplatf" + + "orm.v1beta1.NotebookRuntimeTemplate\022\027\n\017n" + + "ext_page_token\030\002 \001(\t\"o\n$DeleteNotebookRu" + + "ntimeTemplateRequest\022G\n\004name\030\001 \001(\tB9\340A\002\372" + + "A3\n1aiplatform.googleapis.com/NotebookRu" + + "ntimeTemplate\"\252\002\n\034AssignNotebookRuntimeR" + + "equest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!location" + + "s.googleapis.com/Location\022\\\n\031notebook_ru" + + "ntime_template\030\002 \001(\tB9\340A\002\372A3\n1aiplatform" + + ".googleapis.com/NotebookRuntimeTemplate\022" + + "O\n\020notebook_runtime\030\003 \001(\01320.google.cloud" + + ".aiplatform.v1beta1.NotebookRuntimeB\003\340A\002" + + "\022 \n\023notebook_runtime_id\030\004 \001(\tB\003\340A\001\"\227\001\n&A" + + "ssignNotebookRuntimeOperationMetadata\022S\n" + + "\020generic_metadata\030\001 \001(\01329.google.cloud.a" + + "iplatform.v1beta1.GenericOperationMetada" + + "ta\022\030\n\020progress_message\030\002 \001(\t\"\\\n\031GetNoteb" + + "ookRuntimeRequest\022?\n\004name\030\001 \001(\tB1\340A\002\372A+\n" + + ")aiplatform.googleapis.com/NotebookRunti" + + "me\"\351\001\n\033ListNotebookRuntimesRequest\0229\n\006pa" + + "rent\030\001 \001(\tB)\340A\002\372A#\n!locations.googleapis" + + ".com/Location\022\023\n\006filter\030\002 \001(\tB\003\340A\001\022\026\n\tpa" + + "ge_size\030\003 \001(\005B\003\340A\001\022\027\n\npage_token\030\004 \001(\tB\003" + + "\340A\001\0222\n\tread_mask\030\005 \001(\0132\032.google.protobuf" + + ".FieldMaskB\003\340A\001\022\025\n\010order_by\030\006 \001(\tB\003\340A\001\"\204" + + "\001\n\034ListNotebookRuntimesResponse\022K\n\021noteb" + + "ook_runtimes\030\001 \003(\01320.google.cloud.aiplat" + + "form.v1beta1.NotebookRuntime\022\027\n\017next_pag" + + "e_token\030\002 \001(\t\"_\n\034DeleteNotebookRuntimeRe" + + "quest\022?\n\004name\030\001 \001(\tB1\340A\002\372A+\n)aiplatform." + + "googleapis.com/NotebookRuntime\"`\n\035Upgrad" + + "eNotebookRuntimeRequest\022?\n\004name\030\001 \001(\tB1\340" + + "A\002\372A+\n)aiplatform.googleapis.com/Noteboo" + + "kRuntime\"\230\001\n\'UpgradeNotebookRuntimeOpera" + + "tionMetadata\022S\n\020generic_metadata\030\001 \001(\01329" + + ".google.cloud.aiplatform.v1beta1.Generic" + + "OperationMetadata\022\030\n\020progress_message\030\002 " + + "\001(\t\" \n\036UpgradeNotebookRuntimeResponse\"^\n" + + "\033StartNotebookRuntimeRequest\022?\n\004name\030\001 \001" + + "(\tB1\340A\002\372A+\n)aiplatform.googleapis.com/No" + + "tebookRuntime\"\226\001\n%StartNotebookRuntimeOp" + + "erationMetadata\022S\n\020generic_metadata\030\001 \001(" + + "\01329.google.cloud.aiplatform.v1beta1.Gene" + + "ricOperationMetadata\022\030\n\020progress_message" + + "\030\002 \001(\t\"\036\n\034StartNotebookRuntimeResponse2\370" + + "\025\n\017NotebookService\022\370\002\n\035CreateNotebookRun" + + "timeTemplate\022E.google.cloud.aiplatform.v" + + "1beta1.CreateNotebookRuntimeTemplateRequ" + + "est\032\035.google.longrunning.Operation\"\360\001\312AI" + + "\n\027NotebookRuntimeTemplate\022.CreateNoteboo" + + "kRuntimeTemplateOperationMetadata\332A=pare" + + "nt,notebook_runtime_template,notebook_ru" + + "ntime_template_id\202\323\344\223\002^\"A/v1beta1/{paren" + + "t=projects/*/locations/*}/notebookRuntim" + + "eTemplates:\031notebook_runtime_template\022\354\001" + + "\n\032GetNotebookRuntimeTemplate\022B.google.cl" + + "oud.aiplatform.v1beta1.GetNotebookRuntim" + + "eTemplateRequest\0328.google.cloud.aiplatfo" + + "rm.v1beta1.NotebookRuntimeTemplate\"P\332A\004n" + + "ame\202\323\344\223\002C\022A/v1beta1/{name=projects/*/loc" + + "ations/*/notebookRuntimeTemplates/*}\022\377\001\n" + + "\034ListNotebookRuntimeTemplates\022D.google.c" + + "loud.aiplatform.v1beta1.ListNotebookRunt" + + "imeTemplatesRequest\032E.google.cloud.aipla" + + "tform.v1beta1.ListNotebookRuntimeTemplat" + + "esResponse\"R\332A\006parent\202\323\344\223\002C\022A/v1beta1/{p" + + "arent=projects/*/locations/*}/notebookRu" + + "ntimeTemplates\022\213\002\n\035DeleteNotebookRuntime" + + "Template\022E.google.cloud.aiplatform.v1bet" + + "a1.DeleteNotebookRuntimeTemplateRequest\032" + + "\035.google.longrunning.Operation\"\203\001\312A0\n\025go" + + "ogle.protobuf.Empty\022\027DeleteOperationMeta" + + "data\332A\004name\202\323\344\223\002C*A/v1beta1/{name=projec" + + "ts/*/locations/*/notebookRuntimeTemplate" + + "s/*}\022\307\002\n\025AssignNotebookRuntime\022=.google." + + "cloud.aiplatform.v1beta1.AssignNotebookR" + + "untimeRequest\032\035.google.longrunning.Opera" + + "tion\"\317\001\312A9\n\017NotebookRuntime\022&AssignNoteb" + + "ookRuntimeOperationMetadata\332AEparent,not" + + "ebook_runtime_template,notebook_runtime," + + "notebook_runtime_id\202\323\344\223\002E\"@/v1beta1/{par" + + "ent=projects/*/locations/*}/notebookRunt" + + "imes:assign:\001*\022\314\001\n\022GetNotebookRuntime\022:." + + "google.cloud.aiplatform.v1beta1.GetNoteb" + + "ookRuntimeRequest\0320.google.cloud.aiplatf" + + "orm.v1beta1.NotebookRuntime\"H\332A\004name\202\323\344\223" + + "\002;\0229/v1beta1/{name=projects/*/locations/" + + "*/notebookRuntimes/*}\022\337\001\n\024ListNotebookRu" + + "ntimes\022<.google.cloud.aiplatform.v1beta1" + + ".ListNotebookRuntimesRequest\032=.google.cl" + + "oud.aiplatform.v1beta1.ListNotebookRunti" + + "mesResponse\"J\332A\006parent\202\323\344\223\002;\0229/v1beta1/{" + + "parent=projects/*/locations/*}/notebookR" + + "untimes\022\362\001\n\025DeleteNotebookRuntime\022=.goog" + + "le.cloud.aiplatform.v1beta1.DeleteNotebo" + + "okRuntimeRequest\032\035.google.longrunning.Op" + + "eration\"{\312A0\n\025google.protobuf.Empty\022\027Del" + + "eteOperationMetadata\332A\004name\202\323\344\223\002;*9/v1be" + + "ta1/{name=projects/*/locations/*/noteboo" + + "kRuntimes/*}\022\231\002\n\026UpgradeNotebookRuntime\022" + + ">.google.cloud.aiplatform.v1beta1.Upgrad" + + "eNotebookRuntimeRequest\032\035.google.longrun" + + "ning.Operation\"\237\001\312AI\n\036UpgradeNotebookRun" + + "timeResponse\022\'UpgradeNotebookRuntimeOper" + + "ationMetadata\332A\004name\202\323\344\223\002F\"A/v1beta1/{na" + + "me=projects/*/locations/*/notebookRuntim" + + "es/*}:upgrade:\001*\022\217\002\n\024StartNotebookRuntim" + + "e\022<.google.cloud.aiplatform.v1beta1.Star" + + "tNotebookRuntimeRequest\032\035.google.longrun" + + "ning.Operation\"\231\001\312AE\n\034StartNotebookRunti" + + "meResponse\022%StartNotebookRuntimeOperatio" + + "nMetadata\332A\004name\202\323\344\223\002D\"?/v1beta1/{name=p" + + "rojects/*/locations/*/notebookRuntimes/*" + + "}:start:\001*\032M\312A\031aiplatform.googleapis.com" + + "\322A.https://www.googleapis.com/auth/cloud" + + "-platformB\353\001\n#com.google.cloud.aiplatfor" + + "m.v1beta1B\024NotebookServiceProtoP\001ZCcloud" + + ".google.com/go/aiplatform/apiv1beta1/aip" + + "latformpb;aiplatformpb\252\002\037Google.Cloud.AI" + + "Platform.V1Beta1\312\002\037Google\\Cloud\\AIPlatfo" + + "rm\\V1beta1\352\002\"Google::Cloud::AIPlatform::" + + "V1beta1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeProto.getDescriptor(), + com.google.cloud.aiplatform.v1beta1.OperationProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1beta1_CreateNotebookRuntimeTemplateRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1beta1_CreateNotebookRuntimeTemplateRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_CreateNotebookRuntimeTemplateRequest_descriptor, + new java.lang.String[] { + "Parent", "NotebookRuntimeTemplate", "NotebookRuntimeTemplateId", + }); + internal_static_google_cloud_aiplatform_v1beta1_CreateNotebookRuntimeTemplateOperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_aiplatform_v1beta1_CreateNotebookRuntimeTemplateOperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_CreateNotebookRuntimeTemplateOperationMetadata_descriptor, + new java.lang.String[] { + "GenericMetadata", + }); + internal_static_google_cloud_aiplatform_v1beta1_GetNotebookRuntimeTemplateRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_aiplatform_v1beta1_GetNotebookRuntimeTemplateRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_GetNotebookRuntimeTemplateRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_aiplatform_v1beta1_ListNotebookRuntimeTemplatesRequest_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_aiplatform_v1beta1_ListNotebookRuntimeTemplatesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_ListNotebookRuntimeTemplatesRequest_descriptor, + new java.lang.String[] { + "Parent", "Filter", "PageSize", "PageToken", "ReadMask", "OrderBy", + }); + internal_static_google_cloud_aiplatform_v1beta1_ListNotebookRuntimeTemplatesResponse_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_aiplatform_v1beta1_ListNotebookRuntimeTemplatesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_ListNotebookRuntimeTemplatesResponse_descriptor, + new java.lang.String[] { + "NotebookRuntimeTemplates", "NextPageToken", + }); + internal_static_google_cloud_aiplatform_v1beta1_DeleteNotebookRuntimeTemplateRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_aiplatform_v1beta1_DeleteNotebookRuntimeTemplateRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_DeleteNotebookRuntimeTemplateRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_aiplatform_v1beta1_AssignNotebookRuntimeRequest_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_aiplatform_v1beta1_AssignNotebookRuntimeRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_AssignNotebookRuntimeRequest_descriptor, + new java.lang.String[] { + "Parent", "NotebookRuntimeTemplate", "NotebookRuntime", "NotebookRuntimeId", + }); + internal_static_google_cloud_aiplatform_v1beta1_AssignNotebookRuntimeOperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_aiplatform_v1beta1_AssignNotebookRuntimeOperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_AssignNotebookRuntimeOperationMetadata_descriptor, + new java.lang.String[] { + "GenericMetadata", "ProgressMessage", + }); + internal_static_google_cloud_aiplatform_v1beta1_GetNotebookRuntimeRequest_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_aiplatform_v1beta1_GetNotebookRuntimeRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_GetNotebookRuntimeRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_aiplatform_v1beta1_ListNotebookRuntimesRequest_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_aiplatform_v1beta1_ListNotebookRuntimesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_ListNotebookRuntimesRequest_descriptor, + new java.lang.String[] { + "Parent", "Filter", "PageSize", "PageToken", "ReadMask", "OrderBy", + }); + internal_static_google_cloud_aiplatform_v1beta1_ListNotebookRuntimesResponse_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_aiplatform_v1beta1_ListNotebookRuntimesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_ListNotebookRuntimesResponse_descriptor, + new java.lang.String[] { + "NotebookRuntimes", "NextPageToken", + }); + internal_static_google_cloud_aiplatform_v1beta1_DeleteNotebookRuntimeRequest_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_aiplatform_v1beta1_DeleteNotebookRuntimeRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_DeleteNotebookRuntimeRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_aiplatform_v1beta1_UpgradeNotebookRuntimeRequest_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_cloud_aiplatform_v1beta1_UpgradeNotebookRuntimeRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_UpgradeNotebookRuntimeRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_aiplatform_v1beta1_UpgradeNotebookRuntimeOperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_cloud_aiplatform_v1beta1_UpgradeNotebookRuntimeOperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_UpgradeNotebookRuntimeOperationMetadata_descriptor, + new java.lang.String[] { + "GenericMetadata", "ProgressMessage", + }); + internal_static_google_cloud_aiplatform_v1beta1_UpgradeNotebookRuntimeResponse_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_cloud_aiplatform_v1beta1_UpgradeNotebookRuntimeResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_UpgradeNotebookRuntimeResponse_descriptor, + new java.lang.String[] {}); + internal_static_google_cloud_aiplatform_v1beta1_StartNotebookRuntimeRequest_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_cloud_aiplatform_v1beta1_StartNotebookRuntimeRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_StartNotebookRuntimeRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_aiplatform_v1beta1_StartNotebookRuntimeOperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_google_cloud_aiplatform_v1beta1_StartNotebookRuntimeOperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_StartNotebookRuntimeOperationMetadata_descriptor, + new java.lang.String[] { + "GenericMetadata", "ProgressMessage", + }); + internal_static_google_cloud_aiplatform_v1beta1_StartNotebookRuntimeResponse_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_google_cloud_aiplatform_v1beta1_StartNotebookRuntimeResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_StartNotebookRuntimeResponse_descriptor, + new java.lang.String[] {}); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resourceReference); + registry.add(com.google.longrunning.OperationsProto.operationInfo); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.aiplatform.v1beta1.NotebookRuntimeProto.getDescriptor(); + com.google.cloud.aiplatform.v1beta1.OperationProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/OpenApiProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/OpenApiProto.java index 8295c14cca79..1f70aaa1fb27 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/OpenApiProto.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/OpenApiProto.java @@ -48,27 +48,34 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "\n-google/cloud/aiplatform/v1beta1/openap" + "i.proto\022\037google.cloud.aiplatform.v1beta1" + "\032\037google/api/field_behavior.proto\032\034googl" - + "e/protobuf/struct.proto\"\313\003\n\006Schema\0228\n\004ty" + + "e/protobuf/struct.proto\"\353\005\n\006Schema\0228\n\004ty" + "pe\030\001 \001(\0162%.google.cloud.aiplatform.v1bet" - + "a1.TypeB\003\340A\001\022\023\n\006format\030\007 \001(\tB\003\340A\001\022\030\n\013des" - + "cription\030\010 \001(\tB\003\340A\001\022\025\n\010nullable\030\006 \001(\010B\003\340" - + "A\001\022;\n\005items\030\002 \001(\0132\'.google.cloud.aiplatf" - + "orm.v1beta1.SchemaB\003\340A\001\022\021\n\004enum\030\t \003(\tB\003\340" - + "A\001\022P\n\nproperties\030\003 \003(\01327.google.cloud.ai" - + "platform.v1beta1.Schema.PropertiesEntryB" - + "\003\340A\001\022\025\n\010required\030\005 \003(\tB\003\340A\001\022,\n\007example\030\004" - + " \001(\0132\026.google.protobuf.ValueB\003\340A\001\032Z\n\017Pro" - + "pertiesEntry\022\013\n\003key\030\001 \001(\t\0226\n\005value\030\002 \001(\013" - + "2\'.google.cloud.aiplatform.v1beta1.Schem" - + "a:\0028\001*e\n\004Type\022\024\n\020TYPE_UNSPECIFIED\020\000\022\n\n\006S" - + "TRING\020\001\022\n\n\006NUMBER\020\002\022\013\n\007INTEGER\020\003\022\013\n\007BOOL" - + "EAN\020\004\022\t\n\005ARRAY\020\005\022\n\n\006OBJECT\020\006B\343\001\n#com.goo" - + "gle.cloud.aiplatform.v1beta1B\014OpenApiPro" - + "toP\001ZCcloud.google.com/go/aiplatform/api" - + "v1beta1/aiplatformpb;aiplatformpb\252\002\037Goog" - + "le.Cloud.AIPlatform.V1Beta1\312\002\037Google\\Clo" - + "ud\\AIPlatform\\V1beta1\352\002\"Google::Cloud::A" - + "IPlatform::V1beta1b\006proto3" + + "a1.TypeB\003\340A\001\022\023\n\006format\030\007 \001(\tB\003\340A\001\022\022\n\005tit" + + "le\030\030 \001(\tB\003\340A\001\022\030\n\013description\030\010 \001(\tB\003\340A\001\022" + + "\025\n\010nullable\030\006 \001(\010B\003\340A\001\022,\n\007default\030\027 \001(\0132" + + "\026.google.protobuf.ValueB\003\340A\001\022;\n\005items\030\002 " + + "\001(\0132\'.google.cloud.aiplatform.v1beta1.Sc" + + "hemaB\003\340A\001\022\026\n\tmin_items\030\025 \001(\003B\003\340A\001\022\026\n\tmax" + + "_items\030\026 \001(\003B\003\340A\001\022\021\n\004enum\030\t \003(\tB\003\340A\001\022P\n\n" + + "properties\030\003 \003(\01327.google.cloud.aiplatfo" + + "rm.v1beta1.Schema.PropertiesEntryB\003\340A\001\022\025" + + "\n\010required\030\005 \003(\tB\003\340A\001\022\033\n\016min_properties\030" + + "\016 \001(\003B\003\340A\001\022\033\n\016max_properties\030\017 \001(\003B\003\340A\001\022" + + "\024\n\007minimum\030\020 \001(\001B\003\340A\001\022\024\n\007maximum\030\021 \001(\001B\003" + + "\340A\001\022\027\n\nmin_length\030\022 \001(\003B\003\340A\001\022\027\n\nmax_leng" + + "th\030\023 \001(\003B\003\340A\001\022\024\n\007pattern\030\024 \001(\tB\003\340A\001\022,\n\007e" + + "xample\030\004 \001(\0132\026.google.protobuf.ValueB\003\340A" + + "\001\032Z\n\017PropertiesEntry\022\013\n\003key\030\001 \001(\t\0226\n\005val" + + "ue\030\002 \001(\0132\'.google.cloud.aiplatform.v1bet" + + "a1.Schema:\0028\001*e\n\004Type\022\024\n\020TYPE_UNSPECIFIE" + + "D\020\000\022\n\n\006STRING\020\001\022\n\n\006NUMBER\020\002\022\013\n\007INTEGER\020\003" + + "\022\013\n\007BOOLEAN\020\004\022\t\n\005ARRAY\020\005\022\n\n\006OBJECT\020\006B\343\001\n" + + "#com.google.cloud.aiplatform.v1beta1B\014Op" + + "enApiProtoP\001ZCcloud.google.com/go/aiplat" + + "form/apiv1beta1/aiplatformpb;aiplatformp" + + "b\252\002\037Google.Cloud.AIPlatform.V1Beta1\312\002\037Go" + + "ogle\\Cloud\\AIPlatform\\V1beta1\352\002\"Google::" + + "Cloud::AIPlatform::V1beta1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -85,12 +92,23 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Type", "Format", + "Title", "Description", "Nullable", + "Default", "Items", + "MinItems", + "MaxItems", "Enum", "Properties", "Required", + "MinProperties", + "MaxProperties", + "Minimum", + "Maximum", + "MinLength", + "MaxLength", + "Pattern", "Example", }); internal_static_google_cloud_aiplatform_v1beta1_Schema_PropertiesEntry_descriptor = diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/PairwiseQuestionAnsweringQualityInstance.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/PairwiseQuestionAnsweringQualityInstance.java index d49a8981d17c..d39ad7f2544b 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/PairwiseQuestionAnsweringQualityInstance.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/PairwiseQuestionAnsweringQualityInstance.java @@ -277,10 +277,10 @@ public com.google.protobuf.ByteString getReferenceBytes() { * * *
-   * Optional. Text to answer the question.
+   * Required. Text to answer the question.
    * 
* - * optional string context = 4 [(.google.api.field_behavior) = OPTIONAL]; + * optional string context = 4 [(.google.api.field_behavior) = REQUIRED]; * * @return Whether the context field is set. */ @@ -292,10 +292,10 @@ public boolean hasContext() { * * *
-   * Optional. Text to answer the question.
+   * Required. Text to answer the question.
    * 
* - * optional string context = 4 [(.google.api.field_behavior) = OPTIONAL]; + * optional string context = 4 [(.google.api.field_behavior) = REQUIRED]; * * @return The context. */ @@ -315,10 +315,10 @@ public java.lang.String getContext() { * * *
-   * Optional. Text to answer the question.
+   * Required. Text to answer the question.
    * 
* - * optional string context = 4 [(.google.api.field_behavior) = OPTIONAL]; + * optional string context = 4 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for context. */ @@ -1261,10 +1261,10 @@ public Builder setReferenceBytes(com.google.protobuf.ByteString value) { * * *
-     * Optional. Text to answer the question.
+     * Required. Text to answer the question.
      * 
* - * optional string context = 4 [(.google.api.field_behavior) = OPTIONAL]; + * optional string context = 4 [(.google.api.field_behavior) = REQUIRED]; * * @return Whether the context field is set. */ @@ -1275,10 +1275,10 @@ public boolean hasContext() { * * *
-     * Optional. Text to answer the question.
+     * Required. Text to answer the question.
      * 
* - * optional string context = 4 [(.google.api.field_behavior) = OPTIONAL]; + * optional string context = 4 [(.google.api.field_behavior) = REQUIRED]; * * @return The context. */ @@ -1297,10 +1297,10 @@ public java.lang.String getContext() { * * *
-     * Optional. Text to answer the question.
+     * Required. Text to answer the question.
      * 
* - * optional string context = 4 [(.google.api.field_behavior) = OPTIONAL]; + * optional string context = 4 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for context. */ @@ -1319,10 +1319,10 @@ public com.google.protobuf.ByteString getContextBytes() { * * *
-     * Optional. Text to answer the question.
+     * Required. Text to answer the question.
      * 
* - * optional string context = 4 [(.google.api.field_behavior) = OPTIONAL]; + * optional string context = 4 [(.google.api.field_behavior) = REQUIRED]; * * @param value The context to set. * @return This builder for chaining. @@ -1340,10 +1340,10 @@ public Builder setContext(java.lang.String value) { * * *
-     * Optional. Text to answer the question.
+     * Required. Text to answer the question.
      * 
* - * optional string context = 4 [(.google.api.field_behavior) = OPTIONAL]; + * optional string context = 4 [(.google.api.field_behavior) = REQUIRED]; * * @return This builder for chaining. */ @@ -1357,10 +1357,10 @@ public Builder clearContext() { * * *
-     * Optional. Text to answer the question.
+     * Required. Text to answer the question.
      * 
* - * optional string context = 4 [(.google.api.field_behavior) = OPTIONAL]; + * optional string context = 4 [(.google.api.field_behavior) = REQUIRED]; * * @param value The bytes for context to set. * @return This builder for chaining. diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/PairwiseQuestionAnsweringQualityInstanceOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/PairwiseQuestionAnsweringQualityInstanceOrBuilder.java index 271436928b88..3619bbee6f72 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/PairwiseQuestionAnsweringQualityInstanceOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/PairwiseQuestionAnsweringQualityInstanceOrBuilder.java @@ -139,10 +139,10 @@ public interface PairwiseQuestionAnsweringQualityInstanceOrBuilder * * *
-   * Optional. Text to answer the question.
+   * Required. Text to answer the question.
    * 
* - * optional string context = 4 [(.google.api.field_behavior) = OPTIONAL]; + * optional string context = 4 [(.google.api.field_behavior) = REQUIRED]; * * @return Whether the context field is set. */ @@ -151,10 +151,10 @@ public interface PairwiseQuestionAnsweringQualityInstanceOrBuilder * * *
-   * Optional. Text to answer the question.
+   * Required. Text to answer the question.
    * 
* - * optional string context = 4 [(.google.api.field_behavior) = OPTIONAL]; + * optional string context = 4 [(.google.api.field_behavior) = REQUIRED]; * * @return The context. */ @@ -163,10 +163,10 @@ public interface PairwiseQuestionAnsweringQualityInstanceOrBuilder * * *
-   * Optional. Text to answer the question.
+   * Required. Text to answer the question.
    * 
* - * optional string context = 4 [(.google.api.field_behavior) = OPTIONAL]; + * optional string context = 4 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for context. */ diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/PersistentResource.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/PersistentResource.java index 1c70a1e0a6ce..e89fec6a8dbb 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/PersistentResource.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/PersistentResource.java @@ -146,6 +146,27 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * ERROR = 5; */ ERROR(5), + /** + * + * + *
+     * The REBOOTING state indicates the persistent resource is being rebooted
+     * (PR is not available right now but is expected to be ready again later).
+     * 
+ * + * REBOOTING = 6; + */ + REBOOTING(6), + /** + * + * + *
+     * The UPDATING state indicates the persistent resource is being updated.
+     * 
+ * + * UPDATING = 7; + */ + UPDATING(7), UNRECOGNIZED(-1), ; @@ -202,6 +223,27 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * ERROR = 5; */ public static final int ERROR_VALUE = 5; + /** + * + * + *
+     * The REBOOTING state indicates the persistent resource is being rebooted
+     * (PR is not available right now but is expected to be ready again later).
+     * 
+ * + * REBOOTING = 6; + */ + public static final int REBOOTING_VALUE = 6; + /** + * + * + *
+     * The UPDATING state indicates the persistent resource is being updated.
+     * 
+ * + * UPDATING = 7; + */ + public static final int UPDATING_VALUE = 7; public final int getNumber() { if (this == UNRECOGNIZED) { @@ -237,6 +279,10 @@ public static State forNumber(int value) { return STOPPING; case 5: return ERROR; + case 6: + return REBOOTING; + case 7: + return UPDATING; default: return null; } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/PersistentResourceProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/PersistentResourceProto.java index 180b03d12ce8..673815375f7e 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/PersistentResourceProto.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/PersistentResourceProto.java @@ -89,7 +89,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "c.proto\0327google/cloud/aiplatform/v1beta1" + "/machine_resources.proto\032\037google/protobu" + "f/timestamp.proto\032\027google/rpc/status.pro" - + "to\"\337\010\n\022PersistentResource\022\021\n\004name\030\001 \001(\tB" + + "to\"\374\010\n\022PersistentResource\022\021\n\004name\030\001 \001(\tB" + "\003\340A\005\022\031\n\014display_name\030\002 \001(\tB\003\340A\001\022J\n\016resou" + "rce_pools\030\004 \003(\0132-.google.cloud.aiplatfor" + "m.v1beta1.ResourcePoolB\003\340A\002\022M\n\005state\030\005 \001" @@ -111,51 +111,54 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\016 \001(\01320.google.cloud.aiplatform.v1beta1." + "ResourceRuntimeB\003\340A\003\022\037\n\022reserved_ip_rang" + "es\030\017 \003(\tB\003\340A\001\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(" - + "\t\022\r\n\005value\030\002 \001(\t:\0028\001\"V\n\005State\022\025\n\021STATE_U" + + "\t\022\r\n\005value\030\002 \001(\t:\0028\001\"s\n\005State\022\025\n\021STATE_U" + "NSPECIFIED\020\000\022\020\n\014PROVISIONING\020\001\022\013\n\007RUNNIN" - + "G\020\003\022\014\n\010STOPPING\020\004\022\t\n\005ERROR\020\005:\205\001\352A\201\001\n,aip" - + "latform.googleapis.com/PersistentResourc" - + "e\022Qprojects/{project}/locations/{locatio" - + "n}/persistentResources/{persistent_resou" - + "rce}\"\352\003\n\014ResourcePool\022\017\n\002id\030\001 \001(\tB\003\340A\005\022J" - + "\n\014machine_spec\030\002 \001(\0132,.google.cloud.aipl" - + "atform.v1beta1.MachineSpecB\006\340A\002\340A\005\022\037\n\rre" - + "plica_count\030\003 \001(\003B\003\340A\001H\000\210\001\001\022A\n\tdisk_spec" - + "\030\004 \001(\0132).google.cloud.aiplatform.v1beta1" - + ".DiskSpecB\003\340A\001\022\037\n\022used_replica_count\030\006 \001" - + "(\003B\003\340A\003\022\\\n\020autoscaling_spec\030\007 \001(\0132=.goog" - + "le.cloud.aiplatform.v1beta1.ResourcePool" - + ".AutoscalingSpecB\003\340A\001\032\207\001\n\017AutoscalingSpe" - + "c\022#\n\021min_replica_count\030\001 \001(\003B\003\340A\001H\000\210\001\001\022#" - + "\n\021max_replica_count\030\002 \001(\003B\003\340A\001H\001\210\001\001B\024\n\022_" - + "min_replica_countB\024\n\022_max_replica_countB" - + "\020\n\016_replica_count\"\256\001\n\023ResourceRuntimeSpe" - + "c\022V\n\024service_account_spec\030\002 \001(\01323.google" - + ".cloud.aiplatform.v1beta1.ServiceAccount" - + "SpecB\003\340A\001\022?\n\010ray_spec\030\001 \001(\0132(.google.clo" - + "ud.aiplatform.v1beta1.RaySpecB\003\340A\001\"\270\002\n\007R" - + "aySpec\022\026\n\timage_uri\030\001 \001(\tB\003\340A\001\022c\n\024resour" - + "ce_pool_images\030\006 \003(\0132@.google.cloud.aipl" - + "atform.v1beta1.RaySpec.ResourcePoolImage" - + "sEntryB\003\340A\001\022\'\n\032head_node_resource_pool_i" - + "d\030\007 \001(\tB\003\340A\001\022L\n\017ray_metric_spec\030\010 \001(\0132.." - + "google.cloud.aiplatform.v1beta1.RayMetri" - + "cSpecB\003\340A\001\0329\n\027ResourcePoolImagesEntry\022\013\n" - + "\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\240\001\n\017Resour" - + "ceRuntime\022Z\n\013access_uris\030\001 \003(\0132@.google." - + "cloud.aiplatform.v1beta1.ResourceRuntime" - + ".AccessUrisEntryB\003\340A\003\0321\n\017AccessUrisEntry" - + "\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"^\n\022Serv" - + "iceAccountSpec\022*\n\035enable_custom_service_" - + "account\030\001 \001(\010B\003\340A\002\022\034\n\017service_account\030\002 " - + "\001(\tB\003\340A\001\"&\n\rRayMetricSpec\022\025\n\010disabled\030\001 " - + "\001(\010B\003\340A\001B\356\001\n#com.google.cloud.aiplatform" - + ".v1beta1B\027PersistentResourceProtoP\001ZCclo" - + "ud.google.com/go/aiplatform/apiv1beta1/a" - + "iplatformpb;aiplatformpb\252\002\037Google.Cloud." - + "AIPlatform.V1Beta1\312\002\037Google\\Cloud\\AIPlat" - + "form\\V1beta1\352\002\"Google::Cloud::AIPlatform" - + "::V1beta1b\006proto3" + + "G\020\003\022\014\n\010STOPPING\020\004\022\t\n\005ERROR\020\005\022\r\n\tREBOOTIN" + + "G\020\006\022\014\n\010UPDATING\020\007:\205\001\352A\201\001\n,aiplatform.goo" + + "gleapis.com/PersistentResource\022Qprojects" + + "/{project}/locations/{location}/persiste" + + "ntResources/{persistent_resource}\"\352\003\n\014Re" + + "sourcePool\022\017\n\002id\030\001 \001(\tB\003\340A\005\022J\n\014machine_s" + + "pec\030\002 \001(\0132,.google.cloud.aiplatform.v1be" + + "ta1.MachineSpecB\006\340A\002\340A\005\022\037\n\rreplica_count" + + "\030\003 \001(\003B\003\340A\001H\000\210\001\001\022A\n\tdisk_spec\030\004 \001(\0132).go" + + "ogle.cloud.aiplatform.v1beta1.DiskSpecB\003" + + "\340A\001\022\037\n\022used_replica_count\030\006 \001(\003B\003\340A\003\022\\\n\020" + + "autoscaling_spec\030\007 \001(\0132=.google.cloud.ai" + + "platform.v1beta1.ResourcePool.Autoscalin" + + "gSpecB\003\340A\001\032\207\001\n\017AutoscalingSpec\022#\n\021min_re" + + "plica_count\030\001 \001(\003B\003\340A\001H\000\210\001\001\022#\n\021max_repli" + + "ca_count\030\002 \001(\003B\003\340A\001H\001\210\001\001B\024\n\022_min_replica" + + "_countB\024\n\022_max_replica_countB\020\n\016_replica" + + "_count\"\256\001\n\023ResourceRuntimeSpec\022V\n\024servic" + + "e_account_spec\030\002 \001(\01323.google.cloud.aipl" + + "atform.v1beta1.ServiceAccountSpecB\003\340A\001\022?" + + "\n\010ray_spec\030\001 \001(\0132(.google.cloud.aiplatfo" + + "rm.v1beta1.RaySpecB\003\340A\001\"\270\002\n\007RaySpec\022\026\n\ti" + + "mage_uri\030\001 \001(\tB\003\340A\001\022c\n\024resource_pool_ima" + + "ges\030\006 \003(\0132@.google.cloud.aiplatform.v1be" + + "ta1.RaySpec.ResourcePoolImagesEntryB\003\340A\001" + + "\022\'\n\032head_node_resource_pool_id\030\007 \001(\tB\003\340A" + + "\001\022L\n\017ray_metric_spec\030\010 \001(\0132..google.clou" + + "d.aiplatform.v1beta1.RayMetricSpecB\003\340A\001\032" + + "9\n\027ResourcePoolImagesEntry\022\013\n\003key\030\001 \001(\t\022" + + "\r\n\005value\030\002 \001(\t:\0028\001\"\376\001\n\017ResourceRuntime\022Z" + + "\n\013access_uris\030\001 \003(\0132@.google.cloud.aipla" + + "tform.v1beta1.ResourceRuntime.AccessUris" + + "EntryB\003\340A\003\022\\\n\031notebook_runtime_template\030" + + "\002 \001(\tB9\340A\003\372A3\n1aiplatform.googleapis.com" + + "/NotebookRuntimeTemplate\0321\n\017AccessUrisEn" + + "try\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"^\n\022S" + + "erviceAccountSpec\022*\n\035enable_custom_servi" + + "ce_account\030\001 \001(\010B\003\340A\002\022\034\n\017service_account" + + "\030\002 \001(\tB\003\340A\001\"&\n\rRayMetricSpec\022\025\n\010disabled" + + "\030\001 \001(\010B\003\340A\001B\356\001\n#com.google.cloud.aiplatf" + + "orm.v1beta1B\027PersistentResourceProtoP\001ZC" + + "cloud.google.com/go/aiplatform/apiv1beta" + + "1/aiplatformpb;aiplatformpb\252\002\037Google.Clo" + + "ud.AIPlatform.V1Beta1\312\002\037Google\\Cloud\\AIP" + + "latform\\V1beta1\352\002\"Google::Cloud::AIPlatf" + + "orm::V1beta1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -252,7 +255,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1beta1_ResourceRuntime_descriptor, new java.lang.String[] { - "AccessUris", + "AccessUris", "NotebookRuntimeTemplate", }); internal_static_google_cloud_aiplatform_v1beta1_ResourceRuntime_AccessUrisEntry_descriptor = internal_static_google_cloud_aiplatform_v1beta1_ResourceRuntime_descriptor diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/PersistentResourceServiceProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/PersistentResourceServiceProto.java index 45e94f6938c9..2067b0c4c803 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/PersistentResourceServiceProto.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/PersistentResourceServiceProto.java @@ -40,6 +40,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_aiplatform_v1beta1_UpdatePersistentResourceOperationMetadata_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_aiplatform_v1beta1_UpdatePersistentResourceOperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_RebootPersistentResourceOperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_RebootPersistentResourceOperationMetadata_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_aiplatform_v1beta1_GetPersistentResourceRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -60,6 +64,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_aiplatform_v1beta1_UpdatePersistentResourceRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_aiplatform_v1beta1_UpdatePersistentResourceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_RebootPersistentResourceRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_RebootPersistentResourceRequest_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -92,68 +100,81 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\232\001\n)UpdatePersistentResourceOperationMet" + "adata\022S\n\020generic_metadata\030\001 \001(\01329.google" + ".cloud.aiplatform.v1beta1.GenericOperati" - + "onMetadata\022\030\n\020progress_message\030\002 \001(\t\"b\n\034" - + "GetPersistentResourceRequest\022B\n\004name\030\001 \001" - + "(\tB4\340A\002\372A.\n,aiplatform.googleapis.com/Pe" - + "rsistentResource\"\214\001\n\036ListPersistentResou" - + "rcesRequest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!loc" - + "ations.googleapis.com/Location\022\026\n\tpage_s" - + "ize\030\003 \001(\005B\003\340A\001\022\027\n\npage_token\030\004 \001(\tB\003\340A\001\"" - + "\215\001\n\037ListPersistentResourcesResponse\022Q\n\024p" - + "ersistent_resources\030\001 \003(\01323.google.cloud" - + ".aiplatform.v1beta1.PersistentResource\022\027" - + "\n\017next_page_token\030\002 \001(\t\"e\n\037DeletePersist" - + "entResourceRequest\022B\n\004name\030\001 \001(\tB4\340A\002\372A." - + "\n,aiplatform.googleapis.com/PersistentRe" - + "source\"\256\001\n\037UpdatePersistentResourceReque" - + "st\022U\n\023persistent_resource\030\001 \001(\01323.google" - + ".cloud.aiplatform.v1beta1.PersistentReso" - + "urceB\003\340A\002\0224\n\013update_mask\030\002 \001(\0132\032.google." - + "protobuf.FieldMaskB\003\340A\0022\323\013\n\031PersistentRe" - + "sourceService\022\315\002\n\030CreatePersistentResour" - + "ce\022@.google.cloud.aiplatform.v1beta1.Cre" - + "atePersistentResourceRequest\032\035.google.lo" - + "ngrunning.Operation\"\317\001\312A?\n\022PersistentRes" - + "ource\022)CreatePersistentResourceOperation" - + "Metadata\332A1parent,persistent_resource,pe" - + "rsistent_resource_id\202\323\344\223\002S\"\022\022\022*\022*<" - + "/v1beta1/{name=projects/*/locations/*/pe" - + "rsistentResources/*}\022\317\002\n\030UpdatePersisten" - + "tResource\022@.google.cloud.aiplatform.v1be" - + "ta1.UpdatePersistentResourceRequest\032\035.go" - + "ogle.longrunning.Operation\"\321\001\312A?\n\022Persis" - + "tentResource\022)UpdatePersistentResourceOp" - + "erationMetadata\332A\037persistent_resource,up" - + "date_mask\202\323\344\223\002g2P/v1beta1/{persistent_re" - + "source.name=projects/*/locations/*/persi" - + "stentResources/*}:\023persistent_resource\032M" - + "\312A\031aiplatform.googleapis.com\322A.https://w" - + "ww.googleapis.com/auth/cloud-platformB\365\001" - + "\n#com.google.cloud.aiplatform.v1beta1B\036P" - + "ersistentResourceServiceProtoP\001ZCcloud.g" - + "oogle.com/go/aiplatform/apiv1beta1/aipla" - + "tformpb;aiplatformpb\252\002\037Google.Cloud.AIPl" - + "atform.V1Beta1\312\002\037Google\\Cloud\\AIPlatform" - + "\\V1beta1\352\002\"Google::Cloud::AIPlatform::V1" - + "beta1b\006proto3" + + "urces/*}:reboot:\001*\032M\312A\031aiplatform.google" + + "apis.com\322A.https://www.googleapis.com/au" + + "th/cloud-platformB\365\001\n#com.google.cloud.a" + + "iplatform.v1beta1B\036PersistentResourceSer" + + "viceProtoP\001ZCcloud.google.com/go/aiplatf" + + "orm/apiv1beta1/aiplatformpb;aiplatformpb" + + "\252\002\037Google.Cloud.AIPlatform.V1Beta1\312\002\037Goo" + + "gle\\Cloud\\AIPlatform\\V1beta1\352\002\"Google::C" + + "loud::AIPlatform::V1beta1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -193,8 +214,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "GenericMetadata", "ProgressMessage", }); - internal_static_google_cloud_aiplatform_v1beta1_GetPersistentResourceRequest_descriptor = + internal_static_google_cloud_aiplatform_v1beta1_RebootPersistentResourceOperationMetadata_descriptor = getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_aiplatform_v1beta1_RebootPersistentResourceOperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_RebootPersistentResourceOperationMetadata_descriptor, + new java.lang.String[] { + "GenericMetadata", "ProgressMessage", + }); + internal_static_google_cloud_aiplatform_v1beta1_GetPersistentResourceRequest_descriptor = + getDescriptor().getMessageTypes().get(4); internal_static_google_cloud_aiplatform_v1beta1_GetPersistentResourceRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1beta1_GetPersistentResourceRequest_descriptor, @@ -202,7 +231,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_aiplatform_v1beta1_ListPersistentResourcesRequest_descriptor = - getDescriptor().getMessageTypes().get(4); + getDescriptor().getMessageTypes().get(5); internal_static_google_cloud_aiplatform_v1beta1_ListPersistentResourcesRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1beta1_ListPersistentResourcesRequest_descriptor, @@ -210,7 +239,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "PageSize", "PageToken", }); internal_static_google_cloud_aiplatform_v1beta1_ListPersistentResourcesResponse_descriptor = - getDescriptor().getMessageTypes().get(5); + getDescriptor().getMessageTypes().get(6); internal_static_google_cloud_aiplatform_v1beta1_ListPersistentResourcesResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1beta1_ListPersistentResourcesResponse_descriptor, @@ -218,7 +247,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "PersistentResources", "NextPageToken", }); internal_static_google_cloud_aiplatform_v1beta1_DeletePersistentResourceRequest_descriptor = - getDescriptor().getMessageTypes().get(6); + getDescriptor().getMessageTypes().get(7); internal_static_google_cloud_aiplatform_v1beta1_DeletePersistentResourceRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1beta1_DeletePersistentResourceRequest_descriptor, @@ -226,13 +255,21 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_aiplatform_v1beta1_UpdatePersistentResourceRequest_descriptor = - getDescriptor().getMessageTypes().get(7); + getDescriptor().getMessageTypes().get(8); internal_static_google_cloud_aiplatform_v1beta1_UpdatePersistentResourceRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1beta1_UpdatePersistentResourceRequest_descriptor, new java.lang.String[] { "PersistentResource", "UpdateMask", }); + internal_static_google_cloud_aiplatform_v1beta1_RebootPersistentResourceRequest_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_aiplatform_v1beta1_RebootPersistentResourceRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_RebootPersistentResourceRequest_descriptor, + new java.lang.String[] { + "Name", + }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.ClientProto.defaultHost); diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/PredictionServiceProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/PredictionServiceProto.java index 7b2435dd4342..a02dca354da9 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/PredictionServiceProto.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/PredictionServiceProto.java @@ -132,6 +132,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_aiplatform_v1beta1_GenerateContentResponse_UsageMetadata_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_aiplatform_v1beta1_GenerateContentResponse_UsageMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_ChatCompletionsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_ChatCompletionsRequest_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -240,122 +244,135 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "?\n\010contents\030\004 \003(\0132(.google.cloud.aiplatf" + "orm.v1beta1.ContentB\003\340A\002\"N\n\023CountTokensR" + "esponse\022\024\n\014total_tokens\030\001 \001(\005\022!\n\031total_b" - + "illable_characters\030\002 \001(\005\"\220\003\n\026GenerateCon" + + "illable_characters\030\002 \001(\005\"\367\003\n\026GenerateCon" + "tentRequest\022\022\n\005model\030\005 \001(\tB\003\340A\002\022?\n\010conte" + "nts\030\002 \003(\0132(.google.cloud.aiplatform.v1be" - + "ta1.ContentB\003\340A\002\0229\n\005tools\030\006 \003(\0132%.google" + + "ta1.ContentB\003\340A\002\022N\n\022system_instruction\030\010" + + " \001(\0132(.google.cloud.aiplatform.v1beta1.C" + + "ontentB\003\340A\001H\000\210\001\001\0229\n\005tools\030\006 \003(\0132%.google" + ".cloud.aiplatform.v1beta1.ToolB\003\340A\001\022E\n\013t" + "ool_config\030\007 \001(\0132+.google.cloud.aiplatfo" + "rm.v1beta1.ToolConfigB\003\340A\001\022L\n\017safety_set" + "tings\030\003 \003(\0132..google.cloud.aiplatform.v1" + "beta1.SafetySettingB\003\340A\001\022Q\n\021generation_c" + "onfig\030\004 \001(\01321.google.cloud.aiplatform.v1" - + "beta1.GenerationConfigB\003\340A\001\"\311\005\n\027Generate" - + "ContentResponse\022C\n\ncandidates\030\002 \003(\0132*.go" - + "ogle.cloud.aiplatform.v1beta1.CandidateB" - + "\003\340A\003\022e\n\017prompt_feedback\030\003 \001(\0132G.google.c" - + "loud.aiplatform.v1beta1.GenerateContentR" - + "esponse.PromptFeedbackB\003\340A\003\022^\n\016usage_met" - + "adata\030\004 \001(\0132F.google.cloud.aiplatform.v1" - + "beta1.GenerateContentResponse.UsageMetad" - + "ata\032\271\002\n\016PromptFeedback\022p\n\014block_reason\030\001" - + " \001(\0162U.google.cloud.aiplatform.v1beta1.G" - + "enerateContentResponse.PromptFeedback.Bl" - + "ockedReasonB\003\340A\003\022J\n\016safety_ratings\030\002 \003(\013" - + "2-.google.cloud.aiplatform.v1beta1.Safet" - + "yRatingB\003\340A\003\022!\n\024block_reason_message\030\003 \001" - + "(\tB\003\340A\003\"F\n\rBlockedReason\022\036\n\032BLOCKED_REAS" - + "ON_UNSPECIFIED\020\000\022\n\n\006SAFETY\020\001\022\t\n\005OTHER\020\002\032" - + "f\n\rUsageMetadata\022\032\n\022prompt_token_count\030\001" - + " \001(\005\022\036\n\026candidates_token_count\030\002 \001(\005\022\031\n\021" - + "total_token_count\030\003 \001(\0052\255\031\n\021PredictionSe" - + "rvice\022\250\002\n\007Predict\022/.google.cloud.aiplatf" - + "orm.v1beta1.PredictRequest\0320.google.clou" - + "d.aiplatform.v1beta1.PredictResponse\"\271\001\332" - + "A\035endpoint,instances,parameters\202\323\344\223\002\222\001\">" + + "beta1.GenerationConfigB\003\340A\001B\025\n\023_system_i" + + "nstruction\"\360\005\n\027GenerateContentResponse\022C" + + "\n\ncandidates\030\002 \003(\0132*.google.cloud.aiplat" + + "form.v1beta1.CandidateB\003\340A\003\022e\n\017prompt_fe" + + "edback\030\003 \001(\0132G.google.cloud.aiplatform.v" + + "1beta1.GenerateContentResponse.PromptFee" + + "dbackB\003\340A\003\022^\n\016usage_metadata\030\004 \001(\0132F.goo" + + "gle.cloud.aiplatform.v1beta1.GenerateCon" + + "tentResponse.UsageMetadata\032\340\002\n\016PromptFee" + + "dback\022p\n\014block_reason\030\001 \001(\0162U.google.clo" + + "ud.aiplatform.v1beta1.GenerateContentRes" + + "ponse.PromptFeedback.BlockedReasonB\003\340A\003\022" + + "J\n\016safety_ratings\030\002 \003(\0132-.google.cloud.a" + + "iplatform.v1beta1.SafetyRatingB\003\340A\003\022!\n\024b" + + "lock_reason_message\030\003 \001(\tB\003\340A\003\"m\n\rBlocke" + + "dReason\022\036\n\032BLOCKED_REASON_UNSPECIFIED\020\000\022" + + "\n\n\006SAFETY\020\001\022\t\n\005OTHER\020\002\022\r\n\tBLOCKLIST\020\003\022\026\n" + + "\022PROHIBITED_CONTENT\020\004\032f\n\rUsageMetadata\022\032" + + "\n\022prompt_token_count\030\001 \001(\005\022\036\n\026candidates" + + "_token_count\030\002 \001(\005\022\031\n\021total_token_count\030" + + "\003 \001(\005\"\204\001\n\026ChatCompletionsRequest\022<\n\010endp" + + "oint\030\001 \001(\tB*\340A\002\372A$\n\"aiplatform.googleapi" + + "s.com/Endpoint\022,\n\thttp_body\030\002 \001(\0132\024.goog" + + "le.api.HttpBodyB\003\340A\0012\203\033\n\021PredictionServi" + + "ce\022\250\002\n\007Predict\022/.google.cloud.aiplatform" + + ".v1beta1.PredictRequest\0320.google.cloud.a" + + "iplatform.v1beta1.PredictResponse\"\271\001\332A\035e" + + "ndpoint,instances,parameters\202\323\344\223\002\222\001\">/v1" + + "beta1/{endpoint=projects/*/locations/*/e" + + "ndpoints/*}:predict:\001*ZM\"H/v1beta1/{endp" + + "oint=projects/*/locations/*/publishers/*" + + "/models/*}:predict:\001*\022\215\002\n\nRawPredict\0222.g" + + "oogle.cloud.aiplatform.v1beta1.RawPredic" + + "tRequest\032\024.google.api.HttpBody\"\264\001\332A\022endp" + + "oint,http_body\202\323\344\223\002\230\001\"A/v1beta1/{endpoin" + + "t=projects/*/locations/*/endpoints/*}:ra" + + "wPredict:\001*ZP\"K/v1beta1/{endpoint=projec" + + "ts/*/locations/*/publishers/*/models/*}:" + + "rawPredict:\001*\022\317\001\n\rDirectPredict\0225.google" + + ".cloud.aiplatform.v1beta1.DirectPredictR" + + "equest\0326.google.cloud.aiplatform.v1beta1" + + ".DirectPredictResponse\"O\202\323\344\223\002I\"D/v1beta1" + + "/{endpoint=projects/*/locations/*/endpoi" + + "nts/*}:directPredict:\001*\022\333\001\n\020DirectRawPre" + + "dict\0228.google.cloud.aiplatform.v1beta1.D" + + "irectRawPredictRequest\0329.google.cloud.ai" + + "platform.v1beta1.DirectRawPredictRespons" + + "e\"R\202\323\344\223\002L\"G/v1beta1/{endpoint=projects/*" + + "/locations/*/endpoints/*}:directRawPredi" + + "ct:\001*\022\226\001\n\023StreamDirectPredict\022;.google.c" + + "loud.aiplatform.v1beta1.StreamDirectPred" + + "ictRequest\032<.google.cloud.aiplatform.v1b" + + "eta1.StreamDirectPredictResponse\"\000(\0010\001\022\237" + + "\001\n\026StreamDirectRawPredict\022>.google.cloud" + + ".aiplatform.v1beta1.StreamDirectRawPredi" + + "ctRequest\032?.google.cloud.aiplatform.v1be" + + "ta1.StreamDirectRawPredictResponse\"\000(\0010\001" + + "\022\215\001\n\020StreamingPredict\0228.google.cloud.aip" + + "latform.v1beta1.StreamingPredictRequest\032" + + "9.google.cloud.aiplatform.v1beta1.Stream" + + "ingPredictResponse\"\000(\0010\001\022\311\002\n\026ServerStrea" + + "mingPredict\0228.google.cloud.aiplatform.v1" + + "beta1.StreamingPredictRequest\0329.google.c" + + "loud.aiplatform.v1beta1.StreamingPredict" + + "Response\"\267\001\202\323\344\223\002\260\001\"M/v1beta1/{endpoint=p" + + "rojects/*/locations/*/endpoints/*}:serve" + + "rStreamingPredict:\001*Z\\\"W/v1beta1/{endpoi" + + "nt=projects/*/locations/*/publishers/*/m" + + "odels/*}:serverStreamingPredict:\001*0\001\022\226\001\n" + + "\023StreamingRawPredict\022;.google.cloud.aipl" + + "atform.v1beta1.StreamingRawPredictReques" + + "t\032<.google.cloud.aiplatform.v1beta1.Stre" + + "amingRawPredictResponse\"\000(\0010\001\022\351\001\n\007Explai" + + "n\022/.google.cloud.aiplatform.v1beta1.Expl" + + "ainRequest\0320.google.cloud.aiplatform.v1b" + + "eta1.ExplainResponse\"{\332A/endpoint,instan" + + "ces,parameters,deployed_model_id\202\323\344\223\002C\">" + "/v1beta1/{endpoint=projects/*/locations/" - + "*/endpoints/*}:predict:\001*ZM\"H/v1beta1/{e" - + "ndpoint=projects/*/locations/*/publisher" - + "s/*/models/*}:predict:\001*\022\215\002\n\nRawPredict\022" - + "2.google.cloud.aiplatform.v1beta1.RawPre" - + "dictRequest\032\024.google.api.HttpBody\"\264\001\332A\022e" - + "ndpoint,http_body\202\323\344\223\002\230\001\"A/v1beta1/{endp" - + "oint=projects/*/locations/*/endpoints/*}" - + ":rawPredict:\001*ZP\"K/v1beta1/{endpoint=pro" + + "*/endpoints/*}:explain:\001*\022\261\002\n\013CountToken" + + "s\0223.google.cloud.aiplatform.v1beta1.Coun" + + "tTokensRequest\0324.google.cloud.aiplatform" + + ".v1beta1.CountTokensResponse\"\266\001\332A\022endpoi" + + "nt,instances\202\323\344\223\002\232\001\"B/v1beta1/{endpoint=" + + "projects/*/locations/*/endpoints/*}:coun" + + "tTokens:\001*ZQ\"L/v1beta1/{endpoint=project" + + "s/*/locations/*/publishers/*/models/*}:c" + + "ountTokens:\001*\022\273\002\n\017GenerateContent\0227.goog" + + "le.cloud.aiplatform.v1beta1.GenerateCont" + + "entRequest\0328.google.cloud.aiplatform.v1b" + + "eta1.GenerateContentResponse\"\264\001\332A\016model," + + "contents\202\323\344\223\002\234\001\"C/v1beta1/{model=project" + + "s/*/locations/*/endpoints/*}:generateCon" + + "tent:\001*ZR\"M/v1beta1/{model=projects/*/lo" + + "cations/*/publishers/*/models/*}:generat" + + "eContent:\001*\022\317\002\n\025StreamGenerateContent\0227." + + "google.cloud.aiplatform.v1beta1.Generate" + + "ContentRequest\0328.google.cloud.aiplatform" + + ".v1beta1.GenerateContentResponse\"\300\001\332A\016mo" + + "del,contents\202\323\344\223\002\250\001\"I/v1beta1/{model=pro" + + "jects/*/locations/*/endpoints/*}:streamG" + + "enerateContent:\001*ZX\"S/v1beta1/{model=pro" + "jects/*/locations/*/publishers/*/models/" - + "*}:rawPredict:\001*\022\317\001\n\rDirectPredict\0225.goo" - + "gle.cloud.aiplatform.v1beta1.DirectPredi" - + "ctRequest\0326.google.cloud.aiplatform.v1be" - + "ta1.DirectPredictResponse\"O\202\323\344\223\002I\"D/v1be" - + "ta1/{endpoint=projects/*/locations/*/end" - + "points/*}:directPredict:\001*\022\333\001\n\020DirectRaw" - + "Predict\0228.google.cloud.aiplatform.v1beta" - + "1.DirectRawPredictRequest\0329.google.cloud" - + ".aiplatform.v1beta1.DirectRawPredictResp" - + "onse\"R\202\323\344\223\002L\"G/v1beta1/{endpoint=project" - + "s/*/locations/*/endpoints/*}:directRawPr" - + "edict:\001*\022\226\001\n\023StreamDirectPredict\022;.googl" - + "e.cloud.aiplatform.v1beta1.StreamDirectP" - + "redictRequest\032<.google.cloud.aiplatform." - + "v1beta1.StreamDirectPredictResponse\"\000(\0010" - + "\001\022\237\001\n\026StreamDirectRawPredict\022>.google.cl" - + "oud.aiplatform.v1beta1.StreamDirectRawPr" - + "edictRequest\032?.google.cloud.aiplatform.v" - + "1beta1.StreamDirectRawPredictResponse\"\000(" - + "\0010\001\022\215\001\n\020StreamingPredict\0228.google.cloud." - + "aiplatform.v1beta1.StreamingPredictReque" - + "st\0329.google.cloud.aiplatform.v1beta1.Str" - + "eamingPredictResponse\"\000(\0010\001\022\311\002\n\026ServerSt" - + "reamingPredict\0228.google.cloud.aiplatform" - + ".v1beta1.StreamingPredictRequest\0329.googl" - + "e.cloud.aiplatform.v1beta1.StreamingPred" - + "ictResponse\"\267\001\202\323\344\223\002\260\001\"M/v1beta1/{endpoin" - + "t=projects/*/locations/*/endpoints/*}:se" - + "rverStreamingPredict:\001*Z\\\"W/v1beta1/{end" - + "point=projects/*/locations/*/publishers/" - + "*/models/*}:serverStreamingPredict:\001*0\001\022" - + "\226\001\n\023StreamingRawPredict\022;.google.cloud.a" - + "iplatform.v1beta1.StreamingRawPredictReq" - + "uest\032<.google.cloud.aiplatform.v1beta1.S" - + "treamingRawPredictResponse\"\000(\0010\001\022\351\001\n\007Exp" - + "lain\022/.google.cloud.aiplatform.v1beta1.E" - + "xplainRequest\0320.google.cloud.aiplatform." - + "v1beta1.ExplainResponse\"{\332A/endpoint,ins" - + "tances,parameters,deployed_model_id\202\323\344\223\002" - + "C\">/v1beta1/{endpoint=projects/*/locatio" - + "ns/*/endpoints/*}:explain:\001*\022\261\002\n\013CountTo" - + "kens\0223.google.cloud.aiplatform.v1beta1.C" - + "ountTokensRequest\0324.google.cloud.aiplatf" - + "orm.v1beta1.CountTokensResponse\"\266\001\332A\022end" - + "point,instances\202\323\344\223\002\232\001\"B/v1beta1/{endpoi" - + "nt=projects/*/locations/*/endpoints/*}:c" - + "ountTokens:\001*ZQ\"L/v1beta1/{endpoint=proj" - + "ects/*/locations/*/publishers/*/models/*" - + "}:countTokens:\001*\022\273\002\n\017GenerateContent\0227.g" - + "oogle.cloud.aiplatform.v1beta1.GenerateC" - + "ontentRequest\0328.google.cloud.aiplatform." - + "v1beta1.GenerateContentResponse\"\264\001\332A\016mod" - + "el,contents\202\323\344\223\002\234\001\"C/v1beta1/{model=proj" - + "ects/*/locations/*/endpoints/*}:generate" - + "Content:\001*ZR\"M/v1beta1/{model=projects/*" - + "/locations/*/publishers/*/models/*}:gene" - + "rateContent:\001*\022\317\002\n\025StreamGenerateContent" - + "\0227.google.cloud.aiplatform.v1beta1.Gener" - + "ateContentRequest\0328.google.cloud.aiplatf" - + "orm.v1beta1.GenerateContentResponse\"\300\001\332A" - + "\016model,contents\202\323\344\223\002\250\001\"I/v1beta1/{model=" - + "projects/*/locations/*/endpoints/*}:stre" - + "amGenerateContent:\001*ZX\"S/v1beta1/{model=" - + "projects/*/locations/*/publishers/*/mode" - + "ls/*}:streamGenerateContent:\001*0\001\032M\312A\031aip" - + "latform.googleapis.com\322A.https://www.goo" - + "gleapis.com/auth/cloud-platformB\355\001\n#com." - + "google.cloud.aiplatform.v1beta1B\026Predict" - + "ionServiceProtoP\001ZCcloud.google.com/go/a" - + "iplatform/apiv1beta1/aiplatformpb;aiplat" - + "formpb\252\002\037Google.Cloud.AIPlatform.V1Beta1" - + "\312\002\037Google\\Cloud\\AIPlatform\\V1beta1\352\002\"Goo" - + "gle::Cloud::AIPlatform::V1beta1b\006proto3" + + "*}:streamGenerateContent:\001*0\001\022\323\001\n\017ChatCo" + + "mpletions\0227.google.cloud.aiplatform.v1be" + + "ta1.ChatCompletionsRequest\032\024.google.api." + + "HttpBody\"o\332A\022endpoint,http_body\202\323\344\223\002T\"G/" + + "v1beta1/{endpoint=projects/*/locations/*" + + "/endpoints/*}/chat/completions:\thttp_bod" + + "y0\001\032M\312A\031aiplatform.googleapis.com\322A.http" + + "s://www.googleapis.com/auth/cloud-platfo" + + "rmB\355\001\n#com.google.cloud.aiplatform.v1bet" + + "a1B\026PredictionServiceProtoP\001ZCcloud.goog" + + "le.com/go/aiplatform/apiv1beta1/aiplatfo" + + "rmpb;aiplatformpb\252\002\037Google.Cloud.AIPlatf" + + "orm.V1Beta1\312\002\037Google\\Cloud\\AIPlatform\\V1" + + "beta1\352\002\"Google::Cloud::AIPlatform::V1bet" + + "a1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -570,7 +587,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1beta1_GenerateContentRequest_descriptor, new java.lang.String[] { - "Model", "Contents", "Tools", "ToolConfig", "SafetySettings", "GenerationConfig", + "Model", + "Contents", + "SystemInstruction", + "Tools", + "ToolConfig", + "SafetySettings", + "GenerationConfig", }); internal_static_google_cloud_aiplatform_v1beta1_GenerateContentResponse_descriptor = getDescriptor().getMessageTypes().get(20); @@ -600,6 +623,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "PromptTokenCount", "CandidatesTokenCount", "TotalTokenCount", }); + internal_static_google_cloud_aiplatform_v1beta1_ChatCompletionsRequest_descriptor = + getDescriptor().getMessageTypes().get(21); + internal_static_google_cloud_aiplatform_v1beta1_ChatCompletionsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_ChatCompletionsRequest_descriptor, + new java.lang.String[] { + "Endpoint", "HttpBody", + }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.ClientProto.defaultHost); diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/QuestionAnsweringQualityInstance.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/QuestionAnsweringQualityInstance.java index cd1f0b616d3c..a702843c9a5c 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/QuestionAnsweringQualityInstance.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/QuestionAnsweringQualityInstance.java @@ -208,10 +208,10 @@ public com.google.protobuf.ByteString getReferenceBytes() { * * *
-   * Optional. Text to answer the question.
+   * Required. Text to answer the question.
    * 
* - * optional string context = 3 [(.google.api.field_behavior) = OPTIONAL]; + * optional string context = 3 [(.google.api.field_behavior) = REQUIRED]; * * @return Whether the context field is set. */ @@ -223,10 +223,10 @@ public boolean hasContext() { * * *
-   * Optional. Text to answer the question.
+   * Required. Text to answer the question.
    * 
* - * optional string context = 3 [(.google.api.field_behavior) = OPTIONAL]; + * optional string context = 3 [(.google.api.field_behavior) = REQUIRED]; * * @return The context. */ @@ -246,10 +246,10 @@ public java.lang.String getContext() { * * *
-   * Optional. Text to answer the question.
+   * Required. Text to answer the question.
    * 
* - * optional string context = 3 [(.google.api.field_behavior) = OPTIONAL]; + * optional string context = 3 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for context. */ @@ -1026,10 +1026,10 @@ public Builder setReferenceBytes(com.google.protobuf.ByteString value) { * * *
-     * Optional. Text to answer the question.
+     * Required. Text to answer the question.
      * 
* - * optional string context = 3 [(.google.api.field_behavior) = OPTIONAL]; + * optional string context = 3 [(.google.api.field_behavior) = REQUIRED]; * * @return Whether the context field is set. */ @@ -1040,10 +1040,10 @@ public boolean hasContext() { * * *
-     * Optional. Text to answer the question.
+     * Required. Text to answer the question.
      * 
* - * optional string context = 3 [(.google.api.field_behavior) = OPTIONAL]; + * optional string context = 3 [(.google.api.field_behavior) = REQUIRED]; * * @return The context. */ @@ -1062,10 +1062,10 @@ public java.lang.String getContext() { * * *
-     * Optional. Text to answer the question.
+     * Required. Text to answer the question.
      * 
* - * optional string context = 3 [(.google.api.field_behavior) = OPTIONAL]; + * optional string context = 3 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for context. */ @@ -1084,10 +1084,10 @@ public com.google.protobuf.ByteString getContextBytes() { * * *
-     * Optional. Text to answer the question.
+     * Required. Text to answer the question.
      * 
* - * optional string context = 3 [(.google.api.field_behavior) = OPTIONAL]; + * optional string context = 3 [(.google.api.field_behavior) = REQUIRED]; * * @param value The context to set. * @return This builder for chaining. @@ -1105,10 +1105,10 @@ public Builder setContext(java.lang.String value) { * * *
-     * Optional. Text to answer the question.
+     * Required. Text to answer the question.
      * 
* - * optional string context = 3 [(.google.api.field_behavior) = OPTIONAL]; + * optional string context = 3 [(.google.api.field_behavior) = REQUIRED]; * * @return This builder for chaining. */ @@ -1122,10 +1122,10 @@ public Builder clearContext() { * * *
-     * Optional. Text to answer the question.
+     * Required. Text to answer the question.
      * 
* - * optional string context = 3 [(.google.api.field_behavior) = OPTIONAL]; + * optional string context = 3 [(.google.api.field_behavior) = REQUIRED]; * * @param value The bytes for context to set. * @return This builder for chaining. diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/QuestionAnsweringQualityInstanceOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/QuestionAnsweringQualityInstanceOrBuilder.java index 791aba0289c0..6a5f783b4a5c 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/QuestionAnsweringQualityInstanceOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/QuestionAnsweringQualityInstanceOrBuilder.java @@ -102,10 +102,10 @@ public interface QuestionAnsweringQualityInstanceOrBuilder * * *
-   * Optional. Text to answer the question.
+   * Required. Text to answer the question.
    * 
* - * optional string context = 3 [(.google.api.field_behavior) = OPTIONAL]; + * optional string context = 3 [(.google.api.field_behavior) = REQUIRED]; * * @return Whether the context field is set. */ @@ -114,10 +114,10 @@ public interface QuestionAnsweringQualityInstanceOrBuilder * * *
-   * Optional. Text to answer the question.
+   * Required. Text to answer the question.
    * 
* - * optional string context = 3 [(.google.api.field_behavior) = OPTIONAL]; + * optional string context = 3 [(.google.api.field_behavior) = REQUIRED]; * * @return The context. */ @@ -126,10 +126,10 @@ public interface QuestionAnsweringQualityInstanceOrBuilder * * *
-   * Optional. Text to answer the question.
+   * Required. Text to answer the question.
    * 
* - * optional string context = 3 [(.google.api.field_behavior) = OPTIONAL]; + * optional string context = 3 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for context. */ diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RagContextRecallInput.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RagContextRecallInput.java deleted file mode 100644 index 238f97eef322..000000000000 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RagContextRecallInput.java +++ /dev/null @@ -1,1049 +0,0 @@ -/* - * Copyright 2024 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/aiplatform/v1beta1/evaluation_service.proto - -// Protobuf Java Version: 3.25.2 -package com.google.cloud.aiplatform.v1beta1; - -/** - * - * - *
- * Input for rag context recall metric.
- * 
- * - * Protobuf type {@code google.cloud.aiplatform.v1beta1.RagContextRecallInput} - */ -public final class RagContextRecallInput extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.RagContextRecallInput) - RagContextRecallInputOrBuilder { - private static final long serialVersionUID = 0L; - // Use RagContextRecallInput.newBuilder() to construct. - private RagContextRecallInput(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private RagContextRecallInput() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new RagContextRecallInput(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.aiplatform.v1beta1.EvaluationServiceProto - .internal_static_google_cloud_aiplatform_v1beta1_RagContextRecallInput_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.aiplatform.v1beta1.EvaluationServiceProto - .internal_static_google_cloud_aiplatform_v1beta1_RagContextRecallInput_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.aiplatform.v1beta1.RagContextRecallInput.class, - com.google.cloud.aiplatform.v1beta1.RagContextRecallInput.Builder.class); - } - - private int bitField0_; - public static final int METRIC_SPEC_FIELD_NUMBER = 1; - private com.google.cloud.aiplatform.v1beta1.RagContextRecallSpec metricSpec_; - /** - * - * - *
-   * Required. Spec for rag context recall metric.
-   * 
- * - * - * .google.cloud.aiplatform.v1beta1.RagContextRecallSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the metricSpec field is set. - */ - @java.lang.Override - public boolean hasMetricSpec() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * - * - *
-   * Required. Spec for rag context recall metric.
-   * 
- * - * - * .google.cloud.aiplatform.v1beta1.RagContextRecallSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The metricSpec. - */ - @java.lang.Override - public com.google.cloud.aiplatform.v1beta1.RagContextRecallSpec getMetricSpec() { - return metricSpec_ == null - ? com.google.cloud.aiplatform.v1beta1.RagContextRecallSpec.getDefaultInstance() - : metricSpec_; - } - /** - * - * - *
-   * Required. Spec for rag context recall metric.
-   * 
- * - * - * .google.cloud.aiplatform.v1beta1.RagContextRecallSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.aiplatform.v1beta1.RagContextRecallSpecOrBuilder - getMetricSpecOrBuilder() { - return metricSpec_ == null - ? com.google.cloud.aiplatform.v1beta1.RagContextRecallSpec.getDefaultInstance() - : metricSpec_; - } - - public static final int INSTANCE_FIELD_NUMBER = 2; - private com.google.cloud.aiplatform.v1beta1.RagContextRecallInstance instance_; - /** - * - * - *
-   * Required. Rag context recall instance.
-   * 
- * - * - * .google.cloud.aiplatform.v1beta1.RagContextRecallInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the instance field is set. - */ - @java.lang.Override - public boolean hasInstance() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * - * - *
-   * Required. Rag context recall instance.
-   * 
- * - * - * .google.cloud.aiplatform.v1beta1.RagContextRecallInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The instance. - */ - @java.lang.Override - public com.google.cloud.aiplatform.v1beta1.RagContextRecallInstance getInstance() { - return instance_ == null - ? com.google.cloud.aiplatform.v1beta1.RagContextRecallInstance.getDefaultInstance() - : instance_; - } - /** - * - * - *
-   * Required. Rag context recall instance.
-   * 
- * - * - * .google.cloud.aiplatform.v1beta1.RagContextRecallInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.aiplatform.v1beta1.RagContextRecallInstanceOrBuilder - getInstanceOrBuilder() { - return instance_ == null - ? com.google.cloud.aiplatform.v1beta1.RagContextRecallInstance.getDefaultInstance() - : instance_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getMetricSpec()); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(2, getInstance()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getMetricSpec()); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getInstance()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.RagContextRecallInput)) { - return super.equals(obj); - } - com.google.cloud.aiplatform.v1beta1.RagContextRecallInput other = - (com.google.cloud.aiplatform.v1beta1.RagContextRecallInput) obj; - - if (hasMetricSpec() != other.hasMetricSpec()) return false; - if (hasMetricSpec()) { - if (!getMetricSpec().equals(other.getMetricSpec())) return false; - } - if (hasInstance() != other.hasInstance()) return false; - if (hasInstance()) { - if (!getInstance().equals(other.getInstance())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasMetricSpec()) { - hash = (37 * hash) + METRIC_SPEC_FIELD_NUMBER; - hash = (53 * hash) + getMetricSpec().hashCode(); - } - if (hasInstance()) { - hash = (37 * hash) + INSTANCE_FIELD_NUMBER; - hash = (53 * hash) + getInstance().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.aiplatform.v1beta1.RagContextRecallInput parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.aiplatform.v1beta1.RagContextRecallInput parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.aiplatform.v1beta1.RagContextRecallInput parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.aiplatform.v1beta1.RagContextRecallInput parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.aiplatform.v1beta1.RagContextRecallInput parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.aiplatform.v1beta1.RagContextRecallInput parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.aiplatform.v1beta1.RagContextRecallInput parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.aiplatform.v1beta1.RagContextRecallInput parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.aiplatform.v1beta1.RagContextRecallInput parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.aiplatform.v1beta1.RagContextRecallInput parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.aiplatform.v1beta1.RagContextRecallInput parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.aiplatform.v1beta1.RagContextRecallInput parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.aiplatform.v1beta1.RagContextRecallInput prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Input for rag context recall metric.
-   * 
- * - * Protobuf type {@code google.cloud.aiplatform.v1beta1.RagContextRecallInput} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.RagContextRecallInput) - com.google.cloud.aiplatform.v1beta1.RagContextRecallInputOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.aiplatform.v1beta1.EvaluationServiceProto - .internal_static_google_cloud_aiplatform_v1beta1_RagContextRecallInput_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.aiplatform.v1beta1.EvaluationServiceProto - .internal_static_google_cloud_aiplatform_v1beta1_RagContextRecallInput_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.aiplatform.v1beta1.RagContextRecallInput.class, - com.google.cloud.aiplatform.v1beta1.RagContextRecallInput.Builder.class); - } - - // Construct using com.google.cloud.aiplatform.v1beta1.RagContextRecallInput.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getMetricSpecFieldBuilder(); - getInstanceFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - metricSpec_ = null; - if (metricSpecBuilder_ != null) { - metricSpecBuilder_.dispose(); - metricSpecBuilder_ = null; - } - instance_ = null; - if (instanceBuilder_ != null) { - instanceBuilder_.dispose(); - instanceBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.aiplatform.v1beta1.EvaluationServiceProto - .internal_static_google_cloud_aiplatform_v1beta1_RagContextRecallInput_descriptor; - } - - @java.lang.Override - public com.google.cloud.aiplatform.v1beta1.RagContextRecallInput getDefaultInstanceForType() { - return com.google.cloud.aiplatform.v1beta1.RagContextRecallInput.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.aiplatform.v1beta1.RagContextRecallInput build() { - com.google.cloud.aiplatform.v1beta1.RagContextRecallInput result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.aiplatform.v1beta1.RagContextRecallInput buildPartial() { - com.google.cloud.aiplatform.v1beta1.RagContextRecallInput result = - new com.google.cloud.aiplatform.v1beta1.RagContextRecallInput(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.aiplatform.v1beta1.RagContextRecallInput result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.metricSpec_ = metricSpecBuilder_ == null ? metricSpec_ : metricSpecBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.instance_ = instanceBuilder_ == null ? instance_ : instanceBuilder_.build(); - to_bitField0_ |= 0x00000002; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.aiplatform.v1beta1.RagContextRecallInput) { - return mergeFrom((com.google.cloud.aiplatform.v1beta1.RagContextRecallInput) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.RagContextRecallInput other) { - if (other == com.google.cloud.aiplatform.v1beta1.RagContextRecallInput.getDefaultInstance()) - return this; - if (other.hasMetricSpec()) { - mergeMetricSpec(other.getMetricSpec()); - } - if (other.hasInstance()) { - mergeInstance(other.getInstance()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - input.readMessage(getMetricSpecFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - input.readMessage(getInstanceFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private com.google.cloud.aiplatform.v1beta1.RagContextRecallSpec metricSpec_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.aiplatform.v1beta1.RagContextRecallSpec, - com.google.cloud.aiplatform.v1beta1.RagContextRecallSpec.Builder, - com.google.cloud.aiplatform.v1beta1.RagContextRecallSpecOrBuilder> - metricSpecBuilder_; - /** - * - * - *
-     * Required. Spec for rag context recall metric.
-     * 
- * - * - * .google.cloud.aiplatform.v1beta1.RagContextRecallSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the metricSpec field is set. - */ - public boolean hasMetricSpec() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * - * - *
-     * Required. Spec for rag context recall metric.
-     * 
- * - * - * .google.cloud.aiplatform.v1beta1.RagContextRecallSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The metricSpec. - */ - public com.google.cloud.aiplatform.v1beta1.RagContextRecallSpec getMetricSpec() { - if (metricSpecBuilder_ == null) { - return metricSpec_ == null - ? com.google.cloud.aiplatform.v1beta1.RagContextRecallSpec.getDefaultInstance() - : metricSpec_; - } else { - return metricSpecBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. Spec for rag context recall metric.
-     * 
- * - * - * .google.cloud.aiplatform.v1beta1.RagContextRecallSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setMetricSpec(com.google.cloud.aiplatform.v1beta1.RagContextRecallSpec value) { - if (metricSpecBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - metricSpec_ = value; - } else { - metricSpecBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Spec for rag context recall metric.
-     * 
- * - * - * .google.cloud.aiplatform.v1beta1.RagContextRecallSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setMetricSpec( - com.google.cloud.aiplatform.v1beta1.RagContextRecallSpec.Builder builderForValue) { - if (metricSpecBuilder_ == null) { - metricSpec_ = builderForValue.build(); - } else { - metricSpecBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Spec for rag context recall metric.
-     * 
- * - * - * .google.cloud.aiplatform.v1beta1.RagContextRecallSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeMetricSpec(com.google.cloud.aiplatform.v1beta1.RagContextRecallSpec value) { - if (metricSpecBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) - && metricSpec_ != null - && metricSpec_ - != com.google.cloud.aiplatform.v1beta1.RagContextRecallSpec.getDefaultInstance()) { - getMetricSpecBuilder().mergeFrom(value); - } else { - metricSpec_ = value; - } - } else { - metricSpecBuilder_.mergeFrom(value); - } - if (metricSpec_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * - * - *
-     * Required. Spec for rag context recall metric.
-     * 
- * - * - * .google.cloud.aiplatform.v1beta1.RagContextRecallSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearMetricSpec() { - bitField0_ = (bitField0_ & ~0x00000001); - metricSpec_ = null; - if (metricSpecBuilder_ != null) { - metricSpecBuilder_.dispose(); - metricSpecBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Spec for rag context recall metric.
-     * 
- * - * - * .google.cloud.aiplatform.v1beta1.RagContextRecallSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.aiplatform.v1beta1.RagContextRecallSpec.Builder getMetricSpecBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getMetricSpecFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. Spec for rag context recall metric.
-     * 
- * - * - * .google.cloud.aiplatform.v1beta1.RagContextRecallSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.aiplatform.v1beta1.RagContextRecallSpecOrBuilder - getMetricSpecOrBuilder() { - if (metricSpecBuilder_ != null) { - return metricSpecBuilder_.getMessageOrBuilder(); - } else { - return metricSpec_ == null - ? com.google.cloud.aiplatform.v1beta1.RagContextRecallSpec.getDefaultInstance() - : metricSpec_; - } - } - /** - * - * - *
-     * Required. Spec for rag context recall metric.
-     * 
- * - * - * .google.cloud.aiplatform.v1beta1.RagContextRecallSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.aiplatform.v1beta1.RagContextRecallSpec, - com.google.cloud.aiplatform.v1beta1.RagContextRecallSpec.Builder, - com.google.cloud.aiplatform.v1beta1.RagContextRecallSpecOrBuilder> - getMetricSpecFieldBuilder() { - if (metricSpecBuilder_ == null) { - metricSpecBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.aiplatform.v1beta1.RagContextRecallSpec, - com.google.cloud.aiplatform.v1beta1.RagContextRecallSpec.Builder, - com.google.cloud.aiplatform.v1beta1.RagContextRecallSpecOrBuilder>( - getMetricSpec(), getParentForChildren(), isClean()); - metricSpec_ = null; - } - return metricSpecBuilder_; - } - - private com.google.cloud.aiplatform.v1beta1.RagContextRecallInstance instance_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.aiplatform.v1beta1.RagContextRecallInstance, - com.google.cloud.aiplatform.v1beta1.RagContextRecallInstance.Builder, - com.google.cloud.aiplatform.v1beta1.RagContextRecallInstanceOrBuilder> - instanceBuilder_; - /** - * - * - *
-     * Required. Rag context recall instance.
-     * 
- * - * - * .google.cloud.aiplatform.v1beta1.RagContextRecallInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the instance field is set. - */ - public boolean hasInstance() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * - * - *
-     * Required. Rag context recall instance.
-     * 
- * - * - * .google.cloud.aiplatform.v1beta1.RagContextRecallInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The instance. - */ - public com.google.cloud.aiplatform.v1beta1.RagContextRecallInstance getInstance() { - if (instanceBuilder_ == null) { - return instance_ == null - ? com.google.cloud.aiplatform.v1beta1.RagContextRecallInstance.getDefaultInstance() - : instance_; - } else { - return instanceBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. Rag context recall instance.
-     * 
- * - * - * .google.cloud.aiplatform.v1beta1.RagContextRecallInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setInstance(com.google.cloud.aiplatform.v1beta1.RagContextRecallInstance value) { - if (instanceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - instance_ = value; - } else { - instanceBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Rag context recall instance.
-     * 
- * - * - * .google.cloud.aiplatform.v1beta1.RagContextRecallInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setInstance( - com.google.cloud.aiplatform.v1beta1.RagContextRecallInstance.Builder builderForValue) { - if (instanceBuilder_ == null) { - instance_ = builderForValue.build(); - } else { - instanceBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Rag context recall instance.
-     * 
- * - * - * .google.cloud.aiplatform.v1beta1.RagContextRecallInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeInstance( - com.google.cloud.aiplatform.v1beta1.RagContextRecallInstance value) { - if (instanceBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && instance_ != null - && instance_ - != com.google.cloud.aiplatform.v1beta1.RagContextRecallInstance - .getDefaultInstance()) { - getInstanceBuilder().mergeFrom(value); - } else { - instance_ = value; - } - } else { - instanceBuilder_.mergeFrom(value); - } - if (instance_ != null) { - bitField0_ |= 0x00000002; - onChanged(); - } - return this; - } - /** - * - * - *
-     * Required. Rag context recall instance.
-     * 
- * - * - * .google.cloud.aiplatform.v1beta1.RagContextRecallInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearInstance() { - bitField0_ = (bitField0_ & ~0x00000002); - instance_ = null; - if (instanceBuilder_ != null) { - instanceBuilder_.dispose(); - instanceBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Rag context recall instance.
-     * 
- * - * - * .google.cloud.aiplatform.v1beta1.RagContextRecallInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.aiplatform.v1beta1.RagContextRecallInstance.Builder - getInstanceBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getInstanceFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. Rag context recall instance.
-     * 
- * - * - * .google.cloud.aiplatform.v1beta1.RagContextRecallInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.aiplatform.v1beta1.RagContextRecallInstanceOrBuilder - getInstanceOrBuilder() { - if (instanceBuilder_ != null) { - return instanceBuilder_.getMessageOrBuilder(); - } else { - return instance_ == null - ? com.google.cloud.aiplatform.v1beta1.RagContextRecallInstance.getDefaultInstance() - : instance_; - } - } - /** - * - * - *
-     * Required. Rag context recall instance.
-     * 
- * - * - * .google.cloud.aiplatform.v1beta1.RagContextRecallInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.aiplatform.v1beta1.RagContextRecallInstance, - com.google.cloud.aiplatform.v1beta1.RagContextRecallInstance.Builder, - com.google.cloud.aiplatform.v1beta1.RagContextRecallInstanceOrBuilder> - getInstanceFieldBuilder() { - if (instanceBuilder_ == null) { - instanceBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.aiplatform.v1beta1.RagContextRecallInstance, - com.google.cloud.aiplatform.v1beta1.RagContextRecallInstance.Builder, - com.google.cloud.aiplatform.v1beta1.RagContextRecallInstanceOrBuilder>( - getInstance(), getParentForChildren(), isClean()); - instance_ = null; - } - return instanceBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.RagContextRecallInput) - } - - // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.RagContextRecallInput) - private static final com.google.cloud.aiplatform.v1beta1.RagContextRecallInput DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.RagContextRecallInput(); - } - - public static com.google.cloud.aiplatform.v1beta1.RagContextRecallInput getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RagContextRecallInput parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.aiplatform.v1beta1.RagContextRecallInput getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RagContextRecallInputOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RagContextRecallInputOrBuilder.java deleted file mode 100644 index 4ff6db9942c8..000000000000 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RagContextRecallInputOrBuilder.java +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Copyright 2024 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/aiplatform/v1beta1/evaluation_service.proto - -// Protobuf Java Version: 3.25.2 -package com.google.cloud.aiplatform.v1beta1; - -public interface RagContextRecallInputOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.RagContextRecallInput) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. Spec for rag context recall metric.
-   * 
- * - * - * .google.cloud.aiplatform.v1beta1.RagContextRecallSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the metricSpec field is set. - */ - boolean hasMetricSpec(); - /** - * - * - *
-   * Required. Spec for rag context recall metric.
-   * 
- * - * - * .google.cloud.aiplatform.v1beta1.RagContextRecallSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The metricSpec. - */ - com.google.cloud.aiplatform.v1beta1.RagContextRecallSpec getMetricSpec(); - /** - * - * - *
-   * Required. Spec for rag context recall metric.
-   * 
- * - * - * .google.cloud.aiplatform.v1beta1.RagContextRecallSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.aiplatform.v1beta1.RagContextRecallSpecOrBuilder getMetricSpecOrBuilder(); - - /** - * - * - *
-   * Required. Rag context recall instance.
-   * 
- * - * - * .google.cloud.aiplatform.v1beta1.RagContextRecallInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the instance field is set. - */ - boolean hasInstance(); - /** - * - * - *
-   * Required. Rag context recall instance.
-   * 
- * - * - * .google.cloud.aiplatform.v1beta1.RagContextRecallInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The instance. - */ - com.google.cloud.aiplatform.v1beta1.RagContextRecallInstance getInstance(); - /** - * - * - *
-   * Required. Rag context recall instance.
-   * 
- * - * - * .google.cloud.aiplatform.v1beta1.RagContextRecallInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.aiplatform.v1beta1.RagContextRecallInstanceOrBuilder getInstanceOrBuilder(); -} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RagContextRecallInstanceOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RagContextRecallInstanceOrBuilder.java deleted file mode 100644 index 4ac15b248c55..000000000000 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RagContextRecallInstanceOrBuilder.java +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright 2024 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/aiplatform/v1beta1/evaluation_service.proto - -// Protobuf Java Version: 3.25.2 -package com.google.cloud.aiplatform.v1beta1; - -public interface RagContextRecallInstanceOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.RagContextRecallInstance) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. Ground truth used to compare against the context.
-   * 
- * - * optional string reference = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return Whether the reference field is set. - */ - boolean hasReference(); - /** - * - * - *
-   * Required. Ground truth used to compare against the context.
-   * 
- * - * optional string reference = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The reference. - */ - java.lang.String getReference(); - /** - * - * - *
-   * Required. Ground truth used to compare against the context.
-   * 
- * - * optional string reference = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for reference. - */ - com.google.protobuf.ByteString getReferenceBytes(); - - /** - * - * - *
-   * Required. Retrieved facts from RAG pipeline as context to be evaluated.
-   * 
- * - * optional string context = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return Whether the context field is set. - */ - boolean hasContext(); - /** - * - * - *
-   * Required. Retrieved facts from RAG pipeline as context to be evaluated.
-   * 
- * - * optional string context = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The context. - */ - java.lang.String getContext(); - /** - * - * - *
-   * Required. Retrieved facts from RAG pipeline as context to be evaluated.
-   * 
- * - * optional string context = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for context. - */ - com.google.protobuf.ByteString getContextBytes(); -} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RagContextRecallResultOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RagContextRecallResultOrBuilder.java deleted file mode 100644 index 4019d57011d3..000000000000 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RagContextRecallResultOrBuilder.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright 2024 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/aiplatform/v1beta1/evaluation_service.proto - -// Protobuf Java Version: 3.25.2 -package com.google.cloud.aiplatform.v1beta1; - -public interface RagContextRecallResultOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.RagContextRecallResult) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. RagContextRecall score.
-   * 
- * - * optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return Whether the score field is set. - */ - boolean hasScore(); - /** - * - * - *
-   * Output only. RagContextRecall score.
-   * 
- * - * optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The score. - */ - float getScore(); - - /** - * - * - *
-   * Output only. Explanation for rag context recall score.
-   * 
- * - * string explanation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The explanation. - */ - java.lang.String getExplanation(); - /** - * - * - *
-   * Output only. Explanation for rag context recall score.
-   * 
- * - * string explanation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for explanation. - */ - com.google.protobuf.ByteString getExplanationBytes(); - - /** - * - * - *
-   * Output only. Confidence for rag context recall score.
-   * 
- * - * optional float confidence = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return Whether the confidence field is set. - */ - boolean hasConfidence(); - /** - * - * - *
-   * Output only. Confidence for rag context recall score.
-   * 
- * - * optional float confidence = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The confidence. - */ - float getConfidence(); -} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RagContexts.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RagContexts.java new file mode 100644 index 000000000000..89c89ff2fbf4 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RagContexts.java @@ -0,0 +1,1929 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/vertex_rag_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Relevant contexts for one query.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.RagContexts} + */ +public final class RagContexts extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.RagContexts) + RagContextsOrBuilder { + private static final long serialVersionUID = 0L; + // Use RagContexts.newBuilder() to construct. + private RagContexts(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RagContexts() { + contexts_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RagContexts(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.VertexRagServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_RagContexts_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.VertexRagServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_RagContexts_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.RagContexts.class, + com.google.cloud.aiplatform.v1beta1.RagContexts.Builder.class); + } + + public interface ContextOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.RagContexts.Context) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * For vertex RagStore, if the file is imported from Cloud Storage or Google
+     * Drive, source_uri will be original file URI in Cloud Storage or Google
+     * Drive; if file is uploaded, source_uri will be file display name.
+     * 
+ * + * string source_uri = 1; + * + * @return The sourceUri. + */ + java.lang.String getSourceUri(); + /** + * + * + *
+     * For vertex RagStore, if the file is imported from Cloud Storage or Google
+     * Drive, source_uri will be original file URI in Cloud Storage or Google
+     * Drive; if file is uploaded, source_uri will be file display name.
+     * 
+ * + * string source_uri = 1; + * + * @return The bytes for sourceUri. + */ + com.google.protobuf.ByteString getSourceUriBytes(); + + /** + * + * + *
+     * The text chunk.
+     * 
+ * + * string text = 2; + * + * @return The text. + */ + java.lang.String getText(); + /** + * + * + *
+     * The text chunk.
+     * 
+ * + * string text = 2; + * + * @return The bytes for text. + */ + com.google.protobuf.ByteString getTextBytes(); + + /** + * + * + *
+     * The distance between the query vector and the context text vector.
+     * 
+ * + * double distance = 3; + * + * @return The distance. + */ + double getDistance(); + } + /** + * + * + *
+   * A context of the query.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.RagContexts.Context} + */ + public static final class Context extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.RagContexts.Context) + ContextOrBuilder { + private static final long serialVersionUID = 0L; + // Use Context.newBuilder() to construct. + private Context(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Context() { + sourceUri_ = ""; + text_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Context(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.VertexRagServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_RagContexts_Context_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.VertexRagServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_RagContexts_Context_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.RagContexts.Context.class, + com.google.cloud.aiplatform.v1beta1.RagContexts.Context.Builder.class); + } + + public static final int SOURCE_URI_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object sourceUri_ = ""; + /** + * + * + *
+     * For vertex RagStore, if the file is imported from Cloud Storage or Google
+     * Drive, source_uri will be original file URI in Cloud Storage or Google
+     * Drive; if file is uploaded, source_uri will be file display name.
+     * 
+ * + * string source_uri = 1; + * + * @return The sourceUri. + */ + @java.lang.Override + public java.lang.String getSourceUri() { + java.lang.Object ref = sourceUri_; + 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(); + sourceUri_ = s; + return s; + } + } + /** + * + * + *
+     * For vertex RagStore, if the file is imported from Cloud Storage or Google
+     * Drive, source_uri will be original file URI in Cloud Storage or Google
+     * Drive; if file is uploaded, source_uri will be file display name.
+     * 
+ * + * string source_uri = 1; + * + * @return The bytes for sourceUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSourceUriBytes() { + java.lang.Object ref = sourceUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TEXT_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object text_ = ""; + /** + * + * + *
+     * The text chunk.
+     * 
+ * + * string text = 2; + * + * @return The text. + */ + @java.lang.Override + public java.lang.String getText() { + java.lang.Object ref = text_; + 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(); + text_ = s; + return s; + } + } + /** + * + * + *
+     * The text chunk.
+     * 
+ * + * string text = 2; + * + * @return The bytes for text. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTextBytes() { + java.lang.Object ref = text_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + text_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISTANCE_FIELD_NUMBER = 3; + private double distance_ = 0D; + /** + * + * + *
+     * The distance between the query vector and the context text vector.
+     * 
+ * + * double distance = 3; + * + * @return The distance. + */ + @java.lang.Override + public double getDistance() { + return distance_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, sourceUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, text_); + } + if (java.lang.Double.doubleToRawLongBits(distance_) != 0) { + output.writeDouble(3, distance_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, sourceUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, text_); + } + if (java.lang.Double.doubleToRawLongBits(distance_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(3, distance_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.RagContexts.Context)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.RagContexts.Context other = + (com.google.cloud.aiplatform.v1beta1.RagContexts.Context) obj; + + if (!getSourceUri().equals(other.getSourceUri())) return false; + if (!getText().equals(other.getText())) return false; + if (java.lang.Double.doubleToLongBits(getDistance()) + != java.lang.Double.doubleToLongBits(other.getDistance())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SOURCE_URI_FIELD_NUMBER; + hash = (53 * hash) + getSourceUri().hashCode(); + hash = (37 * hash) + TEXT_FIELD_NUMBER; + hash = (53 * hash) + getText().hashCode(); + hash = (37 * hash) + DISTANCE_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getDistance())); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.RagContexts.Context parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.RagContexts.Context parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.RagContexts.Context parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.RagContexts.Context parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.RagContexts.Context parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.RagContexts.Context parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.RagContexts.Context parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.RagContexts.Context parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.RagContexts.Context parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.RagContexts.Context parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.RagContexts.Context parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.RagContexts.Context parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.RagContexts.Context prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * A context of the query.
+     * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.RagContexts.Context} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.RagContexts.Context) + com.google.cloud.aiplatform.v1beta1.RagContexts.ContextOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.VertexRagServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_RagContexts_Context_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.VertexRagServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_RagContexts_Context_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.RagContexts.Context.class, + com.google.cloud.aiplatform.v1beta1.RagContexts.Context.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.RagContexts.Context.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + sourceUri_ = ""; + text_ = ""; + distance_ = 0D; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.VertexRagServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_RagContexts_Context_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.RagContexts.Context getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.RagContexts.Context.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.RagContexts.Context build() { + com.google.cloud.aiplatform.v1beta1.RagContexts.Context result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.RagContexts.Context buildPartial() { + com.google.cloud.aiplatform.v1beta1.RagContexts.Context result = + new com.google.cloud.aiplatform.v1beta1.RagContexts.Context(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1beta1.RagContexts.Context result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.sourceUri_ = sourceUri_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.text_ = text_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.distance_ = distance_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1beta1.RagContexts.Context) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.RagContexts.Context) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.RagContexts.Context other) { + if (other == com.google.cloud.aiplatform.v1beta1.RagContexts.Context.getDefaultInstance()) + return this; + if (!other.getSourceUri().isEmpty()) { + sourceUri_ = other.sourceUri_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getText().isEmpty()) { + text_ = other.text_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getDistance() != 0D) { + setDistance(other.getDistance()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + sourceUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + text_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 25: + { + distance_ = input.readDouble(); + bitField0_ |= 0x00000004; + break; + } // case 25 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object sourceUri_ = ""; + /** + * + * + *
+       * For vertex RagStore, if the file is imported from Cloud Storage or Google
+       * Drive, source_uri will be original file URI in Cloud Storage or Google
+       * Drive; if file is uploaded, source_uri will be file display name.
+       * 
+ * + * string source_uri = 1; + * + * @return The sourceUri. + */ + public java.lang.String getSourceUri() { + java.lang.Object ref = sourceUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * For vertex RagStore, if the file is imported from Cloud Storage or Google
+       * Drive, source_uri will be original file URI in Cloud Storage or Google
+       * Drive; if file is uploaded, source_uri will be file display name.
+       * 
+ * + * string source_uri = 1; + * + * @return The bytes for sourceUri. + */ + public com.google.protobuf.ByteString getSourceUriBytes() { + java.lang.Object ref = sourceUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * For vertex RagStore, if the file is imported from Cloud Storage or Google
+       * Drive, source_uri will be original file URI in Cloud Storage or Google
+       * Drive; if file is uploaded, source_uri will be file display name.
+       * 
+ * + * string source_uri = 1; + * + * @param value The sourceUri to set. + * @return This builder for chaining. + */ + public Builder setSourceUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + sourceUri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * For vertex RagStore, if the file is imported from Cloud Storage or Google
+       * Drive, source_uri will be original file URI in Cloud Storage or Google
+       * Drive; if file is uploaded, source_uri will be file display name.
+       * 
+ * + * string source_uri = 1; + * + * @return This builder for chaining. + */ + public Builder clearSourceUri() { + sourceUri_ = getDefaultInstance().getSourceUri(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * For vertex RagStore, if the file is imported from Cloud Storage or Google
+       * Drive, source_uri will be original file URI in Cloud Storage or Google
+       * Drive; if file is uploaded, source_uri will be file display name.
+       * 
+ * + * string source_uri = 1; + * + * @param value The bytes for sourceUri to set. + * @return This builder for chaining. + */ + public Builder setSourceUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + sourceUri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object text_ = ""; + /** + * + * + *
+       * The text chunk.
+       * 
+ * + * string text = 2; + * + * @return The text. + */ + public java.lang.String getText() { + java.lang.Object ref = text_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + text_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The text chunk.
+       * 
+ * + * string text = 2; + * + * @return The bytes for text. + */ + public com.google.protobuf.ByteString getTextBytes() { + java.lang.Object ref = text_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + text_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The text chunk.
+       * 
+ * + * string text = 2; + * + * @param value The text to set. + * @return This builder for chaining. + */ + public Builder setText(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + text_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * The text chunk.
+       * 
+ * + * string text = 2; + * + * @return This builder for chaining. + */ + public Builder clearText() { + text_ = getDefaultInstance().getText(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * The text chunk.
+       * 
+ * + * string text = 2; + * + * @param value The bytes for text to set. + * @return This builder for chaining. + */ + public Builder setTextBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + text_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private double distance_; + /** + * + * + *
+       * The distance between the query vector and the context text vector.
+       * 
+ * + * double distance = 3; + * + * @return The distance. + */ + @java.lang.Override + public double getDistance() { + return distance_; + } + /** + * + * + *
+       * The distance between the query vector and the context text vector.
+       * 
+ * + * double distance = 3; + * + * @param value The distance to set. + * @return This builder for chaining. + */ + public Builder setDistance(double value) { + + distance_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * The distance between the query vector and the context text vector.
+       * 
+ * + * double distance = 3; + * + * @return This builder for chaining. + */ + public Builder clearDistance() { + bitField0_ = (bitField0_ & ~0x00000004); + distance_ = 0D; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.RagContexts.Context) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.RagContexts.Context) + private static final com.google.cloud.aiplatform.v1beta1.RagContexts.Context DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.RagContexts.Context(); + } + + public static com.google.cloud.aiplatform.v1beta1.RagContexts.Context getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Context parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.RagContexts.Context getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int CONTEXTS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List contexts_; + /** + * + * + *
+   * All its contexts.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagContexts.Context contexts = 1; + */ + @java.lang.Override + public java.util.List getContextsList() { + return contexts_; + } + /** + * + * + *
+   * All its contexts.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagContexts.Context contexts = 1; + */ + @java.lang.Override + public java.util.List + getContextsOrBuilderList() { + return contexts_; + } + /** + * + * + *
+   * All its contexts.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagContexts.Context contexts = 1; + */ + @java.lang.Override + public int getContextsCount() { + return contexts_.size(); + } + /** + * + * + *
+   * All its contexts.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagContexts.Context contexts = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.RagContexts.Context getContexts(int index) { + return contexts_.get(index); + } + /** + * + * + *
+   * All its contexts.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagContexts.Context contexts = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.RagContexts.ContextOrBuilder getContextsOrBuilder( + int index) { + return contexts_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < contexts_.size(); i++) { + output.writeMessage(1, contexts_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < contexts_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, contexts_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.RagContexts)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.RagContexts other = + (com.google.cloud.aiplatform.v1beta1.RagContexts) obj; + + if (!getContextsList().equals(other.getContextsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getContextsCount() > 0) { + hash = (37 * hash) + CONTEXTS_FIELD_NUMBER; + hash = (53 * hash) + getContextsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.RagContexts parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.RagContexts parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.RagContexts parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.RagContexts parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.RagContexts parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.RagContexts parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.RagContexts parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.RagContexts parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.RagContexts parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.RagContexts parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.RagContexts parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.RagContexts parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.aiplatform.v1beta1.RagContexts prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Relevant contexts for one query.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.RagContexts} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.RagContexts) + com.google.cloud.aiplatform.v1beta1.RagContextsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.VertexRagServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_RagContexts_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.VertexRagServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_RagContexts_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.RagContexts.class, + com.google.cloud.aiplatform.v1beta1.RagContexts.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.RagContexts.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (contextsBuilder_ == null) { + contexts_ = java.util.Collections.emptyList(); + } else { + contexts_ = null; + contextsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.VertexRagServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_RagContexts_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.RagContexts getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.RagContexts.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.RagContexts build() { + com.google.cloud.aiplatform.v1beta1.RagContexts result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.RagContexts buildPartial() { + com.google.cloud.aiplatform.v1beta1.RagContexts result = + new com.google.cloud.aiplatform.v1beta1.RagContexts(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.aiplatform.v1beta1.RagContexts result) { + if (contextsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + contexts_ = java.util.Collections.unmodifiableList(contexts_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.contexts_ = contexts_; + } else { + result.contexts_ = contextsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.aiplatform.v1beta1.RagContexts result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1beta1.RagContexts) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.RagContexts) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.RagContexts other) { + if (other == com.google.cloud.aiplatform.v1beta1.RagContexts.getDefaultInstance()) + return this; + if (contextsBuilder_ == null) { + if (!other.contexts_.isEmpty()) { + if (contexts_.isEmpty()) { + contexts_ = other.contexts_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureContextsIsMutable(); + contexts_.addAll(other.contexts_); + } + onChanged(); + } + } else { + if (!other.contexts_.isEmpty()) { + if (contextsBuilder_.isEmpty()) { + contextsBuilder_.dispose(); + contextsBuilder_ = null; + contexts_ = other.contexts_; + bitField0_ = (bitField0_ & ~0x00000001); + contextsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getContextsFieldBuilder() + : null; + } else { + contextsBuilder_.addAllMessages(other.contexts_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.aiplatform.v1beta1.RagContexts.Context m = + input.readMessage( + com.google.cloud.aiplatform.v1beta1.RagContexts.Context.parser(), + extensionRegistry); + if (contextsBuilder_ == null) { + ensureContextsIsMutable(); + contexts_.add(m); + } else { + contextsBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List contexts_ = + java.util.Collections.emptyList(); + + private void ensureContextsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + contexts_ = + new java.util.ArrayList( + contexts_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.RagContexts.Context, + com.google.cloud.aiplatform.v1beta1.RagContexts.Context.Builder, + com.google.cloud.aiplatform.v1beta1.RagContexts.ContextOrBuilder> + contextsBuilder_; + + /** + * + * + *
+     * All its contexts.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagContexts.Context contexts = 1; + */ + public java.util.List + getContextsList() { + if (contextsBuilder_ == null) { + return java.util.Collections.unmodifiableList(contexts_); + } else { + return contextsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * All its contexts.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagContexts.Context contexts = 1; + */ + public int getContextsCount() { + if (contextsBuilder_ == null) { + return contexts_.size(); + } else { + return contextsBuilder_.getCount(); + } + } + /** + * + * + *
+     * All its contexts.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagContexts.Context contexts = 1; + */ + public com.google.cloud.aiplatform.v1beta1.RagContexts.Context getContexts(int index) { + if (contextsBuilder_ == null) { + return contexts_.get(index); + } else { + return contextsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * All its contexts.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagContexts.Context contexts = 1; + */ + public Builder setContexts( + int index, com.google.cloud.aiplatform.v1beta1.RagContexts.Context value) { + if (contextsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureContextsIsMutable(); + contexts_.set(index, value); + onChanged(); + } else { + contextsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * All its contexts.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagContexts.Context contexts = 1; + */ + public Builder setContexts( + int index, + com.google.cloud.aiplatform.v1beta1.RagContexts.Context.Builder builderForValue) { + if (contextsBuilder_ == null) { + ensureContextsIsMutable(); + contexts_.set(index, builderForValue.build()); + onChanged(); + } else { + contextsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * All its contexts.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagContexts.Context contexts = 1; + */ + public Builder addContexts(com.google.cloud.aiplatform.v1beta1.RagContexts.Context value) { + if (contextsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureContextsIsMutable(); + contexts_.add(value); + onChanged(); + } else { + contextsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * All its contexts.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagContexts.Context contexts = 1; + */ + public Builder addContexts( + int index, com.google.cloud.aiplatform.v1beta1.RagContexts.Context value) { + if (contextsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureContextsIsMutable(); + contexts_.add(index, value); + onChanged(); + } else { + contextsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * All its contexts.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagContexts.Context contexts = 1; + */ + public Builder addContexts( + com.google.cloud.aiplatform.v1beta1.RagContexts.Context.Builder builderForValue) { + if (contextsBuilder_ == null) { + ensureContextsIsMutable(); + contexts_.add(builderForValue.build()); + onChanged(); + } else { + contextsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * All its contexts.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagContexts.Context contexts = 1; + */ + public Builder addContexts( + int index, + com.google.cloud.aiplatform.v1beta1.RagContexts.Context.Builder builderForValue) { + if (contextsBuilder_ == null) { + ensureContextsIsMutable(); + contexts_.add(index, builderForValue.build()); + onChanged(); + } else { + contextsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * All its contexts.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagContexts.Context contexts = 1; + */ + public Builder addAllContexts( + java.lang.Iterable + values) { + if (contextsBuilder_ == null) { + ensureContextsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, contexts_); + onChanged(); + } else { + contextsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * All its contexts.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagContexts.Context contexts = 1; + */ + public Builder clearContexts() { + if (contextsBuilder_ == null) { + contexts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + contextsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * All its contexts.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagContexts.Context contexts = 1; + */ + public Builder removeContexts(int index) { + if (contextsBuilder_ == null) { + ensureContextsIsMutable(); + contexts_.remove(index); + onChanged(); + } else { + contextsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * All its contexts.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagContexts.Context contexts = 1; + */ + public com.google.cloud.aiplatform.v1beta1.RagContexts.Context.Builder getContextsBuilder( + int index) { + return getContextsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * All its contexts.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagContexts.Context contexts = 1; + */ + public com.google.cloud.aiplatform.v1beta1.RagContexts.ContextOrBuilder getContextsOrBuilder( + int index) { + if (contextsBuilder_ == null) { + return contexts_.get(index); + } else { + return contextsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * All its contexts.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagContexts.Context contexts = 1; + */ + public java.util.List< + ? extends com.google.cloud.aiplatform.v1beta1.RagContexts.ContextOrBuilder> + getContextsOrBuilderList() { + if (contextsBuilder_ != null) { + return contextsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(contexts_); + } + } + /** + * + * + *
+     * All its contexts.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagContexts.Context contexts = 1; + */ + public com.google.cloud.aiplatform.v1beta1.RagContexts.Context.Builder addContextsBuilder() { + return getContextsFieldBuilder() + .addBuilder(com.google.cloud.aiplatform.v1beta1.RagContexts.Context.getDefaultInstance()); + } + /** + * + * + *
+     * All its contexts.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagContexts.Context contexts = 1; + */ + public com.google.cloud.aiplatform.v1beta1.RagContexts.Context.Builder addContextsBuilder( + int index) { + return getContextsFieldBuilder() + .addBuilder( + index, com.google.cloud.aiplatform.v1beta1.RagContexts.Context.getDefaultInstance()); + } + /** + * + * + *
+     * All its contexts.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagContexts.Context contexts = 1; + */ + public java.util.List + getContextsBuilderList() { + return getContextsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.RagContexts.Context, + com.google.cloud.aiplatform.v1beta1.RagContexts.Context.Builder, + com.google.cloud.aiplatform.v1beta1.RagContexts.ContextOrBuilder> + getContextsFieldBuilder() { + if (contextsBuilder_ == null) { + contextsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.RagContexts.Context, + com.google.cloud.aiplatform.v1beta1.RagContexts.Context.Builder, + com.google.cloud.aiplatform.v1beta1.RagContexts.ContextOrBuilder>( + contexts_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + contexts_ = null; + } + return contextsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.RagContexts) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.RagContexts) + private static final com.google.cloud.aiplatform.v1beta1.RagContexts DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.RagContexts(); + } + + public static com.google.cloud.aiplatform.v1beta1.RagContexts getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RagContexts parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.RagContexts getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RagContextsOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RagContextsOrBuilder.java new file mode 100644 index 000000000000..9bd3816d5332 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RagContextsOrBuilder.java @@ -0,0 +1,78 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/vertex_rag_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +public interface RagContextsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.RagContexts) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * All its contexts.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagContexts.Context contexts = 1; + */ + java.util.List getContextsList(); + /** + * + * + *
+   * All its contexts.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagContexts.Context contexts = 1; + */ + com.google.cloud.aiplatform.v1beta1.RagContexts.Context getContexts(int index); + /** + * + * + *
+   * All its contexts.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagContexts.Context contexts = 1; + */ + int getContextsCount(); + /** + * + * + *
+   * All its contexts.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagContexts.Context contexts = 1; + */ + java.util.List + getContextsOrBuilderList(); + /** + * + * + *
+   * All its contexts.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.RagContexts.Context contexts = 1; + */ + com.google.cloud.aiplatform.v1beta1.RagContexts.ContextOrBuilder getContextsOrBuilder(int index); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RagCorpus.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RagCorpus.java new file mode 100644 index 000000000000..6043b0fb8330 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RagCorpus.java @@ -0,0 +1,1585 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/vertex_rag_data.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * A RagCorpus is a RagFile container and a project can have multiple
+ * RagCorpora.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.RagCorpus} + */ +public final class RagCorpus extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.RagCorpus) + RagCorpusOrBuilder { + private static final long serialVersionUID = 0L; + // Use RagCorpus.newBuilder() to construct. + private RagCorpus(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RagCorpus() { + name_ = ""; + displayName_ = ""; + description_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RagCorpus(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataProto + .internal_static_google_cloud_aiplatform_v1beta1_RagCorpus_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataProto + .internal_static_google_cloud_aiplatform_v1beta1_RagCorpus_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.RagCorpus.class, + com.google.cloud.aiplatform.v1beta1.RagCorpus.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Output only. The resource name of the RagCorpus.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The resource name of the RagCorpus.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + /** + * + * + *
+   * Required. The display name of the RagCorpus.
+   * The name can be up to 128 characters long and can consist of any UTF-8
+   * characters.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + 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(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The display name of the RagCorpus.
+   * The name can be up to 128 characters long and can consist of any UTF-8
+   * characters.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + * + * + *
+   * Optional. The description of the RagCorpus.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + 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(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The description of the RagCorpus.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. Timestamp when this RagCorpus was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Output only. Timestamp when this RagCorpus was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. Timestamp when this RagCorpus was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. Timestamp when this RagCorpus was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Output only. Timestamp when this RagCorpus was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. Timestamp when this RagCorpus was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(4, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(5, getUpdateTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getUpdateTime()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.RagCorpus)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.RagCorpus other = + (com.google.cloud.aiplatform.v1beta1.RagCorpus) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.RagCorpus parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.RagCorpus parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.RagCorpus parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.RagCorpus parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.RagCorpus parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.RagCorpus parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.RagCorpus parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.RagCorpus parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.RagCorpus parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.RagCorpus parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.RagCorpus parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.RagCorpus parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.aiplatform.v1beta1.RagCorpus prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A RagCorpus is a RagFile container and a project can have multiple
+   * RagCorpora.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.RagCorpus} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.RagCorpus) + com.google.cloud.aiplatform.v1beta1.RagCorpusOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataProto + .internal_static_google_cloud_aiplatform_v1beta1_RagCorpus_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataProto + .internal_static_google_cloud_aiplatform_v1beta1_RagCorpus_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.RagCorpus.class, + com.google.cloud.aiplatform.v1beta1.RagCorpus.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.RagCorpus.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getCreateTimeFieldBuilder(); + getUpdateTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + displayName_ = ""; + description_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataProto + .internal_static_google_cloud_aiplatform_v1beta1_RagCorpus_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.RagCorpus getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.RagCorpus.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.RagCorpus build() { + com.google.cloud.aiplatform.v1beta1.RagCorpus result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.RagCorpus buildPartial() { + com.google.cloud.aiplatform.v1beta1.RagCorpus result = + new com.google.cloud.aiplatform.v1beta1.RagCorpus(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1beta1.RagCorpus result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.description_ = description_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1beta1.RagCorpus) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.RagCorpus) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.RagCorpus other) { + if (other == com.google.cloud.aiplatform.v1beta1.RagCorpus.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. The resource name of the RagCorpus.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The resource name of the RagCorpus.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The resource name of the RagCorpus.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The resource name of the RagCorpus.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The resource name of the RagCorpus.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Required. The display name of the RagCorpus.
+     * The name can be up to 128 characters long and can consist of any UTF-8
+     * characters.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The display name of the RagCorpus.
+     * The name can be up to 128 characters long and can consist of any UTF-8
+     * characters.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The display name of the RagCorpus.
+     * The name can be up to 128 characters long and can consist of any UTF-8
+     * characters.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The display name of the RagCorpus.
+     * The name can be up to 128 characters long and can consist of any UTF-8
+     * characters.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The display name of the RagCorpus.
+     * The name can be up to 128 characters long and can consist of any UTF-8
+     * characters.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * Optional. The description of the RagCorpus.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The description of the RagCorpus.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The description of the RagCorpus.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The description of the RagCorpus.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The description of the RagCorpus.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. Timestamp when this RagCorpus was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Output only. Timestamp when this RagCorpus was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Timestamp when this RagCorpus was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this RagCorpus was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this RagCorpus was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this RagCorpus was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000008); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this RagCorpus was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Timestamp when this RagCorpus was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. Timestamp when this RagCorpus was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. Timestamp when this RagCorpus was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * Output only. Timestamp when this RagCorpus was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Timestamp when this RagCorpus was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this RagCorpus was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this RagCorpus was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this RagCorpus was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000010); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this RagCorpus was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Timestamp when this RagCorpus was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. Timestamp when this RagCorpus was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.RagCorpus) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.RagCorpus) + private static final com.google.cloud.aiplatform.v1beta1.RagCorpus DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.RagCorpus(); + } + + public static com.google.cloud.aiplatform.v1beta1.RagCorpus getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RagCorpus parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.RagCorpus getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RagCorpusName.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RagCorpusName.java new file mode 100644 index 000000000000..9d23c2357ebe --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RagCorpusName.java @@ -0,0 +1,223 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1; + +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 RagCorpusName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_RAG_CORPUS = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/ragCorpora/{rag_corpus}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String ragCorpus; + + @Deprecated + protected RagCorpusName() { + project = null; + location = null; + ragCorpus = null; + } + + private RagCorpusName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + ragCorpus = Preconditions.checkNotNull(builder.getRagCorpus()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getRagCorpus() { + return ragCorpus; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static RagCorpusName of(String project, String location, String ragCorpus) { + return newBuilder().setProject(project).setLocation(location).setRagCorpus(ragCorpus).build(); + } + + public static String format(String project, String location, String ragCorpus) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setRagCorpus(ragCorpus) + .build() + .toString(); + } + + public static RagCorpusName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_RAG_CORPUS.validatedMatch( + formattedString, "RagCorpusName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("rag_corpus")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (RagCorpusName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_RAG_CORPUS.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (ragCorpus != null) { + fieldMapBuilder.put("rag_corpus", ragCorpus); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_RAG_CORPUS.instantiate( + "project", project, "location", location, "rag_corpus", ragCorpus); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + RagCorpusName that = ((RagCorpusName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.ragCorpus, that.ragCorpus); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(ragCorpus); + return h; + } + + /** Builder for projects/{project}/locations/{location}/ragCorpora/{rag_corpus}. */ + public static class Builder { + private String project; + private String location; + private String ragCorpus; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getRagCorpus() { + return ragCorpus; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setRagCorpus(String ragCorpus) { + this.ragCorpus = ragCorpus; + return this; + } + + private Builder(RagCorpusName ragCorpusName) { + this.project = ragCorpusName.project; + this.location = ragCorpusName.location; + this.ragCorpus = ragCorpusName.ragCorpus; + } + + public RagCorpusName build() { + return new RagCorpusName(this); + } + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RagCorpusOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RagCorpusOrBuilder.java new file mode 100644 index 000000000000..b5009c48d159 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RagCorpusOrBuilder.java @@ -0,0 +1,181 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/vertex_rag_data.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +public interface RagCorpusOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.RagCorpus) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The resource name of the RagCorpus.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. The resource name of the RagCorpus.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The display name of the RagCorpus.
+   * The name can be up to 128 characters long and can consist of any UTF-8
+   * characters.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Required. The display name of the RagCorpus.
+   * The name can be up to 128 characters long and can consist of any UTF-8
+   * characters.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Optional. The description of the RagCorpus.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * Optional. The description of the RagCorpus.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Output only. Timestamp when this RagCorpus was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Timestamp when this RagCorpus was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Timestamp when this RagCorpus was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Timestamp when this RagCorpus was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. Timestamp when this RagCorpus was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. Timestamp when this RagCorpus was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RagFile.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RagFile.java new file mode 100644 index 000000000000..029efb7a4c7a --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RagFile.java @@ -0,0 +1,3095 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/vertex_rag_data.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * A RagFile contains user data for chunking, embedding and indexing.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.RagFile} + */ +public final class RagFile extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.RagFile) + RagFileOrBuilder { + private static final long serialVersionUID = 0L; + // Use RagFile.newBuilder() to construct. + private RagFile(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RagFile() { + name_ = ""; + displayName_ = ""; + description_ = ""; + ragFileType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RagFile(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataProto + .internal_static_google_cloud_aiplatform_v1beta1_RagFile_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataProto + .internal_static_google_cloud_aiplatform_v1beta1_RagFile_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.RagFile.class, + com.google.cloud.aiplatform.v1beta1.RagFile.Builder.class); + } + + /** + * + * + *
+   * The type of the RagFile.
+   * 
+ * + * Protobuf enum {@code google.cloud.aiplatform.v1beta1.RagFile.RagFileType} + */ + public enum RagFileType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * RagFile type is unspecified.
+     * 
+ * + * RAG_FILE_TYPE_UNSPECIFIED = 0; + */ + RAG_FILE_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * RagFile type is TXT.
+     * 
+ * + * RAG_FILE_TYPE_TXT = 1; + */ + RAG_FILE_TYPE_TXT(1), + /** + * + * + *
+     * RagFile type is PDF.
+     * 
+ * + * RAG_FILE_TYPE_PDF = 2; + */ + RAG_FILE_TYPE_PDF(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * RagFile type is unspecified.
+     * 
+ * + * RAG_FILE_TYPE_UNSPECIFIED = 0; + */ + public static final int RAG_FILE_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * RagFile type is TXT.
+     * 
+ * + * RAG_FILE_TYPE_TXT = 1; + */ + public static final int RAG_FILE_TYPE_TXT_VALUE = 1; + /** + * + * + *
+     * RagFile type is PDF.
+     * 
+ * + * RAG_FILE_TYPE_PDF = 2; + */ + public static final int RAG_FILE_TYPE_PDF_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static RagFileType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static RagFileType forNumber(int value) { + switch (value) { + case 0: + return RAG_FILE_TYPE_UNSPECIFIED; + case 1: + return RAG_FILE_TYPE_TXT; + case 2: + return RAG_FILE_TYPE_PDF; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public RagFileType findValueByNumber(int number) { + return RagFileType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.RagFile.getDescriptor().getEnumTypes().get(0); + } + + private static final RagFileType[] VALUES = values(); + + public static RagFileType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private RagFileType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.aiplatform.v1beta1.RagFile.RagFileType) + } + + private int bitField0_; + private int ragFileSourceCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object ragFileSource_; + + public enum RagFileSourceCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + GCS_SOURCE(8), + GOOGLE_DRIVE_SOURCE(9), + DIRECT_UPLOAD_SOURCE(10), + RAGFILESOURCE_NOT_SET(0); + private final int value; + + private RagFileSourceCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static RagFileSourceCase valueOf(int value) { + return forNumber(value); + } + + public static RagFileSourceCase forNumber(int value) { + switch (value) { + case 8: + return GCS_SOURCE; + case 9: + return GOOGLE_DRIVE_SOURCE; + case 10: + return DIRECT_UPLOAD_SOURCE; + case 0: + return RAGFILESOURCE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public RagFileSourceCase getRagFileSourceCase() { + return RagFileSourceCase.forNumber(ragFileSourceCase_); + } + + public static final int GCS_SOURCE_FIELD_NUMBER = 8; + /** + * + * + *
+   * Output only. Google Cloud Storage location of the RagFile.
+   * It does not support wildcards in the GCS uri for now.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.GcsSource gcs_source = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the gcsSource field is set. + */ + @java.lang.Override + public boolean hasGcsSource() { + return ragFileSourceCase_ == 8; + } + /** + * + * + *
+   * Output only. Google Cloud Storage location of the RagFile.
+   * It does not support wildcards in the GCS uri for now.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.GcsSource gcs_source = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The gcsSource. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GcsSource getGcsSource() { + if (ragFileSourceCase_ == 8) { + return (com.google.cloud.aiplatform.v1beta1.GcsSource) ragFileSource_; + } + return com.google.cloud.aiplatform.v1beta1.GcsSource.getDefaultInstance(); + } + /** + * + * + *
+   * Output only. Google Cloud Storage location of the RagFile.
+   * It does not support wildcards in the GCS uri for now.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.GcsSource gcs_source = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GcsSourceOrBuilder getGcsSourceOrBuilder() { + if (ragFileSourceCase_ == 8) { + return (com.google.cloud.aiplatform.v1beta1.GcsSource) ragFileSource_; + } + return com.google.cloud.aiplatform.v1beta1.GcsSource.getDefaultInstance(); + } + + public static final int GOOGLE_DRIVE_SOURCE_FIELD_NUMBER = 9; + /** + * + * + *
+   * Output only. Google Drive location. Supports importing individual files
+   * as well as Google Drive folders.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.GoogleDriveSource google_drive_source = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the googleDriveSource field is set. + */ + @java.lang.Override + public boolean hasGoogleDriveSource() { + return ragFileSourceCase_ == 9; + } + /** + * + * + *
+   * Output only. Google Drive location. Supports importing individual files
+   * as well as Google Drive folders.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.GoogleDriveSource google_drive_source = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The googleDriveSource. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GoogleDriveSource getGoogleDriveSource() { + if (ragFileSourceCase_ == 9) { + return (com.google.cloud.aiplatform.v1beta1.GoogleDriveSource) ragFileSource_; + } + return com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.getDefaultInstance(); + } + /** + * + * + *
+   * Output only. Google Drive location. Supports importing individual files
+   * as well as Google Drive folders.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.GoogleDriveSource google_drive_source = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GoogleDriveSourceOrBuilder + getGoogleDriveSourceOrBuilder() { + if (ragFileSourceCase_ == 9) { + return (com.google.cloud.aiplatform.v1beta1.GoogleDriveSource) ragFileSource_; + } + return com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.getDefaultInstance(); + } + + public static final int DIRECT_UPLOAD_SOURCE_FIELD_NUMBER = 10; + /** + * + * + *
+   * Output only. The RagFile is encapsulated and uploaded in the
+   * UploadRagFile request.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.DirectUploadSource direct_upload_source = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the directUploadSource field is set. + */ + @java.lang.Override + public boolean hasDirectUploadSource() { + return ragFileSourceCase_ == 10; + } + /** + * + * + *
+   * Output only. The RagFile is encapsulated and uploaded in the
+   * UploadRagFile request.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.DirectUploadSource direct_upload_source = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The directUploadSource. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.DirectUploadSource getDirectUploadSource() { + if (ragFileSourceCase_ == 10) { + return (com.google.cloud.aiplatform.v1beta1.DirectUploadSource) ragFileSource_; + } + return com.google.cloud.aiplatform.v1beta1.DirectUploadSource.getDefaultInstance(); + } + /** + * + * + *
+   * Output only. The RagFile is encapsulated and uploaded in the
+   * UploadRagFile request.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.DirectUploadSource direct_upload_source = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.DirectUploadSourceOrBuilder + getDirectUploadSourceOrBuilder() { + if (ragFileSourceCase_ == 10) { + return (com.google.cloud.aiplatform.v1beta1.DirectUploadSource) ragFileSource_; + } + return com.google.cloud.aiplatform.v1beta1.DirectUploadSource.getDefaultInstance(); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Output only. The resource name of the RagFile.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The resource name of the RagFile.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + /** + * + * + *
+   * Required. The display name of the RagFile.
+   * The name can be up to 128 characters long and can consist of any UTF-8
+   * characters.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + 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(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The display name of the RagFile.
+   * The name can be up to 128 characters long and can consist of any UTF-8
+   * characters.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + * + * + *
+   * Optional. The description of the RagFile.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + 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(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The description of the RagFile.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SIZE_BYTES_FIELD_NUMBER = 4; + private long sizeBytes_ = 0L; + /** + * + * + *
+   * Output only. The size of the RagFile in bytes.
+   * 
+ * + * int64 size_bytes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The sizeBytes. + */ + @java.lang.Override + public long getSizeBytes() { + return sizeBytes_; + } + + public static final int RAG_FILE_TYPE_FIELD_NUMBER = 5; + private int ragFileType_ = 0; + /** + * + * + *
+   * Output only. The type of the RagFile.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.RagFile.RagFileType rag_file_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for ragFileType. + */ + @java.lang.Override + public int getRagFileTypeValue() { + return ragFileType_; + } + /** + * + * + *
+   * Output only. The type of the RagFile.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.RagFile.RagFileType rag_file_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The ragFileType. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.RagFile.RagFileType getRagFileType() { + com.google.cloud.aiplatform.v1beta1.RagFile.RagFileType result = + com.google.cloud.aiplatform.v1beta1.RagFile.RagFileType.forNumber(ragFileType_); + return result == null + ? com.google.cloud.aiplatform.v1beta1.RagFile.RagFileType.UNRECOGNIZED + : result; + } + + public static final int CREATE_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. Timestamp when this RagFile was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Output only. Timestamp when this RagFile was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. Timestamp when this RagFile was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. Timestamp when this RagFile was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Output only. Timestamp when this RagFile was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. Timestamp when this RagFile was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + if (sizeBytes_ != 0L) { + output.writeInt64(4, sizeBytes_); + } + if (ragFileType_ + != com.google.cloud.aiplatform.v1beta1.RagFile.RagFileType.RAG_FILE_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(5, ragFileType_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(6, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(7, getUpdateTime()); + } + if (ragFileSourceCase_ == 8) { + output.writeMessage(8, (com.google.cloud.aiplatform.v1beta1.GcsSource) ragFileSource_); + } + if (ragFileSourceCase_ == 9) { + output.writeMessage( + 9, (com.google.cloud.aiplatform.v1beta1.GoogleDriveSource) ragFileSource_); + } + if (ragFileSourceCase_ == 10) { + output.writeMessage( + 10, (com.google.cloud.aiplatform.v1beta1.DirectUploadSource) ragFileSource_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + if (sizeBytes_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, sizeBytes_); + } + if (ragFileType_ + != com.google.cloud.aiplatform.v1beta1.RagFile.RagFileType.RAG_FILE_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, ragFileType_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getUpdateTime()); + } + if (ragFileSourceCase_ == 8) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 8, (com.google.cloud.aiplatform.v1beta1.GcsSource) ragFileSource_); + } + if (ragFileSourceCase_ == 9) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 9, (com.google.cloud.aiplatform.v1beta1.GoogleDriveSource) ragFileSource_); + } + if (ragFileSourceCase_ == 10) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 10, (com.google.cloud.aiplatform.v1beta1.DirectUploadSource) ragFileSource_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.RagFile)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.RagFile other = + (com.google.cloud.aiplatform.v1beta1.RagFile) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (getSizeBytes() != other.getSizeBytes()) return false; + if (ragFileType_ != other.ragFileType_) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!getRagFileSourceCase().equals(other.getRagFileSourceCase())) return false; + switch (ragFileSourceCase_) { + case 8: + if (!getGcsSource().equals(other.getGcsSource())) return false; + break; + case 9: + if (!getGoogleDriveSource().equals(other.getGoogleDriveSource())) return false; + break; + case 10: + if (!getDirectUploadSource().equals(other.getDirectUploadSource())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + SIZE_BYTES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getSizeBytes()); + hash = (37 * hash) + RAG_FILE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + ragFileType_; + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + switch (ragFileSourceCase_) { + case 8: + hash = (37 * hash) + GCS_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getGcsSource().hashCode(); + break; + case 9: + hash = (37 * hash) + GOOGLE_DRIVE_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getGoogleDriveSource().hashCode(); + break; + case 10: + hash = (37 * hash) + DIRECT_UPLOAD_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getDirectUploadSource().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.RagFile parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.RagFile parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.RagFile parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.RagFile parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.RagFile parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.RagFile parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.RagFile parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.RagFile parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.RagFile parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.RagFile parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.RagFile parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.RagFile parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.aiplatform.v1beta1.RagFile prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A RagFile contains user data for chunking, embedding and indexing.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.RagFile} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.RagFile) + com.google.cloud.aiplatform.v1beta1.RagFileOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataProto + .internal_static_google_cloud_aiplatform_v1beta1_RagFile_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataProto + .internal_static_google_cloud_aiplatform_v1beta1_RagFile_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.RagFile.class, + com.google.cloud.aiplatform.v1beta1.RagFile.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.RagFile.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getCreateTimeFieldBuilder(); + getUpdateTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (gcsSourceBuilder_ != null) { + gcsSourceBuilder_.clear(); + } + if (googleDriveSourceBuilder_ != null) { + googleDriveSourceBuilder_.clear(); + } + if (directUploadSourceBuilder_ != null) { + directUploadSourceBuilder_.clear(); + } + name_ = ""; + displayName_ = ""; + description_ = ""; + sizeBytes_ = 0L; + ragFileType_ = 0; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + ragFileSourceCase_ = 0; + ragFileSource_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataProto + .internal_static_google_cloud_aiplatform_v1beta1_RagFile_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.RagFile getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.RagFile.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.RagFile build() { + com.google.cloud.aiplatform.v1beta1.RagFile result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.RagFile buildPartial() { + com.google.cloud.aiplatform.v1beta1.RagFile result = + new com.google.cloud.aiplatform.v1beta1.RagFile(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1beta1.RagFile result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.sizeBytes_ = sizeBytes_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.ragFileType_ = ragFileType_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000100) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.aiplatform.v1beta1.RagFile result) { + result.ragFileSourceCase_ = ragFileSourceCase_; + result.ragFileSource_ = this.ragFileSource_; + if (ragFileSourceCase_ == 8 && gcsSourceBuilder_ != null) { + result.ragFileSource_ = gcsSourceBuilder_.build(); + } + if (ragFileSourceCase_ == 9 && googleDriveSourceBuilder_ != null) { + result.ragFileSource_ = googleDriveSourceBuilder_.build(); + } + if (ragFileSourceCase_ == 10 && directUploadSourceBuilder_ != null) { + result.ragFileSource_ = directUploadSourceBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1beta1.RagFile) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.RagFile) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.RagFile other) { + if (other == com.google.cloud.aiplatform.v1beta1.RagFile.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (other.getSizeBytes() != 0L) { + setSizeBytes(other.getSizeBytes()); + } + if (other.ragFileType_ != 0) { + setRagFileTypeValue(other.getRagFileTypeValue()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + switch (other.getRagFileSourceCase()) { + case GCS_SOURCE: + { + mergeGcsSource(other.getGcsSource()); + break; + } + case GOOGLE_DRIVE_SOURCE: + { + mergeGoogleDriveSource(other.getGoogleDriveSource()); + break; + } + case DIRECT_UPLOAD_SOURCE: + { + mergeDirectUploadSource(other.getDirectUploadSource()); + break; + } + case RAGFILESOURCE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 10 + case 18: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 18 + case 26: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 26 + case 32: + { + sizeBytes_ = input.readInt64(); + bitField0_ |= 0x00000040; + break; + } // case 32 + case 40: + { + ragFileType_ = input.readEnum(); + bitField0_ |= 0x00000080; + break; + } // case 40 + case 50: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000100; + break; + } // case 50 + case 58: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000200; + break; + } // case 58 + case 66: + { + input.readMessage(getGcsSourceFieldBuilder().getBuilder(), extensionRegistry); + ragFileSourceCase_ = 8; + break; + } // case 66 + case 74: + { + input.readMessage( + getGoogleDriveSourceFieldBuilder().getBuilder(), extensionRegistry); + ragFileSourceCase_ = 9; + break; + } // case 74 + case 82: + { + input.readMessage( + getDirectUploadSourceFieldBuilder().getBuilder(), extensionRegistry); + ragFileSourceCase_ = 10; + break; + } // case 82 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int ragFileSourceCase_ = 0; + private java.lang.Object ragFileSource_; + + public RagFileSourceCase getRagFileSourceCase() { + return RagFileSourceCase.forNumber(ragFileSourceCase_); + } + + public Builder clearRagFileSource() { + ragFileSourceCase_ = 0; + ragFileSource_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.GcsSource, + com.google.cloud.aiplatform.v1beta1.GcsSource.Builder, + com.google.cloud.aiplatform.v1beta1.GcsSourceOrBuilder> + gcsSourceBuilder_; + /** + * + * + *
+     * Output only. Google Cloud Storage location of the RagFile.
+     * It does not support wildcards in the GCS uri for now.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.GcsSource gcs_source = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the gcsSource field is set. + */ + @java.lang.Override + public boolean hasGcsSource() { + return ragFileSourceCase_ == 8; + } + /** + * + * + *
+     * Output only. Google Cloud Storage location of the RagFile.
+     * It does not support wildcards in the GCS uri for now.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.GcsSource gcs_source = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The gcsSource. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GcsSource getGcsSource() { + if (gcsSourceBuilder_ == null) { + if (ragFileSourceCase_ == 8) { + return (com.google.cloud.aiplatform.v1beta1.GcsSource) ragFileSource_; + } + return com.google.cloud.aiplatform.v1beta1.GcsSource.getDefaultInstance(); + } else { + if (ragFileSourceCase_ == 8) { + return gcsSourceBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1beta1.GcsSource.getDefaultInstance(); + } + } + /** + * + * + *
+     * Output only. Google Cloud Storage location of the RagFile.
+     * It does not support wildcards in the GCS uri for now.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.GcsSource gcs_source = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setGcsSource(com.google.cloud.aiplatform.v1beta1.GcsSource value) { + if (gcsSourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ragFileSource_ = value; + onChanged(); + } else { + gcsSourceBuilder_.setMessage(value); + } + ragFileSourceCase_ = 8; + return this; + } + /** + * + * + *
+     * Output only. Google Cloud Storage location of the RagFile.
+     * It does not support wildcards in the GCS uri for now.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.GcsSource gcs_source = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setGcsSource( + com.google.cloud.aiplatform.v1beta1.GcsSource.Builder builderForValue) { + if (gcsSourceBuilder_ == null) { + ragFileSource_ = builderForValue.build(); + onChanged(); + } else { + gcsSourceBuilder_.setMessage(builderForValue.build()); + } + ragFileSourceCase_ = 8; + return this; + } + /** + * + * + *
+     * Output only. Google Cloud Storage location of the RagFile.
+     * It does not support wildcards in the GCS uri for now.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.GcsSource gcs_source = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeGcsSource(com.google.cloud.aiplatform.v1beta1.GcsSource value) { + if (gcsSourceBuilder_ == null) { + if (ragFileSourceCase_ == 8 + && ragFileSource_ + != com.google.cloud.aiplatform.v1beta1.GcsSource.getDefaultInstance()) { + ragFileSource_ = + com.google.cloud.aiplatform.v1beta1.GcsSource.newBuilder( + (com.google.cloud.aiplatform.v1beta1.GcsSource) ragFileSource_) + .mergeFrom(value) + .buildPartial(); + } else { + ragFileSource_ = value; + } + onChanged(); + } else { + if (ragFileSourceCase_ == 8) { + gcsSourceBuilder_.mergeFrom(value); + } else { + gcsSourceBuilder_.setMessage(value); + } + } + ragFileSourceCase_ = 8; + return this; + } + /** + * + * + *
+     * Output only. Google Cloud Storage location of the RagFile.
+     * It does not support wildcards in the GCS uri for now.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.GcsSource gcs_source = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearGcsSource() { + if (gcsSourceBuilder_ == null) { + if (ragFileSourceCase_ == 8) { + ragFileSourceCase_ = 0; + ragFileSource_ = null; + onChanged(); + } + } else { + if (ragFileSourceCase_ == 8) { + ragFileSourceCase_ = 0; + ragFileSource_ = null; + } + gcsSourceBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. Google Cloud Storage location of the RagFile.
+     * It does not support wildcards in the GCS uri for now.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.GcsSource gcs_source = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1beta1.GcsSource.Builder getGcsSourceBuilder() { + return getGcsSourceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Google Cloud Storage location of the RagFile.
+     * It does not support wildcards in the GCS uri for now.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.GcsSource gcs_source = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GcsSourceOrBuilder getGcsSourceOrBuilder() { + if ((ragFileSourceCase_ == 8) && (gcsSourceBuilder_ != null)) { + return gcsSourceBuilder_.getMessageOrBuilder(); + } else { + if (ragFileSourceCase_ == 8) { + return (com.google.cloud.aiplatform.v1beta1.GcsSource) ragFileSource_; + } + return com.google.cloud.aiplatform.v1beta1.GcsSource.getDefaultInstance(); + } + } + /** + * + * + *
+     * Output only. Google Cloud Storage location of the RagFile.
+     * It does not support wildcards in the GCS uri for now.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.GcsSource gcs_source = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.GcsSource, + com.google.cloud.aiplatform.v1beta1.GcsSource.Builder, + com.google.cloud.aiplatform.v1beta1.GcsSourceOrBuilder> + getGcsSourceFieldBuilder() { + if (gcsSourceBuilder_ == null) { + if (!(ragFileSourceCase_ == 8)) { + ragFileSource_ = com.google.cloud.aiplatform.v1beta1.GcsSource.getDefaultInstance(); + } + gcsSourceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.GcsSource, + com.google.cloud.aiplatform.v1beta1.GcsSource.Builder, + com.google.cloud.aiplatform.v1beta1.GcsSourceOrBuilder>( + (com.google.cloud.aiplatform.v1beta1.GcsSource) ragFileSource_, + getParentForChildren(), + isClean()); + ragFileSource_ = null; + } + ragFileSourceCase_ = 8; + onChanged(); + return gcsSourceBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.GoogleDriveSource, + com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.Builder, + com.google.cloud.aiplatform.v1beta1.GoogleDriveSourceOrBuilder> + googleDriveSourceBuilder_; + /** + * + * + *
+     * Output only. Google Drive location. Supports importing individual files
+     * as well as Google Drive folders.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.GoogleDriveSource google_drive_source = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the googleDriveSource field is set. + */ + @java.lang.Override + public boolean hasGoogleDriveSource() { + return ragFileSourceCase_ == 9; + } + /** + * + * + *
+     * Output only. Google Drive location. Supports importing individual files
+     * as well as Google Drive folders.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.GoogleDriveSource google_drive_source = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The googleDriveSource. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GoogleDriveSource getGoogleDriveSource() { + if (googleDriveSourceBuilder_ == null) { + if (ragFileSourceCase_ == 9) { + return (com.google.cloud.aiplatform.v1beta1.GoogleDriveSource) ragFileSource_; + } + return com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.getDefaultInstance(); + } else { + if (ragFileSourceCase_ == 9) { + return googleDriveSourceBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.getDefaultInstance(); + } + } + /** + * + * + *
+     * Output only. Google Drive location. Supports importing individual files
+     * as well as Google Drive folders.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.GoogleDriveSource google_drive_source = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setGoogleDriveSource( + com.google.cloud.aiplatform.v1beta1.GoogleDriveSource value) { + if (googleDriveSourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ragFileSource_ = value; + onChanged(); + } else { + googleDriveSourceBuilder_.setMessage(value); + } + ragFileSourceCase_ = 9; + return this; + } + /** + * + * + *
+     * Output only. Google Drive location. Supports importing individual files
+     * as well as Google Drive folders.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.GoogleDriveSource google_drive_source = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setGoogleDriveSource( + com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.Builder builderForValue) { + if (googleDriveSourceBuilder_ == null) { + ragFileSource_ = builderForValue.build(); + onChanged(); + } else { + googleDriveSourceBuilder_.setMessage(builderForValue.build()); + } + ragFileSourceCase_ = 9; + return this; + } + /** + * + * + *
+     * Output only. Google Drive location. Supports importing individual files
+     * as well as Google Drive folders.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.GoogleDriveSource google_drive_source = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeGoogleDriveSource( + com.google.cloud.aiplatform.v1beta1.GoogleDriveSource value) { + if (googleDriveSourceBuilder_ == null) { + if (ragFileSourceCase_ == 9 + && ragFileSource_ + != com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.getDefaultInstance()) { + ragFileSource_ = + com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.newBuilder( + (com.google.cloud.aiplatform.v1beta1.GoogleDriveSource) ragFileSource_) + .mergeFrom(value) + .buildPartial(); + } else { + ragFileSource_ = value; + } + onChanged(); + } else { + if (ragFileSourceCase_ == 9) { + googleDriveSourceBuilder_.mergeFrom(value); + } else { + googleDriveSourceBuilder_.setMessage(value); + } + } + ragFileSourceCase_ = 9; + return this; + } + /** + * + * + *
+     * Output only. Google Drive location. Supports importing individual files
+     * as well as Google Drive folders.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.GoogleDriveSource google_drive_source = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearGoogleDriveSource() { + if (googleDriveSourceBuilder_ == null) { + if (ragFileSourceCase_ == 9) { + ragFileSourceCase_ = 0; + ragFileSource_ = null; + onChanged(); + } + } else { + if (ragFileSourceCase_ == 9) { + ragFileSourceCase_ = 0; + ragFileSource_ = null; + } + googleDriveSourceBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. Google Drive location. Supports importing individual files
+     * as well as Google Drive folders.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.GoogleDriveSource google_drive_source = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.Builder + getGoogleDriveSourceBuilder() { + return getGoogleDriveSourceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Google Drive location. Supports importing individual files
+     * as well as Google Drive folders.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.GoogleDriveSource google_drive_source = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GoogleDriveSourceOrBuilder + getGoogleDriveSourceOrBuilder() { + if ((ragFileSourceCase_ == 9) && (googleDriveSourceBuilder_ != null)) { + return googleDriveSourceBuilder_.getMessageOrBuilder(); + } else { + if (ragFileSourceCase_ == 9) { + return (com.google.cloud.aiplatform.v1beta1.GoogleDriveSource) ragFileSource_; + } + return com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.getDefaultInstance(); + } + } + /** + * + * + *
+     * Output only. Google Drive location. Supports importing individual files
+     * as well as Google Drive folders.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.GoogleDriveSource google_drive_source = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.GoogleDriveSource, + com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.Builder, + com.google.cloud.aiplatform.v1beta1.GoogleDriveSourceOrBuilder> + getGoogleDriveSourceFieldBuilder() { + if (googleDriveSourceBuilder_ == null) { + if (!(ragFileSourceCase_ == 9)) { + ragFileSource_ = + com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.getDefaultInstance(); + } + googleDriveSourceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.GoogleDriveSource, + com.google.cloud.aiplatform.v1beta1.GoogleDriveSource.Builder, + com.google.cloud.aiplatform.v1beta1.GoogleDriveSourceOrBuilder>( + (com.google.cloud.aiplatform.v1beta1.GoogleDriveSource) ragFileSource_, + getParentForChildren(), + isClean()); + ragFileSource_ = null; + } + ragFileSourceCase_ = 9; + onChanged(); + return googleDriveSourceBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.DirectUploadSource, + com.google.cloud.aiplatform.v1beta1.DirectUploadSource.Builder, + com.google.cloud.aiplatform.v1beta1.DirectUploadSourceOrBuilder> + directUploadSourceBuilder_; + /** + * + * + *
+     * Output only. The RagFile is encapsulated and uploaded in the
+     * UploadRagFile request.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.DirectUploadSource direct_upload_source = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the directUploadSource field is set. + */ + @java.lang.Override + public boolean hasDirectUploadSource() { + return ragFileSourceCase_ == 10; + } + /** + * + * + *
+     * Output only. The RagFile is encapsulated and uploaded in the
+     * UploadRagFile request.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.DirectUploadSource direct_upload_source = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The directUploadSource. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.DirectUploadSource getDirectUploadSource() { + if (directUploadSourceBuilder_ == null) { + if (ragFileSourceCase_ == 10) { + return (com.google.cloud.aiplatform.v1beta1.DirectUploadSource) ragFileSource_; + } + return com.google.cloud.aiplatform.v1beta1.DirectUploadSource.getDefaultInstance(); + } else { + if (ragFileSourceCase_ == 10) { + return directUploadSourceBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1beta1.DirectUploadSource.getDefaultInstance(); + } + } + /** + * + * + *
+     * Output only. The RagFile is encapsulated and uploaded in the
+     * UploadRagFile request.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.DirectUploadSource direct_upload_source = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDirectUploadSource( + com.google.cloud.aiplatform.v1beta1.DirectUploadSource value) { + if (directUploadSourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ragFileSource_ = value; + onChanged(); + } else { + directUploadSourceBuilder_.setMessage(value); + } + ragFileSourceCase_ = 10; + return this; + } + /** + * + * + *
+     * Output only. The RagFile is encapsulated and uploaded in the
+     * UploadRagFile request.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.DirectUploadSource direct_upload_source = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDirectUploadSource( + com.google.cloud.aiplatform.v1beta1.DirectUploadSource.Builder builderForValue) { + if (directUploadSourceBuilder_ == null) { + ragFileSource_ = builderForValue.build(); + onChanged(); + } else { + directUploadSourceBuilder_.setMessage(builderForValue.build()); + } + ragFileSourceCase_ = 10; + return this; + } + /** + * + * + *
+     * Output only. The RagFile is encapsulated and uploaded in the
+     * UploadRagFile request.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.DirectUploadSource direct_upload_source = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeDirectUploadSource( + com.google.cloud.aiplatform.v1beta1.DirectUploadSource value) { + if (directUploadSourceBuilder_ == null) { + if (ragFileSourceCase_ == 10 + && ragFileSource_ + != com.google.cloud.aiplatform.v1beta1.DirectUploadSource.getDefaultInstance()) { + ragFileSource_ = + com.google.cloud.aiplatform.v1beta1.DirectUploadSource.newBuilder( + (com.google.cloud.aiplatform.v1beta1.DirectUploadSource) ragFileSource_) + .mergeFrom(value) + .buildPartial(); + } else { + ragFileSource_ = value; + } + onChanged(); + } else { + if (ragFileSourceCase_ == 10) { + directUploadSourceBuilder_.mergeFrom(value); + } else { + directUploadSourceBuilder_.setMessage(value); + } + } + ragFileSourceCase_ = 10; + return this; + } + /** + * + * + *
+     * Output only. The RagFile is encapsulated and uploaded in the
+     * UploadRagFile request.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.DirectUploadSource direct_upload_source = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearDirectUploadSource() { + if (directUploadSourceBuilder_ == null) { + if (ragFileSourceCase_ == 10) { + ragFileSourceCase_ = 0; + ragFileSource_ = null; + onChanged(); + } + } else { + if (ragFileSourceCase_ == 10) { + ragFileSourceCase_ = 0; + ragFileSource_ = null; + } + directUploadSourceBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. The RagFile is encapsulated and uploaded in the
+     * UploadRagFile request.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.DirectUploadSource direct_upload_source = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1beta1.DirectUploadSource.Builder + getDirectUploadSourceBuilder() { + return getDirectUploadSourceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The RagFile is encapsulated and uploaded in the
+     * UploadRagFile request.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.DirectUploadSource direct_upload_source = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.DirectUploadSourceOrBuilder + getDirectUploadSourceOrBuilder() { + if ((ragFileSourceCase_ == 10) && (directUploadSourceBuilder_ != null)) { + return directUploadSourceBuilder_.getMessageOrBuilder(); + } else { + if (ragFileSourceCase_ == 10) { + return (com.google.cloud.aiplatform.v1beta1.DirectUploadSource) ragFileSource_; + } + return com.google.cloud.aiplatform.v1beta1.DirectUploadSource.getDefaultInstance(); + } + } + /** + * + * + *
+     * Output only. The RagFile is encapsulated and uploaded in the
+     * UploadRagFile request.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.DirectUploadSource direct_upload_source = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.DirectUploadSource, + com.google.cloud.aiplatform.v1beta1.DirectUploadSource.Builder, + com.google.cloud.aiplatform.v1beta1.DirectUploadSourceOrBuilder> + getDirectUploadSourceFieldBuilder() { + if (directUploadSourceBuilder_ == null) { + if (!(ragFileSourceCase_ == 10)) { + ragFileSource_ = + com.google.cloud.aiplatform.v1beta1.DirectUploadSource.getDefaultInstance(); + } + directUploadSourceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.DirectUploadSource, + com.google.cloud.aiplatform.v1beta1.DirectUploadSource.Builder, + com.google.cloud.aiplatform.v1beta1.DirectUploadSourceOrBuilder>( + (com.google.cloud.aiplatform.v1beta1.DirectUploadSource) ragFileSource_, + getParentForChildren(), + isClean()); + ragFileSource_ = null; + } + ragFileSourceCase_ = 10; + onChanged(); + return directUploadSourceBuilder_; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. The resource name of the RagFile.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The resource name of the RagFile.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The resource name of the RagFile.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The resource name of the RagFile.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The resource name of the RagFile.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Required. The display name of the RagFile.
+     * The name can be up to 128 characters long and can consist of any UTF-8
+     * characters.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The display name of the RagFile.
+     * The name can be up to 128 characters long and can consist of any UTF-8
+     * characters.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The display name of the RagFile.
+     * The name can be up to 128 characters long and can consist of any UTF-8
+     * characters.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The display name of the RagFile.
+     * The name can be up to 128 characters long and can consist of any UTF-8
+     * characters.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The display name of the RagFile.
+     * The name can be up to 128 characters long and can consist of any UTF-8
+     * characters.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * Optional. The description of the RagFile.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The description of the RagFile.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The description of the RagFile.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The description of the RagFile.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The description of the RagFile.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private long sizeBytes_; + /** + * + * + *
+     * Output only. The size of the RagFile in bytes.
+     * 
+ * + * int64 size_bytes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The sizeBytes. + */ + @java.lang.Override + public long getSizeBytes() { + return sizeBytes_; + } + /** + * + * + *
+     * Output only. The size of the RagFile in bytes.
+     * 
+ * + * int64 size_bytes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The sizeBytes to set. + * @return This builder for chaining. + */ + public Builder setSizeBytes(long value) { + + sizeBytes_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The size of the RagFile in bytes.
+     * 
+ * + * int64 size_bytes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearSizeBytes() { + bitField0_ = (bitField0_ & ~0x00000040); + sizeBytes_ = 0L; + onChanged(); + return this; + } + + private int ragFileType_ = 0; + /** + * + * + *
+     * Output only. The type of the RagFile.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.RagFile.RagFileType rag_file_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for ragFileType. + */ + @java.lang.Override + public int getRagFileTypeValue() { + return ragFileType_; + } + /** + * + * + *
+     * Output only. The type of the RagFile.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.RagFile.RagFileType rag_file_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for ragFileType to set. + * @return This builder for chaining. + */ + public Builder setRagFileTypeValue(int value) { + ragFileType_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The type of the RagFile.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.RagFile.RagFileType rag_file_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The ragFileType. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.RagFile.RagFileType getRagFileType() { + com.google.cloud.aiplatform.v1beta1.RagFile.RagFileType result = + com.google.cloud.aiplatform.v1beta1.RagFile.RagFileType.forNumber(ragFileType_); + return result == null + ? com.google.cloud.aiplatform.v1beta1.RagFile.RagFileType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Output only. The type of the RagFile.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.RagFile.RagFileType rag_file_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The ragFileType to set. + * @return This builder for chaining. + */ + public Builder setRagFileType(com.google.cloud.aiplatform.v1beta1.RagFile.RagFileType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000080; + ragFileType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The type of the RagFile.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.RagFile.RagFileType rag_file_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearRagFileType() { + bitField0_ = (bitField0_ & ~0x00000080); + ragFileType_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. Timestamp when this RagFile was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000100) != 0); + } + /** + * + * + *
+     * Output only. Timestamp when this RagFile was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Timestamp when this RagFile was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this RagFile was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this RagFile was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000100; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this RagFile was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000100); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this RagFile was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000100; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Timestamp when this RagFile was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. Timestamp when this RagFile was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. Timestamp when this RagFile was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000200) != 0); + } + /** + * + * + *
+     * Output only. Timestamp when this RagFile was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Timestamp when this RagFile was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this RagFile was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this RagFile was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000200; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this RagFile was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000200); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this RagFile was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000200; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Timestamp when this RagFile was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. Timestamp when this RagFile was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.RagFile) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.RagFile) + private static final com.google.cloud.aiplatform.v1beta1.RagFile DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.RagFile(); + } + + public static com.google.cloud.aiplatform.v1beta1.RagFile getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RagFile parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.RagFile getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RagFileChunkingConfig.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RagFileChunkingConfig.java new file mode 100644 index 000000000000..594ae52f5bc8 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RagFileChunkingConfig.java @@ -0,0 +1,629 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/vertex_rag_data.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Specifies the size and overlap of chunks for RagFiles.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.RagFileChunkingConfig} + */ +public final class RagFileChunkingConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.RagFileChunkingConfig) + RagFileChunkingConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use RagFileChunkingConfig.newBuilder() to construct. + private RagFileChunkingConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RagFileChunkingConfig() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RagFileChunkingConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataProto + .internal_static_google_cloud_aiplatform_v1beta1_RagFileChunkingConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataProto + .internal_static_google_cloud_aiplatform_v1beta1_RagFileChunkingConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig.class, + com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig.Builder.class); + } + + public static final int CHUNK_SIZE_FIELD_NUMBER = 1; + private int chunkSize_ = 0; + /** + * + * + *
+   * The size of the chunks.
+   * 
+ * + * int32 chunk_size = 1; + * + * @return The chunkSize. + */ + @java.lang.Override + public int getChunkSize() { + return chunkSize_; + } + + public static final int CHUNK_OVERLAP_FIELD_NUMBER = 2; + private int chunkOverlap_ = 0; + /** + * + * + *
+   * The overlap between chunks.
+   * 
+ * + * int32 chunk_overlap = 2; + * + * @return The chunkOverlap. + */ + @java.lang.Override + public int getChunkOverlap() { + return chunkOverlap_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (chunkSize_ != 0) { + output.writeInt32(1, chunkSize_); + } + if (chunkOverlap_ != 0) { + output.writeInt32(2, chunkOverlap_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (chunkSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, chunkSize_); + } + if (chunkOverlap_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, chunkOverlap_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig other = + (com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig) obj; + + if (getChunkSize() != other.getChunkSize()) return false; + if (getChunkOverlap() != other.getChunkOverlap()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CHUNK_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getChunkSize(); + hash = (37 * hash) + CHUNK_OVERLAP_FIELD_NUMBER; + hash = (53 * hash) + getChunkOverlap(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Specifies the size and overlap of chunks for RagFiles.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.RagFileChunkingConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.RagFileChunkingConfig) + com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataProto + .internal_static_google_cloud_aiplatform_v1beta1_RagFileChunkingConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataProto + .internal_static_google_cloud_aiplatform_v1beta1_RagFileChunkingConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig.class, + com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + chunkSize_ = 0; + chunkOverlap_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataProto + .internal_static_google_cloud_aiplatform_v1beta1_RagFileChunkingConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig build() { + com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig buildPartial() { + com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig result = + new com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.chunkSize_ = chunkSize_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.chunkOverlap_ = chunkOverlap_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig other) { + if (other == com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig.getDefaultInstance()) + return this; + if (other.getChunkSize() != 0) { + setChunkSize(other.getChunkSize()); + } + if (other.getChunkOverlap() != 0) { + setChunkOverlap(other.getChunkOverlap()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + chunkSize_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + chunkOverlap_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int chunkSize_; + /** + * + * + *
+     * The size of the chunks.
+     * 
+ * + * int32 chunk_size = 1; + * + * @return The chunkSize. + */ + @java.lang.Override + public int getChunkSize() { + return chunkSize_; + } + /** + * + * + *
+     * The size of the chunks.
+     * 
+ * + * int32 chunk_size = 1; + * + * @param value The chunkSize to set. + * @return This builder for chaining. + */ + public Builder setChunkSize(int value) { + + chunkSize_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The size of the chunks.
+     * 
+ * + * int32 chunk_size = 1; + * + * @return This builder for chaining. + */ + public Builder clearChunkSize() { + bitField0_ = (bitField0_ & ~0x00000001); + chunkSize_ = 0; + onChanged(); + return this; + } + + private int chunkOverlap_; + /** + * + * + *
+     * The overlap between chunks.
+     * 
+ * + * int32 chunk_overlap = 2; + * + * @return The chunkOverlap. + */ + @java.lang.Override + public int getChunkOverlap() { + return chunkOverlap_; + } + /** + * + * + *
+     * The overlap between chunks.
+     * 
+ * + * int32 chunk_overlap = 2; + * + * @param value The chunkOverlap to set. + * @return This builder for chaining. + */ + public Builder setChunkOverlap(int value) { + + chunkOverlap_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The overlap between chunks.
+     * 
+ * + * int32 chunk_overlap = 2; + * + * @return This builder for chaining. + */ + public Builder clearChunkOverlap() { + bitField0_ = (bitField0_ & ~0x00000002); + chunkOverlap_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.RagFileChunkingConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.RagFileChunkingConfig) + private static final com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig(); + } + + public static com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RagFileChunkingConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ResponseRecallSpecOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RagFileChunkingConfigOrBuilder.java similarity index 66% rename from java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ResponseRecallSpecOrBuilder.java rename to java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RagFileChunkingConfigOrBuilder.java index 52ab081e027c..60b5ab076af0 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ResponseRecallSpecOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RagFileChunkingConfigOrBuilder.java @@ -14,26 +14,39 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/aiplatform/v1beta1/evaluation_service.proto +// source: google/cloud/aiplatform/v1beta1/vertex_rag_data.proto // Protobuf Java Version: 3.25.2 package com.google.cloud.aiplatform.v1beta1; -public interface ResponseRecallSpecOrBuilder +public interface RagFileChunkingConfigOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.ResponseRecallSpec) + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.RagFileChunkingConfig) com.google.protobuf.MessageOrBuilder { /** * * *
-   * Optional. Which version to use for evaluation.
+   * The size of the chunks.
    * 
* - * int32 version = 1 [(.google.api.field_behavior) = OPTIONAL]; + * int32 chunk_size = 1; * - * @return The version. + * @return The chunkSize. */ - int getVersion(); + int getChunkSize(); + + /** + * + * + *
+   * The overlap between chunks.
+   * 
+ * + * int32 chunk_overlap = 2; + * + * @return The chunkOverlap. + */ + int getChunkOverlap(); } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RagFileName.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RagFileName.java new file mode 100644 index 000000000000..8474da12ec26 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RagFileName.java @@ -0,0 +1,260 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1; + +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 RagFileName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_RAG_CORPUS_RAG_FILE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/ragCorpora/{rag_corpus}/ragFiles/{rag_file}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String ragCorpus; + private final String ragFile; + + @Deprecated + protected RagFileName() { + project = null; + location = null; + ragCorpus = null; + ragFile = null; + } + + private RagFileName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + ragCorpus = Preconditions.checkNotNull(builder.getRagCorpus()); + ragFile = Preconditions.checkNotNull(builder.getRagFile()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getRagCorpus() { + return ragCorpus; + } + + public String getRagFile() { + return ragFile; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static RagFileName of(String project, String location, String ragCorpus, String ragFile) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setRagCorpus(ragCorpus) + .setRagFile(ragFile) + .build(); + } + + public static String format(String project, String location, String ragCorpus, String ragFile) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setRagCorpus(ragCorpus) + .setRagFile(ragFile) + .build() + .toString(); + } + + public static RagFileName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_RAG_CORPUS_RAG_FILE.validatedMatch( + formattedString, "RagFileName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("rag_corpus"), + matchMap.get("rag_file")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (RagFileName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_RAG_CORPUS_RAG_FILE.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (ragCorpus != null) { + fieldMapBuilder.put("rag_corpus", ragCorpus); + } + if (ragFile != null) { + fieldMapBuilder.put("rag_file", ragFile); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_RAG_CORPUS_RAG_FILE.instantiate( + "project", project, "location", location, "rag_corpus", ragCorpus, "rag_file", ragFile); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + RagFileName that = ((RagFileName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.ragCorpus, that.ragCorpus) + && Objects.equals(this.ragFile, that.ragFile); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(ragCorpus); + h *= 1000003; + h ^= Objects.hashCode(ragFile); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/ragCorpora/{rag_corpus}/ragFiles/{rag_file}. + */ + public static class Builder { + private String project; + private String location; + private String ragCorpus; + private String ragFile; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getRagCorpus() { + return ragCorpus; + } + + public String getRagFile() { + return ragFile; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setRagCorpus(String ragCorpus) { + this.ragCorpus = ragCorpus; + return this; + } + + public Builder setRagFile(String ragFile) { + this.ragFile = ragFile; + return this; + } + + private Builder(RagFileName ragFileName) { + this.project = ragFileName.project; + this.location = ragFileName.location; + this.ragCorpus = ragFileName.ragCorpus; + this.ragFile = ragFileName.ragFile; + } + + public RagFileName build() { + return new RagFileName(this); + } + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RagFileOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RagFileOrBuilder.java new file mode 100644 index 000000000000..69528246b99e --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RagFileOrBuilder.java @@ -0,0 +1,357 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/vertex_rag_data.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +public interface RagFileOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.RagFile) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Google Cloud Storage location of the RagFile.
+   * It does not support wildcards in the GCS uri for now.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.GcsSource gcs_source = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the gcsSource field is set. + */ + boolean hasGcsSource(); + /** + * + * + *
+   * Output only. Google Cloud Storage location of the RagFile.
+   * It does not support wildcards in the GCS uri for now.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.GcsSource gcs_source = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The gcsSource. + */ + com.google.cloud.aiplatform.v1beta1.GcsSource getGcsSource(); + /** + * + * + *
+   * Output only. Google Cloud Storage location of the RagFile.
+   * It does not support wildcards in the GCS uri for now.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.GcsSource gcs_source = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.aiplatform.v1beta1.GcsSourceOrBuilder getGcsSourceOrBuilder(); + + /** + * + * + *
+   * Output only. Google Drive location. Supports importing individual files
+   * as well as Google Drive folders.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.GoogleDriveSource google_drive_source = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the googleDriveSource field is set. + */ + boolean hasGoogleDriveSource(); + /** + * + * + *
+   * Output only. Google Drive location. Supports importing individual files
+   * as well as Google Drive folders.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.GoogleDriveSource google_drive_source = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The googleDriveSource. + */ + com.google.cloud.aiplatform.v1beta1.GoogleDriveSource getGoogleDriveSource(); + /** + * + * + *
+   * Output only. Google Drive location. Supports importing individual files
+   * as well as Google Drive folders.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.GoogleDriveSource google_drive_source = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.aiplatform.v1beta1.GoogleDriveSourceOrBuilder getGoogleDriveSourceOrBuilder(); + + /** + * + * + *
+   * Output only. The RagFile is encapsulated and uploaded in the
+   * UploadRagFile request.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.DirectUploadSource direct_upload_source = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the directUploadSource field is set. + */ + boolean hasDirectUploadSource(); + /** + * + * + *
+   * Output only. The RagFile is encapsulated and uploaded in the
+   * UploadRagFile request.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.DirectUploadSource direct_upload_source = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The directUploadSource. + */ + com.google.cloud.aiplatform.v1beta1.DirectUploadSource getDirectUploadSource(); + /** + * + * + *
+   * Output only. The RagFile is encapsulated and uploaded in the
+   * UploadRagFile request.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.DirectUploadSource direct_upload_source = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.aiplatform.v1beta1.DirectUploadSourceOrBuilder getDirectUploadSourceOrBuilder(); + + /** + * + * + *
+   * Output only. The resource name of the RagFile.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. The resource name of the RagFile.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The display name of the RagFile.
+   * The name can be up to 128 characters long and can consist of any UTF-8
+   * characters.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Required. The display name of the RagFile.
+   * The name can be up to 128 characters long and can consist of any UTF-8
+   * characters.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Optional. The description of the RagFile.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * Optional. The description of the RagFile.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Output only. The size of the RagFile in bytes.
+   * 
+ * + * int64 size_bytes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The sizeBytes. + */ + long getSizeBytes(); + + /** + * + * + *
+   * Output only. The type of the RagFile.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.RagFile.RagFileType rag_file_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for ragFileType. + */ + int getRagFileTypeValue(); + /** + * + * + *
+   * Output only. The type of the RagFile.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.RagFile.RagFileType rag_file_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The ragFileType. + */ + com.google.cloud.aiplatform.v1beta1.RagFile.RagFileType getRagFileType(); + + /** + * + * + *
+   * Output only. Timestamp when this RagFile was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Timestamp when this RagFile was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Timestamp when this RagFile was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Timestamp when this RagFile was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. Timestamp when this RagFile was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. Timestamp when this RagFile was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + com.google.cloud.aiplatform.v1beta1.RagFile.RagFileSourceCase getRagFileSourceCase(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ResponseRecallResult.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RagQuery.java similarity index 50% rename from java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ResponseRecallResult.java rename to java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RagQuery.java index 302b8d1c2cff..eb22a199b13e 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ResponseRecallResult.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RagQuery.java @@ -14,7 +14,7 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/aiplatform/v1beta1/evaluation_service.proto +// source: google/cloud/aiplatform/v1beta1/vertex_rag_service.proto // Protobuf Java Version: 3.25.2 package com.google.cloud.aiplatform.v1beta1; @@ -23,104 +23,129 @@ * * *
- * Spec for response recall result.
+ * A query to retrieve relevant contexts.
  * 
* - * Protobuf type {@code google.cloud.aiplatform.v1beta1.ResponseRecallResult} + * Protobuf type {@code google.cloud.aiplatform.v1beta1.RagQuery} */ -public final class ResponseRecallResult extends com.google.protobuf.GeneratedMessageV3 +public final class RagQuery extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.ResponseRecallResult) - ResponseRecallResultOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.RagQuery) + RagQueryOrBuilder { private static final long serialVersionUID = 0L; - // Use ResponseRecallResult.newBuilder() to construct. - private ResponseRecallResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use RagQuery.newBuilder() to construct. + private RagQuery(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private ResponseRecallResult() { - explanation_ = ""; - } + private RagQuery() {} @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ResponseRecallResult(); + return new RagQuery(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.aiplatform.v1beta1.EvaluationServiceProto - .internal_static_google_cloud_aiplatform_v1beta1_ResponseRecallResult_descriptor; + return com.google.cloud.aiplatform.v1beta1.VertexRagServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_RagQuery_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.aiplatform.v1beta1.EvaluationServiceProto - .internal_static_google_cloud_aiplatform_v1beta1_ResponseRecallResult_fieldAccessorTable + return com.google.cloud.aiplatform.v1beta1.VertexRagServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_RagQuery_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.aiplatform.v1beta1.ResponseRecallResult.class, - com.google.cloud.aiplatform.v1beta1.ResponseRecallResult.Builder.class); + com.google.cloud.aiplatform.v1beta1.RagQuery.class, + com.google.cloud.aiplatform.v1beta1.RagQuery.Builder.class); } - private int bitField0_; - public static final int SCORE_FIELD_NUMBER = 1; - private float score_ = 0F; - /** - * - * - *
-   * Output only. ResponseRecall score.
-   * 
- * - * optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return Whether the score field is set. - */ - @java.lang.Override - public boolean hasScore() { - return ((bitField0_ & 0x00000001) != 0); + private int queryCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object query_; + + public enum QueryCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + TEXT(1), + QUERY_NOT_SET(0); + private final int value; + + private QueryCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static QueryCase valueOf(int value) { + return forNumber(value); + } + + public static QueryCase forNumber(int value) { + switch (value) { + case 1: + return TEXT; + case 0: + return QUERY_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public QueryCase getQueryCase() { + return QueryCase.forNumber(queryCase_); } + + public static final int TEXT_FIELD_NUMBER = 1; /** * * *
-   * Output only. ResponseRecall score.
+   * Optional. The query in text format to get relevant contexts.
    * 
* - * optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string text = 1 [(.google.api.field_behavior) = OPTIONAL]; * - * @return The score. + * @return Whether the text field is set. */ - @java.lang.Override - public float getScore() { - return score_; + public boolean hasText() { + return queryCase_ == 1; } - - public static final int EXPLANATION_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object explanation_ = ""; /** * * *
-   * Output only. Explanation for response recall score.
+   * Optional. The query in text format to get relevant contexts.
    * 
* - * string explanation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string text = 1 [(.google.api.field_behavior) = OPTIONAL]; * - * @return The explanation. + * @return The text. */ - @java.lang.Override - public java.lang.String getExplanation() { - java.lang.Object ref = explanation_; + public java.lang.String getText() { + java.lang.Object ref = ""; + if (queryCase_ == 1) { + ref = query_; + } 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(); - explanation_ = s; + if (queryCase_ == 1) { + query_ = s; + } return s; } } @@ -128,57 +153,46 @@ public java.lang.String getExplanation() { * * *
-   * Output only. Explanation for response recall score.
+   * Optional. The query in text format to get relevant contexts.
    * 
* - * string explanation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string text = 1 [(.google.api.field_behavior) = OPTIONAL]; * - * @return The bytes for explanation. + * @return The bytes for text. */ - @java.lang.Override - public com.google.protobuf.ByteString getExplanationBytes() { - java.lang.Object ref = explanation_; + public com.google.protobuf.ByteString getTextBytes() { + java.lang.Object ref = ""; + if (queryCase_ == 1) { + ref = query_; + } if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - explanation_ = b; + if (queryCase_ == 1) { + query_ = b; + } return b; } else { return (com.google.protobuf.ByteString) ref; } } - public static final int CONFIDENCE_FIELD_NUMBER = 3; - private float confidence_ = 0F; - /** - * - * - *
-   * Output only. Confidence for fulfillment score.
-   * 
- * - * optional float confidence = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return Whether the confidence field is set. - */ - @java.lang.Override - public boolean hasConfidence() { - return ((bitField0_ & 0x00000002) != 0); - } + public static final int SIMILARITY_TOP_K_FIELD_NUMBER = 2; + private int similarityTopK_ = 0; /** * * *
-   * Output only. Confidence for fulfillment score.
+   * Optional. The number of contexts to retrieve.
    * 
* - * optional float confidence = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * int32 similarity_top_k = 2 [(.google.api.field_behavior) = OPTIONAL]; * - * @return The confidence. + * @return The similarityTopK. */ @java.lang.Override - public float getConfidence() { - return confidence_; + public int getSimilarityTopK() { + return similarityTopK_; } private byte memoizedIsInitialized = -1; @@ -195,14 +209,11 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeFloat(1, score_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(explanation_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, explanation_); + if (queryCase_ == 1) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, query_); } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeFloat(3, confidence_); + if (similarityTopK_ != 0) { + output.writeInt32(2, similarityTopK_); } getUnknownFields().writeTo(output); } @@ -213,14 +224,11 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, score_); + if (queryCase_ == 1) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, query_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(explanation_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, explanation_); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(3, confidence_); + if (similarityTopK_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, similarityTopK_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -232,22 +240,20 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.ResponseRecallResult)) { + if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.RagQuery)) { return super.equals(obj); } - com.google.cloud.aiplatform.v1beta1.ResponseRecallResult other = - (com.google.cloud.aiplatform.v1beta1.ResponseRecallResult) obj; + com.google.cloud.aiplatform.v1beta1.RagQuery other = + (com.google.cloud.aiplatform.v1beta1.RagQuery) obj; - if (hasScore() != other.hasScore()) return false; - if (hasScore()) { - if (java.lang.Float.floatToIntBits(getScore()) - != java.lang.Float.floatToIntBits(other.getScore())) return false; - } - if (!getExplanation().equals(other.getExplanation())) return false; - if (hasConfidence() != other.hasConfidence()) return false; - if (hasConfidence()) { - if (java.lang.Float.floatToIntBits(getConfidence()) - != java.lang.Float.floatToIntBits(other.getConfidence())) return false; + if (getSimilarityTopK() != other.getSimilarityTopK()) return false; + if (!getQueryCase().equals(other.getQueryCase())) return false; + switch (queryCase_) { + case 1: + if (!getText().equals(other.getText())) return false; + break; + case 0: + default: } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; @@ -260,86 +266,86 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (hasScore()) { - hash = (37 * hash) + SCORE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getScore()); - } - hash = (37 * hash) + EXPLANATION_FIELD_NUMBER; - hash = (53 * hash) + getExplanation().hashCode(); - if (hasConfidence()) { - hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getConfidence()); + hash = (37 * hash) + SIMILARITY_TOP_K_FIELD_NUMBER; + hash = (53 * hash) + getSimilarityTopK(); + switch (queryCase_) { + case 1: + hash = (37 * hash) + TEXT_FIELD_NUMBER; + hash = (53 * hash) + getText().hashCode(); + break; + case 0: + default: } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.cloud.aiplatform.v1beta1.ResponseRecallResult parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.cloud.aiplatform.v1beta1.RagQuery parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.aiplatform.v1beta1.ResponseRecallResult parseFrom( + public static com.google.cloud.aiplatform.v1beta1.RagQuery parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.aiplatform.v1beta1.ResponseRecallResult parseFrom( + public static com.google.cloud.aiplatform.v1beta1.RagQuery parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.aiplatform.v1beta1.ResponseRecallResult parseFrom( + public static com.google.cloud.aiplatform.v1beta1.RagQuery parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.aiplatform.v1beta1.ResponseRecallResult parseFrom(byte[] data) + public static com.google.cloud.aiplatform.v1beta1.RagQuery parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.aiplatform.v1beta1.ResponseRecallResult parseFrom( + public static com.google.cloud.aiplatform.v1beta1.RagQuery parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.aiplatform.v1beta1.ResponseRecallResult parseFrom( - java.io.InputStream input) throws java.io.IOException { + public static com.google.cloud.aiplatform.v1beta1.RagQuery parseFrom(java.io.InputStream input) + throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.aiplatform.v1beta1.ResponseRecallResult parseFrom( + public static com.google.cloud.aiplatform.v1beta1.RagQuery parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.aiplatform.v1beta1.ResponseRecallResult parseDelimitedFrom( + public static com.google.cloud.aiplatform.v1beta1.RagQuery parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.aiplatform.v1beta1.ResponseRecallResult parseDelimitedFrom( + public static com.google.cloud.aiplatform.v1beta1.RagQuery parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.aiplatform.v1beta1.ResponseRecallResult parseFrom( + public static com.google.cloud.aiplatform.v1beta1.RagQuery parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.aiplatform.v1beta1.ResponseRecallResult parseFrom( + public static com.google.cloud.aiplatform.v1beta1.RagQuery parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -356,8 +362,7 @@ public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder( - com.google.cloud.aiplatform.v1beta1.ResponseRecallResult prototype) { + public static Builder newBuilder(com.google.cloud.aiplatform.v1beta1.RagQuery prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -375,31 +380,31 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Spec for response recall result.
+   * A query to retrieve relevant contexts.
    * 
* - * Protobuf type {@code google.cloud.aiplatform.v1beta1.ResponseRecallResult} + * Protobuf type {@code google.cloud.aiplatform.v1beta1.RagQuery} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.ResponseRecallResult) - com.google.cloud.aiplatform.v1beta1.ResponseRecallResultOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.RagQuery) + com.google.cloud.aiplatform.v1beta1.RagQueryOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.aiplatform.v1beta1.EvaluationServiceProto - .internal_static_google_cloud_aiplatform_v1beta1_ResponseRecallResult_descriptor; + return com.google.cloud.aiplatform.v1beta1.VertexRagServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_RagQuery_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.aiplatform.v1beta1.EvaluationServiceProto - .internal_static_google_cloud_aiplatform_v1beta1_ResponseRecallResult_fieldAccessorTable + return com.google.cloud.aiplatform.v1beta1.VertexRagServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_RagQuery_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.aiplatform.v1beta1.ResponseRecallResult.class, - com.google.cloud.aiplatform.v1beta1.ResponseRecallResult.Builder.class); + com.google.cloud.aiplatform.v1beta1.RagQuery.class, + com.google.cloud.aiplatform.v1beta1.RagQuery.Builder.class); } - // Construct using com.google.cloud.aiplatform.v1beta1.ResponseRecallResult.newBuilder() + // Construct using com.google.cloud.aiplatform.v1beta1.RagQuery.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { @@ -410,26 +415,26 @@ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { public Builder clear() { super.clear(); bitField0_ = 0; - score_ = 0F; - explanation_ = ""; - confidence_ = 0F; + similarityTopK_ = 0; + queryCase_ = 0; + query_ = null; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.aiplatform.v1beta1.EvaluationServiceProto - .internal_static_google_cloud_aiplatform_v1beta1_ResponseRecallResult_descriptor; + return com.google.cloud.aiplatform.v1beta1.VertexRagServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_RagQuery_descriptor; } @java.lang.Override - public com.google.cloud.aiplatform.v1beta1.ResponseRecallResult getDefaultInstanceForType() { - return com.google.cloud.aiplatform.v1beta1.ResponseRecallResult.getDefaultInstance(); + public com.google.cloud.aiplatform.v1beta1.RagQuery getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.RagQuery.getDefaultInstance(); } @java.lang.Override - public com.google.cloud.aiplatform.v1beta1.ResponseRecallResult build() { - com.google.cloud.aiplatform.v1beta1.ResponseRecallResult result = buildPartial(); + public com.google.cloud.aiplatform.v1beta1.RagQuery build() { + com.google.cloud.aiplatform.v1beta1.RagQuery result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -437,31 +442,27 @@ public com.google.cloud.aiplatform.v1beta1.ResponseRecallResult build() { } @java.lang.Override - public com.google.cloud.aiplatform.v1beta1.ResponseRecallResult buildPartial() { - com.google.cloud.aiplatform.v1beta1.ResponseRecallResult result = - new com.google.cloud.aiplatform.v1beta1.ResponseRecallResult(this); + public com.google.cloud.aiplatform.v1beta1.RagQuery buildPartial() { + com.google.cloud.aiplatform.v1beta1.RagQuery result = + new com.google.cloud.aiplatform.v1beta1.RagQuery(this); if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); onBuilt(); return result; } - private void buildPartial0(com.google.cloud.aiplatform.v1beta1.ResponseRecallResult result) { + private void buildPartial0(com.google.cloud.aiplatform.v1beta1.RagQuery result) { int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.score_ = score_; - to_bitField0_ |= 0x00000001; - } if (((from_bitField0_ & 0x00000002) != 0)) { - result.explanation_ = explanation_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.confidence_ = confidence_; - to_bitField0_ |= 0x00000002; + result.similarityTopK_ = similarityTopK_; } - result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.aiplatform.v1beta1.RagQuery result) { + result.queryCase_ = queryCase_; + result.query_ = this.query_; } @java.lang.Override @@ -499,27 +500,31 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.aiplatform.v1beta1.ResponseRecallResult) { - return mergeFrom((com.google.cloud.aiplatform.v1beta1.ResponseRecallResult) other); + if (other instanceof com.google.cloud.aiplatform.v1beta1.RagQuery) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.RagQuery) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.ResponseRecallResult other) { - if (other == com.google.cloud.aiplatform.v1beta1.ResponseRecallResult.getDefaultInstance()) - return this; - if (other.hasScore()) { - setScore(other.getScore()); - } - if (!other.getExplanation().isEmpty()) { - explanation_ = other.explanation_; - bitField0_ |= 0x00000002; - onChanged(); + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.RagQuery other) { + if (other == com.google.cloud.aiplatform.v1beta1.RagQuery.getDefaultInstance()) return this; + if (other.getSimilarityTopK() != 0) { + setSimilarityTopK(other.getSimilarityTopK()); } - if (other.hasConfidence()) { - setConfidence(other.getConfidence()); + switch (other.getQueryCase()) { + case TEXT: + { + queryCase_ = 1; + query_ = other.query_; + onChanged(); + break; + } + case QUERY_NOT_SET: + { + break; + } } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); @@ -547,24 +552,19 @@ public Builder mergeFrom( case 0: done = true; break; - case 13: + case 10: { - score_ = input.readFloat(); - bitField0_ |= 0x00000001; + java.lang.String s = input.readStringRequireUtf8(); + queryCase_ = 1; + query_ = s; break; - } // case 13 - case 18: + } // case 10 + case 16: { - explanation_ = input.readStringRequireUtf8(); + similarityTopK_ = input.readInt32(); bitField0_ |= 0x00000002; break; - } // case 18 - case 29: - { - confidence_ = input.readFloat(); - bitField0_ |= 0x00000004; - break; - } // case 29 + } // case 16 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -582,94 +582,60 @@ public Builder mergeFrom( return this; } - private int bitField0_; + private int queryCase_ = 0; + private java.lang.Object query_; - private float score_; - /** - * - * - *
-     * Output only. ResponseRecall score.
-     * 
- * - * optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return Whether the score field is set. - */ - @java.lang.Override - public boolean hasScore() { - return ((bitField0_ & 0x00000001) != 0); + public QueryCase getQueryCase() { + return QueryCase.forNumber(queryCase_); } - /** - * - * - *
-     * Output only. ResponseRecall score.
-     * 
- * - * optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The score. - */ - @java.lang.Override - public float getScore() { - return score_; - } - /** - * - * - *
-     * Output only. ResponseRecall score.
-     * 
- * - * optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The score to set. - * @return This builder for chaining. - */ - public Builder setScore(float value) { - score_ = value; - bitField0_ |= 0x00000001; + public Builder clearQuery() { + queryCase_ = 0; + query_ = null; onChanged(); return this; } + + private int bitField0_; + /** * * *
-     * Output only. ResponseRecall score.
+     * Optional. The query in text format to get relevant contexts.
      * 
* - * optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string text = 1 [(.google.api.field_behavior) = OPTIONAL]; * - * @return This builder for chaining. + * @return Whether the text field is set. */ - public Builder clearScore() { - bitField0_ = (bitField0_ & ~0x00000001); - score_ = 0F; - onChanged(); - return this; + @java.lang.Override + public boolean hasText() { + return queryCase_ == 1; } - - private java.lang.Object explanation_ = ""; /** * * *
-     * Output only. Explanation for response recall score.
+     * Optional. The query in text format to get relevant contexts.
      * 
* - * string explanation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string text = 1 [(.google.api.field_behavior) = OPTIONAL]; * - * @return The explanation. + * @return The text. */ - public java.lang.String getExplanation() { - java.lang.Object ref = explanation_; + @java.lang.Override + public java.lang.String getText() { + java.lang.Object ref = ""; + if (queryCase_ == 1) { + ref = query_; + } if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - explanation_ = s; + if (queryCase_ == 1) { + query_ = s; + } return s; } else { return (java.lang.String) ref; @@ -679,19 +645,25 @@ public java.lang.String getExplanation() { * * *
-     * Output only. Explanation for response recall score.
+     * Optional. The query in text format to get relevant contexts.
      * 
* - * string explanation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string text = 1 [(.google.api.field_behavior) = OPTIONAL]; * - * @return The bytes for explanation. + * @return The bytes for text. */ - public com.google.protobuf.ByteString getExplanationBytes() { - java.lang.Object ref = explanation_; + @java.lang.Override + public com.google.protobuf.ByteString getTextBytes() { + java.lang.Object ref = ""; + if (queryCase_ == 1) { + ref = query_; + } if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - explanation_ = b; + if (queryCase_ == 1) { + query_ = b; + } return b; } else { return (com.google.protobuf.ByteString) ref; @@ -701,20 +673,20 @@ public com.google.protobuf.ByteString getExplanationBytes() { * * *
-     * Output only. Explanation for response recall score.
+     * Optional. The query in text format to get relevant contexts.
      * 
* - * string explanation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string text = 1 [(.google.api.field_behavior) = OPTIONAL]; * - * @param value The explanation to set. + * @param value The text to set. * @return This builder for chaining. */ - public Builder setExplanation(java.lang.String value) { + public Builder setText(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - explanation_ = value; - bitField0_ |= 0x00000002; + queryCase_ = 1; + query_ = value; onChanged(); return this; } @@ -722,89 +694,76 @@ public Builder setExplanation(java.lang.String value) { * * *
-     * Output only. Explanation for response recall score.
+     * Optional. The query in text format to get relevant contexts.
      * 
* - * string explanation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string text = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ - public Builder clearExplanation() { - explanation_ = getDefaultInstance().getExplanation(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); + public Builder clearText() { + if (queryCase_ == 1) { + queryCase_ = 0; + query_ = null; + onChanged(); + } return this; } /** * * *
-     * Output only. Explanation for response recall score.
+     * Optional. The query in text format to get relevant contexts.
      * 
* - * string explanation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string text = 1 [(.google.api.field_behavior) = OPTIONAL]; * - * @param value The bytes for explanation to set. + * @param value The bytes for text to set. * @return This builder for chaining. */ - public Builder setExplanationBytes(com.google.protobuf.ByteString value) { + public Builder setTextBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); - explanation_ = value; - bitField0_ |= 0x00000002; + queryCase_ = 1; + query_ = value; onChanged(); return this; } - private float confidence_; + private int similarityTopK_; /** * * *
-     * Output only. Confidence for fulfillment score.
+     * Optional. The number of contexts to retrieve.
      * 
* - * optional float confidence = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * int32 similarity_top_k = 2 [(.google.api.field_behavior) = OPTIONAL]; * - * @return Whether the confidence field is set. + * @return The similarityTopK. */ @java.lang.Override - public boolean hasConfidence() { - return ((bitField0_ & 0x00000004) != 0); + public int getSimilarityTopK() { + return similarityTopK_; } /** * * *
-     * Output only. Confidence for fulfillment score.
+     * Optional. The number of contexts to retrieve.
      * 
* - * optional float confidence = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - /** + * int32 similarity_top_k = 2 [(.google.api.field_behavior) = OPTIONAL]; * - * - *
-     * Output only. Confidence for fulfillment score.
-     * 
- * - * optional float confidence = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The confidence to set. + * @param value The similarityTopK to set. * @return This builder for chaining. */ - public Builder setConfidence(float value) { + public Builder setSimilarityTopK(int value) { - confidence_ = value; - bitField0_ |= 0x00000004; + similarityTopK_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -812,16 +771,16 @@ public Builder setConfidence(float value) { * * *
-     * Output only. Confidence for fulfillment score.
+     * Optional. The number of contexts to retrieve.
      * 
* - * optional float confidence = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * int32 similarity_top_k = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ - public Builder clearConfidence() { - bitField0_ = (bitField0_ & ~0x00000004); - confidence_ = 0F; + public Builder clearSimilarityTopK() { + bitField0_ = (bitField0_ & ~0x00000002); + similarityTopK_ = 0; onChanged(); return this; } @@ -837,24 +796,24 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.ResponseRecallResult) + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.RagQuery) } - // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.ResponseRecallResult) - private static final com.google.cloud.aiplatform.v1beta1.ResponseRecallResult DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.RagQuery) + private static final com.google.cloud.aiplatform.v1beta1.RagQuery DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.ResponseRecallResult(); + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.RagQuery(); } - public static com.google.cloud.aiplatform.v1beta1.ResponseRecallResult getDefaultInstance() { + public static com.google.cloud.aiplatform.v1beta1.RagQuery getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public ResponseRecallResult parsePartialFrom( + public RagQuery parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -873,17 +832,17 @@ public ResponseRecallResult parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.cloud.aiplatform.v1beta1.ResponseRecallResult getDefaultInstanceForType() { + public com.google.cloud.aiplatform.v1beta1.RagQuery getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RagQueryOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RagQueryOrBuilder.java new file mode 100644 index 000000000000..6f887ab51e0c --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RagQueryOrBuilder.java @@ -0,0 +1,78 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/vertex_rag_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +public interface RagQueryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.RagQuery) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. The query in text format to get relevant contexts.
+   * 
+ * + * string text = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the text field is set. + */ + boolean hasText(); + /** + * + * + *
+   * Optional. The query in text format to get relevant contexts.
+   * 
+ * + * string text = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The text. + */ + java.lang.String getText(); + /** + * + * + *
+   * Optional. The query in text format to get relevant contexts.
+   * 
+ * + * string text = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for text. + */ + com.google.protobuf.ByteString getTextBytes(); + + /** + * + * + *
+   * Optional. The number of contexts to retrieve.
+   * 
+ * + * int32 similarity_top_k = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The similarityTopK. + */ + int getSimilarityTopK(); + + com.google.cloud.aiplatform.v1beta1.RagQuery.QueryCase getQueryCase(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RebootPersistentResourceOperationMetadata.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RebootPersistentResourceOperationMetadata.java new file mode 100644 index 000000000000..985df53c97b2 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RebootPersistentResourceOperationMetadata.java @@ -0,0 +1,942 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/persistent_resource_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Details of operations that perform reboot PersistentResource.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.RebootPersistentResourceOperationMetadata} + */ +public final class RebootPersistentResourceOperationMetadata + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.RebootPersistentResourceOperationMetadata) + RebootPersistentResourceOperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use RebootPersistentResourceOperationMetadata.newBuilder() to construct. + private RebootPersistentResourceOperationMetadata( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RebootPersistentResourceOperationMetadata() { + progressMessage_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RebootPersistentResourceOperationMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.PersistentResourceServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_RebootPersistentResourceOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.PersistentResourceServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_RebootPersistentResourceOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceOperationMetadata.class, + com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceOperationMetadata.Builder + .class); + } + + private int bitField0_; + public static final int GENERIC_METADATA_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata genericMetadata_; + /** + * + * + *
+   * Operation metadata for PersistentResource.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + @java.lang.Override + public boolean hasGenericMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Operation metadata for PersistentResource.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata getGenericMetadata() { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + /** + * + * + *
+   * Operation metadata for PersistentResource.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder() { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + + public static final int PROGRESS_MESSAGE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object progressMessage_ = ""; + /** + * + * + *
+   * Progress Message for Reboot LRO
+   * 
+ * + * string progress_message = 2; + * + * @return The progressMessage. + */ + @java.lang.Override + public java.lang.String getProgressMessage() { + java.lang.Object ref = progressMessage_; + 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(); + progressMessage_ = s; + return s; + } + } + /** + * + * + *
+   * Progress Message for Reboot LRO
+   * 
+ * + * string progress_message = 2; + * + * @return The bytes for progressMessage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProgressMessageBytes() { + java.lang.Object ref = progressMessage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + progressMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getGenericMetadata()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(progressMessage_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, progressMessage_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getGenericMetadata()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(progressMessage_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, progressMessage_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceOperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceOperationMetadata other = + (com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceOperationMetadata) obj; + + if (hasGenericMetadata() != other.hasGenericMetadata()) return false; + if (hasGenericMetadata()) { + if (!getGenericMetadata().equals(other.getGenericMetadata())) return false; + } + if (!getProgressMessage().equals(other.getProgressMessage())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasGenericMetadata()) { + hash = (37 * hash) + GENERIC_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getGenericMetadata().hashCode(); + } + hash = (37 * hash) + PROGRESS_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getProgressMessage().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceOperationMetadata + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceOperationMetadata + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceOperationMetadata + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceOperationMetadata + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceOperationMetadata + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceOperationMetadata + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceOperationMetadata + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceOperationMetadata + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceOperationMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceOperationMetadata + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceOperationMetadata + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceOperationMetadata + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceOperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Details of operations that perform reboot PersistentResource.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.RebootPersistentResourceOperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.RebootPersistentResourceOperationMetadata) + com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceOperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.PersistentResourceServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_RebootPersistentResourceOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.PersistentResourceServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_RebootPersistentResourceOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceOperationMetadata.class, + com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceOperationMetadata.Builder + .class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceOperationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getGenericMetadataFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + genericMetadata_ = null; + if (genericMetadataBuilder_ != null) { + genericMetadataBuilder_.dispose(); + genericMetadataBuilder_ = null; + } + progressMessage_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.PersistentResourceServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_RebootPersistentResourceOperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceOperationMetadata + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceOperationMetadata + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceOperationMetadata build() { + com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceOperationMetadata result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceOperationMetadata + buildPartial() { + com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceOperationMetadata result = + new com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceOperationMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceOperationMetadata result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.genericMetadata_ = + genericMetadataBuilder_ == null ? genericMetadata_ : genericMetadataBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.progressMessage_ = progressMessage_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceOperationMetadata) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceOperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceOperationMetadata other) { + if (other + == com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceOperationMetadata + .getDefaultInstance()) return this; + if (other.hasGenericMetadata()) { + mergeGenericMetadata(other.getGenericMetadata()); + } + if (!other.getProgressMessage().isEmpty()) { + progressMessage_ = other.progressMessage_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getGenericMetadataFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + progressMessage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata genericMetadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadataOrBuilder> + genericMetadataBuilder_; + /** + * + * + *
+     * Operation metadata for PersistentResource.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + public boolean hasGenericMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Operation metadata for PersistentResource.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + public com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata getGenericMetadata() { + if (genericMetadataBuilder_ == null) { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } else { + return genericMetadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Operation metadata for PersistentResource.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder setGenericMetadata( + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata value) { + if (genericMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + genericMetadata_ = value; + } else { + genericMetadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation metadata for PersistentResource.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder setGenericMetadata( + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.Builder builderForValue) { + if (genericMetadataBuilder_ == null) { + genericMetadata_ = builderForValue.build(); + } else { + genericMetadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation metadata for PersistentResource.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder mergeGenericMetadata( + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata value) { + if (genericMetadataBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && genericMetadata_ != null + && genericMetadata_ + != com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata + .getDefaultInstance()) { + getGenericMetadataBuilder().mergeFrom(value); + } else { + genericMetadata_ = value; + } + } else { + genericMetadataBuilder_.mergeFrom(value); + } + if (genericMetadata_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Operation metadata for PersistentResource.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder clearGenericMetadata() { + bitField0_ = (bitField0_ & ~0x00000001); + genericMetadata_ = null; + if (genericMetadataBuilder_ != null) { + genericMetadataBuilder_.dispose(); + genericMetadataBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Operation metadata for PersistentResource.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + public com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.Builder + getGenericMetadataBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getGenericMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Operation metadata for PersistentResource.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + public com.google.cloud.aiplatform.v1beta1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder() { + if (genericMetadataBuilder_ != null) { + return genericMetadataBuilder_.getMessageOrBuilder(); + } else { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + } + /** + * + * + *
+     * Operation metadata for PersistentResource.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadataOrBuilder> + getGenericMetadataFieldBuilder() { + if (genericMetadataBuilder_ == null) { + genericMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadataOrBuilder>( + getGenericMetadata(), getParentForChildren(), isClean()); + genericMetadata_ = null; + } + return genericMetadataBuilder_; + } + + private java.lang.Object progressMessage_ = ""; + /** + * + * + *
+     * Progress Message for Reboot LRO
+     * 
+ * + * string progress_message = 2; + * + * @return The progressMessage. + */ + public java.lang.String getProgressMessage() { + java.lang.Object ref = progressMessage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + progressMessage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Progress Message for Reboot LRO
+     * 
+ * + * string progress_message = 2; + * + * @return The bytes for progressMessage. + */ + public com.google.protobuf.ByteString getProgressMessageBytes() { + java.lang.Object ref = progressMessage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + progressMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Progress Message for Reboot LRO
+     * 
+ * + * string progress_message = 2; + * + * @param value The progressMessage to set. + * @return This builder for chaining. + */ + public Builder setProgressMessage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + progressMessage_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Progress Message for Reboot LRO
+     * 
+ * + * string progress_message = 2; + * + * @return This builder for chaining. + */ + public Builder clearProgressMessage() { + progressMessage_ = getDefaultInstance().getProgressMessage(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Progress Message for Reboot LRO
+     * 
+ * + * string progress_message = 2; + * + * @param value The bytes for progressMessage to set. + * @return This builder for chaining. + */ + public Builder setProgressMessageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + progressMessage_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.RebootPersistentResourceOperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.RebootPersistentResourceOperationMetadata) + private static final com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceOperationMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceOperationMetadata(); + } + + public static com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceOperationMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RebootPersistentResourceOperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceOperationMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RebootPersistentResourceOperationMetadataOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RebootPersistentResourceOperationMetadataOrBuilder.java new file mode 100644 index 000000000000..ce8154ce6794 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RebootPersistentResourceOperationMetadataOrBuilder.java @@ -0,0 +1,87 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/persistent_resource_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +public interface RebootPersistentResourceOperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.RebootPersistentResourceOperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Operation metadata for PersistentResource.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + boolean hasGenericMetadata(); + /** + * + * + *
+   * Operation metadata for PersistentResource.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata getGenericMetadata(); + /** + * + * + *
+   * Operation metadata for PersistentResource.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder(); + + /** + * + * + *
+   * Progress Message for Reboot LRO
+   * 
+ * + * string progress_message = 2; + * + * @return The progressMessage. + */ + java.lang.String getProgressMessage(); + /** + * + * + *
+   * Progress Message for Reboot LRO
+   * 
+ * + * string progress_message = 2; + * + * @return The bytes for progressMessage. + */ + com.google.protobuf.ByteString getProgressMessageBytes(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RebootPersistentResourceRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RebootPersistentResourceRequest.java new file mode 100644 index 000000000000..dd347ef99bea --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RebootPersistentResourceRequest.java @@ -0,0 +1,668 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/persistent_resource_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Request message for
+ * [PersistentResourceService.RebootPersistentResource][google.cloud.aiplatform.v1beta1.PersistentResourceService.RebootPersistentResource].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.RebootPersistentResourceRequest} + */ +public final class RebootPersistentResourceRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.RebootPersistentResourceRequest) + RebootPersistentResourceRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use RebootPersistentResourceRequest.newBuilder() to construct. + private RebootPersistentResourceRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RebootPersistentResourceRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RebootPersistentResourceRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.PersistentResourceServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_RebootPersistentResourceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.PersistentResourceServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_RebootPersistentResourceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceRequest.class, + com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the PersistentResource resource.
+   * Format:
+   * `projects/{project_id_or_number}/locations/{location_id}/persistentResources/{persistent_resource_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the PersistentResource resource.
+   * Format:
+   * `projects/{project_id_or_number}/locations/{location_id}/persistentResources/{persistent_resource_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceRequest other = + (com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for
+   * [PersistentResourceService.RebootPersistentResource][google.cloud.aiplatform.v1beta1.PersistentResourceService.RebootPersistentResource].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.RebootPersistentResourceRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.RebootPersistentResourceRequest) + com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.PersistentResourceServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_RebootPersistentResourceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.PersistentResourceServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_RebootPersistentResourceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceRequest.class, + com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceRequest.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.PersistentResourceServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_RebootPersistentResourceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceRequest + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceRequest build() { + com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceRequest buildPartial() { + com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceRequest result = + new com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceRequest) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceRequest other) { + if (other + == com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the PersistentResource resource.
+     * Format:
+     * `projects/{project_id_or_number}/locations/{location_id}/persistentResources/{persistent_resource_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the PersistentResource resource.
+     * Format:
+     * `projects/{project_id_or_number}/locations/{location_id}/persistentResources/{persistent_resource_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the PersistentResource resource.
+     * Format:
+     * `projects/{project_id_or_number}/locations/{location_id}/persistentResources/{persistent_resource_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the PersistentResource resource.
+     * Format:
+     * `projects/{project_id_or_number}/locations/{location_id}/persistentResources/{persistent_resource_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the PersistentResource resource.
+     * Format:
+     * `projects/{project_id_or_number}/locations/{location_id}/persistentResources/{persistent_resource_id}`
+     * 
+ * + * + * 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. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.RebootPersistentResourceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.RebootPersistentResourceRequest) + private static final com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceRequest(); + } + + public static com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RebootPersistentResourceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RebootPersistentResourceRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RebootPersistentResourceRequestOrBuilder.java new file mode 100644 index 000000000000..4e7141a76ba9 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RebootPersistentResourceRequestOrBuilder.java @@ -0,0 +1,59 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/persistent_resource_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +public interface RebootPersistentResourceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.RebootPersistentResourceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the PersistentResource resource.
+   * Format:
+   * `projects/{project_id_or_number}/locations/{location_id}/persistentResources/{persistent_resource_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the PersistentResource resource.
+   * Format:
+   * `projects/{project_id_or_number}/locations/{location_id}/persistentResources/{persistent_resource_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ResourceRuntime.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ResourceRuntime.java index 64648ba97f34..14cac4aa4a04 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ResourceRuntime.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ResourceRuntime.java @@ -38,7 +38,9 @@ private ResourceRuntime(com.google.protobuf.GeneratedMessageV3.Builder builde super(builder); } - private ResourceRuntime() {} + private ResourceRuntime() { + notebookRuntimeTemplate_ = ""; + } @java.lang.Override @SuppressWarnings({"unused"}) @@ -199,6 +201,69 @@ public java.lang.String getAccessUrisOrThrow(java.lang.String key) { return map.get(key); } + public static final int NOTEBOOK_RUNTIME_TEMPLATE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object notebookRuntimeTemplate_ = ""; + /** + * + * + *
+   * Output only. The resource name of NotebookRuntimeTemplate for the RoV
+   * Persistent Cluster The NotebokRuntimeTemplate is created in the same VPC
+   * (if set), and with the same Ray and Python version as the Persistent
+   * Cluster. Example:
+   *   "projects/1000/locations/us-central1/notebookRuntimeTemplates/abc123"
+   * 
+ * + * + * string notebook_runtime_template = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The notebookRuntimeTemplate. + */ + @java.lang.Override + public java.lang.String getNotebookRuntimeTemplate() { + java.lang.Object ref = notebookRuntimeTemplate_; + 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(); + notebookRuntimeTemplate_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The resource name of NotebookRuntimeTemplate for the RoV
+   * Persistent Cluster The NotebokRuntimeTemplate is created in the same VPC
+   * (if set), and with the same Ray and Python version as the Persistent
+   * Cluster. Example:
+   *   "projects/1000/locations/us-central1/notebookRuntimeTemplates/abc123"
+   * 
+ * + * + * string notebook_runtime_template = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for notebookRuntimeTemplate. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNotebookRuntimeTemplateBytes() { + java.lang.Object ref = notebookRuntimeTemplate_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + notebookRuntimeTemplate_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -215,6 +280,9 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetAccessUris(), AccessUrisDefaultEntryHolder.defaultEntry, 1); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(notebookRuntimeTemplate_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, notebookRuntimeTemplate_); + } getUnknownFields().writeTo(output); } @@ -234,6 +302,9 @@ public int getSerializedSize() { .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, accessUris__); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(notebookRuntimeTemplate_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, notebookRuntimeTemplate_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -251,6 +322,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.aiplatform.v1beta1.ResourceRuntime) obj; if (!internalGetAccessUris().equals(other.internalGetAccessUris())) return false; + if (!getNotebookRuntimeTemplate().equals(other.getNotebookRuntimeTemplate())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -266,6 +338,8 @@ public int hashCode() { hash = (37 * hash) + ACCESS_URIS_FIELD_NUMBER; hash = (53 * hash) + internalGetAccessUris().hashCode(); } + hash = (37 * hash) + NOTEBOOK_RUNTIME_TEMPLATE_FIELD_NUMBER; + hash = (53 * hash) + getNotebookRuntimeTemplate().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -428,6 +502,7 @@ public Builder clear() { super.clear(); bitField0_ = 0; internalGetMutableAccessUris().clear(); + notebookRuntimeTemplate_ = ""; return this; } @@ -468,6 +543,9 @@ private void buildPartial0(com.google.cloud.aiplatform.v1beta1.ResourceRuntime r result.accessUris_ = internalGetAccessUris(); result.accessUris_.makeImmutable(); } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.notebookRuntimeTemplate_ = notebookRuntimeTemplate_; + } } @java.lang.Override @@ -518,6 +596,11 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.ResourceRuntime oth return this; internalGetMutableAccessUris().mergeFrom(other.internalGetAccessUris()); bitField0_ |= 0x00000001; + if (!other.getNotebookRuntimeTemplate().isEmpty()) { + notebookRuntimeTemplate_ = other.notebookRuntimeTemplate_; + bitField0_ |= 0x00000002; + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -556,6 +639,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000001; break; } // case 10 + case 18: + { + notebookRuntimeTemplate_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -783,6 +872,142 @@ public Builder putAllAccessUris(java.util.Map + * Output only. The resource name of NotebookRuntimeTemplate for the RoV + * Persistent Cluster The NotebokRuntimeTemplate is created in the same VPC + * (if set), and with the same Ray and Python version as the Persistent + * Cluster. Example: + * "projects/1000/locations/us-central1/notebookRuntimeTemplates/abc123" + * + * + * + * string notebook_runtime_template = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The notebookRuntimeTemplate. + */ + public java.lang.String getNotebookRuntimeTemplate() { + java.lang.Object ref = notebookRuntimeTemplate_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + notebookRuntimeTemplate_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The resource name of NotebookRuntimeTemplate for the RoV
+     * Persistent Cluster The NotebokRuntimeTemplate is created in the same VPC
+     * (if set), and with the same Ray and Python version as the Persistent
+     * Cluster. Example:
+     *   "projects/1000/locations/us-central1/notebookRuntimeTemplates/abc123"
+     * 
+ * + * + * string notebook_runtime_template = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for notebookRuntimeTemplate. + */ + public com.google.protobuf.ByteString getNotebookRuntimeTemplateBytes() { + java.lang.Object ref = notebookRuntimeTemplate_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + notebookRuntimeTemplate_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The resource name of NotebookRuntimeTemplate for the RoV
+     * Persistent Cluster The NotebokRuntimeTemplate is created in the same VPC
+     * (if set), and with the same Ray and Python version as the Persistent
+     * Cluster. Example:
+     *   "projects/1000/locations/us-central1/notebookRuntimeTemplates/abc123"
+     * 
+ * + * + * string notebook_runtime_template = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The notebookRuntimeTemplate to set. + * @return This builder for chaining. + */ + public Builder setNotebookRuntimeTemplate(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + notebookRuntimeTemplate_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The resource name of NotebookRuntimeTemplate for the RoV
+     * Persistent Cluster The NotebokRuntimeTemplate is created in the same VPC
+     * (if set), and with the same Ray and Python version as the Persistent
+     * Cluster. Example:
+     *   "projects/1000/locations/us-central1/notebookRuntimeTemplates/abc123"
+     * 
+ * + * + * string notebook_runtime_template = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearNotebookRuntimeTemplate() { + notebookRuntimeTemplate_ = getDefaultInstance().getNotebookRuntimeTemplate(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The resource name of NotebookRuntimeTemplate for the RoV
+     * Persistent Cluster The NotebokRuntimeTemplate is created in the same VPC
+     * (if set), and with the same Ray and Python version as the Persistent
+     * Cluster. Example:
+     *   "projects/1000/locations/us-central1/notebookRuntimeTemplates/abc123"
+     * 
+ * + * + * string notebook_runtime_template = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for notebookRuntimeTemplate to set. + * @return This builder for chaining. + */ + public Builder setNotebookRuntimeTemplateBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + notebookRuntimeTemplate_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ResourceRuntimeOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ResourceRuntimeOrBuilder.java index f8a2c027d870..0f4ab24ac317 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ResourceRuntimeOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ResourceRuntimeOrBuilder.java @@ -111,4 +111,41 @@ java.lang.String getAccessUrisOrDefault( * */ java.lang.String getAccessUrisOrThrow(java.lang.String key); + + /** + * + * + *
+   * Output only. The resource name of NotebookRuntimeTemplate for the RoV
+   * Persistent Cluster The NotebokRuntimeTemplate is created in the same VPC
+   * (if set), and with the same Ray and Python version as the Persistent
+   * Cluster. Example:
+   *   "projects/1000/locations/us-central1/notebookRuntimeTemplates/abc123"
+   * 
+ * + * + * string notebook_runtime_template = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The notebookRuntimeTemplate. + */ + java.lang.String getNotebookRuntimeTemplate(); + /** + * + * + *
+   * Output only. The resource name of NotebookRuntimeTemplate for the RoV
+   * Persistent Cluster The NotebokRuntimeTemplate is created in the same VPC
+   * (if set), and with the same Ray and Python version as the Persistent
+   * Cluster. Example:
+   *   "projects/1000/locations/us-central1/notebookRuntimeTemplates/abc123"
+   * 
+ * + * + * string notebook_runtime_template = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for notebookRuntimeTemplate. + */ + com.google.protobuf.ByteString getNotebookRuntimeTemplateBytes(); } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ResponseRecallInput.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ResponseRecallInput.java deleted file mode 100644 index e1a1398e340f..000000000000 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ResponseRecallInput.java +++ /dev/null @@ -1,1046 +0,0 @@ -/* - * Copyright 2024 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/aiplatform/v1beta1/evaluation_service.proto - -// Protobuf Java Version: 3.25.2 -package com.google.cloud.aiplatform.v1beta1; - -/** - * - * - *
- * Input for response recall metric.
- * 
- * - * Protobuf type {@code google.cloud.aiplatform.v1beta1.ResponseRecallInput} - */ -public final class ResponseRecallInput extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.ResponseRecallInput) - ResponseRecallInputOrBuilder { - private static final long serialVersionUID = 0L; - // Use ResponseRecallInput.newBuilder() to construct. - private ResponseRecallInput(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ResponseRecallInput() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ResponseRecallInput(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.aiplatform.v1beta1.EvaluationServiceProto - .internal_static_google_cloud_aiplatform_v1beta1_ResponseRecallInput_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.aiplatform.v1beta1.EvaluationServiceProto - .internal_static_google_cloud_aiplatform_v1beta1_ResponseRecallInput_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.aiplatform.v1beta1.ResponseRecallInput.class, - com.google.cloud.aiplatform.v1beta1.ResponseRecallInput.Builder.class); - } - - private int bitField0_; - public static final int METRIC_SPEC_FIELD_NUMBER = 1; - private com.google.cloud.aiplatform.v1beta1.ResponseRecallSpec metricSpec_; - /** - * - * - *
-   * Required. Spec for response recall score metric.
-   * 
- * - * - * .google.cloud.aiplatform.v1beta1.ResponseRecallSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the metricSpec field is set. - */ - @java.lang.Override - public boolean hasMetricSpec() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * - * - *
-   * Required. Spec for response recall score metric.
-   * 
- * - * - * .google.cloud.aiplatform.v1beta1.ResponseRecallSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The metricSpec. - */ - @java.lang.Override - public com.google.cloud.aiplatform.v1beta1.ResponseRecallSpec getMetricSpec() { - return metricSpec_ == null - ? com.google.cloud.aiplatform.v1beta1.ResponseRecallSpec.getDefaultInstance() - : metricSpec_; - } - /** - * - * - *
-   * Required. Spec for response recall score metric.
-   * 
- * - * - * .google.cloud.aiplatform.v1beta1.ResponseRecallSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.aiplatform.v1beta1.ResponseRecallSpecOrBuilder getMetricSpecOrBuilder() { - return metricSpec_ == null - ? com.google.cloud.aiplatform.v1beta1.ResponseRecallSpec.getDefaultInstance() - : metricSpec_; - } - - public static final int INSTANCE_FIELD_NUMBER = 2; - private com.google.cloud.aiplatform.v1beta1.ResponseRecallInstance instance_; - /** - * - * - *
-   * Required. Response recall instance.
-   * 
- * - * - * .google.cloud.aiplatform.v1beta1.ResponseRecallInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the instance field is set. - */ - @java.lang.Override - public boolean hasInstance() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * - * - *
-   * Required. Response recall instance.
-   * 
- * - * - * .google.cloud.aiplatform.v1beta1.ResponseRecallInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The instance. - */ - @java.lang.Override - public com.google.cloud.aiplatform.v1beta1.ResponseRecallInstance getInstance() { - return instance_ == null - ? com.google.cloud.aiplatform.v1beta1.ResponseRecallInstance.getDefaultInstance() - : instance_; - } - /** - * - * - *
-   * Required. Response recall instance.
-   * 
- * - * - * .google.cloud.aiplatform.v1beta1.ResponseRecallInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.aiplatform.v1beta1.ResponseRecallInstanceOrBuilder - getInstanceOrBuilder() { - return instance_ == null - ? com.google.cloud.aiplatform.v1beta1.ResponseRecallInstance.getDefaultInstance() - : instance_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getMetricSpec()); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(2, getInstance()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getMetricSpec()); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getInstance()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.ResponseRecallInput)) { - return super.equals(obj); - } - com.google.cloud.aiplatform.v1beta1.ResponseRecallInput other = - (com.google.cloud.aiplatform.v1beta1.ResponseRecallInput) obj; - - if (hasMetricSpec() != other.hasMetricSpec()) return false; - if (hasMetricSpec()) { - if (!getMetricSpec().equals(other.getMetricSpec())) return false; - } - if (hasInstance() != other.hasInstance()) return false; - if (hasInstance()) { - if (!getInstance().equals(other.getInstance())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasMetricSpec()) { - hash = (37 * hash) + METRIC_SPEC_FIELD_NUMBER; - hash = (53 * hash) + getMetricSpec().hashCode(); - } - if (hasInstance()) { - hash = (37 * hash) + INSTANCE_FIELD_NUMBER; - hash = (53 * hash) + getInstance().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.aiplatform.v1beta1.ResponseRecallInput parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.aiplatform.v1beta1.ResponseRecallInput parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.aiplatform.v1beta1.ResponseRecallInput parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.aiplatform.v1beta1.ResponseRecallInput parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.aiplatform.v1beta1.ResponseRecallInput parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.aiplatform.v1beta1.ResponseRecallInput parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.aiplatform.v1beta1.ResponseRecallInput parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.aiplatform.v1beta1.ResponseRecallInput parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.aiplatform.v1beta1.ResponseRecallInput parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.aiplatform.v1beta1.ResponseRecallInput parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.aiplatform.v1beta1.ResponseRecallInput parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.aiplatform.v1beta1.ResponseRecallInput parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.aiplatform.v1beta1.ResponseRecallInput prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Input for response recall metric.
-   * 
- * - * Protobuf type {@code google.cloud.aiplatform.v1beta1.ResponseRecallInput} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.ResponseRecallInput) - com.google.cloud.aiplatform.v1beta1.ResponseRecallInputOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.aiplatform.v1beta1.EvaluationServiceProto - .internal_static_google_cloud_aiplatform_v1beta1_ResponseRecallInput_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.aiplatform.v1beta1.EvaluationServiceProto - .internal_static_google_cloud_aiplatform_v1beta1_ResponseRecallInput_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.aiplatform.v1beta1.ResponseRecallInput.class, - com.google.cloud.aiplatform.v1beta1.ResponseRecallInput.Builder.class); - } - - // Construct using com.google.cloud.aiplatform.v1beta1.ResponseRecallInput.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getMetricSpecFieldBuilder(); - getInstanceFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - metricSpec_ = null; - if (metricSpecBuilder_ != null) { - metricSpecBuilder_.dispose(); - metricSpecBuilder_ = null; - } - instance_ = null; - if (instanceBuilder_ != null) { - instanceBuilder_.dispose(); - instanceBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.aiplatform.v1beta1.EvaluationServiceProto - .internal_static_google_cloud_aiplatform_v1beta1_ResponseRecallInput_descriptor; - } - - @java.lang.Override - public com.google.cloud.aiplatform.v1beta1.ResponseRecallInput getDefaultInstanceForType() { - return com.google.cloud.aiplatform.v1beta1.ResponseRecallInput.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.aiplatform.v1beta1.ResponseRecallInput build() { - com.google.cloud.aiplatform.v1beta1.ResponseRecallInput result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.aiplatform.v1beta1.ResponseRecallInput buildPartial() { - com.google.cloud.aiplatform.v1beta1.ResponseRecallInput result = - new com.google.cloud.aiplatform.v1beta1.ResponseRecallInput(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.aiplatform.v1beta1.ResponseRecallInput result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.metricSpec_ = metricSpecBuilder_ == null ? metricSpec_ : metricSpecBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.instance_ = instanceBuilder_ == null ? instance_ : instanceBuilder_.build(); - to_bitField0_ |= 0x00000002; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.aiplatform.v1beta1.ResponseRecallInput) { - return mergeFrom((com.google.cloud.aiplatform.v1beta1.ResponseRecallInput) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.ResponseRecallInput other) { - if (other == com.google.cloud.aiplatform.v1beta1.ResponseRecallInput.getDefaultInstance()) - return this; - if (other.hasMetricSpec()) { - mergeMetricSpec(other.getMetricSpec()); - } - if (other.hasInstance()) { - mergeInstance(other.getInstance()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - input.readMessage(getMetricSpecFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - input.readMessage(getInstanceFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private com.google.cloud.aiplatform.v1beta1.ResponseRecallSpec metricSpec_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.aiplatform.v1beta1.ResponseRecallSpec, - com.google.cloud.aiplatform.v1beta1.ResponseRecallSpec.Builder, - com.google.cloud.aiplatform.v1beta1.ResponseRecallSpecOrBuilder> - metricSpecBuilder_; - /** - * - * - *
-     * Required. Spec for response recall score metric.
-     * 
- * - * - * .google.cloud.aiplatform.v1beta1.ResponseRecallSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the metricSpec field is set. - */ - public boolean hasMetricSpec() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * - * - *
-     * Required. Spec for response recall score metric.
-     * 
- * - * - * .google.cloud.aiplatform.v1beta1.ResponseRecallSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The metricSpec. - */ - public com.google.cloud.aiplatform.v1beta1.ResponseRecallSpec getMetricSpec() { - if (metricSpecBuilder_ == null) { - return metricSpec_ == null - ? com.google.cloud.aiplatform.v1beta1.ResponseRecallSpec.getDefaultInstance() - : metricSpec_; - } else { - return metricSpecBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. Spec for response recall score metric.
-     * 
- * - * - * .google.cloud.aiplatform.v1beta1.ResponseRecallSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setMetricSpec(com.google.cloud.aiplatform.v1beta1.ResponseRecallSpec value) { - if (metricSpecBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - metricSpec_ = value; - } else { - metricSpecBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Spec for response recall score metric.
-     * 
- * - * - * .google.cloud.aiplatform.v1beta1.ResponseRecallSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setMetricSpec( - com.google.cloud.aiplatform.v1beta1.ResponseRecallSpec.Builder builderForValue) { - if (metricSpecBuilder_ == null) { - metricSpec_ = builderForValue.build(); - } else { - metricSpecBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Spec for response recall score metric.
-     * 
- * - * - * .google.cloud.aiplatform.v1beta1.ResponseRecallSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeMetricSpec(com.google.cloud.aiplatform.v1beta1.ResponseRecallSpec value) { - if (metricSpecBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) - && metricSpec_ != null - && metricSpec_ - != com.google.cloud.aiplatform.v1beta1.ResponseRecallSpec.getDefaultInstance()) { - getMetricSpecBuilder().mergeFrom(value); - } else { - metricSpec_ = value; - } - } else { - metricSpecBuilder_.mergeFrom(value); - } - if (metricSpec_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * - * - *
-     * Required. Spec for response recall score metric.
-     * 
- * - * - * .google.cloud.aiplatform.v1beta1.ResponseRecallSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearMetricSpec() { - bitField0_ = (bitField0_ & ~0x00000001); - metricSpec_ = null; - if (metricSpecBuilder_ != null) { - metricSpecBuilder_.dispose(); - metricSpecBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Spec for response recall score metric.
-     * 
- * - * - * .google.cloud.aiplatform.v1beta1.ResponseRecallSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.aiplatform.v1beta1.ResponseRecallSpec.Builder getMetricSpecBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getMetricSpecFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. Spec for response recall score metric.
-     * 
- * - * - * .google.cloud.aiplatform.v1beta1.ResponseRecallSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.aiplatform.v1beta1.ResponseRecallSpecOrBuilder - getMetricSpecOrBuilder() { - if (metricSpecBuilder_ != null) { - return metricSpecBuilder_.getMessageOrBuilder(); - } else { - return metricSpec_ == null - ? com.google.cloud.aiplatform.v1beta1.ResponseRecallSpec.getDefaultInstance() - : metricSpec_; - } - } - /** - * - * - *
-     * Required. Spec for response recall score metric.
-     * 
- * - * - * .google.cloud.aiplatform.v1beta1.ResponseRecallSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.aiplatform.v1beta1.ResponseRecallSpec, - com.google.cloud.aiplatform.v1beta1.ResponseRecallSpec.Builder, - com.google.cloud.aiplatform.v1beta1.ResponseRecallSpecOrBuilder> - getMetricSpecFieldBuilder() { - if (metricSpecBuilder_ == null) { - metricSpecBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.aiplatform.v1beta1.ResponseRecallSpec, - com.google.cloud.aiplatform.v1beta1.ResponseRecallSpec.Builder, - com.google.cloud.aiplatform.v1beta1.ResponseRecallSpecOrBuilder>( - getMetricSpec(), getParentForChildren(), isClean()); - metricSpec_ = null; - } - return metricSpecBuilder_; - } - - private com.google.cloud.aiplatform.v1beta1.ResponseRecallInstance instance_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.aiplatform.v1beta1.ResponseRecallInstance, - com.google.cloud.aiplatform.v1beta1.ResponseRecallInstance.Builder, - com.google.cloud.aiplatform.v1beta1.ResponseRecallInstanceOrBuilder> - instanceBuilder_; - /** - * - * - *
-     * Required. Response recall instance.
-     * 
- * - * - * .google.cloud.aiplatform.v1beta1.ResponseRecallInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the instance field is set. - */ - public boolean hasInstance() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * - * - *
-     * Required. Response recall instance.
-     * 
- * - * - * .google.cloud.aiplatform.v1beta1.ResponseRecallInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The instance. - */ - public com.google.cloud.aiplatform.v1beta1.ResponseRecallInstance getInstance() { - if (instanceBuilder_ == null) { - return instance_ == null - ? com.google.cloud.aiplatform.v1beta1.ResponseRecallInstance.getDefaultInstance() - : instance_; - } else { - return instanceBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. Response recall instance.
-     * 
- * - * - * .google.cloud.aiplatform.v1beta1.ResponseRecallInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setInstance(com.google.cloud.aiplatform.v1beta1.ResponseRecallInstance value) { - if (instanceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - instance_ = value; - } else { - instanceBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Response recall instance.
-     * 
- * - * - * .google.cloud.aiplatform.v1beta1.ResponseRecallInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setInstance( - com.google.cloud.aiplatform.v1beta1.ResponseRecallInstance.Builder builderForValue) { - if (instanceBuilder_ == null) { - instance_ = builderForValue.build(); - } else { - instanceBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Response recall instance.
-     * 
- * - * - * .google.cloud.aiplatform.v1beta1.ResponseRecallInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeInstance(com.google.cloud.aiplatform.v1beta1.ResponseRecallInstance value) { - if (instanceBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && instance_ != null - && instance_ - != com.google.cloud.aiplatform.v1beta1.ResponseRecallInstance - .getDefaultInstance()) { - getInstanceBuilder().mergeFrom(value); - } else { - instance_ = value; - } - } else { - instanceBuilder_.mergeFrom(value); - } - if (instance_ != null) { - bitField0_ |= 0x00000002; - onChanged(); - } - return this; - } - /** - * - * - *
-     * Required. Response recall instance.
-     * 
- * - * - * .google.cloud.aiplatform.v1beta1.ResponseRecallInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearInstance() { - bitField0_ = (bitField0_ & ~0x00000002); - instance_ = null; - if (instanceBuilder_ != null) { - instanceBuilder_.dispose(); - instanceBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Response recall instance.
-     * 
- * - * - * .google.cloud.aiplatform.v1beta1.ResponseRecallInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.aiplatform.v1beta1.ResponseRecallInstance.Builder getInstanceBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getInstanceFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. Response recall instance.
-     * 
- * - * - * .google.cloud.aiplatform.v1beta1.ResponseRecallInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.aiplatform.v1beta1.ResponseRecallInstanceOrBuilder - getInstanceOrBuilder() { - if (instanceBuilder_ != null) { - return instanceBuilder_.getMessageOrBuilder(); - } else { - return instance_ == null - ? com.google.cloud.aiplatform.v1beta1.ResponseRecallInstance.getDefaultInstance() - : instance_; - } - } - /** - * - * - *
-     * Required. Response recall instance.
-     * 
- * - * - * .google.cloud.aiplatform.v1beta1.ResponseRecallInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.aiplatform.v1beta1.ResponseRecallInstance, - com.google.cloud.aiplatform.v1beta1.ResponseRecallInstance.Builder, - com.google.cloud.aiplatform.v1beta1.ResponseRecallInstanceOrBuilder> - getInstanceFieldBuilder() { - if (instanceBuilder_ == null) { - instanceBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.aiplatform.v1beta1.ResponseRecallInstance, - com.google.cloud.aiplatform.v1beta1.ResponseRecallInstance.Builder, - com.google.cloud.aiplatform.v1beta1.ResponseRecallInstanceOrBuilder>( - getInstance(), getParentForChildren(), isClean()); - instance_ = null; - } - return instanceBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.ResponseRecallInput) - } - - // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.ResponseRecallInput) - private static final com.google.cloud.aiplatform.v1beta1.ResponseRecallInput DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.ResponseRecallInput(); - } - - public static com.google.cloud.aiplatform.v1beta1.ResponseRecallInput getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ResponseRecallInput parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.aiplatform.v1beta1.ResponseRecallInput getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ResponseRecallInputOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ResponseRecallInputOrBuilder.java deleted file mode 100644 index f62cfd153426..000000000000 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ResponseRecallInputOrBuilder.java +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Copyright 2024 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/aiplatform/v1beta1/evaluation_service.proto - -// Protobuf Java Version: 3.25.2 -package com.google.cloud.aiplatform.v1beta1; - -public interface ResponseRecallInputOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.ResponseRecallInput) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. Spec for response recall score metric.
-   * 
- * - * - * .google.cloud.aiplatform.v1beta1.ResponseRecallSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the metricSpec field is set. - */ - boolean hasMetricSpec(); - /** - * - * - *
-   * Required. Spec for response recall score metric.
-   * 
- * - * - * .google.cloud.aiplatform.v1beta1.ResponseRecallSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The metricSpec. - */ - com.google.cloud.aiplatform.v1beta1.ResponseRecallSpec getMetricSpec(); - /** - * - * - *
-   * Required. Spec for response recall score metric.
-   * 
- * - * - * .google.cloud.aiplatform.v1beta1.ResponseRecallSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.aiplatform.v1beta1.ResponseRecallSpecOrBuilder getMetricSpecOrBuilder(); - - /** - * - * - *
-   * Required. Response recall instance.
-   * 
- * - * - * .google.cloud.aiplatform.v1beta1.ResponseRecallInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the instance field is set. - */ - boolean hasInstance(); - /** - * - * - *
-   * Required. Response recall instance.
-   * 
- * - * - * .google.cloud.aiplatform.v1beta1.ResponseRecallInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The instance. - */ - com.google.cloud.aiplatform.v1beta1.ResponseRecallInstance getInstance(); - /** - * - * - *
-   * Required. Response recall instance.
-   * 
- * - * - * .google.cloud.aiplatform.v1beta1.ResponseRecallInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.aiplatform.v1beta1.ResponseRecallInstanceOrBuilder getInstanceOrBuilder(); -} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ResponseRecallInstanceOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ResponseRecallInstanceOrBuilder.java deleted file mode 100644 index 40f754cc2729..000000000000 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ResponseRecallInstanceOrBuilder.java +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright 2024 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/aiplatform/v1beta1/evaluation_service.proto - -// Protobuf Java Version: 3.25.2 -package com.google.cloud.aiplatform.v1beta1; - -public interface ResponseRecallInstanceOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.ResponseRecallInstance) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. Output of the evaluated model.
-   * 
- * - * optional string prediction = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return Whether the prediction field is set. - */ - boolean hasPrediction(); - /** - * - * - *
-   * Required. Output of the evaluated model.
-   * 
- * - * optional string prediction = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The prediction. - */ - java.lang.String getPrediction(); - /** - * - * - *
-   * Required. Output of the evaluated model.
-   * 
- * - * optional string prediction = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for prediction. - */ - com.google.protobuf.ByteString getPredictionBytes(); - - /** - * - * - *
-   * Required. Ground truth used to compare against the prediction.
-   * 
- * - * optional string reference = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return Whether the reference field is set. - */ - boolean hasReference(); - /** - * - * - *
-   * Required. Ground truth used to compare against the prediction.
-   * 
- * - * optional string reference = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The reference. - */ - java.lang.String getReference(); - /** - * - * - *
-   * Required. Ground truth used to compare against the prediction.
-   * 
- * - * optional string reference = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for reference. - */ - com.google.protobuf.ByteString getReferenceBytes(); -} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ResponseRecallResultOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ResponseRecallResultOrBuilder.java deleted file mode 100644 index d2e5a030d3e1..000000000000 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ResponseRecallResultOrBuilder.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright 2024 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/aiplatform/v1beta1/evaluation_service.proto - -// Protobuf Java Version: 3.25.2 -package com.google.cloud.aiplatform.v1beta1; - -public interface ResponseRecallResultOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.ResponseRecallResult) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. ResponseRecall score.
-   * 
- * - * optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return Whether the score field is set. - */ - boolean hasScore(); - /** - * - * - *
-   * Output only. ResponseRecall score.
-   * 
- * - * optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The score. - */ - float getScore(); - - /** - * - * - *
-   * Output only. Explanation for response recall score.
-   * 
- * - * string explanation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The explanation. - */ - java.lang.String getExplanation(); - /** - * - * - *
-   * Output only. Explanation for response recall score.
-   * 
- * - * string explanation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for explanation. - */ - com.google.protobuf.ByteString getExplanationBytes(); - - /** - * - * - *
-   * Output only. Confidence for fulfillment score.
-   * 
- * - * optional float confidence = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return Whether the confidence field is set. - */ - boolean hasConfidence(); - /** - * - * - *
-   * Output only. Confidence for fulfillment score.
-   * 
- * - * optional float confidence = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The confidence. - */ - float getConfidence(); -} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/Retrieval.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/Retrieval.java index 84677e19a7f2..a141fb466c75 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/Retrieval.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/Retrieval.java @@ -71,6 +71,7 @@ public enum SourceCase com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { VERTEX_AI_SEARCH(2), + VERTEX_RAG_STORE(4), SOURCE_NOT_SET(0); private final int value; @@ -91,6 +92,8 @@ public static SourceCase forNumber(int value) { switch (value) { case 2: return VERTEX_AI_SEARCH; + case 4: + return VERTEX_RAG_STORE; case 0: return SOURCE_NOT_SET; default: @@ -158,6 +161,60 @@ public com.google.cloud.aiplatform.v1beta1.VertexAISearchOrBuilder getVertexAiSe return com.google.cloud.aiplatform.v1beta1.VertexAISearch.getDefaultInstance(); } + public static final int VERTEX_RAG_STORE_FIELD_NUMBER = 4; + /** + * + * + *
+   * Set to use data source powered by Vertex RAG store.
+   * User data is uploaded via the VertexRagDataService.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.VertexRagStore vertex_rag_store = 4; + * + * @return Whether the vertexRagStore field is set. + */ + @java.lang.Override + public boolean hasVertexRagStore() { + return sourceCase_ == 4; + } + /** + * + * + *
+   * Set to use data source powered by Vertex RAG store.
+   * User data is uploaded via the VertexRagDataService.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.VertexRagStore vertex_rag_store = 4; + * + * @return The vertexRagStore. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.VertexRagStore getVertexRagStore() { + if (sourceCase_ == 4) { + return (com.google.cloud.aiplatform.v1beta1.VertexRagStore) source_; + } + return com.google.cloud.aiplatform.v1beta1.VertexRagStore.getDefaultInstance(); + } + /** + * + * + *
+   * Set to use data source powered by Vertex RAG store.
+   * User data is uploaded via the VertexRagDataService.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.VertexRagStore vertex_rag_store = 4; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.VertexRagStoreOrBuilder getVertexRagStoreOrBuilder() { + if (sourceCase_ == 4) { + return (com.google.cloud.aiplatform.v1beta1.VertexRagStore) source_; + } + return com.google.cloud.aiplatform.v1beta1.VertexRagStore.getDefaultInstance(); + } + public static final int DISABLE_ATTRIBUTION_FIELD_NUMBER = 3; private boolean disableAttribution_ = false; /** @@ -198,6 +255,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (disableAttribution_ != false) { output.writeBool(3, disableAttribution_); } + if (sourceCase_ == 4) { + output.writeMessage(4, (com.google.cloud.aiplatform.v1beta1.VertexRagStore) source_); + } getUnknownFields().writeTo(output); } @@ -215,6 +275,11 @@ public int getSerializedSize() { if (disableAttribution_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, disableAttribution_); } + if (sourceCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, (com.google.cloud.aiplatform.v1beta1.VertexRagStore) source_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -237,6 +302,9 @@ public boolean equals(final java.lang.Object obj) { case 2: if (!getVertexAiSearch().equals(other.getVertexAiSearch())) return false; break; + case 4: + if (!getVertexRagStore().equals(other.getVertexRagStore())) return false; + break; case 0: default: } @@ -258,6 +326,10 @@ public int hashCode() { hash = (37 * hash) + VERTEX_AI_SEARCH_FIELD_NUMBER; hash = (53 * hash) + getVertexAiSearch().hashCode(); break; + case 4: + hash = (37 * hash) + VERTEX_RAG_STORE_FIELD_NUMBER; + hash = (53 * hash) + getVertexRagStore().hashCode(); + break; case 0: default: } @@ -403,6 +475,9 @@ public Builder clear() { if (vertexAiSearchBuilder_ != null) { vertexAiSearchBuilder_.clear(); } + if (vertexRagStoreBuilder_ != null) { + vertexRagStoreBuilder_.clear(); + } disableAttribution_ = false; sourceCase_ = 0; source_ = null; @@ -443,7 +518,7 @@ public com.google.cloud.aiplatform.v1beta1.Retrieval buildPartial() { private void buildPartial0(com.google.cloud.aiplatform.v1beta1.Retrieval result) { int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000002) != 0)) { + if (((from_bitField0_ & 0x00000004) != 0)) { result.disableAttribution_ = disableAttribution_; } } @@ -454,6 +529,9 @@ private void buildPartialOneofs(com.google.cloud.aiplatform.v1beta1.Retrieval re if (sourceCase_ == 2 && vertexAiSearchBuilder_ != null) { result.source_ = vertexAiSearchBuilder_.build(); } + if (sourceCase_ == 4 && vertexRagStoreBuilder_ != null) { + result.source_ = vertexRagStoreBuilder_.build(); + } } @java.lang.Override @@ -510,6 +588,11 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.Retrieval other) { mergeVertexAiSearch(other.getVertexAiSearch()); break; } + case VERTEX_RAG_STORE: + { + mergeVertexRagStore(other.getVertexRagStore()); + break; + } case SOURCE_NOT_SET: { break; @@ -550,9 +633,15 @@ public Builder mergeFrom( case 24: { disableAttribution_ = input.readBool(); - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000004; break; } // case 24 + case 34: + { + input.readMessage(getVertexRagStoreFieldBuilder().getBuilder(), extensionRegistry); + sourceCase_ = 4; + break; + } // case 34 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -796,6 +885,225 @@ public com.google.cloud.aiplatform.v1beta1.VertexAISearch.Builder getVertexAiSea return vertexAiSearchBuilder_; } + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.VertexRagStore, + com.google.cloud.aiplatform.v1beta1.VertexRagStore.Builder, + com.google.cloud.aiplatform.v1beta1.VertexRagStoreOrBuilder> + vertexRagStoreBuilder_; + /** + * + * + *
+     * Set to use data source powered by Vertex RAG store.
+     * User data is uploaded via the VertexRagDataService.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.VertexRagStore vertex_rag_store = 4; + * + * @return Whether the vertexRagStore field is set. + */ + @java.lang.Override + public boolean hasVertexRagStore() { + return sourceCase_ == 4; + } + /** + * + * + *
+     * Set to use data source powered by Vertex RAG store.
+     * User data is uploaded via the VertexRagDataService.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.VertexRagStore vertex_rag_store = 4; + * + * @return The vertexRagStore. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.VertexRagStore getVertexRagStore() { + if (vertexRagStoreBuilder_ == null) { + if (sourceCase_ == 4) { + return (com.google.cloud.aiplatform.v1beta1.VertexRagStore) source_; + } + return com.google.cloud.aiplatform.v1beta1.VertexRagStore.getDefaultInstance(); + } else { + if (sourceCase_ == 4) { + return vertexRagStoreBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1beta1.VertexRagStore.getDefaultInstance(); + } + } + /** + * + * + *
+     * Set to use data source powered by Vertex RAG store.
+     * User data is uploaded via the VertexRagDataService.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.VertexRagStore vertex_rag_store = 4; + */ + public Builder setVertexRagStore(com.google.cloud.aiplatform.v1beta1.VertexRagStore value) { + if (vertexRagStoreBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + onChanged(); + } else { + vertexRagStoreBuilder_.setMessage(value); + } + sourceCase_ = 4; + return this; + } + /** + * + * + *
+     * Set to use data source powered by Vertex RAG store.
+     * User data is uploaded via the VertexRagDataService.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.VertexRagStore vertex_rag_store = 4; + */ + public Builder setVertexRagStore( + com.google.cloud.aiplatform.v1beta1.VertexRagStore.Builder builderForValue) { + if (vertexRagStoreBuilder_ == null) { + source_ = builderForValue.build(); + onChanged(); + } else { + vertexRagStoreBuilder_.setMessage(builderForValue.build()); + } + sourceCase_ = 4; + return this; + } + /** + * + * + *
+     * Set to use data source powered by Vertex RAG store.
+     * User data is uploaded via the VertexRagDataService.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.VertexRagStore vertex_rag_store = 4; + */ + public Builder mergeVertexRagStore(com.google.cloud.aiplatform.v1beta1.VertexRagStore value) { + if (vertexRagStoreBuilder_ == null) { + if (sourceCase_ == 4 + && source_ != com.google.cloud.aiplatform.v1beta1.VertexRagStore.getDefaultInstance()) { + source_ = + com.google.cloud.aiplatform.v1beta1.VertexRagStore.newBuilder( + (com.google.cloud.aiplatform.v1beta1.VertexRagStore) source_) + .mergeFrom(value) + .buildPartial(); + } else { + source_ = value; + } + onChanged(); + } else { + if (sourceCase_ == 4) { + vertexRagStoreBuilder_.mergeFrom(value); + } else { + vertexRagStoreBuilder_.setMessage(value); + } + } + sourceCase_ = 4; + return this; + } + /** + * + * + *
+     * Set to use data source powered by Vertex RAG store.
+     * User data is uploaded via the VertexRagDataService.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.VertexRagStore vertex_rag_store = 4; + */ + public Builder clearVertexRagStore() { + if (vertexRagStoreBuilder_ == null) { + if (sourceCase_ == 4) { + sourceCase_ = 0; + source_ = null; + onChanged(); + } + } else { + if (sourceCase_ == 4) { + sourceCase_ = 0; + source_ = null; + } + vertexRagStoreBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Set to use data source powered by Vertex RAG store.
+     * User data is uploaded via the VertexRagDataService.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.VertexRagStore vertex_rag_store = 4; + */ + public com.google.cloud.aiplatform.v1beta1.VertexRagStore.Builder getVertexRagStoreBuilder() { + return getVertexRagStoreFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Set to use data source powered by Vertex RAG store.
+     * User data is uploaded via the VertexRagDataService.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.VertexRagStore vertex_rag_store = 4; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.VertexRagStoreOrBuilder + getVertexRagStoreOrBuilder() { + if ((sourceCase_ == 4) && (vertexRagStoreBuilder_ != null)) { + return vertexRagStoreBuilder_.getMessageOrBuilder(); + } else { + if (sourceCase_ == 4) { + return (com.google.cloud.aiplatform.v1beta1.VertexRagStore) source_; + } + return com.google.cloud.aiplatform.v1beta1.VertexRagStore.getDefaultInstance(); + } + } + /** + * + * + *
+     * Set to use data source powered by Vertex RAG store.
+     * User data is uploaded via the VertexRagDataService.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.VertexRagStore vertex_rag_store = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.VertexRagStore, + com.google.cloud.aiplatform.v1beta1.VertexRagStore.Builder, + com.google.cloud.aiplatform.v1beta1.VertexRagStoreOrBuilder> + getVertexRagStoreFieldBuilder() { + if (vertexRagStoreBuilder_ == null) { + if (!(sourceCase_ == 4)) { + source_ = com.google.cloud.aiplatform.v1beta1.VertexRagStore.getDefaultInstance(); + } + vertexRagStoreBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.VertexRagStore, + com.google.cloud.aiplatform.v1beta1.VertexRagStore.Builder, + com.google.cloud.aiplatform.v1beta1.VertexRagStoreOrBuilder>( + (com.google.cloud.aiplatform.v1beta1.VertexRagStore) source_, + getParentForChildren(), + isClean()); + source_ = null; + } + sourceCase_ = 4; + onChanged(); + return vertexRagStoreBuilder_; + } + private boolean disableAttribution_; /** * @@ -831,7 +1139,7 @@ public boolean getDisableAttribution() { public Builder setDisableAttribution(boolean value) { disableAttribution_ = value; - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -849,7 +1157,7 @@ public Builder setDisableAttribution(boolean value) { * @return This builder for chaining. */ public Builder clearDisableAttribution() { - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000004); disableAttribution_ = false; onChanged(); return this; diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RetrievalOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RetrievalOrBuilder.java index 0cdae865d903..d900a2ac12ba 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RetrievalOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RetrievalOrBuilder.java @@ -59,6 +59,44 @@ public interface RetrievalOrBuilder */ com.google.cloud.aiplatform.v1beta1.VertexAISearchOrBuilder getVertexAiSearchOrBuilder(); + /** + * + * + *
+   * Set to use data source powered by Vertex RAG store.
+   * User data is uploaded via the VertexRagDataService.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.VertexRagStore vertex_rag_store = 4; + * + * @return Whether the vertexRagStore field is set. + */ + boolean hasVertexRagStore(); + /** + * + * + *
+   * Set to use data source powered by Vertex RAG store.
+   * User data is uploaded via the VertexRagDataService.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.VertexRagStore vertex_rag_store = 4; + * + * @return The vertexRagStore. + */ + com.google.cloud.aiplatform.v1beta1.VertexRagStore getVertexRagStore(); + /** + * + * + *
+   * Set to use data source powered by Vertex RAG store.
+   * User data is uploaded via the VertexRagDataService.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.VertexRagStore vertex_rag_store = 4; + */ + com.google.cloud.aiplatform.v1beta1.VertexRagStoreOrBuilder getVertexRagStoreOrBuilder(); + /** * * diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RetrieveContextsRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RetrieveContextsRequest.java new file mode 100644 index 000000000000..740eee5b88f7 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RetrieveContextsRequest.java @@ -0,0 +1,2265 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/vertex_rag_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Request message for
+ * [VertexRagService.RetrieveContexts][google.cloud.aiplatform.v1beta1.VertexRagService.RetrieveContexts].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.RetrieveContextsRequest} + */ +public final class RetrieveContextsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.RetrieveContextsRequest) + RetrieveContextsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use RetrieveContextsRequest.newBuilder() to construct. + private RetrieveContextsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RetrieveContextsRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RetrieveContextsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.VertexRagServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_RetrieveContextsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.VertexRagServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_RetrieveContextsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.class, + com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.Builder.class); + } + + public interface VertexRagStoreOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. RagCorpora resource name.
+     * Format:
+     * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
+     * Currently only one corpus is allowed.
+     * In the future we may open up multiple corpora support. However, they
+     * should be from the same project and location.
+     * 
+ * + * repeated string rag_corpora = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the ragCorpora. + */ + java.util.List getRagCorporaList(); + /** + * + * + *
+     * Required. RagCorpora resource name.
+     * Format:
+     * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
+     * Currently only one corpus is allowed.
+     * In the future we may open up multiple corpora support. However, they
+     * should be from the same project and location.
+     * 
+ * + * repeated string rag_corpora = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of ragCorpora. + */ + int getRagCorporaCount(); + /** + * + * + *
+     * Required. RagCorpora resource name.
+     * Format:
+     * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
+     * Currently only one corpus is allowed.
+     * In the future we may open up multiple corpora support. However, they
+     * should be from the same project and location.
+     * 
+ * + * repeated string rag_corpora = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The ragCorpora at the given index. + */ + java.lang.String getRagCorpora(int index); + /** + * + * + *
+     * Required. RagCorpora resource name.
+     * Format:
+     * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
+     * Currently only one corpus is allowed.
+     * In the future we may open up multiple corpora support. However, they
+     * should be from the same project and location.
+     * 
+ * + * repeated string rag_corpora = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the ragCorpora at the given index. + */ + com.google.protobuf.ByteString getRagCorporaBytes(int index); + } + /** + * + * + *
+   * The data source for Vertex RagStore.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore} + */ + public static final class VertexRagStore extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore) + VertexRagStoreOrBuilder { + private static final long serialVersionUID = 0L; + // Use VertexRagStore.newBuilder() to construct. + private VertexRagStore(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private VertexRagStore() { + ragCorpora_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new VertexRagStore(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.VertexRagServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_RetrieveContextsRequest_VertexRagStore_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.VertexRagServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_RetrieveContextsRequest_VertexRagStore_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore.class, + com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore.Builder + .class); + } + + public static final int RAG_CORPORA_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList ragCorpora_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+     * Required. RagCorpora resource name.
+     * Format:
+     * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
+     * Currently only one corpus is allowed.
+     * In the future we may open up multiple corpora support. However, they
+     * should be from the same project and location.
+     * 
+ * + * repeated string rag_corpora = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the ragCorpora. + */ + public com.google.protobuf.ProtocolStringList getRagCorporaList() { + return ragCorpora_; + } + /** + * + * + *
+     * Required. RagCorpora resource name.
+     * Format:
+     * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
+     * Currently only one corpus is allowed.
+     * In the future we may open up multiple corpora support. However, they
+     * should be from the same project and location.
+     * 
+ * + * repeated string rag_corpora = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of ragCorpora. + */ + public int getRagCorporaCount() { + return ragCorpora_.size(); + } + /** + * + * + *
+     * Required. RagCorpora resource name.
+     * Format:
+     * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
+     * Currently only one corpus is allowed.
+     * In the future we may open up multiple corpora support. However, they
+     * should be from the same project and location.
+     * 
+ * + * repeated string rag_corpora = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The ragCorpora at the given index. + */ + public java.lang.String getRagCorpora(int index) { + return ragCorpora_.get(index); + } + /** + * + * + *
+     * Required. RagCorpora resource name.
+     * Format:
+     * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
+     * Currently only one corpus is allowed.
+     * In the future we may open up multiple corpora support. However, they
+     * should be from the same project and location.
+     * 
+ * + * repeated string rag_corpora = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the ragCorpora at the given index. + */ + public com.google.protobuf.ByteString getRagCorporaBytes(int index) { + return ragCorpora_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < ragCorpora_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, ragCorpora_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < ragCorpora_.size(); i++) { + dataSize += computeStringSizeNoTag(ragCorpora_.getRaw(i)); + } + size += dataSize; + size += 1 * getRagCorporaList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore other = + (com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore) obj; + + if (!getRagCorporaList().equals(other.getRagCorporaList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getRagCorporaCount() > 0) { + hash = (37 * hash) + RAG_CORPORA_FIELD_NUMBER; + hash = (53 * hash) + getRagCorporaList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * The data source for Vertex RagStore.
+     * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore) + com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStoreOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.VertexRagServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_RetrieveContextsRequest_VertexRagStore_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.VertexRagServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_RetrieveContextsRequest_VertexRagStore_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore.class, + com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore.Builder + .class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + ragCorpora_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.VertexRagServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_RetrieveContextsRequest_VertexRagStore_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore build() { + com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore + buildPartial() { + com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore result = + new com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + ragCorpora_.makeImmutable(); + result.ragCorpora_ = ragCorpora_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore other) { + if (other + == com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore + .getDefaultInstance()) return this; + if (!other.ragCorpora_.isEmpty()) { + if (ragCorpora_.isEmpty()) { + ragCorpora_ = other.ragCorpora_; + bitField0_ |= 0x00000001; + } else { + ensureRagCorporaIsMutable(); + ragCorpora_.addAll(other.ragCorpora_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureRagCorporaIsMutable(); + ragCorpora_.add(s); + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringArrayList ragCorpora_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureRagCorporaIsMutable() { + if (!ragCorpora_.isModifiable()) { + ragCorpora_ = new com.google.protobuf.LazyStringArrayList(ragCorpora_); + } + bitField0_ |= 0x00000001; + } + /** + * + * + *
+       * Required. RagCorpora resource name.
+       * Format:
+       * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
+       * Currently only one corpus is allowed.
+       * In the future we may open up multiple corpora support. However, they
+       * should be from the same project and location.
+       * 
+ * + * repeated string rag_corpora = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the ragCorpora. + */ + public com.google.protobuf.ProtocolStringList getRagCorporaList() { + ragCorpora_.makeImmutable(); + return ragCorpora_; + } + /** + * + * + *
+       * Required. RagCorpora resource name.
+       * Format:
+       * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
+       * Currently only one corpus is allowed.
+       * In the future we may open up multiple corpora support. However, they
+       * should be from the same project and location.
+       * 
+ * + * repeated string rag_corpora = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of ragCorpora. + */ + public int getRagCorporaCount() { + return ragCorpora_.size(); + } + /** + * + * + *
+       * Required. RagCorpora resource name.
+       * Format:
+       * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
+       * Currently only one corpus is allowed.
+       * In the future we may open up multiple corpora support. However, they
+       * should be from the same project and location.
+       * 
+ * + * repeated string rag_corpora = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The ragCorpora at the given index. + */ + public java.lang.String getRagCorpora(int index) { + return ragCorpora_.get(index); + } + /** + * + * + *
+       * Required. RagCorpora resource name.
+       * Format:
+       * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
+       * Currently only one corpus is allowed.
+       * In the future we may open up multiple corpora support. However, they
+       * should be from the same project and location.
+       * 
+ * + * repeated string rag_corpora = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the ragCorpora at the given index. + */ + public com.google.protobuf.ByteString getRagCorporaBytes(int index) { + return ragCorpora_.getByteString(index); + } + /** + * + * + *
+       * Required. RagCorpora resource name.
+       * Format:
+       * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
+       * Currently only one corpus is allowed.
+       * In the future we may open up multiple corpora support. However, they
+       * should be from the same project and location.
+       * 
+ * + * repeated string rag_corpora = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index to set the value at. + * @param value The ragCorpora to set. + * @return This builder for chaining. + */ + public Builder setRagCorpora(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRagCorporaIsMutable(); + ragCorpora_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. RagCorpora resource name.
+       * Format:
+       * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
+       * Currently only one corpus is allowed.
+       * In the future we may open up multiple corpora support. However, they
+       * should be from the same project and location.
+       * 
+ * + * repeated string rag_corpora = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The ragCorpora to add. + * @return This builder for chaining. + */ + public Builder addRagCorpora(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRagCorporaIsMutable(); + ragCorpora_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. RagCorpora resource name.
+       * Format:
+       * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
+       * Currently only one corpus is allowed.
+       * In the future we may open up multiple corpora support. However, they
+       * should be from the same project and location.
+       * 
+ * + * repeated string rag_corpora = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param values The ragCorpora to add. + * @return This builder for chaining. + */ + public Builder addAllRagCorpora(java.lang.Iterable values) { + ensureRagCorporaIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, ragCorpora_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. RagCorpora resource name.
+       * Format:
+       * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
+       * Currently only one corpus is allowed.
+       * In the future we may open up multiple corpora support. However, they
+       * should be from the same project and location.
+       * 
+ * + * repeated string rag_corpora = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearRagCorpora() { + ragCorpora_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + ; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. RagCorpora resource name.
+       * Format:
+       * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
+       * Currently only one corpus is allowed.
+       * In the future we may open up multiple corpora support. However, they
+       * should be from the same project and location.
+       * 
+ * + * repeated string rag_corpora = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes of the ragCorpora to add. + * @return This builder for chaining. + */ + public Builder addRagCorporaBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureRagCorporaIsMutable(); + ragCorpora_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore) + private static final com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore(); + } + + public static com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VertexRagStore parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + private int dataSourceCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object dataSource_; + + public enum DataSourceCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + VERTEX_RAG_STORE(2), + DATASOURCE_NOT_SET(0); + private final int value; + + private DataSourceCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DataSourceCase valueOf(int value) { + return forNumber(value); + } + + public static DataSourceCase forNumber(int value) { + switch (value) { + case 2: + return VERTEX_RAG_STORE; + case 0: + return DATASOURCE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public DataSourceCase getDataSourceCase() { + return DataSourceCase.forNumber(dataSourceCase_); + } + + public static final int VERTEX_RAG_STORE_FIELD_NUMBER = 2; + /** + * + * + *
+   * The data source for Vertex RagStore.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore vertex_rag_store = 2; + * + * + * @return Whether the vertexRagStore field is set. + */ + @java.lang.Override + public boolean hasVertexRagStore() { + return dataSourceCase_ == 2; + } + /** + * + * + *
+   * The data source for Vertex RagStore.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore vertex_rag_store = 2; + * + * + * @return The vertexRagStore. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore + getVertexRagStore() { + if (dataSourceCase_ == 2) { + return (com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore) + dataSource_; + } + return com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore + .getDefaultInstance(); + } + /** + * + * + *
+   * The data source for Vertex RagStore.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore vertex_rag_store = 2; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStoreOrBuilder + getVertexRagStoreOrBuilder() { + if (dataSourceCase_ == 2) { + return (com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore) + dataSource_; + } + return com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore + .getDefaultInstance(); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The resource name of the Location from which to retrieve
+   * RagContexts. The users must have permission to make a call in the project.
+   * Format:
+   * `projects/{project}/locations/{location}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the Location from which to retrieve
+   * RagContexts. The users must have permission to make a call in the project.
+   * Format:
+   * `projects/{project}/locations/{location}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int QUERY_FIELD_NUMBER = 3; + private com.google.cloud.aiplatform.v1beta1.RagQuery query_; + /** + * + * + *
+   * Required. Single RAG retrieve query.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.RagQuery query = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the query field is set. + */ + @java.lang.Override + public boolean hasQuery() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. Single RAG retrieve query.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.RagQuery query = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The query. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.RagQuery getQuery() { + return query_ == null + ? com.google.cloud.aiplatform.v1beta1.RagQuery.getDefaultInstance() + : query_; + } + /** + * + * + *
+   * Required. Single RAG retrieve query.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.RagQuery query = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.RagQueryOrBuilder getQueryOrBuilder() { + return query_ == null + ? com.google.cloud.aiplatform.v1beta1.RagQuery.getDefaultInstance() + : query_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (dataSourceCase_ == 2) { + output.writeMessage( + 2, + (com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore) dataSource_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getQuery()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (dataSourceCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, + (com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore) + dataSource_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getQuery()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest other = + (com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasQuery() != other.hasQuery()) return false; + if (hasQuery()) { + if (!getQuery().equals(other.getQuery())) return false; + } + if (!getDataSourceCase().equals(other.getDataSourceCase())) return false; + switch (dataSourceCase_) { + case 2: + if (!getVertexRagStore().equals(other.getVertexRagStore())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasQuery()) { + hash = (37 * hash) + QUERY_FIELD_NUMBER; + hash = (53 * hash) + getQuery().hashCode(); + } + switch (dataSourceCase_) { + case 2: + hash = (37 * hash) + VERTEX_RAG_STORE_FIELD_NUMBER; + hash = (53 * hash) + getVertexRagStore().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for
+   * [VertexRagService.RetrieveContexts][google.cloud.aiplatform.v1beta1.VertexRagService.RetrieveContexts].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.RetrieveContextsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.RetrieveContextsRequest) + com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.VertexRagServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_RetrieveContextsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.VertexRagServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_RetrieveContextsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.class, + com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getQueryFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (vertexRagStoreBuilder_ != null) { + vertexRagStoreBuilder_.clear(); + } + parent_ = ""; + query_ = null; + if (queryBuilder_ != null) { + queryBuilder_.dispose(); + queryBuilder_ = null; + } + dataSourceCase_ = 0; + dataSource_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.VertexRagServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_RetrieveContextsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest build() { + com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest buildPartial() { + com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest result = + new com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.parent_ = parent_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.query_ = queryBuilder_ == null ? query_ : queryBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs( + com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest result) { + result.dataSourceCase_ = dataSourceCase_; + result.dataSource_ = this.dataSource_; + if (dataSourceCase_ == 2 && vertexRagStoreBuilder_ != null) { + result.dataSource_ = vertexRagStoreBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest other) { + if (other == com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasQuery()) { + mergeQuery(other.getQuery()); + } + switch (other.getDataSourceCase()) { + case VERTEX_RAG_STORE: + { + mergeVertexRagStore(other.getVertexRagStore()); + break; + } + case DATASOURCE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 10 + case 18: + { + input.readMessage(getVertexRagStoreFieldBuilder().getBuilder(), extensionRegistry); + dataSourceCase_ = 2; + break; + } // case 18 + case 26: + { + input.readMessage(getQueryFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int dataSourceCase_ = 0; + private java.lang.Object dataSource_; + + public DataSourceCase getDataSourceCase() { + return DataSourceCase.forNumber(dataSourceCase_); + } + + public Builder clearDataSource() { + dataSourceCase_ = 0; + dataSource_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore, + com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore.Builder, + com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStoreOrBuilder> + vertexRagStoreBuilder_; + /** + * + * + *
+     * The data source for Vertex RagStore.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore vertex_rag_store = 2; + * + * + * @return Whether the vertexRagStore field is set. + */ + @java.lang.Override + public boolean hasVertexRagStore() { + return dataSourceCase_ == 2; + } + /** + * + * + *
+     * The data source for Vertex RagStore.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore vertex_rag_store = 2; + * + * + * @return The vertexRagStore. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore + getVertexRagStore() { + if (vertexRagStoreBuilder_ == null) { + if (dataSourceCase_ == 2) { + return (com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore) + dataSource_; + } + return com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore + .getDefaultInstance(); + } else { + if (dataSourceCase_ == 2) { + return vertexRagStoreBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore + .getDefaultInstance(); + } + } + /** + * + * + *
+     * The data source for Vertex RagStore.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore vertex_rag_store = 2; + * + */ + public Builder setVertexRagStore( + com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore value) { + if (vertexRagStoreBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dataSource_ = value; + onChanged(); + } else { + vertexRagStoreBuilder_.setMessage(value); + } + dataSourceCase_ = 2; + return this; + } + /** + * + * + *
+     * The data source for Vertex RagStore.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore vertex_rag_store = 2; + * + */ + public Builder setVertexRagStore( + com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore.Builder + builderForValue) { + if (vertexRagStoreBuilder_ == null) { + dataSource_ = builderForValue.build(); + onChanged(); + } else { + vertexRagStoreBuilder_.setMessage(builderForValue.build()); + } + dataSourceCase_ = 2; + return this; + } + /** + * + * + *
+     * The data source for Vertex RagStore.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore vertex_rag_store = 2; + * + */ + public Builder mergeVertexRagStore( + com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore value) { + if (vertexRagStoreBuilder_ == null) { + if (dataSourceCase_ == 2 + && dataSource_ + != com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore + .getDefaultInstance()) { + dataSource_ = + com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore.newBuilder( + (com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore) + dataSource_) + .mergeFrom(value) + .buildPartial(); + } else { + dataSource_ = value; + } + onChanged(); + } else { + if (dataSourceCase_ == 2) { + vertexRagStoreBuilder_.mergeFrom(value); + } else { + vertexRagStoreBuilder_.setMessage(value); + } + } + dataSourceCase_ = 2; + return this; + } + /** + * + * + *
+     * The data source for Vertex RagStore.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore vertex_rag_store = 2; + * + */ + public Builder clearVertexRagStore() { + if (vertexRagStoreBuilder_ == null) { + if (dataSourceCase_ == 2) { + dataSourceCase_ = 0; + dataSource_ = null; + onChanged(); + } + } else { + if (dataSourceCase_ == 2) { + dataSourceCase_ = 0; + dataSource_ = null; + } + vertexRagStoreBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The data source for Vertex RagStore.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore vertex_rag_store = 2; + * + */ + public com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore.Builder + getVertexRagStoreBuilder() { + return getVertexRagStoreFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The data source for Vertex RagStore.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore vertex_rag_store = 2; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStoreOrBuilder + getVertexRagStoreOrBuilder() { + if ((dataSourceCase_ == 2) && (vertexRagStoreBuilder_ != null)) { + return vertexRagStoreBuilder_.getMessageOrBuilder(); + } else { + if (dataSourceCase_ == 2) { + return (com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore) + dataSource_; + } + return com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore + .getDefaultInstance(); + } + } + /** + * + * + *
+     * The data source for Vertex RagStore.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore vertex_rag_store = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore, + com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore.Builder, + com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStoreOrBuilder> + getVertexRagStoreFieldBuilder() { + if (vertexRagStoreBuilder_ == null) { + if (!(dataSourceCase_ == 2)) { + dataSource_ = + com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore + .getDefaultInstance(); + } + vertexRagStoreBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore, + com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore.Builder, + com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest + .VertexRagStoreOrBuilder>( + (com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore) + dataSource_, + getParentForChildren(), + isClean()); + dataSource_ = null; + } + dataSourceCase_ = 2; + onChanged(); + return vertexRagStoreBuilder_; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of the Location from which to retrieve
+     * RagContexts. The users must have permission to make a call in the project.
+     * Format:
+     * `projects/{project}/locations/{location}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Location from which to retrieve
+     * RagContexts. The users must have permission to make a call in the project.
+     * Format:
+     * `projects/{project}/locations/{location}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Location from which to retrieve
+     * RagContexts. The users must have permission to make a call in the project.
+     * Format:
+     * `projects/{project}/locations/{location}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Location from which to retrieve
+     * RagContexts. The users must have permission to make a call in the project.
+     * Format:
+     * `projects/{project}/locations/{location}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Location from which to retrieve
+     * RagContexts. The users must have permission to make a call in the project.
+     * Format:
+     * `projects/{project}/locations/{location}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.aiplatform.v1beta1.RagQuery query_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.RagQuery, + com.google.cloud.aiplatform.v1beta1.RagQuery.Builder, + com.google.cloud.aiplatform.v1beta1.RagQueryOrBuilder> + queryBuilder_; + /** + * + * + *
+     * Required. Single RAG retrieve query.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.RagQuery query = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the query field is set. + */ + public boolean hasQuery() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Required. Single RAG retrieve query.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.RagQuery query = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The query. + */ + public com.google.cloud.aiplatform.v1beta1.RagQuery getQuery() { + if (queryBuilder_ == null) { + return query_ == null + ? com.google.cloud.aiplatform.v1beta1.RagQuery.getDefaultInstance() + : query_; + } else { + return queryBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Single RAG retrieve query.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.RagQuery query = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setQuery(com.google.cloud.aiplatform.v1beta1.RagQuery value) { + if (queryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + query_ = value; + } else { + queryBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Single RAG retrieve query.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.RagQuery query = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setQuery(com.google.cloud.aiplatform.v1beta1.RagQuery.Builder builderForValue) { + if (queryBuilder_ == null) { + query_ = builderForValue.build(); + } else { + queryBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Single RAG retrieve query.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.RagQuery query = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeQuery(com.google.cloud.aiplatform.v1beta1.RagQuery value) { + if (queryBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && query_ != null + && query_ != com.google.cloud.aiplatform.v1beta1.RagQuery.getDefaultInstance()) { + getQueryBuilder().mergeFrom(value); + } else { + query_ = value; + } + } else { + queryBuilder_.mergeFrom(value); + } + if (query_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. Single RAG retrieve query.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.RagQuery query = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearQuery() { + bitField0_ = (bitField0_ & ~0x00000004); + query_ = null; + if (queryBuilder_ != null) { + queryBuilder_.dispose(); + queryBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Single RAG retrieve query.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.RagQuery query = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1beta1.RagQuery.Builder getQueryBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getQueryFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Single RAG retrieve query.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.RagQuery query = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1beta1.RagQueryOrBuilder getQueryOrBuilder() { + if (queryBuilder_ != null) { + return queryBuilder_.getMessageOrBuilder(); + } else { + return query_ == null + ? com.google.cloud.aiplatform.v1beta1.RagQuery.getDefaultInstance() + : query_; + } + } + /** + * + * + *
+     * Required. Single RAG retrieve query.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.RagQuery query = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.RagQuery, + com.google.cloud.aiplatform.v1beta1.RagQuery.Builder, + com.google.cloud.aiplatform.v1beta1.RagQueryOrBuilder> + getQueryFieldBuilder() { + if (queryBuilder_ == null) { + queryBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.RagQuery, + com.google.cloud.aiplatform.v1beta1.RagQuery.Builder, + com.google.cloud.aiplatform.v1beta1.RagQueryOrBuilder>( + getQuery(), getParentForChildren(), isClean()); + query_ = null; + } + return queryBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.RetrieveContextsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.RetrieveContextsRequest) + private static final com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest(); + } + + public static com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RetrieveContextsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RetrieveContextsRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RetrieveContextsRequestOrBuilder.java new file mode 100644 index 000000000000..055504cf7dc6 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RetrieveContextsRequestOrBuilder.java @@ -0,0 +1,146 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/vertex_rag_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +public interface RetrieveContextsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.RetrieveContextsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The data source for Vertex RagStore.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore vertex_rag_store = 2; + * + * + * @return Whether the vertexRagStore field is set. + */ + boolean hasVertexRagStore(); + /** + * + * + *
+   * The data source for Vertex RagStore.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore vertex_rag_store = 2; + * + * + * @return The vertexRagStore. + */ + com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore getVertexRagStore(); + /** + * + * + *
+   * The data source for Vertex RagStore.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStore vertex_rag_store = 2; + * + */ + com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.VertexRagStoreOrBuilder + getVertexRagStoreOrBuilder(); + + /** + * + * + *
+   * Required. The resource name of the Location from which to retrieve
+   * RagContexts. The users must have permission to make a call in the project.
+   * Format:
+   * `projects/{project}/locations/{location}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The resource name of the Location from which to retrieve
+   * RagContexts. The users must have permission to make a call in the project.
+   * Format:
+   * `projects/{project}/locations/{location}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. Single RAG retrieve query.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.RagQuery query = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the query field is set. + */ + boolean hasQuery(); + /** + * + * + *
+   * Required. Single RAG retrieve query.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.RagQuery query = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The query. + */ + com.google.cloud.aiplatform.v1beta1.RagQuery getQuery(); + /** + * + * + *
+   * Required. Single RAG retrieve query.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.RagQuery query = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1beta1.RagQueryOrBuilder getQueryOrBuilder(); + + com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest.DataSourceCase getDataSourceCase(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RetrieveContextsResponse.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RetrieveContextsResponse.java new file mode 100644 index 000000000000..9ebf93d062df --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RetrieveContextsResponse.java @@ -0,0 +1,729 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/vertex_rag_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Response message for
+ * [VertexRagService.RetrieveContexts][google.cloud.aiplatform.v1beta1.VertexRagService.RetrieveContexts].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.RetrieveContextsResponse} + */ +public final class RetrieveContextsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.RetrieveContextsResponse) + RetrieveContextsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use RetrieveContextsResponse.newBuilder() to construct. + private RetrieveContextsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RetrieveContextsResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RetrieveContextsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.VertexRagServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_RetrieveContextsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.VertexRagServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_RetrieveContextsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.RetrieveContextsResponse.class, + com.google.cloud.aiplatform.v1beta1.RetrieveContextsResponse.Builder.class); + } + + private int bitField0_; + public static final int CONTEXTS_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1beta1.RagContexts contexts_; + /** + * + * + *
+   * The contexts of the query.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.RagContexts contexts = 1; + * + * @return Whether the contexts field is set. + */ + @java.lang.Override + public boolean hasContexts() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * The contexts of the query.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.RagContexts contexts = 1; + * + * @return The contexts. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.RagContexts getContexts() { + return contexts_ == null + ? com.google.cloud.aiplatform.v1beta1.RagContexts.getDefaultInstance() + : contexts_; + } + /** + * + * + *
+   * The contexts of the query.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.RagContexts contexts = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.RagContextsOrBuilder getContextsOrBuilder() { + return contexts_ == null + ? com.google.cloud.aiplatform.v1beta1.RagContexts.getDefaultInstance() + : contexts_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getContexts()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getContexts()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.RetrieveContextsResponse)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.RetrieveContextsResponse other = + (com.google.cloud.aiplatform.v1beta1.RetrieveContextsResponse) obj; + + if (hasContexts() != other.hasContexts()) return false; + if (hasContexts()) { + if (!getContexts().equals(other.getContexts())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasContexts()) { + hash = (37 * hash) + CONTEXTS_FIELD_NUMBER; + hash = (53 * hash) + getContexts().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.RetrieveContextsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.RetrieveContextsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.RetrieveContextsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.RetrieveContextsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.RetrieveContextsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.RetrieveContextsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.RetrieveContextsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.RetrieveContextsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.RetrieveContextsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.RetrieveContextsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.RetrieveContextsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.RetrieveContextsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.RetrieveContextsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for
+   * [VertexRagService.RetrieveContexts][google.cloud.aiplatform.v1beta1.VertexRagService.RetrieveContexts].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.RetrieveContextsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.RetrieveContextsResponse) + com.google.cloud.aiplatform.v1beta1.RetrieveContextsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.VertexRagServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_RetrieveContextsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.VertexRagServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_RetrieveContextsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.RetrieveContextsResponse.class, + com.google.cloud.aiplatform.v1beta1.RetrieveContextsResponse.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.RetrieveContextsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getContextsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + contexts_ = null; + if (contextsBuilder_ != null) { + contextsBuilder_.dispose(); + contextsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.VertexRagServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_RetrieveContextsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.RetrieveContextsResponse + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.RetrieveContextsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.RetrieveContextsResponse build() { + com.google.cloud.aiplatform.v1beta1.RetrieveContextsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.RetrieveContextsResponse buildPartial() { + com.google.cloud.aiplatform.v1beta1.RetrieveContextsResponse result = + new com.google.cloud.aiplatform.v1beta1.RetrieveContextsResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1beta1.RetrieveContextsResponse result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.contexts_ = contextsBuilder_ == null ? contexts_ : contextsBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1beta1.RetrieveContextsResponse) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.RetrieveContextsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.RetrieveContextsResponse other) { + if (other + == com.google.cloud.aiplatform.v1beta1.RetrieveContextsResponse.getDefaultInstance()) + return this; + if (other.hasContexts()) { + mergeContexts(other.getContexts()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getContextsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.aiplatform.v1beta1.RagContexts contexts_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.RagContexts, + com.google.cloud.aiplatform.v1beta1.RagContexts.Builder, + com.google.cloud.aiplatform.v1beta1.RagContextsOrBuilder> + contextsBuilder_; + /** + * + * + *
+     * The contexts of the query.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.RagContexts contexts = 1; + * + * @return Whether the contexts field is set. + */ + public boolean hasContexts() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * The contexts of the query.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.RagContexts contexts = 1; + * + * @return The contexts. + */ + public com.google.cloud.aiplatform.v1beta1.RagContexts getContexts() { + if (contextsBuilder_ == null) { + return contexts_ == null + ? com.google.cloud.aiplatform.v1beta1.RagContexts.getDefaultInstance() + : contexts_; + } else { + return contextsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The contexts of the query.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.RagContexts contexts = 1; + */ + public Builder setContexts(com.google.cloud.aiplatform.v1beta1.RagContexts value) { + if (contextsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + contexts_ = value; + } else { + contextsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The contexts of the query.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.RagContexts contexts = 1; + */ + public Builder setContexts( + com.google.cloud.aiplatform.v1beta1.RagContexts.Builder builderForValue) { + if (contextsBuilder_ == null) { + contexts_ = builderForValue.build(); + } else { + contextsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The contexts of the query.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.RagContexts contexts = 1; + */ + public Builder mergeContexts(com.google.cloud.aiplatform.v1beta1.RagContexts value) { + if (contextsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && contexts_ != null + && contexts_ != com.google.cloud.aiplatform.v1beta1.RagContexts.getDefaultInstance()) { + getContextsBuilder().mergeFrom(value); + } else { + contexts_ = value; + } + } else { + contextsBuilder_.mergeFrom(value); + } + if (contexts_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The contexts of the query.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.RagContexts contexts = 1; + */ + public Builder clearContexts() { + bitField0_ = (bitField0_ & ~0x00000001); + contexts_ = null; + if (contextsBuilder_ != null) { + contextsBuilder_.dispose(); + contextsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The contexts of the query.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.RagContexts contexts = 1; + */ + public com.google.cloud.aiplatform.v1beta1.RagContexts.Builder getContextsBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getContextsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The contexts of the query.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.RagContexts contexts = 1; + */ + public com.google.cloud.aiplatform.v1beta1.RagContextsOrBuilder getContextsOrBuilder() { + if (contextsBuilder_ != null) { + return contextsBuilder_.getMessageOrBuilder(); + } else { + return contexts_ == null + ? com.google.cloud.aiplatform.v1beta1.RagContexts.getDefaultInstance() + : contexts_; + } + } + /** + * + * + *
+     * The contexts of the query.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.RagContexts contexts = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.RagContexts, + com.google.cloud.aiplatform.v1beta1.RagContexts.Builder, + com.google.cloud.aiplatform.v1beta1.RagContextsOrBuilder> + getContextsFieldBuilder() { + if (contextsBuilder_ == null) { + contextsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.RagContexts, + com.google.cloud.aiplatform.v1beta1.RagContexts.Builder, + com.google.cloud.aiplatform.v1beta1.RagContextsOrBuilder>( + getContexts(), getParentForChildren(), isClean()); + contexts_ = null; + } + return contextsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.RetrieveContextsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.RetrieveContextsResponse) + private static final com.google.cloud.aiplatform.v1beta1.RetrieveContextsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.RetrieveContextsResponse(); + } + + public static com.google.cloud.aiplatform.v1beta1.RetrieveContextsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RetrieveContextsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.RetrieveContextsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RetrieveContextsResponseOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RetrieveContextsResponseOrBuilder.java new file mode 100644 index 000000000000..402337d37c60 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RetrieveContextsResponseOrBuilder.java @@ -0,0 +1,61 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/vertex_rag_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +public interface RetrieveContextsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.RetrieveContextsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The contexts of the query.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.RagContexts contexts = 1; + * + * @return Whether the contexts field is set. + */ + boolean hasContexts(); + /** + * + * + *
+   * The contexts of the query.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.RagContexts contexts = 1; + * + * @return The contexts. + */ + com.google.cloud.aiplatform.v1beta1.RagContexts getContexts(); + /** + * + * + *
+   * The contexts of the query.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.RagContexts contexts = 1; + */ + com.google.cloud.aiplatform.v1beta1.RagContextsOrBuilder getContextsOrBuilder(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/SafetySetting.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/SafetySetting.java index d35956179f57..01083e38f879 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/SafetySetting.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/SafetySetting.java @@ -41,6 +41,7 @@ private SafetySetting(com.google.protobuf.GeneratedMessageV3.Builder builder) private SafetySetting() { category_ = 0; threshold_ = 0; + method_ = 0; } @java.lang.Override @@ -270,6 +271,167 @@ private HarmBlockThreshold(int value) { // @@protoc_insertion_point(enum_scope:google.cloud.aiplatform.v1beta1.SafetySetting.HarmBlockThreshold) } + /** + * + * + *
+   * Probability vs severity.
+   * 
+ * + * Protobuf enum {@code google.cloud.aiplatform.v1beta1.SafetySetting.HarmBlockMethod} + */ + public enum HarmBlockMethod implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The harm block method is unspecified.
+     * 
+ * + * HARM_BLOCK_METHOD_UNSPECIFIED = 0; + */ + HARM_BLOCK_METHOD_UNSPECIFIED(0), + /** + * + * + *
+     * The harm block method uses both probability and severity scores.
+     * 
+ * + * SEVERITY = 1; + */ + SEVERITY(1), + /** + * + * + *
+     * The harm block method uses the probability score.
+     * 
+ * + * PROBABILITY = 2; + */ + PROBABILITY(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The harm block method is unspecified.
+     * 
+ * + * HARM_BLOCK_METHOD_UNSPECIFIED = 0; + */ + public static final int HARM_BLOCK_METHOD_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The harm block method uses both probability and severity scores.
+     * 
+ * + * SEVERITY = 1; + */ + public static final int SEVERITY_VALUE = 1; + /** + * + * + *
+     * The harm block method uses the probability score.
+     * 
+ * + * PROBABILITY = 2; + */ + public static final int PROBABILITY_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static HarmBlockMethod valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static HarmBlockMethod forNumber(int value) { + switch (value) { + case 0: + return HARM_BLOCK_METHOD_UNSPECIFIED; + case 1: + return SEVERITY; + case 2: + return PROBABILITY; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public HarmBlockMethod findValueByNumber(int number) { + return HarmBlockMethod.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.SafetySetting.getDescriptor() + .getEnumTypes() + .get(1); + } + + private static final HarmBlockMethod[] VALUES = values(); + + public static HarmBlockMethod valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private HarmBlockMethod(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.aiplatform.v1beta1.SafetySetting.HarmBlockMethod) + } + public static final int CATEGORY_FIELD_NUMBER = 1; private int category_ = 0; /** @@ -350,6 +512,49 @@ public com.google.cloud.aiplatform.v1beta1.SafetySetting.HarmBlockThreshold getT : result; } + public static final int METHOD_FIELD_NUMBER = 4; + private int method_ = 0; + /** + * + * + *
+   * Optional. Specify if the threshold is used for probability or severity
+   * score. If not specified, the threshold is used for probability score.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SafetySetting.HarmBlockMethod method = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for method. + */ + @java.lang.Override + public int getMethodValue() { + return method_; + } + /** + * + * + *
+   * Optional. Specify if the threshold is used for probability or severity
+   * score. If not specified, the threshold is used for probability score.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SafetySetting.HarmBlockMethod method = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The method. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.SafetySetting.HarmBlockMethod getMethod() { + com.google.cloud.aiplatform.v1beta1.SafetySetting.HarmBlockMethod result = + com.google.cloud.aiplatform.v1beta1.SafetySetting.HarmBlockMethod.forNumber(method_); + return result == null + ? com.google.cloud.aiplatform.v1beta1.SafetySetting.HarmBlockMethod.UNRECOGNIZED + : result; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -374,6 +579,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(2, threshold_); } + if (method_ + != com.google.cloud.aiplatform.v1beta1.SafetySetting.HarmBlockMethod + .HARM_BLOCK_METHOD_UNSPECIFIED + .getNumber()) { + output.writeEnum(4, method_); + } getUnknownFields().writeTo(output); } @@ -393,6 +604,12 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, threshold_); } + if (method_ + != com.google.cloud.aiplatform.v1beta1.SafetySetting.HarmBlockMethod + .HARM_BLOCK_METHOD_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, method_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -411,6 +628,7 @@ public boolean equals(final java.lang.Object obj) { if (category_ != other.category_) return false; if (threshold_ != other.threshold_) return false; + if (method_ != other.method_) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -426,6 +644,8 @@ public int hashCode() { hash = (53 * hash) + category_; hash = (37 * hash) + THRESHOLD_FIELD_NUMBER; hash = (53 * hash) + threshold_; + hash = (37 * hash) + METHOD_FIELD_NUMBER; + hash = (53 * hash) + method_; hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -567,6 +787,7 @@ public Builder clear() { bitField0_ = 0; category_ = 0; threshold_ = 0; + method_ = 0; return this; } @@ -609,6 +830,9 @@ private void buildPartial0(com.google.cloud.aiplatform.v1beta1.SafetySetting res if (((from_bitField0_ & 0x00000002) != 0)) { result.threshold_ = threshold_; } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.method_ = method_; + } } @java.lang.Override @@ -663,6 +887,9 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.SafetySetting other if (other.threshold_ != 0) { setThresholdValue(other.getThresholdValue()); } + if (other.method_ != 0) { + setMethodValue(other.getMethodValue()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -701,6 +928,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000002; break; } // case 16 + case 32: + { + method_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 32 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -926,6 +1159,114 @@ public Builder clearThreshold() { return this; } + private int method_ = 0; + /** + * + * + *
+     * Optional. Specify if the threshold is used for probability or severity
+     * score. If not specified, the threshold is used for probability score.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SafetySetting.HarmBlockMethod method = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for method. + */ + @java.lang.Override + public int getMethodValue() { + return method_; + } + /** + * + * + *
+     * Optional. Specify if the threshold is used for probability or severity
+     * score. If not specified, the threshold is used for probability score.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SafetySetting.HarmBlockMethod method = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for method to set. + * @return This builder for chaining. + */ + public Builder setMethodValue(int value) { + method_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Specify if the threshold is used for probability or severity
+     * score. If not specified, the threshold is used for probability score.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SafetySetting.HarmBlockMethod method = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The method. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.SafetySetting.HarmBlockMethod getMethod() { + com.google.cloud.aiplatform.v1beta1.SafetySetting.HarmBlockMethod result = + com.google.cloud.aiplatform.v1beta1.SafetySetting.HarmBlockMethod.forNumber(method_); + return result == null + ? com.google.cloud.aiplatform.v1beta1.SafetySetting.HarmBlockMethod.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Optional. Specify if the threshold is used for probability or severity
+     * score. If not specified, the threshold is used for probability score.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SafetySetting.HarmBlockMethod method = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The method to set. + * @return This builder for chaining. + */ + public Builder setMethod( + com.google.cloud.aiplatform.v1beta1.SafetySetting.HarmBlockMethod value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + method_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Specify if the threshold is used for probability or severity
+     * score. If not specified, the threshold is used for probability score.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SafetySetting.HarmBlockMethod method = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearMethod() { + bitField0_ = (bitField0_ & ~0x00000004); + method_ = 0; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/SafetySettingOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/SafetySettingOrBuilder.java index 2e6dd521c90c..9af93542ea97 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/SafetySettingOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/SafetySettingOrBuilder.java @@ -81,4 +81,35 @@ public interface SafetySettingOrBuilder * @return The threshold. */ com.google.cloud.aiplatform.v1beta1.SafetySetting.HarmBlockThreshold getThreshold(); + + /** + * + * + *
+   * Optional. Specify if the threshold is used for probability or severity
+   * score. If not specified, the threshold is used for probability score.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SafetySetting.HarmBlockMethod method = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for method. + */ + int getMethodValue(); + /** + * + * + *
+   * Optional. Specify if the threshold is used for probability or severity
+   * score. If not specified, the threshold is used for probability score.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SafetySetting.HarmBlockMethod method = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The method. + */ + com.google.cloud.aiplatform.v1beta1.SafetySetting.HarmBlockMethod getMethod(); } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/Schema.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/Schema.java index 88ff6dba395a..129abeb89d47 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/Schema.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/Schema.java @@ -44,9 +44,11 @@ private Schema(com.google.protobuf.GeneratedMessageV3.Builder builder) { private Schema() { type_ = 0; format_ = ""; + title_ = ""; description_ = ""; enum_ = com.google.protobuf.LazyStringArrayList.emptyList(); required_ = com.google.protobuf.LazyStringArrayList.emptyList(); + pattern_ = ""; } @java.lang.Override @@ -130,8 +132,9 @@ public com.google.cloud.aiplatform.v1beta1.Type getType() { *
    * Optional. The format of the data.
    * Supported formats:
-   *  for NUMBER type: float, double
-   *  for INTEGER type: int32, int64
+   *  for NUMBER type: "float", "double"
+   *  for INTEGER type: "int32", "int64"
+   *  for STRING type: "email", "byte", etc
    * 
* * string format = 7 [(.google.api.field_behavior) = OPTIONAL]; @@ -156,8 +159,9 @@ public java.lang.String getFormat() { *
    * Optional. The format of the data.
    * Supported formats:
-   *  for NUMBER type: float, double
-   *  for INTEGER type: int32, int64
+   *  for NUMBER type: "float", "double"
+   *  for INTEGER type: "int32", "int64"
+   *  for STRING type: "email", "byte", etc
    * 
* * string format = 7 [(.google.api.field_behavior) = OPTIONAL]; @@ -177,6 +181,57 @@ public com.google.protobuf.ByteString getFormatBytes() { } } + public static final int TITLE_FIELD_NUMBER = 24; + + @SuppressWarnings("serial") + private volatile java.lang.Object title_ = ""; + /** + * + * + *
+   * Optional. The title of the Schema.
+   * 
+ * + * string title = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The title. + */ + @java.lang.Override + public java.lang.String getTitle() { + java.lang.Object ref = title_; + 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(); + title_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The title of the Schema.
+   * 
+ * + * string title = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for title. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + public static final int DESCRIPTION_FIELD_NUMBER = 8; @SuppressWarnings("serial") @@ -246,13 +301,60 @@ public boolean getNullable() { return nullable_; } + public static final int DEFAULT_FIELD_NUMBER = 23; + private com.google.protobuf.Value default_; + /** + * + * + *
+   * Optional. Default value of the data.
+   * 
+ * + * .google.protobuf.Value default = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the default field is set. + */ + @java.lang.Override + public boolean hasDefault() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Optional. Default value of the data.
+   * 
+ * + * .google.protobuf.Value default = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The default. + */ + @java.lang.Override + public com.google.protobuf.Value getDefault() { + return default_ == null ? com.google.protobuf.Value.getDefaultInstance() : default_; + } + /** + * + * + *
+   * Optional. Default value of the data.
+   * 
+ * + * .google.protobuf.Value default = 23 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public com.google.protobuf.ValueOrBuilder getDefaultOrBuilder() { + return default_ == null ? com.google.protobuf.Value.getDefaultInstance() : default_; + } + public static final int ITEMS_FIELD_NUMBER = 2; private com.google.cloud.aiplatform.v1beta1.Schema items_; /** * * *
-   * Optional. Schema of the elements of Type.ARRAY.
+   * Optional. SCHEMA FIELDS FOR TYPE ARRAY
+   * Schema of the elements of Type.ARRAY.
    * 
* * @@ -263,13 +365,14 @@ public boolean getNullable() { */ @java.lang.Override public boolean hasItems() { - return ((bitField0_ & 0x00000001) != 0); + return ((bitField0_ & 0x00000002) != 0); } /** * * *
-   * Optional. Schema of the elements of Type.ARRAY.
+   * Optional. SCHEMA FIELDS FOR TYPE ARRAY
+   * Schema of the elements of Type.ARRAY.
    * 
* * @@ -288,7 +391,8 @@ public com.google.cloud.aiplatform.v1beta1.Schema getItems() { * * *
-   * Optional. Schema of the elements of Type.ARRAY.
+   * Optional. SCHEMA FIELDS FOR TYPE ARRAY
+   * Schema of the elements of Type.ARRAY.
    * 
* * @@ -302,6 +406,42 @@ public com.google.cloud.aiplatform.v1beta1.SchemaOrBuilder getItemsOrBuilder() { : items_; } + public static final int MIN_ITEMS_FIELD_NUMBER = 21; + private long minItems_ = 0L; + /** + * + * + *
+   * Optional. Minimum number of the elements for Type.ARRAY.
+   * 
+ * + * int64 min_items = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The minItems. + */ + @java.lang.Override + public long getMinItems() { + return minItems_; + } + + public static final int MAX_ITEMS_FIELD_NUMBER = 22; + private long maxItems_ = 0L; + /** + * + * + *
+   * Optional. Maximum number of the elements for Type.ARRAY.
+   * 
+ * + * int64 max_items = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The maxItems. + */ + @java.lang.Override + public long getMaxItems() { + return maxItems_; + } + public static final int ENUM_FIELD_NUMBER = 9; @SuppressWarnings("serial") @@ -409,7 +549,8 @@ public int getPropertiesCount() { * * *
-   * Optional. Properties of Type.OBJECT.
+   * Optional. SCHEMA FIELDS FOR TYPE OBJECT
+   * Properties of Type.OBJECT.
    * 
* * @@ -434,7 +575,8 @@ public boolean containsProperties(java.lang.String key) { * * *
-   * Optional. Properties of Type.OBJECT.
+   * Optional. SCHEMA FIELDS FOR TYPE OBJECT
+   * Properties of Type.OBJECT.
    * 
* * @@ -450,7 +592,8 @@ public boolean containsProperties(java.lang.String key) { * * *
-   * Optional. Properties of Type.OBJECT.
+   * Optional. SCHEMA FIELDS FOR TYPE OBJECT
+   * Properties of Type.OBJECT.
    * 
* * @@ -473,7 +616,8 @@ public boolean containsProperties(java.lang.String key) { * * *
-   * Optional. Properties of Type.OBJECT.
+   * Optional. SCHEMA FIELDS FOR TYPE OBJECT
+   * Properties of Type.OBJECT.
    * 
* * @@ -557,6 +701,169 @@ public com.google.protobuf.ByteString getRequiredBytes(int index) { return required_.getByteString(index); } + public static final int MIN_PROPERTIES_FIELD_NUMBER = 14; + private long minProperties_ = 0L; + /** + * + * + *
+   * Optional. Minimum number of the properties for Type.OBJECT.
+   * 
+ * + * int64 min_properties = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The minProperties. + */ + @java.lang.Override + public long getMinProperties() { + return minProperties_; + } + + public static final int MAX_PROPERTIES_FIELD_NUMBER = 15; + private long maxProperties_ = 0L; + /** + * + * + *
+   * Optional. Maximum number of the properties for Type.OBJECT.
+   * 
+ * + * int64 max_properties = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The maxProperties. + */ + @java.lang.Override + public long getMaxProperties() { + return maxProperties_; + } + + public static final int MINIMUM_FIELD_NUMBER = 16; + private double minimum_ = 0D; + /** + * + * + *
+   * Optional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER
+   * Minimum value of the Type.INTEGER and Type.NUMBER
+   * 
+ * + * double minimum = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The minimum. + */ + @java.lang.Override + public double getMinimum() { + return minimum_; + } + + public static final int MAXIMUM_FIELD_NUMBER = 17; + private double maximum_ = 0D; + /** + * + * + *
+   * Optional. Maximum value of the Type.INTEGER and Type.NUMBER
+   * 
+ * + * double maximum = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The maximum. + */ + @java.lang.Override + public double getMaximum() { + return maximum_; + } + + public static final int MIN_LENGTH_FIELD_NUMBER = 18; + private long minLength_ = 0L; + /** + * + * + *
+   * Optional. SCHEMA FIELDS FOR TYPE STRING
+   * Minimum length of the Type.STRING
+   * 
+ * + * int64 min_length = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The minLength. + */ + @java.lang.Override + public long getMinLength() { + return minLength_; + } + + public static final int MAX_LENGTH_FIELD_NUMBER = 19; + private long maxLength_ = 0L; + /** + * + * + *
+   * Optional. Maximum length of the Type.STRING
+   * 
+ * + * int64 max_length = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The maxLength. + */ + @java.lang.Override + public long getMaxLength() { + return maxLength_; + } + + public static final int PATTERN_FIELD_NUMBER = 20; + + @SuppressWarnings("serial") + private volatile java.lang.Object pattern_ = ""; + /** + * + * + *
+   * Optional. Pattern of the Type.STRING to restrict a string to a regular
+   * expression.
+   * 
+ * + * string pattern = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pattern. + */ + @java.lang.Override + public java.lang.String getPattern() { + java.lang.Object ref = pattern_; + 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(); + pattern_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Pattern of the Type.STRING to restrict a string to a regular
+   * expression.
+   * 
+ * + * string pattern = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pattern. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPatternBytes() { + java.lang.Object ref = pattern_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pattern_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + public static final int EXAMPLE_FIELD_NUMBER = 4; private com.google.protobuf.Value example_; /** @@ -573,7 +880,7 @@ public com.google.protobuf.ByteString getRequiredBytes(int index) { */ @java.lang.Override public boolean hasExample() { - return ((bitField0_ & 0x00000002) != 0); + return ((bitField0_ & 0x00000004) != 0); } /** * @@ -623,12 +930,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (type_ != com.google.cloud.aiplatform.v1beta1.Type.TYPE_UNSPECIFIED.getNumber()) { output.writeEnum(1, type_); } - if (((bitField0_ & 0x00000001) != 0)) { + if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(2, getItems()); } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetProperties(), PropertiesDefaultEntryHolder.defaultEntry, 3); - if (((bitField0_ & 0x00000002) != 0)) { + if (((bitField0_ & 0x00000004) != 0)) { output.writeMessage(4, getExample()); } for (int i = 0; i < required_.size(); i++) { @@ -646,6 +953,39 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < enum_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 9, enum_.getRaw(i)); } + if (minProperties_ != 0L) { + output.writeInt64(14, minProperties_); + } + if (maxProperties_ != 0L) { + output.writeInt64(15, maxProperties_); + } + if (java.lang.Double.doubleToRawLongBits(minimum_) != 0) { + output.writeDouble(16, minimum_); + } + if (java.lang.Double.doubleToRawLongBits(maximum_) != 0) { + output.writeDouble(17, maximum_); + } + if (minLength_ != 0L) { + output.writeInt64(18, minLength_); + } + if (maxLength_ != 0L) { + output.writeInt64(19, maxLength_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pattern_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 20, pattern_); + } + if (minItems_ != 0L) { + output.writeInt64(21, minItems_); + } + if (maxItems_ != 0L) { + output.writeInt64(22, maxItems_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(23, getDefault()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 24, title_); + } getUnknownFields().writeTo(output); } @@ -658,7 +998,7 @@ public int getSerializedSize() { if (type_ != com.google.cloud.aiplatform.v1beta1.Type.TYPE_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, type_); } - if (((bitField0_ & 0x00000001) != 0)) { + if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getItems()); } for (java.util.Map.Entry entry : @@ -672,7 +1012,7 @@ public int getSerializedSize() { .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, properties__); } - if (((bitField0_ & 0x00000002) != 0)) { + if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getExample()); } { @@ -700,6 +1040,39 @@ public int getSerializedSize() { size += dataSize; size += 1 * getEnumList().size(); } + if (minProperties_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(14, minProperties_); + } + if (maxProperties_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(15, maxProperties_); + } + if (java.lang.Double.doubleToRawLongBits(minimum_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(16, minimum_); + } + if (java.lang.Double.doubleToRawLongBits(maximum_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(17, maximum_); + } + if (minLength_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(18, minLength_); + } + if (maxLength_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(19, maxLength_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pattern_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(20, pattern_); + } + if (minItems_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(21, minItems_); + } + if (maxItems_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(22, maxItems_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(23, getDefault()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(24, title_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -718,15 +1091,31 @@ public boolean equals(final java.lang.Object obj) { if (type_ != other.type_) return false; if (!getFormat().equals(other.getFormat())) return false; + if (!getTitle().equals(other.getTitle())) return false; if (!getDescription().equals(other.getDescription())) return false; if (getNullable() != other.getNullable()) return false; + if (hasDefault() != other.hasDefault()) return false; + if (hasDefault()) { + if (!getDefault().equals(other.getDefault())) return false; + } if (hasItems() != other.hasItems()) return false; if (hasItems()) { if (!getItems().equals(other.getItems())) return false; } + if (getMinItems() != other.getMinItems()) return false; + if (getMaxItems() != other.getMaxItems()) return false; if (!getEnumList().equals(other.getEnumList())) return false; if (!internalGetProperties().equals(other.internalGetProperties())) return false; if (!getRequiredList().equals(other.getRequiredList())) return false; + if (getMinProperties() != other.getMinProperties()) return false; + if (getMaxProperties() != other.getMaxProperties()) return false; + if (java.lang.Double.doubleToLongBits(getMinimum()) + != java.lang.Double.doubleToLongBits(other.getMinimum())) return false; + if (java.lang.Double.doubleToLongBits(getMaximum()) + != java.lang.Double.doubleToLongBits(other.getMaximum())) return false; + if (getMinLength() != other.getMinLength()) return false; + if (getMaxLength() != other.getMaxLength()) return false; + if (!getPattern().equals(other.getPattern())) return false; if (hasExample() != other.hasExample()) return false; if (hasExample()) { if (!getExample().equals(other.getExample())) return false; @@ -746,14 +1135,24 @@ public int hashCode() { hash = (53 * hash) + type_; hash = (37 * hash) + FORMAT_FIELD_NUMBER; hash = (53 * hash) + getFormat().hashCode(); + hash = (37 * hash) + TITLE_FIELD_NUMBER; + hash = (53 * hash) + getTitle().hashCode(); hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; hash = (53 * hash) + getDescription().hashCode(); hash = (37 * hash) + NULLABLE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getNullable()); + if (hasDefault()) { + hash = (37 * hash) + DEFAULT_FIELD_NUMBER; + hash = (53 * hash) + getDefault().hashCode(); + } if (hasItems()) { hash = (37 * hash) + ITEMS_FIELD_NUMBER; hash = (53 * hash) + getItems().hashCode(); } + hash = (37 * hash) + MIN_ITEMS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getMinItems()); + hash = (37 * hash) + MAX_ITEMS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getMaxItems()); if (getEnumCount() > 0) { hash = (37 * hash) + ENUM_FIELD_NUMBER; hash = (53 * hash) + getEnumList().hashCode(); @@ -766,6 +1165,26 @@ public int hashCode() { hash = (37 * hash) + REQUIRED_FIELD_NUMBER; hash = (53 * hash) + getRequiredList().hashCode(); } + hash = (37 * hash) + MIN_PROPERTIES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getMinProperties()); + hash = (37 * hash) + MAX_PROPERTIES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getMaxProperties()); + hash = (37 * hash) + MINIMUM_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getMinimum())); + hash = (37 * hash) + MAXIMUM_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getMaximum())); + hash = (37 * hash) + MIN_LENGTH_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getMinLength()); + hash = (37 * hash) + MAX_LENGTH_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getMaxLength()); + hash = (37 * hash) + PATTERN_FIELD_NUMBER; + hash = (53 * hash) + getPattern().hashCode(); if (hasExample()) { hash = (37 * hash) + EXAMPLE_FIELD_NUMBER; hash = (53 * hash) + getExample().hashCode(); @@ -935,6 +1354,7 @@ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getDefaultFieldBuilder(); getItemsFieldBuilder(); getExampleFieldBuilder(); } @@ -946,16 +1366,31 @@ public Builder clear() { bitField0_ = 0; type_ = 0; format_ = ""; + title_ = ""; description_ = ""; nullable_ = false; + default_ = null; + if (defaultBuilder_ != null) { + defaultBuilder_.dispose(); + defaultBuilder_ = null; + } items_ = null; if (itemsBuilder_ != null) { itemsBuilder_.dispose(); itemsBuilder_ = null; } + minItems_ = 0L; + maxItems_ = 0L; enum_ = com.google.protobuf.LazyStringArrayList.emptyList(); internalGetMutableProperties().clear(); required_ = com.google.protobuf.LazyStringArrayList.emptyList(); + minProperties_ = 0L; + maxProperties_ = 0L; + minimum_ = 0D; + maximum_ = 0D; + minLength_ = 0L; + maxLength_ = 0L; + pattern_ = ""; example_ = null; if (exampleBuilder_ != null) { exampleBuilder_.dispose(); @@ -1004,31 +1439,65 @@ private void buildPartial0(com.google.cloud.aiplatform.v1beta1.Schema result) { result.format_ = format_; } if (((from_bitField0_ & 0x00000004) != 0)) { - result.description_ = description_; + result.title_ = title_; } if (((from_bitField0_ & 0x00000008) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { result.nullable_ = nullable_; } int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000010) != 0)) { - result.items_ = itemsBuilder_ == null ? items_ : itemsBuilder_.build(); + if (((from_bitField0_ & 0x00000020) != 0)) { + result.default_ = defaultBuilder_ == null ? default_ : defaultBuilder_.build(); to_bitField0_ |= 0x00000001; } - if (((from_bitField0_ & 0x00000020) != 0)) { + if (((from_bitField0_ & 0x00000040) != 0)) { + result.items_ = itemsBuilder_ == null ? items_ : itemsBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.minItems_ = minItems_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.maxItems_ = maxItems_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { enum_.makeImmutable(); result.enum_ = enum_; } - if (((from_bitField0_ & 0x00000040) != 0)) { + if (((from_bitField0_ & 0x00000400) != 0)) { result.properties_ = internalGetProperties().build(PropertiesDefaultEntryHolder.defaultEntry); } - if (((from_bitField0_ & 0x00000080) != 0)) { + if (((from_bitField0_ & 0x00000800) != 0)) { required_.makeImmutable(); result.required_ = required_; } - if (((from_bitField0_ & 0x00000100) != 0)) { + if (((from_bitField0_ & 0x00001000) != 0)) { + result.minProperties_ = minProperties_; + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.maxProperties_ = maxProperties_; + } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.minimum_ = minimum_; + } + if (((from_bitField0_ & 0x00008000) != 0)) { + result.maximum_ = maximum_; + } + if (((from_bitField0_ & 0x00010000) != 0)) { + result.minLength_ = minLength_; + } + if (((from_bitField0_ & 0x00020000) != 0)) { + result.maxLength_ = maxLength_; + } + if (((from_bitField0_ & 0x00040000) != 0)) { + result.pattern_ = pattern_; + } + if (((from_bitField0_ & 0x00080000) != 0)) { result.example_ = exampleBuilder_ == null ? example_ : exampleBuilder_.build(); - to_bitField0_ |= 0x00000002; + to_bitField0_ |= 0x00000004; } result.bitField0_ |= to_bitField0_; } @@ -1086,21 +1555,35 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.Schema other) { bitField0_ |= 0x00000002; onChanged(); } + if (!other.getTitle().isEmpty()) { + title_ = other.title_; + bitField0_ |= 0x00000004; + onChanged(); + } if (!other.getDescription().isEmpty()) { description_ = other.description_; - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); } if (other.getNullable() != false) { setNullable(other.getNullable()); } + if (other.hasDefault()) { + mergeDefault(other.getDefault()); + } if (other.hasItems()) { mergeItems(other.getItems()); } + if (other.getMinItems() != 0L) { + setMinItems(other.getMinItems()); + } + if (other.getMaxItems() != 0L) { + setMaxItems(other.getMaxItems()); + } if (!other.enum_.isEmpty()) { if (enum_.isEmpty()) { enum_ = other.enum_; - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000200; } else { ensureEnumIsMutable(); enum_.addAll(other.enum_); @@ -1108,17 +1591,40 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.Schema other) { onChanged(); } internalGetMutableProperties().mergeFrom(other.internalGetProperties()); - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000400; if (!other.required_.isEmpty()) { if (required_.isEmpty()) { required_ = other.required_; - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000800; } else { ensureRequiredIsMutable(); required_.addAll(other.required_); } onChanged(); } + if (other.getMinProperties() != 0L) { + setMinProperties(other.getMinProperties()); + } + if (other.getMaxProperties() != 0L) { + setMaxProperties(other.getMaxProperties()); + } + if (other.getMinimum() != 0D) { + setMinimum(other.getMinimum()); + } + if (other.getMaximum() != 0D) { + setMaximum(other.getMaximum()); + } + if (other.getMinLength() != 0L) { + setMinLength(other.getMinLength()); + } + if (other.getMaxLength() != 0L) { + setMaxLength(other.getMaxLength()); + } + if (!other.getPattern().isEmpty()) { + pattern_ = other.pattern_; + bitField0_ |= 0x00040000; + onChanged(); + } if (other.hasExample()) { mergeExample(other.getExample()); } @@ -1157,7 +1663,7 @@ public Builder mergeFrom( case 18: { input.readMessage(getItemsFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000040; break; } // case 18 case 26: @@ -1171,13 +1677,13 @@ public Builder mergeFrom( internalGetMutableProperties() .ensureBuilderMap() .put(properties__.getKey(), properties__.getValue()); - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000400; break; } // case 26 case 34: { input.readMessage(getExampleFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000100; + bitField0_ |= 0x00080000; break; } // case 34 case 42: @@ -1190,7 +1696,7 @@ public Builder mergeFrom( case 48: { nullable_ = input.readBool(); - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; break; } // case 48 case 58: @@ -1202,7 +1708,7 @@ public Builder mergeFrom( case 66: { description_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; break; } // case 66 case 74: @@ -1212,6 +1718,72 @@ public Builder mergeFrom( enum_.add(s); break; } // case 74 + case 112: + { + minProperties_ = input.readInt64(); + bitField0_ |= 0x00001000; + break; + } // case 112 + case 120: + { + maxProperties_ = input.readInt64(); + bitField0_ |= 0x00002000; + break; + } // case 120 + case 129: + { + minimum_ = input.readDouble(); + bitField0_ |= 0x00004000; + break; + } // case 129 + case 137: + { + maximum_ = input.readDouble(); + bitField0_ |= 0x00008000; + break; + } // case 137 + case 144: + { + minLength_ = input.readInt64(); + bitField0_ |= 0x00010000; + break; + } // case 144 + case 152: + { + maxLength_ = input.readInt64(); + bitField0_ |= 0x00020000; + break; + } // case 152 + case 162: + { + pattern_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00040000; + break; + } // case 162 + case 168: + { + minItems_ = input.readInt64(); + bitField0_ |= 0x00000080; + break; + } // case 168 + case 176: + { + maxItems_ = input.readInt64(); + bitField0_ |= 0x00000100; + break; + } // case 176 + case 186: + { + input.readMessage(getDefaultFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 186 + case 194: + { + title_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 194 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1338,8 +1910,9 @@ public Builder clearType() { *
      * Optional. The format of the data.
      * Supported formats:
-     *  for NUMBER type: float, double
-     *  for INTEGER type: int32, int64
+     *  for NUMBER type: "float", "double"
+     *  for INTEGER type: "int32", "int64"
+     *  for STRING type: "email", "byte", etc
      * 
* * string format = 7 [(.google.api.field_behavior) = OPTIONAL]; @@ -1363,8 +1936,9 @@ public java.lang.String getFormat() { *
      * Optional. The format of the data.
      * Supported formats:
-     *  for NUMBER type: float, double
-     *  for INTEGER type: int32, int64
+     *  for NUMBER type: "float", "double"
+     *  for INTEGER type: "int32", "int64"
+     *  for STRING type: "email", "byte", etc
      * 
* * string format = 7 [(.google.api.field_behavior) = OPTIONAL]; @@ -1388,8 +1962,9 @@ public com.google.protobuf.ByteString getFormatBytes() { *
      * Optional. The format of the data.
      * Supported formats:
-     *  for NUMBER type: float, double
-     *  for INTEGER type: int32, int64
+     *  for NUMBER type: "float", "double"
+     *  for INTEGER type: "int32", "int64"
+     *  for STRING type: "email", "byte", etc
      * 
* * string format = 7 [(.google.api.field_behavior) = OPTIONAL]; @@ -1412,8 +1987,9 @@ public Builder setFormat(java.lang.String value) { *
      * Optional. The format of the data.
      * Supported formats:
-     *  for NUMBER type: float, double
-     *  for INTEGER type: int32, int64
+     *  for NUMBER type: "float", "double"
+     *  for INTEGER type: "int32", "int64"
+     *  for STRING type: "email", "byte", etc
      * 
* * string format = 7 [(.google.api.field_behavior) = OPTIONAL]; @@ -1432,8 +2008,9 @@ public Builder clearFormat() { *
      * Optional. The format of the data.
      * Supported formats:
-     *  for NUMBER type: float, double
-     *  for INTEGER type: int32, int64
+     *  for NUMBER type: "float", "double"
+     *  for INTEGER type: "int32", "int64"
+     *  for STRING type: "email", "byte", etc
      * 
* * string format = 7 [(.google.api.field_behavior) = OPTIONAL]; @@ -1452,6 +2029,112 @@ public Builder setFormatBytes(com.google.protobuf.ByteString value) { return this; } + private java.lang.Object title_ = ""; + /** + * + * + *
+     * Optional. The title of the Schema.
+     * 
+ * + * string title = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The title. + */ + public java.lang.String getTitle() { + java.lang.Object ref = title_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + title_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The title of the Schema.
+     * 
+ * + * string title = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for title. + */ + public com.google.protobuf.ByteString getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The title of the Schema.
+     * 
+ * + * string title = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The title to set. + * @return This builder for chaining. + */ + public Builder setTitle(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + title_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The title of the Schema.
+     * 
+ * + * string title = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearTitle() { + title_ = getDefaultInstance().getTitle(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The title of the Schema.
+     * 
+ * + * string title = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for title to set. + * @return This builder for chaining. + */ + public Builder setTitleBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + title_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + private java.lang.Object description_ = ""; /** * @@ -1514,7 +2197,7 @@ public Builder setDescription(java.lang.String value) { throw new NullPointerException(); } description_ = value; - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -1531,7 +2214,7 @@ public Builder setDescription(java.lang.String value) { */ public Builder clearDescription() { description_ = getDefaultInstance().getDescription(); - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000008); onChanged(); return this; } @@ -1553,7 +2236,7 @@ public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); description_ = value; - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -1589,7 +2272,7 @@ public boolean getNullable() { public Builder setNullable(boolean value) { nullable_ = value; - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -1605,77 +2288,69 @@ public Builder setNullable(boolean value) { * @return This builder for chaining. */ public Builder clearNullable() { - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000010); nullable_ = false; onChanged(); return this; } - private com.google.cloud.aiplatform.v1beta1.Schema items_; + private com.google.protobuf.Value default_; private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.aiplatform.v1beta1.Schema, - com.google.cloud.aiplatform.v1beta1.Schema.Builder, - com.google.cloud.aiplatform.v1beta1.SchemaOrBuilder> - itemsBuilder_; + com.google.protobuf.Value, + com.google.protobuf.Value.Builder, + com.google.protobuf.ValueOrBuilder> + defaultBuilder_; /** * * *
-     * Optional. Schema of the elements of Type.ARRAY.
+     * Optional. Default value of the data.
      * 
* - * - * .google.cloud.aiplatform.v1beta1.Schema items = 2 [(.google.api.field_behavior) = OPTIONAL]; - * + * .google.protobuf.Value default = 23 [(.google.api.field_behavior) = OPTIONAL]; * - * @return Whether the items field is set. + * @return Whether the default field is set. */ - public boolean hasItems() { - return ((bitField0_ & 0x00000010) != 0); + public boolean hasDefault() { + return ((bitField0_ & 0x00000020) != 0); } /** * * *
-     * Optional. Schema of the elements of Type.ARRAY.
+     * Optional. Default value of the data.
      * 
* - * - * .google.cloud.aiplatform.v1beta1.Schema items = 2 [(.google.api.field_behavior) = OPTIONAL]; - * + * .google.protobuf.Value default = 23 [(.google.api.field_behavior) = OPTIONAL]; * - * @return The items. + * @return The default. */ - public com.google.cloud.aiplatform.v1beta1.Schema getItems() { - if (itemsBuilder_ == null) { - return items_ == null - ? com.google.cloud.aiplatform.v1beta1.Schema.getDefaultInstance() - : items_; + public com.google.protobuf.Value getDefault() { + if (defaultBuilder_ == null) { + return default_ == null ? com.google.protobuf.Value.getDefaultInstance() : default_; } else { - return itemsBuilder_.getMessage(); + return defaultBuilder_.getMessage(); } } /** * * *
-     * Optional. Schema of the elements of Type.ARRAY.
+     * Optional. Default value of the data.
      * 
* - * - * .google.cloud.aiplatform.v1beta1.Schema items = 2 [(.google.api.field_behavior) = OPTIONAL]; - * + * .google.protobuf.Value default = 23 [(.google.api.field_behavior) = OPTIONAL]; */ - public Builder setItems(com.google.cloud.aiplatform.v1beta1.Schema value) { - if (itemsBuilder_ == null) { + public Builder setDefault(com.google.protobuf.Value value) { + if (defaultBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - items_ = value; + default_ = value; } else { - itemsBuilder_.setMessage(value); + defaultBuilder_.setMessage(value); } - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -1683,20 +2358,18 @@ public Builder setItems(com.google.cloud.aiplatform.v1beta1.Schema value) { * * *
-     * Optional. Schema of the elements of Type.ARRAY.
+     * Optional. Default value of the data.
      * 
* - * - * .google.cloud.aiplatform.v1beta1.Schema items = 2 [(.google.api.field_behavior) = OPTIONAL]; - * + * .google.protobuf.Value default = 23 [(.google.api.field_behavior) = OPTIONAL]; */ - public Builder setItems(com.google.cloud.aiplatform.v1beta1.Schema.Builder builderForValue) { - if (itemsBuilder_ == null) { - items_ = builderForValue.build(); + public Builder setDefault(com.google.protobuf.Value.Builder builderForValue) { + if (defaultBuilder_ == null) { + default_ = builderForValue.build(); } else { - itemsBuilder_.setMessage(builderForValue.build()); + defaultBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -1704,27 +2377,25 @@ public Builder setItems(com.google.cloud.aiplatform.v1beta1.Schema.Builder build * * *
-     * Optional. Schema of the elements of Type.ARRAY.
+     * Optional. Default value of the data.
      * 
* - * - * .google.cloud.aiplatform.v1beta1.Schema items = 2 [(.google.api.field_behavior) = OPTIONAL]; - * + * .google.protobuf.Value default = 23 [(.google.api.field_behavior) = OPTIONAL]; */ - public Builder mergeItems(com.google.cloud.aiplatform.v1beta1.Schema value) { - if (itemsBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0) - && items_ != null - && items_ != com.google.cloud.aiplatform.v1beta1.Schema.getDefaultInstance()) { - getItemsBuilder().mergeFrom(value); + public Builder mergeDefault(com.google.protobuf.Value value) { + if (defaultBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && default_ != null + && default_ != com.google.protobuf.Value.getDefaultInstance()) { + getDefaultBuilder().mergeFrom(value); } else { - items_ = value; + default_ = value; } } else { - itemsBuilder_.mergeFrom(value); + defaultBuilder_.mergeFrom(value); } - if (items_ != null) { - bitField0_ |= 0x00000010; + if (default_ != null) { + bitField0_ |= 0x00000020; onChanged(); } return this; @@ -1733,19 +2404,17 @@ public Builder mergeItems(com.google.cloud.aiplatform.v1beta1.Schema value) { * * *
-     * Optional. Schema of the elements of Type.ARRAY.
+     * Optional. Default value of the data.
      * 
* - * - * .google.cloud.aiplatform.v1beta1.Schema items = 2 [(.google.api.field_behavior) = OPTIONAL]; - * + * .google.protobuf.Value default = 23 [(.google.api.field_behavior) = OPTIONAL]; */ - public Builder clearItems() { - bitField0_ = (bitField0_ & ~0x00000010); - items_ = null; - if (itemsBuilder_ != null) { - itemsBuilder_.dispose(); - itemsBuilder_ = null; + public Builder clearDefault() { + bitField0_ = (bitField0_ & ~0x00000020); + default_ = null; + if (defaultBuilder_ != null) { + defaultBuilder_.dispose(); + defaultBuilder_ = null; } onChanged(); return this; @@ -1754,164 +2423,915 @@ public Builder clearItems() { * * *
-     * Optional. Schema of the elements of Type.ARRAY.
+     * Optional. Default value of the data.
      * 
* - * - * .google.cloud.aiplatform.v1beta1.Schema items = 2 [(.google.api.field_behavior) = OPTIONAL]; - * + * .google.protobuf.Value default = 23 [(.google.api.field_behavior) = OPTIONAL]; */ - public com.google.cloud.aiplatform.v1beta1.Schema.Builder getItemsBuilder() { - bitField0_ |= 0x00000010; + public com.google.protobuf.Value.Builder getDefaultBuilder() { + bitField0_ |= 0x00000020; onChanged(); - return getItemsFieldBuilder().getBuilder(); + return getDefaultFieldBuilder().getBuilder(); } /** * * *
-     * Optional. Schema of the elements of Type.ARRAY.
+     * Optional. Default value of the data.
      * 
* - * - * .google.cloud.aiplatform.v1beta1.Schema items = 2 [(.google.api.field_behavior) = OPTIONAL]; - * + * .google.protobuf.Value default = 23 [(.google.api.field_behavior) = OPTIONAL]; */ - public com.google.cloud.aiplatform.v1beta1.SchemaOrBuilder getItemsOrBuilder() { - if (itemsBuilder_ != null) { - return itemsBuilder_.getMessageOrBuilder(); + public com.google.protobuf.ValueOrBuilder getDefaultOrBuilder() { + if (defaultBuilder_ != null) { + return defaultBuilder_.getMessageOrBuilder(); } else { - return items_ == null - ? com.google.cloud.aiplatform.v1beta1.Schema.getDefaultInstance() - : items_; + return default_ == null ? com.google.protobuf.Value.getDefaultInstance() : default_; } } /** * * *
-     * Optional. Schema of the elements of Type.ARRAY.
+     * Optional. Default value of the data.
      * 
* - * - * .google.cloud.aiplatform.v1beta1.Schema items = 2 [(.google.api.field_behavior) = OPTIONAL]; - * + * .google.protobuf.Value default = 23 [(.google.api.field_behavior) = OPTIONAL]; */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.aiplatform.v1beta1.Schema, - com.google.cloud.aiplatform.v1beta1.Schema.Builder, - com.google.cloud.aiplatform.v1beta1.SchemaOrBuilder> - getItemsFieldBuilder() { - if (itemsBuilder_ == null) { - itemsBuilder_ = + com.google.protobuf.Value, + com.google.protobuf.Value.Builder, + com.google.protobuf.ValueOrBuilder> + getDefaultFieldBuilder() { + if (defaultBuilder_ == null) { + defaultBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.aiplatform.v1beta1.Schema, - com.google.cloud.aiplatform.v1beta1.Schema.Builder, - com.google.cloud.aiplatform.v1beta1.SchemaOrBuilder>( - getItems(), getParentForChildren(), isClean()); - items_ = null; + com.google.protobuf.Value, + com.google.protobuf.Value.Builder, + com.google.protobuf.ValueOrBuilder>( + getDefault(), getParentForChildren(), isClean()); + default_ = null; } - return itemsBuilder_; + return defaultBuilder_; } - private com.google.protobuf.LazyStringArrayList enum_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - - private void ensureEnumIsMutable() { - if (!enum_.isModifiable()) { - enum_ = new com.google.protobuf.LazyStringArrayList(enum_); - } - bitField0_ |= 0x00000020; - } + private com.google.cloud.aiplatform.v1beta1.Schema items_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.Schema, + com.google.cloud.aiplatform.v1beta1.Schema.Builder, + com.google.cloud.aiplatform.v1beta1.SchemaOrBuilder> + itemsBuilder_; /** * * *
-     * Optional. Possible values of the element of Type.STRING with enum format.
-     * For example we can define an Enum Direction as :
-     * {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]}
+     * Optional. SCHEMA FIELDS FOR TYPE ARRAY
+     * Schema of the elements of Type.ARRAY.
      * 
* - * repeated string enum = 9 [(.google.api.field_behavior) = OPTIONAL]; - * + * + * .google.cloud.aiplatform.v1beta1.Schema items = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the items field is set. + */ + public boolean hasItems() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+     * Optional. SCHEMA FIELDS FOR TYPE ARRAY
+     * Schema of the elements of Type.ARRAY.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.Schema items = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The items. + */ + public com.google.cloud.aiplatform.v1beta1.Schema getItems() { + if (itemsBuilder_ == null) { + return items_ == null + ? com.google.cloud.aiplatform.v1beta1.Schema.getDefaultInstance() + : items_; + } else { + return itemsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. SCHEMA FIELDS FOR TYPE ARRAY
+     * Schema of the elements of Type.ARRAY.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.Schema items = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setItems(com.google.cloud.aiplatform.v1beta1.Schema value) { + if (itemsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + items_ = value; + } else { + itemsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. SCHEMA FIELDS FOR TYPE ARRAY
+     * Schema of the elements of Type.ARRAY.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.Schema items = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setItems(com.google.cloud.aiplatform.v1beta1.Schema.Builder builderForValue) { + if (itemsBuilder_ == null) { + items_ = builderForValue.build(); + } else { + itemsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. SCHEMA FIELDS FOR TYPE ARRAY
+     * Schema of the elements of Type.ARRAY.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.Schema items = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeItems(com.google.cloud.aiplatform.v1beta1.Schema value) { + if (itemsBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && items_ != null + && items_ != com.google.cloud.aiplatform.v1beta1.Schema.getDefaultInstance()) { + getItemsBuilder().mergeFrom(value); + } else { + items_ = value; + } + } else { + itemsBuilder_.mergeFrom(value); + } + if (items_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Optional. SCHEMA FIELDS FOR TYPE ARRAY
+     * Schema of the elements of Type.ARRAY.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.Schema items = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearItems() { + bitField0_ = (bitField0_ & ~0x00000040); + items_ = null; + if (itemsBuilder_ != null) { + itemsBuilder_.dispose(); + itemsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. SCHEMA FIELDS FOR TYPE ARRAY
+     * Schema of the elements of Type.ARRAY.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.Schema items = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1beta1.Schema.Builder getItemsBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getItemsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. SCHEMA FIELDS FOR TYPE ARRAY
+     * Schema of the elements of Type.ARRAY.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.Schema items = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1beta1.SchemaOrBuilder getItemsOrBuilder() { + if (itemsBuilder_ != null) { + return itemsBuilder_.getMessageOrBuilder(); + } else { + return items_ == null + ? com.google.cloud.aiplatform.v1beta1.Schema.getDefaultInstance() + : items_; + } + } + /** + * + * + *
+     * Optional. SCHEMA FIELDS FOR TYPE ARRAY
+     * Schema of the elements of Type.ARRAY.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.Schema items = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.Schema, + com.google.cloud.aiplatform.v1beta1.Schema.Builder, + com.google.cloud.aiplatform.v1beta1.SchemaOrBuilder> + getItemsFieldBuilder() { + if (itemsBuilder_ == null) { + itemsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.Schema, + com.google.cloud.aiplatform.v1beta1.Schema.Builder, + com.google.cloud.aiplatform.v1beta1.SchemaOrBuilder>( + getItems(), getParentForChildren(), isClean()); + items_ = null; + } + return itemsBuilder_; + } + + private long minItems_; + /** + * + * + *
+     * Optional. Minimum number of the elements for Type.ARRAY.
+     * 
+ * + * int64 min_items = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The minItems. + */ + @java.lang.Override + public long getMinItems() { + return minItems_; + } + /** + * + * + *
+     * Optional. Minimum number of the elements for Type.ARRAY.
+     * 
+ * + * int64 min_items = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The minItems to set. + * @return This builder for chaining. + */ + public Builder setMinItems(long value) { + + minItems_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Minimum number of the elements for Type.ARRAY.
+     * 
+ * + * int64 min_items = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearMinItems() { + bitField0_ = (bitField0_ & ~0x00000080); + minItems_ = 0L; + onChanged(); + return this; + } + + private long maxItems_; + /** + * + * + *
+     * Optional. Maximum number of the elements for Type.ARRAY.
+     * 
+ * + * int64 max_items = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The maxItems. + */ + @java.lang.Override + public long getMaxItems() { + return maxItems_; + } + /** + * + * + *
+     * Optional. Maximum number of the elements for Type.ARRAY.
+     * 
+ * + * int64 max_items = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The maxItems to set. + * @return This builder for chaining. + */ + public Builder setMaxItems(long value) { + + maxItems_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Maximum number of the elements for Type.ARRAY.
+     * 
+ * + * int64 max_items = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearMaxItems() { + bitField0_ = (bitField0_ & ~0x00000100); + maxItems_ = 0L; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList enum_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureEnumIsMutable() { + if (!enum_.isModifiable()) { + enum_ = new com.google.protobuf.LazyStringArrayList(enum_); + } + bitField0_ |= 0x00000200; + } + /** + * + * + *
+     * Optional. Possible values of the element of Type.STRING with enum format.
+     * For example we can define an Enum Direction as :
+     * {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]}
+     * 
+ * + * repeated string enum = 9 [(.google.api.field_behavior) = OPTIONAL]; + * * @return A list containing the enum. */ - public com.google.protobuf.ProtocolStringList getEnumList() { - enum_.makeImmutable(); - return enum_; + public com.google.protobuf.ProtocolStringList getEnumList() { + enum_.makeImmutable(); + return enum_; + } + /** + * + * + *
+     * Optional. Possible values of the element of Type.STRING with enum format.
+     * For example we can define an Enum Direction as :
+     * {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]}
+     * 
+ * + * repeated string enum = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of enum. + */ + public int getEnumCount() { + return enum_.size(); + } + /** + * + * + *
+     * Optional. Possible values of the element of Type.STRING with enum format.
+     * For example we can define an Enum Direction as :
+     * {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]}
+     * 
+ * + * repeated string enum = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The enum at the given index. + */ + public java.lang.String getEnum(int index) { + return enum_.get(index); + } + /** + * + * + *
+     * Optional. Possible values of the element of Type.STRING with enum format.
+     * For example we can define an Enum Direction as :
+     * {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]}
+     * 
+ * + * repeated string enum = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the enum at the given index. + */ + public com.google.protobuf.ByteString getEnumBytes(int index) { + return enum_.getByteString(index); + } + /** + * + * + *
+     * Optional. Possible values of the element of Type.STRING with enum format.
+     * For example we can define an Enum Direction as :
+     * {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]}
+     * 
+ * + * repeated string enum = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The enum to set. + * @return This builder for chaining. + */ + public Builder setEnum(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureEnumIsMutable(); + enum_.set(index, value); + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Possible values of the element of Type.STRING with enum format.
+     * For example we can define an Enum Direction as :
+     * {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]}
+     * 
+ * + * repeated string enum = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The enum to add. + * @return This builder for chaining. + */ + public Builder addEnum(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureEnumIsMutable(); + enum_.add(value); + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Possible values of the element of Type.STRING with enum format.
+     * For example we can define an Enum Direction as :
+     * {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]}
+     * 
+ * + * repeated string enum = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The enum to add. + * @return This builder for chaining. + */ + public Builder addAllEnum(java.lang.Iterable values) { + ensureEnumIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, enum_); + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Possible values of the element of Type.STRING with enum format.
+     * For example we can define an Enum Direction as :
+     * {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]}
+     * 
+ * + * repeated string enum = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEnum() { + enum_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000200); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Possible values of the element of Type.STRING with enum format.
+     * For example we can define an Enum Direction as :
+     * {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]}
+     * 
+ * + * repeated string enum = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes of the enum to add. + * @return This builder for chaining. + */ + public Builder addEnumBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureEnumIsMutable(); + enum_.add(value); + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + private static final class PropertiesConverter + implements com.google.protobuf.MapFieldBuilder.Converter< + java.lang.String, + com.google.cloud.aiplatform.v1beta1.SchemaOrBuilder, + com.google.cloud.aiplatform.v1beta1.Schema> { + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.Schema build( + com.google.cloud.aiplatform.v1beta1.SchemaOrBuilder val) { + if (val instanceof com.google.cloud.aiplatform.v1beta1.Schema) { + return (com.google.cloud.aiplatform.v1beta1.Schema) val; + } + return ((com.google.cloud.aiplatform.v1beta1.Schema.Builder) val).build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.aiplatform.v1beta1.Schema> + defaultEntry() { + return PropertiesDefaultEntryHolder.defaultEntry; + } + }; + + private static final PropertiesConverter propertiesConverter = new PropertiesConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.cloud.aiplatform.v1beta1.SchemaOrBuilder, + com.google.cloud.aiplatform.v1beta1.Schema, + com.google.cloud.aiplatform.v1beta1.Schema.Builder> + properties_; + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.cloud.aiplatform.v1beta1.SchemaOrBuilder, + com.google.cloud.aiplatform.v1beta1.Schema, + com.google.cloud.aiplatform.v1beta1.Schema.Builder> + internalGetProperties() { + if (properties_ == null) { + return new com.google.protobuf.MapFieldBuilder<>(propertiesConverter); + } + return properties_; + } + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.cloud.aiplatform.v1beta1.SchemaOrBuilder, + com.google.cloud.aiplatform.v1beta1.Schema, + com.google.cloud.aiplatform.v1beta1.Schema.Builder> + internalGetMutableProperties() { + if (properties_ == null) { + properties_ = new com.google.protobuf.MapFieldBuilder<>(propertiesConverter); + } + bitField0_ |= 0x00000400; + onChanged(); + return properties_; + } + + public int getPropertiesCount() { + return internalGetProperties().ensureBuilderMap().size(); + } + /** + * + * + *
+     * Optional. SCHEMA FIELDS FOR TYPE OBJECT
+     * Properties of Type.OBJECT.
+     * 
+ * + * + * map<string, .google.cloud.aiplatform.v1beta1.Schema> properties = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsProperties(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetProperties().ensureBuilderMap().containsKey(key); + } + /** Use {@link #getPropertiesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map + getProperties() { + return getPropertiesMap(); + } + /** + * + * + *
+     * Optional. SCHEMA FIELDS FOR TYPE OBJECT
+     * Properties of Type.OBJECT.
+     * 
+ * + * + * map<string, .google.cloud.aiplatform.v1beta1.Schema> properties = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map + getPropertiesMap() { + return internalGetProperties().getImmutableMap(); + } + /** + * + * + *
+     * Optional. SCHEMA FIELDS FOR TYPE OBJECT
+     * Properties of Type.OBJECT.
+     * 
+ * + * + * map<string, .google.cloud.aiplatform.v1beta1.Schema> properties = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public /* nullable */ com.google.cloud.aiplatform.v1beta1.Schema getPropertiesOrDefault( + java.lang.String key, + /* nullable */ + com.google.cloud.aiplatform.v1beta1.Schema defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetMutableProperties().ensureBuilderMap(); + return map.containsKey(key) ? propertiesConverter.build(map.get(key)) : defaultValue; + } + /** + * + * + *
+     * Optional. SCHEMA FIELDS FOR TYPE OBJECT
+     * Properties of Type.OBJECT.
+     * 
+ * + * + * map<string, .google.cloud.aiplatform.v1beta1.Schema> properties = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.Schema getPropertiesOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetMutableProperties().ensureBuilderMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return propertiesConverter.build(map.get(key)); + } + + public Builder clearProperties() { + bitField0_ = (bitField0_ & ~0x00000400); + internalGetMutableProperties().clear(); + return this; + } + /** + * + * + *
+     * Optional. SCHEMA FIELDS FOR TYPE OBJECT
+     * Properties of Type.OBJECT.
+     * 
+ * + * + * map<string, .google.cloud.aiplatform.v1beta1.Schema> properties = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeProperties(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableProperties().ensureBuilderMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map + getMutableProperties() { + bitField0_ |= 0x00000400; + return internalGetMutableProperties().ensureMessageMap(); + } + /** + * + * + *
+     * Optional. SCHEMA FIELDS FOR TYPE OBJECT
+     * Properties of Type.OBJECT.
+     * 
+ * + * + * map<string, .google.cloud.aiplatform.v1beta1.Schema> properties = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putProperties( + java.lang.String key, com.google.cloud.aiplatform.v1beta1.Schema value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableProperties().ensureBuilderMap().put(key, value); + bitField0_ |= 0x00000400; + return this; + } + /** + * + * + *
+     * Optional. SCHEMA FIELDS FOR TYPE OBJECT
+     * Properties of Type.OBJECT.
+     * 
+ * + * + * map<string, .google.cloud.aiplatform.v1beta1.Schema> properties = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putAllProperties( + java.util.Map values) { + for (java.util.Map.Entry e : + values.entrySet()) { + if (e.getKey() == null || e.getValue() == null) { + throw new NullPointerException(); + } + } + internalGetMutableProperties().ensureBuilderMap().putAll(values); + bitField0_ |= 0x00000400; + return this; + } + /** + * + * + *
+     * Optional. SCHEMA FIELDS FOR TYPE OBJECT
+     * Properties of Type.OBJECT.
+     * 
+ * + * + * map<string, .google.cloud.aiplatform.v1beta1.Schema> properties = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1beta1.Schema.Builder putPropertiesBuilderIfAbsent( + java.lang.String key) { + java.util.Map + builderMap = internalGetMutableProperties().ensureBuilderMap(); + com.google.cloud.aiplatform.v1beta1.SchemaOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = com.google.cloud.aiplatform.v1beta1.Schema.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof com.google.cloud.aiplatform.v1beta1.Schema) { + entry = ((com.google.cloud.aiplatform.v1beta1.Schema) entry).toBuilder(); + builderMap.put(key, entry); + } + return (com.google.cloud.aiplatform.v1beta1.Schema.Builder) entry; + } + + private com.google.protobuf.LazyStringArrayList required_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureRequiredIsMutable() { + if (!required_.isModifiable()) { + required_ = new com.google.protobuf.LazyStringArrayList(required_); + } + bitField0_ |= 0x00000800; + } + /** + * + * + *
+     * Optional. Required properties of Type.OBJECT.
+     * 
+ * + * repeated string required = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the required. + */ + public com.google.protobuf.ProtocolStringList getRequiredList() { + required_.makeImmutable(); + return required_; } /** * * *
-     * Optional. Possible values of the element of Type.STRING with enum format.
-     * For example we can define an Enum Direction as :
-     * {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]}
+     * Optional. Required properties of Type.OBJECT.
      * 
* - * repeated string enum = 9 [(.google.api.field_behavior) = OPTIONAL]; + * repeated string required = 5 [(.google.api.field_behavior) = OPTIONAL]; * - * @return The count of enum. + * @return The count of required. */ - public int getEnumCount() { - return enum_.size(); + public int getRequiredCount() { + return required_.size(); } /** * * *
-     * Optional. Possible values of the element of Type.STRING with enum format.
-     * For example we can define an Enum Direction as :
-     * {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]}
+     * Optional. Required properties of Type.OBJECT.
      * 
* - * repeated string enum = 9 [(.google.api.field_behavior) = OPTIONAL]; + * repeated string required = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @param index The index of the element to return. - * @return The enum at the given index. + * @return The required at the given index. */ - public java.lang.String getEnum(int index) { - return enum_.get(index); + public java.lang.String getRequired(int index) { + return required_.get(index); } /** * * *
-     * Optional. Possible values of the element of Type.STRING with enum format.
-     * For example we can define an Enum Direction as :
-     * {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]}
+     * Optional. Required properties of Type.OBJECT.
      * 
* - * repeated string enum = 9 [(.google.api.field_behavior) = OPTIONAL]; + * repeated string required = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @param index The index of the value to return. - * @return The bytes of the enum at the given index. + * @return The bytes of the required at the given index. */ - public com.google.protobuf.ByteString getEnumBytes(int index) { - return enum_.getByteString(index); + public com.google.protobuf.ByteString getRequiredBytes(int index) { + return required_.getByteString(index); } /** * * *
-     * Optional. Possible values of the element of Type.STRING with enum format.
-     * For example we can define an Enum Direction as :
-     * {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]}
+     * Optional. Required properties of Type.OBJECT.
      * 
* - * repeated string enum = 9 [(.google.api.field_behavior) = OPTIONAL]; + * repeated string required = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @param index The index to set the value at. - * @param value The enum to set. + * @param value The required to set. * @return This builder for chaining. */ - public Builder setEnum(int index, java.lang.String value) { + public Builder setRequired(int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } - ensureEnumIsMutable(); - enum_.set(index, value); - bitField0_ |= 0x00000020; + ensureRequiredIsMutable(); + required_.set(index, value); + bitField0_ |= 0x00000800; onChanged(); return this; } @@ -1919,23 +3339,21 @@ public Builder setEnum(int index, java.lang.String value) { * * *
-     * Optional. Possible values of the element of Type.STRING with enum format.
-     * For example we can define an Enum Direction as :
-     * {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]}
+     * Optional. Required properties of Type.OBJECT.
      * 
* - * repeated string enum = 9 [(.google.api.field_behavior) = OPTIONAL]; + * repeated string required = 5 [(.google.api.field_behavior) = OPTIONAL]; * - * @param value The enum to add. + * @param value The required to add. * @return This builder for chaining. */ - public Builder addEnum(java.lang.String value) { + public Builder addRequired(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - ensureEnumIsMutable(); - enum_.add(value); - bitField0_ |= 0x00000020; + ensureRequiredIsMutable(); + required_.add(value); + bitField0_ |= 0x00000800; onChanged(); return this; } @@ -1943,20 +3361,18 @@ public Builder addEnum(java.lang.String value) { * * *
-     * Optional. Possible values of the element of Type.STRING with enum format.
-     * For example we can define an Enum Direction as :
-     * {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]}
+     * Optional. Required properties of Type.OBJECT.
      * 
* - * repeated string enum = 9 [(.google.api.field_behavior) = OPTIONAL]; + * repeated string required = 5 [(.google.api.field_behavior) = OPTIONAL]; * - * @param values The enum to add. + * @param values The required to add. * @return This builder for chaining. */ - public Builder addAllEnum(java.lang.Iterable values) { - ensureEnumIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, enum_); - bitField0_ |= 0x00000020; + public Builder addAllRequired(java.lang.Iterable values) { + ensureRequiredIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, required_); + bitField0_ |= 0x00000800; onChanged(); return this; } @@ -1964,18 +3380,16 @@ public Builder addAllEnum(java.lang.Iterable values) { * * *
-     * Optional. Possible values of the element of Type.STRING with enum format.
-     * For example we can define an Enum Direction as :
-     * {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]}
+     * Optional. Required properties of Type.OBJECT.
      * 
* - * repeated string enum = 9 [(.google.api.field_behavior) = OPTIONAL]; + * repeated string required = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ - public Builder clearEnum() { - enum_ = com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); + public Builder clearRequired() { + required_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000800); ; onChanged(); return this; @@ -1984,408 +3398,416 @@ public Builder clearEnum() { * * *
-     * Optional. Possible values of the element of Type.STRING with enum format.
-     * For example we can define an Enum Direction as :
-     * {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]}
+     * Optional. Required properties of Type.OBJECT.
      * 
* - * repeated string enum = 9 [(.google.api.field_behavior) = OPTIONAL]; + * repeated string required = 5 [(.google.api.field_behavior) = OPTIONAL]; * - * @param value The bytes of the enum to add. + * @param value The bytes of the required to add. * @return This builder for chaining. */ - public Builder addEnumBytes(com.google.protobuf.ByteString value) { + public Builder addRequiredBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); - ensureEnumIsMutable(); - enum_.add(value); - bitField0_ |= 0x00000020; + ensureRequiredIsMutable(); + required_.add(value); + bitField0_ |= 0x00000800; onChanged(); return this; } - private static final class PropertiesConverter - implements com.google.protobuf.MapFieldBuilder.Converter< - java.lang.String, - com.google.cloud.aiplatform.v1beta1.SchemaOrBuilder, - com.google.cloud.aiplatform.v1beta1.Schema> { - @java.lang.Override - public com.google.cloud.aiplatform.v1beta1.Schema build( - com.google.cloud.aiplatform.v1beta1.SchemaOrBuilder val) { - if (val instanceof com.google.cloud.aiplatform.v1beta1.Schema) { - return (com.google.cloud.aiplatform.v1beta1.Schema) val; - } - return ((com.google.cloud.aiplatform.v1beta1.Schema.Builder) val).build(); - } - - @java.lang.Override - public com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.aiplatform.v1beta1.Schema> - defaultEntry() { - return PropertiesDefaultEntryHolder.defaultEntry; - } - }; - - private static final PropertiesConverter propertiesConverter = new PropertiesConverter(); + private long minProperties_; + /** + * + * + *
+     * Optional. Minimum number of the properties for Type.OBJECT.
+     * 
+ * + * int64 min_properties = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The minProperties. + */ + @java.lang.Override + public long getMinProperties() { + return minProperties_; + } + /** + * + * + *
+     * Optional. Minimum number of the properties for Type.OBJECT.
+     * 
+ * + * int64 min_properties = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The minProperties to set. + * @return This builder for chaining. + */ + public Builder setMinProperties(long value) { - private com.google.protobuf.MapFieldBuilder< - java.lang.String, - com.google.cloud.aiplatform.v1beta1.SchemaOrBuilder, - com.google.cloud.aiplatform.v1beta1.Schema, - com.google.cloud.aiplatform.v1beta1.Schema.Builder> - properties_; + minProperties_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Minimum number of the properties for Type.OBJECT.
+     * 
+ * + * int64 min_properties = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearMinProperties() { + bitField0_ = (bitField0_ & ~0x00001000); + minProperties_ = 0L; + onChanged(); + return this; + } - private com.google.protobuf.MapFieldBuilder< - java.lang.String, - com.google.cloud.aiplatform.v1beta1.SchemaOrBuilder, - com.google.cloud.aiplatform.v1beta1.Schema, - com.google.cloud.aiplatform.v1beta1.Schema.Builder> - internalGetProperties() { - if (properties_ == null) { - return new com.google.protobuf.MapFieldBuilder<>(propertiesConverter); - } - return properties_; + private long maxProperties_; + /** + * + * + *
+     * Optional. Maximum number of the properties for Type.OBJECT.
+     * 
+ * + * int64 max_properties = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The maxProperties. + */ + @java.lang.Override + public long getMaxProperties() { + return maxProperties_; } + /** + * + * + *
+     * Optional. Maximum number of the properties for Type.OBJECT.
+     * 
+ * + * int64 max_properties = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The maxProperties to set. + * @return This builder for chaining. + */ + public Builder setMaxProperties(long value) { - private com.google.protobuf.MapFieldBuilder< - java.lang.String, - com.google.cloud.aiplatform.v1beta1.SchemaOrBuilder, - com.google.cloud.aiplatform.v1beta1.Schema, - com.google.cloud.aiplatform.v1beta1.Schema.Builder> - internalGetMutableProperties() { - if (properties_ == null) { - properties_ = new com.google.protobuf.MapFieldBuilder<>(propertiesConverter); - } - bitField0_ |= 0x00000040; + maxProperties_ = value; + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Maximum number of the properties for Type.OBJECT.
+     * 
+ * + * int64 max_properties = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearMaxProperties() { + bitField0_ = (bitField0_ & ~0x00002000); + maxProperties_ = 0L; onChanged(); - return properties_; + return this; } - public int getPropertiesCount() { - return internalGetProperties().ensureBuilderMap().size(); - } + private double minimum_; /** * * *
-     * Optional. Properties of Type.OBJECT.
+     * Optional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER
+     * Minimum value of the Type.INTEGER and Type.NUMBER
      * 
* - * - * map<string, .google.cloud.aiplatform.v1beta1.Schema> properties = 3 [(.google.api.field_behavior) = OPTIONAL]; - * + * double minimum = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The minimum. */ @java.lang.Override - public boolean containsProperties(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetProperties().ensureBuilderMap().containsKey(key); - } - /** Use {@link #getPropertiesMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map - getProperties() { - return getPropertiesMap(); + public double getMinimum() { + return minimum_; } /** * * *
-     * Optional. Properties of Type.OBJECT.
+     * Optional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER
+     * Minimum value of the Type.INTEGER and Type.NUMBER
      * 
* - * - * map<string, .google.cloud.aiplatform.v1beta1.Schema> properties = 3 [(.google.api.field_behavior) = OPTIONAL]; - * + * double minimum = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The minimum to set. + * @return This builder for chaining. */ - @java.lang.Override - public java.util.Map - getPropertiesMap() { - return internalGetProperties().getImmutableMap(); + public Builder setMinimum(double value) { + + minimum_ = value; + bitField0_ |= 0x00004000; + onChanged(); + return this; } /** * * *
-     * Optional. Properties of Type.OBJECT.
+     * Optional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER
+     * Minimum value of the Type.INTEGER and Type.NUMBER
      * 
* - * - * map<string, .google.cloud.aiplatform.v1beta1.Schema> properties = 3 [(.google.api.field_behavior) = OPTIONAL]; - * + * double minimum = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. */ - @java.lang.Override - public /* nullable */ com.google.cloud.aiplatform.v1beta1.Schema getPropertiesOrDefault( - java.lang.String key, - /* nullable */ - com.google.cloud.aiplatform.v1beta1.Schema defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = - internalGetMutableProperties().ensureBuilderMap(); - return map.containsKey(key) ? propertiesConverter.build(map.get(key)) : defaultValue; + public Builder clearMinimum() { + bitField0_ = (bitField0_ & ~0x00004000); + minimum_ = 0D; + onChanged(); + return this; } + + private double maximum_; /** * * *
-     * Optional. Properties of Type.OBJECT.
+     * Optional. Maximum value of the Type.INTEGER and Type.NUMBER
      * 
* - * - * map<string, .google.cloud.aiplatform.v1beta1.Schema> properties = 3 [(.google.api.field_behavior) = OPTIONAL]; - * + * double maximum = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The maximum. */ @java.lang.Override - public com.google.cloud.aiplatform.v1beta1.Schema getPropertiesOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = - internalGetMutableProperties().ensureBuilderMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return propertiesConverter.build(map.get(key)); - } - - public Builder clearProperties() { - bitField0_ = (bitField0_ & ~0x00000040); - internalGetMutableProperties().clear(); - return this; + public double getMaximum() { + return maximum_; } /** * * *
-     * Optional. Properties of Type.OBJECT.
+     * Optional. Maximum value of the Type.INTEGER and Type.NUMBER
      * 
* - * - * map<string, .google.cloud.aiplatform.v1beta1.Schema> properties = 3 [(.google.api.field_behavior) = OPTIONAL]; - * + * double maximum = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The maximum to set. + * @return This builder for chaining. */ - public Builder removeProperties(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - internalGetMutableProperties().ensureBuilderMap().remove(key); + public Builder setMaximum(double value) { + + maximum_ = value; + bitField0_ |= 0x00008000; + onChanged(); return this; } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map - getMutableProperties() { - bitField0_ |= 0x00000040; - return internalGetMutableProperties().ensureMessageMap(); - } /** * * *
-     * Optional. Properties of Type.OBJECT.
+     * Optional. Maximum value of the Type.INTEGER and Type.NUMBER
      * 
* - * - * map<string, .google.cloud.aiplatform.v1beta1.Schema> properties = 3 [(.google.api.field_behavior) = OPTIONAL]; - * + * double maximum = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. */ - public Builder putProperties( - java.lang.String key, com.google.cloud.aiplatform.v1beta1.Schema value) { - if (key == null) { - throw new NullPointerException("map key"); - } - if (value == null) { - throw new NullPointerException("map value"); - } - internalGetMutableProperties().ensureBuilderMap().put(key, value); - bitField0_ |= 0x00000040; + public Builder clearMaximum() { + bitField0_ = (bitField0_ & ~0x00008000); + maximum_ = 0D; + onChanged(); return this; } + + private long minLength_; /** * * *
-     * Optional. Properties of Type.OBJECT.
+     * Optional. SCHEMA FIELDS FOR TYPE STRING
+     * Minimum length of the Type.STRING
      * 
* - * - * map<string, .google.cloud.aiplatform.v1beta1.Schema> properties = 3 [(.google.api.field_behavior) = OPTIONAL]; - * + * int64 min_length = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The minLength. */ - public Builder putAllProperties( - java.util.Map values) { - for (java.util.Map.Entry e : - values.entrySet()) { - if (e.getKey() == null || e.getValue() == null) { - throw new NullPointerException(); - } - } - internalGetMutableProperties().ensureBuilderMap().putAll(values); - bitField0_ |= 0x00000040; - return this; + @java.lang.Override + public long getMinLength() { + return minLength_; } /** * * *
-     * Optional. Properties of Type.OBJECT.
+     * Optional. SCHEMA FIELDS FOR TYPE STRING
+     * Minimum length of the Type.STRING
      * 
* - * - * map<string, .google.cloud.aiplatform.v1beta1.Schema> properties = 3 [(.google.api.field_behavior) = OPTIONAL]; - * + * int64 min_length = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The minLength to set. + * @return This builder for chaining. */ - public com.google.cloud.aiplatform.v1beta1.Schema.Builder putPropertiesBuilderIfAbsent( - java.lang.String key) { - java.util.Map - builderMap = internalGetMutableProperties().ensureBuilderMap(); - com.google.cloud.aiplatform.v1beta1.SchemaOrBuilder entry = builderMap.get(key); - if (entry == null) { - entry = com.google.cloud.aiplatform.v1beta1.Schema.newBuilder(); - builderMap.put(key, entry); - } - if (entry instanceof com.google.cloud.aiplatform.v1beta1.Schema) { - entry = ((com.google.cloud.aiplatform.v1beta1.Schema) entry).toBuilder(); - builderMap.put(key, entry); - } - return (com.google.cloud.aiplatform.v1beta1.Schema.Builder) entry; - } - - private com.google.protobuf.LazyStringArrayList required_ = - com.google.protobuf.LazyStringArrayList.emptyList(); + public Builder setMinLength(long value) { - private void ensureRequiredIsMutable() { - if (!required_.isModifiable()) { - required_ = new com.google.protobuf.LazyStringArrayList(required_); - } - bitField0_ |= 0x00000080; + minLength_ = value; + bitField0_ |= 0x00010000; + onChanged(); + return this; } /** * * *
-     * Optional. Required properties of Type.OBJECT.
+     * Optional. SCHEMA FIELDS FOR TYPE STRING
+     * Minimum length of the Type.STRING
      * 
* - * repeated string required = 5 [(.google.api.field_behavior) = OPTIONAL]; + * int64 min_length = 18 [(.google.api.field_behavior) = OPTIONAL]; * - * @return A list containing the required. + * @return This builder for chaining. */ - public com.google.protobuf.ProtocolStringList getRequiredList() { - required_.makeImmutable(); - return required_; + public Builder clearMinLength() { + bitField0_ = (bitField0_ & ~0x00010000); + minLength_ = 0L; + onChanged(); + return this; } + + private long maxLength_; /** * * *
-     * Optional. Required properties of Type.OBJECT.
+     * Optional. Maximum length of the Type.STRING
      * 
* - * repeated string required = 5 [(.google.api.field_behavior) = OPTIONAL]; + * int64 max_length = 19 [(.google.api.field_behavior) = OPTIONAL]; * - * @return The count of required. + * @return The maxLength. */ - public int getRequiredCount() { - return required_.size(); + @java.lang.Override + public long getMaxLength() { + return maxLength_; } /** * * *
-     * Optional. Required properties of Type.OBJECT.
+     * Optional. Maximum length of the Type.STRING
      * 
* - * repeated string required = 5 [(.google.api.field_behavior) = OPTIONAL]; + * int64 max_length = 19 [(.google.api.field_behavior) = OPTIONAL]; * - * @param index The index of the element to return. - * @return The required at the given index. + * @param value The maxLength to set. + * @return This builder for chaining. */ - public java.lang.String getRequired(int index) { - return required_.get(index); + public Builder setMaxLength(long value) { + + maxLength_ = value; + bitField0_ |= 0x00020000; + onChanged(); + return this; } /** * * *
-     * Optional. Required properties of Type.OBJECT.
+     * Optional. Maximum length of the Type.STRING
      * 
* - * repeated string required = 5 [(.google.api.field_behavior) = OPTIONAL]; + * int64 max_length = 19 [(.google.api.field_behavior) = OPTIONAL]; * - * @param index The index of the value to return. - * @return The bytes of the required at the given index. + * @return This builder for chaining. */ - public com.google.protobuf.ByteString getRequiredBytes(int index) { - return required_.getByteString(index); + public Builder clearMaxLength() { + bitField0_ = (bitField0_ & ~0x00020000); + maxLength_ = 0L; + onChanged(); + return this; } + + private java.lang.Object pattern_ = ""; /** * * *
-     * Optional. Required properties of Type.OBJECT.
+     * Optional. Pattern of the Type.STRING to restrict a string to a regular
+     * expression.
      * 
* - * repeated string required = 5 [(.google.api.field_behavior) = OPTIONAL]; + * string pattern = 20 [(.google.api.field_behavior) = OPTIONAL]; * - * @param index The index to set the value at. - * @param value The required to set. - * @return This builder for chaining. + * @return The pattern. */ - public Builder setRequired(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + public java.lang.String getPattern() { + java.lang.Object ref = pattern_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pattern_ = s; + return s; + } else { + return (java.lang.String) ref; } - ensureRequiredIsMutable(); - required_.set(index, value); - bitField0_ |= 0x00000080; - onChanged(); - return this; } /** * * *
-     * Optional. Required properties of Type.OBJECT.
+     * Optional. Pattern of the Type.STRING to restrict a string to a regular
+     * expression.
      * 
* - * repeated string required = 5 [(.google.api.field_behavior) = OPTIONAL]; + * string pattern = 20 [(.google.api.field_behavior) = OPTIONAL]; * - * @param value The required to add. - * @return This builder for chaining. + * @return The bytes for pattern. */ - public Builder addRequired(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + public com.google.protobuf.ByteString getPatternBytes() { + java.lang.Object ref = pattern_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pattern_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } - ensureRequiredIsMutable(); - required_.add(value); - bitField0_ |= 0x00000080; - onChanged(); - return this; } /** * * *
-     * Optional. Required properties of Type.OBJECT.
+     * Optional. Pattern of the Type.STRING to restrict a string to a regular
+     * expression.
      * 
* - * repeated string required = 5 [(.google.api.field_behavior) = OPTIONAL]; + * string pattern = 20 [(.google.api.field_behavior) = OPTIONAL]; * - * @param values The required to add. + * @param value The pattern to set. * @return This builder for chaining. */ - public Builder addAllRequired(java.lang.Iterable values) { - ensureRequiredIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, required_); - bitField0_ |= 0x00000080; + public Builder setPattern(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pattern_ = value; + bitField0_ |= 0x00040000; onChanged(); return this; } @@ -2393,17 +3815,17 @@ public Builder addAllRequired(java.lang.Iterable values) { * * *
-     * Optional. Required properties of Type.OBJECT.
+     * Optional. Pattern of the Type.STRING to restrict a string to a regular
+     * expression.
      * 
* - * repeated string required = 5 [(.google.api.field_behavior) = OPTIONAL]; + * string pattern = 20 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ - public Builder clearRequired() { - required_ = com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000080); - ; + public Builder clearPattern() { + pattern_ = getDefaultInstance().getPattern(); + bitField0_ = (bitField0_ & ~0x00040000); onChanged(); return this; } @@ -2411,22 +3833,22 @@ public Builder clearRequired() { * * *
-     * Optional. Required properties of Type.OBJECT.
+     * Optional. Pattern of the Type.STRING to restrict a string to a regular
+     * expression.
      * 
* - * repeated string required = 5 [(.google.api.field_behavior) = OPTIONAL]; + * string pattern = 20 [(.google.api.field_behavior) = OPTIONAL]; * - * @param value The bytes of the required to add. + * @param value The bytes for pattern to set. * @return This builder for chaining. */ - public Builder addRequiredBytes(com.google.protobuf.ByteString value) { + public Builder setPatternBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); - ensureRequiredIsMutable(); - required_.add(value); - bitField0_ |= 0x00000080; + pattern_ = value; + bitField0_ |= 0x00040000; onChanged(); return this; } @@ -2450,7 +3872,7 @@ public Builder addRequiredBytes(com.google.protobuf.ByteString value) { * @return Whether the example field is set. */ public boolean hasExample() { - return ((bitField0_ & 0x00000100) != 0); + return ((bitField0_ & 0x00080000) != 0); } /** * @@ -2490,7 +3912,7 @@ public Builder setExample(com.google.protobuf.Value value) { } else { exampleBuilder_.setMessage(value); } - bitField0_ |= 0x00000100; + bitField0_ |= 0x00080000; onChanged(); return this; } @@ -2510,7 +3932,7 @@ public Builder setExample(com.google.protobuf.Value.Builder builderForValue) { } else { exampleBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000100; + bitField0_ |= 0x00080000; onChanged(); return this; } @@ -2526,7 +3948,7 @@ public Builder setExample(com.google.protobuf.Value.Builder builderForValue) { */ public Builder mergeExample(com.google.protobuf.Value value) { if (exampleBuilder_ == null) { - if (((bitField0_ & 0x00000100) != 0) + if (((bitField0_ & 0x00080000) != 0) && example_ != null && example_ != com.google.protobuf.Value.getDefaultInstance()) { getExampleBuilder().mergeFrom(value); @@ -2537,7 +3959,7 @@ public Builder mergeExample(com.google.protobuf.Value value) { exampleBuilder_.mergeFrom(value); } if (example_ != null) { - bitField0_ |= 0x00000100; + bitField0_ |= 0x00080000; onChanged(); } return this; @@ -2553,7 +3975,7 @@ public Builder mergeExample(com.google.protobuf.Value value) { * .google.protobuf.Value example = 4 [(.google.api.field_behavior) = OPTIONAL]; */ public Builder clearExample() { - bitField0_ = (bitField0_ & ~0x00000100); + bitField0_ = (bitField0_ & ~0x00080000); example_ = null; if (exampleBuilder_ != null) { exampleBuilder_.dispose(); @@ -2573,7 +3995,7 @@ public Builder clearExample() { * .google.protobuf.Value example = 4 [(.google.api.field_behavior) = OPTIONAL]; */ public com.google.protobuf.Value.Builder getExampleBuilder() { - bitField0_ |= 0x00000100; + bitField0_ |= 0x00080000; onChanged(); return getExampleFieldBuilder().getBuilder(); } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/SchemaOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/SchemaOrBuilder.java index 8064fd8334e7..77b39201e0a9 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/SchemaOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/SchemaOrBuilder.java @@ -57,8 +57,9 @@ public interface SchemaOrBuilder *
    * Optional. The format of the data.
    * Supported formats:
-   *  for NUMBER type: float, double
-   *  for INTEGER type: int32, int64
+   *  for NUMBER type: "float", "double"
+   *  for INTEGER type: "int32", "int64"
+   *  for STRING type: "email", "byte", etc
    * 
* * string format = 7 [(.google.api.field_behavior) = OPTIONAL]; @@ -72,8 +73,9 @@ public interface SchemaOrBuilder *
    * Optional. The format of the data.
    * Supported formats:
-   *  for NUMBER type: float, double
-   *  for INTEGER type: int32, int64
+   *  for NUMBER type: "float", "double"
+   *  for INTEGER type: "int32", "int64"
+   *  for STRING type: "email", "byte", etc
    * 
* * string format = 7 [(.google.api.field_behavior) = OPTIONAL]; @@ -82,6 +84,31 @@ public interface SchemaOrBuilder */ com.google.protobuf.ByteString getFormatBytes(); + /** + * + * + *
+   * Optional. The title of the Schema.
+   * 
+ * + * string title = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The title. + */ + java.lang.String getTitle(); + /** + * + * + *
+   * Optional. The title of the Schema.
+   * 
+ * + * string title = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for title. + */ + com.google.protobuf.ByteString getTitleBytes(); + /** * * @@ -124,7 +151,43 @@ public interface SchemaOrBuilder * * *
-   * Optional. Schema of the elements of Type.ARRAY.
+   * Optional. Default value of the data.
+   * 
+ * + * .google.protobuf.Value default = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the default field is set. + */ + boolean hasDefault(); + /** + * + * + *
+   * Optional. Default value of the data.
+   * 
+ * + * .google.protobuf.Value default = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The default. + */ + com.google.protobuf.Value getDefault(); + /** + * + * + *
+   * Optional. Default value of the data.
+   * 
+ * + * .google.protobuf.Value default = 23 [(.google.api.field_behavior) = OPTIONAL]; + */ + com.google.protobuf.ValueOrBuilder getDefaultOrBuilder(); + + /** + * + * + *
+   * Optional. SCHEMA FIELDS FOR TYPE ARRAY
+   * Schema of the elements of Type.ARRAY.
    * 
* * @@ -138,7 +201,8 @@ public interface SchemaOrBuilder * * *
-   * Optional. Schema of the elements of Type.ARRAY.
+   * Optional. SCHEMA FIELDS FOR TYPE ARRAY
+   * Schema of the elements of Type.ARRAY.
    * 
* * @@ -152,7 +216,8 @@ public interface SchemaOrBuilder * * *
-   * Optional. Schema of the elements of Type.ARRAY.
+   * Optional. SCHEMA FIELDS FOR TYPE ARRAY
+   * Schema of the elements of Type.ARRAY.
    * 
* * @@ -161,6 +226,32 @@ public interface SchemaOrBuilder */ com.google.cloud.aiplatform.v1beta1.SchemaOrBuilder getItemsOrBuilder(); + /** + * + * + *
+   * Optional. Minimum number of the elements for Type.ARRAY.
+   * 
+ * + * int64 min_items = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The minItems. + */ + long getMinItems(); + + /** + * + * + *
+   * Optional. Maximum number of the elements for Type.ARRAY.
+   * 
+ * + * int64 max_items = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The maxItems. + */ + long getMaxItems(); + /** * * @@ -224,7 +315,8 @@ public interface SchemaOrBuilder * * *
-   * Optional. Properties of Type.OBJECT.
+   * Optional. SCHEMA FIELDS FOR TYPE OBJECT
+   * Properties of Type.OBJECT.
    * 
* * @@ -236,7 +328,8 @@ public interface SchemaOrBuilder * * *
-   * Optional. Properties of Type.OBJECT.
+   * Optional. SCHEMA FIELDS FOR TYPE OBJECT
+   * Properties of Type.OBJECT.
    * 
* * @@ -251,7 +344,8 @@ public interface SchemaOrBuilder * * *
-   * Optional. Properties of Type.OBJECT.
+   * Optional. SCHEMA FIELDS FOR TYPE OBJECT
+   * Properties of Type.OBJECT.
    * 
* * @@ -263,7 +357,8 @@ public interface SchemaOrBuilder * * *
-   * Optional. Properties of Type.OBJECT.
+   * Optional. SCHEMA FIELDS FOR TYPE OBJECT
+   * Properties of Type.OBJECT.
    * 
* * @@ -279,7 +374,8 @@ com.google.cloud.aiplatform.v1beta1.Schema getPropertiesOrDefault( * * *
-   * Optional. Properties of Type.OBJECT.
+   * Optional. SCHEMA FIELDS FOR TYPE OBJECT
+   * Properties of Type.OBJECT.
    * 
* * @@ -339,6 +435,113 @@ com.google.cloud.aiplatform.v1beta1.Schema getPropertiesOrDefault( */ com.google.protobuf.ByteString getRequiredBytes(int index); + /** + * + * + *
+   * Optional. Minimum number of the properties for Type.OBJECT.
+   * 
+ * + * int64 min_properties = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The minProperties. + */ + long getMinProperties(); + + /** + * + * + *
+   * Optional. Maximum number of the properties for Type.OBJECT.
+   * 
+ * + * int64 max_properties = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The maxProperties. + */ + long getMaxProperties(); + + /** + * + * + *
+   * Optional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER
+   * Minimum value of the Type.INTEGER and Type.NUMBER
+   * 
+ * + * double minimum = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The minimum. + */ + double getMinimum(); + + /** + * + * + *
+   * Optional. Maximum value of the Type.INTEGER and Type.NUMBER
+   * 
+ * + * double maximum = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The maximum. + */ + double getMaximum(); + + /** + * + * + *
+   * Optional. SCHEMA FIELDS FOR TYPE STRING
+   * Minimum length of the Type.STRING
+   * 
+ * + * int64 min_length = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The minLength. + */ + long getMinLength(); + + /** + * + * + *
+   * Optional. Maximum length of the Type.STRING
+   * 
+ * + * int64 max_length = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The maxLength. + */ + long getMaxLength(); + + /** + * + * + *
+   * Optional. Pattern of the Type.STRING to restrict a string to a regular
+   * expression.
+   * 
+ * + * string pattern = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pattern. + */ + java.lang.String getPattern(); + /** + * + * + *
+   * Optional. Pattern of the Type.STRING to restrict a string to a regular
+   * expression.
+   * 
+ * + * string pattern = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pattern. + */ + com.google.protobuf.ByteString getPatternBytes(); + /** * * diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ServiceAccountSpec.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ServiceAccountSpec.java index 7f614a998936..73ec80a4e73e 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ServiceAccountSpec.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ServiceAccountSpec.java @@ -92,18 +92,17 @@ public boolean getEnableCustomServiceAccount() { * * *
-   * Optional. Default service account that this PersistentResource's workloads
-   * run as. The workloads include:
+   * Optional. Required when all below conditions are met
+   *  * `enable_custom_service_account` is true;
+   *  * any runtime is specified via `ResourceRuntimeSpec` on creation time,
+   *    for example, Ray
    *
-   *  * Any runtime specified via `ResourceRuntimeSpec` on creation time,
-   *    for example, Ray.
-   *  * Jobs submitted to PersistentResource, if no other service account
-   *    specified in the job specs.
+   * The users must have `iam.serviceAccounts.actAs` permission on this service
+   * account and then the specified runtime containers will run as it.
    *
-   * Only works when custom service account is enabled and users have the
-   * `iam.serviceAccounts.actAs` permission on this service account.
-   *
-   * Required if any containers are specified in `ResourceRuntimeSpec`.
+   * Do not set this field if you want to submit jobs using custom service
+   * account to this PersistentResource after creation, but only specify the
+   * `service_account` inside the job.
    * 
* * string service_account = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -126,18 +125,17 @@ public java.lang.String getServiceAccount() { * * *
-   * Optional. Default service account that this PersistentResource's workloads
-   * run as. The workloads include:
-   *
-   *  * Any runtime specified via `ResourceRuntimeSpec` on creation time,
-   *    for example, Ray.
-   *  * Jobs submitted to PersistentResource, if no other service account
-   *    specified in the job specs.
+   * Optional. Required when all below conditions are met
+   *  * `enable_custom_service_account` is true;
+   *  * any runtime is specified via `ResourceRuntimeSpec` on creation time,
+   *    for example, Ray
    *
-   * Only works when custom service account is enabled and users have the
-   * `iam.serviceAccounts.actAs` permission on this service account.
+   * The users must have `iam.serviceAccounts.actAs` permission on this service
+   * account and then the specified runtime containers will run as it.
    *
-   * Required if any containers are specified in `ResourceRuntimeSpec`.
+   * Do not set this field if you want to submit jobs using custom service
+   * account to this PersistentResource after creation, but only specify the
+   * `service_account` inside the job.
    * 
* * string service_account = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -592,18 +590,17 @@ public Builder clearEnableCustomServiceAccount() { * * *
-     * Optional. Default service account that this PersistentResource's workloads
-     * run as. The workloads include:
+     * Optional. Required when all below conditions are met
+     *  * `enable_custom_service_account` is true;
+     *  * any runtime is specified via `ResourceRuntimeSpec` on creation time,
+     *    for example, Ray
      *
-     *  * Any runtime specified via `ResourceRuntimeSpec` on creation time,
-     *    for example, Ray.
-     *  * Jobs submitted to PersistentResource, if no other service account
-     *    specified in the job specs.
+     * The users must have `iam.serviceAccounts.actAs` permission on this service
+     * account and then the specified runtime containers will run as it.
      *
-     * Only works when custom service account is enabled and users have the
-     * `iam.serviceAccounts.actAs` permission on this service account.
-     *
-     * Required if any containers are specified in `ResourceRuntimeSpec`.
+     * Do not set this field if you want to submit jobs using custom service
+     * account to this PersistentResource after creation, but only specify the
+     * `service_account` inside the job.
      * 
* * string service_account = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -625,18 +622,17 @@ public java.lang.String getServiceAccount() { * * *
-     * Optional. Default service account that this PersistentResource's workloads
-     * run as. The workloads include:
-     *
-     *  * Any runtime specified via `ResourceRuntimeSpec` on creation time,
-     *    for example, Ray.
-     *  * Jobs submitted to PersistentResource, if no other service account
-     *    specified in the job specs.
+     * Optional. Required when all below conditions are met
+     *  * `enable_custom_service_account` is true;
+     *  * any runtime is specified via `ResourceRuntimeSpec` on creation time,
+     *    for example, Ray
      *
-     * Only works when custom service account is enabled and users have the
-     * `iam.serviceAccounts.actAs` permission on this service account.
+     * The users must have `iam.serviceAccounts.actAs` permission on this service
+     * account and then the specified runtime containers will run as it.
      *
-     * Required if any containers are specified in `ResourceRuntimeSpec`.
+     * Do not set this field if you want to submit jobs using custom service
+     * account to this PersistentResource after creation, but only specify the
+     * `service_account` inside the job.
      * 
* * string service_account = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -658,18 +654,17 @@ public com.google.protobuf.ByteString getServiceAccountBytes() { * * *
-     * Optional. Default service account that this PersistentResource's workloads
-     * run as. The workloads include:
+     * Optional. Required when all below conditions are met
+     *  * `enable_custom_service_account` is true;
+     *  * any runtime is specified via `ResourceRuntimeSpec` on creation time,
+     *    for example, Ray
      *
-     *  * Any runtime specified via `ResourceRuntimeSpec` on creation time,
-     *    for example, Ray.
-     *  * Jobs submitted to PersistentResource, if no other service account
-     *    specified in the job specs.
+     * The users must have `iam.serviceAccounts.actAs` permission on this service
+     * account and then the specified runtime containers will run as it.
      *
-     * Only works when custom service account is enabled and users have the
-     * `iam.serviceAccounts.actAs` permission on this service account.
-     *
-     * Required if any containers are specified in `ResourceRuntimeSpec`.
+     * Do not set this field if you want to submit jobs using custom service
+     * account to this PersistentResource after creation, but only specify the
+     * `service_account` inside the job.
      * 
* * string service_account = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -690,18 +685,17 @@ public Builder setServiceAccount(java.lang.String value) { * * *
-     * Optional. Default service account that this PersistentResource's workloads
-     * run as. The workloads include:
-     *
-     *  * Any runtime specified via `ResourceRuntimeSpec` on creation time,
-     *    for example, Ray.
-     *  * Jobs submitted to PersistentResource, if no other service account
-     *    specified in the job specs.
+     * Optional. Required when all below conditions are met
+     *  * `enable_custom_service_account` is true;
+     *  * any runtime is specified via `ResourceRuntimeSpec` on creation time,
+     *    for example, Ray
      *
-     * Only works when custom service account is enabled and users have the
-     * `iam.serviceAccounts.actAs` permission on this service account.
+     * The users must have `iam.serviceAccounts.actAs` permission on this service
+     * account and then the specified runtime containers will run as it.
      *
-     * Required if any containers are specified in `ResourceRuntimeSpec`.
+     * Do not set this field if you want to submit jobs using custom service
+     * account to this PersistentResource after creation, but only specify the
+     * `service_account` inside the job.
      * 
* * string service_account = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -718,18 +712,17 @@ public Builder clearServiceAccount() { * * *
-     * Optional. Default service account that this PersistentResource's workloads
-     * run as. The workloads include:
-     *
-     *  * Any runtime specified via `ResourceRuntimeSpec` on creation time,
-     *    for example, Ray.
-     *  * Jobs submitted to PersistentResource, if no other service account
-     *    specified in the job specs.
+     * Optional. Required when all below conditions are met
+     *  * `enable_custom_service_account` is true;
+     *  * any runtime is specified via `ResourceRuntimeSpec` on creation time,
+     *    for example, Ray
      *
-     * Only works when custom service account is enabled and users have the
-     * `iam.serviceAccounts.actAs` permission on this service account.
+     * The users must have `iam.serviceAccounts.actAs` permission on this service
+     * account and then the specified runtime containers will run as it.
      *
-     * Required if any containers are specified in `ResourceRuntimeSpec`.
+     * Do not set this field if you want to submit jobs using custom service
+     * account to this PersistentResource after creation, but only specify the
+     * `service_account` inside the job.
      * 
* * string service_account = 2 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ServiceAccountSpecOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ServiceAccountSpecOrBuilder.java index 9459295d5bda..7c7ccafc71fe 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ServiceAccountSpecOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ServiceAccountSpecOrBuilder.java @@ -44,18 +44,17 @@ public interface ServiceAccountSpecOrBuilder * * *
-   * Optional. Default service account that this PersistentResource's workloads
-   * run as. The workloads include:
+   * Optional. Required when all below conditions are met
+   *  * `enable_custom_service_account` is true;
+   *  * any runtime is specified via `ResourceRuntimeSpec` on creation time,
+   *    for example, Ray
    *
-   *  * Any runtime specified via `ResourceRuntimeSpec` on creation time,
-   *    for example, Ray.
-   *  * Jobs submitted to PersistentResource, if no other service account
-   *    specified in the job specs.
+   * The users must have `iam.serviceAccounts.actAs` permission on this service
+   * account and then the specified runtime containers will run as it.
    *
-   * Only works when custom service account is enabled and users have the
-   * `iam.serviceAccounts.actAs` permission on this service account.
-   *
-   * Required if any containers are specified in `ResourceRuntimeSpec`.
+   * Do not set this field if you want to submit jobs using custom service
+   * account to this PersistentResource after creation, but only specify the
+   * `service_account` inside the job.
    * 
* * string service_account = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -67,18 +66,17 @@ public interface ServiceAccountSpecOrBuilder * * *
-   * Optional. Default service account that this PersistentResource's workloads
-   * run as. The workloads include:
-   *
-   *  * Any runtime specified via `ResourceRuntimeSpec` on creation time,
-   *    for example, Ray.
-   *  * Jobs submitted to PersistentResource, if no other service account
-   *    specified in the job specs.
+   * Optional. Required when all below conditions are met
+   *  * `enable_custom_service_account` is true;
+   *  * any runtime is specified via `ResourceRuntimeSpec` on creation time,
+   *    for example, Ray
    *
-   * Only works when custom service account is enabled and users have the
-   * `iam.serviceAccounts.actAs` permission on this service account.
+   * The users must have `iam.serviceAccounts.actAs` permission on this service
+   * account and then the specified runtime containers will run as it.
    *
-   * Required if any containers are specified in `ResourceRuntimeSpec`.
+   * Do not set this field if you want to submit jobs using custom service
+   * account to this PersistentResource after creation, but only specify the
+   * `service_account` inside the job.
    * 
* * string service_account = 2 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ShieldedVmConfig.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ShieldedVmConfig.java new file mode 100644 index 000000000000..54ca510adc99 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ShieldedVmConfig.java @@ -0,0 +1,563 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/machine_resources.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * A set of Shielded Instance options.
+ * See [Images using supported Shielded VM
+ * features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm).
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.ShieldedVmConfig} + */ +public final class ShieldedVmConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.ShieldedVmConfig) + ShieldedVmConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use ShieldedVmConfig.newBuilder() to construct. + private ShieldedVmConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ShieldedVmConfig() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ShieldedVmConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.MachineResourcesProto + .internal_static_google_cloud_aiplatform_v1beta1_ShieldedVmConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.MachineResourcesProto + .internal_static_google_cloud_aiplatform_v1beta1_ShieldedVmConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.ShieldedVmConfig.class, + com.google.cloud.aiplatform.v1beta1.ShieldedVmConfig.Builder.class); + } + + public static final int ENABLE_SECURE_BOOT_FIELD_NUMBER = 1; + private boolean enableSecureBoot_ = false; + /** + * + * + *
+   * Defines whether the instance has [Secure
+   * Boot](https://cloud.google.com/compute/shielded-vm/docs/shielded-vm#secure-boot)
+   * enabled.
+   *
+   * Secure Boot helps ensure that the system only runs authentic software by
+   * verifying the digital signature of all boot components, and halting the
+   * boot process if signature verification fails.
+   * 
+ * + * bool enable_secure_boot = 1; + * + * @return The enableSecureBoot. + */ + @java.lang.Override + public boolean getEnableSecureBoot() { + return enableSecureBoot_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (enableSecureBoot_ != false) { + output.writeBool(1, enableSecureBoot_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (enableSecureBoot_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, enableSecureBoot_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.ShieldedVmConfig)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.ShieldedVmConfig other = + (com.google.cloud.aiplatform.v1beta1.ShieldedVmConfig) obj; + + if (getEnableSecureBoot() != other.getEnableSecureBoot()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENABLE_SECURE_BOOT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableSecureBoot()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.ShieldedVmConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.ShieldedVmConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ShieldedVmConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.ShieldedVmConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ShieldedVmConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.ShieldedVmConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ShieldedVmConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.ShieldedVmConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ShieldedVmConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.ShieldedVmConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ShieldedVmConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.ShieldedVmConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.aiplatform.v1beta1.ShieldedVmConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A set of Shielded Instance options.
+   * See [Images using supported Shielded VM
+   * features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm).
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.ShieldedVmConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.ShieldedVmConfig) + com.google.cloud.aiplatform.v1beta1.ShieldedVmConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.MachineResourcesProto + .internal_static_google_cloud_aiplatform_v1beta1_ShieldedVmConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.MachineResourcesProto + .internal_static_google_cloud_aiplatform_v1beta1_ShieldedVmConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.ShieldedVmConfig.class, + com.google.cloud.aiplatform.v1beta1.ShieldedVmConfig.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.ShieldedVmConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + enableSecureBoot_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.MachineResourcesProto + .internal_static_google_cloud_aiplatform_v1beta1_ShieldedVmConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ShieldedVmConfig getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.ShieldedVmConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ShieldedVmConfig build() { + com.google.cloud.aiplatform.v1beta1.ShieldedVmConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ShieldedVmConfig buildPartial() { + com.google.cloud.aiplatform.v1beta1.ShieldedVmConfig result = + new com.google.cloud.aiplatform.v1beta1.ShieldedVmConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1beta1.ShieldedVmConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.enableSecureBoot_ = enableSecureBoot_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1beta1.ShieldedVmConfig) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.ShieldedVmConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.ShieldedVmConfig other) { + if (other == com.google.cloud.aiplatform.v1beta1.ShieldedVmConfig.getDefaultInstance()) + return this; + if (other.getEnableSecureBoot() != false) { + setEnableSecureBoot(other.getEnableSecureBoot()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + enableSecureBoot_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private boolean enableSecureBoot_; + /** + * + * + *
+     * Defines whether the instance has [Secure
+     * Boot](https://cloud.google.com/compute/shielded-vm/docs/shielded-vm#secure-boot)
+     * enabled.
+     *
+     * Secure Boot helps ensure that the system only runs authentic software by
+     * verifying the digital signature of all boot components, and halting the
+     * boot process if signature verification fails.
+     * 
+ * + * bool enable_secure_boot = 1; + * + * @return The enableSecureBoot. + */ + @java.lang.Override + public boolean getEnableSecureBoot() { + return enableSecureBoot_; + } + /** + * + * + *
+     * Defines whether the instance has [Secure
+     * Boot](https://cloud.google.com/compute/shielded-vm/docs/shielded-vm#secure-boot)
+     * enabled.
+     *
+     * Secure Boot helps ensure that the system only runs authentic software by
+     * verifying the digital signature of all boot components, and halting the
+     * boot process if signature verification fails.
+     * 
+ * + * bool enable_secure_boot = 1; + * + * @param value The enableSecureBoot to set. + * @return This builder for chaining. + */ + public Builder setEnableSecureBoot(boolean value) { + + enableSecureBoot_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Defines whether the instance has [Secure
+     * Boot](https://cloud.google.com/compute/shielded-vm/docs/shielded-vm#secure-boot)
+     * enabled.
+     *
+     * Secure Boot helps ensure that the system only runs authentic software by
+     * verifying the digital signature of all boot components, and halting the
+     * boot process if signature verification fails.
+     * 
+ * + * bool enable_secure_boot = 1; + * + * @return This builder for chaining. + */ + public Builder clearEnableSecureBoot() { + bitField0_ = (bitField0_ & ~0x00000001); + enableSecureBoot_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.ShieldedVmConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.ShieldedVmConfig) + private static final com.google.cloud.aiplatform.v1beta1.ShieldedVmConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.ShieldedVmConfig(); + } + + public static com.google.cloud.aiplatform.v1beta1.ShieldedVmConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ShieldedVmConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ShieldedVmConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ShieldedVmConfigOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ShieldedVmConfigOrBuilder.java new file mode 100644 index 000000000000..515167de2383 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ShieldedVmConfigOrBuilder.java @@ -0,0 +1,45 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/machine_resources.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +public interface ShieldedVmConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.ShieldedVmConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Defines whether the instance has [Secure
+   * Boot](https://cloud.google.com/compute/shielded-vm/docs/shielded-vm#secure-boot)
+   * enabled.
+   *
+   * Secure Boot helps ensure that the system only runs authentic software by
+   * verifying the digital signature of all boot components, and halting the
+   * boot process if signature verification fails.
+   * 
+ * + * bool enable_secure_boot = 1; + * + * @return The enableSecureBoot. + */ + boolean getEnableSecureBoot(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/StartNotebookRuntimeOperationMetadata.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/StartNotebookRuntimeOperationMetadata.java new file mode 100644 index 000000000000..ff2d31979e96 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/StartNotebookRuntimeOperationMetadata.java @@ -0,0 +1,943 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/notebook_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Metadata information for
+ * [NotebookService.StartNotebookRuntime][google.cloud.aiplatform.v1beta1.NotebookService.StartNotebookRuntime].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.StartNotebookRuntimeOperationMetadata} + */ +public final class StartNotebookRuntimeOperationMetadata + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.StartNotebookRuntimeOperationMetadata) + StartNotebookRuntimeOperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use StartNotebookRuntimeOperationMetadata.newBuilder() to construct. + private StartNotebookRuntimeOperationMetadata( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private StartNotebookRuntimeOperationMetadata() { + progressMessage_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new StartNotebookRuntimeOperationMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_StartNotebookRuntimeOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_StartNotebookRuntimeOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeOperationMetadata.class, + com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeOperationMetadata.Builder + .class); + } + + private int bitField0_; + public static final int GENERIC_METADATA_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata genericMetadata_; + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + @java.lang.Override + public boolean hasGenericMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata getGenericMetadata() { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder() { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + + public static final int PROGRESS_MESSAGE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object progressMessage_ = ""; + /** + * + * + *
+   * A human-readable message that shows the intermediate progress details of
+   * NotebookRuntime.
+   * 
+ * + * string progress_message = 2; + * + * @return The progressMessage. + */ + @java.lang.Override + public java.lang.String getProgressMessage() { + java.lang.Object ref = progressMessage_; + 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(); + progressMessage_ = s; + return s; + } + } + /** + * + * + *
+   * A human-readable message that shows the intermediate progress details of
+   * NotebookRuntime.
+   * 
+ * + * string progress_message = 2; + * + * @return The bytes for progressMessage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProgressMessageBytes() { + java.lang.Object ref = progressMessage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + progressMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getGenericMetadata()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(progressMessage_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, progressMessage_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getGenericMetadata()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(progressMessage_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, progressMessage_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeOperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeOperationMetadata other = + (com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeOperationMetadata) obj; + + if (hasGenericMetadata() != other.hasGenericMetadata()) return false; + if (hasGenericMetadata()) { + if (!getGenericMetadata().equals(other.getGenericMetadata())) return false; + } + if (!getProgressMessage().equals(other.getProgressMessage())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasGenericMetadata()) { + hash = (37 * hash) + GENERIC_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getGenericMetadata().hashCode(); + } + hash = (37 * hash) + PROGRESS_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getProgressMessage().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeOperationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeOperationMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeOperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeOperationMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeOperationMetadata parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeOperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeOperationMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeOperationMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeOperationMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeOperationMetadata + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeOperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Metadata information for
+   * [NotebookService.StartNotebookRuntime][google.cloud.aiplatform.v1beta1.NotebookService.StartNotebookRuntime].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.StartNotebookRuntimeOperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.StartNotebookRuntimeOperationMetadata) + com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeOperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_StartNotebookRuntimeOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_StartNotebookRuntimeOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeOperationMetadata.class, + com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeOperationMetadata.Builder + .class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeOperationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getGenericMetadataFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + genericMetadata_ = null; + if (genericMetadataBuilder_ != null) { + genericMetadataBuilder_.dispose(); + genericMetadataBuilder_ = null; + } + progressMessage_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_StartNotebookRuntimeOperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeOperationMetadata + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeOperationMetadata + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeOperationMetadata build() { + com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeOperationMetadata result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeOperationMetadata + buildPartial() { + com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeOperationMetadata result = + new com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeOperationMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeOperationMetadata result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.genericMetadata_ = + genericMetadataBuilder_ == null ? genericMetadata_ : genericMetadataBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.progressMessage_ = progressMessage_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeOperationMetadata) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeOperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeOperationMetadata other) { + if (other + == com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeOperationMetadata + .getDefaultInstance()) return this; + if (other.hasGenericMetadata()) { + mergeGenericMetadata(other.getGenericMetadata()); + } + if (!other.getProgressMessage().isEmpty()) { + progressMessage_ = other.progressMessage_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getGenericMetadataFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + progressMessage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata genericMetadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadataOrBuilder> + genericMetadataBuilder_; + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + public boolean hasGenericMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + public com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata getGenericMetadata() { + if (genericMetadataBuilder_ == null) { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } else { + return genericMetadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder setGenericMetadata( + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata value) { + if (genericMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + genericMetadata_ = value; + } else { + genericMetadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder setGenericMetadata( + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.Builder builderForValue) { + if (genericMetadataBuilder_ == null) { + genericMetadata_ = builderForValue.build(); + } else { + genericMetadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder mergeGenericMetadata( + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata value) { + if (genericMetadataBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && genericMetadata_ != null + && genericMetadata_ + != com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata + .getDefaultInstance()) { + getGenericMetadataBuilder().mergeFrom(value); + } else { + genericMetadata_ = value; + } + } else { + genericMetadataBuilder_.mergeFrom(value); + } + if (genericMetadata_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder clearGenericMetadata() { + bitField0_ = (bitField0_ & ~0x00000001); + genericMetadata_ = null; + if (genericMetadataBuilder_ != null) { + genericMetadataBuilder_.dispose(); + genericMetadataBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + public com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.Builder + getGenericMetadataBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getGenericMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + public com.google.cloud.aiplatform.v1beta1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder() { + if (genericMetadataBuilder_ != null) { + return genericMetadataBuilder_.getMessageOrBuilder(); + } else { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadataOrBuilder> + getGenericMetadataFieldBuilder() { + if (genericMetadataBuilder_ == null) { + genericMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadataOrBuilder>( + getGenericMetadata(), getParentForChildren(), isClean()); + genericMetadata_ = null; + } + return genericMetadataBuilder_; + } + + private java.lang.Object progressMessage_ = ""; + /** + * + * + *
+     * A human-readable message that shows the intermediate progress details of
+     * NotebookRuntime.
+     * 
+ * + * string progress_message = 2; + * + * @return The progressMessage. + */ + public java.lang.String getProgressMessage() { + java.lang.Object ref = progressMessage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + progressMessage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A human-readable message that shows the intermediate progress details of
+     * NotebookRuntime.
+     * 
+ * + * string progress_message = 2; + * + * @return The bytes for progressMessage. + */ + public com.google.protobuf.ByteString getProgressMessageBytes() { + java.lang.Object ref = progressMessage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + progressMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A human-readable message that shows the intermediate progress details of
+     * NotebookRuntime.
+     * 
+ * + * string progress_message = 2; + * + * @param value The progressMessage to set. + * @return This builder for chaining. + */ + public Builder setProgressMessage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + progressMessage_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * A human-readable message that shows the intermediate progress details of
+     * NotebookRuntime.
+     * 
+ * + * string progress_message = 2; + * + * @return This builder for chaining. + */ + public Builder clearProgressMessage() { + progressMessage_ = getDefaultInstance().getProgressMessage(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A human-readable message that shows the intermediate progress details of
+     * NotebookRuntime.
+     * 
+ * + * string progress_message = 2; + * + * @param value The bytes for progressMessage to set. + * @return This builder for chaining. + */ + public Builder setProgressMessageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + progressMessage_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.StartNotebookRuntimeOperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.StartNotebookRuntimeOperationMetadata) + private static final com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeOperationMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeOperationMetadata(); + } + + public static com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeOperationMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StartNotebookRuntimeOperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeOperationMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/StartNotebookRuntimeOperationMetadataOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/StartNotebookRuntimeOperationMetadataOrBuilder.java new file mode 100644 index 000000000000..a6b5bedbd925 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/StartNotebookRuntimeOperationMetadataOrBuilder.java @@ -0,0 +1,89 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/notebook_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +public interface StartNotebookRuntimeOperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.StartNotebookRuntimeOperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + boolean hasGenericMetadata(); + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata getGenericMetadata(); + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder(); + + /** + * + * + *
+   * A human-readable message that shows the intermediate progress details of
+   * NotebookRuntime.
+   * 
+ * + * string progress_message = 2; + * + * @return The progressMessage. + */ + java.lang.String getProgressMessage(); + /** + * + * + *
+   * A human-readable message that shows the intermediate progress details of
+   * NotebookRuntime.
+   * 
+ * + * string progress_message = 2; + * + * @return The bytes for progressMessage. + */ + com.google.protobuf.ByteString getProgressMessageBytes(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/StartNotebookRuntimeRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/StartNotebookRuntimeRequest.java new file mode 100644 index 000000000000..e54e7c2119d1 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/StartNotebookRuntimeRequest.java @@ -0,0 +1,670 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/notebook_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Request message for
+ * [NotebookService.StartNotebookRuntime][google.cloud.aiplatform.v1beta1.NotebookService.StartNotebookRuntime].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.StartNotebookRuntimeRequest} + */ +public final class StartNotebookRuntimeRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.StartNotebookRuntimeRequest) + StartNotebookRuntimeRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use StartNotebookRuntimeRequest.newBuilder() to construct. + private StartNotebookRuntimeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private StartNotebookRuntimeRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new StartNotebookRuntimeRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_StartNotebookRuntimeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_StartNotebookRuntimeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeRequest.class, + com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the NotebookRuntime resource to be started.
+   * Instead of checking whether the name is in valid NotebookRuntime resource
+   * name format, directly throw NotFound exception if there is no such
+   * NotebookRuntime in spanner.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the NotebookRuntime resource to be started.
+   * Instead of checking whether the name is in valid NotebookRuntime resource
+   * name format, directly throw NotFound exception if there is no such
+   * NotebookRuntime in spanner.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeRequest other = + (com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for
+   * [NotebookService.StartNotebookRuntime][google.cloud.aiplatform.v1beta1.NotebookService.StartNotebookRuntime].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.StartNotebookRuntimeRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.StartNotebookRuntimeRequest) + com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_StartNotebookRuntimeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_StartNotebookRuntimeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeRequest.class, + com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_StartNotebookRuntimeRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeRequest + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeRequest build() { + com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeRequest buildPartial() { + com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeRequest result = + new com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeRequest other) { + if (other + == com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the NotebookRuntime resource to be started.
+     * Instead of checking whether the name is in valid NotebookRuntime resource
+     * name format, directly throw NotFound exception if there is no such
+     * NotebookRuntime in spanner.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the NotebookRuntime resource to be started.
+     * Instead of checking whether the name is in valid NotebookRuntime resource
+     * name format, directly throw NotFound exception if there is no such
+     * NotebookRuntime in spanner.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the NotebookRuntime resource to be started.
+     * Instead of checking whether the name is in valid NotebookRuntime resource
+     * name format, directly throw NotFound exception if there is no such
+     * NotebookRuntime in spanner.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the NotebookRuntime resource to be started.
+     * Instead of checking whether the name is in valid NotebookRuntime resource
+     * name format, directly throw NotFound exception if there is no such
+     * NotebookRuntime in spanner.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the NotebookRuntime resource to be started.
+     * Instead of checking whether the name is in valid NotebookRuntime resource
+     * name format, directly throw NotFound exception if there is no such
+     * NotebookRuntime in spanner.
+     * 
+ * + * + * 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. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.StartNotebookRuntimeRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.StartNotebookRuntimeRequest) + private static final com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeRequest(); + } + + public static com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StartNotebookRuntimeRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/StartNotebookRuntimeRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/StartNotebookRuntimeRequestOrBuilder.java new file mode 100644 index 000000000000..0d0dc8ee4888 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/StartNotebookRuntimeRequestOrBuilder.java @@ -0,0 +1,61 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/notebook_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +public interface StartNotebookRuntimeRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.StartNotebookRuntimeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the NotebookRuntime resource to be started.
+   * Instead of checking whether the name is in valid NotebookRuntime resource
+   * name format, directly throw NotFound exception if there is no such
+   * NotebookRuntime in spanner.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the NotebookRuntime resource to be started.
+   * Instead of checking whether the name is in valid NotebookRuntime resource
+   * name format, directly throw NotFound exception if there is no such
+   * NotebookRuntime in spanner.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/StartNotebookRuntimeResponse.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/StartNotebookRuntimeResponse.java new file mode 100644 index 000000000000..4d0e9c760cbd --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/StartNotebookRuntimeResponse.java @@ -0,0 +1,441 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/notebook_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Response message for
+ * [NotebookService.StartNotebookRuntime][google.cloud.aiplatform.v1beta1.NotebookService.StartNotebookRuntime].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.StartNotebookRuntimeResponse} + */ +public final class StartNotebookRuntimeResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.StartNotebookRuntimeResponse) + StartNotebookRuntimeResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use StartNotebookRuntimeResponse.newBuilder() to construct. + private StartNotebookRuntimeResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private StartNotebookRuntimeResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new StartNotebookRuntimeResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_StartNotebookRuntimeResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_StartNotebookRuntimeResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeResponse.class, + com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeResponse.Builder.class); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeResponse)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeResponse other = + (com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeResponse) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for
+   * [NotebookService.StartNotebookRuntime][google.cloud.aiplatform.v1beta1.NotebookService.StartNotebookRuntime].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.StartNotebookRuntimeResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.StartNotebookRuntimeResponse) + com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_StartNotebookRuntimeResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_StartNotebookRuntimeResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeResponse.class, + com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeResponse.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_StartNotebookRuntimeResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeResponse + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeResponse build() { + com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeResponse buildPartial() { + com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeResponse result = + new com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeResponse(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeResponse) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeResponse other) { + if (other + == com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeResponse.getDefaultInstance()) + return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.StartNotebookRuntimeResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.StartNotebookRuntimeResponse) + private static final com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeResponse(); + } + + public static com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StartNotebookRuntimeResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/StartNotebookRuntimeResponseOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/StartNotebookRuntimeResponseOrBuilder.java new file mode 100644 index 000000000000..3e3c908628b0 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/StartNotebookRuntimeResponseOrBuilder.java @@ -0,0 +1,25 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/notebook_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +public interface StartNotebookRuntimeResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.StartNotebookRuntimeResponse) + com.google.protobuf.MessageOrBuilder {} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ToolConfig.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ToolConfig.java index cf5617ef1c95..e8e86e2caeff 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ToolConfig.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ToolConfig.java @@ -68,7 +68,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Function calling config.
+   * Optional. Function calling config.
    * 
* * @@ -85,7 +85,7 @@ public boolean hasFunctionCallingConfig() { * * *
-   * Function calling config.
+   * Optional. Function calling config.
    * 
* * @@ -104,7 +104,7 @@ public com.google.cloud.aiplatform.v1beta1.FunctionCallingConfig getFunctionCall * * *
-   * Function calling config.
+   * Optional. Function calling config.
    * 
* * @@ -494,7 +494,7 @@ public Builder mergeFrom( * * *
-     * Function calling config.
+     * Optional. Function calling config.
      * 
* * @@ -510,7 +510,7 @@ public boolean hasFunctionCallingConfig() { * * *
-     * Function calling config.
+     * Optional. Function calling config.
      * 
* * @@ -532,7 +532,7 @@ public com.google.cloud.aiplatform.v1beta1.FunctionCallingConfig getFunctionCall * * *
-     * Function calling config.
+     * Optional. Function calling config.
      * 
* * @@ -557,7 +557,7 @@ public Builder setFunctionCallingConfig( * * *
-     * Function calling config.
+     * Optional. Function calling config.
      * 
* * @@ -579,7 +579,7 @@ public Builder setFunctionCallingConfig( * * *
-     * Function calling config.
+     * Optional. Function calling config.
      * 
* * @@ -610,7 +610,7 @@ public Builder mergeFunctionCallingConfig( * * *
-     * Function calling config.
+     * Optional. Function calling config.
      * 
* * @@ -631,7 +631,7 @@ public Builder clearFunctionCallingConfig() { * * *
-     * Function calling config.
+     * Optional. Function calling config.
      * 
* * @@ -648,7 +648,7 @@ public Builder clearFunctionCallingConfig() { * * *
-     * Function calling config.
+     * Optional. Function calling config.
      * 
* * @@ -669,7 +669,7 @@ public Builder clearFunctionCallingConfig() { * * *
-     * Function calling config.
+     * Optional. Function calling config.
      * 
* * diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ToolConfigOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ToolConfigOrBuilder.java index ceb5343ccd61..6ca048261f2a 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ToolConfigOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ToolConfigOrBuilder.java @@ -28,7 +28,7 @@ public interface ToolConfigOrBuilder * * *
-   * Function calling config.
+   * Optional. Function calling config.
    * 
* * @@ -42,7 +42,7 @@ public interface ToolConfigOrBuilder * * *
-   * Function calling config.
+   * Optional. Function calling config.
    * 
* * @@ -56,7 +56,7 @@ public interface ToolConfigOrBuilder * * *
-   * Function calling config.
+   * Optional. Function calling config.
    * 
* * diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ToolProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ToolProto.java index 18d57c92ee6e..c2d85a8fd092 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ToolProto.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ToolProto.java @@ -56,6 +56,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_aiplatform_v1beta1_Retrieval_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_aiplatform_v1beta1_Retrieval_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_VertexRagStore_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_VertexRagStore_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_aiplatform_v1beta1_VertexAISearch_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -112,27 +116,32 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "nCall\022\021\n\004name\030\001 \001(\tB\003\340A\002\022*\n\004args\030\002 \001(\0132\027" + ".google.protobuf.StructB\003\340A\001\"U\n\020Function" + "Response\022\021\n\004name\030\001 \001(\tB\003\340A\002\022.\n\010response\030" - + "\002 \001(\0132\027.google.protobuf.StructB\003\340A\002\"\204\001\n\t" + + "\002 \001(\0132\027.google.protobuf.StructB\003\340A\002\"\321\001\n\t" + "Retrieval\022K\n\020vertex_ai_search\030\002 \001(\0132/.go" + "ogle.cloud.aiplatform.v1beta1.VertexAISe" - + "archH\000\022 \n\023disable_attribution\030\003 \001(\010B\003\340A\001" - + "B\010\n\006source\"(\n\016VertexAISearch\022\026\n\tdatastor" - + "e\030\001 \001(\tB\003\340A\002\"9\n\025GoogleSearchRetrieval\022 \n" - + "\023disable_attribution\030\001 \001(\010B\003\340A\001\"j\n\nToolC" - + "onfig\022\\\n\027function_calling_config\030\001 \001(\01326" + + "archH\000\022K\n\020vertex_rag_store\030\004 \001(\0132/.googl" + + "e.cloud.aiplatform.v1beta1.VertexRagStor" + + "eH\000\022 \n\023disable_attribution\030\003 \001(\010B\003\340A\001B\010\n" + + "\006source\"\213\001\n\016VertexRagStore\022@\n\013rag_corpor" + + "a\030\001 \003(\tB+\340A\002\372A%\n#aiplatform.googleapis.c" + + "om/RagCorpus\022\"\n\020similarity_top_k\030\002 \001(\005B\003" + + "\340A\001H\000\210\001\001B\023\n\021_similarity_top_k\"(\n\016VertexA" + + "ISearch\022\026\n\tdatastore\030\001 \001(\tB\003\340A\002\"9\n\025Googl" + + "eSearchRetrieval\022 \n\023disable_attribution\030" + + "\001 \001(\010B\003\340A\001\"j\n\nToolConfig\022\\\n\027function_cal" + + "ling_config\030\001 \001(\01326.google.cloud.aiplatf" + + "orm.v1beta1.FunctionCallingConfigB\003\340A\001\"\307" + + "\001\n\025FunctionCallingConfig\022N\n\004mode\030\001 \001(\0162;" + ".google.cloud.aiplatform.v1beta1.Functio" - + "nCallingConfigB\003\340A\001\"\307\001\n\025FunctionCallingC" - + "onfig\022N\n\004mode\030\001 \001(\0162;.google.cloud.aipla" - + "tform.v1beta1.FunctionCallingConfig.Mode" - + "B\003\340A\001\022#\n\026allowed_function_names\030\002 \003(\tB\003\340" - + "A\001\"9\n\004Mode\022\024\n\020MODE_UNSPECIFIED\020\000\022\010\n\004AUTO" - + "\020\001\022\007\n\003ANY\020\002\022\010\n\004NONE\020\003B\340\001\n#com.google.clo" - + "ud.aiplatform.v1beta1B\tToolProtoP\001ZCclou" - + "d.google.com/go/aiplatform/apiv1beta1/ai" - + "platformpb;aiplatformpb\252\002\037Google.Cloud.A" - + "IPlatform.V1Beta1\312\002\037Google\\Cloud\\AIPlatf" - + "orm\\V1beta1\352\002\"Google::Cloud::AIPlatform:" - + ":V1beta1b\006proto3" + + "nCallingConfig.ModeB\003\340A\001\022#\n\026allowed_func" + + "tion_names\030\002 \003(\tB\003\340A\001\"9\n\004Mode\022\024\n\020MODE_UN" + + "SPECIFIED\020\000\022\010\n\004AUTO\020\001\022\007\n\003ANY\020\002\022\010\n\004NONE\020\003" + + "B\340\001\n#com.google.cloud.aiplatform.v1beta1" + + "B\tToolProtoP\001ZCcloud.google.com/go/aipla" + + "tform/apiv1beta1/aiplatformpb;aiplatform" + + "pb\252\002\037Google.Cloud.AIPlatform.V1Beta1\312\002\037G" + + "oogle\\Cloud\\AIPlatform\\V1beta1\352\002\"Google:" + + ":Cloud::AIPlatform::V1beta1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -206,10 +215,18 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1beta1_Retrieval_descriptor, new java.lang.String[] { - "VertexAiSearch", "DisableAttribution", "Source", + "VertexAiSearch", "VertexRagStore", "DisableAttribution", "Source", }); - internal_static_google_cloud_aiplatform_v1beta1_VertexAISearch_descriptor = + internal_static_google_cloud_aiplatform_v1beta1_VertexRagStore_descriptor = getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_aiplatform_v1beta1_VertexRagStore_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_VertexRagStore_descriptor, + new java.lang.String[] { + "RagCorpora", "SimilarityTopK", + }); + internal_static_google_cloud_aiplatform_v1beta1_VertexAISearch_descriptor = + getDescriptor().getMessageTypes().get(7); internal_static_google_cloud_aiplatform_v1beta1_VertexAISearch_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1beta1_VertexAISearch_descriptor, @@ -217,7 +234,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Datastore", }); internal_static_google_cloud_aiplatform_v1beta1_GoogleSearchRetrieval_descriptor = - getDescriptor().getMessageTypes().get(7); + getDescriptor().getMessageTypes().get(8); internal_static_google_cloud_aiplatform_v1beta1_GoogleSearchRetrieval_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1beta1_GoogleSearchRetrieval_descriptor, @@ -225,7 +242,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "DisableAttribution", }); internal_static_google_cloud_aiplatform_v1beta1_ToolConfig_descriptor = - getDescriptor().getMessageTypes().get(8); + getDescriptor().getMessageTypes().get(9); internal_static_google_cloud_aiplatform_v1beta1_ToolConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1beta1_ToolConfig_descriptor, @@ -233,7 +250,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "FunctionCallingConfig", }); internal_static_google_cloud_aiplatform_v1beta1_FunctionCallingConfig_descriptor = - getDescriptor().getMessageTypes().get(9); + getDescriptor().getMessageTypes().get(10); internal_static_google_cloud_aiplatform_v1beta1_FunctionCallingConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1beta1_FunctionCallingConfig_descriptor, diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/UpgradeNotebookRuntimeOperationMetadata.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/UpgradeNotebookRuntimeOperationMetadata.java new file mode 100644 index 000000000000..90eca5048aad --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/UpgradeNotebookRuntimeOperationMetadata.java @@ -0,0 +1,948 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/notebook_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Metadata information for
+ * [NotebookService.UpgradeNotebookRuntime][google.cloud.aiplatform.v1beta1.NotebookService.UpgradeNotebookRuntime].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeOperationMetadata} + */ +public final class UpgradeNotebookRuntimeOperationMetadata + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeOperationMetadata) + UpgradeNotebookRuntimeOperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpgradeNotebookRuntimeOperationMetadata.newBuilder() to construct. + private UpgradeNotebookRuntimeOperationMetadata( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpgradeNotebookRuntimeOperationMetadata() { + progressMessage_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpgradeNotebookRuntimeOperationMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_UpgradeNotebookRuntimeOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_UpgradeNotebookRuntimeOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeOperationMetadata.class, + com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeOperationMetadata.Builder + .class); + } + + private int bitField0_; + public static final int GENERIC_METADATA_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata genericMetadata_; + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + @java.lang.Override + public boolean hasGenericMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata getGenericMetadata() { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder() { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + + public static final int PROGRESS_MESSAGE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object progressMessage_ = ""; + /** + * + * + *
+   * A human-readable message that shows the intermediate progress details of
+   * NotebookRuntime.
+   * 
+ * + * string progress_message = 2; + * + * @return The progressMessage. + */ + @java.lang.Override + public java.lang.String getProgressMessage() { + java.lang.Object ref = progressMessage_; + 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(); + progressMessage_ = s; + return s; + } + } + /** + * + * + *
+   * A human-readable message that shows the intermediate progress details of
+   * NotebookRuntime.
+   * 
+ * + * string progress_message = 2; + * + * @return The bytes for progressMessage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProgressMessageBytes() { + java.lang.Object ref = progressMessage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + progressMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getGenericMetadata()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(progressMessage_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, progressMessage_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getGenericMetadata()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(progressMessage_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, progressMessage_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeOperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeOperationMetadata other = + (com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeOperationMetadata) obj; + + if (hasGenericMetadata() != other.hasGenericMetadata()) return false; + if (hasGenericMetadata()) { + if (!getGenericMetadata().equals(other.getGenericMetadata())) return false; + } + if (!getProgressMessage().equals(other.getProgressMessage())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasGenericMetadata()) { + hash = (37 * hash) + GENERIC_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getGenericMetadata().hashCode(); + } + hash = (37 * hash) + PROGRESS_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getProgressMessage().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeOperationMetadata + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeOperationMetadata + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeOperationMetadata + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeOperationMetadata + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeOperationMetadata + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeOperationMetadata + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeOperationMetadata + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeOperationMetadata + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeOperationMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeOperationMetadata + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeOperationMetadata + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeOperationMetadata + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeOperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Metadata information for
+   * [NotebookService.UpgradeNotebookRuntime][google.cloud.aiplatform.v1beta1.NotebookService.UpgradeNotebookRuntime].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeOperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeOperationMetadata) + com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeOperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_UpgradeNotebookRuntimeOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_UpgradeNotebookRuntimeOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeOperationMetadata.class, + com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeOperationMetadata.Builder + .class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeOperationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getGenericMetadataFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + genericMetadata_ = null; + if (genericMetadataBuilder_ != null) { + genericMetadataBuilder_.dispose(); + genericMetadataBuilder_ = null; + } + progressMessage_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_UpgradeNotebookRuntimeOperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeOperationMetadata + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeOperationMetadata + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeOperationMetadata build() { + com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeOperationMetadata result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeOperationMetadata + buildPartial() { + com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeOperationMetadata result = + new com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeOperationMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeOperationMetadata result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.genericMetadata_ = + genericMetadataBuilder_ == null ? genericMetadata_ : genericMetadataBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.progressMessage_ = progressMessage_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeOperationMetadata) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeOperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeOperationMetadata other) { + if (other + == com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeOperationMetadata + .getDefaultInstance()) return this; + if (other.hasGenericMetadata()) { + mergeGenericMetadata(other.getGenericMetadata()); + } + if (!other.getProgressMessage().isEmpty()) { + progressMessage_ = other.progressMessage_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getGenericMetadataFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + progressMessage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata genericMetadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadataOrBuilder> + genericMetadataBuilder_; + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + public boolean hasGenericMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + public com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata getGenericMetadata() { + if (genericMetadataBuilder_ == null) { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } else { + return genericMetadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder setGenericMetadata( + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata value) { + if (genericMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + genericMetadata_ = value; + } else { + genericMetadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder setGenericMetadata( + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.Builder builderForValue) { + if (genericMetadataBuilder_ == null) { + genericMetadata_ = builderForValue.build(); + } else { + genericMetadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder mergeGenericMetadata( + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata value) { + if (genericMetadataBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && genericMetadata_ != null + && genericMetadata_ + != com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata + .getDefaultInstance()) { + getGenericMetadataBuilder().mergeFrom(value); + } else { + genericMetadata_ = value; + } + } else { + genericMetadataBuilder_.mergeFrom(value); + } + if (genericMetadata_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder clearGenericMetadata() { + bitField0_ = (bitField0_ & ~0x00000001); + genericMetadata_ = null; + if (genericMetadataBuilder_ != null) { + genericMetadataBuilder_.dispose(); + genericMetadataBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + public com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.Builder + getGenericMetadataBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getGenericMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + public com.google.cloud.aiplatform.v1beta1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder() { + if (genericMetadataBuilder_ != null) { + return genericMetadataBuilder_.getMessageOrBuilder(); + } else { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadataOrBuilder> + getGenericMetadataFieldBuilder() { + if (genericMetadataBuilder_ == null) { + genericMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadataOrBuilder>( + getGenericMetadata(), getParentForChildren(), isClean()); + genericMetadata_ = null; + } + return genericMetadataBuilder_; + } + + private java.lang.Object progressMessage_ = ""; + /** + * + * + *
+     * A human-readable message that shows the intermediate progress details of
+     * NotebookRuntime.
+     * 
+ * + * string progress_message = 2; + * + * @return The progressMessage. + */ + public java.lang.String getProgressMessage() { + java.lang.Object ref = progressMessage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + progressMessage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A human-readable message that shows the intermediate progress details of
+     * NotebookRuntime.
+     * 
+ * + * string progress_message = 2; + * + * @return The bytes for progressMessage. + */ + public com.google.protobuf.ByteString getProgressMessageBytes() { + java.lang.Object ref = progressMessage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + progressMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A human-readable message that shows the intermediate progress details of
+     * NotebookRuntime.
+     * 
+ * + * string progress_message = 2; + * + * @param value The progressMessage to set. + * @return This builder for chaining. + */ + public Builder setProgressMessage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + progressMessage_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * A human-readable message that shows the intermediate progress details of
+     * NotebookRuntime.
+     * 
+ * + * string progress_message = 2; + * + * @return This builder for chaining. + */ + public Builder clearProgressMessage() { + progressMessage_ = getDefaultInstance().getProgressMessage(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A human-readable message that shows the intermediate progress details of
+     * NotebookRuntime.
+     * 
+ * + * string progress_message = 2; + * + * @param value The bytes for progressMessage to set. + * @return This builder for chaining. + */ + public Builder setProgressMessageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + progressMessage_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeOperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeOperationMetadata) + private static final com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeOperationMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeOperationMetadata(); + } + + public static com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeOperationMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpgradeNotebookRuntimeOperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeOperationMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/UpgradeNotebookRuntimeOperationMetadataOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/UpgradeNotebookRuntimeOperationMetadataOrBuilder.java new file mode 100644 index 000000000000..547337460663 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/UpgradeNotebookRuntimeOperationMetadataOrBuilder.java @@ -0,0 +1,89 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/notebook_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +public interface UpgradeNotebookRuntimeOperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeOperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + boolean hasGenericMetadata(); + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata getGenericMetadata(); + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder(); + + /** + * + * + *
+   * A human-readable message that shows the intermediate progress details of
+   * NotebookRuntime.
+   * 
+ * + * string progress_message = 2; + * + * @return The progressMessage. + */ + java.lang.String getProgressMessage(); + /** + * + * + *
+   * A human-readable message that shows the intermediate progress details of
+   * NotebookRuntime.
+   * 
+ * + * string progress_message = 2; + * + * @return The bytes for progressMessage. + */ + com.google.protobuf.ByteString getProgressMessageBytes(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/UpgradeNotebookRuntimeRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/UpgradeNotebookRuntimeRequest.java new file mode 100644 index 000000000000..aed2f8d0b98a --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/UpgradeNotebookRuntimeRequest.java @@ -0,0 +1,672 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/notebook_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Request message for
+ * [NotebookService.UpgradeNotebookRuntime][google.cloud.aiplatform.v1beta1.NotebookService.UpgradeNotebookRuntime].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeRequest} + */ +public final class UpgradeNotebookRuntimeRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeRequest) + UpgradeNotebookRuntimeRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpgradeNotebookRuntimeRequest.newBuilder() to construct. + private UpgradeNotebookRuntimeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpgradeNotebookRuntimeRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpgradeNotebookRuntimeRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_UpgradeNotebookRuntimeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_UpgradeNotebookRuntimeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeRequest.class, + com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the NotebookRuntime resource to be upgrade.
+   * Instead of checking whether the name is in valid NotebookRuntime resource
+   * name format, directly throw NotFound exception if there is no such
+   * NotebookRuntime in spanner.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the NotebookRuntime resource to be upgrade.
+   * Instead of checking whether the name is in valid NotebookRuntime resource
+   * name format, directly throw NotFound exception if there is no such
+   * NotebookRuntime in spanner.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeRequest other = + (com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for
+   * [NotebookService.UpgradeNotebookRuntime][google.cloud.aiplatform.v1beta1.NotebookService.UpgradeNotebookRuntime].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeRequest) + com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_UpgradeNotebookRuntimeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_UpgradeNotebookRuntimeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeRequest.class, + com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeRequest.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_UpgradeNotebookRuntimeRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeRequest + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeRequest build() { + com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeRequest buildPartial() { + com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeRequest result = + new com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeRequest other) { + if (other + == com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the NotebookRuntime resource to be upgrade.
+     * Instead of checking whether the name is in valid NotebookRuntime resource
+     * name format, directly throw NotFound exception if there is no such
+     * NotebookRuntime in spanner.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the NotebookRuntime resource to be upgrade.
+     * Instead of checking whether the name is in valid NotebookRuntime resource
+     * name format, directly throw NotFound exception if there is no such
+     * NotebookRuntime in spanner.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the NotebookRuntime resource to be upgrade.
+     * Instead of checking whether the name is in valid NotebookRuntime resource
+     * name format, directly throw NotFound exception if there is no such
+     * NotebookRuntime in spanner.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the NotebookRuntime resource to be upgrade.
+     * Instead of checking whether the name is in valid NotebookRuntime resource
+     * name format, directly throw NotFound exception if there is no such
+     * NotebookRuntime in spanner.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the NotebookRuntime resource to be upgrade.
+     * Instead of checking whether the name is in valid NotebookRuntime resource
+     * name format, directly throw NotFound exception if there is no such
+     * NotebookRuntime in spanner.
+     * 
+ * + * + * 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. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeRequest) + private static final com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeRequest(); + } + + public static com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpgradeNotebookRuntimeRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/UpgradeNotebookRuntimeRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/UpgradeNotebookRuntimeRequestOrBuilder.java new file mode 100644 index 000000000000..06d977881bbe --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/UpgradeNotebookRuntimeRequestOrBuilder.java @@ -0,0 +1,61 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/notebook_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +public interface UpgradeNotebookRuntimeRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the NotebookRuntime resource to be upgrade.
+   * Instead of checking whether the name is in valid NotebookRuntime resource
+   * name format, directly throw NotFound exception if there is no such
+   * NotebookRuntime in spanner.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the NotebookRuntime resource to be upgrade.
+   * Instead of checking whether the name is in valid NotebookRuntime resource
+   * name format, directly throw NotFound exception if there is no such
+   * NotebookRuntime in spanner.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/UpgradeNotebookRuntimeResponse.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/UpgradeNotebookRuntimeResponse.java new file mode 100644 index 000000000000..9fd6ad0a9725 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/UpgradeNotebookRuntimeResponse.java @@ -0,0 +1,446 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/notebook_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Response message for
+ * [NotebookService.UpgradeNotebookRuntime][google.cloud.aiplatform.v1beta1.NotebookService.UpgradeNotebookRuntime].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeResponse} + */ +public final class UpgradeNotebookRuntimeResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeResponse) + UpgradeNotebookRuntimeResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpgradeNotebookRuntimeResponse.newBuilder() to construct. + private UpgradeNotebookRuntimeResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpgradeNotebookRuntimeResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpgradeNotebookRuntimeResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_UpgradeNotebookRuntimeResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_UpgradeNotebookRuntimeResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeResponse.class, + com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeResponse.Builder.class); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeResponse)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeResponse other = + (com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeResponse) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for
+   * [NotebookService.UpgradeNotebookRuntime][google.cloud.aiplatform.v1beta1.NotebookService.UpgradeNotebookRuntime].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeResponse) + com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_UpgradeNotebookRuntimeResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_UpgradeNotebookRuntimeResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeResponse.class, + com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeResponse.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.NotebookServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_UpgradeNotebookRuntimeResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeResponse + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeResponse build() { + com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeResponse buildPartial() { + com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeResponse result = + new com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeResponse(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeResponse) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeResponse other) { + if (other + == com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeResponse + .getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeResponse) + private static final com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeResponse(); + } + + public static com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpgradeNotebookRuntimeResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/UpgradeNotebookRuntimeResponseOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/UpgradeNotebookRuntimeResponseOrBuilder.java new file mode 100644 index 000000000000..24dc71765362 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/UpgradeNotebookRuntimeResponseOrBuilder.java @@ -0,0 +1,25 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/notebook_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +public interface UpgradeNotebookRuntimeResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeResponse) + com.google.protobuf.MessageOrBuilder {} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/UploadRagFileConfig.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/UploadRagFileConfig.java new file mode 100644 index 000000000000..1af000916da4 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/UploadRagFileConfig.java @@ -0,0 +1,746 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/vertex_rag_data.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Config for uploading RagFile.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.UploadRagFileConfig} + */ +public final class UploadRagFileConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.UploadRagFileConfig) + UploadRagFileConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use UploadRagFileConfig.newBuilder() to construct. + private UploadRagFileConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UploadRagFileConfig() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UploadRagFileConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataProto + .internal_static_google_cloud_aiplatform_v1beta1_UploadRagFileConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataProto + .internal_static_google_cloud_aiplatform_v1beta1_UploadRagFileConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.UploadRagFileConfig.class, + com.google.cloud.aiplatform.v1beta1.UploadRagFileConfig.Builder.class); + } + + private int bitField0_; + public static final int RAG_FILE_CHUNKING_CONFIG_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig ragFileChunkingConfig_; + /** + * + * + *
+   * Specifies the size and overlap of chunks after uploading RagFile.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.RagFileChunkingConfig rag_file_chunking_config = 1; + * + * + * @return Whether the ragFileChunkingConfig field is set. + */ + @java.lang.Override + public boolean hasRagFileChunkingConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Specifies the size and overlap of chunks after uploading RagFile.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.RagFileChunkingConfig rag_file_chunking_config = 1; + * + * + * @return The ragFileChunkingConfig. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig getRagFileChunkingConfig() { + return ragFileChunkingConfig_ == null + ? com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig.getDefaultInstance() + : ragFileChunkingConfig_; + } + /** + * + * + *
+   * Specifies the size and overlap of chunks after uploading RagFile.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.RagFileChunkingConfig rag_file_chunking_config = 1; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfigOrBuilder + getRagFileChunkingConfigOrBuilder() { + return ragFileChunkingConfig_ == null + ? com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig.getDefaultInstance() + : ragFileChunkingConfig_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getRagFileChunkingConfig()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, getRagFileChunkingConfig()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.UploadRagFileConfig)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.UploadRagFileConfig other = + (com.google.cloud.aiplatform.v1beta1.UploadRagFileConfig) obj; + + if (hasRagFileChunkingConfig() != other.hasRagFileChunkingConfig()) return false; + if (hasRagFileChunkingConfig()) { + if (!getRagFileChunkingConfig().equals(other.getRagFileChunkingConfig())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasRagFileChunkingConfig()) { + hash = (37 * hash) + RAG_FILE_CHUNKING_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getRagFileChunkingConfig().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.UploadRagFileConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.UploadRagFileConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.UploadRagFileConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.UploadRagFileConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.UploadRagFileConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.UploadRagFileConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.UploadRagFileConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.UploadRagFileConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.UploadRagFileConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.UploadRagFileConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.UploadRagFileConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.UploadRagFileConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.UploadRagFileConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Config for uploading RagFile.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.UploadRagFileConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.UploadRagFileConfig) + com.google.cloud.aiplatform.v1beta1.UploadRagFileConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataProto + .internal_static_google_cloud_aiplatform_v1beta1_UploadRagFileConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataProto + .internal_static_google_cloud_aiplatform_v1beta1_UploadRagFileConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.UploadRagFileConfig.class, + com.google.cloud.aiplatform.v1beta1.UploadRagFileConfig.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.UploadRagFileConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getRagFileChunkingConfigFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + ragFileChunkingConfig_ = null; + if (ragFileChunkingConfigBuilder_ != null) { + ragFileChunkingConfigBuilder_.dispose(); + ragFileChunkingConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataProto + .internal_static_google_cloud_aiplatform_v1beta1_UploadRagFileConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.UploadRagFileConfig getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.UploadRagFileConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.UploadRagFileConfig build() { + com.google.cloud.aiplatform.v1beta1.UploadRagFileConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.UploadRagFileConfig buildPartial() { + com.google.cloud.aiplatform.v1beta1.UploadRagFileConfig result = + new com.google.cloud.aiplatform.v1beta1.UploadRagFileConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1beta1.UploadRagFileConfig result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.ragFileChunkingConfig_ = + ragFileChunkingConfigBuilder_ == null + ? ragFileChunkingConfig_ + : ragFileChunkingConfigBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1beta1.UploadRagFileConfig) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.UploadRagFileConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.UploadRagFileConfig other) { + if (other == com.google.cloud.aiplatform.v1beta1.UploadRagFileConfig.getDefaultInstance()) + return this; + if (other.hasRagFileChunkingConfig()) { + mergeRagFileChunkingConfig(other.getRagFileChunkingConfig()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + getRagFileChunkingConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig ragFileChunkingConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig, + com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig.Builder, + com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfigOrBuilder> + ragFileChunkingConfigBuilder_; + /** + * + * + *
+     * Specifies the size and overlap of chunks after uploading RagFile.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.RagFileChunkingConfig rag_file_chunking_config = 1; + * + * + * @return Whether the ragFileChunkingConfig field is set. + */ + public boolean hasRagFileChunkingConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Specifies the size and overlap of chunks after uploading RagFile.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.RagFileChunkingConfig rag_file_chunking_config = 1; + * + * + * @return The ragFileChunkingConfig. + */ + public com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig getRagFileChunkingConfig() { + if (ragFileChunkingConfigBuilder_ == null) { + return ragFileChunkingConfig_ == null + ? com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig.getDefaultInstance() + : ragFileChunkingConfig_; + } else { + return ragFileChunkingConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Specifies the size and overlap of chunks after uploading RagFile.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.RagFileChunkingConfig rag_file_chunking_config = 1; + * + */ + public Builder setRagFileChunkingConfig( + com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig value) { + if (ragFileChunkingConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ragFileChunkingConfig_ = value; + } else { + ragFileChunkingConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies the size and overlap of chunks after uploading RagFile.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.RagFileChunkingConfig rag_file_chunking_config = 1; + * + */ + public Builder setRagFileChunkingConfig( + com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig.Builder builderForValue) { + if (ragFileChunkingConfigBuilder_ == null) { + ragFileChunkingConfig_ = builderForValue.build(); + } else { + ragFileChunkingConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies the size and overlap of chunks after uploading RagFile.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.RagFileChunkingConfig rag_file_chunking_config = 1; + * + */ + public Builder mergeRagFileChunkingConfig( + com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig value) { + if (ragFileChunkingConfigBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && ragFileChunkingConfig_ != null + && ragFileChunkingConfig_ + != com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig.getDefaultInstance()) { + getRagFileChunkingConfigBuilder().mergeFrom(value); + } else { + ragFileChunkingConfig_ = value; + } + } else { + ragFileChunkingConfigBuilder_.mergeFrom(value); + } + if (ragFileChunkingConfig_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Specifies the size and overlap of chunks after uploading RagFile.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.RagFileChunkingConfig rag_file_chunking_config = 1; + * + */ + public Builder clearRagFileChunkingConfig() { + bitField0_ = (bitField0_ & ~0x00000001); + ragFileChunkingConfig_ = null; + if (ragFileChunkingConfigBuilder_ != null) { + ragFileChunkingConfigBuilder_.dispose(); + ragFileChunkingConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies the size and overlap of chunks after uploading RagFile.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.RagFileChunkingConfig rag_file_chunking_config = 1; + * + */ + public com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig.Builder + getRagFileChunkingConfigBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getRagFileChunkingConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Specifies the size and overlap of chunks after uploading RagFile.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.RagFileChunkingConfig rag_file_chunking_config = 1; + * + */ + public com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfigOrBuilder + getRagFileChunkingConfigOrBuilder() { + if (ragFileChunkingConfigBuilder_ != null) { + return ragFileChunkingConfigBuilder_.getMessageOrBuilder(); + } else { + return ragFileChunkingConfig_ == null + ? com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig.getDefaultInstance() + : ragFileChunkingConfig_; + } + } + /** + * + * + *
+     * Specifies the size and overlap of chunks after uploading RagFile.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.RagFileChunkingConfig rag_file_chunking_config = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig, + com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig.Builder, + com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfigOrBuilder> + getRagFileChunkingConfigFieldBuilder() { + if (ragFileChunkingConfigBuilder_ == null) { + ragFileChunkingConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig, + com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig.Builder, + com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfigOrBuilder>( + getRagFileChunkingConfig(), getParentForChildren(), isClean()); + ragFileChunkingConfig_ = null; + } + return ragFileChunkingConfigBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.UploadRagFileConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.UploadRagFileConfig) + private static final com.google.cloud.aiplatform.v1beta1.UploadRagFileConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.UploadRagFileConfig(); + } + + public static com.google.cloud.aiplatform.v1beta1.UploadRagFileConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UploadRagFileConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.UploadRagFileConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/UploadRagFileConfigOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/UploadRagFileConfigOrBuilder.java new file mode 100644 index 000000000000..3032ebeaf9b1 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/UploadRagFileConfigOrBuilder.java @@ -0,0 +1,65 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/vertex_rag_data.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +public interface UploadRagFileConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.UploadRagFileConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Specifies the size and overlap of chunks after uploading RagFile.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.RagFileChunkingConfig rag_file_chunking_config = 1; + * + * + * @return Whether the ragFileChunkingConfig field is set. + */ + boolean hasRagFileChunkingConfig(); + /** + * + * + *
+   * Specifies the size and overlap of chunks after uploading RagFile.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.RagFileChunkingConfig rag_file_chunking_config = 1; + * + * + * @return The ragFileChunkingConfig. + */ + com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfig getRagFileChunkingConfig(); + /** + * + * + *
+   * Specifies the size and overlap of chunks after uploading RagFile.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.RagFileChunkingConfig rag_file_chunking_config = 1; + * + */ + com.google.cloud.aiplatform.v1beta1.RagFileChunkingConfigOrBuilder + getRagFileChunkingConfigOrBuilder(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/UploadRagFileRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/UploadRagFileRequest.java new file mode 100644 index 000000000000..9a968b663255 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/UploadRagFileRequest.java @@ -0,0 +1,1274 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/vertex_rag_data_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Request message for
+ * [VertexRagDataService.UploadRagFile][google.cloud.aiplatform.v1beta1.VertexRagDataService.UploadRagFile].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.UploadRagFileRequest} + */ +public final class UploadRagFileRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.UploadRagFileRequest) + UploadRagFileRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UploadRagFileRequest.newBuilder() to construct. + private UploadRagFileRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UploadRagFileRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UploadRagFileRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_UploadRagFileRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_UploadRagFileRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.UploadRagFileRequest.class, + com.google.cloud.aiplatform.v1beta1.UploadRagFileRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The name of the RagCorpus resource into which to upload the file.
+   * Format:
+   * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the RagCorpus resource into which to upload the file.
+   * Format:
+   * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RAG_FILE_FIELD_NUMBER = 2; + private com.google.cloud.aiplatform.v1beta1.RagFile ragFile_; + /** + * + * + *
+   * Required. The RagFile to upload.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.RagFile rag_file = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the ragFile field is set. + */ + @java.lang.Override + public boolean hasRagFile() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. The RagFile to upload.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.RagFile rag_file = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The ragFile. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.RagFile getRagFile() { + return ragFile_ == null + ? com.google.cloud.aiplatform.v1beta1.RagFile.getDefaultInstance() + : ragFile_; + } + /** + * + * + *
+   * Required. The RagFile to upload.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.RagFile rag_file = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.RagFileOrBuilder getRagFileOrBuilder() { + return ragFile_ == null + ? com.google.cloud.aiplatform.v1beta1.RagFile.getDefaultInstance() + : ragFile_; + } + + public static final int UPLOAD_RAG_FILE_CONFIG_FIELD_NUMBER = 5; + private com.google.cloud.aiplatform.v1beta1.UploadRagFileConfig uploadRagFileConfig_; + /** + * + * + *
+   * Required. The config for the RagFiles to be uploaded into the RagCorpus.
+   * [VertexRagDataService.UploadRagFile][google.cloud.aiplatform.v1beta1.VertexRagDataService.UploadRagFile].
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.UploadRagFileConfig upload_rag_file_config = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the uploadRagFileConfig field is set. + */ + @java.lang.Override + public boolean hasUploadRagFileConfig() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Required. The config for the RagFiles to be uploaded into the RagCorpus.
+   * [VertexRagDataService.UploadRagFile][google.cloud.aiplatform.v1beta1.VertexRagDataService.UploadRagFile].
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.UploadRagFileConfig upload_rag_file_config = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The uploadRagFileConfig. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.UploadRagFileConfig getUploadRagFileConfig() { + return uploadRagFileConfig_ == null + ? com.google.cloud.aiplatform.v1beta1.UploadRagFileConfig.getDefaultInstance() + : uploadRagFileConfig_; + } + /** + * + * + *
+   * Required. The config for the RagFiles to be uploaded into the RagCorpus.
+   * [VertexRagDataService.UploadRagFile][google.cloud.aiplatform.v1beta1.VertexRagDataService.UploadRagFile].
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.UploadRagFileConfig upload_rag_file_config = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.UploadRagFileConfigOrBuilder + getUploadRagFileConfigOrBuilder() { + return uploadRagFileConfig_ == null + ? com.google.cloud.aiplatform.v1beta1.UploadRagFileConfig.getDefaultInstance() + : uploadRagFileConfig_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getRagFile()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(5, getUploadRagFileConfig()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getRagFile()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getUploadRagFileConfig()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.UploadRagFileRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.UploadRagFileRequest other = + (com.google.cloud.aiplatform.v1beta1.UploadRagFileRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasRagFile() != other.hasRagFile()) return false; + if (hasRagFile()) { + if (!getRagFile().equals(other.getRagFile())) return false; + } + if (hasUploadRagFileConfig() != other.hasUploadRagFileConfig()) return false; + if (hasUploadRagFileConfig()) { + if (!getUploadRagFileConfig().equals(other.getUploadRagFileConfig())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasRagFile()) { + hash = (37 * hash) + RAG_FILE_FIELD_NUMBER; + hash = (53 * hash) + getRagFile().hashCode(); + } + if (hasUploadRagFileConfig()) { + hash = (37 * hash) + UPLOAD_RAG_FILE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getUploadRagFileConfig().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.UploadRagFileRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.UploadRagFileRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.UploadRagFileRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.UploadRagFileRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.UploadRagFileRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.UploadRagFileRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.UploadRagFileRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.UploadRagFileRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.UploadRagFileRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.UploadRagFileRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.UploadRagFileRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.UploadRagFileRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.UploadRagFileRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for
+   * [VertexRagDataService.UploadRagFile][google.cloud.aiplatform.v1beta1.VertexRagDataService.UploadRagFile].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.UploadRagFileRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.UploadRagFileRequest) + com.google.cloud.aiplatform.v1beta1.UploadRagFileRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_UploadRagFileRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_UploadRagFileRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.UploadRagFileRequest.class, + com.google.cloud.aiplatform.v1beta1.UploadRagFileRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.UploadRagFileRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getRagFileFieldBuilder(); + getUploadRagFileConfigFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + ragFile_ = null; + if (ragFileBuilder_ != null) { + ragFileBuilder_.dispose(); + ragFileBuilder_ = null; + } + uploadRagFileConfig_ = null; + if (uploadRagFileConfigBuilder_ != null) { + uploadRagFileConfigBuilder_.dispose(); + uploadRagFileConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_UploadRagFileRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.UploadRagFileRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.UploadRagFileRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.UploadRagFileRequest build() { + com.google.cloud.aiplatform.v1beta1.UploadRagFileRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.UploadRagFileRequest buildPartial() { + com.google.cloud.aiplatform.v1beta1.UploadRagFileRequest result = + new com.google.cloud.aiplatform.v1beta1.UploadRagFileRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1beta1.UploadRagFileRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.ragFile_ = ragFileBuilder_ == null ? ragFile_ : ragFileBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.uploadRagFileConfig_ = + uploadRagFileConfigBuilder_ == null + ? uploadRagFileConfig_ + : uploadRagFileConfigBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1beta1.UploadRagFileRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.UploadRagFileRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.UploadRagFileRequest other) { + if (other == com.google.cloud.aiplatform.v1beta1.UploadRagFileRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasRagFile()) { + mergeRagFile(other.getRagFile()); + } + if (other.hasUploadRagFileConfig()) { + mergeUploadRagFileConfig(other.getUploadRagFileConfig()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getRagFileFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 42: + { + input.readMessage( + getUploadRagFileConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The name of the RagCorpus resource into which to upload the file.
+     * Format:
+     * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the RagCorpus resource into which to upload the file.
+     * Format:
+     * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the RagCorpus resource into which to upload the file.
+     * Format:
+     * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the RagCorpus resource into which to upload the file.
+     * Format:
+     * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the RagCorpus resource into which to upload the file.
+     * Format:
+     * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.cloud.aiplatform.v1beta1.RagFile ragFile_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.RagFile, + com.google.cloud.aiplatform.v1beta1.RagFile.Builder, + com.google.cloud.aiplatform.v1beta1.RagFileOrBuilder> + ragFileBuilder_; + /** + * + * + *
+     * Required. The RagFile to upload.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.RagFile rag_file = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the ragFile field is set. + */ + public boolean hasRagFile() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. The RagFile to upload.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.RagFile rag_file = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The ragFile. + */ + public com.google.cloud.aiplatform.v1beta1.RagFile getRagFile() { + if (ragFileBuilder_ == null) { + return ragFile_ == null + ? com.google.cloud.aiplatform.v1beta1.RagFile.getDefaultInstance() + : ragFile_; + } else { + return ragFileBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The RagFile to upload.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.RagFile rag_file = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setRagFile(com.google.cloud.aiplatform.v1beta1.RagFile value) { + if (ragFileBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ragFile_ = value; + } else { + ragFileBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The RagFile to upload.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.RagFile rag_file = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setRagFile(com.google.cloud.aiplatform.v1beta1.RagFile.Builder builderForValue) { + if (ragFileBuilder_ == null) { + ragFile_ = builderForValue.build(); + } else { + ragFileBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The RagFile to upload.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.RagFile rag_file = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeRagFile(com.google.cloud.aiplatform.v1beta1.RagFile value) { + if (ragFileBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && ragFile_ != null + && ragFile_ != com.google.cloud.aiplatform.v1beta1.RagFile.getDefaultInstance()) { + getRagFileBuilder().mergeFrom(value); + } else { + ragFile_ = value; + } + } else { + ragFileBuilder_.mergeFrom(value); + } + if (ragFile_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. The RagFile to upload.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.RagFile rag_file = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearRagFile() { + bitField0_ = (bitField0_ & ~0x00000002); + ragFile_ = null; + if (ragFileBuilder_ != null) { + ragFileBuilder_.dispose(); + ragFileBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The RagFile to upload.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.RagFile rag_file = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1beta1.RagFile.Builder getRagFileBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getRagFileFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The RagFile to upload.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.RagFile rag_file = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1beta1.RagFileOrBuilder getRagFileOrBuilder() { + if (ragFileBuilder_ != null) { + return ragFileBuilder_.getMessageOrBuilder(); + } else { + return ragFile_ == null + ? com.google.cloud.aiplatform.v1beta1.RagFile.getDefaultInstance() + : ragFile_; + } + } + /** + * + * + *
+     * Required. The RagFile to upload.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.RagFile rag_file = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.RagFile, + com.google.cloud.aiplatform.v1beta1.RagFile.Builder, + com.google.cloud.aiplatform.v1beta1.RagFileOrBuilder> + getRagFileFieldBuilder() { + if (ragFileBuilder_ == null) { + ragFileBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.RagFile, + com.google.cloud.aiplatform.v1beta1.RagFile.Builder, + com.google.cloud.aiplatform.v1beta1.RagFileOrBuilder>( + getRagFile(), getParentForChildren(), isClean()); + ragFile_ = null; + } + return ragFileBuilder_; + } + + private com.google.cloud.aiplatform.v1beta1.UploadRagFileConfig uploadRagFileConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.UploadRagFileConfig, + com.google.cloud.aiplatform.v1beta1.UploadRagFileConfig.Builder, + com.google.cloud.aiplatform.v1beta1.UploadRagFileConfigOrBuilder> + uploadRagFileConfigBuilder_; + /** + * + * + *
+     * Required. The config for the RagFiles to be uploaded into the RagCorpus.
+     * [VertexRagDataService.UploadRagFile][google.cloud.aiplatform.v1beta1.VertexRagDataService.UploadRagFile].
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.UploadRagFileConfig upload_rag_file_config = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the uploadRagFileConfig field is set. + */ + public boolean hasUploadRagFileConfig() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Required. The config for the RagFiles to be uploaded into the RagCorpus.
+     * [VertexRagDataService.UploadRagFile][google.cloud.aiplatform.v1beta1.VertexRagDataService.UploadRagFile].
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.UploadRagFileConfig upload_rag_file_config = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The uploadRagFileConfig. + */ + public com.google.cloud.aiplatform.v1beta1.UploadRagFileConfig getUploadRagFileConfig() { + if (uploadRagFileConfigBuilder_ == null) { + return uploadRagFileConfig_ == null + ? com.google.cloud.aiplatform.v1beta1.UploadRagFileConfig.getDefaultInstance() + : uploadRagFileConfig_; + } else { + return uploadRagFileConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The config for the RagFiles to be uploaded into the RagCorpus.
+     * [VertexRagDataService.UploadRagFile][google.cloud.aiplatform.v1beta1.VertexRagDataService.UploadRagFile].
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.UploadRagFileConfig upload_rag_file_config = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUploadRagFileConfig( + com.google.cloud.aiplatform.v1beta1.UploadRagFileConfig value) { + if (uploadRagFileConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + uploadRagFileConfig_ = value; + } else { + uploadRagFileConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The config for the RagFiles to be uploaded into the RagCorpus.
+     * [VertexRagDataService.UploadRagFile][google.cloud.aiplatform.v1beta1.VertexRagDataService.UploadRagFile].
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.UploadRagFileConfig upload_rag_file_config = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUploadRagFileConfig( + com.google.cloud.aiplatform.v1beta1.UploadRagFileConfig.Builder builderForValue) { + if (uploadRagFileConfigBuilder_ == null) { + uploadRagFileConfig_ = builderForValue.build(); + } else { + uploadRagFileConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The config for the RagFiles to be uploaded into the RagCorpus.
+     * [VertexRagDataService.UploadRagFile][google.cloud.aiplatform.v1beta1.VertexRagDataService.UploadRagFile].
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.UploadRagFileConfig upload_rag_file_config = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeUploadRagFileConfig( + com.google.cloud.aiplatform.v1beta1.UploadRagFileConfig value) { + if (uploadRagFileConfigBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && uploadRagFileConfig_ != null + && uploadRagFileConfig_ + != com.google.cloud.aiplatform.v1beta1.UploadRagFileConfig.getDefaultInstance()) { + getUploadRagFileConfigBuilder().mergeFrom(value); + } else { + uploadRagFileConfig_ = value; + } + } else { + uploadRagFileConfigBuilder_.mergeFrom(value); + } + if (uploadRagFileConfig_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. The config for the RagFiles to be uploaded into the RagCorpus.
+     * [VertexRagDataService.UploadRagFile][google.cloud.aiplatform.v1beta1.VertexRagDataService.UploadRagFile].
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.UploadRagFileConfig upload_rag_file_config = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUploadRagFileConfig() { + bitField0_ = (bitField0_ & ~0x00000004); + uploadRagFileConfig_ = null; + if (uploadRagFileConfigBuilder_ != null) { + uploadRagFileConfigBuilder_.dispose(); + uploadRagFileConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The config for the RagFiles to be uploaded into the RagCorpus.
+     * [VertexRagDataService.UploadRagFile][google.cloud.aiplatform.v1beta1.VertexRagDataService.UploadRagFile].
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.UploadRagFileConfig upload_rag_file_config = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1beta1.UploadRagFileConfig.Builder + getUploadRagFileConfigBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getUploadRagFileConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The config for the RagFiles to be uploaded into the RagCorpus.
+     * [VertexRagDataService.UploadRagFile][google.cloud.aiplatform.v1beta1.VertexRagDataService.UploadRagFile].
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.UploadRagFileConfig upload_rag_file_config = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1beta1.UploadRagFileConfigOrBuilder + getUploadRagFileConfigOrBuilder() { + if (uploadRagFileConfigBuilder_ != null) { + return uploadRagFileConfigBuilder_.getMessageOrBuilder(); + } else { + return uploadRagFileConfig_ == null + ? com.google.cloud.aiplatform.v1beta1.UploadRagFileConfig.getDefaultInstance() + : uploadRagFileConfig_; + } + } + /** + * + * + *
+     * Required. The config for the RagFiles to be uploaded into the RagCorpus.
+     * [VertexRagDataService.UploadRagFile][google.cloud.aiplatform.v1beta1.VertexRagDataService.UploadRagFile].
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.UploadRagFileConfig upload_rag_file_config = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.UploadRagFileConfig, + com.google.cloud.aiplatform.v1beta1.UploadRagFileConfig.Builder, + com.google.cloud.aiplatform.v1beta1.UploadRagFileConfigOrBuilder> + getUploadRagFileConfigFieldBuilder() { + if (uploadRagFileConfigBuilder_ == null) { + uploadRagFileConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.UploadRagFileConfig, + com.google.cloud.aiplatform.v1beta1.UploadRagFileConfig.Builder, + com.google.cloud.aiplatform.v1beta1.UploadRagFileConfigOrBuilder>( + getUploadRagFileConfig(), getParentForChildren(), isClean()); + uploadRagFileConfig_ = null; + } + return uploadRagFileConfigBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.UploadRagFileRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.UploadRagFileRequest) + private static final com.google.cloud.aiplatform.v1beta1.UploadRagFileRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.UploadRagFileRequest(); + } + + public static com.google.cloud.aiplatform.v1beta1.UploadRagFileRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UploadRagFileRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.UploadRagFileRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/UploadRagFileRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/UploadRagFileRequestOrBuilder.java new file mode 100644 index 000000000000..41d3540be55c --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/UploadRagFileRequestOrBuilder.java @@ -0,0 +1,145 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/vertex_rag_data_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +public interface UploadRagFileRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.UploadRagFileRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the RagCorpus resource into which to upload the file.
+   * Format:
+   * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The name of the RagCorpus resource into which to upload the file.
+   * Format:
+   * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The RagFile to upload.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.RagFile rag_file = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the ragFile field is set. + */ + boolean hasRagFile(); + /** + * + * + *
+   * Required. The RagFile to upload.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.RagFile rag_file = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The ragFile. + */ + com.google.cloud.aiplatform.v1beta1.RagFile getRagFile(); + /** + * + * + *
+   * Required. The RagFile to upload.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.RagFile rag_file = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1beta1.RagFileOrBuilder getRagFileOrBuilder(); + + /** + * + * + *
+   * Required. The config for the RagFiles to be uploaded into the RagCorpus.
+   * [VertexRagDataService.UploadRagFile][google.cloud.aiplatform.v1beta1.VertexRagDataService.UploadRagFile].
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.UploadRagFileConfig upload_rag_file_config = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the uploadRagFileConfig field is set. + */ + boolean hasUploadRagFileConfig(); + /** + * + * + *
+   * Required. The config for the RagFiles to be uploaded into the RagCorpus.
+   * [VertexRagDataService.UploadRagFile][google.cloud.aiplatform.v1beta1.VertexRagDataService.UploadRagFile].
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.UploadRagFileConfig upload_rag_file_config = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The uploadRagFileConfig. + */ + com.google.cloud.aiplatform.v1beta1.UploadRagFileConfig getUploadRagFileConfig(); + /** + * + * + *
+   * Required. The config for the RagFiles to be uploaded into the RagCorpus.
+   * [VertexRagDataService.UploadRagFile][google.cloud.aiplatform.v1beta1.VertexRagDataService.UploadRagFile].
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.UploadRagFileConfig upload_rag_file_config = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1beta1.UploadRagFileConfigOrBuilder + getUploadRagFileConfigOrBuilder(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/UploadRagFileResponse.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/UploadRagFileResponse.java new file mode 100644 index 000000000000..a0326509e194 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/UploadRagFileResponse.java @@ -0,0 +1,1106 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/vertex_rag_data_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Response message for
+ * [VertexRagDataService.UploadRagFile][google.cloud.aiplatform.v1beta1.VertexRagDataService.UploadRagFile].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.UploadRagFileResponse} + */ +public final class UploadRagFileResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.UploadRagFileResponse) + UploadRagFileResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use UploadRagFileResponse.newBuilder() to construct. + private UploadRagFileResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UploadRagFileResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UploadRagFileResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_UploadRagFileResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_UploadRagFileResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.UploadRagFileResponse.class, + com.google.cloud.aiplatform.v1beta1.UploadRagFileResponse.Builder.class); + } + + private int resultCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object result_; + + public enum ResultCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + RAG_FILE(1), + ERROR(4), + RESULT_NOT_SET(0); + private final int value; + + private ResultCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ResultCase valueOf(int value) { + return forNumber(value); + } + + public static ResultCase forNumber(int value) { + switch (value) { + case 1: + return RAG_FILE; + case 4: + return ERROR; + case 0: + return RESULT_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ResultCase getResultCase() { + return ResultCase.forNumber(resultCase_); + } + + public static final int RAG_FILE_FIELD_NUMBER = 1; + /** + * + * + *
+   * The RagFile that had been uploaded into the RagCorpus.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.RagFile rag_file = 1; + * + * @return Whether the ragFile field is set. + */ + @java.lang.Override + public boolean hasRagFile() { + return resultCase_ == 1; + } + /** + * + * + *
+   * The RagFile that had been uploaded into the RagCorpus.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.RagFile rag_file = 1; + * + * @return The ragFile. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.RagFile getRagFile() { + if (resultCase_ == 1) { + return (com.google.cloud.aiplatform.v1beta1.RagFile) result_; + } + return com.google.cloud.aiplatform.v1beta1.RagFile.getDefaultInstance(); + } + /** + * + * + *
+   * The RagFile that had been uploaded into the RagCorpus.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.RagFile rag_file = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.RagFileOrBuilder getRagFileOrBuilder() { + if (resultCase_ == 1) { + return (com.google.cloud.aiplatform.v1beta1.RagFile) result_; + } + return com.google.cloud.aiplatform.v1beta1.RagFile.getDefaultInstance(); + } + + public static final int ERROR_FIELD_NUMBER = 4; + /** + * + * + *
+   * The error that occurred while processing the RagFile.
+   * 
+ * + * .google.rpc.Status error = 4; + * + * @return Whether the error field is set. + */ + @java.lang.Override + public boolean hasError() { + return resultCase_ == 4; + } + /** + * + * + *
+   * The error that occurred while processing the RagFile.
+   * 
+ * + * .google.rpc.Status error = 4; + * + * @return The error. + */ + @java.lang.Override + public com.google.rpc.Status getError() { + if (resultCase_ == 4) { + return (com.google.rpc.Status) result_; + } + return com.google.rpc.Status.getDefaultInstance(); + } + /** + * + * + *
+   * The error that occurred while processing the RagFile.
+   * 
+ * + * .google.rpc.Status error = 4; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + if (resultCase_ == 4) { + return (com.google.rpc.Status) result_; + } + return com.google.rpc.Status.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (resultCase_ == 1) { + output.writeMessage(1, (com.google.cloud.aiplatform.v1beta1.RagFile) result_); + } + if (resultCase_ == 4) { + output.writeMessage(4, (com.google.rpc.Status) result_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (resultCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.cloud.aiplatform.v1beta1.RagFile) result_); + } + if (resultCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, (com.google.rpc.Status) result_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.UploadRagFileResponse)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.UploadRagFileResponse other = + (com.google.cloud.aiplatform.v1beta1.UploadRagFileResponse) obj; + + if (!getResultCase().equals(other.getResultCase())) return false; + switch (resultCase_) { + case 1: + if (!getRagFile().equals(other.getRagFile())) return false; + break; + case 4: + if (!getError().equals(other.getError())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (resultCase_) { + case 1: + hash = (37 * hash) + RAG_FILE_FIELD_NUMBER; + hash = (53 * hash) + getRagFile().hashCode(); + break; + case 4: + hash = (37 * hash) + ERROR_FIELD_NUMBER; + hash = (53 * hash) + getError().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.UploadRagFileResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.UploadRagFileResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.UploadRagFileResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.UploadRagFileResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.UploadRagFileResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.UploadRagFileResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.UploadRagFileResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.UploadRagFileResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.UploadRagFileResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.UploadRagFileResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.UploadRagFileResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.UploadRagFileResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.UploadRagFileResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for
+   * [VertexRagDataService.UploadRagFile][google.cloud.aiplatform.v1beta1.VertexRagDataService.UploadRagFile].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.UploadRagFileResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.UploadRagFileResponse) + com.google.cloud.aiplatform.v1beta1.UploadRagFileResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_UploadRagFileResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_UploadRagFileResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.UploadRagFileResponse.class, + com.google.cloud.aiplatform.v1beta1.UploadRagFileResponse.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.UploadRagFileResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (ragFileBuilder_ != null) { + ragFileBuilder_.clear(); + } + if (errorBuilder_ != null) { + errorBuilder_.clear(); + } + resultCase_ = 0; + result_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_UploadRagFileResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.UploadRagFileResponse getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.UploadRagFileResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.UploadRagFileResponse build() { + com.google.cloud.aiplatform.v1beta1.UploadRagFileResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.UploadRagFileResponse buildPartial() { + com.google.cloud.aiplatform.v1beta1.UploadRagFileResponse result = + new com.google.cloud.aiplatform.v1beta1.UploadRagFileResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1beta1.UploadRagFileResponse result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs( + com.google.cloud.aiplatform.v1beta1.UploadRagFileResponse result) { + result.resultCase_ = resultCase_; + result.result_ = this.result_; + if (resultCase_ == 1 && ragFileBuilder_ != null) { + result.result_ = ragFileBuilder_.build(); + } + if (resultCase_ == 4 && errorBuilder_ != null) { + result.result_ = errorBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1beta1.UploadRagFileResponse) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.UploadRagFileResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.UploadRagFileResponse other) { + if (other == com.google.cloud.aiplatform.v1beta1.UploadRagFileResponse.getDefaultInstance()) + return this; + switch (other.getResultCase()) { + case RAG_FILE: + { + mergeRagFile(other.getRagFile()); + break; + } + case ERROR: + { + mergeError(other.getError()); + break; + } + case RESULT_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getRagFileFieldBuilder().getBuilder(), extensionRegistry); + resultCase_ = 1; + break; + } // case 10 + case 34: + { + input.readMessage(getErrorFieldBuilder().getBuilder(), extensionRegistry); + resultCase_ = 4; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int resultCase_ = 0; + private java.lang.Object result_; + + public ResultCase getResultCase() { + return ResultCase.forNumber(resultCase_); + } + + public Builder clearResult() { + resultCase_ = 0; + result_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.RagFile, + com.google.cloud.aiplatform.v1beta1.RagFile.Builder, + com.google.cloud.aiplatform.v1beta1.RagFileOrBuilder> + ragFileBuilder_; + /** + * + * + *
+     * The RagFile that had been uploaded into the RagCorpus.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.RagFile rag_file = 1; + * + * @return Whether the ragFile field is set. + */ + @java.lang.Override + public boolean hasRagFile() { + return resultCase_ == 1; + } + /** + * + * + *
+     * The RagFile that had been uploaded into the RagCorpus.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.RagFile rag_file = 1; + * + * @return The ragFile. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.RagFile getRagFile() { + if (ragFileBuilder_ == null) { + if (resultCase_ == 1) { + return (com.google.cloud.aiplatform.v1beta1.RagFile) result_; + } + return com.google.cloud.aiplatform.v1beta1.RagFile.getDefaultInstance(); + } else { + if (resultCase_ == 1) { + return ragFileBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1beta1.RagFile.getDefaultInstance(); + } + } + /** + * + * + *
+     * The RagFile that had been uploaded into the RagCorpus.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.RagFile rag_file = 1; + */ + public Builder setRagFile(com.google.cloud.aiplatform.v1beta1.RagFile value) { + if (ragFileBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + result_ = value; + onChanged(); + } else { + ragFileBuilder_.setMessage(value); + } + resultCase_ = 1; + return this; + } + /** + * + * + *
+     * The RagFile that had been uploaded into the RagCorpus.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.RagFile rag_file = 1; + */ + public Builder setRagFile(com.google.cloud.aiplatform.v1beta1.RagFile.Builder builderForValue) { + if (ragFileBuilder_ == null) { + result_ = builderForValue.build(); + onChanged(); + } else { + ragFileBuilder_.setMessage(builderForValue.build()); + } + resultCase_ = 1; + return this; + } + /** + * + * + *
+     * The RagFile that had been uploaded into the RagCorpus.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.RagFile rag_file = 1; + */ + public Builder mergeRagFile(com.google.cloud.aiplatform.v1beta1.RagFile value) { + if (ragFileBuilder_ == null) { + if (resultCase_ == 1 + && result_ != com.google.cloud.aiplatform.v1beta1.RagFile.getDefaultInstance()) { + result_ = + com.google.cloud.aiplatform.v1beta1.RagFile.newBuilder( + (com.google.cloud.aiplatform.v1beta1.RagFile) result_) + .mergeFrom(value) + .buildPartial(); + } else { + result_ = value; + } + onChanged(); + } else { + if (resultCase_ == 1) { + ragFileBuilder_.mergeFrom(value); + } else { + ragFileBuilder_.setMessage(value); + } + } + resultCase_ = 1; + return this; + } + /** + * + * + *
+     * The RagFile that had been uploaded into the RagCorpus.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.RagFile rag_file = 1; + */ + public Builder clearRagFile() { + if (ragFileBuilder_ == null) { + if (resultCase_ == 1) { + resultCase_ = 0; + result_ = null; + onChanged(); + } + } else { + if (resultCase_ == 1) { + resultCase_ = 0; + result_ = null; + } + ragFileBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The RagFile that had been uploaded into the RagCorpus.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.RagFile rag_file = 1; + */ + public com.google.cloud.aiplatform.v1beta1.RagFile.Builder getRagFileBuilder() { + return getRagFileFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The RagFile that had been uploaded into the RagCorpus.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.RagFile rag_file = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.RagFileOrBuilder getRagFileOrBuilder() { + if ((resultCase_ == 1) && (ragFileBuilder_ != null)) { + return ragFileBuilder_.getMessageOrBuilder(); + } else { + if (resultCase_ == 1) { + return (com.google.cloud.aiplatform.v1beta1.RagFile) result_; + } + return com.google.cloud.aiplatform.v1beta1.RagFile.getDefaultInstance(); + } + } + /** + * + * + *
+     * The RagFile that had been uploaded into the RagCorpus.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.RagFile rag_file = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.RagFile, + com.google.cloud.aiplatform.v1beta1.RagFile.Builder, + com.google.cloud.aiplatform.v1beta1.RagFileOrBuilder> + getRagFileFieldBuilder() { + if (ragFileBuilder_ == null) { + if (!(resultCase_ == 1)) { + result_ = com.google.cloud.aiplatform.v1beta1.RagFile.getDefaultInstance(); + } + ragFileBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.RagFile, + com.google.cloud.aiplatform.v1beta1.RagFile.Builder, + com.google.cloud.aiplatform.v1beta1.RagFileOrBuilder>( + (com.google.cloud.aiplatform.v1beta1.RagFile) result_, + getParentForChildren(), + isClean()); + result_ = null; + } + resultCase_ = 1; + onChanged(); + return ragFileBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + errorBuilder_; + /** + * + * + *
+     * The error that occurred while processing the RagFile.
+     * 
+ * + * .google.rpc.Status error = 4; + * + * @return Whether the error field is set. + */ + @java.lang.Override + public boolean hasError() { + return resultCase_ == 4; + } + /** + * + * + *
+     * The error that occurred while processing the RagFile.
+     * 
+ * + * .google.rpc.Status error = 4; + * + * @return The error. + */ + @java.lang.Override + public com.google.rpc.Status getError() { + if (errorBuilder_ == null) { + if (resultCase_ == 4) { + return (com.google.rpc.Status) result_; + } + return com.google.rpc.Status.getDefaultInstance(); + } else { + if (resultCase_ == 4) { + return errorBuilder_.getMessage(); + } + return com.google.rpc.Status.getDefaultInstance(); + } + } + /** + * + * + *
+     * The error that occurred while processing the RagFile.
+     * 
+ * + * .google.rpc.Status error = 4; + */ + public Builder setError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + result_ = value; + onChanged(); + } else { + errorBuilder_.setMessage(value); + } + resultCase_ = 4; + return this; + } + /** + * + * + *
+     * The error that occurred while processing the RagFile.
+     * 
+ * + * .google.rpc.Status error = 4; + */ + public Builder setError(com.google.rpc.Status.Builder builderForValue) { + if (errorBuilder_ == null) { + result_ = builderForValue.build(); + onChanged(); + } else { + errorBuilder_.setMessage(builderForValue.build()); + } + resultCase_ = 4; + return this; + } + /** + * + * + *
+     * The error that occurred while processing the RagFile.
+     * 
+ * + * .google.rpc.Status error = 4; + */ + public Builder mergeError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (resultCase_ == 4 && result_ != com.google.rpc.Status.getDefaultInstance()) { + result_ = + com.google.rpc.Status.newBuilder((com.google.rpc.Status) result_) + .mergeFrom(value) + .buildPartial(); + } else { + result_ = value; + } + onChanged(); + } else { + if (resultCase_ == 4) { + errorBuilder_.mergeFrom(value); + } else { + errorBuilder_.setMessage(value); + } + } + resultCase_ = 4; + return this; + } + /** + * + * + *
+     * The error that occurred while processing the RagFile.
+     * 
+ * + * .google.rpc.Status error = 4; + */ + public Builder clearError() { + if (errorBuilder_ == null) { + if (resultCase_ == 4) { + resultCase_ = 0; + result_ = null; + onChanged(); + } + } else { + if (resultCase_ == 4) { + resultCase_ = 0; + result_ = null; + } + errorBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The error that occurred while processing the RagFile.
+     * 
+ * + * .google.rpc.Status error = 4; + */ + public com.google.rpc.Status.Builder getErrorBuilder() { + return getErrorFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The error that occurred while processing the RagFile.
+     * 
+ * + * .google.rpc.Status error = 4; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + if ((resultCase_ == 4) && (errorBuilder_ != null)) { + return errorBuilder_.getMessageOrBuilder(); + } else { + if (resultCase_ == 4) { + return (com.google.rpc.Status) result_; + } + return com.google.rpc.Status.getDefaultInstance(); + } + } + /** + * + * + *
+     * The error that occurred while processing the RagFile.
+     * 
+ * + * .google.rpc.Status error = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getErrorFieldBuilder() { + if (errorBuilder_ == null) { + if (!(resultCase_ == 4)) { + result_ = com.google.rpc.Status.getDefaultInstance(); + } + errorBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, + com.google.rpc.Status.Builder, + com.google.rpc.StatusOrBuilder>( + (com.google.rpc.Status) result_, getParentForChildren(), isClean()); + result_ = null; + } + resultCase_ = 4; + onChanged(); + return errorBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.UploadRagFileResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.UploadRagFileResponse) + private static final com.google.cloud.aiplatform.v1beta1.UploadRagFileResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.UploadRagFileResponse(); + } + + public static com.google.cloud.aiplatform.v1beta1.UploadRagFileResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UploadRagFileResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.UploadRagFileResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/UploadRagFileResponseOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/UploadRagFileResponseOrBuilder.java new file mode 100644 index 000000000000..b544259c63f8 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/UploadRagFileResponseOrBuilder.java @@ -0,0 +1,98 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/vertex_rag_data_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +public interface UploadRagFileResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.UploadRagFileResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The RagFile that had been uploaded into the RagCorpus.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.RagFile rag_file = 1; + * + * @return Whether the ragFile field is set. + */ + boolean hasRagFile(); + /** + * + * + *
+   * The RagFile that had been uploaded into the RagCorpus.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.RagFile rag_file = 1; + * + * @return The ragFile. + */ + com.google.cloud.aiplatform.v1beta1.RagFile getRagFile(); + /** + * + * + *
+   * The RagFile that had been uploaded into the RagCorpus.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.RagFile rag_file = 1; + */ + com.google.cloud.aiplatform.v1beta1.RagFileOrBuilder getRagFileOrBuilder(); + + /** + * + * + *
+   * The error that occurred while processing the RagFile.
+   * 
+ * + * .google.rpc.Status error = 4; + * + * @return Whether the error field is set. + */ + boolean hasError(); + /** + * + * + *
+   * The error that occurred while processing the RagFile.
+   * 
+ * + * .google.rpc.Status error = 4; + * + * @return The error. + */ + com.google.rpc.Status getError(); + /** + * + * + *
+   * The error that occurred while processing the RagFile.
+   * 
+ * + * .google.rpc.Status error = 4; + */ + com.google.rpc.StatusOrBuilder getErrorOrBuilder(); + + com.google.cloud.aiplatform.v1beta1.UploadRagFileResponse.ResultCase getResultCase(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/VertexAISearch.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/VertexAISearch.java index 5026453d70f1..a59f6c3c2f5f 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/VertexAISearch.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/VertexAISearch.java @@ -73,7 +73,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
    * Required. Fully-qualified Vertex AI Search's datastore resource ID.
-   * projects/<>/locations/<>/collections/<>/dataStores/<>
+   * Format:
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`
    * 
* * string datastore = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -97,7 +98,8 @@ public java.lang.String getDatastore() { * *
    * Required. Fully-qualified Vertex AI Search's datastore resource ID.
-   * projects/<>/locations/<>/collections/<>/dataStores/<>
+   * Format:
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`
    * 
* * string datastore = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -466,7 +468,8 @@ public Builder mergeFrom( * *
      * Required. Fully-qualified Vertex AI Search's datastore resource ID.
-     * projects/<>/locations/<>/collections/<>/dataStores/<>
+     * Format:
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`
      * 
* * string datastore = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -489,7 +492,8 @@ public java.lang.String getDatastore() { * *
      * Required. Fully-qualified Vertex AI Search's datastore resource ID.
-     * projects/<>/locations/<>/collections/<>/dataStores/<>
+     * Format:
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`
      * 
* * string datastore = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -512,7 +516,8 @@ public com.google.protobuf.ByteString getDatastoreBytes() { * *
      * Required. Fully-qualified Vertex AI Search's datastore resource ID.
-     * projects/<>/locations/<>/collections/<>/dataStores/<>
+     * Format:
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`
      * 
* * string datastore = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -534,7 +539,8 @@ public Builder setDatastore(java.lang.String value) { * *
      * Required. Fully-qualified Vertex AI Search's datastore resource ID.
-     * projects/<>/locations/<>/collections/<>/dataStores/<>
+     * Format:
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`
      * 
* * string datastore = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -552,7 +558,8 @@ public Builder clearDatastore() { * *
      * Required. Fully-qualified Vertex AI Search's datastore resource ID.
-     * projects/<>/locations/<>/collections/<>/dataStores/<>
+     * Format:
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`
      * 
* * string datastore = 1 [(.google.api.field_behavior) = REQUIRED]; diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/VertexAISearchOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/VertexAISearchOrBuilder.java index 77d226c6ac8e..8321e89fe576 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/VertexAISearchOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/VertexAISearchOrBuilder.java @@ -29,7 +29,8 @@ public interface VertexAISearchOrBuilder * *
    * Required. Fully-qualified Vertex AI Search's datastore resource ID.
-   * projects/<>/locations/<>/collections/<>/dataStores/<>
+   * Format:
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`
    * 
* * string datastore = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -42,7 +43,8 @@ public interface VertexAISearchOrBuilder * *
    * Required. Fully-qualified Vertex AI Search's datastore resource ID.
-   * projects/<>/locations/<>/collections/<>/dataStores/<>
+   * Format:
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`
    * 
* * string datastore = 1 [(.google.api.field_behavior) = REQUIRED]; diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/VertexRagDataProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/VertexRagDataProto.java new file mode 100644 index 000000000000..6df6ef82cff0 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/VertexRagDataProto.java @@ -0,0 +1,185 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/vertex_rag_data.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +public final class VertexRagDataProto { + private VertexRagDataProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_RagCorpus_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_RagCorpus_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_RagFile_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_RagFile_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_RagFileChunkingConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_RagFileChunkingConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_UploadRagFileConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_UploadRagFileConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_ImportRagFilesConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_ImportRagFilesConfig_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n5google/cloud/aiplatform/v1beta1/vertex" + + "_rag_data.proto\022\037google.cloud.aiplatform" + + ".v1beta1\032\037google/api/field_behavior.prot" + + "o\032\031google/api/resource.proto\032(google/clo" + + "ud/aiplatform/v1beta1/io.proto\032\037google/p" + + "rotobuf/timestamp.proto\"\302\002\n\tRagCorpus\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\003\022\031\n\014display_name\030\002 \001(\tB\003" + + "\340A\002\022\030\n\013description\030\003 \001(\tB\003\340A\001\0224\n\013create_" + + "time\030\004 \001(\0132\032.google.protobuf.TimestampB\003" + + "\340A\003\0224\n\013update_time\030\005 \001(\0132\032.google.protob" + + "uf.TimestampB\003\340A\003:\200\001\352A}\n#aiplatform.goog" + + "leapis.com/RagCorpus\022?projects/{project}" + + "/locations/{location}/ragCorpora/{rag_co" + + "rpus}*\nragCorpora2\tragCorpus\"\242\006\n\007RagFile" + + "\022E\n\ngcs_source\030\010 \001(\0132*.google.cloud.aipl" + + "atform.v1beta1.GcsSourceB\003\340A\003H\000\022V\n\023googl" + + "e_drive_source\030\t \001(\01322.google.cloud.aipl" + + "atform.v1beta1.GoogleDriveSourceB\003\340A\003H\000\022" + + "X\n\024direct_upload_source\030\n \001(\01323.google.c" + + "loud.aiplatform.v1beta1.DirectUploadSour" + + "ceB\003\340A\003H\000\022\021\n\004name\030\001 \001(\tB\003\340A\003\022\031\n\014display_" + + "name\030\002 \001(\tB\003\340A\002\022\030\n\013description\030\003 \001(\tB\003\340A" + + "\001\022\027\n\nsize_bytes\030\004 \001(\003B\003\340A\003\022P\n\rrag_file_t" + + "ype\030\005 \001(\01624.google.cloud.aiplatform.v1be" + + "ta1.RagFile.RagFileTypeB\003\340A\003\0224\n\013create_t" + + "ime\030\006 \001(\0132\032.google.protobuf.TimestampB\003\340" + + "A\003\0224\n\013update_time\030\007 \001(\0132\032.google.protobu" + + "f.TimestampB\003\340A\003\"Z\n\013RagFileType\022\035\n\031RAG_F" + + "ILE_TYPE_UNSPECIFIED\020\000\022\025\n\021RAG_FILE_TYPE_" + + "TXT\020\001\022\025\n\021RAG_FILE_TYPE_PDF\020\002:\217\001\352A\213\001\n!aip" + + "latform.googleapis.com/RagFile\022Sprojects" + + "/{project}/locations/{location}/ragCorpo" + + "ra/{rag_corpus}/ragFiles/{rag_file}*\010rag" + + "Files2\007ragFileB\021\n\017rag_file_source\"B\n\025Rag" + + "FileChunkingConfig\022\022\n\nchunk_size\030\001 \001(\005\022\025" + + "\n\rchunk_overlap\030\002 \001(\005\"o\n\023UploadRagFileCo" + + "nfig\022X\n\030rag_file_chunking_config\030\001 \001(\01326" + + ".google.cloud.aiplatform.v1beta1.RagFile" + + "ChunkingConfig\"\226\002\n\024ImportRagFilesConfig\022" + + "@\n\ngcs_source\030\002 \001(\0132*.google.cloud.aipla" + + "tform.v1beta1.GcsSourceH\000\022Q\n\023google_driv" + + "e_source\030\003 \001(\01322.google.cloud.aiplatform" + + ".v1beta1.GoogleDriveSourceH\000\022X\n\030rag_file" + + "_chunking_config\030\004 \001(\01326.google.cloud.ai" + + "platform.v1beta1.RagFileChunkingConfigB\017" + + "\n\rimport_sourceB\351\001\n#com.google.cloud.aip" + + "latform.v1beta1B\022VertexRagDataProtoP\001ZCc" + + "loud.google.com/go/aiplatform/apiv1beta1" + + "/aiplatformpb;aiplatformpb\252\002\037Google.Clou" + + "d.AIPlatform.V1Beta1\312\002\037Google\\Cloud\\AIPl" + + "atform\\V1beta1\352\002\"Google::Cloud::AIPlatfo" + + "rm::V1beta1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.aiplatform.v1beta1.IoProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1beta1_RagCorpus_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1beta1_RagCorpus_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_RagCorpus_descriptor, + new java.lang.String[] { + "Name", "DisplayName", "Description", "CreateTime", "UpdateTime", + }); + internal_static_google_cloud_aiplatform_v1beta1_RagFile_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_aiplatform_v1beta1_RagFile_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_RagFile_descriptor, + new java.lang.String[] { + "GcsSource", + "GoogleDriveSource", + "DirectUploadSource", + "Name", + "DisplayName", + "Description", + "SizeBytes", + "RagFileType", + "CreateTime", + "UpdateTime", + "RagFileSource", + }); + internal_static_google_cloud_aiplatform_v1beta1_RagFileChunkingConfig_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_aiplatform_v1beta1_RagFileChunkingConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_RagFileChunkingConfig_descriptor, + new java.lang.String[] { + "ChunkSize", "ChunkOverlap", + }); + internal_static_google_cloud_aiplatform_v1beta1_UploadRagFileConfig_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_aiplatform_v1beta1_UploadRagFileConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_UploadRagFileConfig_descriptor, + new java.lang.String[] { + "RagFileChunkingConfig", + }); + internal_static_google_cloud_aiplatform_v1beta1_ImportRagFilesConfig_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_aiplatform_v1beta1_ImportRagFilesConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_ImportRagFilesConfig_descriptor, + new java.lang.String[] { + "GcsSource", "GoogleDriveSource", "RagFileChunkingConfig", "ImportSource", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.aiplatform.v1beta1.IoProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/VertexRagDataServiceProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/VertexRagDataServiceProto.java new file mode 100644 index 000000000000..99a55f01eb4a --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/VertexRagDataServiceProto.java @@ -0,0 +1,375 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/vertex_rag_data_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +public final class VertexRagDataServiceProto { + private VertexRagDataServiceProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_CreateRagCorpusRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_CreateRagCorpusRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_GetRagCorpusRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_GetRagCorpusRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_ListRagCorporaRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_ListRagCorporaRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_ListRagCorporaResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_ListRagCorporaResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_DeleteRagCorpusRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_DeleteRagCorpusRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_UploadRagFileRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_UploadRagFileRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_UploadRagFileResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_UploadRagFileResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_ImportRagFilesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_ImportRagFilesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_ImportRagFilesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_ImportRagFilesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_GetRagFileRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_GetRagFileRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_ListRagFilesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_ListRagFilesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_ListRagFilesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_ListRagFilesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_DeleteRagFileRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_DeleteRagFileRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_CreateRagCorpusOperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_CreateRagCorpusOperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_ImportRagFilesOperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_ImportRagFilesOperationMetadata_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n=google/cloud/aiplatform/v1beta1/vertex" + + "_rag_data_service.proto\022\037google.cloud.ai" + + "platform.v1beta1\032\034google/api/annotations" + + ".proto\032\027google/api/client.proto\032\037google/" + + "api/field_behavior.proto\032\031google/api/res" + + "ource.proto\032/google/cloud/aiplatform/v1b" + + "eta1/operation.proto\0325google/cloud/aipla" + + "tform/v1beta1/vertex_rag_data.proto\032#goo" + + "gle/longrunning/operations.proto\032\033google" + + "/protobuf/empty.proto\032\027google/rpc/status" + + ".proto\"\230\001\n\026CreateRagCorpusRequest\0229\n\006par" + + "ent\030\001 \001(\tB)\340A\002\372A#\n!locations.googleapis." + + "com/Location\022C\n\nrag_corpus\030\002 \001(\0132*.googl" + + "e.cloud.aiplatform.v1beta1.RagCorpusB\003\340A" + + "\002\"P\n\023GetRagCorpusRequest\0229\n\004name\030\001 \001(\tB+" + + "\340A\002\372A%\n#aiplatform.googleapis.com/RagCor" + + "pus\"\203\001\n\025ListRagCorporaRequest\0229\n\006parent\030" + + "\001 \001(\tB)\340A\002\372A#\n!locations.googleapis.com/" + + "Location\022\026\n\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\npage" + + "_token\030\003 \001(\tB\003\340A\001\"r\n\026ListRagCorporaRespo" + + "nse\022?\n\013rag_corpora\030\001 \003(\0132*.google.cloud." + + "aiplatform.v1beta1.RagCorpus\022\027\n\017next_pag" + + "e_token\030\002 \001(\t\"g\n\026DeleteRagCorpusRequest\022" + + "9\n\004name\030\001 \001(\tB+\340A\002\372A%\n#aiplatform.google" + + "apis.com/RagCorpus\022\022\n\005force\030\002 \001(\010B\003\340A\001\"\357" + + "\001\n\024UploadRagFileRequest\022;\n\006parent\030\001 \001(\tB" + + "+\340A\002\372A%\n#aiplatform.googleapis.com/RagCo" + + "rpus\022?\n\010rag_file\030\002 \001(\0132(.google.cloud.ai" + + "platform.v1beta1.RagFileB\003\340A\002\022Y\n\026upload_" + + "rag_file_config\030\005 \001(\01324.google.cloud.aip" + + "latform.v1beta1.UploadRagFileConfigB\003\340A\002" + + "\"\204\001\n\025UploadRagFileResponse\022<\n\010rag_file\030\001" + + " \001(\0132(.google.cloud.aiplatform.v1beta1.R" + + "agFileH\000\022#\n\005error\030\004 \001(\0132\022.google.rpc.Sta" + + "tusH\000B\010\n\006result\"\261\001\n\025ImportRagFilesReques" + + "t\022;\n\006parent\030\001 \001(\tB+\340A\002\372A%\n#aiplatform.go" + + "ogleapis.com/RagCorpus\022[\n\027import_rag_fil" + + "es_config\030\002 \001(\01325.google.cloud.aiplatfor" + + "m.v1beta1.ImportRagFilesConfigB\003\340A\002\":\n\026I" + + "mportRagFilesResponse\022 \n\030imported_rag_fi" + + "les_count\030\001 \001(\003\"L\n\021GetRagFileRequest\0227\n\004" + + "name\030\001 \001(\tB)\340A\002\372A#\n!aiplatform.googleapi" + + "s.com/RagFile\"\203\001\n\023ListRagFilesRequest\022;\n" + + "\006parent\030\001 \001(\tB+\340A\002\372A%\n#aiplatform.google" + + "apis.com/RagCorpus\022\026\n\tpage_size\030\002 \001(\005B\003\340" + + "A\001\022\027\n\npage_token\030\003 \001(\tB\003\340A\001\"l\n\024ListRagFi" + + "lesResponse\022;\n\trag_files\030\001 \003(\0132(.google." + + "cloud.aiplatform.v1beta1.RagFile\022\027\n\017next" + + "_page_token\030\002 \001(\t\"O\n\024DeleteRagFileReques" + + "t\0227\n\004name\030\001 \001(\tB)\340A\002\372A#\n!aiplatform.goog" + + "leapis.com/RagFile\"w\n CreateRagCorpusOpe" + + "rationMetadata\022S\n\020generic_metadata\030\001 \001(\013" + + "29.google.cloud.aiplatform.v1beta1.Gener" + + "icOperationMetadata\"\215\001\n\037ImportRagFilesOp" + + "erationMetadata\022S\n\020generic_metadata\030\001 \001(" + + "\01329.google.cloud.aiplatform.v1beta1.Gene" + + "ricOperationMetadata\022\025\n\rrag_corpus_id\030\002 " + + "\001(\0032\317\020\n\024VertexRagDataService\022\367\001\n\017CreateR" + + "agCorpus\0227.google.cloud.aiplatform.v1bet" + + "a1.CreateRagCorpusRequest\032\035.google.longr" + + "unning.Operation\"\213\001\312A-\n\tRagCorpus\022 Creat" + + "eRagCorpusOperationMetadata\332A\021parent,rag" + + "_corpus\202\323\344\223\002A\"3/v1beta1/{parent=projects" + + "/*/locations/*}/ragCorpora:\nrag_corpus\022\264" + + "\001\n\014GetRagCorpus\0224.google.cloud.aiplatfor" + + "m.v1beta1.GetRagCorpusRequest\032*.google.c" + + "loud.aiplatform.v1beta1.RagCorpus\"B\332A\004na" + + "me\202\323\344\223\0025\0223/v1beta1/{name=projects/*/loca" + + "tions/*/ragCorpora/*}\022\307\001\n\016ListRagCorpora" + + "\0226.google.cloud.aiplatform.v1beta1.ListR" + + "agCorporaRequest\0327.google.cloud.aiplatfo" + + "rm.v1beta1.ListRagCorporaResponse\"D\332A\006pa" + + "rent\202\323\344\223\0025\0223/v1beta1/{parent=projects/*/" + + "locations/*}/ragCorpora\022\340\001\n\017DeleteRagCor" + + "pus\0227.google.cloud.aiplatform.v1beta1.De" + + "leteRagCorpusRequest\032\035.google.longrunnin" + + "g.Operation\"u\312A0\n\025google.protobuf.Empty\022" + + "\027DeleteOperationMetadata\332A\004name\202\323\344\223\0025*3/" + + "v1beta1/{name=projects/*/locations/*/rag" + + "Corpora/*}\022\371\001\n\rUploadRagFile\0225.google.cl" + + "oud.aiplatform.v1beta1.UploadRagFileRequ" + + "est\0326.google.cloud.aiplatform.v1beta1.Up" + + "loadRagFileResponse\"y\332A&parent,rag_file," + + "upload_rag_file_config\202\323\344\223\002J\"E/v1beta1/{" + + "parent=projects/*/locations/*/ragCorpora" + + "/*}/ragFiles:upload:\001*\022\227\002\n\016ImportRagFile" + + "s\0226.google.cloud.aiplatform.v1beta1.Impo" + + "rtRagFilesRequest\032\035.google.longrunning.O" + + "peration\"\255\001\312A9\n\026ImportRagFilesResponse\022\037" + + "ImportRagFilesOperationMetadata\332A\036parent" + + ",import_rag_files_config\202\323\344\223\002J\"E/v1beta1" + + "/{parent=projects/*/locations/*/ragCorpo" + + "ra/*}/ragFiles:import:\001*\022\271\001\n\nGetRagFile\022" + + "2.google.cloud.aiplatform.v1beta1.GetRag" + + "FileRequest\032(.google.cloud.aiplatform.v1" + + "beta1.RagFile\"M\332A\004name\202\323\344\223\002@\022>/v1beta1/{" + + "name=projects/*/locations/*/ragCorpora/*" + + "/ragFiles/*}\022\314\001\n\014ListRagFiles\0224.google.c" + + "loud.aiplatform.v1beta1.ListRagFilesRequ" + + "est\0325.google.cloud.aiplatform.v1beta1.Li" + + "stRagFilesResponse\"O\332A\006parent\202\323\344\223\002@\022>/v1" + + "beta1/{parent=projects/*/locations/*/rag" + + "Corpora/*}/ragFiles\022\350\001\n\rDeleteRagFile\0225." + + "google.cloud.aiplatform.v1beta1.DeleteRa" + + "gFileRequest\032\035.google.longrunning.Operat" + + "ion\"\200\001\312A0\n\025google.protobuf.Empty\022\027Delete" + + "OperationMetadata\332A\004name\202\323\344\223\002@*>/v1beta1" + + "/{name=projects/*/locations/*/ragCorpora" + + "/*/ragFiles/*}\032M\312A\031aiplatform.googleapis" + + ".com\322A.https://www.googleapis.com/auth/c" + + "loud-platformB\360\001\n#com.google.cloud.aipla" + + "tform.v1beta1B\031VertexRagDataServiceProto" + + "P\001ZCcloud.google.com/go/aiplatform/apiv1" + + "beta1/aiplatformpb;aiplatformpb\252\002\037Google" + + ".Cloud.AIPlatform.V1Beta1\312\002\037Google\\Cloud" + + "\\AIPlatform\\V1beta1\352\002\"Google::Cloud::AIP" + + "latform::V1beta1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.aiplatform.v1beta1.OperationProto.getDescriptor(), + com.google.cloud.aiplatform.v1beta1.VertexRagDataProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), + com.google.rpc.StatusProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1beta1_CreateRagCorpusRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1beta1_CreateRagCorpusRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_CreateRagCorpusRequest_descriptor, + new java.lang.String[] { + "Parent", "RagCorpus", + }); + internal_static_google_cloud_aiplatform_v1beta1_GetRagCorpusRequest_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_aiplatform_v1beta1_GetRagCorpusRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_GetRagCorpusRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_aiplatform_v1beta1_ListRagCorporaRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_aiplatform_v1beta1_ListRagCorporaRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_ListRagCorporaRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_cloud_aiplatform_v1beta1_ListRagCorporaResponse_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_aiplatform_v1beta1_ListRagCorporaResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_ListRagCorporaResponse_descriptor, + new java.lang.String[] { + "RagCorpora", "NextPageToken", + }); + internal_static_google_cloud_aiplatform_v1beta1_DeleteRagCorpusRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_aiplatform_v1beta1_DeleteRagCorpusRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_DeleteRagCorpusRequest_descriptor, + new java.lang.String[] { + "Name", "Force", + }); + internal_static_google_cloud_aiplatform_v1beta1_UploadRagFileRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_aiplatform_v1beta1_UploadRagFileRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_UploadRagFileRequest_descriptor, + new java.lang.String[] { + "Parent", "RagFile", "UploadRagFileConfig", + }); + internal_static_google_cloud_aiplatform_v1beta1_UploadRagFileResponse_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_aiplatform_v1beta1_UploadRagFileResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_UploadRagFileResponse_descriptor, + new java.lang.String[] { + "RagFile", "Error", "Result", + }); + internal_static_google_cloud_aiplatform_v1beta1_ImportRagFilesRequest_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_aiplatform_v1beta1_ImportRagFilesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_ImportRagFilesRequest_descriptor, + new java.lang.String[] { + "Parent", "ImportRagFilesConfig", + }); + internal_static_google_cloud_aiplatform_v1beta1_ImportRagFilesResponse_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_aiplatform_v1beta1_ImportRagFilesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_ImportRagFilesResponse_descriptor, + new java.lang.String[] { + "ImportedRagFilesCount", + }); + internal_static_google_cloud_aiplatform_v1beta1_GetRagFileRequest_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_aiplatform_v1beta1_GetRagFileRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_GetRagFileRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_aiplatform_v1beta1_ListRagFilesRequest_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_aiplatform_v1beta1_ListRagFilesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_ListRagFilesRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_cloud_aiplatform_v1beta1_ListRagFilesResponse_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_aiplatform_v1beta1_ListRagFilesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_ListRagFilesResponse_descriptor, + new java.lang.String[] { + "RagFiles", "NextPageToken", + }); + internal_static_google_cloud_aiplatform_v1beta1_DeleteRagFileRequest_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_cloud_aiplatform_v1beta1_DeleteRagFileRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_DeleteRagFileRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_aiplatform_v1beta1_CreateRagCorpusOperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_cloud_aiplatform_v1beta1_CreateRagCorpusOperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_CreateRagCorpusOperationMetadata_descriptor, + new java.lang.String[] { + "GenericMetadata", + }); + internal_static_google_cloud_aiplatform_v1beta1_ImportRagFilesOperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_cloud_aiplatform_v1beta1_ImportRagFilesOperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_ImportRagFilesOperationMetadata_descriptor, + new java.lang.String[] { + "GenericMetadata", "RagCorpusId", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resourceReference); + registry.add(com.google.longrunning.OperationsProto.operationInfo); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.aiplatform.v1beta1.OperationProto.getDescriptor(); + com.google.cloud.aiplatform.v1beta1.VertexRagDataProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + com.google.rpc.StatusProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/VertexRagServiceProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/VertexRagServiceProto.java new file mode 100644 index 000000000000..4256df165486 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/VertexRagServiceProto.java @@ -0,0 +1,179 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/vertex_rag_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +public final class VertexRagServiceProto { + private VertexRagServiceProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_RagQuery_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_RagQuery_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_RetrieveContextsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_RetrieveContextsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_RetrieveContextsRequest_VertexRagStore_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_RetrieveContextsRequest_VertexRagStore_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_RagContexts_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_RagContexts_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_RagContexts_Context_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_RagContexts_Context_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_RetrieveContextsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_RetrieveContextsResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n8google/cloud/aiplatform/v1beta1/vertex" + + "_rag_service.proto\022\037google.cloud.aiplatf" + + "orm.v1beta1\032\034google/api/annotations.prot" + + "o\032\027google/api/client.proto\032\037google/api/f" + + "ield_behavior.proto\032\031google/api/resource" + + ".proto\"G\n\010RagQuery\022\023\n\004text\030\001 \001(\tB\003\340A\001H\000\022" + + "\035\n\020similarity_top_k\030\002 \001(\005B\003\340A\001B\007\n\005query\"" + + "\263\002\n\027RetrieveContextsRequest\022c\n\020vertex_ra" + + "g_store\030\002 \001(\0132G.google.cloud.aiplatform." + + "v1beta1.RetrieveContextsRequest.VertexRa" + + "gStoreH\000\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!locati" + + "ons.googleapis.com/Location\022=\n\005query\030\003 \001" + + "(\0132).google.cloud.aiplatform.v1beta1.Rag" + + "QueryB\003\340A\002\032*\n\016VertexRagStore\022\030\n\013rag_corp" + + "ora\030\001 \003(\tB\003\340A\002B\r\n\013data_source\"\224\001\n\013RagCon" + + "texts\022F\n\010contexts\030\001 \003(\01324.google.cloud.a" + + "iplatform.v1beta1.RagContexts.Context\032=\n" + + "\007Context\022\022\n\nsource_uri\030\001 \001(\t\022\014\n\004text\030\002 \001" + + "(\t\022\020\n\010distance\030\003 \001(\001\"Z\n\030RetrieveContexts" + + "Response\022>\n\010contexts\030\001 \001(\0132,.google.clou" + + "d.aiplatform.v1beta1.RagContexts2\300\002\n\020Ver" + + "texRagService\022\334\001\n\020RetrieveContexts\0228.goo" + + "gle.cloud.aiplatform.v1beta1.RetrieveCon" + + "textsRequest\0329.google.cloud.aiplatform.v" + + "1beta1.RetrieveContextsResponse\"S\332A\014pare" + + "nt,query\202\323\344\223\002>\"9/v1beta1/{parent=project" + + "s/*/locations/*}:retrieveContexts:\001*\032M\312A" + + "\031aiplatform.googleapis.com\322A.https://www" + + ".googleapis.com/auth/cloud-platformB\354\001\n#" + + "com.google.cloud.aiplatform.v1beta1B\025Ver" + + "texRagServiceProtoP\001ZCcloud.google.com/g" + + "o/aiplatform/apiv1beta1/aiplatformpb;aip" + + "latformpb\252\002\037Google.Cloud.AIPlatform.V1Be" + + "ta1\312\002\037Google\\Cloud\\AIPlatform\\V1beta1\352\002\"" + + "Google::Cloud::AIPlatform::V1beta1b\006prot" + + "o3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1beta1_RagQuery_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1beta1_RagQuery_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_RagQuery_descriptor, + new java.lang.String[] { + "Text", "SimilarityTopK", "Query", + }); + internal_static_google_cloud_aiplatform_v1beta1_RetrieveContextsRequest_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_aiplatform_v1beta1_RetrieveContextsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_RetrieveContextsRequest_descriptor, + new java.lang.String[] { + "VertexRagStore", "Parent", "Query", "DataSource", + }); + internal_static_google_cloud_aiplatform_v1beta1_RetrieveContextsRequest_VertexRagStore_descriptor = + internal_static_google_cloud_aiplatform_v1beta1_RetrieveContextsRequest_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_aiplatform_v1beta1_RetrieveContextsRequest_VertexRagStore_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_RetrieveContextsRequest_VertexRagStore_descriptor, + new java.lang.String[] { + "RagCorpora", + }); + internal_static_google_cloud_aiplatform_v1beta1_RagContexts_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_aiplatform_v1beta1_RagContexts_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_RagContexts_descriptor, + new java.lang.String[] { + "Contexts", + }); + internal_static_google_cloud_aiplatform_v1beta1_RagContexts_Context_descriptor = + internal_static_google_cloud_aiplatform_v1beta1_RagContexts_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_aiplatform_v1beta1_RagContexts_Context_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_RagContexts_Context_descriptor, + new java.lang.String[] { + "SourceUri", "Text", "Distance", + }); + internal_static_google_cloud_aiplatform_v1beta1_RetrieveContextsResponse_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_aiplatform_v1beta1_RetrieveContextsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_RetrieveContextsResponse_descriptor, + new java.lang.String[] { + "Contexts", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/VertexRagStore.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/VertexRagStore.java new file mode 100644 index 000000000000..fdfb4148cc32 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/VertexRagStore.java @@ -0,0 +1,930 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/tool.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Retrieve from Vertex RAG Store for grounding.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.VertexRagStore} + */ +public final class VertexRagStore extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.VertexRagStore) + VertexRagStoreOrBuilder { + private static final long serialVersionUID = 0L; + // Use VertexRagStore.newBuilder() to construct. + private VertexRagStore(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private VertexRagStore() { + ragCorpora_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new VertexRagStore(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.ToolProto + .internal_static_google_cloud_aiplatform_v1beta1_VertexRagStore_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.ToolProto + .internal_static_google_cloud_aiplatform_v1beta1_VertexRagStore_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.VertexRagStore.class, + com.google.cloud.aiplatform.v1beta1.VertexRagStore.Builder.class); + } + + private int bitField0_; + public static final int RAG_CORPORA_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList ragCorpora_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Required. Vertex RAG Store corpus resource name:
+   *   `projects/{project}/locations/{location}/ragCorpora/{ragCorpus}`
+   * Currently only one corpus is allowed.
+   * In the future we may open up multiple corpora support. However, they should
+   * be from the same project and location.
+   * 
+ * + * + * repeated string rag_corpora = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the ragCorpora. + */ + public com.google.protobuf.ProtocolStringList getRagCorporaList() { + return ragCorpora_; + } + /** + * + * + *
+   * Required. Vertex RAG Store corpus resource name:
+   *   `projects/{project}/locations/{location}/ragCorpora/{ragCorpus}`
+   * Currently only one corpus is allowed.
+   * In the future we may open up multiple corpora support. However, they should
+   * be from the same project and location.
+   * 
+ * + * + * repeated string rag_corpora = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The count of ragCorpora. + */ + public int getRagCorporaCount() { + return ragCorpora_.size(); + } + /** + * + * + *
+   * Required. Vertex RAG Store corpus resource name:
+   *   `projects/{project}/locations/{location}/ragCorpora/{ragCorpus}`
+   * Currently only one corpus is allowed.
+   * In the future we may open up multiple corpora support. However, they should
+   * be from the same project and location.
+   * 
+ * + * + * repeated string rag_corpora = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The ragCorpora at the given index. + */ + public java.lang.String getRagCorpora(int index) { + return ragCorpora_.get(index); + } + /** + * + * + *
+   * Required. Vertex RAG Store corpus resource name:
+   *   `projects/{project}/locations/{location}/ragCorpora/{ragCorpus}`
+   * Currently only one corpus is allowed.
+   * In the future we may open up multiple corpora support. However, they should
+   * be from the same project and location.
+   * 
+ * + * + * repeated string rag_corpora = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the ragCorpora at the given index. + */ + public com.google.protobuf.ByteString getRagCorporaBytes(int index) { + return ragCorpora_.getByteString(index); + } + + public static final int SIMILARITY_TOP_K_FIELD_NUMBER = 2; + private int similarityTopK_ = 0; + /** + * + * + *
+   * Optional. Number of top k results to return from the selected corpora.
+   * 
+ * + * optional int32 similarity_top_k = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the similarityTopK field is set. + */ + @java.lang.Override + public boolean hasSimilarityTopK() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Optional. Number of top k results to return from the selected corpora.
+   * 
+ * + * optional int32 similarity_top_k = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The similarityTopK. + */ + @java.lang.Override + public int getSimilarityTopK() { + return similarityTopK_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < ragCorpora_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, ragCorpora_.getRaw(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeInt32(2, similarityTopK_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < ragCorpora_.size(); i++) { + dataSize += computeStringSizeNoTag(ragCorpora_.getRaw(i)); + } + size += dataSize; + size += 1 * getRagCorporaList().size(); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, similarityTopK_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.VertexRagStore)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.VertexRagStore other = + (com.google.cloud.aiplatform.v1beta1.VertexRagStore) obj; + + if (!getRagCorporaList().equals(other.getRagCorporaList())) return false; + if (hasSimilarityTopK() != other.hasSimilarityTopK()) return false; + if (hasSimilarityTopK()) { + if (getSimilarityTopK() != other.getSimilarityTopK()) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getRagCorporaCount() > 0) { + hash = (37 * hash) + RAG_CORPORA_FIELD_NUMBER; + hash = (53 * hash) + getRagCorporaList().hashCode(); + } + if (hasSimilarityTopK()) { + hash = (37 * hash) + SIMILARITY_TOP_K_FIELD_NUMBER; + hash = (53 * hash) + getSimilarityTopK(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.VertexRagStore parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.VertexRagStore parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.VertexRagStore parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.VertexRagStore parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.VertexRagStore parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.VertexRagStore parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.VertexRagStore parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.VertexRagStore parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.VertexRagStore parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.VertexRagStore parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.VertexRagStore parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.VertexRagStore parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.aiplatform.v1beta1.VertexRagStore prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Retrieve from Vertex RAG Store for grounding.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.VertexRagStore} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.VertexRagStore) + com.google.cloud.aiplatform.v1beta1.VertexRagStoreOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.ToolProto + .internal_static_google_cloud_aiplatform_v1beta1_VertexRagStore_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.ToolProto + .internal_static_google_cloud_aiplatform_v1beta1_VertexRagStore_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.VertexRagStore.class, + com.google.cloud.aiplatform.v1beta1.VertexRagStore.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.VertexRagStore.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + ragCorpora_ = com.google.protobuf.LazyStringArrayList.emptyList(); + similarityTopK_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.ToolProto + .internal_static_google_cloud_aiplatform_v1beta1_VertexRagStore_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.VertexRagStore getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.VertexRagStore.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.VertexRagStore build() { + com.google.cloud.aiplatform.v1beta1.VertexRagStore result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.VertexRagStore buildPartial() { + com.google.cloud.aiplatform.v1beta1.VertexRagStore result = + new com.google.cloud.aiplatform.v1beta1.VertexRagStore(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1beta1.VertexRagStore result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + ragCorpora_.makeImmutable(); + result.ragCorpora_ = ragCorpora_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.similarityTopK_ = similarityTopK_; + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1beta1.VertexRagStore) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.VertexRagStore) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.VertexRagStore other) { + if (other == com.google.cloud.aiplatform.v1beta1.VertexRagStore.getDefaultInstance()) + return this; + if (!other.ragCorpora_.isEmpty()) { + if (ragCorpora_.isEmpty()) { + ragCorpora_ = other.ragCorpora_; + bitField0_ |= 0x00000001; + } else { + ensureRagCorporaIsMutable(); + ragCorpora_.addAll(other.ragCorpora_); + } + onChanged(); + } + if (other.hasSimilarityTopK()) { + setSimilarityTopK(other.getSimilarityTopK()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureRagCorporaIsMutable(); + ragCorpora_.add(s); + break; + } // case 10 + case 16: + { + similarityTopK_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringArrayList ragCorpora_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureRagCorporaIsMutable() { + if (!ragCorpora_.isModifiable()) { + ragCorpora_ = new com.google.protobuf.LazyStringArrayList(ragCorpora_); + } + bitField0_ |= 0x00000001; + } + /** + * + * + *
+     * Required. Vertex RAG Store corpus resource name:
+     *   `projects/{project}/locations/{location}/ragCorpora/{ragCorpus}`
+     * Currently only one corpus is allowed.
+     * In the future we may open up multiple corpora support. However, they should
+     * be from the same project and location.
+     * 
+ * + * + * repeated string rag_corpora = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the ragCorpora. + */ + public com.google.protobuf.ProtocolStringList getRagCorporaList() { + ragCorpora_.makeImmutable(); + return ragCorpora_; + } + /** + * + * + *
+     * Required. Vertex RAG Store corpus resource name:
+     *   `projects/{project}/locations/{location}/ragCorpora/{ragCorpus}`
+     * Currently only one corpus is allowed.
+     * In the future we may open up multiple corpora support. However, they should
+     * be from the same project and location.
+     * 
+ * + * + * repeated string rag_corpora = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The count of ragCorpora. + */ + public int getRagCorporaCount() { + return ragCorpora_.size(); + } + /** + * + * + *
+     * Required. Vertex RAG Store corpus resource name:
+     *   `projects/{project}/locations/{location}/ragCorpora/{ragCorpus}`
+     * Currently only one corpus is allowed.
+     * In the future we may open up multiple corpora support. However, they should
+     * be from the same project and location.
+     * 
+ * + * + * repeated string rag_corpora = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The ragCorpora at the given index. + */ + public java.lang.String getRagCorpora(int index) { + return ragCorpora_.get(index); + } + /** + * + * + *
+     * Required. Vertex RAG Store corpus resource name:
+     *   `projects/{project}/locations/{location}/ragCorpora/{ragCorpus}`
+     * Currently only one corpus is allowed.
+     * In the future we may open up multiple corpora support. However, they should
+     * be from the same project and location.
+     * 
+ * + * + * repeated string rag_corpora = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the ragCorpora at the given index. + */ + public com.google.protobuf.ByteString getRagCorporaBytes(int index) { + return ragCorpora_.getByteString(index); + } + /** + * + * + *
+     * Required. Vertex RAG Store corpus resource name:
+     *   `projects/{project}/locations/{location}/ragCorpora/{ragCorpus}`
+     * Currently only one corpus is allowed.
+     * In the future we may open up multiple corpora support. However, they should
+     * be from the same project and location.
+     * 
+ * + * + * repeated string rag_corpora = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index to set the value at. + * @param value The ragCorpora to set. + * @return This builder for chaining. + */ + public Builder setRagCorpora(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRagCorporaIsMutable(); + ragCorpora_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Vertex RAG Store corpus resource name:
+     *   `projects/{project}/locations/{location}/ragCorpora/{ragCorpus}`
+     * Currently only one corpus is allowed.
+     * In the future we may open up multiple corpora support. However, they should
+     * be from the same project and location.
+     * 
+ * + * + * repeated string rag_corpora = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The ragCorpora to add. + * @return This builder for chaining. + */ + public Builder addRagCorpora(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRagCorporaIsMutable(); + ragCorpora_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Vertex RAG Store corpus resource name:
+     *   `projects/{project}/locations/{location}/ragCorpora/{ragCorpus}`
+     * Currently only one corpus is allowed.
+     * In the future we may open up multiple corpora support. However, they should
+     * be from the same project and location.
+     * 
+ * + * + * repeated string rag_corpora = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param values The ragCorpora to add. + * @return This builder for chaining. + */ + public Builder addAllRagCorpora(java.lang.Iterable values) { + ensureRagCorporaIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, ragCorpora_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Vertex RAG Store corpus resource name:
+     *   `projects/{project}/locations/{location}/ragCorpora/{ragCorpus}`
+     * Currently only one corpus is allowed.
+     * In the future we may open up multiple corpora support. However, they should
+     * be from the same project and location.
+     * 
+ * + * + * repeated string rag_corpora = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRagCorpora() { + ragCorpora_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Vertex RAG Store corpus resource name:
+     *   `projects/{project}/locations/{location}/ragCorpora/{ragCorpus}`
+     * Currently only one corpus is allowed.
+     * In the future we may open up multiple corpora support. However, they should
+     * be from the same project and location.
+     * 
+ * + * + * repeated string rag_corpora = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes of the ragCorpora to add. + * @return This builder for chaining. + */ + public Builder addRagCorporaBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureRagCorporaIsMutable(); + ragCorpora_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int similarityTopK_; + /** + * + * + *
+     * Optional. Number of top k results to return from the selected corpora.
+     * 
+ * + * optional int32 similarity_top_k = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the similarityTopK field is set. + */ + @java.lang.Override + public boolean hasSimilarityTopK() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Optional. Number of top k results to return from the selected corpora.
+     * 
+ * + * optional int32 similarity_top_k = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The similarityTopK. + */ + @java.lang.Override + public int getSimilarityTopK() { + return similarityTopK_; + } + /** + * + * + *
+     * Optional. Number of top k results to return from the selected corpora.
+     * 
+ * + * optional int32 similarity_top_k = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The similarityTopK to set. + * @return This builder for chaining. + */ + public Builder setSimilarityTopK(int value) { + + similarityTopK_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Number of top k results to return from the selected corpora.
+     * 
+ * + * optional int32 similarity_top_k = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearSimilarityTopK() { + bitField0_ = (bitField0_ & ~0x00000002); + similarityTopK_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.VertexRagStore) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.VertexRagStore) + private static final com.google.cloud.aiplatform.v1beta1.VertexRagStore DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.VertexRagStore(); + } + + public static com.google.cloud.aiplatform.v1beta1.VertexRagStore getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VertexRagStore parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.VertexRagStore getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/VertexRagStoreOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/VertexRagStoreOrBuilder.java new file mode 100644 index 000000000000..246cb56998a3 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/VertexRagStoreOrBuilder.java @@ -0,0 +1,126 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/tool.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.aiplatform.v1beta1; + +public interface VertexRagStoreOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.VertexRagStore) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Vertex RAG Store corpus resource name:
+   *   `projects/{project}/locations/{location}/ragCorpora/{ragCorpus}`
+   * Currently only one corpus is allowed.
+   * In the future we may open up multiple corpora support. However, they should
+   * be from the same project and location.
+   * 
+ * + * + * repeated string rag_corpora = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the ragCorpora. + */ + java.util.List getRagCorporaList(); + /** + * + * + *
+   * Required. Vertex RAG Store corpus resource name:
+   *   `projects/{project}/locations/{location}/ragCorpora/{ragCorpus}`
+   * Currently only one corpus is allowed.
+   * In the future we may open up multiple corpora support. However, they should
+   * be from the same project and location.
+   * 
+ * + * + * repeated string rag_corpora = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The count of ragCorpora. + */ + int getRagCorporaCount(); + /** + * + * + *
+   * Required. Vertex RAG Store corpus resource name:
+   *   `projects/{project}/locations/{location}/ragCorpora/{ragCorpus}`
+   * Currently only one corpus is allowed.
+   * In the future we may open up multiple corpora support. However, they should
+   * be from the same project and location.
+   * 
+ * + * + * repeated string rag_corpora = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The ragCorpora at the given index. + */ + java.lang.String getRagCorpora(int index); + /** + * + * + *
+   * Required. Vertex RAG Store corpus resource name:
+   *   `projects/{project}/locations/{location}/ragCorpora/{ragCorpus}`
+   * Currently only one corpus is allowed.
+   * In the future we may open up multiple corpora support. However, they should
+   * be from the same project and location.
+   * 
+ * + * + * repeated string rag_corpora = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the ragCorpora at the given index. + */ + com.google.protobuf.ByteString getRagCorporaBytes(int index); + + /** + * + * + *
+   * Optional. Number of top k results to return from the selected corpora.
+   * 
+ * + * optional int32 similarity_top_k = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the similarityTopK field is set. + */ + boolean hasSimilarityTopK(); + /** + * + * + *
+   * Optional. Number of top k results to return from the selected corpora.
+   * 
+ * + * optional int32 similarity_top_k = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The similarityTopK. + */ + int getSimilarityTopK(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/content.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/content.proto index 4aa98bfef1c3..ece5a75f2e8e 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/content.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/content.proto @@ -102,14 +102,15 @@ message Part { } } -// Raw media bytes. +// Content blob. // -// Text should not be sent as raw bytes, use the 'text' field. +// It's preferred to send as [text][google.cloud.aiplatform.v1beta1.Part.text] +// directly rather than raw bytes. message Blob { // Required. The IANA standard MIME type of the source data. string mime_type = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. Raw bytes for media formats. + // Required. Raw bytes. bytes data = 2 [(google.api.field_behavior) = REQUIRED]; } @@ -152,6 +153,21 @@ message GenerationConfig { // Optional. Stop sequences. repeated string stop_sequences = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Positive penalties. + optional float presence_penalty = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Frequency penalties. + optional float frequency_penalty = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Output response mimetype of the generated candidate text. + // Supported mimetype: + // - `text/plain`: (default) Text output. + // - `application/json`: JSON response in the candidates. + // The model needs to be prompted to output the appropriate response type, + // otherwise the behavior is undefined. + // This is a preview feature. + string response_mime_type = 13 [(google.api.field_behavior) = OPTIONAL]; } // Safety settings. @@ -174,11 +190,27 @@ message SafetySetting { BLOCK_NONE = 4; } + // Probability vs severity. + enum HarmBlockMethod { + // The harm block method is unspecified. + HARM_BLOCK_METHOD_UNSPECIFIED = 0; + + // The harm block method uses both probability and severity scores. + SEVERITY = 1; + + // The harm block method uses the probability score. + PROBABILITY = 2; + } + // Required. Harm category. HarmCategory category = 1 [(google.api.field_behavior) = REQUIRED]; // Required. The harm block threshold. HarmBlockThreshold threshold = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Specify if the threshold is used for probability or severity + // score. If not specified, the threshold is used for probability score. + HarmBlockMethod method = 4 [(google.api.field_behavior) = OPTIONAL]; } // Safety rating corresponding to the generated content. @@ -361,9 +393,22 @@ message GroundingAttribution { string title = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; } + // Attribution from context retrieved by the retrieval tools. + message RetrievedContext { + // Output only. URI reference of the attribution. + string uri = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Title of the attribution. + string title = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + oneof reference { // Optional. Attribution from the web. Web web = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Attribution from context retrieved by the retrieval tools. + RetrievedContext retrieved_context = 4 + [(google.api.field_behavior) = OPTIONAL]; } // Output only. Segment of the content this attribution belongs to. @@ -383,6 +428,10 @@ message GroundingMetadata { repeated string web_search_queries = 1 [(google.api.field_behavior) = OPTIONAL]; + // Optional. Queries executed by the retrieval tools. + repeated string retrieval_queries = 3 + [(google.api.field_behavior) = OPTIONAL]; + // Optional. List of grounding attributions. repeated GroundingAttribution grounding_attributions = 2 [(google.api.field_behavior) = OPTIONAL]; diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/endpoint_service.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/endpoint_service.proto index 06654326abfd..62d54f919224 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/endpoint_service.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/endpoint_service.proto @@ -210,15 +210,15 @@ message ListEndpointsRequest { // Optional. An expression for filtering the results of the request. For field // names both snake_case and camelCase are supported. // - // * `endpoint` supports = and !=. `endpoint` represents the Endpoint ID, - // i.e. the last segment of the Endpoint's [resource - // name][google.cloud.aiplatform.v1beta1.Endpoint.name]. - // * `display_name` supports = and, != + // * `endpoint` supports `=` and `!=`. `endpoint` represents the Endpoint + // ID, i.e. the last segment of the Endpoint's + // [resource name][google.cloud.aiplatform.v1beta1.Endpoint.name]. + // * `display_name` supports `=` and `!=`. // * `labels` supports general map functions that is: // * `labels.key=value` - key:value equality - // * `labels.key:* or labels:key - key existence + // * `labels.key:*` or `labels:key` - key existence // * A key including a space must be quoted. `labels."a key"`. - // * `base_model_name` only supports = + // * `base_model_name` only supports `=`. // // Some examples: // diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/evaluation_service.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/evaluation_service.proto index f3603d0153fb..5df93a5bfa44 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/evaluation_service.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/evaluation_service.proto @@ -91,9 +91,6 @@ message EvaluateInstancesRequest { // Input for fulfillment metric. FulfillmentInput fulfillment_input = 12; - // Input for response recall metric. - ResponseRecallInput response_recall_input = 13; - // Input for summarization quality metric. SummarizationQualityInput summarization_quality_input = 7; @@ -124,9 +121,6 @@ message EvaluateInstancesRequest { // metric. QuestionAnsweringCorrectnessInput question_answering_correctness_input = 18; - // Input for rag context recall metric. - RagContextRecallInput rag_context_recall_input = 11; - // Tool call metric instances. // Input for tool call valid metric. ToolCallValidInput tool_call_valid_input = 19; @@ -183,9 +177,6 @@ message EvaluateInstancesResponse { // Result for fulfillment metric. FulfillmentResult fulfillment_result = 11; - // Result for response recall metric. - ResponseRecallResult response_recall_result = 12; - // Summarization only metrics. // Result for summarization quality metric. SummarizationQualityResult summarization_quality_result = 6; @@ -219,10 +210,6 @@ message EvaluateInstancesResponse { QuestionAnsweringCorrectnessResult question_answering_correctness_result = 17; - // RAG only metrics. - // Result for context recall metric. - RagContextRecallResult rag_context_recall_result = 10; - // Tool call metrics. // Results for tool call valid metric. ToolCallValidResults tool_call_valid_results = 18; @@ -525,42 +512,6 @@ message FulfillmentResult { optional float confidence = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; } -// Input for response recall metric. -message ResponseRecallInput { - // Required. Spec for response recall score metric. - ResponseRecallSpec metric_spec = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. Response recall instance. - ResponseRecallInstance instance = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Spec for response recall instance. -message ResponseRecallInstance { - // Required. Output of the evaluated model. - optional string prediction = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. Ground truth used to compare against the prediction. - optional string reference = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Spec for response recall metric. -message ResponseRecallSpec { - // Optional. Which version to use for evaluation. - int32 version = 1 [(google.api.field_behavior) = OPTIONAL]; -} - -// Spec for response recall result. -message ResponseRecallResult { - // Output only. ResponseRecall score. - optional float score = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Explanation for response recall score. - string explanation = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Confidence for fulfillment score. - optional float confidence = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - // Input for summarization quality metric. message SummarizationQualityInput { // Required. Spec for summarization quality score metric. @@ -777,8 +728,8 @@ message QuestionAnsweringQualityInstance { // Optional. Ground truth used to compare against the prediction. optional string reference = 2 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Text to answer the question. - optional string context = 3 [(google.api.field_behavior) = OPTIONAL]; + // Required. Text to answer the question. + optional string context = 3 [(google.api.field_behavior) = REQUIRED]; // Required. Question Answering prompt for LLM. optional string instruction = 4 [(google.api.field_behavior) = REQUIRED]; @@ -829,8 +780,8 @@ message PairwiseQuestionAnsweringQualityInstance { // Optional. Ground truth used to compare against the prediction. optional string reference = 3 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Text to answer the question. - optional string context = 4 [(google.api.field_behavior) = OPTIONAL]; + // Required. Text to answer the question. + optional string context = 4 [(google.api.field_behavior) = REQUIRED]; // Required. Question Answering prompt for LLM. optional string instruction = 5 [(google.api.field_behavior) = REQUIRED]; @@ -1003,43 +954,6 @@ message QuestionAnsweringCorrectnessResult { optional float confidence = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; } -// Input for rag context recall metric. -message RagContextRecallInput { - // Required. Spec for rag context recall metric. - RagContextRecallSpec metric_spec = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. Rag context recall instance. - RagContextRecallInstance instance = 2 - [(google.api.field_behavior) = REQUIRED]; -} - -// Spec for rag context recall instance. -message RagContextRecallInstance { - // Required. Ground truth used to compare against the context. - optional string reference = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. Retrieved facts from RAG pipeline as context to be evaluated. - optional string context = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Spec for rag context recall metric. -message RagContextRecallSpec { - // Optional. Which version to use for evaluation. - int32 version = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// Spec for rag context recall result. -message RagContextRecallResult { - // Output only. RagContextRecall score. - optional float score = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Explanation for rag context recall score. - string explanation = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Confidence for rag context recall score. - optional float confidence = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - // Input for tool call valid metric. message ToolCallValidInput { // Required. Spec for tool call valid metric. diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/extension.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/extension.proto index 59505d4cf406..0ca5bcf7fcf6 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/extension.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/extension.proto @@ -131,9 +131,14 @@ message Extension { [(google.api.field_behavior) = OPTIONAL]; // Optional. The PrivateServiceConnect config for the extension. - // If specified, the service endpoints associated with the Extension should be - // registered in the provided Service Directory + // If specified, the service endpoints associated with the + // Extension should be registered with private network access in the provided + // Service Directory // (https://cloud.google.com/service-directory/docs/configuring-private-network-access). + // + // If the service contains more than one endpoint with a network, the service + // will arbitrarilty choose one of the endpoints to use for extension + // execution. ExtensionPrivateServiceConnectConfig private_service_connect_config = 16 [(google.api.field_behavior) = OPTIONAL]; } @@ -190,9 +195,6 @@ message ExtensionOperation { // Auth configuration to run the extension. message AuthConfig { - // Empty message, used to indicate no authentication for an endpoint. - message NoAuth {} - // Config for authentication with API key. message ApiKeyConfig { // Required. The parameter name of the API key. diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/feature_online_store.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/feature_online_store.proto index a9a94c603341..e0ce1dbbb133 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/feature_online_store.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/feature_online_store.proto @@ -65,10 +65,8 @@ message FeatureOnlineStore { message Optimized {} // The dedicated serving endpoint for this FeatureOnlineStore. Only need to - // set when you choose Optimized storage type or enable EmbeddingManagement. - // Will use public endpoint by default. Note, for EmbeddingManagement use - // case, only [DedicatedServingEndpoint.public_endpoint_domain_name] is - // available now. + // set when you choose Optimized storage type. Public endpoint is provisioned + // by default. message DedicatedServingEndpoint { // Output only. This field will be populated with the domain name to use for // this FeatureOnlineStore @@ -89,8 +87,12 @@ message FeatureOnlineStore { string service_attachment = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; } + // Deprecated: This sub message is no longer needed anymore and embedding + // management is automatically enabled when specifying Optimized storage type. // Contains settings for embedding management. message EmbeddingManagement { + option deprecated = true; + // Optional. Immutable. Whether to enable embedding management in this // FeatureOnlineStore. It's immutable after creation to ensure the // FeatureOnlineStore availability. @@ -168,7 +170,8 @@ message FeatureOnlineStore { DedicatedServingEndpoint dedicated_serving_endpoint = 10 [(google.api.field_behavior) = OPTIONAL]; - // Optional. The settings for embedding management in FeatureOnlineStore. + // Optional. Deprecated: This field is no longer needed anymore and embedding + // management is automatically enabled when specifying Optimized storage type. EmbeddingManagement embedding_management = 11 - [(google.api.field_behavior) = OPTIONAL]; + [deprecated = true, (google.api.field_behavior) = OPTIONAL]; } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/feature_view.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/feature_view.proto index aa9f82e30d04..01294479e89d 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/feature_view.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/feature_view.proto @@ -118,9 +118,14 @@ message FeatureView { repeated string filter_columns = 4 [(google.api.field_behavior) = OPTIONAL]; // Optional. Column of crowding. This column contains crowding attribute - // which is a constraint on a neighbor list produced by nearest neighbor - // search requiring that no more than some value k' of the k neighbors - // returned have the same value of crowding_attribute. + // which is a constraint on a neighbor list produced by + // [FeatureOnlineStoreService.SearchNearestEntities][google.cloud.aiplatform.v1beta1.FeatureOnlineStoreService.SearchNearestEntities] + // to diversify search results. If + // [NearestNeighborQuery.per_crowding_attribute_neighbor_count][google.cloud.aiplatform.v1beta1.NearestNeighborQuery.per_crowding_attribute_neighbor_count] + // is set to K in + // [SearchNearestEntitiesRequest][google.cloud.aiplatform.v1beta1.SearchNearestEntitiesRequest], + // it's guaranteed that no more than K entities of the same crowding + // attribute are returned in the response. string crowding_column = 5 [(google.api.field_behavior) = OPTIONAL]; // Optional. The number of dimensions of the input embedding. @@ -132,6 +137,85 @@ message FeatureView { [(google.api.field_behavior) = OPTIONAL]; } + // Configuration for vector indexing. + message IndexConfig { + // Configuration options for using brute force search. + message BruteForceConfig {} + + // Configuration options for the tree-AH algorithm. + message TreeAHConfig { + // Optional. Number of embeddings on each leaf node. The default value is + // 1000 if not set. + optional int64 leaf_node_embedding_count = 1 + [(google.api.field_behavior) = OPTIONAL]; + } + + // The distance measure used in nearest neighbor search. + enum DistanceMeasureType { + // Should not be set. + DISTANCE_MEASURE_TYPE_UNSPECIFIED = 0; + + // Euclidean (L_2) Distance. + SQUARED_L2_DISTANCE = 1; + + // Cosine Distance. Defined as 1 - cosine similarity. + // + // We strongly suggest using DOT_PRODUCT_DISTANCE + UNIT_L2_NORM instead + // of COSINE distance. Our algorithms have been more optimized for + // DOT_PRODUCT distance which, when combined with UNIT_L2_NORM, is + // mathematically equivalent to COSINE distance and results in the same + // ranking. + COSINE_DISTANCE = 2; + + // Dot Product Distance. Defined as a negative of the dot product. + DOT_PRODUCT_DISTANCE = 3; + } + + // The configuration with regard to the algorithms used for efficient + // search. + oneof algorithm_config { + // Optional. Configuration options for the tree-AH algorithm (Shallow tree + // + Asymmetric Hashing). Please refer to this paper for more details: + // https://arxiv.org/abs/1908.10396 + TreeAHConfig tree_ah_config = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Configuration options for using brute force search, which + // simply implements the standard linear search in the database for each + // query. It is primarily meant for benchmarking and to generate the + // ground truth for approximate search. + BruteForceConfig brute_force_config = 7 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. Column of embedding. This column contains the source data to + // create index for vector search. embedding_column must be set when using + // vector search. + string embedding_column = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Columns of features that're used to filter vector search + // results. + repeated string filter_columns = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Column of crowding. This column contains crowding attribute + // which is a constraint on a neighbor list produced by + // [FeatureOnlineStoreService.SearchNearestEntities][google.cloud.aiplatform.v1beta1.FeatureOnlineStoreService.SearchNearestEntities] + // to diversify search results. If + // [NearestNeighborQuery.per_crowding_attribute_neighbor_count][google.cloud.aiplatform.v1beta1.NearestNeighborQuery.per_crowding_attribute_neighbor_count] + // is set to K in + // [SearchNearestEntitiesRequest][google.cloud.aiplatform.v1beta1.SearchNearestEntitiesRequest], + // it's guaranteed that no more than K entities of the same crowding + // attribute are returned in the response. + string crowding_column = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The number of dimensions of the input embedding. + optional int32 embedding_dimension = 4 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The distance measure used in nearest neighbor search. + DistanceMeasureType distance_measure_type = 5 + [(google.api.field_behavior) = OPTIONAL]; + } + // A Feature Registry source for features that need to be synced to Online // Store. message FeatureRegistrySource { @@ -221,6 +305,12 @@ message FeatureView { VectorSearchConfig vector_search_config = 8 [deprecated = true, (google.api.field_behavior) = OPTIONAL]; + // Optional. Configuration for index preparation for vector search. It + // contains the required configurations to create an index from source data, + // so that approximate nearest neighbor (a.k.a ANN) algorithms search can be + // performed during online serving. + IndexConfig index_config = 15 [(google.api.field_behavior) = OPTIONAL]; + // Optional. Service agent type used during data sync. By default, the Vertex // AI Service Agent is used. When using an IAM Policy to isolate this // FeatureView within a project, a separate service account should be diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/io.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/io.proto index d9ed3c4581d1..74c208dcd5dd 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/io.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/io.proto @@ -107,3 +107,33 @@ message ContainerRegistryDestination { // If a tag is not specified, "latest" will be used as the default tag. string output_uri = 1 [(google.api.field_behavior) = REQUIRED]; } + +// The Google Drive location for the input content. +message GoogleDriveSource { + // The type and ID of the Google Drive resource. + message ResourceId { + // The type of the Google Drive resource. + enum ResourceType { + // Unspecified resource type. + RESOURCE_TYPE_UNSPECIFIED = 0; + + // File resource type. + RESOURCE_TYPE_FILE = 1; + + // Folder resource type. + RESOURCE_TYPE_FOLDER = 2; + } + + // Required. The type of the Google Drive resource. + ResourceType resource_type = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The ID of the Google Drive resource. + string resource_id = 2 [(google.api.field_behavior) = REQUIRED]; + } + + // Required. Google Drive resource IDs. + repeated ResourceId resource_ids = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// The input content is encapsulated and uploaded in the request. +message DirectUploadSource {} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/machine_resources.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/machine_resources.proto index c51246f85462..6a5aa1d3cf43 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/machine_resources.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/machine_resources.proto @@ -232,3 +232,17 @@ message AutoscalingMetricSpec { // (representing 60%) if not provided. int32 target = 2; } + +// A set of Shielded Instance options. +// See [Images using supported Shielded VM +// features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm). +message ShieldedVmConfig { + // Defines whether the instance has [Secure + // Boot](https://cloud.google.com/compute/shielded-vm/docs/shielded-vm#secure-boot) + // enabled. + // + // Secure Boot helps ensure that the system only runs authentic software by + // verifying the digital signature of all boot components, and halting the + // boot process if signature verification fails. + bool enable_secure_boot = 1; +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/network_spec.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/network_spec.proto new file mode 100644 index 000000000000..9c563cf87072 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/network_spec.proto @@ -0,0 +1,50 @@ +// 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1beta1; + +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1"; +option go_package = "cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb;aiplatformpb"; +option java_multiple_files = true; +option java_outer_classname = "NetworkSpecProto"; +option java_package = "com.google.cloud.aiplatform.v1beta1"; +option php_namespace = "Google\\Cloud\\AIPlatform\\V1beta1"; +option ruby_package = "Google::Cloud::AIPlatform::V1beta1"; +option (google.api.resource_definition) = { + type: "compute.googleapis.com/Subnetwork" + pattern: "projects/{project}/regions/{region}/subnetworks/{subnetwork}" +}; + +// Network spec. +message NetworkSpec { + // Whether to enable public internet access. Default false. + bool enable_internet_access = 1; + + // The full name of the Google Compute Engine + // [network](https://cloud.google.com//compute/docs/networks-and-firewalls#networks) + string network = 2 [ + (google.api.resource_reference) = { type: "compute.googleapis.com/Network" } + ]; + + // The name of the subnet that this instance is in. + // Format: + // `projects/{project_id_or_number}/regions/{region}/subnetworks/{subnetwork_id}` + string subnetwork = 3 [(google.api.resource_reference) = { + type: "compute.googleapis.com/Subnetwork" + }]; +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/notebook_euc_config.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/notebook_euc_config.proto new file mode 100644 index 000000000000..718f3edd6643 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/notebook_euc_config.proto @@ -0,0 +1,44 @@ +// 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1beta1; + +import "google/api/field_behavior.proto"; + +option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1"; +option go_package = "cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb;aiplatformpb"; +option java_multiple_files = true; +option java_outer_classname = "NotebookEucConfigProto"; +option java_package = "com.google.cloud.aiplatform.v1beta1"; +option php_namespace = "Google\\Cloud\\AIPlatform\\V1beta1"; +option ruby_package = "Google::Cloud::AIPlatform::V1beta1"; + +// The euc configuration of NotebookRuntimeTemplate. +message NotebookEucConfig { + // Input only. Whether EUC is disabled in this NotebookRuntimeTemplate. + // In proto3, the default value of a boolean is false. In this way, by default + // EUC will be enabled for NotebookRuntimeTemplate. + bool euc_disabled = 1 [(google.api.field_behavior) = INPUT_ONLY]; + + // Output only. Whether ActAs check is bypassed for service account attached + // to the VM. If false, we need ActAs check for the default Compute Engine + // Service account. When a Runtime is created, a VM is allocated using Default + // Compute Engine Service Account. Any user requesting to use this Runtime + // requires Service Account User (ActAs) permission over this SA. If true, + // Runtime owner is using EUC and does not require the above permission as VM + // no longer use default Compute Engine SA, but a P4SA. + bool bypass_actas_check = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/notebook_idle_shutdown_config.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/notebook_idle_shutdown_config.proto new file mode 100644 index 000000000000..5806c94fd094 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/notebook_idle_shutdown_config.proto @@ -0,0 +1,41 @@ +// 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1beta1; + +import "google/api/field_behavior.proto"; +import "google/protobuf/duration.proto"; + +option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1"; +option go_package = "cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb;aiplatformpb"; +option java_multiple_files = true; +option java_outer_classname = "NotebookIdleShutdownConfigProto"; +option java_package = "com.google.cloud.aiplatform.v1beta1"; +option php_namespace = "Google\\Cloud\\AIPlatform\\V1beta1"; +option ruby_package = "Google::Cloud::AIPlatform::V1beta1"; + +// The idle shutdown configuration of NotebookRuntimeTemplate, which contains +// the idle_timeout as required field. +message NotebookIdleShutdownConfig { + // Required. Duration is accurate to the second. In Notebook, Idle Timeout is + // accurate to minute so the range of idle_timeout (second) is: 10 * 60 ~ 1440 + // * 60. + google.protobuf.Duration idle_timeout = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Whether Idle Shutdown is disabled in this NotebookRuntimeTemplate. + bool idle_shutdown_disabled = 2; +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/notebook_runtime.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/notebook_runtime.proto new file mode 100644 index 000000000000..72388582cc4f --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/notebook_runtime.proto @@ -0,0 +1,274 @@ +// 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1beta1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/aiplatform/v1beta1/machine_resources.proto"; +import "google/cloud/aiplatform/v1beta1/network_spec.proto"; +import "google/cloud/aiplatform/v1beta1/notebook_euc_config.proto"; +import "google/cloud/aiplatform/v1beta1/notebook_idle_shutdown_config.proto"; +import "google/cloud/aiplatform/v1beta1/notebook_runtime_template_ref.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1"; +option go_package = "cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb;aiplatformpb"; +option java_multiple_files = true; +option java_outer_classname = "NotebookRuntimeProto"; +option java_package = "com.google.cloud.aiplatform.v1beta1"; +option php_namespace = "Google\\Cloud\\AIPlatform\\V1beta1"; +option ruby_package = "Google::Cloud::AIPlatform::V1beta1"; + +// Represents a notebook runtime type. +enum NotebookRuntimeType { + // Unspecified notebook runtime type, NotebookRuntimeType will default to + // USER_DEFINED. + NOTEBOOK_RUNTIME_TYPE_UNSPECIFIED = 0; + + // runtime or template with coustomized configurations from user. + USER_DEFINED = 1; + + // runtime or template with system defined configurations. + ONE_CLICK = 2; +} + +// A template that specifies runtime configurations such as machine type, +// runtime version, network configurations, etc. +// Multiple runtimes can be created from a runtime template. +message NotebookRuntimeTemplate { + option (google.api.resource) = { + type: "aiplatform.googleapis.com/NotebookRuntimeTemplate" + pattern: "projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}" + }; + + // Output only. The resource name of the NotebookRuntimeTemplate. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The display name of the NotebookRuntimeTemplate. + // The name can be up to 128 characters long and can consist of any UTF-8 + // characters. + string display_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // The description of the NotebookRuntimeTemplate. + string description = 3; + + // Output only. The default template to use if not specified. + bool is_default = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Immutable. The specification of a single machine for the + // template. + MachineSpec machine_spec = 5 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Optional. The specification of [persistent + // disk][https://cloud.google.com/compute/docs/disks/persistent-disks] + // attached to the runtime as data disk storage. + PersistentDiskSpec data_persistent_disk_spec = 8 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Network spec. + NetworkSpec network_spec = 12 [(google.api.field_behavior) = OPTIONAL]; + + // The service account that the runtime workload runs as. + // You can use any service account within the same project, but you + // must have the service account user permission to use the instance. + // + // If not specified, the [Compute Engine default service + // account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) + // is used. + string service_account = 13; + + // Used to perform consistent read-modify-write updates. If not set, a blind + // "overwrite" update happens. + string etag = 14; + + // The labels with user-defined metadata to organize the + // NotebookRuntimeTemplates. + // + // Label keys and values can be no longer than 64 characters + // (Unicode codepoints), can only contain lowercase letters, numeric + // characters, underscores and dashes. International characters are allowed. + // + // See https://goo.gl/xmQnxf for more information and examples of labels. + map labels = 15; + + // The idle shutdown configuration of NotebookRuntimeTemplate. This config + // will only be set when idle shutdown is enabled. + NotebookIdleShutdownConfig idle_shutdown_config = 17; + + // EUC configuration of the NotebookRuntimeTemplate. + NotebookEucConfig euc_config = 18; + + // Output only. Timestamp when this NotebookRuntimeTemplate was created. + google.protobuf.Timestamp create_time = 10 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Timestamp when this NotebookRuntimeTemplate was most recently + // updated. + google.protobuf.Timestamp update_time = 11 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Immutable. The type of the notebook runtime template. + NotebookRuntimeType notebook_runtime_type = 19 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Optional. Immutable. Runtime Shielded VM spec. + ShieldedVmConfig shielded_vm_config = 20 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Optional. The Compute Engine tags to add to runtime (see [Tagging + // instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)). + repeated string network_tags = 21 [(google.api.field_behavior) = OPTIONAL]; +} + +// A runtime is a virtual machine allocated to a particular user for a +// particular Notebook file on temporary basis with lifetime limited to 24 +// hours. +message NotebookRuntime { + option (google.api.resource) = { + type: "aiplatform.googleapis.com/NotebookRuntime" + pattern: "projects/{project}/locations/{location}/notebookRuntimes/{notebook_runtime}" + }; + + // The substate of the NotebookRuntime to display health information. + enum HealthState { + // Unspecified health state. + HEALTH_STATE_UNSPECIFIED = 0; + + // NotebookRuntime is in healthy state. Applies to ACTIVE state. + HEALTHY = 1; + + // NotebookRuntime is in unhealthy state. Applies to ACTIVE state. + UNHEALTHY = 2; + } + + // The substate of the NotebookRuntime to display state of runtime. + // The resource of NotebookRuntime is in ACTIVE state for these sub state. + enum RuntimeState { + // Unspecified runtime state. + RUNTIME_STATE_UNSPECIFIED = 0; + + // NotebookRuntime is in running state. + RUNNING = 1; + + // NotebookRuntime is in starting state. + BEING_STARTED = 2; + + // NotebookRuntime is in stopping state. + BEING_STOPPED = 3; + + // NotebookRuntime is in stopped state. + STOPPED = 4; + + // NotebookRuntime is in upgrading state. It is in the middle of upgrading + // process. + BEING_UPGRADED = 5; + + // NotebookRuntime was unable to start/stop properly. + ERROR = 100; + + // NotebookRuntime is in invalid state. Cannot be recovered. + INVALID = 101; + } + + // Output only. The resource name of the NotebookRuntime. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The user email of the NotebookRuntime. + string runtime_user = 2 [(google.api.field_behavior) = REQUIRED]; + + // Output only. The pointer to NotebookRuntimeTemplate this NotebookRuntime is + // created from. + NotebookRuntimeTemplateRef notebook_runtime_template_ref = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The proxy endpoint used to access the NotebookRuntime. + string proxy_uri = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Timestamp when this NotebookRuntime was created. + google.protobuf.Timestamp create_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Timestamp when this NotebookRuntime was most recently updated. + google.protobuf.Timestamp update_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The health state of the NotebookRuntime. + HealthState health_state = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The display name of the NotebookRuntime. + // The name can be up to 128 characters long and can consist of any UTF-8 + // characters. + string display_name = 10 [(google.api.field_behavior) = REQUIRED]; + + // The description of the NotebookRuntime. + string description = 11; + + // Output only. The service account that the NotebookRuntime workload runs as. + string service_account = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The runtime (instance) state of the NotebookRuntime. + RuntimeState runtime_state = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Whether NotebookRuntime is upgradable. + bool is_upgradable = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The labels with user-defined metadata to organize your + // NotebookRuntime. + // + // Label keys and values can be no longer than 64 characters + // (Unicode codepoints), can only contain lowercase letters, numeric + // characters, underscores and dashes. International characters are allowed. + // No more than 64 user labels can be associated with one NotebookRuntime + // (System labels are excluded). + // + // See https://goo.gl/xmQnxf for more information and examples of labels. + // System reserved label keys are prefixed with "aiplatform.googleapis.com/" + // and are immutable. Following system labels exist for NotebookRuntime: + // + // * "aiplatform.googleapis.com/notebook_runtime_gce_instance_id": output + // only, its value is the Compute Engine instance id. + // * "aiplatform.googleapis.com/colab_enterprise_entry_service": its value is + // either "bigquery" or "vertex"; if absent, it should be "vertex". This is to + // describe the entry service, either BigQuery or Vertex. + map labels = 16; + + // Output only. Timestamp when this NotebookRuntime will be expired: + // 1. System Predefined NotebookRuntime: 24 hours after creation. After + // expiration, system predifined runtime will be deleted. + // 2. User created NotebookRuntime: 6 months after last upgrade. After + // expiration, user created runtime will be stopped and allowed for upgrade. + google.protobuf.Timestamp expiration_time = 17 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The VM os image version of NotebookRuntime. + string version = 18 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The type of the notebook runtime. + NotebookRuntimeType notebook_runtime_type = 19 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The Compute Engine tags to add to runtime (see [Tagging + // instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)). + repeated string network_tags = 25 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/notebook_runtime_template_ref.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/notebook_runtime_template_ref.proto new file mode 100644 index 000000000000..fa20140927b0 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/notebook_runtime_template_ref.proto @@ -0,0 +1,39 @@ +// 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1beta1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1"; +option go_package = "cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb;aiplatformpb"; +option java_multiple_files = true; +option java_outer_classname = "NotebookRuntimeTemplateRefProto"; +option java_package = "com.google.cloud.aiplatform.v1beta1"; +option php_namespace = "Google\\Cloud\\AIPlatform\\V1beta1"; +option ruby_package = "Google::Cloud::AIPlatform::V1beta1"; + +// Points to a NotebookRuntimeTemplateRef. +message NotebookRuntimeTemplateRef { + // Immutable. A resource name of the NotebookRuntimeTemplate. + string notebook_runtime_template = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/NotebookRuntimeTemplate" + } + ]; +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/notebook_service.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/notebook_service.proto new file mode 100644 index 000000000000..50cf6bd7d0cd --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/notebook_service.proto @@ -0,0 +1,512 @@ +// 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1beta1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/aiplatform/v1beta1/notebook_runtime.proto"; +import "google/cloud/aiplatform/v1beta1/operation.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; + +option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1"; +option go_package = "cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb;aiplatformpb"; +option java_multiple_files = true; +option java_outer_classname = "NotebookServiceProto"; +option java_package = "com.google.cloud.aiplatform.v1beta1"; +option php_namespace = "Google\\Cloud\\AIPlatform\\V1beta1"; +option ruby_package = "Google::Cloud::AIPlatform::V1beta1"; + +// The interface for Vertex Notebook service (a.k.a. Colab on Workbench). +service NotebookService { + option (google.api.default_host) = "aiplatform.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Creates a NotebookRuntimeTemplate. + rpc CreateNotebookRuntimeTemplate(CreateNotebookRuntimeTemplateRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*}/notebookRuntimeTemplates" + body: "notebook_runtime_template" + }; + option (google.api.method_signature) = + "parent,notebook_runtime_template,notebook_runtime_template_id"; + option (google.longrunning.operation_info) = { + response_type: "NotebookRuntimeTemplate" + metadata_type: "CreateNotebookRuntimeTemplateOperationMetadata" + }; + } + + // Gets a NotebookRuntimeTemplate. + rpc GetNotebookRuntimeTemplate(GetNotebookRuntimeTemplateRequest) + returns (NotebookRuntimeTemplate) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/notebookRuntimeTemplates/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists NotebookRuntimeTemplates in a Location. + rpc ListNotebookRuntimeTemplates(ListNotebookRuntimeTemplatesRequest) + returns (ListNotebookRuntimeTemplatesResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*}/notebookRuntimeTemplates" + }; + option (google.api.method_signature) = "parent"; + } + + // Deletes a NotebookRuntimeTemplate. + rpc DeleteNotebookRuntimeTemplate(DeleteNotebookRuntimeTemplateRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/locations/*/notebookRuntimeTemplates/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "DeleteOperationMetadata" + }; + } + + // Assigns a NotebookRuntime to a user for a particular Notebook file. This + // method will either returns an existing assignment or generates a new one. + rpc AssignNotebookRuntime(AssignNotebookRuntimeRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*}/notebookRuntimes:assign" + body: "*" + }; + option (google.api.method_signature) = + "parent,notebook_runtime_template,notebook_runtime,notebook_runtime_id"; + option (google.longrunning.operation_info) = { + response_type: "NotebookRuntime" + metadata_type: "AssignNotebookRuntimeOperationMetadata" + }; + } + + // Gets a NotebookRuntime. + rpc GetNotebookRuntime(GetNotebookRuntimeRequest) returns (NotebookRuntime) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/notebookRuntimes/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists NotebookRuntimes in a Location. + rpc ListNotebookRuntimes(ListNotebookRuntimesRequest) + returns (ListNotebookRuntimesResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*}/notebookRuntimes" + }; + option (google.api.method_signature) = "parent"; + } + + // Deletes a NotebookRuntime. + rpc DeleteNotebookRuntime(DeleteNotebookRuntimeRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/locations/*/notebookRuntimes/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "DeleteOperationMetadata" + }; + } + + // Upgrades a NotebookRuntime. + rpc UpgradeNotebookRuntime(UpgradeNotebookRuntimeRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/notebookRuntimes/*}:upgrade" + body: "*" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "UpgradeNotebookRuntimeResponse" + metadata_type: "UpgradeNotebookRuntimeOperationMetadata" + }; + } + + // Starts a NotebookRuntime. + rpc StartNotebookRuntime(StartNotebookRuntimeRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/notebookRuntimes/*}:start" + body: "*" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "StartNotebookRuntimeResponse" + metadata_type: "StartNotebookRuntimeOperationMetadata" + }; + } +} + +// Request message for +// [NotebookService.CreateNotebookRuntimeTemplate][google.cloud.aiplatform.v1beta1.NotebookService.CreateNotebookRuntimeTemplate]. +message CreateNotebookRuntimeTemplateRequest { + // Required. The resource name of the Location to create the + // NotebookRuntimeTemplate. Format: `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. The NotebookRuntimeTemplate to create. + NotebookRuntimeTemplate notebook_runtime_template = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. User specified ID for the notebook runtime template. + string notebook_runtime_template_id = 3 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Metadata information for +// [NotebookService.CreateNotebookRuntimeTemplate][google.cloud.aiplatform.v1beta1.NotebookService.CreateNotebookRuntimeTemplate]. +message CreateNotebookRuntimeTemplateOperationMetadata { + // The operation generic information. + GenericOperationMetadata generic_metadata = 1; +} + +// Request message for +// [NotebookService.GetNotebookRuntimeTemplate][google.cloud.aiplatform.v1beta1.NotebookService.GetNotebookRuntimeTemplate] +message GetNotebookRuntimeTemplateRequest { + // Required. The name of the NotebookRuntimeTemplate resource. + // Format: + // `projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/NotebookRuntimeTemplate" + } + ]; +} + +// Request message for +// [NotebookService.ListNotebookRuntimeTemplates][google.cloud.aiplatform.v1beta1.NotebookService.ListNotebookRuntimeTemplates]. +message ListNotebookRuntimeTemplatesRequest { + // Required. The resource name of the Location from which to list the + // NotebookRuntimeTemplates. + // Format: `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Optional. An expression for filtering the results of the request. For field + // names both snake_case and camelCase are supported. + // + // * `notebookRuntimeTemplate` supports = and !=. `notebookRuntimeTemplate` + // represents the NotebookRuntimeTemplate ID, + // i.e. the last segment of the NotebookRuntimeTemplate's [resource name] + // [google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate.name]. + // * `display_name` supports = and != + // * `labels` supports general map functions that is: + // * `labels.key=value` - key:value equality + // * `labels.key:* or labels:key - key existence + // * A key including a space must be quoted. `labels."a key"`. + // * `notebookRuntimeType` supports = and !=. notebookRuntimeType enum: + // [USER_DEFINED, ONE_CLICK]. + // + // Some examples: + // + // * `notebookRuntimeTemplate=notebookRuntimeTemplate123` + // * `displayName="myDisplayName"` + // * `labels.myKey="myValue"` + // * `notebookRuntimeType=USER_DEFINED` + string filter = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The standard list page size. + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The standard list page token. + // Typically obtained via + // [ListNotebookRuntimeTemplatesResponse.next_page_token][google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesResponse.next_page_token] + // of the previous + // [NotebookService.ListNotebookRuntimeTemplates][google.cloud.aiplatform.v1beta1.NotebookService.ListNotebookRuntimeTemplates] + // call. + string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Mask specifying which fields to read. + google.protobuf.FieldMask read_mask = 5 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A comma-separated list of fields to order by, sorted in ascending + // order. Use "desc" after a field name for descending. Supported fields: + // + // * `display_name` + // * `create_time` + // * `update_time` + // + // Example: `display_name, create_time desc`. + string order_by = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for +// [NotebookService.ListNotebookRuntimeTemplates][google.cloud.aiplatform.v1beta1.NotebookService.ListNotebookRuntimeTemplates]. +message ListNotebookRuntimeTemplatesResponse { + // List of NotebookRuntimeTemplates in the requested page. + repeated NotebookRuntimeTemplate notebook_runtime_templates = 1; + + // A token to retrieve next page of results. + // Pass to + // [ListNotebookRuntimeTemplatesRequest.page_token][google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesRequest.page_token] + // to obtain that page. + string next_page_token = 2; +} + +// Request message for +// [NotebookService.DeleteNotebookRuntimeTemplate][google.cloud.aiplatform.v1beta1.NotebookService.DeleteNotebookRuntimeTemplate]. +message DeleteNotebookRuntimeTemplateRequest { + // Required. The name of the NotebookRuntimeTemplate resource to be deleted. + // Format: + // `projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/NotebookRuntimeTemplate" + } + ]; +} + +// Request message for +// [NotebookService.AssignNotebookRuntime][google.cloud.aiplatform.v1beta1.NotebookService.AssignNotebookRuntime]. +message AssignNotebookRuntimeRequest { + // Required. The resource name of the Location to get the NotebookRuntime + // assignment. Format: `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. The resource name of the NotebookRuntimeTemplate based on which a + // NotebookRuntime will be assigned (reuse or create a new one). + string notebook_runtime_template = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/NotebookRuntimeTemplate" + } + ]; + + // Required. Provide runtime specific information (e.g. runtime owner, + // notebook id) used for NotebookRuntime assignment. + NotebookRuntime notebook_runtime = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. User specified ID for the notebook runtime. + string notebook_runtime_id = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Metadata information for +// [NotebookService.AssignNotebookRuntime][google.cloud.aiplatform.v1beta1.NotebookService.AssignNotebookRuntime]. +message AssignNotebookRuntimeOperationMetadata { + // The operation generic information. + GenericOperationMetadata generic_metadata = 1; + + // A human-readable message that shows the intermediate progress details of + // NotebookRuntime. + string progress_message = 2; +} + +// Request message for +// [NotebookService.GetNotebookRuntime][google.cloud.aiplatform.v1beta1.NotebookService.GetNotebookRuntime] +message GetNotebookRuntimeRequest { + // Required. The name of the NotebookRuntime resource. + // Instead of checking whether the name is in valid NotebookRuntime resource + // name format, directly throw NotFound exception if there is no such + // NotebookRuntime in spanner. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/NotebookRuntime" + } + ]; +} + +// Request message for +// [NotebookService.ListNotebookRuntimes][google.cloud.aiplatform.v1beta1.NotebookService.ListNotebookRuntimes]. +message ListNotebookRuntimesRequest { + // Required. The resource name of the Location from which to list the + // NotebookRuntimes. + // Format: `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Optional. An expression for filtering the results of the request. For field + // names both snake_case and camelCase are supported. + // + // * `notebookRuntime` supports = and !=. `notebookRuntime` represents the + // NotebookRuntime ID, + // i.e. the last segment of the NotebookRuntime's [resource name] + // [google.cloud.aiplatform.v1beta1.NotebookRuntime.name]. + // * `displayName` supports = and != and regex. + // * `notebookRuntimeTemplate` supports = and !=. `notebookRuntimeTemplate` + // represents the NotebookRuntimeTemplate ID, + // i.e. the last segment of the NotebookRuntimeTemplate's [resource name] + // [google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate.name]. + // * `healthState` supports = and !=. healthState enum: [HEALTHY, UNHEALTHY, + // HEALTH_STATE_UNSPECIFIED]. + // * `runtimeState` supports = and !=. runtimeState enum: + // [RUNTIME_STATE_UNSPECIFIED, RUNNING, BEING_STARTED, BEING_STOPPED, + // STOPPED, BEING_UPGRADED, ERROR, INVALID]. + // * `runtimeUser` supports = and !=. + // * API version is UI only: `uiState` supports = and !=. uiState enum: + // [UI_RESOURCE_STATE_UNSPECIFIED, UI_RESOURCE_STATE_BEING_CREATED, + // UI_RESOURCE_STATE_ACTIVE, UI_RESOURCE_STATE_BEING_DELETED, + // UI_RESOURCE_STATE_CREATION_FAILED]. + // * `notebookRuntimeType` supports = and !=. notebookRuntimeType enum: + // [USER_DEFINED, ONE_CLICK]. + // + // Some examples: + // + // * `notebookRuntime="notebookRuntime123"` + // * `displayName="myDisplayName"` and `displayName=~"myDisplayNameRegex"` + // * `notebookRuntimeTemplate="notebookRuntimeTemplate321"` + // * `healthState=HEALTHY` + // * `runtimeState=RUNNING` + // * `runtimeUser="test@google.com"` + // * `uiState=UI_RESOURCE_STATE_BEING_DELETED` + // * `notebookRuntimeType=USER_DEFINED` + string filter = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The standard list page size. + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The standard list page token. + // Typically obtained via + // [ListNotebookRuntimesResponse.next_page_token][google.cloud.aiplatform.v1beta1.ListNotebookRuntimesResponse.next_page_token] + // of the previous + // [NotebookService.ListNotebookRuntimes][google.cloud.aiplatform.v1beta1.NotebookService.ListNotebookRuntimes] + // call. + string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Mask specifying which fields to read. + google.protobuf.FieldMask read_mask = 5 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A comma-separated list of fields to order by, sorted in ascending + // order. Use "desc" after a field name for descending. Supported fields: + // + // * `display_name` + // * `create_time` + // * `update_time` + // + // Example: `display_name, create_time desc`. + string order_by = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for +// [NotebookService.ListNotebookRuntimes][google.cloud.aiplatform.v1beta1.NotebookService.ListNotebookRuntimes]. +message ListNotebookRuntimesResponse { + // List of NotebookRuntimes in the requested page. + repeated NotebookRuntime notebook_runtimes = 1; + + // A token to retrieve next page of results. + // Pass to + // [ListNotebookRuntimesRequest.page_token][google.cloud.aiplatform.v1beta1.ListNotebookRuntimesRequest.page_token] + // to obtain that page. + string next_page_token = 2; +} + +// Request message for +// [NotebookService.DeleteNotebookRuntime][google.cloud.aiplatform.v1beta1.NotebookService.DeleteNotebookRuntime]. +message DeleteNotebookRuntimeRequest { + // Required. The name of the NotebookRuntime resource to be deleted. + // Instead of checking whether the name is in valid NotebookRuntime resource + // name format, directly throw NotFound exception if there is no such + // NotebookRuntime in spanner. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/NotebookRuntime" + } + ]; +} + +// Request message for +// [NotebookService.UpgradeNotebookRuntime][google.cloud.aiplatform.v1beta1.NotebookService.UpgradeNotebookRuntime]. +message UpgradeNotebookRuntimeRequest { + // Required. The name of the NotebookRuntime resource to be upgrade. + // Instead of checking whether the name is in valid NotebookRuntime resource + // name format, directly throw NotFound exception if there is no such + // NotebookRuntime in spanner. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/NotebookRuntime" + } + ]; +} + +// Metadata information for +// [NotebookService.UpgradeNotebookRuntime][google.cloud.aiplatform.v1beta1.NotebookService.UpgradeNotebookRuntime]. +message UpgradeNotebookRuntimeOperationMetadata { + // The operation generic information. + GenericOperationMetadata generic_metadata = 1; + + // A human-readable message that shows the intermediate progress details of + // NotebookRuntime. + string progress_message = 2; +} + +// Response message for +// [NotebookService.UpgradeNotebookRuntime][google.cloud.aiplatform.v1beta1.NotebookService.UpgradeNotebookRuntime]. +message UpgradeNotebookRuntimeResponse {} + +// Request message for +// [NotebookService.StartNotebookRuntime][google.cloud.aiplatform.v1beta1.NotebookService.StartNotebookRuntime]. +message StartNotebookRuntimeRequest { + // Required. The name of the NotebookRuntime resource to be started. + // Instead of checking whether the name is in valid NotebookRuntime resource + // name format, directly throw NotFound exception if there is no such + // NotebookRuntime in spanner. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/NotebookRuntime" + } + ]; +} + +// Metadata information for +// [NotebookService.StartNotebookRuntime][google.cloud.aiplatform.v1beta1.NotebookService.StartNotebookRuntime]. +message StartNotebookRuntimeOperationMetadata { + // The operation generic information. + GenericOperationMetadata generic_metadata = 1; + + // A human-readable message that shows the intermediate progress details of + // NotebookRuntime. + string progress_message = 2; +} + +// Response message for +// [NotebookService.StartNotebookRuntime][google.cloud.aiplatform.v1beta1.NotebookService.StartNotebookRuntime]. +message StartNotebookRuntimeResponse {} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/openapi.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/openapi.proto index f0759d7cef00..ba59d35ffaf0 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/openapi.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/openapi.proto @@ -62,30 +62,69 @@ message Schema { // Optional. The format of the data. // Supported formats: - // for NUMBER type: float, double - // for INTEGER type: int32, int64 + // for NUMBER type: "float", "double" + // for INTEGER type: "int32", "int64" + // for STRING type: "email", "byte", etc string format = 7 [(google.api.field_behavior) = OPTIONAL]; + // Optional. The title of the Schema. + string title = 24 [(google.api.field_behavior) = OPTIONAL]; + // Optional. The description of the data. string description = 8 [(google.api.field_behavior) = OPTIONAL]; // Optional. Indicates if the value may be null. bool nullable = 6 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Schema of the elements of Type.ARRAY. + // Optional. Default value of the data. + google.protobuf.Value default = 23 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. SCHEMA FIELDS FOR TYPE ARRAY + // Schema of the elements of Type.ARRAY. Schema items = 2 [(google.api.field_behavior) = OPTIONAL]; + // Optional. Minimum number of the elements for Type.ARRAY. + int64 min_items = 21 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Maximum number of the elements for Type.ARRAY. + int64 max_items = 22 [(google.api.field_behavior) = OPTIONAL]; + // Optional. Possible values of the element of Type.STRING with enum format. // For example we can define an Enum Direction as : // {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]} repeated string enum = 9 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Properties of Type.OBJECT. + // Optional. SCHEMA FIELDS FOR TYPE OBJECT + // Properties of Type.OBJECT. map properties = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. Required properties of Type.OBJECT. repeated string required = 5 [(google.api.field_behavior) = OPTIONAL]; + // Optional. Minimum number of the properties for Type.OBJECT. + int64 min_properties = 14 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Maximum number of the properties for Type.OBJECT. + int64 max_properties = 15 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER + // Minimum value of the Type.INTEGER and Type.NUMBER + double minimum = 16 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Maximum value of the Type.INTEGER and Type.NUMBER + double maximum = 17 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. SCHEMA FIELDS FOR TYPE STRING + // Minimum length of the Type.STRING + int64 min_length = 18 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Maximum length of the Type.STRING + int64 max_length = 19 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Pattern of the Type.STRING to restrict a string to a regular + // expression. + string pattern = 20 [(google.api.field_behavior) = OPTIONAL]; + // Optional. Example of the object. Will only populated when the object is the // root. google.protobuf.Value example = 4 [(google.api.field_behavior) = OPTIONAL]; diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/persistent_resource.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/persistent_resource.proto index 8e2aa894b528..f7b0c7e9972b 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/persistent_resource.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/persistent_resource.proto @@ -60,6 +60,13 @@ message PersistentResource { // The ERROR state indicates the persistent resource may be unusable. // Details can be found in the `error` field. ERROR = 5; + + // The REBOOTING state indicates the persistent resource is being rebooted + // (PR is not available right now but is expected to be ready again later). + REBOOTING = 6; + + // The UPDATING state indicates the persistent resource is being updated. + UPDATING = 7; } // Immutable. Resource name of a PersistentResource. @@ -252,6 +259,18 @@ message ResourceRuntime { // } map access_uris = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The resource name of NotebookRuntimeTemplate for the RoV + // Persistent Cluster The NotebokRuntimeTemplate is created in the same VPC + // (if set), and with the same Ray and Python version as the Persistent + // Cluster. Example: + // "projects/1000/locations/us-central1/notebookRuntimeTemplates/abc123" + string notebook_runtime_template = 2 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/NotebookRuntimeTemplate" + } + ]; } // Configuration for the use of custom service account to run the workloads. @@ -263,18 +282,17 @@ message ServiceAccountSpec { bool enable_custom_service_account = 1 [(google.api.field_behavior) = REQUIRED]; - // Optional. Default service account that this PersistentResource's workloads - // run as. The workloads include: - // - // * Any runtime specified via `ResourceRuntimeSpec` on creation time, - // for example, Ray. - // * Jobs submitted to PersistentResource, if no other service account - // specified in the job specs. + // Optional. Required when all below conditions are met + // * `enable_custom_service_account` is true; + // * any runtime is specified via `ResourceRuntimeSpec` on creation time, + // for example, Ray // - // Only works when custom service account is enabled and users have the - // `iam.serviceAccounts.actAs` permission on this service account. + // The users must have `iam.serviceAccounts.actAs` permission on this service + // account and then the specified runtime containers will run as it. // - // Required if any containers are specified in `ResourceRuntimeSpec`. + // Do not set this field if you want to submit jobs using custom service + // account to this PersistentResource after creation, but only specify the + // `service_account` inside the job. string service_account = 2 [(google.api.field_behavior) = OPTIONAL]; } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/persistent_resource_service.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/persistent_resource_service.proto index d68d30c10cbb..50a5d872233d 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/persistent_resource_service.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/persistent_resource_service.proto @@ -99,6 +99,20 @@ service PersistentResourceService { metadata_type: "UpdatePersistentResourceOperationMetadata" }; } + + // Reboots a PersistentResource. + rpc RebootPersistentResource(RebootPersistentResourceRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/persistentResources/*}:reboot" + body: "*" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "PersistentResource" + metadata_type: "RebootPersistentResourceOperationMetadata" + }; + } } // Request message for @@ -143,6 +157,15 @@ message UpdatePersistentResourceOperationMetadata { string progress_message = 2; } +// Details of operations that perform reboot PersistentResource. +message RebootPersistentResourceOperationMetadata { + // Operation metadata for PersistentResource. + GenericOperationMetadata generic_metadata = 1; + + // Progress Message for Reboot LRO + string progress_message = 2; +} + // Request message for // [PersistentResourceService.GetPersistentResource][google.cloud.aiplatform.v1beta1.PersistentResourceService.GetPersistentResource]. message GetPersistentResourceRequest { @@ -219,3 +242,17 @@ message UpdatePersistentResourceRequest { google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; } + +// Request message for +// [PersistentResourceService.RebootPersistentResource][google.cloud.aiplatform.v1beta1.PersistentResourceService.RebootPersistentResource]. +message RebootPersistentResourceRequest { + // Required. The name of the PersistentResource resource. + // Format: + // `projects/{project_id_or_number}/locations/{location_id}/persistentResources/{persistent_resource_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/PersistentResource" + } + ]; +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/prediction_service.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/prediction_service.proto index 8e2e1cd1fc5b..08a696ef4d8d 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/prediction_service.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/prediction_service.proto @@ -189,6 +189,16 @@ service PredictionService { }; option (google.api.method_signature) = "model,contents"; } + + // Exposes an OpenAI-compatible endpoint for chat completions. + rpc ChatCompletions(ChatCompletionsRequest) + returns (stream google.api.HttpBody) { + option (google.api.http) = { + post: "/v1beta1/{endpoint=projects/*/locations/*/endpoints/*}/chat/completions" + body: "http_body" + }; + option (google.api.method_signature) = "endpoint,http_body"; + } } // Request message for @@ -661,6 +671,12 @@ message GenerateContentRequest { // request. repeated Content contents = 2 [(google.api.field_behavior) = REQUIRED]; + // Optional. The user provided system instructions for the model. + // Note: only text should be used in parts and content in each part will be in + // a separate paragraph. + optional Content system_instruction = 8 + [(google.api.field_behavior) = OPTIONAL]; + // Optional. A list of `Tools` the model may use to generate the next // response. // @@ -669,7 +685,8 @@ message GenerateContentRequest { // knowledge and scope of the model. repeated Tool tools = 6 [(google.api.field_behavior) = OPTIONAL]; - // Tool config. This config is shared for all tools provided in the request. + // Optional. Tool config. This config is shared for all tools provided in the + // request. ToolConfig tool_config = 7 [(google.api.field_behavior) = OPTIONAL]; // Optional. Per request settings for blocking unsafe content. @@ -696,6 +713,13 @@ message GenerateContentResponse { // Candidates blocked due to other reason. OTHER = 2; + + // Candidates blocked due to the terms which are included from the + // terminology blocklist. + BLOCKLIST = 3; + + // Candidates blocked due to prohibited content. + PROHIBITED_CONTENT = 4; } // Output only. Blocked reason. @@ -732,3 +756,20 @@ message GenerateContentResponse { // Usage metadata about the response(s). UsageMetadata usage_metadata = 4; } + +// Request message for [PredictionService.ChatCompletions] +message ChatCompletionsRequest { + // Required. The name of the Endpoint requested to serve the prediction. + // Format: + // `projects/{project}/locations/{location}/endpoints/openapi` + string endpoint = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/Endpoint" + } + ]; + + // Optional. The prediction input. Supports HTTP headers and arbitrary data + // payload. + google.api.HttpBody http_body = 2 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/tool.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/tool.proto index 67572b314bd9..6160bd00b39e 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/tool.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/tool.proto @@ -167,6 +167,10 @@ message Retrieval { oneof source { // Set to use data source powered by Vertex AI Search. VertexAISearch vertex_ai_search = 2; + + // Set to use data source powered by Vertex RAG store. + // User data is uploaded via the VertexRagDataService. + VertexRagStore vertex_rag_store = 4; } // Optional. Disable using the result from this tool in detecting grounding @@ -175,11 +179,30 @@ message Retrieval { bool disable_attribution = 3 [(google.api.field_behavior) = OPTIONAL]; } +// Retrieve from Vertex RAG Store for grounding. +message VertexRagStore { + // Required. Vertex RAG Store corpus resource name: + // `projects/{project}/locations/{location}/ragCorpora/{ragCorpus}` + // Currently only one corpus is allowed. + // In the future we may open up multiple corpora support. However, they should + // be from the same project and location. + repeated string rag_corpora = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/RagCorpus" + } + ]; + + // Optional. Number of top k results to return from the selected corpora. + optional int32 similarity_top_k = 2 [(google.api.field_behavior) = OPTIONAL]; +} + // Retrieve from Vertex AI Search datastore for grounding. // See https://cloud.google.com/vertex-ai-search-and-conversation message VertexAISearch { // Required. Fully-qualified Vertex AI Search's datastore resource ID. - // projects/<>/locations/<>/collections/<>/dataStores/<> + // Format: + // `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}` string datastore = 1 [(google.api.field_behavior) = REQUIRED]; } @@ -193,7 +216,7 @@ message GoogleSearchRetrieval { // Tool config. This config is shared for all tools provided in the request. message ToolConfig { - // Function calling config. + // Optional. Function calling config. FunctionCallingConfig function_calling_config = 1 [(google.api.field_behavior) = OPTIONAL]; } @@ -204,24 +227,28 @@ message FunctionCallingConfig { enum Mode { // Unspecified function calling mode. This value should not be used. MODE_UNSPECIFIED = 0; + // Default model behavior, model decides to predict either a function call // or a natural language repspose. AUTO = 1; + // Model is constrained to always predicting a function call only. // If "allowed_function_names" are set, the predicted function call will be // limited to any one of "allowed_function_names", else the predicted // function call will be any one of the provided "function_declarations". ANY = 2; + // Model will not predict any function call. Model behavior is same as when // not passing any function declarations. NONE = 3; } - // Function calling mode. + + // Optional. Function calling mode. Mode mode = 1 [(google.api.field_behavior) = OPTIONAL]; - // Function names to call. Only set when the Mode is ANY. Function names - // should match [FunctionDeclaration.name]. With mode set to ANY, model will - // predict a function call from the set of function names provided. + // Optional. Function names to call. Only set when the Mode is ANY. Function + // names should match [FunctionDeclaration.name]. With mode set to ANY, model + // will predict a function call from the set of function names provided. repeated string allowed_function_names = 2 [(google.api.field_behavior) = OPTIONAL]; } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/vertex_rag_data.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/vertex_rag_data.proto new file mode 100644 index 000000000000..873a8338fdc6 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/vertex_rag_data.proto @@ -0,0 +1,158 @@ +// 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1beta1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/aiplatform/v1beta1/io.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1"; +option go_package = "cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb;aiplatformpb"; +option java_multiple_files = true; +option java_outer_classname = "VertexRagDataProto"; +option java_package = "com.google.cloud.aiplatform.v1beta1"; +option php_namespace = "Google\\Cloud\\AIPlatform\\V1beta1"; +option ruby_package = "Google::Cloud::AIPlatform::V1beta1"; + +// A RagCorpus is a RagFile container and a project can have multiple +// RagCorpora. +message RagCorpus { + option (google.api.resource) = { + type: "aiplatform.googleapis.com/RagCorpus" + pattern: "projects/{project}/locations/{location}/ragCorpora/{rag_corpus}" + plural: "ragCorpora" + singular: "ragCorpus" + }; + + // Output only. The resource name of the RagCorpus. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The display name of the RagCorpus. + // The name can be up to 128 characters long and can consist of any UTF-8 + // characters. + string display_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The description of the RagCorpus. + string description = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Timestamp when this RagCorpus was created. + google.protobuf.Timestamp create_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Timestamp when this RagCorpus was last updated. + google.protobuf.Timestamp update_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A RagFile contains user data for chunking, embedding and indexing. +message RagFile { + option (google.api.resource) = { + type: "aiplatform.googleapis.com/RagFile" + pattern: "projects/{project}/locations/{location}/ragCorpora/{rag_corpus}/ragFiles/{rag_file}" + plural: "ragFiles" + singular: "ragFile" + }; + + // The type of the RagFile. + enum RagFileType { + // RagFile type is unspecified. + RAG_FILE_TYPE_UNSPECIFIED = 0; + + // RagFile type is TXT. + RAG_FILE_TYPE_TXT = 1; + + // RagFile type is PDF. + RAG_FILE_TYPE_PDF = 2; + } + + // The origin location of the RagFile if it is imported from Google Cloud + // Storage or Google Drive. + oneof rag_file_source { + // Output only. Google Cloud Storage location of the RagFile. + // It does not support wildcards in the GCS uri for now. + GcsSource gcs_source = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Google Drive location. Supports importing individual files + // as well as Google Drive folders. + GoogleDriveSource google_drive_source = 9 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The RagFile is encapsulated and uploaded in the + // UploadRagFile request. + DirectUploadSource direct_upload_source = 10 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. The resource name of the RagFile. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The display name of the RagFile. + // The name can be up to 128 characters long and can consist of any UTF-8 + // characters. + string display_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The description of the RagFile. + string description = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The size of the RagFile in bytes. + int64 size_bytes = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The type of the RagFile. + RagFileType rag_file_type = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Timestamp when this RagFile was created. + google.protobuf.Timestamp create_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Timestamp when this RagFile was last updated. + google.protobuf.Timestamp update_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Specifies the size and overlap of chunks for RagFiles. +message RagFileChunkingConfig { + // The size of the chunks. + int32 chunk_size = 1; + + // The overlap between chunks. + int32 chunk_overlap = 2; +} + +// Config for uploading RagFile. +message UploadRagFileConfig { + // Specifies the size and overlap of chunks after uploading RagFile. + RagFileChunkingConfig rag_file_chunking_config = 1; +} + +// Config for importing RagFiles. +message ImportRagFilesConfig { + oneof import_source { + // Google Cloud Storage location. Supports importing individual files as + // well as entire Google Cloud Storage directories. Sample formats: + // - `gs://bucket_name/my_directory/object_name/my_file.txt` + // - `gs://bucket_name/my_directory` + GcsSource gcs_source = 2; + + // Google Drive location. Supports importing individual files as + // well as Google Drive folders. + GoogleDriveSource google_drive_source = 3; + } + + // Specifies the size and overlap of chunks after importing RagFiles. + RagFileChunkingConfig rag_file_chunking_config = 4; +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/vertex_rag_data_service.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/vertex_rag_data_service.proto new file mode 100644 index 000000000000..1c97094cc0f6 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/vertex_rag_data_service.proto @@ -0,0 +1,368 @@ +// 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1beta1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/aiplatform/v1beta1/operation.proto"; +import "google/cloud/aiplatform/v1beta1/vertex_rag_data.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1"; +option go_package = "cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb;aiplatformpb"; +option java_multiple_files = true; +option java_outer_classname = "VertexRagDataServiceProto"; +option java_package = "com.google.cloud.aiplatform.v1beta1"; +option php_namespace = "Google\\Cloud\\AIPlatform\\V1beta1"; +option ruby_package = "Google::Cloud::AIPlatform::V1beta1"; + +// A service for managing user data for RAG. +service VertexRagDataService { + option (google.api.default_host) = "aiplatform.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Creates a RagCorpus. + rpc CreateRagCorpus(CreateRagCorpusRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*}/ragCorpora" + body: "rag_corpus" + }; + option (google.api.method_signature) = "parent,rag_corpus"; + option (google.longrunning.operation_info) = { + response_type: "RagCorpus" + metadata_type: "CreateRagCorpusOperationMetadata" + }; + } + + // Gets a RagCorpus. + rpc GetRagCorpus(GetRagCorpusRequest) returns (RagCorpus) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/ragCorpora/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists RagCorpora in a Location. + rpc ListRagCorpora(ListRagCorporaRequest) returns (ListRagCorporaResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*}/ragCorpora" + }; + option (google.api.method_signature) = "parent"; + } + + // Deletes a RagCorpus. + rpc DeleteRagCorpus(DeleteRagCorpusRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/locations/*/ragCorpora/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "DeleteOperationMetadata" + }; + } + + // Upload a file into a RagCorpus. + rpc UploadRagFile(UploadRagFileRequest) returns (UploadRagFileResponse) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*/ragCorpora/*}/ragFiles:upload" + body: "*" + }; + option (google.api.method_signature) = + "parent,rag_file,upload_rag_file_config"; + } + + // Import files from Google Cloud Storage or Google Drive into a RagCorpus. + rpc ImportRagFiles(ImportRagFilesRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*/ragCorpora/*}/ragFiles:import" + body: "*" + }; + option (google.api.method_signature) = "parent,import_rag_files_config"; + option (google.longrunning.operation_info) = { + response_type: "ImportRagFilesResponse" + metadata_type: "ImportRagFilesOperationMetadata" + }; + } + + // Gets a RagFile. + rpc GetRagFile(GetRagFileRequest) returns (RagFile) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists RagFiles in a RagCorpus. + rpc ListRagFiles(ListRagFilesRequest) returns (ListRagFilesResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*/ragCorpora/*}/ragFiles" + }; + option (google.api.method_signature) = "parent"; + } + + // Deletes a RagFile. + rpc DeleteRagFile(DeleteRagFileRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "DeleteOperationMetadata" + }; + } +} + +// Request message for +// [VertexRagDataService.CreateRagCorpus][google.cloud.aiplatform.v1beta1.VertexRagDataService.CreateRagCorpus]. +message CreateRagCorpusRequest { + // Required. The resource name of the Location to create the RagCorpus in. + // Format: `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. The RagCorpus to create. + RagCorpus rag_corpus = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for +// [VertexRagDataService.GetRagCorpus][google.cloud.aiplatform.v1beta1.VertexRagDataService.GetRagCorpus] +message GetRagCorpusRequest { + // Required. The name of the RagCorpus resource. + // Format: + // `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/RagCorpus" + } + ]; +} + +// Request message for +// [VertexRagDataService.ListRagCorpora][google.cloud.aiplatform.v1beta1.VertexRagDataService.ListRagCorpora]. +message ListRagCorporaRequest { + // Required. The resource name of the Location from which to list the + // RagCorpora. Format: `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Optional. The standard list page size. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The standard list page token. + // Typically obtained via + // [ListRagCorporaResponse.next_page_token][google.cloud.aiplatform.v1beta1.ListRagCorporaResponse.next_page_token] + // of the previous + // [VertexRagDataService.ListRagCorpora][google.cloud.aiplatform.v1beta1.VertexRagDataService.ListRagCorpora] + // call. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for +// [VertexRagDataService.ListRagCorpora][google.cloud.aiplatform.v1beta1.VertexRagDataService.ListRagCorpora]. +message ListRagCorporaResponse { + // List of RagCorpora in the requested page. + repeated RagCorpus rag_corpora = 1; + + // A token to retrieve the next page of results. + // Pass to + // [ListRagCorporaRequest.page_token][google.cloud.aiplatform.v1beta1.ListRagCorporaRequest.page_token] + // to obtain that page. + string next_page_token = 2; +} + +// Request message for +// [VertexRagDataService.DeleteRagCorpus][google.cloud.aiplatform.v1beta1.VertexRagDataService.DeleteRagCorpus]. +message DeleteRagCorpusRequest { + // Required. The name of the RagCorpus resource to be deleted. + // Format: + // `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/RagCorpus" + } + ]; + + // Optional. If set to true, any RagFiles in this RagCorpus will also be + // deleted. Otherwise, the request will only work if the RagCorpus has no + // RagFiles. + bool force = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for +// [VertexRagDataService.UploadRagFile][google.cloud.aiplatform.v1beta1.VertexRagDataService.UploadRagFile]. +message UploadRagFileRequest { + // Required. The name of the RagCorpus resource into which to upload the file. + // Format: + // `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/RagCorpus" + } + ]; + + // Required. The RagFile to upload. + RagFile rag_file = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The config for the RagFiles to be uploaded into the RagCorpus. + // [VertexRagDataService.UploadRagFile][google.cloud.aiplatform.v1beta1.VertexRagDataService.UploadRagFile]. + UploadRagFileConfig upload_rag_file_config = 5 + [(google.api.field_behavior) = REQUIRED]; +} + +// Response message for +// [VertexRagDataService.UploadRagFile][google.cloud.aiplatform.v1beta1.VertexRagDataService.UploadRagFile]. +message UploadRagFileResponse { + oneof result { + // The RagFile that had been uploaded into the RagCorpus. + RagFile rag_file = 1; + + // The error that occurred while processing the RagFile. + google.rpc.Status error = 4; + } +} + +// Request message for +// [VertexRagDataService.ImportRagFiles][google.cloud.aiplatform.v1beta1.VertexRagDataService.ImportRagFiles]. +message ImportRagFilesRequest { + // Required. The name of the RagCorpus resource into which to import files. + // Format: + // `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/RagCorpus" + } + ]; + + // Required. The config for the RagFiles to be synced and imported into the + // RagCorpus. + // [VertexRagDataService.ImportRagFiles][google.cloud.aiplatform.v1beta1.VertexRagDataService.ImportRagFiles]. + ImportRagFilesConfig import_rag_files_config = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Response message for +// [VertexRagDataService.ImportRagFiles][google.cloud.aiplatform.v1beta1.VertexRagDataService.ImportRagFiles]. +message ImportRagFilesResponse { + // The number of RagFiles that had been imported into the RagCorpus. + int64 imported_rag_files_count = 1; +} + +// Request message for +// [VertexRagDataService.GetRagFile][google.cloud.aiplatform.v1beta1.VertexRagDataService.GetRagFile] +message GetRagFileRequest { + // Required. The name of the RagFile resource. + // Format: + // `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}/ragFiles/{rag_file}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/RagFile" + } + ]; +} + +// Request message for +// [VertexRagDataService.ListRagFiles][google.cloud.aiplatform.v1beta1.VertexRagDataService.ListRagFiles]. +message ListRagFilesRequest { + // Required. The resource name of the RagCorpus from which to list the + // RagFiles. Format: + // `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/RagCorpus" + } + ]; + + // Optional. The standard list page size. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The standard list page token. + // Typically obtained via + // [ListRagFilesResponse.next_page_token][google.cloud.aiplatform.v1beta1.ListRagFilesResponse.next_page_token] + // of the previous + // [VertexRagDataService.ListRagFiles][google.cloud.aiplatform.v1beta1.VertexRagDataService.ListRagFiles] + // call. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for +// [VertexRagDataService.ListRagFiles][google.cloud.aiplatform.v1beta1.VertexRagDataService.ListRagFiles]. +message ListRagFilesResponse { + // List of RagFiles in the requested page. + repeated RagFile rag_files = 1; + + // A token to retrieve the next page of results. + // Pass to + // [ListRagFilesRequest.page_token][google.cloud.aiplatform.v1beta1.ListRagFilesRequest.page_token] + // to obtain that page. + string next_page_token = 2; +} + +// Request message for +// [VertexRagDataService.DeleteRagFile][google.cloud.aiplatform.v1beta1.VertexRagDataService.DeleteRagFile]. +message DeleteRagFileRequest { + // Required. The name of the RagFile resource to be deleted. + // Format: + // `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}/ragFiles/{rag_file}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/RagFile" + } + ]; +} + +// Runtime operation information for +// [VertexRagDataService.CreateRagCorpus][google.cloud.aiplatform.v1beta1.VertexRagDataService.CreateRagCorpus]. +message CreateRagCorpusOperationMetadata { + // The operation generic information. + GenericOperationMetadata generic_metadata = 1; +} + +// Runtime operation information for +// [VertexRagDataService.ImportRagFiles][google.cloud.aiplatform.v1beta1.VertexRagDataService.ImportRagFiles]. +message ImportRagFilesOperationMetadata { + // The operation generic information. + GenericOperationMetadata generic_metadata = 1; + + // The resource ID of RagCorpus that this operation is executed on. + int64 rag_corpus_id = 2; +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/vertex_rag_service.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/vertex_rag_service.proto new file mode 100644 index 000000000000..4fa573606ec8 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/vertex_rag_service.proto @@ -0,0 +1,120 @@ +// 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1beta1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1"; +option go_package = "cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb;aiplatformpb"; +option java_multiple_files = true; +option java_outer_classname = "VertexRagServiceProto"; +option java_package = "com.google.cloud.aiplatform.v1beta1"; +option php_namespace = "Google\\Cloud\\AIPlatform\\V1beta1"; +option ruby_package = "Google::Cloud::AIPlatform::V1beta1"; + +// A service for retrieving relevant contexts. +service VertexRagService { + option (google.api.default_host) = "aiplatform.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Retrieves relevant contexts for a query. + rpc RetrieveContexts(RetrieveContextsRequest) + returns (RetrieveContextsResponse) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*}:retrieveContexts" + body: "*" + }; + option (google.api.method_signature) = "parent,query"; + } +} + +// A query to retrieve relevant contexts. +message RagQuery { + oneof query { + // Optional. The query in text format to get relevant contexts. + string text = 1 [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. The number of contexts to retrieve. + int32 similarity_top_k = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for +// [VertexRagService.RetrieveContexts][google.cloud.aiplatform.v1beta1.VertexRagService.RetrieveContexts]. +message RetrieveContextsRequest { + // The data source for Vertex RagStore. + message VertexRagStore { + // Required. RagCorpora resource name. + // Format: + // `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` + // Currently only one corpus is allowed. + // In the future we may open up multiple corpora support. However, they + // should be from the same project and location. + repeated string rag_corpora = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // Data Source to retrieve contexts. + oneof data_source { + // The data source for Vertex RagStore. + VertexRagStore vertex_rag_store = 2; + } + + // Required. The resource name of the Location from which to retrieve + // RagContexts. The users must have permission to make a call in the project. + // Format: + // `projects/{project}/locations/{location}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. Single RAG retrieve query. + RagQuery query = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Relevant contexts for one query. +message RagContexts { + // A context of the query. + message Context { + // For vertex RagStore, if the file is imported from Cloud Storage or Google + // Drive, source_uri will be original file URI in Cloud Storage or Google + // Drive; if file is uploaded, source_uri will be file display name. + string source_uri = 1; + + // The text chunk. + string text = 2; + + // The distance between the query vector and the context text vector. + double distance = 3; + } + + // All its contexts. + repeated Context contexts = 1; +} + +// Response message for +// [VertexRagService.RetrieveContexts][google.cloud.aiplatform.v1beta1.VertexRagService.RetrieveContexts]. +message RetrieveContextsResponse { + // The contexts of the query. + RagContexts contexts = 1; +} diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/canceltuningjob/AsyncCancelTuningJob.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/canceltuningjob/AsyncCancelTuningJob.java new file mode 100644 index 000000000000..7f8243e78b61 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/canceltuningjob/AsyncCancelTuningJob.java @@ -0,0 +1,50 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_GenAiTuningService_CancelTuningJob_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.CancelTuningJobRequest; +import com.google.cloud.aiplatform.v1.GenAiTuningServiceClient; +import com.google.cloud.aiplatform.v1.TuningJobName; +import com.google.protobuf.Empty; + +public class AsyncCancelTuningJob { + + public static void main(String[] args) throws Exception { + asyncCancelTuningJob(); + } + + public static void asyncCancelTuningJob() throws Exception { + // 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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) { + CancelTuningJobRequest request = + CancelTuningJobRequest.newBuilder() + .setName(TuningJobName.of("[PROJECT]", "[LOCATION]", "[TUNING_JOB]").toString()) + .build(); + ApiFuture future = + genAiTuningServiceClient.cancelTuningJobCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END aiplatform_v1_generated_GenAiTuningService_CancelTuningJob_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/canceltuningjob/SyncCancelTuningJob.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/canceltuningjob/SyncCancelTuningJob.java new file mode 100644 index 000000000000..258e1694ca76 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/canceltuningjob/SyncCancelTuningJob.java @@ -0,0 +1,46 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_GenAiTuningService_CancelTuningJob_sync] +import com.google.cloud.aiplatform.v1.CancelTuningJobRequest; +import com.google.cloud.aiplatform.v1.GenAiTuningServiceClient; +import com.google.cloud.aiplatform.v1.TuningJobName; +import com.google.protobuf.Empty; + +public class SyncCancelTuningJob { + + public static void main(String[] args) throws Exception { + syncCancelTuningJob(); + } + + public static void syncCancelTuningJob() throws Exception { + // 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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) { + CancelTuningJobRequest request = + CancelTuningJobRequest.newBuilder() + .setName(TuningJobName.of("[PROJECT]", "[LOCATION]", "[TUNING_JOB]").toString()) + .build(); + genAiTuningServiceClient.cancelTuningJob(request); + } + } +} +// [END aiplatform_v1_generated_GenAiTuningService_CancelTuningJob_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/canceltuningjob/SyncCancelTuningJobString.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/canceltuningjob/SyncCancelTuningJobString.java new file mode 100644 index 000000000000..656f9df42052 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/canceltuningjob/SyncCancelTuningJobString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_GenAiTuningService_CancelTuningJob_String_sync] +import com.google.cloud.aiplatform.v1.GenAiTuningServiceClient; +import com.google.cloud.aiplatform.v1.TuningJobName; +import com.google.protobuf.Empty; + +public class SyncCancelTuningJobString { + + public static void main(String[] args) throws Exception { + syncCancelTuningJobString(); + } + + public static void syncCancelTuningJobString() throws Exception { + // 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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) { + String name = TuningJobName.of("[PROJECT]", "[LOCATION]", "[TUNING_JOB]").toString(); + genAiTuningServiceClient.cancelTuningJob(name); + } + } +} +// [END aiplatform_v1_generated_GenAiTuningService_CancelTuningJob_String_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/canceltuningjob/SyncCancelTuningJobTuningjobname.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/canceltuningjob/SyncCancelTuningJobTuningjobname.java new file mode 100644 index 000000000000..48292e78d983 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/canceltuningjob/SyncCancelTuningJobTuningjobname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_GenAiTuningService_CancelTuningJob_Tuningjobname_sync] +import com.google.cloud.aiplatform.v1.GenAiTuningServiceClient; +import com.google.cloud.aiplatform.v1.TuningJobName; +import com.google.protobuf.Empty; + +public class SyncCancelTuningJobTuningjobname { + + public static void main(String[] args) throws Exception { + syncCancelTuningJobTuningjobname(); + } + + public static void syncCancelTuningJobTuningjobname() throws Exception { + // 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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) { + TuningJobName name = TuningJobName.of("[PROJECT]", "[LOCATION]", "[TUNING_JOB]"); + genAiTuningServiceClient.cancelTuningJob(name); + } + } +} +// [END aiplatform_v1_generated_GenAiTuningService_CancelTuningJob_Tuningjobname_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/create/SyncCreateSetCredentialsProvider.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..28eeee661aef --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,45 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_GenAiTuningService_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.aiplatform.v1.GenAiTuningServiceClient; +import com.google.cloud.aiplatform.v1.GenAiTuningServiceSettings; +import com.google.cloud.aiplatform.v1.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // 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 + GenAiTuningServiceSettings genAiTuningServiceSettings = + GenAiTuningServiceSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + GenAiTuningServiceClient genAiTuningServiceClient = + GenAiTuningServiceClient.create(genAiTuningServiceSettings); + } +} +// [END aiplatform_v1_generated_GenAiTuningService_Create_SetCredentialsProvider_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/create/SyncCreateSetEndpoint.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..839cc8e9b18b --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_GenAiTuningService_Create_SetEndpoint_sync] +import com.google.cloud.aiplatform.v1.GenAiTuningServiceClient; +import com.google.cloud.aiplatform.v1.GenAiTuningServiceSettings; +import com.google.cloud.aiplatform.v1.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // 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 + GenAiTuningServiceSettings genAiTuningServiceSettings = + GenAiTuningServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); + GenAiTuningServiceClient genAiTuningServiceClient = + GenAiTuningServiceClient.create(genAiTuningServiceSettings); + } +} +// [END aiplatform_v1_generated_GenAiTuningService_Create_SetEndpoint_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/createtuningjob/AsyncCreateTuningJob.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/createtuningjob/AsyncCreateTuningJob.java new file mode 100644 index 000000000000..220624b03520 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/createtuningjob/AsyncCreateTuningJob.java @@ -0,0 +1,51 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_GenAiTuningService_CreateTuningJob_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.CreateTuningJobRequest; +import com.google.cloud.aiplatform.v1.GenAiTuningServiceClient; +import com.google.cloud.aiplatform.v1.LocationName; +import com.google.cloud.aiplatform.v1.TuningJob; + +public class AsyncCreateTuningJob { + + public static void main(String[] args) throws Exception { + asyncCreateTuningJob(); + } + + public static void asyncCreateTuningJob() throws Exception { + // 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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) { + CreateTuningJobRequest request = + CreateTuningJobRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setTuningJob(TuningJob.newBuilder().build()) + .build(); + ApiFuture future = + genAiTuningServiceClient.createTuningJobCallable().futureCall(request); + // Do something. + TuningJob response = future.get(); + } + } +} +// [END aiplatform_v1_generated_GenAiTuningService_CreateTuningJob_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/createtuningjob/SyncCreateTuningJob.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/createtuningjob/SyncCreateTuningJob.java new file mode 100644 index 000000000000..9c064c014515 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/createtuningjob/SyncCreateTuningJob.java @@ -0,0 +1,47 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_GenAiTuningService_CreateTuningJob_sync] +import com.google.cloud.aiplatform.v1.CreateTuningJobRequest; +import com.google.cloud.aiplatform.v1.GenAiTuningServiceClient; +import com.google.cloud.aiplatform.v1.LocationName; +import com.google.cloud.aiplatform.v1.TuningJob; + +public class SyncCreateTuningJob { + + public static void main(String[] args) throws Exception { + syncCreateTuningJob(); + } + + public static void syncCreateTuningJob() throws Exception { + // 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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) { + CreateTuningJobRequest request = + CreateTuningJobRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setTuningJob(TuningJob.newBuilder().build()) + .build(); + TuningJob response = genAiTuningServiceClient.createTuningJob(request); + } + } +} +// [END aiplatform_v1_generated_GenAiTuningService_CreateTuningJob_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/createtuningjob/SyncCreateTuningJobLocationnameTuningjob.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/createtuningjob/SyncCreateTuningJobLocationnameTuningjob.java new file mode 100644 index 000000000000..027cf47c31b3 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/createtuningjob/SyncCreateTuningJobLocationnameTuningjob.java @@ -0,0 +1,43 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_GenAiTuningService_CreateTuningJob_LocationnameTuningjob_sync] +import com.google.cloud.aiplatform.v1.GenAiTuningServiceClient; +import com.google.cloud.aiplatform.v1.LocationName; +import com.google.cloud.aiplatform.v1.TuningJob; + +public class SyncCreateTuningJobLocationnameTuningjob { + + public static void main(String[] args) throws Exception { + syncCreateTuningJobLocationnameTuningjob(); + } + + public static void syncCreateTuningJobLocationnameTuningjob() throws Exception { + // 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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + TuningJob tuningJob = TuningJob.newBuilder().build(); + TuningJob response = genAiTuningServiceClient.createTuningJob(parent, tuningJob); + } + } +} +// [END aiplatform_v1_generated_GenAiTuningService_CreateTuningJob_LocationnameTuningjob_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/createtuningjob/SyncCreateTuningJobStringTuningjob.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/createtuningjob/SyncCreateTuningJobStringTuningjob.java new file mode 100644 index 000000000000..34b3fe841947 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/createtuningjob/SyncCreateTuningJobStringTuningjob.java @@ -0,0 +1,43 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_GenAiTuningService_CreateTuningJob_StringTuningjob_sync] +import com.google.cloud.aiplatform.v1.GenAiTuningServiceClient; +import com.google.cloud.aiplatform.v1.LocationName; +import com.google.cloud.aiplatform.v1.TuningJob; + +public class SyncCreateTuningJobStringTuningjob { + + public static void main(String[] args) throws Exception { + syncCreateTuningJobStringTuningjob(); + } + + public static void syncCreateTuningJobStringTuningjob() throws Exception { + // 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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + TuningJob tuningJob = TuningJob.newBuilder().build(); + TuningJob response = genAiTuningServiceClient.createTuningJob(parent, tuningJob); + } + } +} +// [END aiplatform_v1_generated_GenAiTuningService_CreateTuningJob_StringTuningjob_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/getiampolicy/AsyncGetIamPolicy.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/getiampolicy/AsyncGetIamPolicy.java new file mode 100644 index 000000000000..abbe84e61515 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/getiampolicy/AsyncGetIamPolicy.java @@ -0,0 +1,55 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_GenAiTuningService_GetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.EndpointName; +import com.google.cloud.aiplatform.v1.GenAiTuningServiceClient; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; + +public class AsyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncGetIamPolicy(); + } + + public static void asyncGetIamPolicy() throws Exception { + // 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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + ApiFuture future = + genAiTuningServiceClient.getIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END aiplatform_v1_generated_GenAiTuningService_GetIamPolicy_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/getiampolicy/SyncGetIamPolicy.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/getiampolicy/SyncGetIamPolicy.java new file mode 100644 index 000000000000..582c3a413421 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/getiampolicy/SyncGetIamPolicy.java @@ -0,0 +1,51 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_GenAiTuningService_GetIamPolicy_sync] +import com.google.cloud.aiplatform.v1.EndpointName; +import com.google.cloud.aiplatform.v1.GenAiTuningServiceClient; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; + +public class SyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + syncGetIamPolicy(); + } + + public static void syncGetIamPolicy() throws Exception { + // 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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + Policy response = genAiTuningServiceClient.getIamPolicy(request); + } + } +} +// [END aiplatform_v1_generated_GenAiTuningService_GetIamPolicy_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/getlocation/AsyncGetLocation.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/getlocation/AsyncGetLocation.java new file mode 100644 index 000000000000..1df5dde80c70 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/getlocation/AsyncGetLocation.java @@ -0,0 +1,46 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_GenAiTuningService_GetLocation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.GenAiTuningServiceClient; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; + +public class AsyncGetLocation { + + public static void main(String[] args) throws Exception { + asyncGetLocation(); + } + + public static void asyncGetLocation() throws Exception { + // 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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + ApiFuture future = + genAiTuningServiceClient.getLocationCallable().futureCall(request); + // Do something. + Location response = future.get(); + } + } +} +// [END aiplatform_v1_generated_GenAiTuningService_GetLocation_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/getlocation/SyncGetLocation.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/getlocation/SyncGetLocation.java new file mode 100644 index 000000000000..3e71d9ae53b7 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/getlocation/SyncGetLocation.java @@ -0,0 +1,42 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_GenAiTuningService_GetLocation_sync] +import com.google.cloud.aiplatform.v1.GenAiTuningServiceClient; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; + +public class SyncGetLocation { + + public static void main(String[] args) throws Exception { + syncGetLocation(); + } + + public static void syncGetLocation() throws Exception { + // 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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + Location response = genAiTuningServiceClient.getLocation(request); + } + } +} +// [END aiplatform_v1_generated_GenAiTuningService_GetLocation_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/gettuningjob/AsyncGetTuningJob.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/gettuningjob/AsyncGetTuningJob.java new file mode 100644 index 000000000000..52a575cc7973 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/gettuningjob/AsyncGetTuningJob.java @@ -0,0 +1,50 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_GenAiTuningService_GetTuningJob_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.GenAiTuningServiceClient; +import com.google.cloud.aiplatform.v1.GetTuningJobRequest; +import com.google.cloud.aiplatform.v1.TuningJob; +import com.google.cloud.aiplatform.v1.TuningJobName; + +public class AsyncGetTuningJob { + + public static void main(String[] args) throws Exception { + asyncGetTuningJob(); + } + + public static void asyncGetTuningJob() throws Exception { + // 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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) { + GetTuningJobRequest request = + GetTuningJobRequest.newBuilder() + .setName(TuningJobName.of("[PROJECT]", "[LOCATION]", "[TUNING_JOB]").toString()) + .build(); + ApiFuture future = + genAiTuningServiceClient.getTuningJobCallable().futureCall(request); + // Do something. + TuningJob response = future.get(); + } + } +} +// [END aiplatform_v1_generated_GenAiTuningService_GetTuningJob_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/gettuningjob/SyncGetTuningJob.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/gettuningjob/SyncGetTuningJob.java new file mode 100644 index 000000000000..39d062417dff --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/gettuningjob/SyncGetTuningJob.java @@ -0,0 +1,46 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_GenAiTuningService_GetTuningJob_sync] +import com.google.cloud.aiplatform.v1.GenAiTuningServiceClient; +import com.google.cloud.aiplatform.v1.GetTuningJobRequest; +import com.google.cloud.aiplatform.v1.TuningJob; +import com.google.cloud.aiplatform.v1.TuningJobName; + +public class SyncGetTuningJob { + + public static void main(String[] args) throws Exception { + syncGetTuningJob(); + } + + public static void syncGetTuningJob() throws Exception { + // 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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) { + GetTuningJobRequest request = + GetTuningJobRequest.newBuilder() + .setName(TuningJobName.of("[PROJECT]", "[LOCATION]", "[TUNING_JOB]").toString()) + .build(); + TuningJob response = genAiTuningServiceClient.getTuningJob(request); + } + } +} +// [END aiplatform_v1_generated_GenAiTuningService_GetTuningJob_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/gettuningjob/SyncGetTuningJobString.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/gettuningjob/SyncGetTuningJobString.java new file mode 100644 index 000000000000..efd688f63743 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/gettuningjob/SyncGetTuningJobString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_GenAiTuningService_GetTuningJob_String_sync] +import com.google.cloud.aiplatform.v1.GenAiTuningServiceClient; +import com.google.cloud.aiplatform.v1.TuningJob; +import com.google.cloud.aiplatform.v1.TuningJobName; + +public class SyncGetTuningJobString { + + public static void main(String[] args) throws Exception { + syncGetTuningJobString(); + } + + public static void syncGetTuningJobString() throws Exception { + // 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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) { + String name = TuningJobName.of("[PROJECT]", "[LOCATION]", "[TUNING_JOB]").toString(); + TuningJob response = genAiTuningServiceClient.getTuningJob(name); + } + } +} +// [END aiplatform_v1_generated_GenAiTuningService_GetTuningJob_String_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/gettuningjob/SyncGetTuningJobTuningjobname.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/gettuningjob/SyncGetTuningJobTuningjobname.java new file mode 100644 index 000000000000..56ada8a8ddb6 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/gettuningjob/SyncGetTuningJobTuningjobname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_GenAiTuningService_GetTuningJob_Tuningjobname_sync] +import com.google.cloud.aiplatform.v1.GenAiTuningServiceClient; +import com.google.cloud.aiplatform.v1.TuningJob; +import com.google.cloud.aiplatform.v1.TuningJobName; + +public class SyncGetTuningJobTuningjobname { + + public static void main(String[] args) throws Exception { + syncGetTuningJobTuningjobname(); + } + + public static void syncGetTuningJobTuningjobname() throws Exception { + // 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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) { + TuningJobName name = TuningJobName.of("[PROJECT]", "[LOCATION]", "[TUNING_JOB]"); + TuningJob response = genAiTuningServiceClient.getTuningJob(name); + } + } +} +// [END aiplatform_v1_generated_GenAiTuningService_GetTuningJob_Tuningjobname_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/listlocations/AsyncListLocations.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/listlocations/AsyncListLocations.java new file mode 100644 index 000000000000..914455fe260f --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/listlocations/AsyncListLocations.java @@ -0,0 +1,54 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_GenAiTuningService_ListLocations_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.GenAiTuningServiceClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; + +public class AsyncListLocations { + + public static void main(String[] args) throws Exception { + asyncListLocations(); + } + + public static void asyncListLocations() throws Exception { + // 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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + genAiTuningServiceClient.listLocationsPagedCallable().futureCall(request); + // Do something. + for (Location element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1_generated_GenAiTuningService_ListLocations_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/listlocations/AsyncListLocationsPaged.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/listlocations/AsyncListLocationsPaged.java new file mode 100644 index 000000000000..d46e07f4b7ea --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/listlocations/AsyncListLocationsPaged.java @@ -0,0 +1,62 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_GenAiTuningService_ListLocations_Paged_async] +import com.google.cloud.aiplatform.v1.GenAiTuningServiceClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.base.Strings; + +public class AsyncListLocationsPaged { + + public static void main(String[] args) throws Exception { + asyncListLocationsPaged(); + } + + public static void asyncListLocationsPaged() throws Exception { + // 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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListLocationsResponse response = + genAiTuningServiceClient.listLocationsCallable().call(request); + for (Location element : response.getLocationsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END aiplatform_v1_generated_GenAiTuningService_ListLocations_Paged_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/listlocations/SyncListLocations.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/listlocations/SyncListLocations.java new file mode 100644 index 000000000000..4c20a994bca3 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/listlocations/SyncListLocations.java @@ -0,0 +1,50 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_GenAiTuningService_ListLocations_sync] +import com.google.cloud.aiplatform.v1.GenAiTuningServiceClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; + +public class SyncListLocations { + + public static void main(String[] args) throws Exception { + syncListLocations(); + } + + public static void syncListLocations() throws Exception { + // 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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Location element : genAiTuningServiceClient.listLocations(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1_generated_GenAiTuningService_ListLocations_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/listtuningjobs/AsyncListTuningJobs.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/listtuningjobs/AsyncListTuningJobs.java new file mode 100644 index 000000000000..21ed6c058879 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/listtuningjobs/AsyncListTuningJobs.java @@ -0,0 +1,55 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_GenAiTuningService_ListTuningJobs_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.GenAiTuningServiceClient; +import com.google.cloud.aiplatform.v1.ListTuningJobsRequest; +import com.google.cloud.aiplatform.v1.LocationName; +import com.google.cloud.aiplatform.v1.TuningJob; + +public class AsyncListTuningJobs { + + public static void main(String[] args) throws Exception { + asyncListTuningJobs(); + } + + public static void asyncListTuningJobs() throws Exception { + // 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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) { + ListTuningJobsRequest request = + ListTuningJobsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + genAiTuningServiceClient.listTuningJobsPagedCallable().futureCall(request); + // Do something. + for (TuningJob element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1_generated_GenAiTuningService_ListTuningJobs_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/listtuningjobs/AsyncListTuningJobsPaged.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/listtuningjobs/AsyncListTuningJobsPaged.java new file mode 100644 index 000000000000..86e1f60c65b0 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/listtuningjobs/AsyncListTuningJobsPaged.java @@ -0,0 +1,63 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_GenAiTuningService_ListTuningJobs_Paged_async] +import com.google.cloud.aiplatform.v1.GenAiTuningServiceClient; +import com.google.cloud.aiplatform.v1.ListTuningJobsRequest; +import com.google.cloud.aiplatform.v1.ListTuningJobsResponse; +import com.google.cloud.aiplatform.v1.LocationName; +import com.google.cloud.aiplatform.v1.TuningJob; +import com.google.common.base.Strings; + +public class AsyncListTuningJobsPaged { + + public static void main(String[] args) throws Exception { + asyncListTuningJobsPaged(); + } + + public static void asyncListTuningJobsPaged() throws Exception { + // 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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) { + ListTuningJobsRequest request = + ListTuningJobsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListTuningJobsResponse response = + genAiTuningServiceClient.listTuningJobsCallable().call(request); + for (TuningJob element : response.getTuningJobsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END aiplatform_v1_generated_GenAiTuningService_ListTuningJobs_Paged_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/listtuningjobs/SyncListTuningJobs.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/listtuningjobs/SyncListTuningJobs.java new file mode 100644 index 000000000000..621a805da9e1 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/listtuningjobs/SyncListTuningJobs.java @@ -0,0 +1,51 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_GenAiTuningService_ListTuningJobs_sync] +import com.google.cloud.aiplatform.v1.GenAiTuningServiceClient; +import com.google.cloud.aiplatform.v1.ListTuningJobsRequest; +import com.google.cloud.aiplatform.v1.LocationName; +import com.google.cloud.aiplatform.v1.TuningJob; + +public class SyncListTuningJobs { + + public static void main(String[] args) throws Exception { + syncListTuningJobs(); + } + + public static void syncListTuningJobs() throws Exception { + // 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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) { + ListTuningJobsRequest request = + ListTuningJobsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (TuningJob element : genAiTuningServiceClient.listTuningJobs(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1_generated_GenAiTuningService_ListTuningJobs_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/listtuningjobs/SyncListTuningJobsLocationname.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/listtuningjobs/SyncListTuningJobsLocationname.java new file mode 100644 index 000000000000..61096d21eff8 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/listtuningjobs/SyncListTuningJobsLocationname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_GenAiTuningService_ListTuningJobs_Locationname_sync] +import com.google.cloud.aiplatform.v1.GenAiTuningServiceClient; +import com.google.cloud.aiplatform.v1.LocationName; +import com.google.cloud.aiplatform.v1.TuningJob; + +public class SyncListTuningJobsLocationname { + + public static void main(String[] args) throws Exception { + syncListTuningJobsLocationname(); + } + + public static void syncListTuningJobsLocationname() throws Exception { + // 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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (TuningJob element : genAiTuningServiceClient.listTuningJobs(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1_generated_GenAiTuningService_ListTuningJobs_Locationname_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/listtuningjobs/SyncListTuningJobsString.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/listtuningjobs/SyncListTuningJobsString.java new file mode 100644 index 000000000000..9a843c1d7f5d --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/listtuningjobs/SyncListTuningJobsString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_GenAiTuningService_ListTuningJobs_String_sync] +import com.google.cloud.aiplatform.v1.GenAiTuningServiceClient; +import com.google.cloud.aiplatform.v1.LocationName; +import com.google.cloud.aiplatform.v1.TuningJob; + +public class SyncListTuningJobsString { + + public static void main(String[] args) throws Exception { + syncListTuningJobsString(); + } + + public static void syncListTuningJobsString() throws Exception { + // 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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (TuningJob element : genAiTuningServiceClient.listTuningJobs(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1_generated_GenAiTuningService_ListTuningJobs_String_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/setiampolicy/AsyncSetIamPolicy.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/setiampolicy/AsyncSetIamPolicy.java new file mode 100644 index 000000000000..1c1d4abcfd5b --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/setiampolicy/AsyncSetIamPolicy.java @@ -0,0 +1,56 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_GenAiTuningService_SetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.EndpointName; +import com.google.cloud.aiplatform.v1.GenAiTuningServiceClient; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.protobuf.FieldMask; + +public class AsyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncSetIamPolicy(); + } + + public static void asyncSetIamPolicy() throws Exception { + // 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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = + genAiTuningServiceClient.setIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END aiplatform_v1_generated_GenAiTuningService_SetIamPolicy_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/setiampolicy/SyncSetIamPolicy.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/setiampolicy/SyncSetIamPolicy.java new file mode 100644 index 000000000000..28b97646e2d6 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/setiampolicy/SyncSetIamPolicy.java @@ -0,0 +1,52 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_GenAiTuningService_SetIamPolicy_sync] +import com.google.cloud.aiplatform.v1.EndpointName; +import com.google.cloud.aiplatform.v1.GenAiTuningServiceClient; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.protobuf.FieldMask; + +public class SyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + syncSetIamPolicy(); + } + + public static void syncSetIamPolicy() throws Exception { + // 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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + Policy response = genAiTuningServiceClient.setIamPolicy(request); + } + } +} +// [END aiplatform_v1_generated_GenAiTuningService_SetIamPolicy_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/testiampermissions/AsyncTestIamPermissions.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/testiampermissions/AsyncTestIamPermissions.java new file mode 100644 index 000000000000..b1d6addedf97 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/testiampermissions/AsyncTestIamPermissions.java @@ -0,0 +1,55 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_GenAiTuningService_TestIamPermissions_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.EndpointName; +import com.google.cloud.aiplatform.v1.GenAiTuningServiceClient; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import java.util.ArrayList; + +public class AsyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + asyncTestIamPermissions(); + } + + public static void asyncTestIamPermissions() throws Exception { + // 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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .addAllPermissions(new ArrayList()) + .build(); + ApiFuture future = + genAiTuningServiceClient.testIamPermissionsCallable().futureCall(request); + // Do something. + TestIamPermissionsResponse response = future.get(); + } + } +} +// [END aiplatform_v1_generated_GenAiTuningService_TestIamPermissions_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/testiampermissions/SyncTestIamPermissions.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/testiampermissions/SyncTestIamPermissions.java new file mode 100644 index 000000000000..c7ea91f14d59 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservice/testiampermissions/SyncTestIamPermissions.java @@ -0,0 +1,51 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_GenAiTuningService_TestIamPermissions_sync] +import com.google.cloud.aiplatform.v1.EndpointName; +import com.google.cloud.aiplatform.v1.GenAiTuningServiceClient; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import java.util.ArrayList; + +public class SyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + syncTestIamPermissions(); + } + + public static void syncTestIamPermissions() throws Exception { + // 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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .addAllPermissions(new ArrayList()) + .build(); + TestIamPermissionsResponse response = genAiTuningServiceClient.testIamPermissions(request); + } + } +} +// [END aiplatform_v1_generated_GenAiTuningService_TestIamPermissions_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservicesettings/createtuningjob/SyncCreateTuningJob.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservicesettings/createtuningjob/SyncCreateTuningJob.java new file mode 100644 index 000000000000..92ae09b9e1f0 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/genaituningservicesettings/createtuningjob/SyncCreateTuningJob.java @@ -0,0 +1,50 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_GenAiTuningServiceSettings_CreateTuningJob_sync] +import com.google.cloud.aiplatform.v1.GenAiTuningServiceSettings; +import java.time.Duration; + +public class SyncCreateTuningJob { + + public static void main(String[] args) throws Exception { + syncCreateTuningJob(); + } + + public static void syncCreateTuningJob() throws Exception { + // 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 + GenAiTuningServiceSettings.Builder genAiTuningServiceSettingsBuilder = + GenAiTuningServiceSettings.newBuilder(); + genAiTuningServiceSettingsBuilder + .createTuningJobSettings() + .setRetrySettings( + genAiTuningServiceSettingsBuilder + .createTuningJobSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + GenAiTuningServiceSettings genAiTuningServiceSettings = + genAiTuningServiceSettingsBuilder.build(); + } +} +// [END aiplatform_v1_generated_GenAiTuningServiceSettings_CreateTuningJob_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/assignnotebookruntime/AsyncAssignNotebookRuntime.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/assignnotebookruntime/AsyncAssignNotebookRuntime.java new file mode 100644 index 000000000000..4e9cb7f2486f --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/assignnotebookruntime/AsyncAssignNotebookRuntime.java @@ -0,0 +1,58 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_NotebookService_AssignNotebookRuntime_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.AssignNotebookRuntimeRequest; +import com.google.cloud.aiplatform.v1.LocationName; +import com.google.cloud.aiplatform.v1.NotebookRuntime; +import com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateName; +import com.google.cloud.aiplatform.v1.NotebookServiceClient; +import com.google.longrunning.Operation; + +public class AsyncAssignNotebookRuntime { + + public static void main(String[] args) throws Exception { + asyncAssignNotebookRuntime(); + } + + public static void asyncAssignNotebookRuntime() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + AssignNotebookRuntimeRequest request = + AssignNotebookRuntimeRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setNotebookRuntimeTemplate( + NotebookRuntimeTemplateName.of( + "[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]") + .toString()) + .setNotebookRuntime(NotebookRuntime.newBuilder().build()) + .setNotebookRuntimeId("notebookRuntimeId400795512") + .build(); + ApiFuture future = + notebookServiceClient.assignNotebookRuntimeCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END aiplatform_v1_generated_NotebookService_AssignNotebookRuntime_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/assignnotebookruntime/AsyncAssignNotebookRuntimeLRO.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/assignnotebookruntime/AsyncAssignNotebookRuntimeLRO.java new file mode 100644 index 000000000000..2f9c0028ae15 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/assignnotebookruntime/AsyncAssignNotebookRuntimeLRO.java @@ -0,0 +1,58 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_NotebookService_AssignNotebookRuntime_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.aiplatform.v1.AssignNotebookRuntimeOperationMetadata; +import com.google.cloud.aiplatform.v1.AssignNotebookRuntimeRequest; +import com.google.cloud.aiplatform.v1.LocationName; +import com.google.cloud.aiplatform.v1.NotebookRuntime; +import com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateName; +import com.google.cloud.aiplatform.v1.NotebookServiceClient; + +public class AsyncAssignNotebookRuntimeLRO { + + public static void main(String[] args) throws Exception { + asyncAssignNotebookRuntimeLRO(); + } + + public static void asyncAssignNotebookRuntimeLRO() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + AssignNotebookRuntimeRequest request = + AssignNotebookRuntimeRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setNotebookRuntimeTemplate( + NotebookRuntimeTemplateName.of( + "[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]") + .toString()) + .setNotebookRuntime(NotebookRuntime.newBuilder().build()) + .setNotebookRuntimeId("notebookRuntimeId400795512") + .build(); + OperationFuture future = + notebookServiceClient.assignNotebookRuntimeOperationCallable().futureCall(request); + // Do something. + NotebookRuntime response = future.get(); + } + } +} +// [END aiplatform_v1_generated_NotebookService_AssignNotebookRuntime_LRO_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/assignnotebookruntime/SyncAssignNotebookRuntime.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/assignnotebookruntime/SyncAssignNotebookRuntime.java new file mode 100644 index 000000000000..6a0d9e40d414 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/assignnotebookruntime/SyncAssignNotebookRuntime.java @@ -0,0 +1,53 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_NotebookService_AssignNotebookRuntime_sync] +import com.google.cloud.aiplatform.v1.AssignNotebookRuntimeRequest; +import com.google.cloud.aiplatform.v1.LocationName; +import com.google.cloud.aiplatform.v1.NotebookRuntime; +import com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateName; +import com.google.cloud.aiplatform.v1.NotebookServiceClient; + +public class SyncAssignNotebookRuntime { + + public static void main(String[] args) throws Exception { + syncAssignNotebookRuntime(); + } + + public static void syncAssignNotebookRuntime() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + AssignNotebookRuntimeRequest request = + AssignNotebookRuntimeRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setNotebookRuntimeTemplate( + NotebookRuntimeTemplateName.of( + "[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]") + .toString()) + .setNotebookRuntime(NotebookRuntime.newBuilder().build()) + .setNotebookRuntimeId("notebookRuntimeId400795512") + .build(); + NotebookRuntime response = notebookServiceClient.assignNotebookRuntimeAsync(request).get(); + } + } +} +// [END aiplatform_v1_generated_NotebookService_AssignNotebookRuntime_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/assignnotebookruntime/SyncAssignNotebookRuntimeLocationnameNotebookruntimetemplatenameNotebookruntimeString.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/assignnotebookruntime/SyncAssignNotebookRuntimeLocationnameNotebookruntimetemplatenameNotebookruntimeString.java new file mode 100644 index 000000000000..6268c50de3bb --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/assignnotebookruntime/SyncAssignNotebookRuntimeLocationnameNotebookruntimetemplatenameNotebookruntimeString.java @@ -0,0 +1,53 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_NotebookService_AssignNotebookRuntime_LocationnameNotebookruntimetemplatenameNotebookruntimeString_sync] +import com.google.cloud.aiplatform.v1.LocationName; +import com.google.cloud.aiplatform.v1.NotebookRuntime; +import com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateName; +import com.google.cloud.aiplatform.v1.NotebookServiceClient; + +public class SyncAssignNotebookRuntimeLocationnameNotebookruntimetemplatenameNotebookruntimeString { + + public static void main(String[] args) throws Exception { + syncAssignNotebookRuntimeLocationnameNotebookruntimetemplatenameNotebookruntimeString(); + } + + public static void + syncAssignNotebookRuntimeLocationnameNotebookruntimetemplatenameNotebookruntimeString() + throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + NotebookRuntimeTemplateName notebookRuntimeTemplate = + NotebookRuntimeTemplateName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]"); + NotebookRuntime notebookRuntime = NotebookRuntime.newBuilder().build(); + String notebookRuntimeId = "notebookRuntimeId400795512"; + NotebookRuntime response = + notebookServiceClient + .assignNotebookRuntimeAsync( + parent, notebookRuntimeTemplate, notebookRuntime, notebookRuntimeId) + .get(); + } + } +} +// [END aiplatform_v1_generated_NotebookService_AssignNotebookRuntime_LocationnameNotebookruntimetemplatenameNotebookruntimeString_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/assignnotebookruntime/SyncAssignNotebookRuntimeLocationnameStringNotebookruntimeString.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/assignnotebookruntime/SyncAssignNotebookRuntimeLocationnameStringNotebookruntimeString.java new file mode 100644 index 000000000000..040ad3a7b01c --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/assignnotebookruntime/SyncAssignNotebookRuntimeLocationnameStringNotebookruntimeString.java @@ -0,0 +1,53 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_NotebookService_AssignNotebookRuntime_LocationnameStringNotebookruntimeString_sync] +import com.google.cloud.aiplatform.v1.LocationName; +import com.google.cloud.aiplatform.v1.NotebookRuntime; +import com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateName; +import com.google.cloud.aiplatform.v1.NotebookServiceClient; + +public class SyncAssignNotebookRuntimeLocationnameStringNotebookruntimeString { + + public static void main(String[] args) throws Exception { + syncAssignNotebookRuntimeLocationnameStringNotebookruntimeString(); + } + + public static void syncAssignNotebookRuntimeLocationnameStringNotebookruntimeString() + throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + String notebookRuntimeTemplate = + NotebookRuntimeTemplateName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]") + .toString(); + NotebookRuntime notebookRuntime = NotebookRuntime.newBuilder().build(); + String notebookRuntimeId = "notebookRuntimeId400795512"; + NotebookRuntime response = + notebookServiceClient + .assignNotebookRuntimeAsync( + parent, notebookRuntimeTemplate, notebookRuntime, notebookRuntimeId) + .get(); + } + } +} +// [END aiplatform_v1_generated_NotebookService_AssignNotebookRuntime_LocationnameStringNotebookruntimeString_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/assignnotebookruntime/SyncAssignNotebookRuntimeStringNotebookruntimetemplatenameNotebookruntimeString.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/assignnotebookruntime/SyncAssignNotebookRuntimeStringNotebookruntimetemplatenameNotebookruntimeString.java new file mode 100644 index 000000000000..e41a2ccef0f4 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/assignnotebookruntime/SyncAssignNotebookRuntimeStringNotebookruntimetemplatenameNotebookruntimeString.java @@ -0,0 +1,53 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_NotebookService_AssignNotebookRuntime_StringNotebookruntimetemplatenameNotebookruntimeString_sync] +import com.google.cloud.aiplatform.v1.LocationName; +import com.google.cloud.aiplatform.v1.NotebookRuntime; +import com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateName; +import com.google.cloud.aiplatform.v1.NotebookServiceClient; + +public class SyncAssignNotebookRuntimeStringNotebookruntimetemplatenameNotebookruntimeString { + + public static void main(String[] args) throws Exception { + syncAssignNotebookRuntimeStringNotebookruntimetemplatenameNotebookruntimeString(); + } + + public static void + syncAssignNotebookRuntimeStringNotebookruntimetemplatenameNotebookruntimeString() + throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + NotebookRuntimeTemplateName notebookRuntimeTemplate = + NotebookRuntimeTemplateName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]"); + NotebookRuntime notebookRuntime = NotebookRuntime.newBuilder().build(); + String notebookRuntimeId = "notebookRuntimeId400795512"; + NotebookRuntime response = + notebookServiceClient + .assignNotebookRuntimeAsync( + parent, notebookRuntimeTemplate, notebookRuntime, notebookRuntimeId) + .get(); + } + } +} +// [END aiplatform_v1_generated_NotebookService_AssignNotebookRuntime_StringNotebookruntimetemplatenameNotebookruntimeString_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/assignnotebookruntime/SyncAssignNotebookRuntimeStringStringNotebookruntimeString.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/assignnotebookruntime/SyncAssignNotebookRuntimeStringStringNotebookruntimeString.java new file mode 100644 index 000000000000..1218d68ed2d3 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/assignnotebookruntime/SyncAssignNotebookRuntimeStringStringNotebookruntimeString.java @@ -0,0 +1,52 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_NotebookService_AssignNotebookRuntime_StringStringNotebookruntimeString_sync] +import com.google.cloud.aiplatform.v1.LocationName; +import com.google.cloud.aiplatform.v1.NotebookRuntime; +import com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateName; +import com.google.cloud.aiplatform.v1.NotebookServiceClient; + +public class SyncAssignNotebookRuntimeStringStringNotebookruntimeString { + + public static void main(String[] args) throws Exception { + syncAssignNotebookRuntimeStringStringNotebookruntimeString(); + } + + public static void syncAssignNotebookRuntimeStringStringNotebookruntimeString() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + String notebookRuntimeTemplate = + NotebookRuntimeTemplateName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]") + .toString(); + NotebookRuntime notebookRuntime = NotebookRuntime.newBuilder().build(); + String notebookRuntimeId = "notebookRuntimeId400795512"; + NotebookRuntime response = + notebookServiceClient + .assignNotebookRuntimeAsync( + parent, notebookRuntimeTemplate, notebookRuntime, notebookRuntimeId) + .get(); + } + } +} +// [END aiplatform_v1_generated_NotebookService_AssignNotebookRuntime_StringStringNotebookruntimeString_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/create/SyncCreateSetCredentialsProvider.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..37d03be6fa1b --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,45 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_NotebookService_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.aiplatform.v1.NotebookServiceClient; +import com.google.cloud.aiplatform.v1.NotebookServiceSettings; +import com.google.cloud.aiplatform.v1.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // 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 + NotebookServiceSettings notebookServiceSettings = + NotebookServiceSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + NotebookServiceClient notebookServiceClient = + NotebookServiceClient.create(notebookServiceSettings); + } +} +// [END aiplatform_v1_generated_NotebookService_Create_SetCredentialsProvider_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/create/SyncCreateSetEndpoint.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..87744bcb7569 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_NotebookService_Create_SetEndpoint_sync] +import com.google.cloud.aiplatform.v1.NotebookServiceClient; +import com.google.cloud.aiplatform.v1.NotebookServiceSettings; +import com.google.cloud.aiplatform.v1.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // 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 + NotebookServiceSettings notebookServiceSettings = + NotebookServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); + NotebookServiceClient notebookServiceClient = + NotebookServiceClient.create(notebookServiceSettings); + } +} +// [END aiplatform_v1_generated_NotebookService_Create_SetEndpoint_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/createnotebookruntimetemplate/AsyncCreateNotebookRuntimeTemplate.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/createnotebookruntimetemplate/AsyncCreateNotebookRuntimeTemplate.java new file mode 100644 index 000000000000..0e631680fab6 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/createnotebookruntimetemplate/AsyncCreateNotebookRuntimeTemplate.java @@ -0,0 +1,53 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_NotebookService_CreateNotebookRuntimeTemplate_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateRequest; +import com.google.cloud.aiplatform.v1.LocationName; +import com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate; +import com.google.cloud.aiplatform.v1.NotebookServiceClient; +import com.google.longrunning.Operation; + +public class AsyncCreateNotebookRuntimeTemplate { + + public static void main(String[] args) throws Exception { + asyncCreateNotebookRuntimeTemplate(); + } + + public static void asyncCreateNotebookRuntimeTemplate() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + CreateNotebookRuntimeTemplateRequest request = + CreateNotebookRuntimeTemplateRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setNotebookRuntimeTemplate(NotebookRuntimeTemplate.newBuilder().build()) + .setNotebookRuntimeTemplateId("notebookRuntimeTemplateId-633369454") + .build(); + ApiFuture future = + notebookServiceClient.createNotebookRuntimeTemplateCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END aiplatform_v1_generated_NotebookService_CreateNotebookRuntimeTemplate_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/createnotebookruntimetemplate/AsyncCreateNotebookRuntimeTemplateLRO.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/createnotebookruntimetemplate/AsyncCreateNotebookRuntimeTemplateLRO.java new file mode 100644 index 000000000000..03ae834e1522 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/createnotebookruntimetemplate/AsyncCreateNotebookRuntimeTemplateLRO.java @@ -0,0 +1,56 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_NotebookService_CreateNotebookRuntimeTemplate_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateOperationMetadata; +import com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateRequest; +import com.google.cloud.aiplatform.v1.LocationName; +import com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate; +import com.google.cloud.aiplatform.v1.NotebookServiceClient; + +public class AsyncCreateNotebookRuntimeTemplateLRO { + + public static void main(String[] args) throws Exception { + asyncCreateNotebookRuntimeTemplateLRO(); + } + + public static void asyncCreateNotebookRuntimeTemplateLRO() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + CreateNotebookRuntimeTemplateRequest request = + CreateNotebookRuntimeTemplateRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setNotebookRuntimeTemplate(NotebookRuntimeTemplate.newBuilder().build()) + .setNotebookRuntimeTemplateId("notebookRuntimeTemplateId-633369454") + .build(); + OperationFuture + future = + notebookServiceClient + .createNotebookRuntimeTemplateOperationCallable() + .futureCall(request); + // Do something. + NotebookRuntimeTemplate response = future.get(); + } + } +} +// [END aiplatform_v1_generated_NotebookService_CreateNotebookRuntimeTemplate_LRO_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/createnotebookruntimetemplate/SyncCreateNotebookRuntimeTemplate.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/createnotebookruntimetemplate/SyncCreateNotebookRuntimeTemplate.java new file mode 100644 index 000000000000..0107218bc95f --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/createnotebookruntimetemplate/SyncCreateNotebookRuntimeTemplate.java @@ -0,0 +1,49 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_NotebookService_CreateNotebookRuntimeTemplate_sync] +import com.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateRequest; +import com.google.cloud.aiplatform.v1.LocationName; +import com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate; +import com.google.cloud.aiplatform.v1.NotebookServiceClient; + +public class SyncCreateNotebookRuntimeTemplate { + + public static void main(String[] args) throws Exception { + syncCreateNotebookRuntimeTemplate(); + } + + public static void syncCreateNotebookRuntimeTemplate() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + CreateNotebookRuntimeTemplateRequest request = + CreateNotebookRuntimeTemplateRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setNotebookRuntimeTemplate(NotebookRuntimeTemplate.newBuilder().build()) + .setNotebookRuntimeTemplateId("notebookRuntimeTemplateId-633369454") + .build(); + NotebookRuntimeTemplate response = + notebookServiceClient.createNotebookRuntimeTemplateAsync(request).get(); + } + } +} +// [END aiplatform_v1_generated_NotebookService_CreateNotebookRuntimeTemplate_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/createnotebookruntimetemplate/SyncCreateNotebookRuntimeTemplateLocationnameNotebookruntimetemplateString.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/createnotebookruntimetemplate/SyncCreateNotebookRuntimeTemplateLocationnameNotebookruntimetemplateString.java new file mode 100644 index 000000000000..59302eb1760a --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/createnotebookruntimetemplate/SyncCreateNotebookRuntimeTemplateLocationnameNotebookruntimetemplateString.java @@ -0,0 +1,50 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_NotebookService_CreateNotebookRuntimeTemplate_LocationnameNotebookruntimetemplateString_sync] +import com.google.cloud.aiplatform.v1.LocationName; +import com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate; +import com.google.cloud.aiplatform.v1.NotebookServiceClient; + +public class SyncCreateNotebookRuntimeTemplateLocationnameNotebookruntimetemplateString { + + public static void main(String[] args) throws Exception { + syncCreateNotebookRuntimeTemplateLocationnameNotebookruntimetemplateString(); + } + + public static void syncCreateNotebookRuntimeTemplateLocationnameNotebookruntimetemplateString() + throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + NotebookRuntimeTemplate notebookRuntimeTemplate = + NotebookRuntimeTemplate.newBuilder().build(); + String notebookRuntimeTemplateId = "notebookRuntimeTemplateId-633369454"; + NotebookRuntimeTemplate response = + notebookServiceClient + .createNotebookRuntimeTemplateAsync( + parent, notebookRuntimeTemplate, notebookRuntimeTemplateId) + .get(); + } + } +} +// [END aiplatform_v1_generated_NotebookService_CreateNotebookRuntimeTemplate_LocationnameNotebookruntimetemplateString_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/createnotebookruntimetemplate/SyncCreateNotebookRuntimeTemplateStringNotebookruntimetemplateString.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/createnotebookruntimetemplate/SyncCreateNotebookRuntimeTemplateStringNotebookruntimetemplateString.java new file mode 100644 index 000000000000..bac1893904fa --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/createnotebookruntimetemplate/SyncCreateNotebookRuntimeTemplateStringNotebookruntimetemplateString.java @@ -0,0 +1,50 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_NotebookService_CreateNotebookRuntimeTemplate_StringNotebookruntimetemplateString_sync] +import com.google.cloud.aiplatform.v1.LocationName; +import com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate; +import com.google.cloud.aiplatform.v1.NotebookServiceClient; + +public class SyncCreateNotebookRuntimeTemplateStringNotebookruntimetemplateString { + + public static void main(String[] args) throws Exception { + syncCreateNotebookRuntimeTemplateStringNotebookruntimetemplateString(); + } + + public static void syncCreateNotebookRuntimeTemplateStringNotebookruntimetemplateString() + throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + NotebookRuntimeTemplate notebookRuntimeTemplate = + NotebookRuntimeTemplate.newBuilder().build(); + String notebookRuntimeTemplateId = "notebookRuntimeTemplateId-633369454"; + NotebookRuntimeTemplate response = + notebookServiceClient + .createNotebookRuntimeTemplateAsync( + parent, notebookRuntimeTemplate, notebookRuntimeTemplateId) + .get(); + } + } +} +// [END aiplatform_v1_generated_NotebookService_CreateNotebookRuntimeTemplate_StringNotebookruntimetemplateString_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/deletenotebookruntime/AsyncDeleteNotebookRuntime.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/deletenotebookruntime/AsyncDeleteNotebookRuntime.java new file mode 100644 index 000000000000..c4e13965fc7e --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/deletenotebookruntime/AsyncDeleteNotebookRuntime.java @@ -0,0 +1,52 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_NotebookService_DeleteNotebookRuntime_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeRequest; +import com.google.cloud.aiplatform.v1.NotebookRuntimeName; +import com.google.cloud.aiplatform.v1.NotebookServiceClient; +import com.google.longrunning.Operation; + +public class AsyncDeleteNotebookRuntime { + + public static void main(String[] args) throws Exception { + asyncDeleteNotebookRuntime(); + } + + public static void asyncDeleteNotebookRuntime() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + DeleteNotebookRuntimeRequest request = + DeleteNotebookRuntimeRequest.newBuilder() + .setName( + NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]") + .toString()) + .build(); + ApiFuture future = + notebookServiceClient.deleteNotebookRuntimeCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END aiplatform_v1_generated_NotebookService_DeleteNotebookRuntime_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/deletenotebookruntime/AsyncDeleteNotebookRuntimeLRO.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/deletenotebookruntime/AsyncDeleteNotebookRuntimeLRO.java new file mode 100644 index 000000000000..6270ba66a22a --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/deletenotebookruntime/AsyncDeleteNotebookRuntimeLRO.java @@ -0,0 +1,53 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_NotebookService_DeleteNotebookRuntime_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeRequest; +import com.google.cloud.aiplatform.v1.DeleteOperationMetadata; +import com.google.cloud.aiplatform.v1.NotebookRuntimeName; +import com.google.cloud.aiplatform.v1.NotebookServiceClient; +import com.google.protobuf.Empty; + +public class AsyncDeleteNotebookRuntimeLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteNotebookRuntimeLRO(); + } + + public static void asyncDeleteNotebookRuntimeLRO() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + DeleteNotebookRuntimeRequest request = + DeleteNotebookRuntimeRequest.newBuilder() + .setName( + NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]") + .toString()) + .build(); + OperationFuture future = + notebookServiceClient.deleteNotebookRuntimeOperationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END aiplatform_v1_generated_NotebookService_DeleteNotebookRuntime_LRO_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/deletenotebookruntime/SyncDeleteNotebookRuntime.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/deletenotebookruntime/SyncDeleteNotebookRuntime.java new file mode 100644 index 000000000000..55c074e91050 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/deletenotebookruntime/SyncDeleteNotebookRuntime.java @@ -0,0 +1,48 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_NotebookService_DeleteNotebookRuntime_sync] +import com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeRequest; +import com.google.cloud.aiplatform.v1.NotebookRuntimeName; +import com.google.cloud.aiplatform.v1.NotebookServiceClient; +import com.google.protobuf.Empty; + +public class SyncDeleteNotebookRuntime { + + public static void main(String[] args) throws Exception { + syncDeleteNotebookRuntime(); + } + + public static void syncDeleteNotebookRuntime() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + DeleteNotebookRuntimeRequest request = + DeleteNotebookRuntimeRequest.newBuilder() + .setName( + NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]") + .toString()) + .build(); + notebookServiceClient.deleteNotebookRuntimeAsync(request).get(); + } + } +} +// [END aiplatform_v1_generated_NotebookService_DeleteNotebookRuntime_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/deletenotebookruntime/SyncDeleteNotebookRuntimeNotebookruntimename.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/deletenotebookruntime/SyncDeleteNotebookRuntimeNotebookruntimename.java new file mode 100644 index 000000000000..01db9d7879ee --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/deletenotebookruntime/SyncDeleteNotebookRuntimeNotebookruntimename.java @@ -0,0 +1,43 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_NotebookService_DeleteNotebookRuntime_Notebookruntimename_sync] +import com.google.cloud.aiplatform.v1.NotebookRuntimeName; +import com.google.cloud.aiplatform.v1.NotebookServiceClient; +import com.google.protobuf.Empty; + +public class SyncDeleteNotebookRuntimeNotebookruntimename { + + public static void main(String[] args) throws Exception { + syncDeleteNotebookRuntimeNotebookruntimename(); + } + + public static void syncDeleteNotebookRuntimeNotebookruntimename() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + NotebookRuntimeName name = + NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]"); + notebookServiceClient.deleteNotebookRuntimeAsync(name).get(); + } + } +} +// [END aiplatform_v1_generated_NotebookService_DeleteNotebookRuntime_Notebookruntimename_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/deletenotebookruntime/SyncDeleteNotebookRuntimeString.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/deletenotebookruntime/SyncDeleteNotebookRuntimeString.java new file mode 100644 index 000000000000..473323694731 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/deletenotebookruntime/SyncDeleteNotebookRuntimeString.java @@ -0,0 +1,43 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_NotebookService_DeleteNotebookRuntime_String_sync] +import com.google.cloud.aiplatform.v1.NotebookRuntimeName; +import com.google.cloud.aiplatform.v1.NotebookServiceClient; +import com.google.protobuf.Empty; + +public class SyncDeleteNotebookRuntimeString { + + public static void main(String[] args) throws Exception { + syncDeleteNotebookRuntimeString(); + } + + public static void syncDeleteNotebookRuntimeString() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + String name = + NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]").toString(); + notebookServiceClient.deleteNotebookRuntimeAsync(name).get(); + } + } +} +// [END aiplatform_v1_generated_NotebookService_DeleteNotebookRuntime_String_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/deletenotebookruntimetemplate/AsyncDeleteNotebookRuntimeTemplate.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/deletenotebookruntimetemplate/AsyncDeleteNotebookRuntimeTemplate.java new file mode 100644 index 000000000000..00d9a5e1bce8 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/deletenotebookruntimetemplate/AsyncDeleteNotebookRuntimeTemplate.java @@ -0,0 +1,53 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_NotebookService_DeleteNotebookRuntimeTemplate_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeTemplateRequest; +import com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateName; +import com.google.cloud.aiplatform.v1.NotebookServiceClient; +import com.google.longrunning.Operation; + +public class AsyncDeleteNotebookRuntimeTemplate { + + public static void main(String[] args) throws Exception { + asyncDeleteNotebookRuntimeTemplate(); + } + + public static void asyncDeleteNotebookRuntimeTemplate() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + DeleteNotebookRuntimeTemplateRequest request = + DeleteNotebookRuntimeTemplateRequest.newBuilder() + .setName( + NotebookRuntimeTemplateName.of( + "[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]") + .toString()) + .build(); + ApiFuture future = + notebookServiceClient.deleteNotebookRuntimeTemplateCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END aiplatform_v1_generated_NotebookService_DeleteNotebookRuntimeTemplate_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/deletenotebookruntimetemplate/AsyncDeleteNotebookRuntimeTemplateLRO.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/deletenotebookruntimetemplate/AsyncDeleteNotebookRuntimeTemplateLRO.java new file mode 100644 index 000000000000..84fc90474e70 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/deletenotebookruntimetemplate/AsyncDeleteNotebookRuntimeTemplateLRO.java @@ -0,0 +1,56 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_NotebookService_DeleteNotebookRuntimeTemplate_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeTemplateRequest; +import com.google.cloud.aiplatform.v1.DeleteOperationMetadata; +import com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateName; +import com.google.cloud.aiplatform.v1.NotebookServiceClient; +import com.google.protobuf.Empty; + +public class AsyncDeleteNotebookRuntimeTemplateLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteNotebookRuntimeTemplateLRO(); + } + + public static void asyncDeleteNotebookRuntimeTemplateLRO() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + DeleteNotebookRuntimeTemplateRequest request = + DeleteNotebookRuntimeTemplateRequest.newBuilder() + .setName( + NotebookRuntimeTemplateName.of( + "[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]") + .toString()) + .build(); + OperationFuture future = + notebookServiceClient + .deleteNotebookRuntimeTemplateOperationCallable() + .futureCall(request); + // Do something. + future.get(); + } + } +} +// [END aiplatform_v1_generated_NotebookService_DeleteNotebookRuntimeTemplate_LRO_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/deletenotebookruntimetemplate/SyncDeleteNotebookRuntimeTemplate.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/deletenotebookruntimetemplate/SyncDeleteNotebookRuntimeTemplate.java new file mode 100644 index 000000000000..dc438a4d312b --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/deletenotebookruntimetemplate/SyncDeleteNotebookRuntimeTemplate.java @@ -0,0 +1,49 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_NotebookService_DeleteNotebookRuntimeTemplate_sync] +import com.google.cloud.aiplatform.v1.DeleteNotebookRuntimeTemplateRequest; +import com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateName; +import com.google.cloud.aiplatform.v1.NotebookServiceClient; +import com.google.protobuf.Empty; + +public class SyncDeleteNotebookRuntimeTemplate { + + public static void main(String[] args) throws Exception { + syncDeleteNotebookRuntimeTemplate(); + } + + public static void syncDeleteNotebookRuntimeTemplate() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + DeleteNotebookRuntimeTemplateRequest request = + DeleteNotebookRuntimeTemplateRequest.newBuilder() + .setName( + NotebookRuntimeTemplateName.of( + "[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]") + .toString()) + .build(); + notebookServiceClient.deleteNotebookRuntimeTemplateAsync(request).get(); + } + } +} +// [END aiplatform_v1_generated_NotebookService_DeleteNotebookRuntimeTemplate_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/deletenotebookruntimetemplate/SyncDeleteNotebookRuntimeTemplateNotebookruntimetemplatename.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/deletenotebookruntimetemplate/SyncDeleteNotebookRuntimeTemplateNotebookruntimetemplatename.java new file mode 100644 index 000000000000..3ab9deae8629 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/deletenotebookruntimetemplate/SyncDeleteNotebookRuntimeTemplateNotebookruntimetemplatename.java @@ -0,0 +1,44 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_NotebookService_DeleteNotebookRuntimeTemplate_Notebookruntimetemplatename_sync] +import com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateName; +import com.google.cloud.aiplatform.v1.NotebookServiceClient; +import com.google.protobuf.Empty; + +public class SyncDeleteNotebookRuntimeTemplateNotebookruntimetemplatename { + + public static void main(String[] args) throws Exception { + syncDeleteNotebookRuntimeTemplateNotebookruntimetemplatename(); + } + + public static void syncDeleteNotebookRuntimeTemplateNotebookruntimetemplatename() + throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + NotebookRuntimeTemplateName name = + NotebookRuntimeTemplateName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]"); + notebookServiceClient.deleteNotebookRuntimeTemplateAsync(name).get(); + } + } +} +// [END aiplatform_v1_generated_NotebookService_DeleteNotebookRuntimeTemplate_Notebookruntimetemplatename_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/deletenotebookruntimetemplate/SyncDeleteNotebookRuntimeTemplateString.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/deletenotebookruntimetemplate/SyncDeleteNotebookRuntimeTemplateString.java new file mode 100644 index 000000000000..9e76d4f198fd --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/deletenotebookruntimetemplate/SyncDeleteNotebookRuntimeTemplateString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_NotebookService_DeleteNotebookRuntimeTemplate_String_sync] +import com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateName; +import com.google.cloud.aiplatform.v1.NotebookServiceClient; +import com.google.protobuf.Empty; + +public class SyncDeleteNotebookRuntimeTemplateString { + + public static void main(String[] args) throws Exception { + syncDeleteNotebookRuntimeTemplateString(); + } + + public static void syncDeleteNotebookRuntimeTemplateString() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + String name = + NotebookRuntimeTemplateName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]") + .toString(); + notebookServiceClient.deleteNotebookRuntimeTemplateAsync(name).get(); + } + } +} +// [END aiplatform_v1_generated_NotebookService_DeleteNotebookRuntimeTemplate_String_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/getiampolicy/AsyncGetIamPolicy.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/getiampolicy/AsyncGetIamPolicy.java new file mode 100644 index 000000000000..df603b859c5c --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/getiampolicy/AsyncGetIamPolicy.java @@ -0,0 +1,54 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_NotebookService_GetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.EndpointName; +import com.google.cloud.aiplatform.v1.NotebookServiceClient; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; + +public class AsyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncGetIamPolicy(); + } + + public static void asyncGetIamPolicy() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + ApiFuture future = notebookServiceClient.getIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END aiplatform_v1_generated_NotebookService_GetIamPolicy_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/getiampolicy/SyncGetIamPolicy.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/getiampolicy/SyncGetIamPolicy.java new file mode 100644 index 000000000000..49460a95430e --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/getiampolicy/SyncGetIamPolicy.java @@ -0,0 +1,51 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_NotebookService_GetIamPolicy_sync] +import com.google.cloud.aiplatform.v1.EndpointName; +import com.google.cloud.aiplatform.v1.NotebookServiceClient; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; + +public class SyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + syncGetIamPolicy(); + } + + public static void syncGetIamPolicy() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + Policy response = notebookServiceClient.getIamPolicy(request); + } + } +} +// [END aiplatform_v1_generated_NotebookService_GetIamPolicy_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/getlocation/AsyncGetLocation.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/getlocation/AsyncGetLocation.java new file mode 100644 index 000000000000..ba606dfcd6f1 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/getlocation/AsyncGetLocation.java @@ -0,0 +1,45 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_NotebookService_GetLocation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.NotebookServiceClient; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; + +public class AsyncGetLocation { + + public static void main(String[] args) throws Exception { + asyncGetLocation(); + } + + public static void asyncGetLocation() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + ApiFuture future = notebookServiceClient.getLocationCallable().futureCall(request); + // Do something. + Location response = future.get(); + } + } +} +// [END aiplatform_v1_generated_NotebookService_GetLocation_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/getlocation/SyncGetLocation.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/getlocation/SyncGetLocation.java new file mode 100644 index 000000000000..b4fc9d88ec61 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/getlocation/SyncGetLocation.java @@ -0,0 +1,42 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_NotebookService_GetLocation_sync] +import com.google.cloud.aiplatform.v1.NotebookServiceClient; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; + +public class SyncGetLocation { + + public static void main(String[] args) throws Exception { + syncGetLocation(); + } + + public static void syncGetLocation() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + Location response = notebookServiceClient.getLocation(request); + } + } +} +// [END aiplatform_v1_generated_NotebookService_GetLocation_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/getnotebookruntime/AsyncGetNotebookRuntime.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/getnotebookruntime/AsyncGetNotebookRuntime.java new file mode 100644 index 000000000000..39db7169a2ed --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/getnotebookruntime/AsyncGetNotebookRuntime.java @@ -0,0 +1,52 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_NotebookService_GetNotebookRuntime_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.GetNotebookRuntimeRequest; +import com.google.cloud.aiplatform.v1.NotebookRuntime; +import com.google.cloud.aiplatform.v1.NotebookRuntimeName; +import com.google.cloud.aiplatform.v1.NotebookServiceClient; + +public class AsyncGetNotebookRuntime { + + public static void main(String[] args) throws Exception { + asyncGetNotebookRuntime(); + } + + public static void asyncGetNotebookRuntime() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + GetNotebookRuntimeRequest request = + GetNotebookRuntimeRequest.newBuilder() + .setName( + NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]") + .toString()) + .build(); + ApiFuture future = + notebookServiceClient.getNotebookRuntimeCallable().futureCall(request); + // Do something. + NotebookRuntime response = future.get(); + } + } +} +// [END aiplatform_v1_generated_NotebookService_GetNotebookRuntime_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/getnotebookruntime/SyncGetNotebookRuntime.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/getnotebookruntime/SyncGetNotebookRuntime.java new file mode 100644 index 000000000000..bcdeacc0e90f --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/getnotebookruntime/SyncGetNotebookRuntime.java @@ -0,0 +1,48 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_NotebookService_GetNotebookRuntime_sync] +import com.google.cloud.aiplatform.v1.GetNotebookRuntimeRequest; +import com.google.cloud.aiplatform.v1.NotebookRuntime; +import com.google.cloud.aiplatform.v1.NotebookRuntimeName; +import com.google.cloud.aiplatform.v1.NotebookServiceClient; + +public class SyncGetNotebookRuntime { + + public static void main(String[] args) throws Exception { + syncGetNotebookRuntime(); + } + + public static void syncGetNotebookRuntime() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + GetNotebookRuntimeRequest request = + GetNotebookRuntimeRequest.newBuilder() + .setName( + NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]") + .toString()) + .build(); + NotebookRuntime response = notebookServiceClient.getNotebookRuntime(request); + } + } +} +// [END aiplatform_v1_generated_NotebookService_GetNotebookRuntime_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/getnotebookruntime/SyncGetNotebookRuntimeNotebookruntimename.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/getnotebookruntime/SyncGetNotebookRuntimeNotebookruntimename.java new file mode 100644 index 000000000000..0bde30e1ff71 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/getnotebookruntime/SyncGetNotebookRuntimeNotebookruntimename.java @@ -0,0 +1,43 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_NotebookService_GetNotebookRuntime_Notebookruntimename_sync] +import com.google.cloud.aiplatform.v1.NotebookRuntime; +import com.google.cloud.aiplatform.v1.NotebookRuntimeName; +import com.google.cloud.aiplatform.v1.NotebookServiceClient; + +public class SyncGetNotebookRuntimeNotebookruntimename { + + public static void main(String[] args) throws Exception { + syncGetNotebookRuntimeNotebookruntimename(); + } + + public static void syncGetNotebookRuntimeNotebookruntimename() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + NotebookRuntimeName name = + NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]"); + NotebookRuntime response = notebookServiceClient.getNotebookRuntime(name); + } + } +} +// [END aiplatform_v1_generated_NotebookService_GetNotebookRuntime_Notebookruntimename_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/getnotebookruntime/SyncGetNotebookRuntimeString.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/getnotebookruntime/SyncGetNotebookRuntimeString.java new file mode 100644 index 000000000000..ab01081935d3 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/getnotebookruntime/SyncGetNotebookRuntimeString.java @@ -0,0 +1,43 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_NotebookService_GetNotebookRuntime_String_sync] +import com.google.cloud.aiplatform.v1.NotebookRuntime; +import com.google.cloud.aiplatform.v1.NotebookRuntimeName; +import com.google.cloud.aiplatform.v1.NotebookServiceClient; + +public class SyncGetNotebookRuntimeString { + + public static void main(String[] args) throws Exception { + syncGetNotebookRuntimeString(); + } + + public static void syncGetNotebookRuntimeString() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + String name = + NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]").toString(); + NotebookRuntime response = notebookServiceClient.getNotebookRuntime(name); + } + } +} +// [END aiplatform_v1_generated_NotebookService_GetNotebookRuntime_String_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/getnotebookruntimetemplate/AsyncGetNotebookRuntimeTemplate.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/getnotebookruntimetemplate/AsyncGetNotebookRuntimeTemplate.java new file mode 100644 index 000000000000..ce8ac5ae145f --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/getnotebookruntimetemplate/AsyncGetNotebookRuntimeTemplate.java @@ -0,0 +1,53 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_NotebookService_GetNotebookRuntimeTemplate_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.GetNotebookRuntimeTemplateRequest; +import com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate; +import com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateName; +import com.google.cloud.aiplatform.v1.NotebookServiceClient; + +public class AsyncGetNotebookRuntimeTemplate { + + public static void main(String[] args) throws Exception { + asyncGetNotebookRuntimeTemplate(); + } + + public static void asyncGetNotebookRuntimeTemplate() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + GetNotebookRuntimeTemplateRequest request = + GetNotebookRuntimeTemplateRequest.newBuilder() + .setName( + NotebookRuntimeTemplateName.of( + "[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]") + .toString()) + .build(); + ApiFuture future = + notebookServiceClient.getNotebookRuntimeTemplateCallable().futureCall(request); + // Do something. + NotebookRuntimeTemplate response = future.get(); + } + } +} +// [END aiplatform_v1_generated_NotebookService_GetNotebookRuntimeTemplate_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/getnotebookruntimetemplate/SyncGetNotebookRuntimeTemplate.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/getnotebookruntimetemplate/SyncGetNotebookRuntimeTemplate.java new file mode 100644 index 000000000000..715d81215843 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/getnotebookruntimetemplate/SyncGetNotebookRuntimeTemplate.java @@ -0,0 +1,49 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_NotebookService_GetNotebookRuntimeTemplate_sync] +import com.google.cloud.aiplatform.v1.GetNotebookRuntimeTemplateRequest; +import com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate; +import com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateName; +import com.google.cloud.aiplatform.v1.NotebookServiceClient; + +public class SyncGetNotebookRuntimeTemplate { + + public static void main(String[] args) throws Exception { + syncGetNotebookRuntimeTemplate(); + } + + public static void syncGetNotebookRuntimeTemplate() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + GetNotebookRuntimeTemplateRequest request = + GetNotebookRuntimeTemplateRequest.newBuilder() + .setName( + NotebookRuntimeTemplateName.of( + "[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]") + .toString()) + .build(); + NotebookRuntimeTemplate response = notebookServiceClient.getNotebookRuntimeTemplate(request); + } + } +} +// [END aiplatform_v1_generated_NotebookService_GetNotebookRuntimeTemplate_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/getnotebookruntimetemplate/SyncGetNotebookRuntimeTemplateNotebookruntimetemplatename.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/getnotebookruntimetemplate/SyncGetNotebookRuntimeTemplateNotebookruntimetemplatename.java new file mode 100644 index 000000000000..64d78e9b3d65 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/getnotebookruntimetemplate/SyncGetNotebookRuntimeTemplateNotebookruntimetemplatename.java @@ -0,0 +1,43 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_NotebookService_GetNotebookRuntimeTemplate_Notebookruntimetemplatename_sync] +import com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate; +import com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateName; +import com.google.cloud.aiplatform.v1.NotebookServiceClient; + +public class SyncGetNotebookRuntimeTemplateNotebookruntimetemplatename { + + public static void main(String[] args) throws Exception { + syncGetNotebookRuntimeTemplateNotebookruntimetemplatename(); + } + + public static void syncGetNotebookRuntimeTemplateNotebookruntimetemplatename() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + NotebookRuntimeTemplateName name = + NotebookRuntimeTemplateName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]"); + NotebookRuntimeTemplate response = notebookServiceClient.getNotebookRuntimeTemplate(name); + } + } +} +// [END aiplatform_v1_generated_NotebookService_GetNotebookRuntimeTemplate_Notebookruntimetemplatename_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/getnotebookruntimetemplate/SyncGetNotebookRuntimeTemplateString.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/getnotebookruntimetemplate/SyncGetNotebookRuntimeTemplateString.java new file mode 100644 index 000000000000..71dc529954a1 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/getnotebookruntimetemplate/SyncGetNotebookRuntimeTemplateString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_NotebookService_GetNotebookRuntimeTemplate_String_sync] +import com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate; +import com.google.cloud.aiplatform.v1.NotebookRuntimeTemplateName; +import com.google.cloud.aiplatform.v1.NotebookServiceClient; + +public class SyncGetNotebookRuntimeTemplateString { + + public static void main(String[] args) throws Exception { + syncGetNotebookRuntimeTemplateString(); + } + + public static void syncGetNotebookRuntimeTemplateString() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + String name = + NotebookRuntimeTemplateName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]") + .toString(); + NotebookRuntimeTemplate response = notebookServiceClient.getNotebookRuntimeTemplate(name); + } + } +} +// [END aiplatform_v1_generated_NotebookService_GetNotebookRuntimeTemplate_String_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/listlocations/AsyncListLocations.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/listlocations/AsyncListLocations.java new file mode 100644 index 000000000000..617131260500 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/listlocations/AsyncListLocations.java @@ -0,0 +1,54 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_NotebookService_ListLocations_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.NotebookServiceClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; + +public class AsyncListLocations { + + public static void main(String[] args) throws Exception { + asyncListLocations(); + } + + public static void asyncListLocations() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + notebookServiceClient.listLocationsPagedCallable().futureCall(request); + // Do something. + for (Location element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1_generated_NotebookService_ListLocations_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/listlocations/AsyncListLocationsPaged.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/listlocations/AsyncListLocationsPaged.java new file mode 100644 index 000000000000..454e98f435c5 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/listlocations/AsyncListLocationsPaged.java @@ -0,0 +1,62 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_NotebookService_ListLocations_Paged_async] +import com.google.cloud.aiplatform.v1.NotebookServiceClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.base.Strings; + +public class AsyncListLocationsPaged { + + public static void main(String[] args) throws Exception { + asyncListLocationsPaged(); + } + + public static void asyncListLocationsPaged() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListLocationsResponse response = + notebookServiceClient.listLocationsCallable().call(request); + for (Location element : response.getLocationsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END aiplatform_v1_generated_NotebookService_ListLocations_Paged_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/listlocations/SyncListLocations.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/listlocations/SyncListLocations.java new file mode 100644 index 000000000000..19dbe7fbda24 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/listlocations/SyncListLocations.java @@ -0,0 +1,50 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_NotebookService_ListLocations_sync] +import com.google.cloud.aiplatform.v1.NotebookServiceClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; + +public class SyncListLocations { + + public static void main(String[] args) throws Exception { + syncListLocations(); + } + + public static void syncListLocations() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Location element : notebookServiceClient.listLocations(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1_generated_NotebookService_ListLocations_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/listnotebookruntimes/AsyncListNotebookRuntimes.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/listnotebookruntimes/AsyncListNotebookRuntimes.java new file mode 100644 index 000000000000..68cbca102e19 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/listnotebookruntimes/AsyncListNotebookRuntimes.java @@ -0,0 +1,58 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_NotebookService_ListNotebookRuntimes_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.ListNotebookRuntimesRequest; +import com.google.cloud.aiplatform.v1.LocationName; +import com.google.cloud.aiplatform.v1.NotebookRuntime; +import com.google.cloud.aiplatform.v1.NotebookServiceClient; +import com.google.protobuf.FieldMask; + +public class AsyncListNotebookRuntimes { + + public static void main(String[] args) throws Exception { + asyncListNotebookRuntimes(); + } + + public static void asyncListNotebookRuntimes() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + ListNotebookRuntimesRequest request = + ListNotebookRuntimesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setReadMask(FieldMask.newBuilder().build()) + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = + notebookServiceClient.listNotebookRuntimesPagedCallable().futureCall(request); + // Do something. + for (NotebookRuntime element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1_generated_NotebookService_ListNotebookRuntimes_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/listnotebookruntimes/AsyncListNotebookRuntimesPaged.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/listnotebookruntimes/AsyncListNotebookRuntimesPaged.java new file mode 100644 index 000000000000..a71afa6eccbf --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/listnotebookruntimes/AsyncListNotebookRuntimesPaged.java @@ -0,0 +1,66 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_NotebookService_ListNotebookRuntimes_Paged_async] +import com.google.cloud.aiplatform.v1.ListNotebookRuntimesRequest; +import com.google.cloud.aiplatform.v1.ListNotebookRuntimesResponse; +import com.google.cloud.aiplatform.v1.LocationName; +import com.google.cloud.aiplatform.v1.NotebookRuntime; +import com.google.cloud.aiplatform.v1.NotebookServiceClient; +import com.google.common.base.Strings; +import com.google.protobuf.FieldMask; + +public class AsyncListNotebookRuntimesPaged { + + public static void main(String[] args) throws Exception { + asyncListNotebookRuntimesPaged(); + } + + public static void asyncListNotebookRuntimesPaged() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + ListNotebookRuntimesRequest request = + ListNotebookRuntimesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setReadMask(FieldMask.newBuilder().build()) + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListNotebookRuntimesResponse response = + notebookServiceClient.listNotebookRuntimesCallable().call(request); + for (NotebookRuntime element : response.getNotebookRuntimesList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END aiplatform_v1_generated_NotebookService_ListNotebookRuntimes_Paged_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/listnotebookruntimes/SyncListNotebookRuntimes.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/listnotebookruntimes/SyncListNotebookRuntimes.java new file mode 100644 index 000000000000..4a65103ac88f --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/listnotebookruntimes/SyncListNotebookRuntimes.java @@ -0,0 +1,55 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_NotebookService_ListNotebookRuntimes_sync] +import com.google.cloud.aiplatform.v1.ListNotebookRuntimesRequest; +import com.google.cloud.aiplatform.v1.LocationName; +import com.google.cloud.aiplatform.v1.NotebookRuntime; +import com.google.cloud.aiplatform.v1.NotebookServiceClient; +import com.google.protobuf.FieldMask; + +public class SyncListNotebookRuntimes { + + public static void main(String[] args) throws Exception { + syncListNotebookRuntimes(); + } + + public static void syncListNotebookRuntimes() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + ListNotebookRuntimesRequest request = + ListNotebookRuntimesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setReadMask(FieldMask.newBuilder().build()) + .setOrderBy("orderBy-1207110587") + .build(); + for (NotebookRuntime element : + notebookServiceClient.listNotebookRuntimes(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1_generated_NotebookService_ListNotebookRuntimes_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/listnotebookruntimes/SyncListNotebookRuntimesLocationname.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/listnotebookruntimes/SyncListNotebookRuntimesLocationname.java new file mode 100644 index 000000000000..e7a9afc4dc4b --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/listnotebookruntimes/SyncListNotebookRuntimesLocationname.java @@ -0,0 +1,45 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_NotebookService_ListNotebookRuntimes_Locationname_sync] +import com.google.cloud.aiplatform.v1.LocationName; +import com.google.cloud.aiplatform.v1.NotebookRuntime; +import com.google.cloud.aiplatform.v1.NotebookServiceClient; + +public class SyncListNotebookRuntimesLocationname { + + public static void main(String[] args) throws Exception { + syncListNotebookRuntimesLocationname(); + } + + public static void syncListNotebookRuntimesLocationname() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (NotebookRuntime element : + notebookServiceClient.listNotebookRuntimes(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1_generated_NotebookService_ListNotebookRuntimes_Locationname_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/listnotebookruntimes/SyncListNotebookRuntimesString.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/listnotebookruntimes/SyncListNotebookRuntimesString.java new file mode 100644 index 000000000000..9fd1aa3d2755 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/listnotebookruntimes/SyncListNotebookRuntimesString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_NotebookService_ListNotebookRuntimes_String_sync] +import com.google.cloud.aiplatform.v1.LocationName; +import com.google.cloud.aiplatform.v1.NotebookRuntime; +import com.google.cloud.aiplatform.v1.NotebookServiceClient; + +public class SyncListNotebookRuntimesString { + + public static void main(String[] args) throws Exception { + syncListNotebookRuntimesString(); + } + + public static void syncListNotebookRuntimesString() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (NotebookRuntime element : + notebookServiceClient.listNotebookRuntimes(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1_generated_NotebookService_ListNotebookRuntimes_String_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/listnotebookruntimetemplates/AsyncListNotebookRuntimeTemplates.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/listnotebookruntimetemplates/AsyncListNotebookRuntimeTemplates.java new file mode 100644 index 000000000000..7436811b906b --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/listnotebookruntimetemplates/AsyncListNotebookRuntimeTemplates.java @@ -0,0 +1,58 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_NotebookService_ListNotebookRuntimeTemplates_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest; +import com.google.cloud.aiplatform.v1.LocationName; +import com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate; +import com.google.cloud.aiplatform.v1.NotebookServiceClient; +import com.google.protobuf.FieldMask; + +public class AsyncListNotebookRuntimeTemplates { + + public static void main(String[] args) throws Exception { + asyncListNotebookRuntimeTemplates(); + } + + public static void asyncListNotebookRuntimeTemplates() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + ListNotebookRuntimeTemplatesRequest request = + ListNotebookRuntimeTemplatesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setReadMask(FieldMask.newBuilder().build()) + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = + notebookServiceClient.listNotebookRuntimeTemplatesPagedCallable().futureCall(request); + // Do something. + for (NotebookRuntimeTemplate element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1_generated_NotebookService_ListNotebookRuntimeTemplates_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/listnotebookruntimetemplates/AsyncListNotebookRuntimeTemplatesPaged.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/listnotebookruntimetemplates/AsyncListNotebookRuntimeTemplatesPaged.java new file mode 100644 index 000000000000..b8aaa86b1f4d --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/listnotebookruntimetemplates/AsyncListNotebookRuntimeTemplatesPaged.java @@ -0,0 +1,66 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_NotebookService_ListNotebookRuntimeTemplates_Paged_async] +import com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest; +import com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse; +import com.google.cloud.aiplatform.v1.LocationName; +import com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate; +import com.google.cloud.aiplatform.v1.NotebookServiceClient; +import com.google.common.base.Strings; +import com.google.protobuf.FieldMask; + +public class AsyncListNotebookRuntimeTemplatesPaged { + + public static void main(String[] args) throws Exception { + asyncListNotebookRuntimeTemplatesPaged(); + } + + public static void asyncListNotebookRuntimeTemplatesPaged() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + ListNotebookRuntimeTemplatesRequest request = + ListNotebookRuntimeTemplatesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setReadMask(FieldMask.newBuilder().build()) + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListNotebookRuntimeTemplatesResponse response = + notebookServiceClient.listNotebookRuntimeTemplatesCallable().call(request); + for (NotebookRuntimeTemplate element : response.getNotebookRuntimeTemplatesList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END aiplatform_v1_generated_NotebookService_ListNotebookRuntimeTemplates_Paged_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/listnotebookruntimetemplates/SyncListNotebookRuntimeTemplates.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/listnotebookruntimetemplates/SyncListNotebookRuntimeTemplates.java new file mode 100644 index 000000000000..c5c477dbe78c --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/listnotebookruntimetemplates/SyncListNotebookRuntimeTemplates.java @@ -0,0 +1,55 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_NotebookService_ListNotebookRuntimeTemplates_sync] +import com.google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest; +import com.google.cloud.aiplatform.v1.LocationName; +import com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate; +import com.google.cloud.aiplatform.v1.NotebookServiceClient; +import com.google.protobuf.FieldMask; + +public class SyncListNotebookRuntimeTemplates { + + public static void main(String[] args) throws Exception { + syncListNotebookRuntimeTemplates(); + } + + public static void syncListNotebookRuntimeTemplates() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + ListNotebookRuntimeTemplatesRequest request = + ListNotebookRuntimeTemplatesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setReadMask(FieldMask.newBuilder().build()) + .setOrderBy("orderBy-1207110587") + .build(); + for (NotebookRuntimeTemplate element : + notebookServiceClient.listNotebookRuntimeTemplates(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1_generated_NotebookService_ListNotebookRuntimeTemplates_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/listnotebookruntimetemplates/SyncListNotebookRuntimeTemplatesLocationname.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/listnotebookruntimetemplates/SyncListNotebookRuntimeTemplatesLocationname.java new file mode 100644 index 000000000000..609dbf0d48fb --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/listnotebookruntimetemplates/SyncListNotebookRuntimeTemplatesLocationname.java @@ -0,0 +1,45 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_NotebookService_ListNotebookRuntimeTemplates_Locationname_sync] +import com.google.cloud.aiplatform.v1.LocationName; +import com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate; +import com.google.cloud.aiplatform.v1.NotebookServiceClient; + +public class SyncListNotebookRuntimeTemplatesLocationname { + + public static void main(String[] args) throws Exception { + syncListNotebookRuntimeTemplatesLocationname(); + } + + public static void syncListNotebookRuntimeTemplatesLocationname() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (NotebookRuntimeTemplate element : + notebookServiceClient.listNotebookRuntimeTemplates(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1_generated_NotebookService_ListNotebookRuntimeTemplates_Locationname_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/listnotebookruntimetemplates/SyncListNotebookRuntimeTemplatesString.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/listnotebookruntimetemplates/SyncListNotebookRuntimeTemplatesString.java new file mode 100644 index 000000000000..e032f4e01686 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/listnotebookruntimetemplates/SyncListNotebookRuntimeTemplatesString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_NotebookService_ListNotebookRuntimeTemplates_String_sync] +import com.google.cloud.aiplatform.v1.LocationName; +import com.google.cloud.aiplatform.v1.NotebookRuntimeTemplate; +import com.google.cloud.aiplatform.v1.NotebookServiceClient; + +public class SyncListNotebookRuntimeTemplatesString { + + public static void main(String[] args) throws Exception { + syncListNotebookRuntimeTemplatesString(); + } + + public static void syncListNotebookRuntimeTemplatesString() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (NotebookRuntimeTemplate element : + notebookServiceClient.listNotebookRuntimeTemplates(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1_generated_NotebookService_ListNotebookRuntimeTemplates_String_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/setiampolicy/AsyncSetIamPolicy.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/setiampolicy/AsyncSetIamPolicy.java new file mode 100644 index 000000000000..9b9490eebc33 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/setiampolicy/AsyncSetIamPolicy.java @@ -0,0 +1,55 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_NotebookService_SetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.EndpointName; +import com.google.cloud.aiplatform.v1.NotebookServiceClient; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.protobuf.FieldMask; + +public class AsyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncSetIamPolicy(); + } + + public static void asyncSetIamPolicy() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = notebookServiceClient.setIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END aiplatform_v1_generated_NotebookService_SetIamPolicy_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/setiampolicy/SyncSetIamPolicy.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/setiampolicy/SyncSetIamPolicy.java new file mode 100644 index 000000000000..7ea3daee5f94 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/setiampolicy/SyncSetIamPolicy.java @@ -0,0 +1,52 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_NotebookService_SetIamPolicy_sync] +import com.google.cloud.aiplatform.v1.EndpointName; +import com.google.cloud.aiplatform.v1.NotebookServiceClient; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.protobuf.FieldMask; + +public class SyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + syncSetIamPolicy(); + } + + public static void syncSetIamPolicy() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + Policy response = notebookServiceClient.setIamPolicy(request); + } + } +} +// [END aiplatform_v1_generated_NotebookService_SetIamPolicy_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/startnotebookruntime/AsyncStartNotebookRuntime.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/startnotebookruntime/AsyncStartNotebookRuntime.java new file mode 100644 index 000000000000..11672bba9544 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/startnotebookruntime/AsyncStartNotebookRuntime.java @@ -0,0 +1,52 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_NotebookService_StartNotebookRuntime_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.NotebookRuntimeName; +import com.google.cloud.aiplatform.v1.NotebookServiceClient; +import com.google.cloud.aiplatform.v1.StartNotebookRuntimeRequest; +import com.google.longrunning.Operation; + +public class AsyncStartNotebookRuntime { + + public static void main(String[] args) throws Exception { + asyncStartNotebookRuntime(); + } + + public static void asyncStartNotebookRuntime() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + StartNotebookRuntimeRequest request = + StartNotebookRuntimeRequest.newBuilder() + .setName( + NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]") + .toString()) + .build(); + ApiFuture future = + notebookServiceClient.startNotebookRuntimeCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END aiplatform_v1_generated_NotebookService_StartNotebookRuntime_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/startnotebookruntime/AsyncStartNotebookRuntimeLRO.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/startnotebookruntime/AsyncStartNotebookRuntimeLRO.java new file mode 100644 index 000000000000..416b268f0dab --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/startnotebookruntime/AsyncStartNotebookRuntimeLRO.java @@ -0,0 +1,53 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_NotebookService_StartNotebookRuntime_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.aiplatform.v1.NotebookRuntimeName; +import com.google.cloud.aiplatform.v1.NotebookServiceClient; +import com.google.cloud.aiplatform.v1.StartNotebookRuntimeOperationMetadata; +import com.google.cloud.aiplatform.v1.StartNotebookRuntimeRequest; +import com.google.cloud.aiplatform.v1.StartNotebookRuntimeResponse; + +public class AsyncStartNotebookRuntimeLRO { + + public static void main(String[] args) throws Exception { + asyncStartNotebookRuntimeLRO(); + } + + public static void asyncStartNotebookRuntimeLRO() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + StartNotebookRuntimeRequest request = + StartNotebookRuntimeRequest.newBuilder() + .setName( + NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]") + .toString()) + .build(); + OperationFuture future = + notebookServiceClient.startNotebookRuntimeOperationCallable().futureCall(request); + // Do something. + StartNotebookRuntimeResponse response = future.get(); + } + } +} +// [END aiplatform_v1_generated_NotebookService_StartNotebookRuntime_LRO_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/startnotebookruntime/SyncStartNotebookRuntime.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/startnotebookruntime/SyncStartNotebookRuntime.java new file mode 100644 index 000000000000..f950911844fc --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/startnotebookruntime/SyncStartNotebookRuntime.java @@ -0,0 +1,49 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_NotebookService_StartNotebookRuntime_sync] +import com.google.cloud.aiplatform.v1.NotebookRuntimeName; +import com.google.cloud.aiplatform.v1.NotebookServiceClient; +import com.google.cloud.aiplatform.v1.StartNotebookRuntimeRequest; +import com.google.cloud.aiplatform.v1.StartNotebookRuntimeResponse; + +public class SyncStartNotebookRuntime { + + public static void main(String[] args) throws Exception { + syncStartNotebookRuntime(); + } + + public static void syncStartNotebookRuntime() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + StartNotebookRuntimeRequest request = + StartNotebookRuntimeRequest.newBuilder() + .setName( + NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]") + .toString()) + .build(); + StartNotebookRuntimeResponse response = + notebookServiceClient.startNotebookRuntimeAsync(request).get(); + } + } +} +// [END aiplatform_v1_generated_NotebookService_StartNotebookRuntime_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/startnotebookruntime/SyncStartNotebookRuntimeNotebookruntimename.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/startnotebookruntime/SyncStartNotebookRuntimeNotebookruntimename.java new file mode 100644 index 000000000000..da2235cdc1b8 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/startnotebookruntime/SyncStartNotebookRuntimeNotebookruntimename.java @@ -0,0 +1,44 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_NotebookService_StartNotebookRuntime_Notebookruntimename_sync] +import com.google.cloud.aiplatform.v1.NotebookRuntimeName; +import com.google.cloud.aiplatform.v1.NotebookServiceClient; +import com.google.cloud.aiplatform.v1.StartNotebookRuntimeResponse; + +public class SyncStartNotebookRuntimeNotebookruntimename { + + public static void main(String[] args) throws Exception { + syncStartNotebookRuntimeNotebookruntimename(); + } + + public static void syncStartNotebookRuntimeNotebookruntimename() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + NotebookRuntimeName name = + NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]"); + StartNotebookRuntimeResponse response = + notebookServiceClient.startNotebookRuntimeAsync(name).get(); + } + } +} +// [END aiplatform_v1_generated_NotebookService_StartNotebookRuntime_Notebookruntimename_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/startnotebookruntime/SyncStartNotebookRuntimeString.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/startnotebookruntime/SyncStartNotebookRuntimeString.java new file mode 100644 index 000000000000..136f717b44ec --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/startnotebookruntime/SyncStartNotebookRuntimeString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_NotebookService_StartNotebookRuntime_String_sync] +import com.google.cloud.aiplatform.v1.NotebookRuntimeName; +import com.google.cloud.aiplatform.v1.NotebookServiceClient; +import com.google.cloud.aiplatform.v1.StartNotebookRuntimeResponse; + +public class SyncStartNotebookRuntimeString { + + public static void main(String[] args) throws Exception { + syncStartNotebookRuntimeString(); + } + + public static void syncStartNotebookRuntimeString() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + String name = + NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]").toString(); + StartNotebookRuntimeResponse response = + notebookServiceClient.startNotebookRuntimeAsync(name).get(); + } + } +} +// [END aiplatform_v1_generated_NotebookService_StartNotebookRuntime_String_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/testiampermissions/AsyncTestIamPermissions.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/testiampermissions/AsyncTestIamPermissions.java new file mode 100644 index 000000000000..2af2f917f4d5 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/testiampermissions/AsyncTestIamPermissions.java @@ -0,0 +1,55 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_NotebookService_TestIamPermissions_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.EndpointName; +import com.google.cloud.aiplatform.v1.NotebookServiceClient; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import java.util.ArrayList; + +public class AsyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + asyncTestIamPermissions(); + } + + public static void asyncTestIamPermissions() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .addAllPermissions(new ArrayList()) + .build(); + ApiFuture future = + notebookServiceClient.testIamPermissionsCallable().futureCall(request); + // Do something. + TestIamPermissionsResponse response = future.get(); + } + } +} +// [END aiplatform_v1_generated_NotebookService_TestIamPermissions_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/testiampermissions/SyncTestIamPermissions.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/testiampermissions/SyncTestIamPermissions.java new file mode 100644 index 000000000000..1cd406628d6b --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/testiampermissions/SyncTestIamPermissions.java @@ -0,0 +1,51 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_NotebookService_TestIamPermissions_sync] +import com.google.cloud.aiplatform.v1.EndpointName; +import com.google.cloud.aiplatform.v1.NotebookServiceClient; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import java.util.ArrayList; + +public class SyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + syncTestIamPermissions(); + } + + public static void syncTestIamPermissions() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .addAllPermissions(new ArrayList()) + .build(); + TestIamPermissionsResponse response = notebookServiceClient.testIamPermissions(request); + } + } +} +// [END aiplatform_v1_generated_NotebookService_TestIamPermissions_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/upgradenotebookruntime/AsyncUpgradeNotebookRuntime.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/upgradenotebookruntime/AsyncUpgradeNotebookRuntime.java new file mode 100644 index 000000000000..c7052a40c0dc --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/upgradenotebookruntime/AsyncUpgradeNotebookRuntime.java @@ -0,0 +1,52 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_NotebookService_UpgradeNotebookRuntime_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.NotebookRuntimeName; +import com.google.cloud.aiplatform.v1.NotebookServiceClient; +import com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeRequest; +import com.google.longrunning.Operation; + +public class AsyncUpgradeNotebookRuntime { + + public static void main(String[] args) throws Exception { + asyncUpgradeNotebookRuntime(); + } + + public static void asyncUpgradeNotebookRuntime() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + UpgradeNotebookRuntimeRequest request = + UpgradeNotebookRuntimeRequest.newBuilder() + .setName( + NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]") + .toString()) + .build(); + ApiFuture future = + notebookServiceClient.upgradeNotebookRuntimeCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END aiplatform_v1_generated_NotebookService_UpgradeNotebookRuntime_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/upgradenotebookruntime/AsyncUpgradeNotebookRuntimeLRO.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/upgradenotebookruntime/AsyncUpgradeNotebookRuntimeLRO.java new file mode 100644 index 000000000000..a0a2ab1a645a --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/upgradenotebookruntime/AsyncUpgradeNotebookRuntimeLRO.java @@ -0,0 +1,54 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_NotebookService_UpgradeNotebookRuntime_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.aiplatform.v1.NotebookRuntimeName; +import com.google.cloud.aiplatform.v1.NotebookServiceClient; +import com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeOperationMetadata; +import com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeRequest; +import com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeResponse; + +public class AsyncUpgradeNotebookRuntimeLRO { + + public static void main(String[] args) throws Exception { + asyncUpgradeNotebookRuntimeLRO(); + } + + public static void asyncUpgradeNotebookRuntimeLRO() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + UpgradeNotebookRuntimeRequest request = + UpgradeNotebookRuntimeRequest.newBuilder() + .setName( + NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]") + .toString()) + .build(); + OperationFuture + future = + notebookServiceClient.upgradeNotebookRuntimeOperationCallable().futureCall(request); + // Do something. + UpgradeNotebookRuntimeResponse response = future.get(); + } + } +} +// [END aiplatform_v1_generated_NotebookService_UpgradeNotebookRuntime_LRO_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/upgradenotebookruntime/SyncUpgradeNotebookRuntime.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/upgradenotebookruntime/SyncUpgradeNotebookRuntime.java new file mode 100644 index 000000000000..de916ae99527 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/upgradenotebookruntime/SyncUpgradeNotebookRuntime.java @@ -0,0 +1,49 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_NotebookService_UpgradeNotebookRuntime_sync] +import com.google.cloud.aiplatform.v1.NotebookRuntimeName; +import com.google.cloud.aiplatform.v1.NotebookServiceClient; +import com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeRequest; +import com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeResponse; + +public class SyncUpgradeNotebookRuntime { + + public static void main(String[] args) throws Exception { + syncUpgradeNotebookRuntime(); + } + + public static void syncUpgradeNotebookRuntime() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + UpgradeNotebookRuntimeRequest request = + UpgradeNotebookRuntimeRequest.newBuilder() + .setName( + NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]") + .toString()) + .build(); + UpgradeNotebookRuntimeResponse response = + notebookServiceClient.upgradeNotebookRuntimeAsync(request).get(); + } + } +} +// [END aiplatform_v1_generated_NotebookService_UpgradeNotebookRuntime_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/upgradenotebookruntime/SyncUpgradeNotebookRuntimeNotebookruntimename.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/upgradenotebookruntime/SyncUpgradeNotebookRuntimeNotebookruntimename.java new file mode 100644 index 000000000000..c5a7387677bc --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/upgradenotebookruntime/SyncUpgradeNotebookRuntimeNotebookruntimename.java @@ -0,0 +1,44 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_NotebookService_UpgradeNotebookRuntime_Notebookruntimename_sync] +import com.google.cloud.aiplatform.v1.NotebookRuntimeName; +import com.google.cloud.aiplatform.v1.NotebookServiceClient; +import com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeResponse; + +public class SyncUpgradeNotebookRuntimeNotebookruntimename { + + public static void main(String[] args) throws Exception { + syncUpgradeNotebookRuntimeNotebookruntimename(); + } + + public static void syncUpgradeNotebookRuntimeNotebookruntimename() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + NotebookRuntimeName name = + NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]"); + UpgradeNotebookRuntimeResponse response = + notebookServiceClient.upgradeNotebookRuntimeAsync(name).get(); + } + } +} +// [END aiplatform_v1_generated_NotebookService_UpgradeNotebookRuntime_Notebookruntimename_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/upgradenotebookruntime/SyncUpgradeNotebookRuntimeString.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/upgradenotebookruntime/SyncUpgradeNotebookRuntimeString.java new file mode 100644 index 000000000000..d6857703517b --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservice/upgradenotebookruntime/SyncUpgradeNotebookRuntimeString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_NotebookService_UpgradeNotebookRuntime_String_sync] +import com.google.cloud.aiplatform.v1.NotebookRuntimeName; +import com.google.cloud.aiplatform.v1.NotebookServiceClient; +import com.google.cloud.aiplatform.v1.UpgradeNotebookRuntimeResponse; + +public class SyncUpgradeNotebookRuntimeString { + + public static void main(String[] args) throws Exception { + syncUpgradeNotebookRuntimeString(); + } + + public static void syncUpgradeNotebookRuntimeString() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + String name = + NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]").toString(); + UpgradeNotebookRuntimeResponse response = + notebookServiceClient.upgradeNotebookRuntimeAsync(name).get(); + } + } +} +// [END aiplatform_v1_generated_NotebookService_UpgradeNotebookRuntime_String_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservicesettings/getnotebookruntimetemplate/SyncGetNotebookRuntimeTemplate.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservicesettings/getnotebookruntimetemplate/SyncGetNotebookRuntimeTemplate.java new file mode 100644 index 000000000000..ad550f0dfb06 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/notebookservicesettings/getnotebookruntimetemplate/SyncGetNotebookRuntimeTemplate.java @@ -0,0 +1,49 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_NotebookServiceSettings_GetNotebookRuntimeTemplate_sync] +import com.google.cloud.aiplatform.v1.NotebookServiceSettings; +import java.time.Duration; + +public class SyncGetNotebookRuntimeTemplate { + + public static void main(String[] args) throws Exception { + syncGetNotebookRuntimeTemplate(); + } + + public static void syncGetNotebookRuntimeTemplate() throws Exception { + // 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 + NotebookServiceSettings.Builder notebookServiceSettingsBuilder = + NotebookServiceSettings.newBuilder(); + notebookServiceSettingsBuilder + .getNotebookRuntimeTemplateSettings() + .setRetrySettings( + notebookServiceSettingsBuilder + .getNotebookRuntimeTemplateSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + NotebookServiceSettings notebookServiceSettings = notebookServiceSettingsBuilder.build(); + } +} +// [END aiplatform_v1_generated_NotebookServiceSettings_GetNotebookRuntimeTemplate_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/create/SyncCreateSetCredentialsProvider.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..3acbeded7bd4 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,45 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_PersistentResourceService_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.aiplatform.v1.PersistentResourceServiceClient; +import com.google.cloud.aiplatform.v1.PersistentResourceServiceSettings; +import com.google.cloud.aiplatform.v1.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // 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 + PersistentResourceServiceSettings persistentResourceServiceSettings = + PersistentResourceServiceSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + PersistentResourceServiceClient persistentResourceServiceClient = + PersistentResourceServiceClient.create(persistentResourceServiceSettings); + } +} +// [END aiplatform_v1_generated_PersistentResourceService_Create_SetCredentialsProvider_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/create/SyncCreateSetEndpoint.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..4c8f9c55c587 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_PersistentResourceService_Create_SetEndpoint_sync] +import com.google.cloud.aiplatform.v1.PersistentResourceServiceClient; +import com.google.cloud.aiplatform.v1.PersistentResourceServiceSettings; +import com.google.cloud.aiplatform.v1.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // 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 + PersistentResourceServiceSettings persistentResourceServiceSettings = + PersistentResourceServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); + PersistentResourceServiceClient persistentResourceServiceClient = + PersistentResourceServiceClient.create(persistentResourceServiceSettings); + } +} +// [END aiplatform_v1_generated_PersistentResourceService_Create_SetEndpoint_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/createpersistentresource/AsyncCreatePersistentResource.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/createpersistentresource/AsyncCreatePersistentResource.java new file mode 100644 index 000000000000..1b2fc850d250 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/createpersistentresource/AsyncCreatePersistentResource.java @@ -0,0 +1,54 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_PersistentResourceService_CreatePersistentResource_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.CreatePersistentResourceRequest; +import com.google.cloud.aiplatform.v1.LocationName; +import com.google.cloud.aiplatform.v1.PersistentResource; +import com.google.cloud.aiplatform.v1.PersistentResourceServiceClient; +import com.google.longrunning.Operation; + +public class AsyncCreatePersistentResource { + + public static void main(String[] args) throws Exception { + asyncCreatePersistentResource(); + } + + public static void asyncCreatePersistentResource() throws Exception { + // 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 (PersistentResourceServiceClient persistentResourceServiceClient = + PersistentResourceServiceClient.create()) { + CreatePersistentResourceRequest request = + CreatePersistentResourceRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPersistentResource(PersistentResource.newBuilder().build()) + .setPersistentResourceId("persistentResourceId-2123080768") + .build(); + ApiFuture future = + persistentResourceServiceClient.createPersistentResourceCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END aiplatform_v1_generated_PersistentResourceService_CreatePersistentResource_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/createpersistentresource/AsyncCreatePersistentResourceLRO.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/createpersistentresource/AsyncCreatePersistentResourceLRO.java new file mode 100644 index 000000000000..b13bacd561e8 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/createpersistentresource/AsyncCreatePersistentResourceLRO.java @@ -0,0 +1,56 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_PersistentResourceService_CreatePersistentResource_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.aiplatform.v1.CreatePersistentResourceOperationMetadata; +import com.google.cloud.aiplatform.v1.CreatePersistentResourceRequest; +import com.google.cloud.aiplatform.v1.LocationName; +import com.google.cloud.aiplatform.v1.PersistentResource; +import com.google.cloud.aiplatform.v1.PersistentResourceServiceClient; + +public class AsyncCreatePersistentResourceLRO { + + public static void main(String[] args) throws Exception { + asyncCreatePersistentResourceLRO(); + } + + public static void asyncCreatePersistentResourceLRO() throws Exception { + // 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 (PersistentResourceServiceClient persistentResourceServiceClient = + PersistentResourceServiceClient.create()) { + CreatePersistentResourceRequest request = + CreatePersistentResourceRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPersistentResource(PersistentResource.newBuilder().build()) + .setPersistentResourceId("persistentResourceId-2123080768") + .build(); + OperationFuture future = + persistentResourceServiceClient + .createPersistentResourceOperationCallable() + .futureCall(request); + // Do something. + PersistentResource response = future.get(); + } + } +} +// [END aiplatform_v1_generated_PersistentResourceService_CreatePersistentResource_LRO_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/createpersistentresource/SyncCreatePersistentResource.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/createpersistentresource/SyncCreatePersistentResource.java new file mode 100644 index 000000000000..5a1a5f30c85a --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/createpersistentresource/SyncCreatePersistentResource.java @@ -0,0 +1,50 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_PersistentResourceService_CreatePersistentResource_sync] +import com.google.cloud.aiplatform.v1.CreatePersistentResourceRequest; +import com.google.cloud.aiplatform.v1.LocationName; +import com.google.cloud.aiplatform.v1.PersistentResource; +import com.google.cloud.aiplatform.v1.PersistentResourceServiceClient; + +public class SyncCreatePersistentResource { + + public static void main(String[] args) throws Exception { + syncCreatePersistentResource(); + } + + public static void syncCreatePersistentResource() throws Exception { + // 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 (PersistentResourceServiceClient persistentResourceServiceClient = + PersistentResourceServiceClient.create()) { + CreatePersistentResourceRequest request = + CreatePersistentResourceRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPersistentResource(PersistentResource.newBuilder().build()) + .setPersistentResourceId("persistentResourceId-2123080768") + .build(); + PersistentResource response = + persistentResourceServiceClient.createPersistentResourceAsync(request).get(); + } + } +} +// [END aiplatform_v1_generated_PersistentResourceService_CreatePersistentResource_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/createpersistentresource/SyncCreatePersistentResourceLocationnamePersistentresourceString.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/createpersistentresource/SyncCreatePersistentResourceLocationnamePersistentresourceString.java new file mode 100644 index 000000000000..34c438e7df7f --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/createpersistentresource/SyncCreatePersistentResourceLocationnamePersistentresourceString.java @@ -0,0 +1,49 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_PersistentResourceService_CreatePersistentResource_LocationnamePersistentresourceString_sync] +import com.google.cloud.aiplatform.v1.LocationName; +import com.google.cloud.aiplatform.v1.PersistentResource; +import com.google.cloud.aiplatform.v1.PersistentResourceServiceClient; + +public class SyncCreatePersistentResourceLocationnamePersistentresourceString { + + public static void main(String[] args) throws Exception { + syncCreatePersistentResourceLocationnamePersistentresourceString(); + } + + public static void syncCreatePersistentResourceLocationnamePersistentresourceString() + throws Exception { + // 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 (PersistentResourceServiceClient persistentResourceServiceClient = + PersistentResourceServiceClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + PersistentResource persistentResource = PersistentResource.newBuilder().build(); + String persistentResourceId = "persistentResourceId-2123080768"; + PersistentResource response = + persistentResourceServiceClient + .createPersistentResourceAsync(parent, persistentResource, persistentResourceId) + .get(); + } + } +} +// [END aiplatform_v1_generated_PersistentResourceService_CreatePersistentResource_LocationnamePersistentresourceString_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/createpersistentresource/SyncCreatePersistentResourceStringPersistentresourceString.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/createpersistentresource/SyncCreatePersistentResourceStringPersistentresourceString.java new file mode 100644 index 000000000000..f47ad97611de --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/createpersistentresource/SyncCreatePersistentResourceStringPersistentresourceString.java @@ -0,0 +1,48 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_PersistentResourceService_CreatePersistentResource_StringPersistentresourceString_sync] +import com.google.cloud.aiplatform.v1.LocationName; +import com.google.cloud.aiplatform.v1.PersistentResource; +import com.google.cloud.aiplatform.v1.PersistentResourceServiceClient; + +public class SyncCreatePersistentResourceStringPersistentresourceString { + + public static void main(String[] args) throws Exception { + syncCreatePersistentResourceStringPersistentresourceString(); + } + + public static void syncCreatePersistentResourceStringPersistentresourceString() throws Exception { + // 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 (PersistentResourceServiceClient persistentResourceServiceClient = + PersistentResourceServiceClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + PersistentResource persistentResource = PersistentResource.newBuilder().build(); + String persistentResourceId = "persistentResourceId-2123080768"; + PersistentResource response = + persistentResourceServiceClient + .createPersistentResourceAsync(parent, persistentResource, persistentResourceId) + .get(); + } + } +} +// [END aiplatform_v1_generated_PersistentResourceService_CreatePersistentResource_StringPersistentresourceString_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/deletepersistentresource/AsyncDeletePersistentResource.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/deletepersistentresource/AsyncDeletePersistentResource.java new file mode 100644 index 000000000000..7bc71e71185c --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/deletepersistentresource/AsyncDeletePersistentResource.java @@ -0,0 +1,53 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_PersistentResourceService_DeletePersistentResource_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.DeletePersistentResourceRequest; +import com.google.cloud.aiplatform.v1.PersistentResourceName; +import com.google.cloud.aiplatform.v1.PersistentResourceServiceClient; +import com.google.longrunning.Operation; + +public class AsyncDeletePersistentResource { + + public static void main(String[] args) throws Exception { + asyncDeletePersistentResource(); + } + + public static void asyncDeletePersistentResource() throws Exception { + // 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 (PersistentResourceServiceClient persistentResourceServiceClient = + PersistentResourceServiceClient.create()) { + DeletePersistentResourceRequest request = + DeletePersistentResourceRequest.newBuilder() + .setName( + PersistentResourceName.of("[PROJECT]", "[LOCATION]", "[PERSISTENT_RESOURCE]") + .toString()) + .build(); + ApiFuture future = + persistentResourceServiceClient.deletePersistentResourceCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END aiplatform_v1_generated_PersistentResourceService_DeletePersistentResource_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/deletepersistentresource/AsyncDeletePersistentResourceLRO.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/deletepersistentresource/AsyncDeletePersistentResourceLRO.java new file mode 100644 index 000000000000..05b22a40e2fb --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/deletepersistentresource/AsyncDeletePersistentResourceLRO.java @@ -0,0 +1,56 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_PersistentResourceService_DeletePersistentResource_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.aiplatform.v1.DeleteOperationMetadata; +import com.google.cloud.aiplatform.v1.DeletePersistentResourceRequest; +import com.google.cloud.aiplatform.v1.PersistentResourceName; +import com.google.cloud.aiplatform.v1.PersistentResourceServiceClient; +import com.google.protobuf.Empty; + +public class AsyncDeletePersistentResourceLRO { + + public static void main(String[] args) throws Exception { + asyncDeletePersistentResourceLRO(); + } + + public static void asyncDeletePersistentResourceLRO() throws Exception { + // 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 (PersistentResourceServiceClient persistentResourceServiceClient = + PersistentResourceServiceClient.create()) { + DeletePersistentResourceRequest request = + DeletePersistentResourceRequest.newBuilder() + .setName( + PersistentResourceName.of("[PROJECT]", "[LOCATION]", "[PERSISTENT_RESOURCE]") + .toString()) + .build(); + OperationFuture future = + persistentResourceServiceClient + .deletePersistentResourceOperationCallable() + .futureCall(request); + // Do something. + future.get(); + } + } +} +// [END aiplatform_v1_generated_PersistentResourceService_DeletePersistentResource_LRO_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/deletepersistentresource/SyncDeletePersistentResource.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/deletepersistentresource/SyncDeletePersistentResource.java new file mode 100644 index 000000000000..d3e00d882a29 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/deletepersistentresource/SyncDeletePersistentResource.java @@ -0,0 +1,49 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_PersistentResourceService_DeletePersistentResource_sync] +import com.google.cloud.aiplatform.v1.DeletePersistentResourceRequest; +import com.google.cloud.aiplatform.v1.PersistentResourceName; +import com.google.cloud.aiplatform.v1.PersistentResourceServiceClient; +import com.google.protobuf.Empty; + +public class SyncDeletePersistentResource { + + public static void main(String[] args) throws Exception { + syncDeletePersistentResource(); + } + + public static void syncDeletePersistentResource() throws Exception { + // 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 (PersistentResourceServiceClient persistentResourceServiceClient = + PersistentResourceServiceClient.create()) { + DeletePersistentResourceRequest request = + DeletePersistentResourceRequest.newBuilder() + .setName( + PersistentResourceName.of("[PROJECT]", "[LOCATION]", "[PERSISTENT_RESOURCE]") + .toString()) + .build(); + persistentResourceServiceClient.deletePersistentResourceAsync(request).get(); + } + } +} +// [END aiplatform_v1_generated_PersistentResourceService_DeletePersistentResource_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/deletepersistentresource/SyncDeletePersistentResourcePersistentresourcename.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/deletepersistentresource/SyncDeletePersistentResourcePersistentresourcename.java new file mode 100644 index 000000000000..b774e2a9d34f --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/deletepersistentresource/SyncDeletePersistentResourcePersistentresourcename.java @@ -0,0 +1,44 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_PersistentResourceService_DeletePersistentResource_Persistentresourcename_sync] +import com.google.cloud.aiplatform.v1.PersistentResourceName; +import com.google.cloud.aiplatform.v1.PersistentResourceServiceClient; +import com.google.protobuf.Empty; + +public class SyncDeletePersistentResourcePersistentresourcename { + + public static void main(String[] args) throws Exception { + syncDeletePersistentResourcePersistentresourcename(); + } + + public static void syncDeletePersistentResourcePersistentresourcename() throws Exception { + // 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 (PersistentResourceServiceClient persistentResourceServiceClient = + PersistentResourceServiceClient.create()) { + PersistentResourceName name = + PersistentResourceName.of("[PROJECT]", "[LOCATION]", "[PERSISTENT_RESOURCE]"); + persistentResourceServiceClient.deletePersistentResourceAsync(name).get(); + } + } +} +// [END aiplatform_v1_generated_PersistentResourceService_DeletePersistentResource_Persistentresourcename_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/deletepersistentresource/SyncDeletePersistentResourceString.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/deletepersistentresource/SyncDeletePersistentResourceString.java new file mode 100644 index 000000000000..91a557e84d32 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/deletepersistentresource/SyncDeletePersistentResourceString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_PersistentResourceService_DeletePersistentResource_String_sync] +import com.google.cloud.aiplatform.v1.PersistentResourceName; +import com.google.cloud.aiplatform.v1.PersistentResourceServiceClient; +import com.google.protobuf.Empty; + +public class SyncDeletePersistentResourceString { + + public static void main(String[] args) throws Exception { + syncDeletePersistentResourceString(); + } + + public static void syncDeletePersistentResourceString() throws Exception { + // 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 (PersistentResourceServiceClient persistentResourceServiceClient = + PersistentResourceServiceClient.create()) { + String name = + PersistentResourceName.of("[PROJECT]", "[LOCATION]", "[PERSISTENT_RESOURCE]").toString(); + persistentResourceServiceClient.deletePersistentResourceAsync(name).get(); + } + } +} +// [END aiplatform_v1_generated_PersistentResourceService_DeletePersistentResource_String_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/getiampolicy/AsyncGetIamPolicy.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/getiampolicy/AsyncGetIamPolicy.java new file mode 100644 index 000000000000..0715d2496f24 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/getiampolicy/AsyncGetIamPolicy.java @@ -0,0 +1,56 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_PersistentResourceService_GetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.EndpointName; +import com.google.cloud.aiplatform.v1.PersistentResourceServiceClient; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; + +public class AsyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncGetIamPolicy(); + } + + public static void asyncGetIamPolicy() throws Exception { + // 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 (PersistentResourceServiceClient persistentResourceServiceClient = + PersistentResourceServiceClient.create()) { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + ApiFuture future = + persistentResourceServiceClient.getIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END aiplatform_v1_generated_PersistentResourceService_GetIamPolicy_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/getiampolicy/SyncGetIamPolicy.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/getiampolicy/SyncGetIamPolicy.java new file mode 100644 index 000000000000..9d5146a554b1 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/getiampolicy/SyncGetIamPolicy.java @@ -0,0 +1,52 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_PersistentResourceService_GetIamPolicy_sync] +import com.google.cloud.aiplatform.v1.EndpointName; +import com.google.cloud.aiplatform.v1.PersistentResourceServiceClient; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; + +public class SyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + syncGetIamPolicy(); + } + + public static void syncGetIamPolicy() throws Exception { + // 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 (PersistentResourceServiceClient persistentResourceServiceClient = + PersistentResourceServiceClient.create()) { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + Policy response = persistentResourceServiceClient.getIamPolicy(request); + } + } +} +// [END aiplatform_v1_generated_PersistentResourceService_GetIamPolicy_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/getlocation/AsyncGetLocation.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/getlocation/AsyncGetLocation.java new file mode 100644 index 000000000000..54ecae0b7c10 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/getlocation/AsyncGetLocation.java @@ -0,0 +1,47 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_PersistentResourceService_GetLocation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.PersistentResourceServiceClient; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; + +public class AsyncGetLocation { + + public static void main(String[] args) throws Exception { + asyncGetLocation(); + } + + public static void asyncGetLocation() throws Exception { + // 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 (PersistentResourceServiceClient persistentResourceServiceClient = + PersistentResourceServiceClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + ApiFuture future = + persistentResourceServiceClient.getLocationCallable().futureCall(request); + // Do something. + Location response = future.get(); + } + } +} +// [END aiplatform_v1_generated_PersistentResourceService_GetLocation_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/getlocation/SyncGetLocation.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/getlocation/SyncGetLocation.java new file mode 100644 index 000000000000..e65e558b1a51 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/getlocation/SyncGetLocation.java @@ -0,0 +1,43 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_PersistentResourceService_GetLocation_sync] +import com.google.cloud.aiplatform.v1.PersistentResourceServiceClient; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; + +public class SyncGetLocation { + + public static void main(String[] args) throws Exception { + syncGetLocation(); + } + + public static void syncGetLocation() throws Exception { + // 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 (PersistentResourceServiceClient persistentResourceServiceClient = + PersistentResourceServiceClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + Location response = persistentResourceServiceClient.getLocation(request); + } + } +} +// [END aiplatform_v1_generated_PersistentResourceService_GetLocation_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/getpersistentresource/AsyncGetPersistentResource.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/getpersistentresource/AsyncGetPersistentResource.java new file mode 100644 index 000000000000..286f32c802cc --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/getpersistentresource/AsyncGetPersistentResource.java @@ -0,0 +1,53 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_PersistentResourceService_GetPersistentResource_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.GetPersistentResourceRequest; +import com.google.cloud.aiplatform.v1.PersistentResource; +import com.google.cloud.aiplatform.v1.PersistentResourceName; +import com.google.cloud.aiplatform.v1.PersistentResourceServiceClient; + +public class AsyncGetPersistentResource { + + public static void main(String[] args) throws Exception { + asyncGetPersistentResource(); + } + + public static void asyncGetPersistentResource() throws Exception { + // 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 (PersistentResourceServiceClient persistentResourceServiceClient = + PersistentResourceServiceClient.create()) { + GetPersistentResourceRequest request = + GetPersistentResourceRequest.newBuilder() + .setName( + PersistentResourceName.of("[PROJECT]", "[LOCATION]", "[PERSISTENT_RESOURCE]") + .toString()) + .build(); + ApiFuture future = + persistentResourceServiceClient.getPersistentResourceCallable().futureCall(request); + // Do something. + PersistentResource response = future.get(); + } + } +} +// [END aiplatform_v1_generated_PersistentResourceService_GetPersistentResource_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/getpersistentresource/SyncGetPersistentResource.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/getpersistentresource/SyncGetPersistentResource.java new file mode 100644 index 000000000000..e0c3e265acca --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/getpersistentresource/SyncGetPersistentResource.java @@ -0,0 +1,49 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_PersistentResourceService_GetPersistentResource_sync] +import com.google.cloud.aiplatform.v1.GetPersistentResourceRequest; +import com.google.cloud.aiplatform.v1.PersistentResource; +import com.google.cloud.aiplatform.v1.PersistentResourceName; +import com.google.cloud.aiplatform.v1.PersistentResourceServiceClient; + +public class SyncGetPersistentResource { + + public static void main(String[] args) throws Exception { + syncGetPersistentResource(); + } + + public static void syncGetPersistentResource() throws Exception { + // 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 (PersistentResourceServiceClient persistentResourceServiceClient = + PersistentResourceServiceClient.create()) { + GetPersistentResourceRequest request = + GetPersistentResourceRequest.newBuilder() + .setName( + PersistentResourceName.of("[PROJECT]", "[LOCATION]", "[PERSISTENT_RESOURCE]") + .toString()) + .build(); + PersistentResource response = persistentResourceServiceClient.getPersistentResource(request); + } + } +} +// [END aiplatform_v1_generated_PersistentResourceService_GetPersistentResource_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/getpersistentresource/SyncGetPersistentResourcePersistentresourcename.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/getpersistentresource/SyncGetPersistentResourcePersistentresourcename.java new file mode 100644 index 000000000000..c484412714ba --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/getpersistentresource/SyncGetPersistentResourcePersistentresourcename.java @@ -0,0 +1,44 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_PersistentResourceService_GetPersistentResource_Persistentresourcename_sync] +import com.google.cloud.aiplatform.v1.PersistentResource; +import com.google.cloud.aiplatform.v1.PersistentResourceName; +import com.google.cloud.aiplatform.v1.PersistentResourceServiceClient; + +public class SyncGetPersistentResourcePersistentresourcename { + + public static void main(String[] args) throws Exception { + syncGetPersistentResourcePersistentresourcename(); + } + + public static void syncGetPersistentResourcePersistentresourcename() throws Exception { + // 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 (PersistentResourceServiceClient persistentResourceServiceClient = + PersistentResourceServiceClient.create()) { + PersistentResourceName name = + PersistentResourceName.of("[PROJECT]", "[LOCATION]", "[PERSISTENT_RESOURCE]"); + PersistentResource response = persistentResourceServiceClient.getPersistentResource(name); + } + } +} +// [END aiplatform_v1_generated_PersistentResourceService_GetPersistentResource_Persistentresourcename_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/getpersistentresource/SyncGetPersistentResourceString.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/getpersistentresource/SyncGetPersistentResourceString.java new file mode 100644 index 000000000000..8cd3b5005a5b --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/getpersistentresource/SyncGetPersistentResourceString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_PersistentResourceService_GetPersistentResource_String_sync] +import com.google.cloud.aiplatform.v1.PersistentResource; +import com.google.cloud.aiplatform.v1.PersistentResourceName; +import com.google.cloud.aiplatform.v1.PersistentResourceServiceClient; + +public class SyncGetPersistentResourceString { + + public static void main(String[] args) throws Exception { + syncGetPersistentResourceString(); + } + + public static void syncGetPersistentResourceString() throws Exception { + // 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 (PersistentResourceServiceClient persistentResourceServiceClient = + PersistentResourceServiceClient.create()) { + String name = + PersistentResourceName.of("[PROJECT]", "[LOCATION]", "[PERSISTENT_RESOURCE]").toString(); + PersistentResource response = persistentResourceServiceClient.getPersistentResource(name); + } + } +} +// [END aiplatform_v1_generated_PersistentResourceService_GetPersistentResource_String_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/listlocations/AsyncListLocations.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/listlocations/AsyncListLocations.java new file mode 100644 index 000000000000..8c13f635a087 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/listlocations/AsyncListLocations.java @@ -0,0 +1,55 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_PersistentResourceService_ListLocations_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.PersistentResourceServiceClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; + +public class AsyncListLocations { + + public static void main(String[] args) throws Exception { + asyncListLocations(); + } + + public static void asyncListLocations() throws Exception { + // 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 (PersistentResourceServiceClient persistentResourceServiceClient = + PersistentResourceServiceClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + persistentResourceServiceClient.listLocationsPagedCallable().futureCall(request); + // Do something. + for (Location element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1_generated_PersistentResourceService_ListLocations_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/listlocations/AsyncListLocationsPaged.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/listlocations/AsyncListLocationsPaged.java new file mode 100644 index 000000000000..1efe3a1abdfc --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/listlocations/AsyncListLocationsPaged.java @@ -0,0 +1,63 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_PersistentResourceService_ListLocations_Paged_async] +import com.google.cloud.aiplatform.v1.PersistentResourceServiceClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.base.Strings; + +public class AsyncListLocationsPaged { + + public static void main(String[] args) throws Exception { + asyncListLocationsPaged(); + } + + public static void asyncListLocationsPaged() throws Exception { + // 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 (PersistentResourceServiceClient persistentResourceServiceClient = + PersistentResourceServiceClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListLocationsResponse response = + persistentResourceServiceClient.listLocationsCallable().call(request); + for (Location element : response.getLocationsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END aiplatform_v1_generated_PersistentResourceService_ListLocations_Paged_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/listlocations/SyncListLocations.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/listlocations/SyncListLocations.java new file mode 100644 index 000000000000..249ef7a9a919 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/listlocations/SyncListLocations.java @@ -0,0 +1,51 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_PersistentResourceService_ListLocations_sync] +import com.google.cloud.aiplatform.v1.PersistentResourceServiceClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; + +public class SyncListLocations { + + public static void main(String[] args) throws Exception { + syncListLocations(); + } + + public static void syncListLocations() throws Exception { + // 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 (PersistentResourceServiceClient persistentResourceServiceClient = + PersistentResourceServiceClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Location element : persistentResourceServiceClient.listLocations(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1_generated_PersistentResourceService_ListLocations_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/listpersistentresources/AsyncListPersistentResources.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/listpersistentresources/AsyncListPersistentResources.java new file mode 100644 index 000000000000..a9d2bb09280d --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/listpersistentresources/AsyncListPersistentResources.java @@ -0,0 +1,57 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_PersistentResourceService_ListPersistentResources_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.ListPersistentResourcesRequest; +import com.google.cloud.aiplatform.v1.LocationName; +import com.google.cloud.aiplatform.v1.PersistentResource; +import com.google.cloud.aiplatform.v1.PersistentResourceServiceClient; + +public class AsyncListPersistentResources { + + public static void main(String[] args) throws Exception { + asyncListPersistentResources(); + } + + public static void asyncListPersistentResources() throws Exception { + // 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 (PersistentResourceServiceClient persistentResourceServiceClient = + PersistentResourceServiceClient.create()) { + ListPersistentResourcesRequest request = + ListPersistentResourcesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + persistentResourceServiceClient + .listPersistentResourcesPagedCallable() + .futureCall(request); + // Do something. + for (PersistentResource element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1_generated_PersistentResourceService_ListPersistentResources_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/listpersistentresources/AsyncListPersistentResourcesPaged.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/listpersistentresources/AsyncListPersistentResourcesPaged.java new file mode 100644 index 000000000000..796d062b7d3a --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/listpersistentresources/AsyncListPersistentResourcesPaged.java @@ -0,0 +1,63 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_PersistentResourceService_ListPersistentResources_Paged_async] +import com.google.cloud.aiplatform.v1.ListPersistentResourcesRequest; +import com.google.cloud.aiplatform.v1.ListPersistentResourcesResponse; +import com.google.cloud.aiplatform.v1.LocationName; +import com.google.cloud.aiplatform.v1.PersistentResource; +import com.google.cloud.aiplatform.v1.PersistentResourceServiceClient; +import com.google.common.base.Strings; + +public class AsyncListPersistentResourcesPaged { + + public static void main(String[] args) throws Exception { + asyncListPersistentResourcesPaged(); + } + + public static void asyncListPersistentResourcesPaged() throws Exception { + // 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 (PersistentResourceServiceClient persistentResourceServiceClient = + PersistentResourceServiceClient.create()) { + ListPersistentResourcesRequest request = + ListPersistentResourcesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListPersistentResourcesResponse response = + persistentResourceServiceClient.listPersistentResourcesCallable().call(request); + for (PersistentResource element : response.getPersistentResourcesList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END aiplatform_v1_generated_PersistentResourceService_ListPersistentResources_Paged_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/listpersistentresources/SyncListPersistentResources.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/listpersistentresources/SyncListPersistentResources.java new file mode 100644 index 000000000000..098aa0fb0f5d --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/listpersistentresources/SyncListPersistentResources.java @@ -0,0 +1,52 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_PersistentResourceService_ListPersistentResources_sync] +import com.google.cloud.aiplatform.v1.ListPersistentResourcesRequest; +import com.google.cloud.aiplatform.v1.LocationName; +import com.google.cloud.aiplatform.v1.PersistentResource; +import com.google.cloud.aiplatform.v1.PersistentResourceServiceClient; + +public class SyncListPersistentResources { + + public static void main(String[] args) throws Exception { + syncListPersistentResources(); + } + + public static void syncListPersistentResources() throws Exception { + // 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 (PersistentResourceServiceClient persistentResourceServiceClient = + PersistentResourceServiceClient.create()) { + ListPersistentResourcesRequest request = + ListPersistentResourcesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (PersistentResource element : + persistentResourceServiceClient.listPersistentResources(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1_generated_PersistentResourceService_ListPersistentResources_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/listpersistentresources/SyncListPersistentResourcesLocationname.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/listpersistentresources/SyncListPersistentResourcesLocationname.java new file mode 100644 index 000000000000..6a5533f54144 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/listpersistentresources/SyncListPersistentResourcesLocationname.java @@ -0,0 +1,46 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_PersistentResourceService_ListPersistentResources_Locationname_sync] +import com.google.cloud.aiplatform.v1.LocationName; +import com.google.cloud.aiplatform.v1.PersistentResource; +import com.google.cloud.aiplatform.v1.PersistentResourceServiceClient; + +public class SyncListPersistentResourcesLocationname { + + public static void main(String[] args) throws Exception { + syncListPersistentResourcesLocationname(); + } + + public static void syncListPersistentResourcesLocationname() throws Exception { + // 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 (PersistentResourceServiceClient persistentResourceServiceClient = + PersistentResourceServiceClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (PersistentResource element : + persistentResourceServiceClient.listPersistentResources(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1_generated_PersistentResourceService_ListPersistentResources_Locationname_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/listpersistentresources/SyncListPersistentResourcesString.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/listpersistentresources/SyncListPersistentResourcesString.java new file mode 100644 index 000000000000..ed834a4ade7a --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/listpersistentresources/SyncListPersistentResourcesString.java @@ -0,0 +1,46 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_PersistentResourceService_ListPersistentResources_String_sync] +import com.google.cloud.aiplatform.v1.LocationName; +import com.google.cloud.aiplatform.v1.PersistentResource; +import com.google.cloud.aiplatform.v1.PersistentResourceServiceClient; + +public class SyncListPersistentResourcesString { + + public static void main(String[] args) throws Exception { + syncListPersistentResourcesString(); + } + + public static void syncListPersistentResourcesString() throws Exception { + // 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 (PersistentResourceServiceClient persistentResourceServiceClient = + PersistentResourceServiceClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (PersistentResource element : + persistentResourceServiceClient.listPersistentResources(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1_generated_PersistentResourceService_ListPersistentResources_String_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/rebootpersistentresource/AsyncRebootPersistentResource.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/rebootpersistentresource/AsyncRebootPersistentResource.java new file mode 100644 index 000000000000..80acf117cf9f --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/rebootpersistentresource/AsyncRebootPersistentResource.java @@ -0,0 +1,53 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_PersistentResourceService_RebootPersistentResource_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.PersistentResourceName; +import com.google.cloud.aiplatform.v1.PersistentResourceServiceClient; +import com.google.cloud.aiplatform.v1.RebootPersistentResourceRequest; +import com.google.longrunning.Operation; + +public class AsyncRebootPersistentResource { + + public static void main(String[] args) throws Exception { + asyncRebootPersistentResource(); + } + + public static void asyncRebootPersistentResource() throws Exception { + // 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 (PersistentResourceServiceClient persistentResourceServiceClient = + PersistentResourceServiceClient.create()) { + RebootPersistentResourceRequest request = + RebootPersistentResourceRequest.newBuilder() + .setName( + PersistentResourceName.of("[PROJECT]", "[LOCATION]", "[PERSISTENT_RESOURCE]") + .toString()) + .build(); + ApiFuture future = + persistentResourceServiceClient.rebootPersistentResourceCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END aiplatform_v1_generated_PersistentResourceService_RebootPersistentResource_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/rebootpersistentresource/AsyncRebootPersistentResourceLRO.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/rebootpersistentresource/AsyncRebootPersistentResourceLRO.java new file mode 100644 index 000000000000..4742b783b484 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/rebootpersistentresource/AsyncRebootPersistentResourceLRO.java @@ -0,0 +1,56 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_PersistentResourceService_RebootPersistentResource_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.aiplatform.v1.PersistentResource; +import com.google.cloud.aiplatform.v1.PersistentResourceName; +import com.google.cloud.aiplatform.v1.PersistentResourceServiceClient; +import com.google.cloud.aiplatform.v1.RebootPersistentResourceOperationMetadata; +import com.google.cloud.aiplatform.v1.RebootPersistentResourceRequest; + +public class AsyncRebootPersistentResourceLRO { + + public static void main(String[] args) throws Exception { + asyncRebootPersistentResourceLRO(); + } + + public static void asyncRebootPersistentResourceLRO() throws Exception { + // 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 (PersistentResourceServiceClient persistentResourceServiceClient = + PersistentResourceServiceClient.create()) { + RebootPersistentResourceRequest request = + RebootPersistentResourceRequest.newBuilder() + .setName( + PersistentResourceName.of("[PROJECT]", "[LOCATION]", "[PERSISTENT_RESOURCE]") + .toString()) + .build(); + OperationFuture future = + persistentResourceServiceClient + .rebootPersistentResourceOperationCallable() + .futureCall(request); + // Do something. + PersistentResource response = future.get(); + } + } +} +// [END aiplatform_v1_generated_PersistentResourceService_RebootPersistentResource_LRO_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/rebootpersistentresource/SyncRebootPersistentResource.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/rebootpersistentresource/SyncRebootPersistentResource.java new file mode 100644 index 000000000000..474dccfc5b33 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/rebootpersistentresource/SyncRebootPersistentResource.java @@ -0,0 +1,50 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_PersistentResourceService_RebootPersistentResource_sync] +import com.google.cloud.aiplatform.v1.PersistentResource; +import com.google.cloud.aiplatform.v1.PersistentResourceName; +import com.google.cloud.aiplatform.v1.PersistentResourceServiceClient; +import com.google.cloud.aiplatform.v1.RebootPersistentResourceRequest; + +public class SyncRebootPersistentResource { + + public static void main(String[] args) throws Exception { + syncRebootPersistentResource(); + } + + public static void syncRebootPersistentResource() throws Exception { + // 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 (PersistentResourceServiceClient persistentResourceServiceClient = + PersistentResourceServiceClient.create()) { + RebootPersistentResourceRequest request = + RebootPersistentResourceRequest.newBuilder() + .setName( + PersistentResourceName.of("[PROJECT]", "[LOCATION]", "[PERSISTENT_RESOURCE]") + .toString()) + .build(); + PersistentResource response = + persistentResourceServiceClient.rebootPersistentResourceAsync(request).get(); + } + } +} +// [END aiplatform_v1_generated_PersistentResourceService_RebootPersistentResource_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/rebootpersistentresource/SyncRebootPersistentResourcePersistentresourcename.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/rebootpersistentresource/SyncRebootPersistentResourcePersistentresourcename.java new file mode 100644 index 000000000000..2c23529b10bd --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/rebootpersistentresource/SyncRebootPersistentResourcePersistentresourcename.java @@ -0,0 +1,45 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_PersistentResourceService_RebootPersistentResource_Persistentresourcename_sync] +import com.google.cloud.aiplatform.v1.PersistentResource; +import com.google.cloud.aiplatform.v1.PersistentResourceName; +import com.google.cloud.aiplatform.v1.PersistentResourceServiceClient; + +public class SyncRebootPersistentResourcePersistentresourcename { + + public static void main(String[] args) throws Exception { + syncRebootPersistentResourcePersistentresourcename(); + } + + public static void syncRebootPersistentResourcePersistentresourcename() throws Exception { + // 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 (PersistentResourceServiceClient persistentResourceServiceClient = + PersistentResourceServiceClient.create()) { + PersistentResourceName name = + PersistentResourceName.of("[PROJECT]", "[LOCATION]", "[PERSISTENT_RESOURCE]"); + PersistentResource response = + persistentResourceServiceClient.rebootPersistentResourceAsync(name).get(); + } + } +} +// [END aiplatform_v1_generated_PersistentResourceService_RebootPersistentResource_Persistentresourcename_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/rebootpersistentresource/SyncRebootPersistentResourceString.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/rebootpersistentresource/SyncRebootPersistentResourceString.java new file mode 100644 index 000000000000..381e15e1dc6d --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/rebootpersistentresource/SyncRebootPersistentResourceString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_PersistentResourceService_RebootPersistentResource_String_sync] +import com.google.cloud.aiplatform.v1.PersistentResource; +import com.google.cloud.aiplatform.v1.PersistentResourceName; +import com.google.cloud.aiplatform.v1.PersistentResourceServiceClient; + +public class SyncRebootPersistentResourceString { + + public static void main(String[] args) throws Exception { + syncRebootPersistentResourceString(); + } + + public static void syncRebootPersistentResourceString() throws Exception { + // 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 (PersistentResourceServiceClient persistentResourceServiceClient = + PersistentResourceServiceClient.create()) { + String name = + PersistentResourceName.of("[PROJECT]", "[LOCATION]", "[PERSISTENT_RESOURCE]").toString(); + PersistentResource response = + persistentResourceServiceClient.rebootPersistentResourceAsync(name).get(); + } + } +} +// [END aiplatform_v1_generated_PersistentResourceService_RebootPersistentResource_String_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/setiampolicy/AsyncSetIamPolicy.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/setiampolicy/AsyncSetIamPolicy.java new file mode 100644 index 000000000000..4ac4dd0b0053 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/setiampolicy/AsyncSetIamPolicy.java @@ -0,0 +1,57 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_PersistentResourceService_SetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.EndpointName; +import com.google.cloud.aiplatform.v1.PersistentResourceServiceClient; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.protobuf.FieldMask; + +public class AsyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncSetIamPolicy(); + } + + public static void asyncSetIamPolicy() throws Exception { + // 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 (PersistentResourceServiceClient persistentResourceServiceClient = + PersistentResourceServiceClient.create()) { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = + persistentResourceServiceClient.setIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END aiplatform_v1_generated_PersistentResourceService_SetIamPolicy_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/setiampolicy/SyncSetIamPolicy.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/setiampolicy/SyncSetIamPolicy.java new file mode 100644 index 000000000000..235f3272bc2a --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/setiampolicy/SyncSetIamPolicy.java @@ -0,0 +1,53 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_PersistentResourceService_SetIamPolicy_sync] +import com.google.cloud.aiplatform.v1.EndpointName; +import com.google.cloud.aiplatform.v1.PersistentResourceServiceClient; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.protobuf.FieldMask; + +public class SyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + syncSetIamPolicy(); + } + + public static void syncSetIamPolicy() throws Exception { + // 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 (PersistentResourceServiceClient persistentResourceServiceClient = + PersistentResourceServiceClient.create()) { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + Policy response = persistentResourceServiceClient.setIamPolicy(request); + } + } +} +// [END aiplatform_v1_generated_PersistentResourceService_SetIamPolicy_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/testiampermissions/AsyncTestIamPermissions.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/testiampermissions/AsyncTestIamPermissions.java new file mode 100644 index 000000000000..527056f8c47e --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/testiampermissions/AsyncTestIamPermissions.java @@ -0,0 +1,56 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_PersistentResourceService_TestIamPermissions_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.EndpointName; +import com.google.cloud.aiplatform.v1.PersistentResourceServiceClient; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import java.util.ArrayList; + +public class AsyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + asyncTestIamPermissions(); + } + + public static void asyncTestIamPermissions() throws Exception { + // 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 (PersistentResourceServiceClient persistentResourceServiceClient = + PersistentResourceServiceClient.create()) { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .addAllPermissions(new ArrayList()) + .build(); + ApiFuture future = + persistentResourceServiceClient.testIamPermissionsCallable().futureCall(request); + // Do something. + TestIamPermissionsResponse response = future.get(); + } + } +} +// [END aiplatform_v1_generated_PersistentResourceService_TestIamPermissions_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/testiampermissions/SyncTestIamPermissions.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/testiampermissions/SyncTestIamPermissions.java new file mode 100644 index 000000000000..362d0c48f6ca --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/testiampermissions/SyncTestIamPermissions.java @@ -0,0 +1,53 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_PersistentResourceService_TestIamPermissions_sync] +import com.google.cloud.aiplatform.v1.EndpointName; +import com.google.cloud.aiplatform.v1.PersistentResourceServiceClient; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import java.util.ArrayList; + +public class SyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + syncTestIamPermissions(); + } + + public static void syncTestIamPermissions() throws Exception { + // 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 (PersistentResourceServiceClient persistentResourceServiceClient = + PersistentResourceServiceClient.create()) { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .addAllPermissions(new ArrayList()) + .build(); + TestIamPermissionsResponse response = + persistentResourceServiceClient.testIamPermissions(request); + } + } +} +// [END aiplatform_v1_generated_PersistentResourceService_TestIamPermissions_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/updatepersistentresource/AsyncUpdatePersistentResource.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/updatepersistentresource/AsyncUpdatePersistentResource.java new file mode 100644 index 000000000000..507dc76a28f4 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/updatepersistentresource/AsyncUpdatePersistentResource.java @@ -0,0 +1,53 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_PersistentResourceService_UpdatePersistentResource_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1.PersistentResource; +import com.google.cloud.aiplatform.v1.PersistentResourceServiceClient; +import com.google.cloud.aiplatform.v1.UpdatePersistentResourceRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.FieldMask; + +public class AsyncUpdatePersistentResource { + + public static void main(String[] args) throws Exception { + asyncUpdatePersistentResource(); + } + + public static void asyncUpdatePersistentResource() throws Exception { + // 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 (PersistentResourceServiceClient persistentResourceServiceClient = + PersistentResourceServiceClient.create()) { + UpdatePersistentResourceRequest request = + UpdatePersistentResourceRequest.newBuilder() + .setPersistentResource(PersistentResource.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = + persistentResourceServiceClient.updatePersistentResourceCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END aiplatform_v1_generated_PersistentResourceService_UpdatePersistentResource_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/updatepersistentresource/AsyncUpdatePersistentResourceLRO.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/updatepersistentresource/AsyncUpdatePersistentResourceLRO.java new file mode 100644 index 000000000000..d7b1f04246eb --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/updatepersistentresource/AsyncUpdatePersistentResourceLRO.java @@ -0,0 +1,55 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_PersistentResourceService_UpdatePersistentResource_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.aiplatform.v1.PersistentResource; +import com.google.cloud.aiplatform.v1.PersistentResourceServiceClient; +import com.google.cloud.aiplatform.v1.UpdatePersistentResourceOperationMetadata; +import com.google.cloud.aiplatform.v1.UpdatePersistentResourceRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdatePersistentResourceLRO { + + public static void main(String[] args) throws Exception { + asyncUpdatePersistentResourceLRO(); + } + + public static void asyncUpdatePersistentResourceLRO() throws Exception { + // 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 (PersistentResourceServiceClient persistentResourceServiceClient = + PersistentResourceServiceClient.create()) { + UpdatePersistentResourceRequest request = + UpdatePersistentResourceRequest.newBuilder() + .setPersistentResource(PersistentResource.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + OperationFuture future = + persistentResourceServiceClient + .updatePersistentResourceOperationCallable() + .futureCall(request); + // Do something. + PersistentResource response = future.get(); + } + } +} +// [END aiplatform_v1_generated_PersistentResourceService_UpdatePersistentResource_LRO_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/updatepersistentresource/SyncUpdatePersistentResource.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/updatepersistentresource/SyncUpdatePersistentResource.java new file mode 100644 index 000000000000..c2c8ea33161d --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/updatepersistentresource/SyncUpdatePersistentResource.java @@ -0,0 +1,49 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_PersistentResourceService_UpdatePersistentResource_sync] +import com.google.cloud.aiplatform.v1.PersistentResource; +import com.google.cloud.aiplatform.v1.PersistentResourceServiceClient; +import com.google.cloud.aiplatform.v1.UpdatePersistentResourceRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdatePersistentResource { + + public static void main(String[] args) throws Exception { + syncUpdatePersistentResource(); + } + + public static void syncUpdatePersistentResource() throws Exception { + // 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 (PersistentResourceServiceClient persistentResourceServiceClient = + PersistentResourceServiceClient.create()) { + UpdatePersistentResourceRequest request = + UpdatePersistentResourceRequest.newBuilder() + .setPersistentResource(PersistentResource.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + PersistentResource response = + persistentResourceServiceClient.updatePersistentResourceAsync(request).get(); + } + } +} +// [END aiplatform_v1_generated_PersistentResourceService_UpdatePersistentResource_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/updatepersistentresource/SyncUpdatePersistentResourcePersistentresourceFieldmask.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/updatepersistentresource/SyncUpdatePersistentResourcePersistentresourceFieldmask.java new file mode 100644 index 000000000000..73b805e8b722 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservice/updatepersistentresource/SyncUpdatePersistentResourcePersistentresourceFieldmask.java @@ -0,0 +1,47 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_PersistentResourceService_UpdatePersistentResource_PersistentresourceFieldmask_sync] +import com.google.cloud.aiplatform.v1.PersistentResource; +import com.google.cloud.aiplatform.v1.PersistentResourceServiceClient; +import com.google.protobuf.FieldMask; + +public class SyncUpdatePersistentResourcePersistentresourceFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdatePersistentResourcePersistentresourceFieldmask(); + } + + public static void syncUpdatePersistentResourcePersistentresourceFieldmask() throws Exception { + // 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 (PersistentResourceServiceClient persistentResourceServiceClient = + PersistentResourceServiceClient.create()) { + PersistentResource persistentResource = PersistentResource.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + PersistentResource response = + persistentResourceServiceClient + .updatePersistentResourceAsync(persistentResource, updateMask) + .get(); + } + } +} +// [END aiplatform_v1_generated_PersistentResourceService_UpdatePersistentResource_PersistentresourceFieldmask_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservicesettings/getpersistentresource/SyncGetPersistentResource.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservicesettings/getpersistentresource/SyncGetPersistentResource.java new file mode 100644 index 000000000000..1de32af087da --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/persistentresourceservicesettings/getpersistentresource/SyncGetPersistentResource.java @@ -0,0 +1,50 @@ +/* + * Copyright 2024 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.aiplatform.v1.samples; + +// [START aiplatform_v1_generated_PersistentResourceServiceSettings_GetPersistentResource_sync] +import com.google.cloud.aiplatform.v1.PersistentResourceServiceSettings; +import java.time.Duration; + +public class SyncGetPersistentResource { + + public static void main(String[] args) throws Exception { + syncGetPersistentResource(); + } + + public static void syncGetPersistentResource() throws Exception { + // 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 + PersistentResourceServiceSettings.Builder persistentResourceServiceSettingsBuilder = + PersistentResourceServiceSettings.newBuilder(); + persistentResourceServiceSettingsBuilder + .getPersistentResourceSettings() + .setRetrySettings( + persistentResourceServiceSettingsBuilder + .getPersistentResourceSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + PersistentResourceServiceSettings persistentResourceServiceSettings = + persistentResourceServiceSettingsBuilder.build(); + } +} +// [END aiplatform_v1_generated_PersistentResourceServiceSettings_GetPersistentResource_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/predictionservice/generatecontent/AsyncGenerateContent.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/predictionservice/generatecontent/AsyncGenerateContent.java index d702208ed651..cad9116f1a1d 100644 --- a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/predictionservice/generatecontent/AsyncGenerateContent.java +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/predictionservice/generatecontent/AsyncGenerateContent.java @@ -44,6 +44,7 @@ public static void asyncGenerateContent() throws Exception { GenerateContentRequest.newBuilder() .setModel("model104069929") .addAllContents(new ArrayList()) + .setSystemInstruction(Content.newBuilder().build()) .addAllTools(new ArrayList()) .addAllSafetySettings(new ArrayList()) .setGenerationConfig(GenerationConfig.newBuilder().build()) diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/predictionservice/generatecontent/SyncGenerateContent.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/predictionservice/generatecontent/SyncGenerateContent.java index 13dbbd09b059..7956e2c9d9bc 100644 --- a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/predictionservice/generatecontent/SyncGenerateContent.java +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/predictionservice/generatecontent/SyncGenerateContent.java @@ -43,6 +43,7 @@ public static void syncGenerateContent() throws Exception { GenerateContentRequest.newBuilder() .setModel("model104069929") .addAllContents(new ArrayList()) + .setSystemInstruction(Content.newBuilder().build()) .addAllTools(new ArrayList()) .addAllSafetySettings(new ArrayList()) .setGenerationConfig(GenerationConfig.newBuilder().build()) diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/predictionservice/streamgeneratecontent/AsyncStreamGenerateContent.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/predictionservice/streamgeneratecontent/AsyncStreamGenerateContent.java index 4e553d370ae6..e4bc20f1d2db 100644 --- a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/predictionservice/streamgeneratecontent/AsyncStreamGenerateContent.java +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/predictionservice/streamgeneratecontent/AsyncStreamGenerateContent.java @@ -44,6 +44,7 @@ public static void asyncStreamGenerateContent() throws Exception { GenerateContentRequest.newBuilder() .setModel("model104069929") .addAllContents(new ArrayList()) + .setSystemInstruction(Content.newBuilder().build()) .addAllTools(new ArrayList()) .addAllSafetySettings(new ArrayList()) .setGenerationConfig(GenerationConfig.newBuilder().build()) diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/stub/genaituningservicestubsettings/createtuningjob/SyncCreateTuningJob.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/stub/genaituningservicestubsettings/createtuningjob/SyncCreateTuningJob.java new file mode 100644 index 000000000000..cd846e82881d --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/stub/genaituningservicestubsettings/createtuningjob/SyncCreateTuningJob.java @@ -0,0 +1,50 @@ +/* + * Copyright 2024 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.aiplatform.v1.stub.samples; + +// [START aiplatform_v1_generated_GenAiTuningServiceStubSettings_CreateTuningJob_sync] +import com.google.cloud.aiplatform.v1.stub.GenAiTuningServiceStubSettings; +import java.time.Duration; + +public class SyncCreateTuningJob { + + public static void main(String[] args) throws Exception { + syncCreateTuningJob(); + } + + public static void syncCreateTuningJob() throws Exception { + // 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 + GenAiTuningServiceStubSettings.Builder genAiTuningServiceSettingsBuilder = + GenAiTuningServiceStubSettings.newBuilder(); + genAiTuningServiceSettingsBuilder + .createTuningJobSettings() + .setRetrySettings( + genAiTuningServiceSettingsBuilder + .createTuningJobSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + GenAiTuningServiceStubSettings genAiTuningServiceSettings = + genAiTuningServiceSettingsBuilder.build(); + } +} +// [END aiplatform_v1_generated_GenAiTuningServiceStubSettings_CreateTuningJob_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/stub/notebookservicestubsettings/getnotebookruntimetemplate/SyncGetNotebookRuntimeTemplate.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/stub/notebookservicestubsettings/getnotebookruntimetemplate/SyncGetNotebookRuntimeTemplate.java new file mode 100644 index 000000000000..8a6813809c2e --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/stub/notebookservicestubsettings/getnotebookruntimetemplate/SyncGetNotebookRuntimeTemplate.java @@ -0,0 +1,49 @@ +/* + * Copyright 2024 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.aiplatform.v1.stub.samples; + +// [START aiplatform_v1_generated_NotebookServiceStubSettings_GetNotebookRuntimeTemplate_sync] +import com.google.cloud.aiplatform.v1.stub.NotebookServiceStubSettings; +import java.time.Duration; + +public class SyncGetNotebookRuntimeTemplate { + + public static void main(String[] args) throws Exception { + syncGetNotebookRuntimeTemplate(); + } + + public static void syncGetNotebookRuntimeTemplate() throws Exception { + // 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 + NotebookServiceStubSettings.Builder notebookServiceSettingsBuilder = + NotebookServiceStubSettings.newBuilder(); + notebookServiceSettingsBuilder + .getNotebookRuntimeTemplateSettings() + .setRetrySettings( + notebookServiceSettingsBuilder + .getNotebookRuntimeTemplateSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + NotebookServiceStubSettings notebookServiceSettings = notebookServiceSettingsBuilder.build(); + } +} +// [END aiplatform_v1_generated_NotebookServiceStubSettings_GetNotebookRuntimeTemplate_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/stub/persistentresourceservicestubsettings/getpersistentresource/SyncGetPersistentResource.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/stub/persistentresourceservicestubsettings/getpersistentresource/SyncGetPersistentResource.java new file mode 100644 index 000000000000..b070f7fee350 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1/stub/persistentresourceservicestubsettings/getpersistentresource/SyncGetPersistentResource.java @@ -0,0 +1,50 @@ +/* + * Copyright 2024 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.aiplatform.v1.stub.samples; + +// [START aiplatform_v1_generated_PersistentResourceServiceStubSettings_GetPersistentResource_sync] +import com.google.cloud.aiplatform.v1.stub.PersistentResourceServiceStubSettings; +import java.time.Duration; + +public class SyncGetPersistentResource { + + public static void main(String[] args) throws Exception { + syncGetPersistentResource(); + } + + public static void syncGetPersistentResource() throws Exception { + // 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 + PersistentResourceServiceStubSettings.Builder persistentResourceServiceSettingsBuilder = + PersistentResourceServiceStubSettings.newBuilder(); + persistentResourceServiceSettingsBuilder + .getPersistentResourceSettings() + .setRetrySettings( + persistentResourceServiceSettingsBuilder + .getPersistentResourceSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + PersistentResourceServiceStubSettings persistentResourceServiceSettings = + persistentResourceServiceSettingsBuilder.build(); + } +} +// [END aiplatform_v1_generated_PersistentResourceServiceStubSettings_GetPersistentResource_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/assignnotebookruntime/AsyncAssignNotebookRuntime.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/assignnotebookruntime/AsyncAssignNotebookRuntime.java new file mode 100644 index 000000000000..b0386f31a904 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/assignnotebookruntime/AsyncAssignNotebookRuntime.java @@ -0,0 +1,58 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_NotebookService_AssignNotebookRuntime_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeRequest; +import com.google.cloud.aiplatform.v1beta1.LocationName; +import com.google.cloud.aiplatform.v1beta1.NotebookRuntime; +import com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateName; +import com.google.cloud.aiplatform.v1beta1.NotebookServiceClient; +import com.google.longrunning.Operation; + +public class AsyncAssignNotebookRuntime { + + public static void main(String[] args) throws Exception { + asyncAssignNotebookRuntime(); + } + + public static void asyncAssignNotebookRuntime() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + AssignNotebookRuntimeRequest request = + AssignNotebookRuntimeRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setNotebookRuntimeTemplate( + NotebookRuntimeTemplateName.of( + "[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]") + .toString()) + .setNotebookRuntime(NotebookRuntime.newBuilder().build()) + .setNotebookRuntimeId("notebookRuntimeId400795512") + .build(); + ApiFuture future = + notebookServiceClient.assignNotebookRuntimeCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END aiplatform_v1beta1_generated_NotebookService_AssignNotebookRuntime_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/assignnotebookruntime/AsyncAssignNotebookRuntimeLRO.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/assignnotebookruntime/AsyncAssignNotebookRuntimeLRO.java new file mode 100644 index 000000000000..d0b16b7ccb7d --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/assignnotebookruntime/AsyncAssignNotebookRuntimeLRO.java @@ -0,0 +1,58 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_NotebookService_AssignNotebookRuntime_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeOperationMetadata; +import com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeRequest; +import com.google.cloud.aiplatform.v1beta1.LocationName; +import com.google.cloud.aiplatform.v1beta1.NotebookRuntime; +import com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateName; +import com.google.cloud.aiplatform.v1beta1.NotebookServiceClient; + +public class AsyncAssignNotebookRuntimeLRO { + + public static void main(String[] args) throws Exception { + asyncAssignNotebookRuntimeLRO(); + } + + public static void asyncAssignNotebookRuntimeLRO() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + AssignNotebookRuntimeRequest request = + AssignNotebookRuntimeRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setNotebookRuntimeTemplate( + NotebookRuntimeTemplateName.of( + "[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]") + .toString()) + .setNotebookRuntime(NotebookRuntime.newBuilder().build()) + .setNotebookRuntimeId("notebookRuntimeId400795512") + .build(); + OperationFuture future = + notebookServiceClient.assignNotebookRuntimeOperationCallable().futureCall(request); + // Do something. + NotebookRuntime response = future.get(); + } + } +} +// [END aiplatform_v1beta1_generated_NotebookService_AssignNotebookRuntime_LRO_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/assignnotebookruntime/SyncAssignNotebookRuntime.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/assignnotebookruntime/SyncAssignNotebookRuntime.java new file mode 100644 index 000000000000..60dbd368e312 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/assignnotebookruntime/SyncAssignNotebookRuntime.java @@ -0,0 +1,53 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_NotebookService_AssignNotebookRuntime_sync] +import com.google.cloud.aiplatform.v1beta1.AssignNotebookRuntimeRequest; +import com.google.cloud.aiplatform.v1beta1.LocationName; +import com.google.cloud.aiplatform.v1beta1.NotebookRuntime; +import com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateName; +import com.google.cloud.aiplatform.v1beta1.NotebookServiceClient; + +public class SyncAssignNotebookRuntime { + + public static void main(String[] args) throws Exception { + syncAssignNotebookRuntime(); + } + + public static void syncAssignNotebookRuntime() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + AssignNotebookRuntimeRequest request = + AssignNotebookRuntimeRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setNotebookRuntimeTemplate( + NotebookRuntimeTemplateName.of( + "[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]") + .toString()) + .setNotebookRuntime(NotebookRuntime.newBuilder().build()) + .setNotebookRuntimeId("notebookRuntimeId400795512") + .build(); + NotebookRuntime response = notebookServiceClient.assignNotebookRuntimeAsync(request).get(); + } + } +} +// [END aiplatform_v1beta1_generated_NotebookService_AssignNotebookRuntime_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/assignnotebookruntime/SyncAssignNotebookRuntimeLocationnameNotebookruntimetemplatenameNotebookruntimeString.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/assignnotebookruntime/SyncAssignNotebookRuntimeLocationnameNotebookruntimetemplatenameNotebookruntimeString.java new file mode 100644 index 000000000000..c10a9c492e13 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/assignnotebookruntime/SyncAssignNotebookRuntimeLocationnameNotebookruntimetemplatenameNotebookruntimeString.java @@ -0,0 +1,53 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_NotebookService_AssignNotebookRuntime_LocationnameNotebookruntimetemplatenameNotebookruntimeString_sync] +import com.google.cloud.aiplatform.v1beta1.LocationName; +import com.google.cloud.aiplatform.v1beta1.NotebookRuntime; +import com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateName; +import com.google.cloud.aiplatform.v1beta1.NotebookServiceClient; + +public class SyncAssignNotebookRuntimeLocationnameNotebookruntimetemplatenameNotebookruntimeString { + + public static void main(String[] args) throws Exception { + syncAssignNotebookRuntimeLocationnameNotebookruntimetemplatenameNotebookruntimeString(); + } + + public static void + syncAssignNotebookRuntimeLocationnameNotebookruntimetemplatenameNotebookruntimeString() + throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + NotebookRuntimeTemplateName notebookRuntimeTemplate = + NotebookRuntimeTemplateName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]"); + NotebookRuntime notebookRuntime = NotebookRuntime.newBuilder().build(); + String notebookRuntimeId = "notebookRuntimeId400795512"; + NotebookRuntime response = + notebookServiceClient + .assignNotebookRuntimeAsync( + parent, notebookRuntimeTemplate, notebookRuntime, notebookRuntimeId) + .get(); + } + } +} +// [END aiplatform_v1beta1_generated_NotebookService_AssignNotebookRuntime_LocationnameNotebookruntimetemplatenameNotebookruntimeString_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/assignnotebookruntime/SyncAssignNotebookRuntimeLocationnameStringNotebookruntimeString.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/assignnotebookruntime/SyncAssignNotebookRuntimeLocationnameStringNotebookruntimeString.java new file mode 100644 index 000000000000..3d9c35682c67 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/assignnotebookruntime/SyncAssignNotebookRuntimeLocationnameStringNotebookruntimeString.java @@ -0,0 +1,53 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_NotebookService_AssignNotebookRuntime_LocationnameStringNotebookruntimeString_sync] +import com.google.cloud.aiplatform.v1beta1.LocationName; +import com.google.cloud.aiplatform.v1beta1.NotebookRuntime; +import com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateName; +import com.google.cloud.aiplatform.v1beta1.NotebookServiceClient; + +public class SyncAssignNotebookRuntimeLocationnameStringNotebookruntimeString { + + public static void main(String[] args) throws Exception { + syncAssignNotebookRuntimeLocationnameStringNotebookruntimeString(); + } + + public static void syncAssignNotebookRuntimeLocationnameStringNotebookruntimeString() + throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + String notebookRuntimeTemplate = + NotebookRuntimeTemplateName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]") + .toString(); + NotebookRuntime notebookRuntime = NotebookRuntime.newBuilder().build(); + String notebookRuntimeId = "notebookRuntimeId400795512"; + NotebookRuntime response = + notebookServiceClient + .assignNotebookRuntimeAsync( + parent, notebookRuntimeTemplate, notebookRuntime, notebookRuntimeId) + .get(); + } + } +} +// [END aiplatform_v1beta1_generated_NotebookService_AssignNotebookRuntime_LocationnameStringNotebookruntimeString_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/assignnotebookruntime/SyncAssignNotebookRuntimeStringNotebookruntimetemplatenameNotebookruntimeString.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/assignnotebookruntime/SyncAssignNotebookRuntimeStringNotebookruntimetemplatenameNotebookruntimeString.java new file mode 100644 index 000000000000..eccaf691b0b5 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/assignnotebookruntime/SyncAssignNotebookRuntimeStringNotebookruntimetemplatenameNotebookruntimeString.java @@ -0,0 +1,53 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_NotebookService_AssignNotebookRuntime_StringNotebookruntimetemplatenameNotebookruntimeString_sync] +import com.google.cloud.aiplatform.v1beta1.LocationName; +import com.google.cloud.aiplatform.v1beta1.NotebookRuntime; +import com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateName; +import com.google.cloud.aiplatform.v1beta1.NotebookServiceClient; + +public class SyncAssignNotebookRuntimeStringNotebookruntimetemplatenameNotebookruntimeString { + + public static void main(String[] args) throws Exception { + syncAssignNotebookRuntimeStringNotebookruntimetemplatenameNotebookruntimeString(); + } + + public static void + syncAssignNotebookRuntimeStringNotebookruntimetemplatenameNotebookruntimeString() + throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + NotebookRuntimeTemplateName notebookRuntimeTemplate = + NotebookRuntimeTemplateName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]"); + NotebookRuntime notebookRuntime = NotebookRuntime.newBuilder().build(); + String notebookRuntimeId = "notebookRuntimeId400795512"; + NotebookRuntime response = + notebookServiceClient + .assignNotebookRuntimeAsync( + parent, notebookRuntimeTemplate, notebookRuntime, notebookRuntimeId) + .get(); + } + } +} +// [END aiplatform_v1beta1_generated_NotebookService_AssignNotebookRuntime_StringNotebookruntimetemplatenameNotebookruntimeString_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/assignnotebookruntime/SyncAssignNotebookRuntimeStringStringNotebookruntimeString.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/assignnotebookruntime/SyncAssignNotebookRuntimeStringStringNotebookruntimeString.java new file mode 100644 index 000000000000..180afc3487e2 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/assignnotebookruntime/SyncAssignNotebookRuntimeStringStringNotebookruntimeString.java @@ -0,0 +1,52 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_NotebookService_AssignNotebookRuntime_StringStringNotebookruntimeString_sync] +import com.google.cloud.aiplatform.v1beta1.LocationName; +import com.google.cloud.aiplatform.v1beta1.NotebookRuntime; +import com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateName; +import com.google.cloud.aiplatform.v1beta1.NotebookServiceClient; + +public class SyncAssignNotebookRuntimeStringStringNotebookruntimeString { + + public static void main(String[] args) throws Exception { + syncAssignNotebookRuntimeStringStringNotebookruntimeString(); + } + + public static void syncAssignNotebookRuntimeStringStringNotebookruntimeString() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + String notebookRuntimeTemplate = + NotebookRuntimeTemplateName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]") + .toString(); + NotebookRuntime notebookRuntime = NotebookRuntime.newBuilder().build(); + String notebookRuntimeId = "notebookRuntimeId400795512"; + NotebookRuntime response = + notebookServiceClient + .assignNotebookRuntimeAsync( + parent, notebookRuntimeTemplate, notebookRuntime, notebookRuntimeId) + .get(); + } + } +} +// [END aiplatform_v1beta1_generated_NotebookService_AssignNotebookRuntime_StringStringNotebookruntimeString_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/create/SyncCreateSetCredentialsProvider.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..6ca52f4e064c --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,45 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_NotebookService_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.aiplatform.v1beta1.NotebookServiceClient; +import com.google.cloud.aiplatform.v1beta1.NotebookServiceSettings; +import com.google.cloud.aiplatform.v1beta1.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // 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 + NotebookServiceSettings notebookServiceSettings = + NotebookServiceSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + NotebookServiceClient notebookServiceClient = + NotebookServiceClient.create(notebookServiceSettings); + } +} +// [END aiplatform_v1beta1_generated_NotebookService_Create_SetCredentialsProvider_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/create/SyncCreateSetEndpoint.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..d0edf3e7c3ca --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_NotebookService_Create_SetEndpoint_sync] +import com.google.cloud.aiplatform.v1beta1.NotebookServiceClient; +import com.google.cloud.aiplatform.v1beta1.NotebookServiceSettings; +import com.google.cloud.aiplatform.v1beta1.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // 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 + NotebookServiceSettings notebookServiceSettings = + NotebookServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); + NotebookServiceClient notebookServiceClient = + NotebookServiceClient.create(notebookServiceSettings); + } +} +// [END aiplatform_v1beta1_generated_NotebookService_Create_SetEndpoint_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/createnotebookruntimetemplate/AsyncCreateNotebookRuntimeTemplate.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/createnotebookruntimetemplate/AsyncCreateNotebookRuntimeTemplate.java new file mode 100644 index 000000000000..62c6fcaec83f --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/createnotebookruntimetemplate/AsyncCreateNotebookRuntimeTemplate.java @@ -0,0 +1,53 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_NotebookService_CreateNotebookRuntimeTemplate_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateRequest; +import com.google.cloud.aiplatform.v1beta1.LocationName; +import com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate; +import com.google.cloud.aiplatform.v1beta1.NotebookServiceClient; +import com.google.longrunning.Operation; + +public class AsyncCreateNotebookRuntimeTemplate { + + public static void main(String[] args) throws Exception { + asyncCreateNotebookRuntimeTemplate(); + } + + public static void asyncCreateNotebookRuntimeTemplate() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + CreateNotebookRuntimeTemplateRequest request = + CreateNotebookRuntimeTemplateRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setNotebookRuntimeTemplate(NotebookRuntimeTemplate.newBuilder().build()) + .setNotebookRuntimeTemplateId("notebookRuntimeTemplateId-633369454") + .build(); + ApiFuture future = + notebookServiceClient.createNotebookRuntimeTemplateCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END aiplatform_v1beta1_generated_NotebookService_CreateNotebookRuntimeTemplate_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/createnotebookruntimetemplate/AsyncCreateNotebookRuntimeTemplateLRO.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/createnotebookruntimetemplate/AsyncCreateNotebookRuntimeTemplateLRO.java new file mode 100644 index 000000000000..831f086c89fb --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/createnotebookruntimetemplate/AsyncCreateNotebookRuntimeTemplateLRO.java @@ -0,0 +1,56 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_NotebookService_CreateNotebookRuntimeTemplate_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateOperationMetadata; +import com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateRequest; +import com.google.cloud.aiplatform.v1beta1.LocationName; +import com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate; +import com.google.cloud.aiplatform.v1beta1.NotebookServiceClient; + +public class AsyncCreateNotebookRuntimeTemplateLRO { + + public static void main(String[] args) throws Exception { + asyncCreateNotebookRuntimeTemplateLRO(); + } + + public static void asyncCreateNotebookRuntimeTemplateLRO() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + CreateNotebookRuntimeTemplateRequest request = + CreateNotebookRuntimeTemplateRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setNotebookRuntimeTemplate(NotebookRuntimeTemplate.newBuilder().build()) + .setNotebookRuntimeTemplateId("notebookRuntimeTemplateId-633369454") + .build(); + OperationFuture + future = + notebookServiceClient + .createNotebookRuntimeTemplateOperationCallable() + .futureCall(request); + // Do something. + NotebookRuntimeTemplate response = future.get(); + } + } +} +// [END aiplatform_v1beta1_generated_NotebookService_CreateNotebookRuntimeTemplate_LRO_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/createnotebookruntimetemplate/SyncCreateNotebookRuntimeTemplate.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/createnotebookruntimetemplate/SyncCreateNotebookRuntimeTemplate.java new file mode 100644 index 000000000000..99d46832e2a6 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/createnotebookruntimetemplate/SyncCreateNotebookRuntimeTemplate.java @@ -0,0 +1,49 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_NotebookService_CreateNotebookRuntimeTemplate_sync] +import com.google.cloud.aiplatform.v1beta1.CreateNotebookRuntimeTemplateRequest; +import com.google.cloud.aiplatform.v1beta1.LocationName; +import com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate; +import com.google.cloud.aiplatform.v1beta1.NotebookServiceClient; + +public class SyncCreateNotebookRuntimeTemplate { + + public static void main(String[] args) throws Exception { + syncCreateNotebookRuntimeTemplate(); + } + + public static void syncCreateNotebookRuntimeTemplate() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + CreateNotebookRuntimeTemplateRequest request = + CreateNotebookRuntimeTemplateRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setNotebookRuntimeTemplate(NotebookRuntimeTemplate.newBuilder().build()) + .setNotebookRuntimeTemplateId("notebookRuntimeTemplateId-633369454") + .build(); + NotebookRuntimeTemplate response = + notebookServiceClient.createNotebookRuntimeTemplateAsync(request).get(); + } + } +} +// [END aiplatform_v1beta1_generated_NotebookService_CreateNotebookRuntimeTemplate_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/createnotebookruntimetemplate/SyncCreateNotebookRuntimeTemplateLocationnameNotebookruntimetemplateString.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/createnotebookruntimetemplate/SyncCreateNotebookRuntimeTemplateLocationnameNotebookruntimetemplateString.java new file mode 100644 index 000000000000..7f9f0ad8565b --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/createnotebookruntimetemplate/SyncCreateNotebookRuntimeTemplateLocationnameNotebookruntimetemplateString.java @@ -0,0 +1,50 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_NotebookService_CreateNotebookRuntimeTemplate_LocationnameNotebookruntimetemplateString_sync] +import com.google.cloud.aiplatform.v1beta1.LocationName; +import com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate; +import com.google.cloud.aiplatform.v1beta1.NotebookServiceClient; + +public class SyncCreateNotebookRuntimeTemplateLocationnameNotebookruntimetemplateString { + + public static void main(String[] args) throws Exception { + syncCreateNotebookRuntimeTemplateLocationnameNotebookruntimetemplateString(); + } + + public static void syncCreateNotebookRuntimeTemplateLocationnameNotebookruntimetemplateString() + throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + NotebookRuntimeTemplate notebookRuntimeTemplate = + NotebookRuntimeTemplate.newBuilder().build(); + String notebookRuntimeTemplateId = "notebookRuntimeTemplateId-633369454"; + NotebookRuntimeTemplate response = + notebookServiceClient + .createNotebookRuntimeTemplateAsync( + parent, notebookRuntimeTemplate, notebookRuntimeTemplateId) + .get(); + } + } +} +// [END aiplatform_v1beta1_generated_NotebookService_CreateNotebookRuntimeTemplate_LocationnameNotebookruntimetemplateString_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/createnotebookruntimetemplate/SyncCreateNotebookRuntimeTemplateStringNotebookruntimetemplateString.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/createnotebookruntimetemplate/SyncCreateNotebookRuntimeTemplateStringNotebookruntimetemplateString.java new file mode 100644 index 000000000000..3526b64806b1 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/createnotebookruntimetemplate/SyncCreateNotebookRuntimeTemplateStringNotebookruntimetemplateString.java @@ -0,0 +1,50 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_NotebookService_CreateNotebookRuntimeTemplate_StringNotebookruntimetemplateString_sync] +import com.google.cloud.aiplatform.v1beta1.LocationName; +import com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate; +import com.google.cloud.aiplatform.v1beta1.NotebookServiceClient; + +public class SyncCreateNotebookRuntimeTemplateStringNotebookruntimetemplateString { + + public static void main(String[] args) throws Exception { + syncCreateNotebookRuntimeTemplateStringNotebookruntimetemplateString(); + } + + public static void syncCreateNotebookRuntimeTemplateStringNotebookruntimetemplateString() + throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + NotebookRuntimeTemplate notebookRuntimeTemplate = + NotebookRuntimeTemplate.newBuilder().build(); + String notebookRuntimeTemplateId = "notebookRuntimeTemplateId-633369454"; + NotebookRuntimeTemplate response = + notebookServiceClient + .createNotebookRuntimeTemplateAsync( + parent, notebookRuntimeTemplate, notebookRuntimeTemplateId) + .get(); + } + } +} +// [END aiplatform_v1beta1_generated_NotebookService_CreateNotebookRuntimeTemplate_StringNotebookruntimetemplateString_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/deletenotebookruntime/AsyncDeleteNotebookRuntime.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/deletenotebookruntime/AsyncDeleteNotebookRuntime.java new file mode 100644 index 000000000000..43d1b7837cc9 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/deletenotebookruntime/AsyncDeleteNotebookRuntime.java @@ -0,0 +1,52 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_NotebookService_DeleteNotebookRuntime_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeRequest; +import com.google.cloud.aiplatform.v1beta1.NotebookRuntimeName; +import com.google.cloud.aiplatform.v1beta1.NotebookServiceClient; +import com.google.longrunning.Operation; + +public class AsyncDeleteNotebookRuntime { + + public static void main(String[] args) throws Exception { + asyncDeleteNotebookRuntime(); + } + + public static void asyncDeleteNotebookRuntime() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + DeleteNotebookRuntimeRequest request = + DeleteNotebookRuntimeRequest.newBuilder() + .setName( + NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]") + .toString()) + .build(); + ApiFuture future = + notebookServiceClient.deleteNotebookRuntimeCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END aiplatform_v1beta1_generated_NotebookService_DeleteNotebookRuntime_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/deletenotebookruntime/AsyncDeleteNotebookRuntimeLRO.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/deletenotebookruntime/AsyncDeleteNotebookRuntimeLRO.java new file mode 100644 index 000000000000..93798eac3b96 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/deletenotebookruntime/AsyncDeleteNotebookRuntimeLRO.java @@ -0,0 +1,53 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_NotebookService_DeleteNotebookRuntime_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeRequest; +import com.google.cloud.aiplatform.v1beta1.DeleteOperationMetadata; +import com.google.cloud.aiplatform.v1beta1.NotebookRuntimeName; +import com.google.cloud.aiplatform.v1beta1.NotebookServiceClient; +import com.google.protobuf.Empty; + +public class AsyncDeleteNotebookRuntimeLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteNotebookRuntimeLRO(); + } + + public static void asyncDeleteNotebookRuntimeLRO() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + DeleteNotebookRuntimeRequest request = + DeleteNotebookRuntimeRequest.newBuilder() + .setName( + NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]") + .toString()) + .build(); + OperationFuture future = + notebookServiceClient.deleteNotebookRuntimeOperationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END aiplatform_v1beta1_generated_NotebookService_DeleteNotebookRuntime_LRO_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/deletenotebookruntime/SyncDeleteNotebookRuntime.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/deletenotebookruntime/SyncDeleteNotebookRuntime.java new file mode 100644 index 000000000000..34bff89ea82c --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/deletenotebookruntime/SyncDeleteNotebookRuntime.java @@ -0,0 +1,48 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_NotebookService_DeleteNotebookRuntime_sync] +import com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeRequest; +import com.google.cloud.aiplatform.v1beta1.NotebookRuntimeName; +import com.google.cloud.aiplatform.v1beta1.NotebookServiceClient; +import com.google.protobuf.Empty; + +public class SyncDeleteNotebookRuntime { + + public static void main(String[] args) throws Exception { + syncDeleteNotebookRuntime(); + } + + public static void syncDeleteNotebookRuntime() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + DeleteNotebookRuntimeRequest request = + DeleteNotebookRuntimeRequest.newBuilder() + .setName( + NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]") + .toString()) + .build(); + notebookServiceClient.deleteNotebookRuntimeAsync(request).get(); + } + } +} +// [END aiplatform_v1beta1_generated_NotebookService_DeleteNotebookRuntime_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/deletenotebookruntime/SyncDeleteNotebookRuntimeNotebookruntimename.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/deletenotebookruntime/SyncDeleteNotebookRuntimeNotebookruntimename.java new file mode 100644 index 000000000000..7253142c12ec --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/deletenotebookruntime/SyncDeleteNotebookRuntimeNotebookruntimename.java @@ -0,0 +1,43 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_NotebookService_DeleteNotebookRuntime_Notebookruntimename_sync] +import com.google.cloud.aiplatform.v1beta1.NotebookRuntimeName; +import com.google.cloud.aiplatform.v1beta1.NotebookServiceClient; +import com.google.protobuf.Empty; + +public class SyncDeleteNotebookRuntimeNotebookruntimename { + + public static void main(String[] args) throws Exception { + syncDeleteNotebookRuntimeNotebookruntimename(); + } + + public static void syncDeleteNotebookRuntimeNotebookruntimename() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + NotebookRuntimeName name = + NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]"); + notebookServiceClient.deleteNotebookRuntimeAsync(name).get(); + } + } +} +// [END aiplatform_v1beta1_generated_NotebookService_DeleteNotebookRuntime_Notebookruntimename_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/deletenotebookruntime/SyncDeleteNotebookRuntimeString.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/deletenotebookruntime/SyncDeleteNotebookRuntimeString.java new file mode 100644 index 000000000000..8e05122510b7 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/deletenotebookruntime/SyncDeleteNotebookRuntimeString.java @@ -0,0 +1,43 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_NotebookService_DeleteNotebookRuntime_String_sync] +import com.google.cloud.aiplatform.v1beta1.NotebookRuntimeName; +import com.google.cloud.aiplatform.v1beta1.NotebookServiceClient; +import com.google.protobuf.Empty; + +public class SyncDeleteNotebookRuntimeString { + + public static void main(String[] args) throws Exception { + syncDeleteNotebookRuntimeString(); + } + + public static void syncDeleteNotebookRuntimeString() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + String name = + NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]").toString(); + notebookServiceClient.deleteNotebookRuntimeAsync(name).get(); + } + } +} +// [END aiplatform_v1beta1_generated_NotebookService_DeleteNotebookRuntime_String_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/deletenotebookruntimetemplate/AsyncDeleteNotebookRuntimeTemplate.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/deletenotebookruntimetemplate/AsyncDeleteNotebookRuntimeTemplate.java new file mode 100644 index 000000000000..020c3d01005e --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/deletenotebookruntimetemplate/AsyncDeleteNotebookRuntimeTemplate.java @@ -0,0 +1,53 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_NotebookService_DeleteNotebookRuntimeTemplate_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeTemplateRequest; +import com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateName; +import com.google.cloud.aiplatform.v1beta1.NotebookServiceClient; +import com.google.longrunning.Operation; + +public class AsyncDeleteNotebookRuntimeTemplate { + + public static void main(String[] args) throws Exception { + asyncDeleteNotebookRuntimeTemplate(); + } + + public static void asyncDeleteNotebookRuntimeTemplate() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + DeleteNotebookRuntimeTemplateRequest request = + DeleteNotebookRuntimeTemplateRequest.newBuilder() + .setName( + NotebookRuntimeTemplateName.of( + "[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]") + .toString()) + .build(); + ApiFuture future = + notebookServiceClient.deleteNotebookRuntimeTemplateCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END aiplatform_v1beta1_generated_NotebookService_DeleteNotebookRuntimeTemplate_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/deletenotebookruntimetemplate/AsyncDeleteNotebookRuntimeTemplateLRO.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/deletenotebookruntimetemplate/AsyncDeleteNotebookRuntimeTemplateLRO.java new file mode 100644 index 000000000000..e976a6f2fcf0 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/deletenotebookruntimetemplate/AsyncDeleteNotebookRuntimeTemplateLRO.java @@ -0,0 +1,56 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_NotebookService_DeleteNotebookRuntimeTemplate_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeTemplateRequest; +import com.google.cloud.aiplatform.v1beta1.DeleteOperationMetadata; +import com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateName; +import com.google.cloud.aiplatform.v1beta1.NotebookServiceClient; +import com.google.protobuf.Empty; + +public class AsyncDeleteNotebookRuntimeTemplateLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteNotebookRuntimeTemplateLRO(); + } + + public static void asyncDeleteNotebookRuntimeTemplateLRO() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + DeleteNotebookRuntimeTemplateRequest request = + DeleteNotebookRuntimeTemplateRequest.newBuilder() + .setName( + NotebookRuntimeTemplateName.of( + "[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]") + .toString()) + .build(); + OperationFuture future = + notebookServiceClient + .deleteNotebookRuntimeTemplateOperationCallable() + .futureCall(request); + // Do something. + future.get(); + } + } +} +// [END aiplatform_v1beta1_generated_NotebookService_DeleteNotebookRuntimeTemplate_LRO_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/deletenotebookruntimetemplate/SyncDeleteNotebookRuntimeTemplate.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/deletenotebookruntimetemplate/SyncDeleteNotebookRuntimeTemplate.java new file mode 100644 index 000000000000..595d45c60472 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/deletenotebookruntimetemplate/SyncDeleteNotebookRuntimeTemplate.java @@ -0,0 +1,49 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_NotebookService_DeleteNotebookRuntimeTemplate_sync] +import com.google.cloud.aiplatform.v1beta1.DeleteNotebookRuntimeTemplateRequest; +import com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateName; +import com.google.cloud.aiplatform.v1beta1.NotebookServiceClient; +import com.google.protobuf.Empty; + +public class SyncDeleteNotebookRuntimeTemplate { + + public static void main(String[] args) throws Exception { + syncDeleteNotebookRuntimeTemplate(); + } + + public static void syncDeleteNotebookRuntimeTemplate() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + DeleteNotebookRuntimeTemplateRequest request = + DeleteNotebookRuntimeTemplateRequest.newBuilder() + .setName( + NotebookRuntimeTemplateName.of( + "[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]") + .toString()) + .build(); + notebookServiceClient.deleteNotebookRuntimeTemplateAsync(request).get(); + } + } +} +// [END aiplatform_v1beta1_generated_NotebookService_DeleteNotebookRuntimeTemplate_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/deletenotebookruntimetemplate/SyncDeleteNotebookRuntimeTemplateNotebookruntimetemplatename.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/deletenotebookruntimetemplate/SyncDeleteNotebookRuntimeTemplateNotebookruntimetemplatename.java new file mode 100644 index 000000000000..9f4bd388ffae --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/deletenotebookruntimetemplate/SyncDeleteNotebookRuntimeTemplateNotebookruntimetemplatename.java @@ -0,0 +1,44 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_NotebookService_DeleteNotebookRuntimeTemplate_Notebookruntimetemplatename_sync] +import com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateName; +import com.google.cloud.aiplatform.v1beta1.NotebookServiceClient; +import com.google.protobuf.Empty; + +public class SyncDeleteNotebookRuntimeTemplateNotebookruntimetemplatename { + + public static void main(String[] args) throws Exception { + syncDeleteNotebookRuntimeTemplateNotebookruntimetemplatename(); + } + + public static void syncDeleteNotebookRuntimeTemplateNotebookruntimetemplatename() + throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + NotebookRuntimeTemplateName name = + NotebookRuntimeTemplateName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]"); + notebookServiceClient.deleteNotebookRuntimeTemplateAsync(name).get(); + } + } +} +// [END aiplatform_v1beta1_generated_NotebookService_DeleteNotebookRuntimeTemplate_Notebookruntimetemplatename_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/deletenotebookruntimetemplate/SyncDeleteNotebookRuntimeTemplateString.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/deletenotebookruntimetemplate/SyncDeleteNotebookRuntimeTemplateString.java new file mode 100644 index 000000000000..1b949ac7e788 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/deletenotebookruntimetemplate/SyncDeleteNotebookRuntimeTemplateString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_NotebookService_DeleteNotebookRuntimeTemplate_String_sync] +import com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateName; +import com.google.cloud.aiplatform.v1beta1.NotebookServiceClient; +import com.google.protobuf.Empty; + +public class SyncDeleteNotebookRuntimeTemplateString { + + public static void main(String[] args) throws Exception { + syncDeleteNotebookRuntimeTemplateString(); + } + + public static void syncDeleteNotebookRuntimeTemplateString() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + String name = + NotebookRuntimeTemplateName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]") + .toString(); + notebookServiceClient.deleteNotebookRuntimeTemplateAsync(name).get(); + } + } +} +// [END aiplatform_v1beta1_generated_NotebookService_DeleteNotebookRuntimeTemplate_String_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/getiampolicy/AsyncGetIamPolicy.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/getiampolicy/AsyncGetIamPolicy.java new file mode 100644 index 000000000000..f979f959c65b --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/getiampolicy/AsyncGetIamPolicy.java @@ -0,0 +1,54 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_NotebookService_GetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1beta1.EndpointName; +import com.google.cloud.aiplatform.v1beta1.NotebookServiceClient; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; + +public class AsyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncGetIamPolicy(); + } + + public static void asyncGetIamPolicy() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + ApiFuture future = notebookServiceClient.getIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END aiplatform_v1beta1_generated_NotebookService_GetIamPolicy_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/getiampolicy/SyncGetIamPolicy.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/getiampolicy/SyncGetIamPolicy.java new file mode 100644 index 000000000000..4aa2650aebe6 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/getiampolicy/SyncGetIamPolicy.java @@ -0,0 +1,51 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_NotebookService_GetIamPolicy_sync] +import com.google.cloud.aiplatform.v1beta1.EndpointName; +import com.google.cloud.aiplatform.v1beta1.NotebookServiceClient; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; + +public class SyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + syncGetIamPolicy(); + } + + public static void syncGetIamPolicy() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + Policy response = notebookServiceClient.getIamPolicy(request); + } + } +} +// [END aiplatform_v1beta1_generated_NotebookService_GetIamPolicy_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/getlocation/AsyncGetLocation.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/getlocation/AsyncGetLocation.java new file mode 100644 index 000000000000..328cfd8e633d --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/getlocation/AsyncGetLocation.java @@ -0,0 +1,45 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_NotebookService_GetLocation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1beta1.NotebookServiceClient; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; + +public class AsyncGetLocation { + + public static void main(String[] args) throws Exception { + asyncGetLocation(); + } + + public static void asyncGetLocation() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + ApiFuture future = notebookServiceClient.getLocationCallable().futureCall(request); + // Do something. + Location response = future.get(); + } + } +} +// [END aiplatform_v1beta1_generated_NotebookService_GetLocation_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/getlocation/SyncGetLocation.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/getlocation/SyncGetLocation.java new file mode 100644 index 000000000000..2fc5366c5fbf --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/getlocation/SyncGetLocation.java @@ -0,0 +1,42 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_NotebookService_GetLocation_sync] +import com.google.cloud.aiplatform.v1beta1.NotebookServiceClient; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; + +public class SyncGetLocation { + + public static void main(String[] args) throws Exception { + syncGetLocation(); + } + + public static void syncGetLocation() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + Location response = notebookServiceClient.getLocation(request); + } + } +} +// [END aiplatform_v1beta1_generated_NotebookService_GetLocation_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/getnotebookruntime/AsyncGetNotebookRuntime.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/getnotebookruntime/AsyncGetNotebookRuntime.java new file mode 100644 index 000000000000..aa52a63f471d --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/getnotebookruntime/AsyncGetNotebookRuntime.java @@ -0,0 +1,52 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_NotebookService_GetNotebookRuntime_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeRequest; +import com.google.cloud.aiplatform.v1beta1.NotebookRuntime; +import com.google.cloud.aiplatform.v1beta1.NotebookRuntimeName; +import com.google.cloud.aiplatform.v1beta1.NotebookServiceClient; + +public class AsyncGetNotebookRuntime { + + public static void main(String[] args) throws Exception { + asyncGetNotebookRuntime(); + } + + public static void asyncGetNotebookRuntime() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + GetNotebookRuntimeRequest request = + GetNotebookRuntimeRequest.newBuilder() + .setName( + NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]") + .toString()) + .build(); + ApiFuture future = + notebookServiceClient.getNotebookRuntimeCallable().futureCall(request); + // Do something. + NotebookRuntime response = future.get(); + } + } +} +// [END aiplatform_v1beta1_generated_NotebookService_GetNotebookRuntime_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/getnotebookruntime/SyncGetNotebookRuntime.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/getnotebookruntime/SyncGetNotebookRuntime.java new file mode 100644 index 000000000000..e506bccccf8c --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/getnotebookruntime/SyncGetNotebookRuntime.java @@ -0,0 +1,48 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_NotebookService_GetNotebookRuntime_sync] +import com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeRequest; +import com.google.cloud.aiplatform.v1beta1.NotebookRuntime; +import com.google.cloud.aiplatform.v1beta1.NotebookRuntimeName; +import com.google.cloud.aiplatform.v1beta1.NotebookServiceClient; + +public class SyncGetNotebookRuntime { + + public static void main(String[] args) throws Exception { + syncGetNotebookRuntime(); + } + + public static void syncGetNotebookRuntime() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + GetNotebookRuntimeRequest request = + GetNotebookRuntimeRequest.newBuilder() + .setName( + NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]") + .toString()) + .build(); + NotebookRuntime response = notebookServiceClient.getNotebookRuntime(request); + } + } +} +// [END aiplatform_v1beta1_generated_NotebookService_GetNotebookRuntime_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/getnotebookruntime/SyncGetNotebookRuntimeNotebookruntimename.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/getnotebookruntime/SyncGetNotebookRuntimeNotebookruntimename.java new file mode 100644 index 000000000000..987a9349f526 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/getnotebookruntime/SyncGetNotebookRuntimeNotebookruntimename.java @@ -0,0 +1,43 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_NotebookService_GetNotebookRuntime_Notebookruntimename_sync] +import com.google.cloud.aiplatform.v1beta1.NotebookRuntime; +import com.google.cloud.aiplatform.v1beta1.NotebookRuntimeName; +import com.google.cloud.aiplatform.v1beta1.NotebookServiceClient; + +public class SyncGetNotebookRuntimeNotebookruntimename { + + public static void main(String[] args) throws Exception { + syncGetNotebookRuntimeNotebookruntimename(); + } + + public static void syncGetNotebookRuntimeNotebookruntimename() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + NotebookRuntimeName name = + NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]"); + NotebookRuntime response = notebookServiceClient.getNotebookRuntime(name); + } + } +} +// [END aiplatform_v1beta1_generated_NotebookService_GetNotebookRuntime_Notebookruntimename_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/getnotebookruntime/SyncGetNotebookRuntimeString.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/getnotebookruntime/SyncGetNotebookRuntimeString.java new file mode 100644 index 000000000000..6cfa7c73f498 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/getnotebookruntime/SyncGetNotebookRuntimeString.java @@ -0,0 +1,43 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_NotebookService_GetNotebookRuntime_String_sync] +import com.google.cloud.aiplatform.v1beta1.NotebookRuntime; +import com.google.cloud.aiplatform.v1beta1.NotebookRuntimeName; +import com.google.cloud.aiplatform.v1beta1.NotebookServiceClient; + +public class SyncGetNotebookRuntimeString { + + public static void main(String[] args) throws Exception { + syncGetNotebookRuntimeString(); + } + + public static void syncGetNotebookRuntimeString() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + String name = + NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]").toString(); + NotebookRuntime response = notebookServiceClient.getNotebookRuntime(name); + } + } +} +// [END aiplatform_v1beta1_generated_NotebookService_GetNotebookRuntime_String_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/getnotebookruntimetemplate/AsyncGetNotebookRuntimeTemplate.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/getnotebookruntimetemplate/AsyncGetNotebookRuntimeTemplate.java new file mode 100644 index 000000000000..1104a381ac29 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/getnotebookruntimetemplate/AsyncGetNotebookRuntimeTemplate.java @@ -0,0 +1,53 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_NotebookService_GetNotebookRuntimeTemplate_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeTemplateRequest; +import com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate; +import com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateName; +import com.google.cloud.aiplatform.v1beta1.NotebookServiceClient; + +public class AsyncGetNotebookRuntimeTemplate { + + public static void main(String[] args) throws Exception { + asyncGetNotebookRuntimeTemplate(); + } + + public static void asyncGetNotebookRuntimeTemplate() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + GetNotebookRuntimeTemplateRequest request = + GetNotebookRuntimeTemplateRequest.newBuilder() + .setName( + NotebookRuntimeTemplateName.of( + "[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]") + .toString()) + .build(); + ApiFuture future = + notebookServiceClient.getNotebookRuntimeTemplateCallable().futureCall(request); + // Do something. + NotebookRuntimeTemplate response = future.get(); + } + } +} +// [END aiplatform_v1beta1_generated_NotebookService_GetNotebookRuntimeTemplate_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/getnotebookruntimetemplate/SyncGetNotebookRuntimeTemplate.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/getnotebookruntimetemplate/SyncGetNotebookRuntimeTemplate.java new file mode 100644 index 000000000000..1c8723c2ac79 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/getnotebookruntimetemplate/SyncGetNotebookRuntimeTemplate.java @@ -0,0 +1,49 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_NotebookService_GetNotebookRuntimeTemplate_sync] +import com.google.cloud.aiplatform.v1beta1.GetNotebookRuntimeTemplateRequest; +import com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate; +import com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateName; +import com.google.cloud.aiplatform.v1beta1.NotebookServiceClient; + +public class SyncGetNotebookRuntimeTemplate { + + public static void main(String[] args) throws Exception { + syncGetNotebookRuntimeTemplate(); + } + + public static void syncGetNotebookRuntimeTemplate() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + GetNotebookRuntimeTemplateRequest request = + GetNotebookRuntimeTemplateRequest.newBuilder() + .setName( + NotebookRuntimeTemplateName.of( + "[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]") + .toString()) + .build(); + NotebookRuntimeTemplate response = notebookServiceClient.getNotebookRuntimeTemplate(request); + } + } +} +// [END aiplatform_v1beta1_generated_NotebookService_GetNotebookRuntimeTemplate_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/getnotebookruntimetemplate/SyncGetNotebookRuntimeTemplateNotebookruntimetemplatename.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/getnotebookruntimetemplate/SyncGetNotebookRuntimeTemplateNotebookruntimetemplatename.java new file mode 100644 index 000000000000..25f4b071e6f4 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/getnotebookruntimetemplate/SyncGetNotebookRuntimeTemplateNotebookruntimetemplatename.java @@ -0,0 +1,43 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_NotebookService_GetNotebookRuntimeTemplate_Notebookruntimetemplatename_sync] +import com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate; +import com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateName; +import com.google.cloud.aiplatform.v1beta1.NotebookServiceClient; + +public class SyncGetNotebookRuntimeTemplateNotebookruntimetemplatename { + + public static void main(String[] args) throws Exception { + syncGetNotebookRuntimeTemplateNotebookruntimetemplatename(); + } + + public static void syncGetNotebookRuntimeTemplateNotebookruntimetemplatename() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + NotebookRuntimeTemplateName name = + NotebookRuntimeTemplateName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]"); + NotebookRuntimeTemplate response = notebookServiceClient.getNotebookRuntimeTemplate(name); + } + } +} +// [END aiplatform_v1beta1_generated_NotebookService_GetNotebookRuntimeTemplate_Notebookruntimetemplatename_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/getnotebookruntimetemplate/SyncGetNotebookRuntimeTemplateString.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/getnotebookruntimetemplate/SyncGetNotebookRuntimeTemplateString.java new file mode 100644 index 000000000000..ecd85b614c1f --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/getnotebookruntimetemplate/SyncGetNotebookRuntimeTemplateString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_NotebookService_GetNotebookRuntimeTemplate_String_sync] +import com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate; +import com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplateName; +import com.google.cloud.aiplatform.v1beta1.NotebookServiceClient; + +public class SyncGetNotebookRuntimeTemplateString { + + public static void main(String[] args) throws Exception { + syncGetNotebookRuntimeTemplateString(); + } + + public static void syncGetNotebookRuntimeTemplateString() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + String name = + NotebookRuntimeTemplateName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME_TEMPLATE]") + .toString(); + NotebookRuntimeTemplate response = notebookServiceClient.getNotebookRuntimeTemplate(name); + } + } +} +// [END aiplatform_v1beta1_generated_NotebookService_GetNotebookRuntimeTemplate_String_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/listlocations/AsyncListLocations.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/listlocations/AsyncListLocations.java new file mode 100644 index 000000000000..bf09521f283d --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/listlocations/AsyncListLocations.java @@ -0,0 +1,54 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_NotebookService_ListLocations_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1beta1.NotebookServiceClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; + +public class AsyncListLocations { + + public static void main(String[] args) throws Exception { + asyncListLocations(); + } + + public static void asyncListLocations() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + notebookServiceClient.listLocationsPagedCallable().futureCall(request); + // Do something. + for (Location element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1beta1_generated_NotebookService_ListLocations_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/listlocations/AsyncListLocationsPaged.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/listlocations/AsyncListLocationsPaged.java new file mode 100644 index 000000000000..7e536c17ee99 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/listlocations/AsyncListLocationsPaged.java @@ -0,0 +1,62 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_NotebookService_ListLocations_Paged_async] +import com.google.cloud.aiplatform.v1beta1.NotebookServiceClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.base.Strings; + +public class AsyncListLocationsPaged { + + public static void main(String[] args) throws Exception { + asyncListLocationsPaged(); + } + + public static void asyncListLocationsPaged() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListLocationsResponse response = + notebookServiceClient.listLocationsCallable().call(request); + for (Location element : response.getLocationsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END aiplatform_v1beta1_generated_NotebookService_ListLocations_Paged_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/listlocations/SyncListLocations.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/listlocations/SyncListLocations.java new file mode 100644 index 000000000000..31add2ee931c --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/listlocations/SyncListLocations.java @@ -0,0 +1,50 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_NotebookService_ListLocations_sync] +import com.google.cloud.aiplatform.v1beta1.NotebookServiceClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; + +public class SyncListLocations { + + public static void main(String[] args) throws Exception { + syncListLocations(); + } + + public static void syncListLocations() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Location element : notebookServiceClient.listLocations(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1beta1_generated_NotebookService_ListLocations_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/listnotebookruntimes/AsyncListNotebookRuntimes.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/listnotebookruntimes/AsyncListNotebookRuntimes.java new file mode 100644 index 000000000000..f609cc40e769 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/listnotebookruntimes/AsyncListNotebookRuntimes.java @@ -0,0 +1,58 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_NotebookService_ListNotebookRuntimes_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesRequest; +import com.google.cloud.aiplatform.v1beta1.LocationName; +import com.google.cloud.aiplatform.v1beta1.NotebookRuntime; +import com.google.cloud.aiplatform.v1beta1.NotebookServiceClient; +import com.google.protobuf.FieldMask; + +public class AsyncListNotebookRuntimes { + + public static void main(String[] args) throws Exception { + asyncListNotebookRuntimes(); + } + + public static void asyncListNotebookRuntimes() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + ListNotebookRuntimesRequest request = + ListNotebookRuntimesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setReadMask(FieldMask.newBuilder().build()) + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = + notebookServiceClient.listNotebookRuntimesPagedCallable().futureCall(request); + // Do something. + for (NotebookRuntime element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1beta1_generated_NotebookService_ListNotebookRuntimes_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/listnotebookruntimes/AsyncListNotebookRuntimesPaged.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/listnotebookruntimes/AsyncListNotebookRuntimesPaged.java new file mode 100644 index 000000000000..6f18a087dcd9 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/listnotebookruntimes/AsyncListNotebookRuntimesPaged.java @@ -0,0 +1,66 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_NotebookService_ListNotebookRuntimes_Paged_async] +import com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesRequest; +import com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesResponse; +import com.google.cloud.aiplatform.v1beta1.LocationName; +import com.google.cloud.aiplatform.v1beta1.NotebookRuntime; +import com.google.cloud.aiplatform.v1beta1.NotebookServiceClient; +import com.google.common.base.Strings; +import com.google.protobuf.FieldMask; + +public class AsyncListNotebookRuntimesPaged { + + public static void main(String[] args) throws Exception { + asyncListNotebookRuntimesPaged(); + } + + public static void asyncListNotebookRuntimesPaged() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + ListNotebookRuntimesRequest request = + ListNotebookRuntimesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setReadMask(FieldMask.newBuilder().build()) + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListNotebookRuntimesResponse response = + notebookServiceClient.listNotebookRuntimesCallable().call(request); + for (NotebookRuntime element : response.getNotebookRuntimesList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END aiplatform_v1beta1_generated_NotebookService_ListNotebookRuntimes_Paged_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/listnotebookruntimes/SyncListNotebookRuntimes.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/listnotebookruntimes/SyncListNotebookRuntimes.java new file mode 100644 index 000000000000..64256a7259ef --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/listnotebookruntimes/SyncListNotebookRuntimes.java @@ -0,0 +1,55 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_NotebookService_ListNotebookRuntimes_sync] +import com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimesRequest; +import com.google.cloud.aiplatform.v1beta1.LocationName; +import com.google.cloud.aiplatform.v1beta1.NotebookRuntime; +import com.google.cloud.aiplatform.v1beta1.NotebookServiceClient; +import com.google.protobuf.FieldMask; + +public class SyncListNotebookRuntimes { + + public static void main(String[] args) throws Exception { + syncListNotebookRuntimes(); + } + + public static void syncListNotebookRuntimes() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + ListNotebookRuntimesRequest request = + ListNotebookRuntimesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setReadMask(FieldMask.newBuilder().build()) + .setOrderBy("orderBy-1207110587") + .build(); + for (NotebookRuntime element : + notebookServiceClient.listNotebookRuntimes(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1beta1_generated_NotebookService_ListNotebookRuntimes_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/listnotebookruntimes/SyncListNotebookRuntimesLocationname.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/listnotebookruntimes/SyncListNotebookRuntimesLocationname.java new file mode 100644 index 000000000000..d9fb0f52a9c6 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/listnotebookruntimes/SyncListNotebookRuntimesLocationname.java @@ -0,0 +1,45 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_NotebookService_ListNotebookRuntimes_Locationname_sync] +import com.google.cloud.aiplatform.v1beta1.LocationName; +import com.google.cloud.aiplatform.v1beta1.NotebookRuntime; +import com.google.cloud.aiplatform.v1beta1.NotebookServiceClient; + +public class SyncListNotebookRuntimesLocationname { + + public static void main(String[] args) throws Exception { + syncListNotebookRuntimesLocationname(); + } + + public static void syncListNotebookRuntimesLocationname() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (NotebookRuntime element : + notebookServiceClient.listNotebookRuntimes(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1beta1_generated_NotebookService_ListNotebookRuntimes_Locationname_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/listnotebookruntimes/SyncListNotebookRuntimesString.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/listnotebookruntimes/SyncListNotebookRuntimesString.java new file mode 100644 index 000000000000..3e5b9646c198 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/listnotebookruntimes/SyncListNotebookRuntimesString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_NotebookService_ListNotebookRuntimes_String_sync] +import com.google.cloud.aiplatform.v1beta1.LocationName; +import com.google.cloud.aiplatform.v1beta1.NotebookRuntime; +import com.google.cloud.aiplatform.v1beta1.NotebookServiceClient; + +public class SyncListNotebookRuntimesString { + + public static void main(String[] args) throws Exception { + syncListNotebookRuntimesString(); + } + + public static void syncListNotebookRuntimesString() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (NotebookRuntime element : + notebookServiceClient.listNotebookRuntimes(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1beta1_generated_NotebookService_ListNotebookRuntimes_String_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/listnotebookruntimetemplates/AsyncListNotebookRuntimeTemplates.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/listnotebookruntimetemplates/AsyncListNotebookRuntimeTemplates.java new file mode 100644 index 000000000000..756fa0bcc053 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/listnotebookruntimetemplates/AsyncListNotebookRuntimeTemplates.java @@ -0,0 +1,58 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_NotebookService_ListNotebookRuntimeTemplates_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesRequest; +import com.google.cloud.aiplatform.v1beta1.LocationName; +import com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate; +import com.google.cloud.aiplatform.v1beta1.NotebookServiceClient; +import com.google.protobuf.FieldMask; + +public class AsyncListNotebookRuntimeTemplates { + + public static void main(String[] args) throws Exception { + asyncListNotebookRuntimeTemplates(); + } + + public static void asyncListNotebookRuntimeTemplates() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + ListNotebookRuntimeTemplatesRequest request = + ListNotebookRuntimeTemplatesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setReadMask(FieldMask.newBuilder().build()) + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = + notebookServiceClient.listNotebookRuntimeTemplatesPagedCallable().futureCall(request); + // Do something. + for (NotebookRuntimeTemplate element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1beta1_generated_NotebookService_ListNotebookRuntimeTemplates_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/listnotebookruntimetemplates/AsyncListNotebookRuntimeTemplatesPaged.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/listnotebookruntimetemplates/AsyncListNotebookRuntimeTemplatesPaged.java new file mode 100644 index 000000000000..f1210eed08a1 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/listnotebookruntimetemplates/AsyncListNotebookRuntimeTemplatesPaged.java @@ -0,0 +1,66 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_NotebookService_ListNotebookRuntimeTemplates_Paged_async] +import com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesRequest; +import com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesResponse; +import com.google.cloud.aiplatform.v1beta1.LocationName; +import com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate; +import com.google.cloud.aiplatform.v1beta1.NotebookServiceClient; +import com.google.common.base.Strings; +import com.google.protobuf.FieldMask; + +public class AsyncListNotebookRuntimeTemplatesPaged { + + public static void main(String[] args) throws Exception { + asyncListNotebookRuntimeTemplatesPaged(); + } + + public static void asyncListNotebookRuntimeTemplatesPaged() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + ListNotebookRuntimeTemplatesRequest request = + ListNotebookRuntimeTemplatesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setReadMask(FieldMask.newBuilder().build()) + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListNotebookRuntimeTemplatesResponse response = + notebookServiceClient.listNotebookRuntimeTemplatesCallable().call(request); + for (NotebookRuntimeTemplate element : response.getNotebookRuntimeTemplatesList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END aiplatform_v1beta1_generated_NotebookService_ListNotebookRuntimeTemplates_Paged_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/listnotebookruntimetemplates/SyncListNotebookRuntimeTemplates.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/listnotebookruntimetemplates/SyncListNotebookRuntimeTemplates.java new file mode 100644 index 000000000000..47df59534e61 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/listnotebookruntimetemplates/SyncListNotebookRuntimeTemplates.java @@ -0,0 +1,55 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_NotebookService_ListNotebookRuntimeTemplates_sync] +import com.google.cloud.aiplatform.v1beta1.ListNotebookRuntimeTemplatesRequest; +import com.google.cloud.aiplatform.v1beta1.LocationName; +import com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate; +import com.google.cloud.aiplatform.v1beta1.NotebookServiceClient; +import com.google.protobuf.FieldMask; + +public class SyncListNotebookRuntimeTemplates { + + public static void main(String[] args) throws Exception { + syncListNotebookRuntimeTemplates(); + } + + public static void syncListNotebookRuntimeTemplates() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + ListNotebookRuntimeTemplatesRequest request = + ListNotebookRuntimeTemplatesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setReadMask(FieldMask.newBuilder().build()) + .setOrderBy("orderBy-1207110587") + .build(); + for (NotebookRuntimeTemplate element : + notebookServiceClient.listNotebookRuntimeTemplates(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1beta1_generated_NotebookService_ListNotebookRuntimeTemplates_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/listnotebookruntimetemplates/SyncListNotebookRuntimeTemplatesLocationname.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/listnotebookruntimetemplates/SyncListNotebookRuntimeTemplatesLocationname.java new file mode 100644 index 000000000000..38bbe721e7e9 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/listnotebookruntimetemplates/SyncListNotebookRuntimeTemplatesLocationname.java @@ -0,0 +1,45 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_NotebookService_ListNotebookRuntimeTemplates_Locationname_sync] +import com.google.cloud.aiplatform.v1beta1.LocationName; +import com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate; +import com.google.cloud.aiplatform.v1beta1.NotebookServiceClient; + +public class SyncListNotebookRuntimeTemplatesLocationname { + + public static void main(String[] args) throws Exception { + syncListNotebookRuntimeTemplatesLocationname(); + } + + public static void syncListNotebookRuntimeTemplatesLocationname() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (NotebookRuntimeTemplate element : + notebookServiceClient.listNotebookRuntimeTemplates(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1beta1_generated_NotebookService_ListNotebookRuntimeTemplates_Locationname_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/listnotebookruntimetemplates/SyncListNotebookRuntimeTemplatesString.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/listnotebookruntimetemplates/SyncListNotebookRuntimeTemplatesString.java new file mode 100644 index 000000000000..8aafdfc2c370 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/listnotebookruntimetemplates/SyncListNotebookRuntimeTemplatesString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_NotebookService_ListNotebookRuntimeTemplates_String_sync] +import com.google.cloud.aiplatform.v1beta1.LocationName; +import com.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate; +import com.google.cloud.aiplatform.v1beta1.NotebookServiceClient; + +public class SyncListNotebookRuntimeTemplatesString { + + public static void main(String[] args) throws Exception { + syncListNotebookRuntimeTemplatesString(); + } + + public static void syncListNotebookRuntimeTemplatesString() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (NotebookRuntimeTemplate element : + notebookServiceClient.listNotebookRuntimeTemplates(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1beta1_generated_NotebookService_ListNotebookRuntimeTemplates_String_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/setiampolicy/AsyncSetIamPolicy.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/setiampolicy/AsyncSetIamPolicy.java new file mode 100644 index 000000000000..499d6cdb70c2 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/setiampolicy/AsyncSetIamPolicy.java @@ -0,0 +1,55 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_NotebookService_SetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1beta1.EndpointName; +import com.google.cloud.aiplatform.v1beta1.NotebookServiceClient; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.protobuf.FieldMask; + +public class AsyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncSetIamPolicy(); + } + + public static void asyncSetIamPolicy() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = notebookServiceClient.setIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END aiplatform_v1beta1_generated_NotebookService_SetIamPolicy_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/setiampolicy/SyncSetIamPolicy.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/setiampolicy/SyncSetIamPolicy.java new file mode 100644 index 000000000000..42578dc4a2b0 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/setiampolicy/SyncSetIamPolicy.java @@ -0,0 +1,52 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_NotebookService_SetIamPolicy_sync] +import com.google.cloud.aiplatform.v1beta1.EndpointName; +import com.google.cloud.aiplatform.v1beta1.NotebookServiceClient; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.protobuf.FieldMask; + +public class SyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + syncSetIamPolicy(); + } + + public static void syncSetIamPolicy() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + Policy response = notebookServiceClient.setIamPolicy(request); + } + } +} +// [END aiplatform_v1beta1_generated_NotebookService_SetIamPolicy_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/startnotebookruntime/AsyncStartNotebookRuntime.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/startnotebookruntime/AsyncStartNotebookRuntime.java new file mode 100644 index 000000000000..212c6763ea2a --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/startnotebookruntime/AsyncStartNotebookRuntime.java @@ -0,0 +1,52 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_NotebookService_StartNotebookRuntime_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1beta1.NotebookRuntimeName; +import com.google.cloud.aiplatform.v1beta1.NotebookServiceClient; +import com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeRequest; +import com.google.longrunning.Operation; + +public class AsyncStartNotebookRuntime { + + public static void main(String[] args) throws Exception { + asyncStartNotebookRuntime(); + } + + public static void asyncStartNotebookRuntime() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + StartNotebookRuntimeRequest request = + StartNotebookRuntimeRequest.newBuilder() + .setName( + NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]") + .toString()) + .build(); + ApiFuture future = + notebookServiceClient.startNotebookRuntimeCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END aiplatform_v1beta1_generated_NotebookService_StartNotebookRuntime_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/startnotebookruntime/AsyncStartNotebookRuntimeLRO.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/startnotebookruntime/AsyncStartNotebookRuntimeLRO.java new file mode 100644 index 000000000000..45f294e929da --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/startnotebookruntime/AsyncStartNotebookRuntimeLRO.java @@ -0,0 +1,53 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_NotebookService_StartNotebookRuntime_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.aiplatform.v1beta1.NotebookRuntimeName; +import com.google.cloud.aiplatform.v1beta1.NotebookServiceClient; +import com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeOperationMetadata; +import com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeRequest; +import com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeResponse; + +public class AsyncStartNotebookRuntimeLRO { + + public static void main(String[] args) throws Exception { + asyncStartNotebookRuntimeLRO(); + } + + public static void asyncStartNotebookRuntimeLRO() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + StartNotebookRuntimeRequest request = + StartNotebookRuntimeRequest.newBuilder() + .setName( + NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]") + .toString()) + .build(); + OperationFuture future = + notebookServiceClient.startNotebookRuntimeOperationCallable().futureCall(request); + // Do something. + StartNotebookRuntimeResponse response = future.get(); + } + } +} +// [END aiplatform_v1beta1_generated_NotebookService_StartNotebookRuntime_LRO_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/startnotebookruntime/SyncStartNotebookRuntime.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/startnotebookruntime/SyncStartNotebookRuntime.java new file mode 100644 index 000000000000..522282ab6a80 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/startnotebookruntime/SyncStartNotebookRuntime.java @@ -0,0 +1,49 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_NotebookService_StartNotebookRuntime_sync] +import com.google.cloud.aiplatform.v1beta1.NotebookRuntimeName; +import com.google.cloud.aiplatform.v1beta1.NotebookServiceClient; +import com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeRequest; +import com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeResponse; + +public class SyncStartNotebookRuntime { + + public static void main(String[] args) throws Exception { + syncStartNotebookRuntime(); + } + + public static void syncStartNotebookRuntime() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + StartNotebookRuntimeRequest request = + StartNotebookRuntimeRequest.newBuilder() + .setName( + NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]") + .toString()) + .build(); + StartNotebookRuntimeResponse response = + notebookServiceClient.startNotebookRuntimeAsync(request).get(); + } + } +} +// [END aiplatform_v1beta1_generated_NotebookService_StartNotebookRuntime_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/startnotebookruntime/SyncStartNotebookRuntimeNotebookruntimename.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/startnotebookruntime/SyncStartNotebookRuntimeNotebookruntimename.java new file mode 100644 index 000000000000..9c74c5474875 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/startnotebookruntime/SyncStartNotebookRuntimeNotebookruntimename.java @@ -0,0 +1,44 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_NotebookService_StartNotebookRuntime_Notebookruntimename_sync] +import com.google.cloud.aiplatform.v1beta1.NotebookRuntimeName; +import com.google.cloud.aiplatform.v1beta1.NotebookServiceClient; +import com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeResponse; + +public class SyncStartNotebookRuntimeNotebookruntimename { + + public static void main(String[] args) throws Exception { + syncStartNotebookRuntimeNotebookruntimename(); + } + + public static void syncStartNotebookRuntimeNotebookruntimename() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + NotebookRuntimeName name = + NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]"); + StartNotebookRuntimeResponse response = + notebookServiceClient.startNotebookRuntimeAsync(name).get(); + } + } +} +// [END aiplatform_v1beta1_generated_NotebookService_StartNotebookRuntime_Notebookruntimename_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/startnotebookruntime/SyncStartNotebookRuntimeString.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/startnotebookruntime/SyncStartNotebookRuntimeString.java new file mode 100644 index 000000000000..71c2a73e4666 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/startnotebookruntime/SyncStartNotebookRuntimeString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_NotebookService_StartNotebookRuntime_String_sync] +import com.google.cloud.aiplatform.v1beta1.NotebookRuntimeName; +import com.google.cloud.aiplatform.v1beta1.NotebookServiceClient; +import com.google.cloud.aiplatform.v1beta1.StartNotebookRuntimeResponse; + +public class SyncStartNotebookRuntimeString { + + public static void main(String[] args) throws Exception { + syncStartNotebookRuntimeString(); + } + + public static void syncStartNotebookRuntimeString() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + String name = + NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]").toString(); + StartNotebookRuntimeResponse response = + notebookServiceClient.startNotebookRuntimeAsync(name).get(); + } + } +} +// [END aiplatform_v1beta1_generated_NotebookService_StartNotebookRuntime_String_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/testiampermissions/AsyncTestIamPermissions.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/testiampermissions/AsyncTestIamPermissions.java new file mode 100644 index 000000000000..78f8899ff01d --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/testiampermissions/AsyncTestIamPermissions.java @@ -0,0 +1,55 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_NotebookService_TestIamPermissions_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1beta1.EndpointName; +import com.google.cloud.aiplatform.v1beta1.NotebookServiceClient; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import java.util.ArrayList; + +public class AsyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + asyncTestIamPermissions(); + } + + public static void asyncTestIamPermissions() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .addAllPermissions(new ArrayList()) + .build(); + ApiFuture future = + notebookServiceClient.testIamPermissionsCallable().futureCall(request); + // Do something. + TestIamPermissionsResponse response = future.get(); + } + } +} +// [END aiplatform_v1beta1_generated_NotebookService_TestIamPermissions_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/testiampermissions/SyncTestIamPermissions.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/testiampermissions/SyncTestIamPermissions.java new file mode 100644 index 000000000000..81647509414c --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/testiampermissions/SyncTestIamPermissions.java @@ -0,0 +1,51 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_NotebookService_TestIamPermissions_sync] +import com.google.cloud.aiplatform.v1beta1.EndpointName; +import com.google.cloud.aiplatform.v1beta1.NotebookServiceClient; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import java.util.ArrayList; + +public class SyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + syncTestIamPermissions(); + } + + public static void syncTestIamPermissions() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .addAllPermissions(new ArrayList()) + .build(); + TestIamPermissionsResponse response = notebookServiceClient.testIamPermissions(request); + } + } +} +// [END aiplatform_v1beta1_generated_NotebookService_TestIamPermissions_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/upgradenotebookruntime/AsyncUpgradeNotebookRuntime.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/upgradenotebookruntime/AsyncUpgradeNotebookRuntime.java new file mode 100644 index 000000000000..8840447f0e2f --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/upgradenotebookruntime/AsyncUpgradeNotebookRuntime.java @@ -0,0 +1,52 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_NotebookService_UpgradeNotebookRuntime_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1beta1.NotebookRuntimeName; +import com.google.cloud.aiplatform.v1beta1.NotebookServiceClient; +import com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeRequest; +import com.google.longrunning.Operation; + +public class AsyncUpgradeNotebookRuntime { + + public static void main(String[] args) throws Exception { + asyncUpgradeNotebookRuntime(); + } + + public static void asyncUpgradeNotebookRuntime() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + UpgradeNotebookRuntimeRequest request = + UpgradeNotebookRuntimeRequest.newBuilder() + .setName( + NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]") + .toString()) + .build(); + ApiFuture future = + notebookServiceClient.upgradeNotebookRuntimeCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END aiplatform_v1beta1_generated_NotebookService_UpgradeNotebookRuntime_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/upgradenotebookruntime/AsyncUpgradeNotebookRuntimeLRO.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/upgradenotebookruntime/AsyncUpgradeNotebookRuntimeLRO.java new file mode 100644 index 000000000000..fea370bce2ae --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/upgradenotebookruntime/AsyncUpgradeNotebookRuntimeLRO.java @@ -0,0 +1,54 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_NotebookService_UpgradeNotebookRuntime_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.aiplatform.v1beta1.NotebookRuntimeName; +import com.google.cloud.aiplatform.v1beta1.NotebookServiceClient; +import com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeOperationMetadata; +import com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeRequest; +import com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeResponse; + +public class AsyncUpgradeNotebookRuntimeLRO { + + public static void main(String[] args) throws Exception { + asyncUpgradeNotebookRuntimeLRO(); + } + + public static void asyncUpgradeNotebookRuntimeLRO() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + UpgradeNotebookRuntimeRequest request = + UpgradeNotebookRuntimeRequest.newBuilder() + .setName( + NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]") + .toString()) + .build(); + OperationFuture + future = + notebookServiceClient.upgradeNotebookRuntimeOperationCallable().futureCall(request); + // Do something. + UpgradeNotebookRuntimeResponse response = future.get(); + } + } +} +// [END aiplatform_v1beta1_generated_NotebookService_UpgradeNotebookRuntime_LRO_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/upgradenotebookruntime/SyncUpgradeNotebookRuntime.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/upgradenotebookruntime/SyncUpgradeNotebookRuntime.java new file mode 100644 index 000000000000..8864a63bb108 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/upgradenotebookruntime/SyncUpgradeNotebookRuntime.java @@ -0,0 +1,49 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_NotebookService_UpgradeNotebookRuntime_sync] +import com.google.cloud.aiplatform.v1beta1.NotebookRuntimeName; +import com.google.cloud.aiplatform.v1beta1.NotebookServiceClient; +import com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeRequest; +import com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeResponse; + +public class SyncUpgradeNotebookRuntime { + + public static void main(String[] args) throws Exception { + syncUpgradeNotebookRuntime(); + } + + public static void syncUpgradeNotebookRuntime() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + UpgradeNotebookRuntimeRequest request = + UpgradeNotebookRuntimeRequest.newBuilder() + .setName( + NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]") + .toString()) + .build(); + UpgradeNotebookRuntimeResponse response = + notebookServiceClient.upgradeNotebookRuntimeAsync(request).get(); + } + } +} +// [END aiplatform_v1beta1_generated_NotebookService_UpgradeNotebookRuntime_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/upgradenotebookruntime/SyncUpgradeNotebookRuntimeNotebookruntimename.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/upgradenotebookruntime/SyncUpgradeNotebookRuntimeNotebookruntimename.java new file mode 100644 index 000000000000..501294612151 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/upgradenotebookruntime/SyncUpgradeNotebookRuntimeNotebookruntimename.java @@ -0,0 +1,44 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_NotebookService_UpgradeNotebookRuntime_Notebookruntimename_sync] +import com.google.cloud.aiplatform.v1beta1.NotebookRuntimeName; +import com.google.cloud.aiplatform.v1beta1.NotebookServiceClient; +import com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeResponse; + +public class SyncUpgradeNotebookRuntimeNotebookruntimename { + + public static void main(String[] args) throws Exception { + syncUpgradeNotebookRuntimeNotebookruntimename(); + } + + public static void syncUpgradeNotebookRuntimeNotebookruntimename() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + NotebookRuntimeName name = + NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]"); + UpgradeNotebookRuntimeResponse response = + notebookServiceClient.upgradeNotebookRuntimeAsync(name).get(); + } + } +} +// [END aiplatform_v1beta1_generated_NotebookService_UpgradeNotebookRuntime_Notebookruntimename_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/upgradenotebookruntime/SyncUpgradeNotebookRuntimeString.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/upgradenotebookruntime/SyncUpgradeNotebookRuntimeString.java new file mode 100644 index 000000000000..5409c93a1bea --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservice/upgradenotebookruntime/SyncUpgradeNotebookRuntimeString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_NotebookService_UpgradeNotebookRuntime_String_sync] +import com.google.cloud.aiplatform.v1beta1.NotebookRuntimeName; +import com.google.cloud.aiplatform.v1beta1.NotebookServiceClient; +import com.google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeResponse; + +public class SyncUpgradeNotebookRuntimeString { + + public static void main(String[] args) throws Exception { + syncUpgradeNotebookRuntimeString(); + } + + public static void syncUpgradeNotebookRuntimeString() throws Exception { + // 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 (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) { + String name = + NotebookRuntimeName.of("[PROJECT]", "[LOCATION]", "[NOTEBOOK_RUNTIME]").toString(); + UpgradeNotebookRuntimeResponse response = + notebookServiceClient.upgradeNotebookRuntimeAsync(name).get(); + } + } +} +// [END aiplatform_v1beta1_generated_NotebookService_UpgradeNotebookRuntime_String_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservicesettings/getnotebookruntimetemplate/SyncGetNotebookRuntimeTemplate.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservicesettings/getnotebookruntimetemplate/SyncGetNotebookRuntimeTemplate.java new file mode 100644 index 000000000000..48c408923ac7 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/notebookservicesettings/getnotebookruntimetemplate/SyncGetNotebookRuntimeTemplate.java @@ -0,0 +1,49 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_NotebookServiceSettings_GetNotebookRuntimeTemplate_sync] +import com.google.cloud.aiplatform.v1beta1.NotebookServiceSettings; +import java.time.Duration; + +public class SyncGetNotebookRuntimeTemplate { + + public static void main(String[] args) throws Exception { + syncGetNotebookRuntimeTemplate(); + } + + public static void syncGetNotebookRuntimeTemplate() throws Exception { + // 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 + NotebookServiceSettings.Builder notebookServiceSettingsBuilder = + NotebookServiceSettings.newBuilder(); + notebookServiceSettingsBuilder + .getNotebookRuntimeTemplateSettings() + .setRetrySettings( + notebookServiceSettingsBuilder + .getNotebookRuntimeTemplateSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + NotebookServiceSettings notebookServiceSettings = notebookServiceSettingsBuilder.build(); + } +} +// [END aiplatform_v1beta1_generated_NotebookServiceSettings_GetNotebookRuntimeTemplate_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/persistentresourceservice/rebootpersistentresource/AsyncRebootPersistentResource.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/persistentresourceservice/rebootpersistentresource/AsyncRebootPersistentResource.java new file mode 100644 index 000000000000..f4ea137373eb --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/persistentresourceservice/rebootpersistentresource/AsyncRebootPersistentResource.java @@ -0,0 +1,53 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_PersistentResourceService_RebootPersistentResource_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1beta1.PersistentResourceName; +import com.google.cloud.aiplatform.v1beta1.PersistentResourceServiceClient; +import com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceRequest; +import com.google.longrunning.Operation; + +public class AsyncRebootPersistentResource { + + public static void main(String[] args) throws Exception { + asyncRebootPersistentResource(); + } + + public static void asyncRebootPersistentResource() throws Exception { + // 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 (PersistentResourceServiceClient persistentResourceServiceClient = + PersistentResourceServiceClient.create()) { + RebootPersistentResourceRequest request = + RebootPersistentResourceRequest.newBuilder() + .setName( + PersistentResourceName.of("[PROJECT]", "[LOCATION]", "[PERSISTENT_RESOURCE]") + .toString()) + .build(); + ApiFuture future = + persistentResourceServiceClient.rebootPersistentResourceCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END aiplatform_v1beta1_generated_PersistentResourceService_RebootPersistentResource_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/persistentresourceservice/rebootpersistentresource/AsyncRebootPersistentResourceLRO.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/persistentresourceservice/rebootpersistentresource/AsyncRebootPersistentResourceLRO.java new file mode 100644 index 000000000000..c853cb61c8b6 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/persistentresourceservice/rebootpersistentresource/AsyncRebootPersistentResourceLRO.java @@ -0,0 +1,56 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_PersistentResourceService_RebootPersistentResource_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.aiplatform.v1beta1.PersistentResource; +import com.google.cloud.aiplatform.v1beta1.PersistentResourceName; +import com.google.cloud.aiplatform.v1beta1.PersistentResourceServiceClient; +import com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceOperationMetadata; +import com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceRequest; + +public class AsyncRebootPersistentResourceLRO { + + public static void main(String[] args) throws Exception { + asyncRebootPersistentResourceLRO(); + } + + public static void asyncRebootPersistentResourceLRO() throws Exception { + // 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 (PersistentResourceServiceClient persistentResourceServiceClient = + PersistentResourceServiceClient.create()) { + RebootPersistentResourceRequest request = + RebootPersistentResourceRequest.newBuilder() + .setName( + PersistentResourceName.of("[PROJECT]", "[LOCATION]", "[PERSISTENT_RESOURCE]") + .toString()) + .build(); + OperationFuture future = + persistentResourceServiceClient + .rebootPersistentResourceOperationCallable() + .futureCall(request); + // Do something. + PersistentResource response = future.get(); + } + } +} +// [END aiplatform_v1beta1_generated_PersistentResourceService_RebootPersistentResource_LRO_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/persistentresourceservice/rebootpersistentresource/SyncRebootPersistentResource.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/persistentresourceservice/rebootpersistentresource/SyncRebootPersistentResource.java new file mode 100644 index 000000000000..eb45b6d0fa76 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/persistentresourceservice/rebootpersistentresource/SyncRebootPersistentResource.java @@ -0,0 +1,50 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_PersistentResourceService_RebootPersistentResource_sync] +import com.google.cloud.aiplatform.v1beta1.PersistentResource; +import com.google.cloud.aiplatform.v1beta1.PersistentResourceName; +import com.google.cloud.aiplatform.v1beta1.PersistentResourceServiceClient; +import com.google.cloud.aiplatform.v1beta1.RebootPersistentResourceRequest; + +public class SyncRebootPersistentResource { + + public static void main(String[] args) throws Exception { + syncRebootPersistentResource(); + } + + public static void syncRebootPersistentResource() throws Exception { + // 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 (PersistentResourceServiceClient persistentResourceServiceClient = + PersistentResourceServiceClient.create()) { + RebootPersistentResourceRequest request = + RebootPersistentResourceRequest.newBuilder() + .setName( + PersistentResourceName.of("[PROJECT]", "[LOCATION]", "[PERSISTENT_RESOURCE]") + .toString()) + .build(); + PersistentResource response = + persistentResourceServiceClient.rebootPersistentResourceAsync(request).get(); + } + } +} +// [END aiplatform_v1beta1_generated_PersistentResourceService_RebootPersistentResource_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/persistentresourceservice/rebootpersistentresource/SyncRebootPersistentResourcePersistentresourcename.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/persistentresourceservice/rebootpersistentresource/SyncRebootPersistentResourcePersistentresourcename.java new file mode 100644 index 000000000000..17c88f60a583 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/persistentresourceservice/rebootpersistentresource/SyncRebootPersistentResourcePersistentresourcename.java @@ -0,0 +1,45 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_PersistentResourceService_RebootPersistentResource_Persistentresourcename_sync] +import com.google.cloud.aiplatform.v1beta1.PersistentResource; +import com.google.cloud.aiplatform.v1beta1.PersistentResourceName; +import com.google.cloud.aiplatform.v1beta1.PersistentResourceServiceClient; + +public class SyncRebootPersistentResourcePersistentresourcename { + + public static void main(String[] args) throws Exception { + syncRebootPersistentResourcePersistentresourcename(); + } + + public static void syncRebootPersistentResourcePersistentresourcename() throws Exception { + // 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 (PersistentResourceServiceClient persistentResourceServiceClient = + PersistentResourceServiceClient.create()) { + PersistentResourceName name = + PersistentResourceName.of("[PROJECT]", "[LOCATION]", "[PERSISTENT_RESOURCE]"); + PersistentResource response = + persistentResourceServiceClient.rebootPersistentResourceAsync(name).get(); + } + } +} +// [END aiplatform_v1beta1_generated_PersistentResourceService_RebootPersistentResource_Persistentresourcename_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/persistentresourceservice/rebootpersistentresource/SyncRebootPersistentResourceString.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/persistentresourceservice/rebootpersistentresource/SyncRebootPersistentResourceString.java new file mode 100644 index 000000000000..a46a420eea35 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/persistentresourceservice/rebootpersistentresource/SyncRebootPersistentResourceString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_PersistentResourceService_RebootPersistentResource_String_sync] +import com.google.cloud.aiplatform.v1beta1.PersistentResource; +import com.google.cloud.aiplatform.v1beta1.PersistentResourceName; +import com.google.cloud.aiplatform.v1beta1.PersistentResourceServiceClient; + +public class SyncRebootPersistentResourceString { + + public static void main(String[] args) throws Exception { + syncRebootPersistentResourceString(); + } + + public static void syncRebootPersistentResourceString() throws Exception { + // 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 (PersistentResourceServiceClient persistentResourceServiceClient = + PersistentResourceServiceClient.create()) { + String name = + PersistentResourceName.of("[PROJECT]", "[LOCATION]", "[PERSISTENT_RESOURCE]").toString(); + PersistentResource response = + persistentResourceServiceClient.rebootPersistentResourceAsync(name).get(); + } + } +} +// [END aiplatform_v1beta1_generated_PersistentResourceService_RebootPersistentResource_String_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/predictionservice/chatcompletions/AsyncChatCompletions.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/predictionservice/chatcompletions/AsyncChatCompletions.java new file mode 100644 index 000000000000..89c57ec97f11 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/predictionservice/chatcompletions/AsyncChatCompletions.java @@ -0,0 +1,55 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_PredictionService_ChatCompletions_async] +import com.google.api.HttpBody; +import com.google.api.gax.rpc.ServerStream; +import com.google.cloud.aiplatform.v1beta1.ChatCompletionsRequest; +import com.google.cloud.aiplatform.v1beta1.EndpointName; +import com.google.cloud.aiplatform.v1beta1.PredictionServiceClient; + +public class AsyncChatCompletions { + + public static void main(String[] args) throws Exception { + asyncChatCompletions(); + } + + public static void asyncChatCompletions() throws Exception { + // 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 (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) { + ChatCompletionsRequest request = + ChatCompletionsRequest.newBuilder() + .setEndpoint( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setHttpBody(HttpBody.newBuilder().build()) + .build(); + ServerStream stream = + predictionServiceClient.chatCompletionsCallable().call(request); + for (HttpBody response : stream) { + // Do something when a response is received. + } + } + } +} +// [END aiplatform_v1beta1_generated_PredictionService_ChatCompletions_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/predictionservice/generatecontent/AsyncGenerateContent.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/predictionservice/generatecontent/AsyncGenerateContent.java index 62413499fe2a..a09bfd95a324 100644 --- a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/predictionservice/generatecontent/AsyncGenerateContent.java +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/predictionservice/generatecontent/AsyncGenerateContent.java @@ -45,6 +45,7 @@ public static void asyncGenerateContent() throws Exception { GenerateContentRequest.newBuilder() .setModel("model104069929") .addAllContents(new ArrayList()) + .setSystemInstruction(Content.newBuilder().build()) .addAllTools(new ArrayList()) .setToolConfig(ToolConfig.newBuilder().build()) .addAllSafetySettings(new ArrayList()) diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/predictionservice/generatecontent/SyncGenerateContent.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/predictionservice/generatecontent/SyncGenerateContent.java index 0c99e763201b..cd47f5051d3f 100644 --- a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/predictionservice/generatecontent/SyncGenerateContent.java +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/predictionservice/generatecontent/SyncGenerateContent.java @@ -44,6 +44,7 @@ public static void syncGenerateContent() throws Exception { GenerateContentRequest.newBuilder() .setModel("model104069929") .addAllContents(new ArrayList()) + .setSystemInstruction(Content.newBuilder().build()) .addAllTools(new ArrayList()) .setToolConfig(ToolConfig.newBuilder().build()) .addAllSafetySettings(new ArrayList()) diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/predictionservice/streamgeneratecontent/AsyncStreamGenerateContent.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/predictionservice/streamgeneratecontent/AsyncStreamGenerateContent.java index d3c321546db5..9a91d08b928d 100644 --- a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/predictionservice/streamgeneratecontent/AsyncStreamGenerateContent.java +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/predictionservice/streamgeneratecontent/AsyncStreamGenerateContent.java @@ -45,6 +45,7 @@ public static void asyncStreamGenerateContent() throws Exception { GenerateContentRequest.newBuilder() .setModel("model104069929") .addAllContents(new ArrayList()) + .setSystemInstruction(Content.newBuilder().build()) .addAllTools(new ArrayList()) .setToolConfig(ToolConfig.newBuilder().build()) .addAllSafetySettings(new ArrayList()) diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/stub/notebookservicestubsettings/getnotebookruntimetemplate/SyncGetNotebookRuntimeTemplate.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/stub/notebookservicestubsettings/getnotebookruntimetemplate/SyncGetNotebookRuntimeTemplate.java new file mode 100644 index 000000000000..6b497775ff81 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/stub/notebookservicestubsettings/getnotebookruntimetemplate/SyncGetNotebookRuntimeTemplate.java @@ -0,0 +1,49 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.stub.samples; + +// [START aiplatform_v1beta1_generated_NotebookServiceStubSettings_GetNotebookRuntimeTemplate_sync] +import com.google.cloud.aiplatform.v1beta1.stub.NotebookServiceStubSettings; +import java.time.Duration; + +public class SyncGetNotebookRuntimeTemplate { + + public static void main(String[] args) throws Exception { + syncGetNotebookRuntimeTemplate(); + } + + public static void syncGetNotebookRuntimeTemplate() throws Exception { + // 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 + NotebookServiceStubSettings.Builder notebookServiceSettingsBuilder = + NotebookServiceStubSettings.newBuilder(); + notebookServiceSettingsBuilder + .getNotebookRuntimeTemplateSettings() + .setRetrySettings( + notebookServiceSettingsBuilder + .getNotebookRuntimeTemplateSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + NotebookServiceStubSettings notebookServiceSettings = notebookServiceSettingsBuilder.build(); + } +} +// [END aiplatform_v1beta1_generated_NotebookServiceStubSettings_GetNotebookRuntimeTemplate_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/stub/vertexragdataservicestubsettings/getragcorpus/SyncGetRagCorpus.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/stub/vertexragdataservicestubsettings/getragcorpus/SyncGetRagCorpus.java new file mode 100644 index 000000000000..cf9bf36bc54d --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/stub/vertexragdataservicestubsettings/getragcorpus/SyncGetRagCorpus.java @@ -0,0 +1,50 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.stub.samples; + +// [START aiplatform_v1beta1_generated_VertexRagDataServiceStubSettings_GetRagCorpus_sync] +import com.google.cloud.aiplatform.v1beta1.stub.VertexRagDataServiceStubSettings; +import java.time.Duration; + +public class SyncGetRagCorpus { + + public static void main(String[] args) throws Exception { + syncGetRagCorpus(); + } + + public static void syncGetRagCorpus() throws Exception { + // 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 + VertexRagDataServiceStubSettings.Builder vertexRagDataServiceSettingsBuilder = + VertexRagDataServiceStubSettings.newBuilder(); + vertexRagDataServiceSettingsBuilder + .getRagCorpusSettings() + .setRetrySettings( + vertexRagDataServiceSettingsBuilder + .getRagCorpusSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + VertexRagDataServiceStubSettings vertexRagDataServiceSettings = + vertexRagDataServiceSettingsBuilder.build(); + } +} +// [END aiplatform_v1beta1_generated_VertexRagDataServiceStubSettings_GetRagCorpus_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/stub/vertexragservicestubsettings/retrievecontexts/SyncRetrieveContexts.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/stub/vertexragservicestubsettings/retrievecontexts/SyncRetrieveContexts.java new file mode 100644 index 000000000000..af4ff12adaca --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/stub/vertexragservicestubsettings/retrievecontexts/SyncRetrieveContexts.java @@ -0,0 +1,49 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.stub.samples; + +// [START aiplatform_v1beta1_generated_VertexRagServiceStubSettings_RetrieveContexts_sync] +import com.google.cloud.aiplatform.v1beta1.stub.VertexRagServiceStubSettings; +import java.time.Duration; + +public class SyncRetrieveContexts { + + public static void main(String[] args) throws Exception { + syncRetrieveContexts(); + } + + public static void syncRetrieveContexts() throws Exception { + // 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 + VertexRagServiceStubSettings.Builder vertexRagServiceSettingsBuilder = + VertexRagServiceStubSettings.newBuilder(); + vertexRagServiceSettingsBuilder + .retrieveContextsSettings() + .setRetrySettings( + vertexRagServiceSettingsBuilder + .retrieveContextsSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + VertexRagServiceStubSettings vertexRagServiceSettings = vertexRagServiceSettingsBuilder.build(); + } +} +// [END aiplatform_v1beta1_generated_VertexRagServiceStubSettings_RetrieveContexts_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/create/SyncCreateSetCredentialsProvider.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..b5766dfef2ea --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,45 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_VertexRagDataService_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceClient; +import com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceSettings; +import com.google.cloud.aiplatform.v1beta1.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // 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 + VertexRagDataServiceSettings vertexRagDataServiceSettings = + VertexRagDataServiceSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + VertexRagDataServiceClient vertexRagDataServiceClient = + VertexRagDataServiceClient.create(vertexRagDataServiceSettings); + } +} +// [END aiplatform_v1beta1_generated_VertexRagDataService_Create_SetCredentialsProvider_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/create/SyncCreateSetEndpoint.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..1536bab4e516 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_VertexRagDataService_Create_SetEndpoint_sync] +import com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceClient; +import com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceSettings; +import com.google.cloud.aiplatform.v1beta1.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // 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 + VertexRagDataServiceSettings vertexRagDataServiceSettings = + VertexRagDataServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); + VertexRagDataServiceClient vertexRagDataServiceClient = + VertexRagDataServiceClient.create(vertexRagDataServiceSettings); + } +} +// [END aiplatform_v1beta1_generated_VertexRagDataService_Create_SetEndpoint_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/createragcorpus/AsyncCreateRagCorpus.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/createragcorpus/AsyncCreateRagCorpus.java new file mode 100644 index 000000000000..7cf38f85ee5a --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/createragcorpus/AsyncCreateRagCorpus.java @@ -0,0 +1,53 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_VertexRagDataService_CreateRagCorpus_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1beta1.CreateRagCorpusRequest; +import com.google.cloud.aiplatform.v1beta1.LocationName; +import com.google.cloud.aiplatform.v1beta1.RagCorpus; +import com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceClient; +import com.google.longrunning.Operation; + +public class AsyncCreateRagCorpus { + + public static void main(String[] args) throws Exception { + asyncCreateRagCorpus(); + } + + public static void asyncCreateRagCorpus() throws Exception { + // 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 (VertexRagDataServiceClient vertexRagDataServiceClient = + VertexRagDataServiceClient.create()) { + CreateRagCorpusRequest request = + CreateRagCorpusRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setRagCorpus(RagCorpus.newBuilder().build()) + .build(); + ApiFuture future = + vertexRagDataServiceClient.createRagCorpusCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END aiplatform_v1beta1_generated_VertexRagDataService_CreateRagCorpus_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/createragcorpus/AsyncCreateRagCorpusLRO.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/createragcorpus/AsyncCreateRagCorpusLRO.java new file mode 100644 index 000000000000..26345981f3bb --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/createragcorpus/AsyncCreateRagCorpusLRO.java @@ -0,0 +1,53 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_VertexRagDataService_CreateRagCorpus_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.aiplatform.v1beta1.CreateRagCorpusOperationMetadata; +import com.google.cloud.aiplatform.v1beta1.CreateRagCorpusRequest; +import com.google.cloud.aiplatform.v1beta1.LocationName; +import com.google.cloud.aiplatform.v1beta1.RagCorpus; +import com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceClient; + +public class AsyncCreateRagCorpusLRO { + + public static void main(String[] args) throws Exception { + asyncCreateRagCorpusLRO(); + } + + public static void asyncCreateRagCorpusLRO() throws Exception { + // 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 (VertexRagDataServiceClient vertexRagDataServiceClient = + VertexRagDataServiceClient.create()) { + CreateRagCorpusRequest request = + CreateRagCorpusRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setRagCorpus(RagCorpus.newBuilder().build()) + .build(); + OperationFuture future = + vertexRagDataServiceClient.createRagCorpusOperationCallable().futureCall(request); + // Do something. + RagCorpus response = future.get(); + } + } +} +// [END aiplatform_v1beta1_generated_VertexRagDataService_CreateRagCorpus_LRO_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/createragcorpus/SyncCreateRagCorpus.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/createragcorpus/SyncCreateRagCorpus.java new file mode 100644 index 000000000000..88b853621a5d --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/createragcorpus/SyncCreateRagCorpus.java @@ -0,0 +1,48 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_VertexRagDataService_CreateRagCorpus_sync] +import com.google.cloud.aiplatform.v1beta1.CreateRagCorpusRequest; +import com.google.cloud.aiplatform.v1beta1.LocationName; +import com.google.cloud.aiplatform.v1beta1.RagCorpus; +import com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceClient; + +public class SyncCreateRagCorpus { + + public static void main(String[] args) throws Exception { + syncCreateRagCorpus(); + } + + public static void syncCreateRagCorpus() throws Exception { + // 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 (VertexRagDataServiceClient vertexRagDataServiceClient = + VertexRagDataServiceClient.create()) { + CreateRagCorpusRequest request = + CreateRagCorpusRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setRagCorpus(RagCorpus.newBuilder().build()) + .build(); + RagCorpus response = vertexRagDataServiceClient.createRagCorpusAsync(request).get(); + } + } +} +// [END aiplatform_v1beta1_generated_VertexRagDataService_CreateRagCorpus_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/createragcorpus/SyncCreateRagCorpusLocationnameRagcorpus.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/createragcorpus/SyncCreateRagCorpusLocationnameRagcorpus.java new file mode 100644 index 000000000000..4dfb04bf9007 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/createragcorpus/SyncCreateRagCorpusLocationnameRagcorpus.java @@ -0,0 +1,44 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_VertexRagDataService_CreateRagCorpus_LocationnameRagcorpus_sync] +import com.google.cloud.aiplatform.v1beta1.LocationName; +import com.google.cloud.aiplatform.v1beta1.RagCorpus; +import com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceClient; + +public class SyncCreateRagCorpusLocationnameRagcorpus { + + public static void main(String[] args) throws Exception { + syncCreateRagCorpusLocationnameRagcorpus(); + } + + public static void syncCreateRagCorpusLocationnameRagcorpus() throws Exception { + // 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 (VertexRagDataServiceClient vertexRagDataServiceClient = + VertexRagDataServiceClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + RagCorpus ragCorpus = RagCorpus.newBuilder().build(); + RagCorpus response = vertexRagDataServiceClient.createRagCorpusAsync(parent, ragCorpus).get(); + } + } +} +// [END aiplatform_v1beta1_generated_VertexRagDataService_CreateRagCorpus_LocationnameRagcorpus_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/createragcorpus/SyncCreateRagCorpusStringRagcorpus.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/createragcorpus/SyncCreateRagCorpusStringRagcorpus.java new file mode 100644 index 000000000000..81c61a347222 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/createragcorpus/SyncCreateRagCorpusStringRagcorpus.java @@ -0,0 +1,44 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_VertexRagDataService_CreateRagCorpus_StringRagcorpus_sync] +import com.google.cloud.aiplatform.v1beta1.LocationName; +import com.google.cloud.aiplatform.v1beta1.RagCorpus; +import com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceClient; + +public class SyncCreateRagCorpusStringRagcorpus { + + public static void main(String[] args) throws Exception { + syncCreateRagCorpusStringRagcorpus(); + } + + public static void syncCreateRagCorpusStringRagcorpus() throws Exception { + // 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 (VertexRagDataServiceClient vertexRagDataServiceClient = + VertexRagDataServiceClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + RagCorpus ragCorpus = RagCorpus.newBuilder().build(); + RagCorpus response = vertexRagDataServiceClient.createRagCorpusAsync(parent, ragCorpus).get(); + } + } +} +// [END aiplatform_v1beta1_generated_VertexRagDataService_CreateRagCorpus_StringRagcorpus_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/deleteragcorpus/AsyncDeleteRagCorpus.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/deleteragcorpus/AsyncDeleteRagCorpus.java new file mode 100644 index 000000000000..058b194063e7 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/deleteragcorpus/AsyncDeleteRagCorpus.java @@ -0,0 +1,52 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_VertexRagDataService_DeleteRagCorpus_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1beta1.DeleteRagCorpusRequest; +import com.google.cloud.aiplatform.v1beta1.RagCorpusName; +import com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceClient; +import com.google.longrunning.Operation; + +public class AsyncDeleteRagCorpus { + + public static void main(String[] args) throws Exception { + asyncDeleteRagCorpus(); + } + + public static void asyncDeleteRagCorpus() throws Exception { + // 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 (VertexRagDataServiceClient vertexRagDataServiceClient = + VertexRagDataServiceClient.create()) { + DeleteRagCorpusRequest request = + DeleteRagCorpusRequest.newBuilder() + .setName(RagCorpusName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]").toString()) + .setForce(true) + .build(); + ApiFuture future = + vertexRagDataServiceClient.deleteRagCorpusCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END aiplatform_v1beta1_generated_VertexRagDataService_DeleteRagCorpus_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/deleteragcorpus/AsyncDeleteRagCorpusLRO.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/deleteragcorpus/AsyncDeleteRagCorpusLRO.java new file mode 100644 index 000000000000..b488da15790d --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/deleteragcorpus/AsyncDeleteRagCorpusLRO.java @@ -0,0 +1,53 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_VertexRagDataService_DeleteRagCorpus_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.aiplatform.v1beta1.DeleteOperationMetadata; +import com.google.cloud.aiplatform.v1beta1.DeleteRagCorpusRequest; +import com.google.cloud.aiplatform.v1beta1.RagCorpusName; +import com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceClient; +import com.google.protobuf.Empty; + +public class AsyncDeleteRagCorpusLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteRagCorpusLRO(); + } + + public static void asyncDeleteRagCorpusLRO() throws Exception { + // 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 (VertexRagDataServiceClient vertexRagDataServiceClient = + VertexRagDataServiceClient.create()) { + DeleteRagCorpusRequest request = + DeleteRagCorpusRequest.newBuilder() + .setName(RagCorpusName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]").toString()) + .setForce(true) + .build(); + OperationFuture future = + vertexRagDataServiceClient.deleteRagCorpusOperationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END aiplatform_v1beta1_generated_VertexRagDataService_DeleteRagCorpus_LRO_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/deleteragcorpus/SyncDeleteRagCorpus.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/deleteragcorpus/SyncDeleteRagCorpus.java new file mode 100644 index 000000000000..8bb9a331ae7e --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/deleteragcorpus/SyncDeleteRagCorpus.java @@ -0,0 +1,48 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_VertexRagDataService_DeleteRagCorpus_sync] +import com.google.cloud.aiplatform.v1beta1.DeleteRagCorpusRequest; +import com.google.cloud.aiplatform.v1beta1.RagCorpusName; +import com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceClient; +import com.google.protobuf.Empty; + +public class SyncDeleteRagCorpus { + + public static void main(String[] args) throws Exception { + syncDeleteRagCorpus(); + } + + public static void syncDeleteRagCorpus() throws Exception { + // 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 (VertexRagDataServiceClient vertexRagDataServiceClient = + VertexRagDataServiceClient.create()) { + DeleteRagCorpusRequest request = + DeleteRagCorpusRequest.newBuilder() + .setName(RagCorpusName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]").toString()) + .setForce(true) + .build(); + vertexRagDataServiceClient.deleteRagCorpusAsync(request).get(); + } + } +} +// [END aiplatform_v1beta1_generated_VertexRagDataService_DeleteRagCorpus_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/deleteragcorpus/SyncDeleteRagCorpusRagcorpusname.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/deleteragcorpus/SyncDeleteRagCorpusRagcorpusname.java new file mode 100644 index 000000000000..ca3e76c8573f --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/deleteragcorpus/SyncDeleteRagCorpusRagcorpusname.java @@ -0,0 +1,43 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_VertexRagDataService_DeleteRagCorpus_Ragcorpusname_sync] +import com.google.cloud.aiplatform.v1beta1.RagCorpusName; +import com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceClient; +import com.google.protobuf.Empty; + +public class SyncDeleteRagCorpusRagcorpusname { + + public static void main(String[] args) throws Exception { + syncDeleteRagCorpusRagcorpusname(); + } + + public static void syncDeleteRagCorpusRagcorpusname() throws Exception { + // 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 (VertexRagDataServiceClient vertexRagDataServiceClient = + VertexRagDataServiceClient.create()) { + RagCorpusName name = RagCorpusName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]"); + vertexRagDataServiceClient.deleteRagCorpusAsync(name).get(); + } + } +} +// [END aiplatform_v1beta1_generated_VertexRagDataService_DeleteRagCorpus_Ragcorpusname_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/deleteragcorpus/SyncDeleteRagCorpusString.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/deleteragcorpus/SyncDeleteRagCorpusString.java new file mode 100644 index 000000000000..b815ca2b11ab --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/deleteragcorpus/SyncDeleteRagCorpusString.java @@ -0,0 +1,43 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_VertexRagDataService_DeleteRagCorpus_String_sync] +import com.google.cloud.aiplatform.v1beta1.RagCorpusName; +import com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceClient; +import com.google.protobuf.Empty; + +public class SyncDeleteRagCorpusString { + + public static void main(String[] args) throws Exception { + syncDeleteRagCorpusString(); + } + + public static void syncDeleteRagCorpusString() throws Exception { + // 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 (VertexRagDataServiceClient vertexRagDataServiceClient = + VertexRagDataServiceClient.create()) { + String name = RagCorpusName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]").toString(); + vertexRagDataServiceClient.deleteRagCorpusAsync(name).get(); + } + } +} +// [END aiplatform_v1beta1_generated_VertexRagDataService_DeleteRagCorpus_String_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/deleteragfile/AsyncDeleteRagFile.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/deleteragfile/AsyncDeleteRagFile.java new file mode 100644 index 000000000000..b7dd0ffb9f39 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/deleteragfile/AsyncDeleteRagFile.java @@ -0,0 +1,53 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_VertexRagDataService_DeleteRagFile_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1beta1.DeleteRagFileRequest; +import com.google.cloud.aiplatform.v1beta1.RagFileName; +import com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceClient; +import com.google.longrunning.Operation; + +public class AsyncDeleteRagFile { + + public static void main(String[] args) throws Exception { + asyncDeleteRagFile(); + } + + public static void asyncDeleteRagFile() throws Exception { + // 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 (VertexRagDataServiceClient vertexRagDataServiceClient = + VertexRagDataServiceClient.create()) { + DeleteRagFileRequest request = + DeleteRagFileRequest.newBuilder() + .setName( + RagFileName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]", "[RAG_FILE]") + .toString()) + .build(); + ApiFuture future = + vertexRagDataServiceClient.deleteRagFileCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END aiplatform_v1beta1_generated_VertexRagDataService_DeleteRagFile_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/deleteragfile/AsyncDeleteRagFileLRO.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/deleteragfile/AsyncDeleteRagFileLRO.java new file mode 100644 index 000000000000..3268878bd7e7 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/deleteragfile/AsyncDeleteRagFileLRO.java @@ -0,0 +1,54 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_VertexRagDataService_DeleteRagFile_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.aiplatform.v1beta1.DeleteOperationMetadata; +import com.google.cloud.aiplatform.v1beta1.DeleteRagFileRequest; +import com.google.cloud.aiplatform.v1beta1.RagFileName; +import com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceClient; +import com.google.protobuf.Empty; + +public class AsyncDeleteRagFileLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteRagFileLRO(); + } + + public static void asyncDeleteRagFileLRO() throws Exception { + // 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 (VertexRagDataServiceClient vertexRagDataServiceClient = + VertexRagDataServiceClient.create()) { + DeleteRagFileRequest request = + DeleteRagFileRequest.newBuilder() + .setName( + RagFileName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]", "[RAG_FILE]") + .toString()) + .build(); + OperationFuture future = + vertexRagDataServiceClient.deleteRagFileOperationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END aiplatform_v1beta1_generated_VertexRagDataService_DeleteRagFile_LRO_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/deleteragfile/SyncDeleteRagFile.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/deleteragfile/SyncDeleteRagFile.java new file mode 100644 index 000000000000..f9f5996cae53 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/deleteragfile/SyncDeleteRagFile.java @@ -0,0 +1,49 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_VertexRagDataService_DeleteRagFile_sync] +import com.google.cloud.aiplatform.v1beta1.DeleteRagFileRequest; +import com.google.cloud.aiplatform.v1beta1.RagFileName; +import com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceClient; +import com.google.protobuf.Empty; + +public class SyncDeleteRagFile { + + public static void main(String[] args) throws Exception { + syncDeleteRagFile(); + } + + public static void syncDeleteRagFile() throws Exception { + // 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 (VertexRagDataServiceClient vertexRagDataServiceClient = + VertexRagDataServiceClient.create()) { + DeleteRagFileRequest request = + DeleteRagFileRequest.newBuilder() + .setName( + RagFileName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]", "[RAG_FILE]") + .toString()) + .build(); + vertexRagDataServiceClient.deleteRagFileAsync(request).get(); + } + } +} +// [END aiplatform_v1beta1_generated_VertexRagDataService_DeleteRagFile_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/deleteragfile/SyncDeleteRagFileRagfilename.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/deleteragfile/SyncDeleteRagFileRagfilename.java new file mode 100644 index 000000000000..8d8caa17b398 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/deleteragfile/SyncDeleteRagFileRagfilename.java @@ -0,0 +1,43 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_VertexRagDataService_DeleteRagFile_Ragfilename_sync] +import com.google.cloud.aiplatform.v1beta1.RagFileName; +import com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceClient; +import com.google.protobuf.Empty; + +public class SyncDeleteRagFileRagfilename { + + public static void main(String[] args) throws Exception { + syncDeleteRagFileRagfilename(); + } + + public static void syncDeleteRagFileRagfilename() throws Exception { + // 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 (VertexRagDataServiceClient vertexRagDataServiceClient = + VertexRagDataServiceClient.create()) { + RagFileName name = RagFileName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]", "[RAG_FILE]"); + vertexRagDataServiceClient.deleteRagFileAsync(name).get(); + } + } +} +// [END aiplatform_v1beta1_generated_VertexRagDataService_DeleteRagFile_Ragfilename_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/deleteragfile/SyncDeleteRagFileString.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/deleteragfile/SyncDeleteRagFileString.java new file mode 100644 index 000000000000..ff253ab2c601 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/deleteragfile/SyncDeleteRagFileString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_VertexRagDataService_DeleteRagFile_String_sync] +import com.google.cloud.aiplatform.v1beta1.RagFileName; +import com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceClient; +import com.google.protobuf.Empty; + +public class SyncDeleteRagFileString { + + public static void main(String[] args) throws Exception { + syncDeleteRagFileString(); + } + + public static void syncDeleteRagFileString() throws Exception { + // 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 (VertexRagDataServiceClient vertexRagDataServiceClient = + VertexRagDataServiceClient.create()) { + String name = + RagFileName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]", "[RAG_FILE]").toString(); + vertexRagDataServiceClient.deleteRagFileAsync(name).get(); + } + } +} +// [END aiplatform_v1beta1_generated_VertexRagDataService_DeleteRagFile_String_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/getiampolicy/AsyncGetIamPolicy.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/getiampolicy/AsyncGetIamPolicy.java new file mode 100644 index 000000000000..31a2880ab237 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/getiampolicy/AsyncGetIamPolicy.java @@ -0,0 +1,56 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_VertexRagDataService_GetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1beta1.EndpointName; +import com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceClient; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; + +public class AsyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncGetIamPolicy(); + } + + public static void asyncGetIamPolicy() throws Exception { + // 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 (VertexRagDataServiceClient vertexRagDataServiceClient = + VertexRagDataServiceClient.create()) { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + ApiFuture future = + vertexRagDataServiceClient.getIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END aiplatform_v1beta1_generated_VertexRagDataService_GetIamPolicy_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/getiampolicy/SyncGetIamPolicy.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/getiampolicy/SyncGetIamPolicy.java new file mode 100644 index 000000000000..1d07c5f838b3 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/getiampolicy/SyncGetIamPolicy.java @@ -0,0 +1,52 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_VertexRagDataService_GetIamPolicy_sync] +import com.google.cloud.aiplatform.v1beta1.EndpointName; +import com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceClient; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; + +public class SyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + syncGetIamPolicy(); + } + + public static void syncGetIamPolicy() throws Exception { + // 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 (VertexRagDataServiceClient vertexRagDataServiceClient = + VertexRagDataServiceClient.create()) { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + Policy response = vertexRagDataServiceClient.getIamPolicy(request); + } + } +} +// [END aiplatform_v1beta1_generated_VertexRagDataService_GetIamPolicy_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/getlocation/AsyncGetLocation.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/getlocation/AsyncGetLocation.java new file mode 100644 index 000000000000..5d3108a66cb6 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/getlocation/AsyncGetLocation.java @@ -0,0 +1,47 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_VertexRagDataService_GetLocation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceClient; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; + +public class AsyncGetLocation { + + public static void main(String[] args) throws Exception { + asyncGetLocation(); + } + + public static void asyncGetLocation() throws Exception { + // 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 (VertexRagDataServiceClient vertexRagDataServiceClient = + VertexRagDataServiceClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + ApiFuture future = + vertexRagDataServiceClient.getLocationCallable().futureCall(request); + // Do something. + Location response = future.get(); + } + } +} +// [END aiplatform_v1beta1_generated_VertexRagDataService_GetLocation_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/getlocation/SyncGetLocation.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/getlocation/SyncGetLocation.java new file mode 100644 index 000000000000..07f6bacc1797 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/getlocation/SyncGetLocation.java @@ -0,0 +1,43 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_VertexRagDataService_GetLocation_sync] +import com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceClient; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; + +public class SyncGetLocation { + + public static void main(String[] args) throws Exception { + syncGetLocation(); + } + + public static void syncGetLocation() throws Exception { + // 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 (VertexRagDataServiceClient vertexRagDataServiceClient = + VertexRagDataServiceClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + Location response = vertexRagDataServiceClient.getLocation(request); + } + } +} +// [END aiplatform_v1beta1_generated_VertexRagDataService_GetLocation_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/getragcorpus/AsyncGetRagCorpus.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/getragcorpus/AsyncGetRagCorpus.java new file mode 100644 index 000000000000..48b7f9da08c3 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/getragcorpus/AsyncGetRagCorpus.java @@ -0,0 +1,51 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_VertexRagDataService_GetRagCorpus_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1beta1.GetRagCorpusRequest; +import com.google.cloud.aiplatform.v1beta1.RagCorpus; +import com.google.cloud.aiplatform.v1beta1.RagCorpusName; +import com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceClient; + +public class AsyncGetRagCorpus { + + public static void main(String[] args) throws Exception { + asyncGetRagCorpus(); + } + + public static void asyncGetRagCorpus() throws Exception { + // 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 (VertexRagDataServiceClient vertexRagDataServiceClient = + VertexRagDataServiceClient.create()) { + GetRagCorpusRequest request = + GetRagCorpusRequest.newBuilder() + .setName(RagCorpusName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]").toString()) + .build(); + ApiFuture future = + vertexRagDataServiceClient.getRagCorpusCallable().futureCall(request); + // Do something. + RagCorpus response = future.get(); + } + } +} +// [END aiplatform_v1beta1_generated_VertexRagDataService_GetRagCorpus_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/getragcorpus/SyncGetRagCorpus.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/getragcorpus/SyncGetRagCorpus.java new file mode 100644 index 000000000000..89a997024566 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/getragcorpus/SyncGetRagCorpus.java @@ -0,0 +1,47 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_VertexRagDataService_GetRagCorpus_sync] +import com.google.cloud.aiplatform.v1beta1.GetRagCorpusRequest; +import com.google.cloud.aiplatform.v1beta1.RagCorpus; +import com.google.cloud.aiplatform.v1beta1.RagCorpusName; +import com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceClient; + +public class SyncGetRagCorpus { + + public static void main(String[] args) throws Exception { + syncGetRagCorpus(); + } + + public static void syncGetRagCorpus() throws Exception { + // 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 (VertexRagDataServiceClient vertexRagDataServiceClient = + VertexRagDataServiceClient.create()) { + GetRagCorpusRequest request = + GetRagCorpusRequest.newBuilder() + .setName(RagCorpusName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]").toString()) + .build(); + RagCorpus response = vertexRagDataServiceClient.getRagCorpus(request); + } + } +} +// [END aiplatform_v1beta1_generated_VertexRagDataService_GetRagCorpus_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/getragcorpus/SyncGetRagCorpusRagcorpusname.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/getragcorpus/SyncGetRagCorpusRagcorpusname.java new file mode 100644 index 000000000000..6a1bdfefc215 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/getragcorpus/SyncGetRagCorpusRagcorpusname.java @@ -0,0 +1,43 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_VertexRagDataService_GetRagCorpus_Ragcorpusname_sync] +import com.google.cloud.aiplatform.v1beta1.RagCorpus; +import com.google.cloud.aiplatform.v1beta1.RagCorpusName; +import com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceClient; + +public class SyncGetRagCorpusRagcorpusname { + + public static void main(String[] args) throws Exception { + syncGetRagCorpusRagcorpusname(); + } + + public static void syncGetRagCorpusRagcorpusname() throws Exception { + // 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 (VertexRagDataServiceClient vertexRagDataServiceClient = + VertexRagDataServiceClient.create()) { + RagCorpusName name = RagCorpusName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]"); + RagCorpus response = vertexRagDataServiceClient.getRagCorpus(name); + } + } +} +// [END aiplatform_v1beta1_generated_VertexRagDataService_GetRagCorpus_Ragcorpusname_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/getragcorpus/SyncGetRagCorpusString.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/getragcorpus/SyncGetRagCorpusString.java new file mode 100644 index 000000000000..c90917f64bf3 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/getragcorpus/SyncGetRagCorpusString.java @@ -0,0 +1,43 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_VertexRagDataService_GetRagCorpus_String_sync] +import com.google.cloud.aiplatform.v1beta1.RagCorpus; +import com.google.cloud.aiplatform.v1beta1.RagCorpusName; +import com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceClient; + +public class SyncGetRagCorpusString { + + public static void main(String[] args) throws Exception { + syncGetRagCorpusString(); + } + + public static void syncGetRagCorpusString() throws Exception { + // 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 (VertexRagDataServiceClient vertexRagDataServiceClient = + VertexRagDataServiceClient.create()) { + String name = RagCorpusName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]").toString(); + RagCorpus response = vertexRagDataServiceClient.getRagCorpus(name); + } + } +} +// [END aiplatform_v1beta1_generated_VertexRagDataService_GetRagCorpus_String_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/getragfile/AsyncGetRagFile.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/getragfile/AsyncGetRagFile.java new file mode 100644 index 000000000000..36faea4d7596 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/getragfile/AsyncGetRagFile.java @@ -0,0 +1,53 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_VertexRagDataService_GetRagFile_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1beta1.GetRagFileRequest; +import com.google.cloud.aiplatform.v1beta1.RagFile; +import com.google.cloud.aiplatform.v1beta1.RagFileName; +import com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceClient; + +public class AsyncGetRagFile { + + public static void main(String[] args) throws Exception { + asyncGetRagFile(); + } + + public static void asyncGetRagFile() throws Exception { + // 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 (VertexRagDataServiceClient vertexRagDataServiceClient = + VertexRagDataServiceClient.create()) { + GetRagFileRequest request = + GetRagFileRequest.newBuilder() + .setName( + RagFileName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]", "[RAG_FILE]") + .toString()) + .build(); + ApiFuture future = + vertexRagDataServiceClient.getRagFileCallable().futureCall(request); + // Do something. + RagFile response = future.get(); + } + } +} +// [END aiplatform_v1beta1_generated_VertexRagDataService_GetRagFile_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/getragfile/SyncGetRagFile.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/getragfile/SyncGetRagFile.java new file mode 100644 index 000000000000..02f0df796a18 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/getragfile/SyncGetRagFile.java @@ -0,0 +1,49 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_VertexRagDataService_GetRagFile_sync] +import com.google.cloud.aiplatform.v1beta1.GetRagFileRequest; +import com.google.cloud.aiplatform.v1beta1.RagFile; +import com.google.cloud.aiplatform.v1beta1.RagFileName; +import com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceClient; + +public class SyncGetRagFile { + + public static void main(String[] args) throws Exception { + syncGetRagFile(); + } + + public static void syncGetRagFile() throws Exception { + // 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 (VertexRagDataServiceClient vertexRagDataServiceClient = + VertexRagDataServiceClient.create()) { + GetRagFileRequest request = + GetRagFileRequest.newBuilder() + .setName( + RagFileName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]", "[RAG_FILE]") + .toString()) + .build(); + RagFile response = vertexRagDataServiceClient.getRagFile(request); + } + } +} +// [END aiplatform_v1beta1_generated_VertexRagDataService_GetRagFile_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/getragfile/SyncGetRagFileRagfilename.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/getragfile/SyncGetRagFileRagfilename.java new file mode 100644 index 000000000000..91a5d20b5975 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/getragfile/SyncGetRagFileRagfilename.java @@ -0,0 +1,43 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_VertexRagDataService_GetRagFile_Ragfilename_sync] +import com.google.cloud.aiplatform.v1beta1.RagFile; +import com.google.cloud.aiplatform.v1beta1.RagFileName; +import com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceClient; + +public class SyncGetRagFileRagfilename { + + public static void main(String[] args) throws Exception { + syncGetRagFileRagfilename(); + } + + public static void syncGetRagFileRagfilename() throws Exception { + // 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 (VertexRagDataServiceClient vertexRagDataServiceClient = + VertexRagDataServiceClient.create()) { + RagFileName name = RagFileName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]", "[RAG_FILE]"); + RagFile response = vertexRagDataServiceClient.getRagFile(name); + } + } +} +// [END aiplatform_v1beta1_generated_VertexRagDataService_GetRagFile_Ragfilename_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/getragfile/SyncGetRagFileString.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/getragfile/SyncGetRagFileString.java new file mode 100644 index 000000000000..047133a8ba7f --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/getragfile/SyncGetRagFileString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_VertexRagDataService_GetRagFile_String_sync] +import com.google.cloud.aiplatform.v1beta1.RagFile; +import com.google.cloud.aiplatform.v1beta1.RagFileName; +import com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceClient; + +public class SyncGetRagFileString { + + public static void main(String[] args) throws Exception { + syncGetRagFileString(); + } + + public static void syncGetRagFileString() throws Exception { + // 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 (VertexRagDataServiceClient vertexRagDataServiceClient = + VertexRagDataServiceClient.create()) { + String name = + RagFileName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]", "[RAG_FILE]").toString(); + RagFile response = vertexRagDataServiceClient.getRagFile(name); + } + } +} +// [END aiplatform_v1beta1_generated_VertexRagDataService_GetRagFile_String_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/importragfiles/AsyncImportRagFiles.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/importragfiles/AsyncImportRagFiles.java new file mode 100644 index 000000000000..e1f0a4717fc1 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/importragfiles/AsyncImportRagFiles.java @@ -0,0 +1,53 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_VertexRagDataService_ImportRagFiles_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1beta1.ImportRagFilesConfig; +import com.google.cloud.aiplatform.v1beta1.ImportRagFilesRequest; +import com.google.cloud.aiplatform.v1beta1.RagCorpusName; +import com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceClient; +import com.google.longrunning.Operation; + +public class AsyncImportRagFiles { + + public static void main(String[] args) throws Exception { + asyncImportRagFiles(); + } + + public static void asyncImportRagFiles() throws Exception { + // 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 (VertexRagDataServiceClient vertexRagDataServiceClient = + VertexRagDataServiceClient.create()) { + ImportRagFilesRequest request = + ImportRagFilesRequest.newBuilder() + .setParent(RagCorpusName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]").toString()) + .setImportRagFilesConfig(ImportRagFilesConfig.newBuilder().build()) + .build(); + ApiFuture future = + vertexRagDataServiceClient.importRagFilesCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END aiplatform_v1beta1_generated_VertexRagDataService_ImportRagFiles_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/importragfiles/AsyncImportRagFilesLRO.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/importragfiles/AsyncImportRagFilesLRO.java new file mode 100644 index 000000000000..3a27c22d9641 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/importragfiles/AsyncImportRagFilesLRO.java @@ -0,0 +1,54 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_VertexRagDataService_ImportRagFiles_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.aiplatform.v1beta1.ImportRagFilesConfig; +import com.google.cloud.aiplatform.v1beta1.ImportRagFilesOperationMetadata; +import com.google.cloud.aiplatform.v1beta1.ImportRagFilesRequest; +import com.google.cloud.aiplatform.v1beta1.ImportRagFilesResponse; +import com.google.cloud.aiplatform.v1beta1.RagCorpusName; +import com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceClient; + +public class AsyncImportRagFilesLRO { + + public static void main(String[] args) throws Exception { + asyncImportRagFilesLRO(); + } + + public static void asyncImportRagFilesLRO() throws Exception { + // 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 (VertexRagDataServiceClient vertexRagDataServiceClient = + VertexRagDataServiceClient.create()) { + ImportRagFilesRequest request = + ImportRagFilesRequest.newBuilder() + .setParent(RagCorpusName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]").toString()) + .setImportRagFilesConfig(ImportRagFilesConfig.newBuilder().build()) + .build(); + OperationFuture future = + vertexRagDataServiceClient.importRagFilesOperationCallable().futureCall(request); + // Do something. + ImportRagFilesResponse response = future.get(); + } + } +} +// [END aiplatform_v1beta1_generated_VertexRagDataService_ImportRagFiles_LRO_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/importragfiles/SyncImportRagFiles.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/importragfiles/SyncImportRagFiles.java new file mode 100644 index 000000000000..45e03d7654fe --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/importragfiles/SyncImportRagFiles.java @@ -0,0 +1,50 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_VertexRagDataService_ImportRagFiles_sync] +import com.google.cloud.aiplatform.v1beta1.ImportRagFilesConfig; +import com.google.cloud.aiplatform.v1beta1.ImportRagFilesRequest; +import com.google.cloud.aiplatform.v1beta1.ImportRagFilesResponse; +import com.google.cloud.aiplatform.v1beta1.RagCorpusName; +import com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceClient; + +public class SyncImportRagFiles { + + public static void main(String[] args) throws Exception { + syncImportRagFiles(); + } + + public static void syncImportRagFiles() throws Exception { + // 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 (VertexRagDataServiceClient vertexRagDataServiceClient = + VertexRagDataServiceClient.create()) { + ImportRagFilesRequest request = + ImportRagFilesRequest.newBuilder() + .setParent(RagCorpusName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]").toString()) + .setImportRagFilesConfig(ImportRagFilesConfig.newBuilder().build()) + .build(); + ImportRagFilesResponse response = + vertexRagDataServiceClient.importRagFilesAsync(request).get(); + } + } +} +// [END aiplatform_v1beta1_generated_VertexRagDataService_ImportRagFiles_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/importragfiles/SyncImportRagFilesRagcorpusnameImportragfilesconfig.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/importragfiles/SyncImportRagFilesRagcorpusnameImportragfilesconfig.java new file mode 100644 index 000000000000..7585959b7ee5 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/importragfiles/SyncImportRagFilesRagcorpusnameImportragfilesconfig.java @@ -0,0 +1,46 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_VertexRagDataService_ImportRagFiles_RagcorpusnameImportragfilesconfig_sync] +import com.google.cloud.aiplatform.v1beta1.ImportRagFilesConfig; +import com.google.cloud.aiplatform.v1beta1.ImportRagFilesResponse; +import com.google.cloud.aiplatform.v1beta1.RagCorpusName; +import com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceClient; + +public class SyncImportRagFilesRagcorpusnameImportragfilesconfig { + + public static void main(String[] args) throws Exception { + syncImportRagFilesRagcorpusnameImportragfilesconfig(); + } + + public static void syncImportRagFilesRagcorpusnameImportragfilesconfig() throws Exception { + // 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 (VertexRagDataServiceClient vertexRagDataServiceClient = + VertexRagDataServiceClient.create()) { + RagCorpusName parent = RagCorpusName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]"); + ImportRagFilesConfig importRagFilesConfig = ImportRagFilesConfig.newBuilder().build(); + ImportRagFilesResponse response = + vertexRagDataServiceClient.importRagFilesAsync(parent, importRagFilesConfig).get(); + } + } +} +// [END aiplatform_v1beta1_generated_VertexRagDataService_ImportRagFiles_RagcorpusnameImportragfilesconfig_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/importragfiles/SyncImportRagFilesStringImportragfilesconfig.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/importragfiles/SyncImportRagFilesStringImportragfilesconfig.java new file mode 100644 index 000000000000..acc10f070394 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/importragfiles/SyncImportRagFilesStringImportragfilesconfig.java @@ -0,0 +1,46 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_VertexRagDataService_ImportRagFiles_StringImportragfilesconfig_sync] +import com.google.cloud.aiplatform.v1beta1.ImportRagFilesConfig; +import com.google.cloud.aiplatform.v1beta1.ImportRagFilesResponse; +import com.google.cloud.aiplatform.v1beta1.RagCorpusName; +import com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceClient; + +public class SyncImportRagFilesStringImportragfilesconfig { + + public static void main(String[] args) throws Exception { + syncImportRagFilesStringImportragfilesconfig(); + } + + public static void syncImportRagFilesStringImportragfilesconfig() throws Exception { + // 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 (VertexRagDataServiceClient vertexRagDataServiceClient = + VertexRagDataServiceClient.create()) { + String parent = RagCorpusName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]").toString(); + ImportRagFilesConfig importRagFilesConfig = ImportRagFilesConfig.newBuilder().build(); + ImportRagFilesResponse response = + vertexRagDataServiceClient.importRagFilesAsync(parent, importRagFilesConfig).get(); + } + } +} +// [END aiplatform_v1beta1_generated_VertexRagDataService_ImportRagFiles_StringImportragfilesconfig_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/listlocations/AsyncListLocations.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/listlocations/AsyncListLocations.java new file mode 100644 index 000000000000..2bea0c6a4776 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/listlocations/AsyncListLocations.java @@ -0,0 +1,55 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_VertexRagDataService_ListLocations_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; + +public class AsyncListLocations { + + public static void main(String[] args) throws Exception { + asyncListLocations(); + } + + public static void asyncListLocations() throws Exception { + // 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 (VertexRagDataServiceClient vertexRagDataServiceClient = + VertexRagDataServiceClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + vertexRagDataServiceClient.listLocationsPagedCallable().futureCall(request); + // Do something. + for (Location element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1beta1_generated_VertexRagDataService_ListLocations_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/listlocations/AsyncListLocationsPaged.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/listlocations/AsyncListLocationsPaged.java new file mode 100644 index 000000000000..d5ff6dc0be76 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/listlocations/AsyncListLocationsPaged.java @@ -0,0 +1,63 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_VertexRagDataService_ListLocations_Paged_async] +import com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.base.Strings; + +public class AsyncListLocationsPaged { + + public static void main(String[] args) throws Exception { + asyncListLocationsPaged(); + } + + public static void asyncListLocationsPaged() throws Exception { + // 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 (VertexRagDataServiceClient vertexRagDataServiceClient = + VertexRagDataServiceClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListLocationsResponse response = + vertexRagDataServiceClient.listLocationsCallable().call(request); + for (Location element : response.getLocationsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END aiplatform_v1beta1_generated_VertexRagDataService_ListLocations_Paged_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/listlocations/SyncListLocations.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/listlocations/SyncListLocations.java new file mode 100644 index 000000000000..9e3f11060368 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/listlocations/SyncListLocations.java @@ -0,0 +1,51 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_VertexRagDataService_ListLocations_sync] +import com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; + +public class SyncListLocations { + + public static void main(String[] args) throws Exception { + syncListLocations(); + } + + public static void syncListLocations() throws Exception { + // 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 (VertexRagDataServiceClient vertexRagDataServiceClient = + VertexRagDataServiceClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Location element : vertexRagDataServiceClient.listLocations(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1beta1_generated_VertexRagDataService_ListLocations_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/listragcorpora/AsyncListRagCorpora.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/listragcorpora/AsyncListRagCorpora.java new file mode 100644 index 000000000000..caaa870cf7fd --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/listragcorpora/AsyncListRagCorpora.java @@ -0,0 +1,55 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_VertexRagDataService_ListRagCorpora_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1beta1.ListRagCorporaRequest; +import com.google.cloud.aiplatform.v1beta1.LocationName; +import com.google.cloud.aiplatform.v1beta1.RagCorpus; +import com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceClient; + +public class AsyncListRagCorpora { + + public static void main(String[] args) throws Exception { + asyncListRagCorpora(); + } + + public static void asyncListRagCorpora() throws Exception { + // 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 (VertexRagDataServiceClient vertexRagDataServiceClient = + VertexRagDataServiceClient.create()) { + ListRagCorporaRequest request = + ListRagCorporaRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + vertexRagDataServiceClient.listRagCorporaPagedCallable().futureCall(request); + // Do something. + for (RagCorpus element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1beta1_generated_VertexRagDataService_ListRagCorpora_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/listragcorpora/AsyncListRagCorporaPaged.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/listragcorpora/AsyncListRagCorporaPaged.java new file mode 100644 index 000000000000..f5261689e595 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/listragcorpora/AsyncListRagCorporaPaged.java @@ -0,0 +1,63 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_VertexRagDataService_ListRagCorpora_Paged_async] +import com.google.cloud.aiplatform.v1beta1.ListRagCorporaRequest; +import com.google.cloud.aiplatform.v1beta1.ListRagCorporaResponse; +import com.google.cloud.aiplatform.v1beta1.LocationName; +import com.google.cloud.aiplatform.v1beta1.RagCorpus; +import com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceClient; +import com.google.common.base.Strings; + +public class AsyncListRagCorporaPaged { + + public static void main(String[] args) throws Exception { + asyncListRagCorporaPaged(); + } + + public static void asyncListRagCorporaPaged() throws Exception { + // 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 (VertexRagDataServiceClient vertexRagDataServiceClient = + VertexRagDataServiceClient.create()) { + ListRagCorporaRequest request = + ListRagCorporaRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListRagCorporaResponse response = + vertexRagDataServiceClient.listRagCorporaCallable().call(request); + for (RagCorpus element : response.getRagCorporaList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END aiplatform_v1beta1_generated_VertexRagDataService_ListRagCorpora_Paged_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/listragcorpora/SyncListRagCorpora.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/listragcorpora/SyncListRagCorpora.java new file mode 100644 index 000000000000..8319a4ffe9df --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/listragcorpora/SyncListRagCorpora.java @@ -0,0 +1,51 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_VertexRagDataService_ListRagCorpora_sync] +import com.google.cloud.aiplatform.v1beta1.ListRagCorporaRequest; +import com.google.cloud.aiplatform.v1beta1.LocationName; +import com.google.cloud.aiplatform.v1beta1.RagCorpus; +import com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceClient; + +public class SyncListRagCorpora { + + public static void main(String[] args) throws Exception { + syncListRagCorpora(); + } + + public static void syncListRagCorpora() throws Exception { + // 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 (VertexRagDataServiceClient vertexRagDataServiceClient = + VertexRagDataServiceClient.create()) { + ListRagCorporaRequest request = + ListRagCorporaRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (RagCorpus element : vertexRagDataServiceClient.listRagCorpora(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1beta1_generated_VertexRagDataService_ListRagCorpora_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/listragcorpora/SyncListRagCorporaLocationname.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/listragcorpora/SyncListRagCorporaLocationname.java new file mode 100644 index 000000000000..e0151a555e93 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/listragcorpora/SyncListRagCorporaLocationname.java @@ -0,0 +1,45 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_VertexRagDataService_ListRagCorpora_Locationname_sync] +import com.google.cloud.aiplatform.v1beta1.LocationName; +import com.google.cloud.aiplatform.v1beta1.RagCorpus; +import com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceClient; + +public class SyncListRagCorporaLocationname { + + public static void main(String[] args) throws Exception { + syncListRagCorporaLocationname(); + } + + public static void syncListRagCorporaLocationname() throws Exception { + // 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 (VertexRagDataServiceClient vertexRagDataServiceClient = + VertexRagDataServiceClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (RagCorpus element : vertexRagDataServiceClient.listRagCorpora(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1beta1_generated_VertexRagDataService_ListRagCorpora_Locationname_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/listragcorpora/SyncListRagCorporaString.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/listragcorpora/SyncListRagCorporaString.java new file mode 100644 index 000000000000..2f96bb9d0a41 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/listragcorpora/SyncListRagCorporaString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_VertexRagDataService_ListRagCorpora_String_sync] +import com.google.cloud.aiplatform.v1beta1.LocationName; +import com.google.cloud.aiplatform.v1beta1.RagCorpus; +import com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceClient; + +public class SyncListRagCorporaString { + + public static void main(String[] args) throws Exception { + syncListRagCorporaString(); + } + + public static void syncListRagCorporaString() throws Exception { + // 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 (VertexRagDataServiceClient vertexRagDataServiceClient = + VertexRagDataServiceClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (RagCorpus element : vertexRagDataServiceClient.listRagCorpora(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1beta1_generated_VertexRagDataService_ListRagCorpora_String_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/listragfiles/AsyncListRagFiles.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/listragfiles/AsyncListRagFiles.java new file mode 100644 index 000000000000..fef90ce82a3d --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/listragfiles/AsyncListRagFiles.java @@ -0,0 +1,55 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_VertexRagDataService_ListRagFiles_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1beta1.ListRagFilesRequest; +import com.google.cloud.aiplatform.v1beta1.RagCorpusName; +import com.google.cloud.aiplatform.v1beta1.RagFile; +import com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceClient; + +public class AsyncListRagFiles { + + public static void main(String[] args) throws Exception { + asyncListRagFiles(); + } + + public static void asyncListRagFiles() throws Exception { + // 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 (VertexRagDataServiceClient vertexRagDataServiceClient = + VertexRagDataServiceClient.create()) { + ListRagFilesRequest request = + ListRagFilesRequest.newBuilder() + .setParent(RagCorpusName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + vertexRagDataServiceClient.listRagFilesPagedCallable().futureCall(request); + // Do something. + for (RagFile element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1beta1_generated_VertexRagDataService_ListRagFiles_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/listragfiles/AsyncListRagFilesPaged.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/listragfiles/AsyncListRagFilesPaged.java new file mode 100644 index 000000000000..9a6e8465d5ce --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/listragfiles/AsyncListRagFilesPaged.java @@ -0,0 +1,63 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_VertexRagDataService_ListRagFiles_Paged_async] +import com.google.cloud.aiplatform.v1beta1.ListRagFilesRequest; +import com.google.cloud.aiplatform.v1beta1.ListRagFilesResponse; +import com.google.cloud.aiplatform.v1beta1.RagCorpusName; +import com.google.cloud.aiplatform.v1beta1.RagFile; +import com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceClient; +import com.google.common.base.Strings; + +public class AsyncListRagFilesPaged { + + public static void main(String[] args) throws Exception { + asyncListRagFilesPaged(); + } + + public static void asyncListRagFilesPaged() throws Exception { + // 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 (VertexRagDataServiceClient vertexRagDataServiceClient = + VertexRagDataServiceClient.create()) { + ListRagFilesRequest request = + ListRagFilesRequest.newBuilder() + .setParent(RagCorpusName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListRagFilesResponse response = + vertexRagDataServiceClient.listRagFilesCallable().call(request); + for (RagFile element : response.getRagFilesList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END aiplatform_v1beta1_generated_VertexRagDataService_ListRagFiles_Paged_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/listragfiles/SyncListRagFiles.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/listragfiles/SyncListRagFiles.java new file mode 100644 index 000000000000..34fd70af6ea7 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/listragfiles/SyncListRagFiles.java @@ -0,0 +1,51 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_VertexRagDataService_ListRagFiles_sync] +import com.google.cloud.aiplatform.v1beta1.ListRagFilesRequest; +import com.google.cloud.aiplatform.v1beta1.RagCorpusName; +import com.google.cloud.aiplatform.v1beta1.RagFile; +import com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceClient; + +public class SyncListRagFiles { + + public static void main(String[] args) throws Exception { + syncListRagFiles(); + } + + public static void syncListRagFiles() throws Exception { + // 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 (VertexRagDataServiceClient vertexRagDataServiceClient = + VertexRagDataServiceClient.create()) { + ListRagFilesRequest request = + ListRagFilesRequest.newBuilder() + .setParent(RagCorpusName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (RagFile element : vertexRagDataServiceClient.listRagFiles(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1beta1_generated_VertexRagDataService_ListRagFiles_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/listragfiles/SyncListRagFilesRagcorpusname.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/listragfiles/SyncListRagFilesRagcorpusname.java new file mode 100644 index 000000000000..f8da141322c7 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/listragfiles/SyncListRagFilesRagcorpusname.java @@ -0,0 +1,45 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_VertexRagDataService_ListRagFiles_Ragcorpusname_sync] +import com.google.cloud.aiplatform.v1beta1.RagCorpusName; +import com.google.cloud.aiplatform.v1beta1.RagFile; +import com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceClient; + +public class SyncListRagFilesRagcorpusname { + + public static void main(String[] args) throws Exception { + syncListRagFilesRagcorpusname(); + } + + public static void syncListRagFilesRagcorpusname() throws Exception { + // 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 (VertexRagDataServiceClient vertexRagDataServiceClient = + VertexRagDataServiceClient.create()) { + RagCorpusName parent = RagCorpusName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]"); + for (RagFile element : vertexRagDataServiceClient.listRagFiles(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1beta1_generated_VertexRagDataService_ListRagFiles_Ragcorpusname_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/listragfiles/SyncListRagFilesString.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/listragfiles/SyncListRagFilesString.java new file mode 100644 index 000000000000..17dcaa6b423a --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/listragfiles/SyncListRagFilesString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_VertexRagDataService_ListRagFiles_String_sync] +import com.google.cloud.aiplatform.v1beta1.RagCorpusName; +import com.google.cloud.aiplatform.v1beta1.RagFile; +import com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceClient; + +public class SyncListRagFilesString { + + public static void main(String[] args) throws Exception { + syncListRagFilesString(); + } + + public static void syncListRagFilesString() throws Exception { + // 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 (VertexRagDataServiceClient vertexRagDataServiceClient = + VertexRagDataServiceClient.create()) { + String parent = RagCorpusName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]").toString(); + for (RagFile element : vertexRagDataServiceClient.listRagFiles(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1beta1_generated_VertexRagDataService_ListRagFiles_String_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/setiampolicy/AsyncSetIamPolicy.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/setiampolicy/AsyncSetIamPolicy.java new file mode 100644 index 000000000000..60178dfba179 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/setiampolicy/AsyncSetIamPolicy.java @@ -0,0 +1,57 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_VertexRagDataService_SetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1beta1.EndpointName; +import com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceClient; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.protobuf.FieldMask; + +public class AsyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncSetIamPolicy(); + } + + public static void asyncSetIamPolicy() throws Exception { + // 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 (VertexRagDataServiceClient vertexRagDataServiceClient = + VertexRagDataServiceClient.create()) { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = + vertexRagDataServiceClient.setIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END aiplatform_v1beta1_generated_VertexRagDataService_SetIamPolicy_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/setiampolicy/SyncSetIamPolicy.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/setiampolicy/SyncSetIamPolicy.java new file mode 100644 index 000000000000..cf18b577986b --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/setiampolicy/SyncSetIamPolicy.java @@ -0,0 +1,53 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_VertexRagDataService_SetIamPolicy_sync] +import com.google.cloud.aiplatform.v1beta1.EndpointName; +import com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceClient; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.protobuf.FieldMask; + +public class SyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + syncSetIamPolicy(); + } + + public static void syncSetIamPolicy() throws Exception { + // 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 (VertexRagDataServiceClient vertexRagDataServiceClient = + VertexRagDataServiceClient.create()) { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + Policy response = vertexRagDataServiceClient.setIamPolicy(request); + } + } +} +// [END aiplatform_v1beta1_generated_VertexRagDataService_SetIamPolicy_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/testiampermissions/AsyncTestIamPermissions.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/testiampermissions/AsyncTestIamPermissions.java new file mode 100644 index 000000000000..b388a9c5d136 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/testiampermissions/AsyncTestIamPermissions.java @@ -0,0 +1,56 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_VertexRagDataService_TestIamPermissions_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1beta1.EndpointName; +import com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceClient; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import java.util.ArrayList; + +public class AsyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + asyncTestIamPermissions(); + } + + public static void asyncTestIamPermissions() throws Exception { + // 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 (VertexRagDataServiceClient vertexRagDataServiceClient = + VertexRagDataServiceClient.create()) { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .addAllPermissions(new ArrayList()) + .build(); + ApiFuture future = + vertexRagDataServiceClient.testIamPermissionsCallable().futureCall(request); + // Do something. + TestIamPermissionsResponse response = future.get(); + } + } +} +// [END aiplatform_v1beta1_generated_VertexRagDataService_TestIamPermissions_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/testiampermissions/SyncTestIamPermissions.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/testiampermissions/SyncTestIamPermissions.java new file mode 100644 index 000000000000..6408ddbbc07e --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/testiampermissions/SyncTestIamPermissions.java @@ -0,0 +1,52 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_VertexRagDataService_TestIamPermissions_sync] +import com.google.cloud.aiplatform.v1beta1.EndpointName; +import com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceClient; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import java.util.ArrayList; + +public class SyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + syncTestIamPermissions(); + } + + public static void syncTestIamPermissions() throws Exception { + // 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 (VertexRagDataServiceClient vertexRagDataServiceClient = + VertexRagDataServiceClient.create()) { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .addAllPermissions(new ArrayList()) + .build(); + TestIamPermissionsResponse response = vertexRagDataServiceClient.testIamPermissions(request); + } + } +} +// [END aiplatform_v1beta1_generated_VertexRagDataService_TestIamPermissions_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/uploadragfile/AsyncUploadRagFile.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/uploadragfile/AsyncUploadRagFile.java new file mode 100644 index 000000000000..18b6fd70f86b --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/uploadragfile/AsyncUploadRagFile.java @@ -0,0 +1,55 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_VertexRagDataService_UploadRagFile_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1beta1.RagCorpusName; +import com.google.cloud.aiplatform.v1beta1.RagFile; +import com.google.cloud.aiplatform.v1beta1.UploadRagFileConfig; +import com.google.cloud.aiplatform.v1beta1.UploadRagFileRequest; +import com.google.cloud.aiplatform.v1beta1.UploadRagFileResponse; +import com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceClient; + +public class AsyncUploadRagFile { + + public static void main(String[] args) throws Exception { + asyncUploadRagFile(); + } + + public static void asyncUploadRagFile() throws Exception { + // 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 (VertexRagDataServiceClient vertexRagDataServiceClient = + VertexRagDataServiceClient.create()) { + UploadRagFileRequest request = + UploadRagFileRequest.newBuilder() + .setParent(RagCorpusName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]").toString()) + .setRagFile(RagFile.newBuilder().build()) + .setUploadRagFileConfig(UploadRagFileConfig.newBuilder().build()) + .build(); + ApiFuture future = + vertexRagDataServiceClient.uploadRagFileCallable().futureCall(request); + // Do something. + UploadRagFileResponse response = future.get(); + } + } +} +// [END aiplatform_v1beta1_generated_VertexRagDataService_UploadRagFile_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/uploadragfile/SyncUploadRagFile.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/uploadragfile/SyncUploadRagFile.java new file mode 100644 index 000000000000..261177482634 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/uploadragfile/SyncUploadRagFile.java @@ -0,0 +1,51 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_VertexRagDataService_UploadRagFile_sync] +import com.google.cloud.aiplatform.v1beta1.RagCorpusName; +import com.google.cloud.aiplatform.v1beta1.RagFile; +import com.google.cloud.aiplatform.v1beta1.UploadRagFileConfig; +import com.google.cloud.aiplatform.v1beta1.UploadRagFileRequest; +import com.google.cloud.aiplatform.v1beta1.UploadRagFileResponse; +import com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceClient; + +public class SyncUploadRagFile { + + public static void main(String[] args) throws Exception { + syncUploadRagFile(); + } + + public static void syncUploadRagFile() throws Exception { + // 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 (VertexRagDataServiceClient vertexRagDataServiceClient = + VertexRagDataServiceClient.create()) { + UploadRagFileRequest request = + UploadRagFileRequest.newBuilder() + .setParent(RagCorpusName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]").toString()) + .setRagFile(RagFile.newBuilder().build()) + .setUploadRagFileConfig(UploadRagFileConfig.newBuilder().build()) + .build(); + UploadRagFileResponse response = vertexRagDataServiceClient.uploadRagFile(request); + } + } +} +// [END aiplatform_v1beta1_generated_VertexRagDataService_UploadRagFile_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/uploadragfile/SyncUploadRagFileRagcorpusnameRagfileUploadragfileconfig.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/uploadragfile/SyncUploadRagFileRagcorpusnameRagfileUploadragfileconfig.java new file mode 100644 index 000000000000..b3dc88263dad --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/uploadragfile/SyncUploadRagFileRagcorpusnameRagfileUploadragfileconfig.java @@ -0,0 +1,48 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_VertexRagDataService_UploadRagFile_RagcorpusnameRagfileUploadragfileconfig_sync] +import com.google.cloud.aiplatform.v1beta1.RagCorpusName; +import com.google.cloud.aiplatform.v1beta1.RagFile; +import com.google.cloud.aiplatform.v1beta1.UploadRagFileConfig; +import com.google.cloud.aiplatform.v1beta1.UploadRagFileResponse; +import com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceClient; + +public class SyncUploadRagFileRagcorpusnameRagfileUploadragfileconfig { + + public static void main(String[] args) throws Exception { + syncUploadRagFileRagcorpusnameRagfileUploadragfileconfig(); + } + + public static void syncUploadRagFileRagcorpusnameRagfileUploadragfileconfig() throws Exception { + // 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 (VertexRagDataServiceClient vertexRagDataServiceClient = + VertexRagDataServiceClient.create()) { + RagCorpusName parent = RagCorpusName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]"); + RagFile ragFile = RagFile.newBuilder().build(); + UploadRagFileConfig uploadRagFileConfig = UploadRagFileConfig.newBuilder().build(); + UploadRagFileResponse response = + vertexRagDataServiceClient.uploadRagFile(parent, ragFile, uploadRagFileConfig); + } + } +} +// [END aiplatform_v1beta1_generated_VertexRagDataService_UploadRagFile_RagcorpusnameRagfileUploadragfileconfig_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/uploadragfile/SyncUploadRagFileStringRagfileUploadragfileconfig.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/uploadragfile/SyncUploadRagFileStringRagfileUploadragfileconfig.java new file mode 100644 index 000000000000..ccf0df6cd5c1 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservice/uploadragfile/SyncUploadRagFileStringRagfileUploadragfileconfig.java @@ -0,0 +1,48 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_VertexRagDataService_UploadRagFile_StringRagfileUploadragfileconfig_sync] +import com.google.cloud.aiplatform.v1beta1.RagCorpusName; +import com.google.cloud.aiplatform.v1beta1.RagFile; +import com.google.cloud.aiplatform.v1beta1.UploadRagFileConfig; +import com.google.cloud.aiplatform.v1beta1.UploadRagFileResponse; +import com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceClient; + +public class SyncUploadRagFileStringRagfileUploadragfileconfig { + + public static void main(String[] args) throws Exception { + syncUploadRagFileStringRagfileUploadragfileconfig(); + } + + public static void syncUploadRagFileStringRagfileUploadragfileconfig() throws Exception { + // 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 (VertexRagDataServiceClient vertexRagDataServiceClient = + VertexRagDataServiceClient.create()) { + String parent = RagCorpusName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]").toString(); + RagFile ragFile = RagFile.newBuilder().build(); + UploadRagFileConfig uploadRagFileConfig = UploadRagFileConfig.newBuilder().build(); + UploadRagFileResponse response = + vertexRagDataServiceClient.uploadRagFile(parent, ragFile, uploadRagFileConfig); + } + } +} +// [END aiplatform_v1beta1_generated_VertexRagDataService_UploadRagFile_StringRagfileUploadragfileconfig_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservicesettings/getragcorpus/SyncGetRagCorpus.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservicesettings/getragcorpus/SyncGetRagCorpus.java new file mode 100644 index 000000000000..96666dee165e --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragdataservicesettings/getragcorpus/SyncGetRagCorpus.java @@ -0,0 +1,50 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_VertexRagDataServiceSettings_GetRagCorpus_sync] +import com.google.cloud.aiplatform.v1beta1.VertexRagDataServiceSettings; +import java.time.Duration; + +public class SyncGetRagCorpus { + + public static void main(String[] args) throws Exception { + syncGetRagCorpus(); + } + + public static void syncGetRagCorpus() throws Exception { + // 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 + VertexRagDataServiceSettings.Builder vertexRagDataServiceSettingsBuilder = + VertexRagDataServiceSettings.newBuilder(); + vertexRagDataServiceSettingsBuilder + .getRagCorpusSettings() + .setRetrySettings( + vertexRagDataServiceSettingsBuilder + .getRagCorpusSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + VertexRagDataServiceSettings vertexRagDataServiceSettings = + vertexRagDataServiceSettingsBuilder.build(); + } +} +// [END aiplatform_v1beta1_generated_VertexRagDataServiceSettings_GetRagCorpus_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragservice/create/SyncCreateSetCredentialsProvider.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragservice/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..9dd68f92c1fd --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragservice/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,45 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_VertexRagService_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.aiplatform.v1beta1.VertexRagServiceClient; +import com.google.cloud.aiplatform.v1beta1.VertexRagServiceSettings; +import com.google.cloud.aiplatform.v1beta1.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // 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 + VertexRagServiceSettings vertexRagServiceSettings = + VertexRagServiceSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + VertexRagServiceClient vertexRagServiceClient = + VertexRagServiceClient.create(vertexRagServiceSettings); + } +} +// [END aiplatform_v1beta1_generated_VertexRagService_Create_SetCredentialsProvider_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragservice/create/SyncCreateSetEndpoint.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragservice/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..db2c7dc3455f --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragservice/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_VertexRagService_Create_SetEndpoint_sync] +import com.google.cloud.aiplatform.v1beta1.VertexRagServiceClient; +import com.google.cloud.aiplatform.v1beta1.VertexRagServiceSettings; +import com.google.cloud.aiplatform.v1beta1.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // 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 + VertexRagServiceSettings vertexRagServiceSettings = + VertexRagServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); + VertexRagServiceClient vertexRagServiceClient = + VertexRagServiceClient.create(vertexRagServiceSettings); + } +} +// [END aiplatform_v1beta1_generated_VertexRagService_Create_SetEndpoint_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragservice/getiampolicy/AsyncGetIamPolicy.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragservice/getiampolicy/AsyncGetIamPolicy.java new file mode 100644 index 000000000000..83d54e049cf8 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragservice/getiampolicy/AsyncGetIamPolicy.java @@ -0,0 +1,54 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_VertexRagService_GetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1beta1.EndpointName; +import com.google.cloud.aiplatform.v1beta1.VertexRagServiceClient; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; + +public class AsyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncGetIamPolicy(); + } + + public static void asyncGetIamPolicy() throws Exception { + // 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 (VertexRagServiceClient vertexRagServiceClient = VertexRagServiceClient.create()) { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + ApiFuture future = vertexRagServiceClient.getIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END aiplatform_v1beta1_generated_VertexRagService_GetIamPolicy_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragservice/getiampolicy/SyncGetIamPolicy.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragservice/getiampolicy/SyncGetIamPolicy.java new file mode 100644 index 000000000000..b7b813bae65d --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragservice/getiampolicy/SyncGetIamPolicy.java @@ -0,0 +1,51 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_VertexRagService_GetIamPolicy_sync] +import com.google.cloud.aiplatform.v1beta1.EndpointName; +import com.google.cloud.aiplatform.v1beta1.VertexRagServiceClient; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; + +public class SyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + syncGetIamPolicy(); + } + + public static void syncGetIamPolicy() throws Exception { + // 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 (VertexRagServiceClient vertexRagServiceClient = VertexRagServiceClient.create()) { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + Policy response = vertexRagServiceClient.getIamPolicy(request); + } + } +} +// [END aiplatform_v1beta1_generated_VertexRagService_GetIamPolicy_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragservice/getlocation/AsyncGetLocation.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragservice/getlocation/AsyncGetLocation.java new file mode 100644 index 000000000000..5b8fa702e43d --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragservice/getlocation/AsyncGetLocation.java @@ -0,0 +1,45 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_VertexRagService_GetLocation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1beta1.VertexRagServiceClient; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; + +public class AsyncGetLocation { + + public static void main(String[] args) throws Exception { + asyncGetLocation(); + } + + public static void asyncGetLocation() throws Exception { + // 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 (VertexRagServiceClient vertexRagServiceClient = VertexRagServiceClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + ApiFuture future = vertexRagServiceClient.getLocationCallable().futureCall(request); + // Do something. + Location response = future.get(); + } + } +} +// [END aiplatform_v1beta1_generated_VertexRagService_GetLocation_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragservice/getlocation/SyncGetLocation.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragservice/getlocation/SyncGetLocation.java new file mode 100644 index 000000000000..c8a739164ee9 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragservice/getlocation/SyncGetLocation.java @@ -0,0 +1,42 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_VertexRagService_GetLocation_sync] +import com.google.cloud.aiplatform.v1beta1.VertexRagServiceClient; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; + +public class SyncGetLocation { + + public static void main(String[] args) throws Exception { + syncGetLocation(); + } + + public static void syncGetLocation() throws Exception { + // 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 (VertexRagServiceClient vertexRagServiceClient = VertexRagServiceClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + Location response = vertexRagServiceClient.getLocation(request); + } + } +} +// [END aiplatform_v1beta1_generated_VertexRagService_GetLocation_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragservice/listlocations/AsyncListLocations.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragservice/listlocations/AsyncListLocations.java new file mode 100644 index 000000000000..bdb9cf3b0211 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragservice/listlocations/AsyncListLocations.java @@ -0,0 +1,54 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_VertexRagService_ListLocations_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1beta1.VertexRagServiceClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; + +public class AsyncListLocations { + + public static void main(String[] args) throws Exception { + asyncListLocations(); + } + + public static void asyncListLocations() throws Exception { + // 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 (VertexRagServiceClient vertexRagServiceClient = VertexRagServiceClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + vertexRagServiceClient.listLocationsPagedCallable().futureCall(request); + // Do something. + for (Location element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1beta1_generated_VertexRagService_ListLocations_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragservice/listlocations/AsyncListLocationsPaged.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragservice/listlocations/AsyncListLocationsPaged.java new file mode 100644 index 000000000000..863259c529d5 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragservice/listlocations/AsyncListLocationsPaged.java @@ -0,0 +1,62 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_VertexRagService_ListLocations_Paged_async] +import com.google.cloud.aiplatform.v1beta1.VertexRagServiceClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.base.Strings; + +public class AsyncListLocationsPaged { + + public static void main(String[] args) throws Exception { + asyncListLocationsPaged(); + } + + public static void asyncListLocationsPaged() throws Exception { + // 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 (VertexRagServiceClient vertexRagServiceClient = VertexRagServiceClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListLocationsResponse response = + vertexRagServiceClient.listLocationsCallable().call(request); + for (Location element : response.getLocationsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END aiplatform_v1beta1_generated_VertexRagService_ListLocations_Paged_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragservice/listlocations/SyncListLocations.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragservice/listlocations/SyncListLocations.java new file mode 100644 index 000000000000..28428945e521 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragservice/listlocations/SyncListLocations.java @@ -0,0 +1,50 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_VertexRagService_ListLocations_sync] +import com.google.cloud.aiplatform.v1beta1.VertexRagServiceClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; + +public class SyncListLocations { + + public static void main(String[] args) throws Exception { + syncListLocations(); + } + + public static void syncListLocations() throws Exception { + // 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 (VertexRagServiceClient vertexRagServiceClient = VertexRagServiceClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Location element : vertexRagServiceClient.listLocations(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1beta1_generated_VertexRagService_ListLocations_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragservice/retrievecontexts/AsyncRetrieveContexts.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragservice/retrievecontexts/AsyncRetrieveContexts.java new file mode 100644 index 000000000000..e07ba52ab191 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragservice/retrievecontexts/AsyncRetrieveContexts.java @@ -0,0 +1,52 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_VertexRagService_RetrieveContexts_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1beta1.LocationName; +import com.google.cloud.aiplatform.v1beta1.RagQuery; +import com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest; +import com.google.cloud.aiplatform.v1beta1.RetrieveContextsResponse; +import com.google.cloud.aiplatform.v1beta1.VertexRagServiceClient; + +public class AsyncRetrieveContexts { + + public static void main(String[] args) throws Exception { + asyncRetrieveContexts(); + } + + public static void asyncRetrieveContexts() throws Exception { + // 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 (VertexRagServiceClient vertexRagServiceClient = VertexRagServiceClient.create()) { + RetrieveContextsRequest request = + RetrieveContextsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setQuery(RagQuery.newBuilder().build()) + .build(); + ApiFuture future = + vertexRagServiceClient.retrieveContextsCallable().futureCall(request); + // Do something. + RetrieveContextsResponse response = future.get(); + } + } +} +// [END aiplatform_v1beta1_generated_VertexRagService_RetrieveContexts_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragservice/retrievecontexts/SyncRetrieveContexts.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragservice/retrievecontexts/SyncRetrieveContexts.java new file mode 100644 index 000000000000..0387ed30bfbf --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragservice/retrievecontexts/SyncRetrieveContexts.java @@ -0,0 +1,48 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_VertexRagService_RetrieveContexts_sync] +import com.google.cloud.aiplatform.v1beta1.LocationName; +import com.google.cloud.aiplatform.v1beta1.RagQuery; +import com.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest; +import com.google.cloud.aiplatform.v1beta1.RetrieveContextsResponse; +import com.google.cloud.aiplatform.v1beta1.VertexRagServiceClient; + +public class SyncRetrieveContexts { + + public static void main(String[] args) throws Exception { + syncRetrieveContexts(); + } + + public static void syncRetrieveContexts() throws Exception { + // 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 (VertexRagServiceClient vertexRagServiceClient = VertexRagServiceClient.create()) { + RetrieveContextsRequest request = + RetrieveContextsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setQuery(RagQuery.newBuilder().build()) + .build(); + RetrieveContextsResponse response = vertexRagServiceClient.retrieveContexts(request); + } + } +} +// [END aiplatform_v1beta1_generated_VertexRagService_RetrieveContexts_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragservice/retrievecontexts/SyncRetrieveContextsLocationnameRagquery.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragservice/retrievecontexts/SyncRetrieveContextsLocationnameRagquery.java new file mode 100644 index 000000000000..470961e0367a --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragservice/retrievecontexts/SyncRetrieveContextsLocationnameRagquery.java @@ -0,0 +1,44 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_VertexRagService_RetrieveContexts_LocationnameRagquery_sync] +import com.google.cloud.aiplatform.v1beta1.LocationName; +import com.google.cloud.aiplatform.v1beta1.RagQuery; +import com.google.cloud.aiplatform.v1beta1.RetrieveContextsResponse; +import com.google.cloud.aiplatform.v1beta1.VertexRagServiceClient; + +public class SyncRetrieveContextsLocationnameRagquery { + + public static void main(String[] args) throws Exception { + syncRetrieveContextsLocationnameRagquery(); + } + + public static void syncRetrieveContextsLocationnameRagquery() throws Exception { + // 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 (VertexRagServiceClient vertexRagServiceClient = VertexRagServiceClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + RagQuery query = RagQuery.newBuilder().build(); + RetrieveContextsResponse response = vertexRagServiceClient.retrieveContexts(parent, query); + } + } +} +// [END aiplatform_v1beta1_generated_VertexRagService_RetrieveContexts_LocationnameRagquery_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragservice/retrievecontexts/SyncRetrieveContextsStringRagquery.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragservice/retrievecontexts/SyncRetrieveContextsStringRagquery.java new file mode 100644 index 000000000000..a9d258fa8b8a --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragservice/retrievecontexts/SyncRetrieveContextsStringRagquery.java @@ -0,0 +1,44 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_VertexRagService_RetrieveContexts_StringRagquery_sync] +import com.google.cloud.aiplatform.v1beta1.LocationName; +import com.google.cloud.aiplatform.v1beta1.RagQuery; +import com.google.cloud.aiplatform.v1beta1.RetrieveContextsResponse; +import com.google.cloud.aiplatform.v1beta1.VertexRagServiceClient; + +public class SyncRetrieveContextsStringRagquery { + + public static void main(String[] args) throws Exception { + syncRetrieveContextsStringRagquery(); + } + + public static void syncRetrieveContextsStringRagquery() throws Exception { + // 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 (VertexRagServiceClient vertexRagServiceClient = VertexRagServiceClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + RagQuery query = RagQuery.newBuilder().build(); + RetrieveContextsResponse response = vertexRagServiceClient.retrieveContexts(parent, query); + } + } +} +// [END aiplatform_v1beta1_generated_VertexRagService_RetrieveContexts_StringRagquery_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragservice/setiampolicy/AsyncSetIamPolicy.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragservice/setiampolicy/AsyncSetIamPolicy.java new file mode 100644 index 000000000000..811ad61feea6 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragservice/setiampolicy/AsyncSetIamPolicy.java @@ -0,0 +1,55 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_VertexRagService_SetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1beta1.EndpointName; +import com.google.cloud.aiplatform.v1beta1.VertexRagServiceClient; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.protobuf.FieldMask; + +public class AsyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncSetIamPolicy(); + } + + public static void asyncSetIamPolicy() throws Exception { + // 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 (VertexRagServiceClient vertexRagServiceClient = VertexRagServiceClient.create()) { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = vertexRagServiceClient.setIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END aiplatform_v1beta1_generated_VertexRagService_SetIamPolicy_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragservice/setiampolicy/SyncSetIamPolicy.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragservice/setiampolicy/SyncSetIamPolicy.java new file mode 100644 index 000000000000..f3d584bd8326 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragservice/setiampolicy/SyncSetIamPolicy.java @@ -0,0 +1,52 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_VertexRagService_SetIamPolicy_sync] +import com.google.cloud.aiplatform.v1beta1.EndpointName; +import com.google.cloud.aiplatform.v1beta1.VertexRagServiceClient; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.protobuf.FieldMask; + +public class SyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + syncSetIamPolicy(); + } + + public static void syncSetIamPolicy() throws Exception { + // 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 (VertexRagServiceClient vertexRagServiceClient = VertexRagServiceClient.create()) { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + Policy response = vertexRagServiceClient.setIamPolicy(request); + } + } +} +// [END aiplatform_v1beta1_generated_VertexRagService_SetIamPolicy_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragservice/testiampermissions/AsyncTestIamPermissions.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragservice/testiampermissions/AsyncTestIamPermissions.java new file mode 100644 index 000000000000..a0a73e5f9cf6 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragservice/testiampermissions/AsyncTestIamPermissions.java @@ -0,0 +1,55 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_VertexRagService_TestIamPermissions_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1beta1.EndpointName; +import com.google.cloud.aiplatform.v1beta1.VertexRagServiceClient; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import java.util.ArrayList; + +public class AsyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + asyncTestIamPermissions(); + } + + public static void asyncTestIamPermissions() throws Exception { + // 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 (VertexRagServiceClient vertexRagServiceClient = VertexRagServiceClient.create()) { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .addAllPermissions(new ArrayList()) + .build(); + ApiFuture future = + vertexRagServiceClient.testIamPermissionsCallable().futureCall(request); + // Do something. + TestIamPermissionsResponse response = future.get(); + } + } +} +// [END aiplatform_v1beta1_generated_VertexRagService_TestIamPermissions_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragservice/testiampermissions/SyncTestIamPermissions.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragservice/testiampermissions/SyncTestIamPermissions.java new file mode 100644 index 000000000000..552b0e8550d6 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragservice/testiampermissions/SyncTestIamPermissions.java @@ -0,0 +1,51 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_VertexRagService_TestIamPermissions_sync] +import com.google.cloud.aiplatform.v1beta1.EndpointName; +import com.google.cloud.aiplatform.v1beta1.VertexRagServiceClient; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import java.util.ArrayList; + +public class SyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + syncTestIamPermissions(); + } + + public static void syncTestIamPermissions() throws Exception { + // 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 (VertexRagServiceClient vertexRagServiceClient = VertexRagServiceClient.create()) { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .addAllPermissions(new ArrayList()) + .build(); + TestIamPermissionsResponse response = vertexRagServiceClient.testIamPermissions(request); + } + } +} +// [END aiplatform_v1beta1_generated_VertexRagService_TestIamPermissions_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragservicesettings/retrievecontexts/SyncRetrieveContexts.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragservicesettings/retrievecontexts/SyncRetrieveContexts.java new file mode 100644 index 000000000000..63dcd98339c2 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/vertexragservicesettings/retrievecontexts/SyncRetrieveContexts.java @@ -0,0 +1,49 @@ +/* + * Copyright 2024 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.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_VertexRagServiceSettings_RetrieveContexts_sync] +import com.google.cloud.aiplatform.v1beta1.VertexRagServiceSettings; +import java.time.Duration; + +public class SyncRetrieveContexts { + + public static void main(String[] args) throws Exception { + syncRetrieveContexts(); + } + + public static void syncRetrieveContexts() throws Exception { + // 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 + VertexRagServiceSettings.Builder vertexRagServiceSettingsBuilder = + VertexRagServiceSettings.newBuilder(); + vertexRagServiceSettingsBuilder + .retrieveContextsSettings() + .setRetrySettings( + vertexRagServiceSettingsBuilder + .retrieveContextsSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + VertexRagServiceSettings vertexRagServiceSettings = vertexRagServiceSettingsBuilder.build(); + } +} +// [END aiplatform_v1beta1_generated_VertexRagServiceSettings_RetrieveContexts_sync] diff --git a/java-alloydb-connectors/README.md b/java-alloydb-connectors/README.md index 0d9649a33b46..07e394c6b54a 100644 --- a/java-alloydb-connectors/README.md +++ b/java-alloydb-connectors/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -201,7 +201,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-alloydb-connectors.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-alloydb-connectors/0.16.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-alloydb-connectors/0.19.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-alloydb/README.md b/java-alloydb/README.md index 6bfe211f0cc9..bc3430275e42 100644 --- a/java-alloydb/README.md +++ b/java-alloydb/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -201,7 +201,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-alloydb.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-alloydb/0.27.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-alloydb/0.30.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-analytics-admin/README.md b/java-analytics-admin/README.md index 946a4a0f89cf..36e44d732526 100644 --- a/java-analytics-admin/README.md +++ b/java-analytics-admin/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -201,7 +201,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.analytics/google-analytics-admin.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.analytics/google-analytics-admin/0.48.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.analytics/google-analytics-admin/0.51.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-analytics-data/README.md b/java-analytics-data/README.md index 739531852c4f..0262ea8d8c1b 100644 --- a/java-analytics-data/README.md +++ b/java-analytics-data/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -201,7 +201,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.analytics/google-analytics-data.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.analytics/google-analytics-data/0.49.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.analytics/google-analytics-data/0.52.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-analyticshub/README.md b/java-analyticshub/README.md index d0fe20b54286..e8fa03983e53 100644 --- a/java-analyticshub/README.md +++ b/java-analyticshub/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -201,7 +201,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-analyticshub.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-analyticshub/0.35.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-analyticshub/0.38.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-api-gateway/README.md b/java-api-gateway/README.md index 41fd1b4a03c8..60e43fb67ea8 100644 --- a/java-api-gateway/README.md +++ b/java-api-gateway/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.34.0 + 26.37.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-api-gateway.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-api-gateway/2.38.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-api-gateway/2.41.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-apigee-connect/README.md b/java-apigee-connect/README.md index 7bd44afa098a..75cbd36c08c2 100644 --- a/java-apigee-connect/README.md +++ b/java-apigee-connect/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.34.0 + 26.37.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-apigee-connect.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-apigee-connect/2.38.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-apigee-connect/2.41.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-apigee-registry/README.md b/java-apigee-registry/README.md index 2c750fe3007e..01de7f2cf1d6 100644 --- a/java-apigee-registry/README.md +++ b/java-apigee-registry/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -201,7 +201,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-apigee-registry.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-apigee-registry/0.38.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-apigee-registry/0.41.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-apikeys/README.md b/java-apikeys/README.md index e5af1b6e6ab7..9278820615d2 100644 --- a/java-apikeys/README.md +++ b/java-apikeys/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -201,7 +201,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-apikeys.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-apikeys/0.36.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-apikeys/0.39.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-appengine-admin/README.md b/java-appengine-admin/README.md index 954d13c61b34..79f6dfcf8ce7 100644 --- a/java-appengine-admin/README.md +++ b/java-appengine-admin/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.34.0 + 26.37.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-appengine-admin.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-appengine-admin/2.38.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-appengine-admin/2.41.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-apphub/README.md b/java-apphub/README.md index 495e2616f636..4219a99b802e 100644 --- a/java-apphub/README.md +++ b/java-apphub/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -201,7 +201,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-apphub.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-apphub/0.2.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-apphub/0.5.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-area120-tables/README.md b/java-area120-tables/README.md index cd34e6c4855b..43f38ae8c4f4 100644 --- a/java-area120-tables/README.md +++ b/java-area120-tables/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -201,7 +201,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.area120/google-area120-tables.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.area120/google-area120-tables/0.42.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.area120/google-area120-tables/0.45.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-artifact-registry/README.md b/java-artifact-registry/README.md index aa02992c2100..6022278994f4 100644 --- a/java-artifact-registry/README.md +++ b/java-artifact-registry/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.34.0 + 26.37.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-artifact-registry.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-artifact-registry/1.37.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-artifact-registry/1.40.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-asset/README.md b/java-asset/README.md index 8f769bf59695..7197a2a26c12 100644 --- a/java-asset/README.md +++ b/java-asset/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.34.0 + 26.37.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-asset.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-asset/3.42.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-asset/3.45.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-asset/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetProto.java b/java-asset/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetProto.java index 3be30beb7831..6d0f1b04bfc7 100644 --- a/java-asset/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetProto.java +++ b/java-asset/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetProto.java @@ -214,107 +214,108 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\003 \001(\t:\002\030\001\"\205\001\n\014RelatedAsset\0223\n\005asset\030\001 \001(" + "\tB$\372A!\n\037cloudasset.googleapis.com/Asset\022" + "\022\n\nasset_type\030\002 \001(\t\022\021\n\tancestors\030\003 \003(\t\022\031" - + "\n\021relationship_type\030\004 \001(\t\"y\n\003Tag\022\024\n\007tag_" - + "key\030\001 \001(\tH\000\210\001\001\022\026\n\ttag_value\030\003 \001(\tH\001\210\001\001\022\031" - + "\n\014tag_value_id\030\004 \001(\tH\002\210\001\001B\n\n\010_tag_keyB\014\n" - + "\n_tag_valueB\017\n\r_tag_value_id\"\177\n\023Effectiv" - + "eTagDetails\022\036\n\021attached_resource\030\001 \001(\tH\000" - + "\210\001\001\0222\n\016effective_tags\030\002 \003(\0132\032.google.clo" - + "ud.asset.v1.TagB\024\n\022_attached_resource\"\332\t" - + "\n\024ResourceSearchResult\022\014\n\004name\030\001 \001(\t\022\022\n\n" - + "asset_type\030\002 \001(\t\022\017\n\007project\030\003 \001(\t\022\017\n\007fol" - + "ders\030\021 \003(\t\022\024\n\014organization\030\022 \001(\t\022\024\n\014disp" - + "lay_name\030\004 \001(\t\022\023\n\013description\030\005 \001(\t\022\020\n\010l" - + "ocation\030\006 \001(\t\022G\n\006labels\030\007 \003(\01327.google.c" - + "loud.asset.v1.ResourceSearchResult.Label" - + "sEntry\022\024\n\014network_tags\030\010 \003(\t\022\023\n\007kms_key\030" - + "\n \001(\tB\002\030\001\022\020\n\010kms_keys\030\034 \003(\t\022/\n\013create_ti" - + "me\030\013 \001(\0132\032.google.protobuf.Timestamp\022/\n\013" - + "update_time\030\014 \001(\0132\032.google.protobuf.Time" - + "stamp\022\r\n\005state\030\r \001(\t\0226\n\025additional_attri" - + "butes\030\t \001(\0132\027.google.protobuf.Struct\022!\n\031" - + "parent_full_resource_name\030\023 \001(\t\022E\n\023versi" - + "oned_resources\030\020 \003(\0132(.google.cloud.asse" - + "t.v1.VersionedResource\022C\n\022attached_resou" - + "rces\030\024 \003(\0132\'.google.cloud.asset.v1.Attac" - + "hedResource\022U\n\rrelationships\030\025 \003(\0132>.goo" - + "gle.cloud.asset.v1.ResourceSearchResult." - + "RelationshipsEntry\022\024\n\010tag_keys\030\027 \003(\tB\002\030\001" - + "\022\026\n\ntag_values\030\031 \003(\tB\002\030\001\022\031\n\rtag_value_id" - + "s\030\032 \003(\tB\002\030\001\022(\n\004tags\030\035 \003(\0132\032.google.cloud" - + ".asset.v1.Tag\022B\n\016effective_tags\030\036 \003(\0132*." - + "google.cloud.asset.v1.EffectiveTagDetail" - + "s\022\031\n\021parent_asset_type\030g \001(\t\022]\n\022scc_secu" - + "rity_marks\030 \003(\0132A.google.cloud.asset.v1" - + ".ResourceSearchResult.SccSecurityMarksEn" - + "try\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value" - + "\030\002 \001(\t:\0028\001\032]\n\022RelationshipsEntry\022\013\n\003key\030" - + "\001 \001(\t\0226\n\005value\030\002 \001(\0132\'.google.cloud.asse" - + "t.v1.RelatedResources:\0028\001\0327\n\025SccSecurity" - + "MarksEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\002" - + "8\001\"O\n\021VersionedResource\022\017\n\007version\030\001 \001(\t" - + "\022)\n\010resource\030\002 \001(\0132\027.google.protobuf.Str" - + "uct\"m\n\020AttachedResource\022\022\n\nasset_type\030\001 " - + "\001(\t\022E\n\023versioned_resources\030\003 \003(\0132(.googl" - + "e.cloud.asset.v1.VersionedResource\"U\n\020Re" - + "latedResources\022A\n\021related_resources\030\001 \003(" - + "\0132&.google.cloud.asset.v1.RelatedResourc" - + "e\"A\n\017RelatedResource\022\022\n\nasset_type\030\001 \001(\t" - + "\022\032\n\022full_resource_name\030\002 \001(\t\"\217\004\n\025IamPoli" - + "cySearchResult\022\020\n\010resource\030\001 \001(\t\022\022\n\nasse" - + "t_type\030\005 \001(\t\022\017\n\007project\030\002 \001(\t\022\017\n\007folders" - + "\030\006 \003(\t\022\024\n\014organization\030\007 \001(\t\022%\n\006policy\030\003" - + " \001(\0132\025.google.iam.v1.Policy\022M\n\013explanati" - + "on\030\004 \001(\01328.google.cloud.asset.v1.IamPoli" - + "cySearchResult.Explanation\032\241\002\n\013Explanati" - + "on\022m\n\023matched_permissions\030\001 \003(\0132P.google" - + ".cloud.asset.v1.IamPolicySearchResult.Ex" - + "planation.MatchedPermissionsEntry\032\"\n\013Per" - + "missions\022\023\n\013permissions\030\001 \003(\t\032\177\n\027Matched" - + "PermissionsEntry\022\013\n\003key\030\001 \001(\t\022S\n\005value\030\002" - + " \001(\0132D.google.cloud.asset.v1.IamPolicySe" - + "archResult.Explanation.Permissions:\0028\001\"G" - + "\n\026IamPolicyAnalysisState\022\036\n\004code\030\001 \001(\0162\020" - + ".google.rpc.Code\022\r\n\005cause\030\002 \001(\t\"\306\001\n\023Cond" - + "itionEvaluation\022T\n\020evaluation_value\030\001 \001(" - + "\0162:.google.cloud.asset.v1.ConditionEvalu" - + "ation.EvaluationValue\"Y\n\017EvaluationValue" - + "\022 \n\034EVALUATION_VALUE_UNSPECIFIED\020\000\022\010\n\004TR" - + "UE\020\001\022\t\n\005FALSE\020\002\022\017\n\013CONDITIONAL\020\003\"\253\t\n\027Iam" - + "PolicyAnalysisResult\022#\n\033attached_resourc" - + "e_full_name\030\001 \001(\t\022+\n\013iam_binding\030\002 \001(\0132\026" - + ".google.iam.v1.Binding\022^\n\024access_control" - + "_lists\030\003 \003(\0132@.google.cloud.asset.v1.Iam" - + "PolicyAnalysisResult.AccessControlList\022R" - + "\n\ridentity_list\030\004 \001(\0132;.google.cloud.ass" - + "et.v1.IamPolicyAnalysisResult.IdentityLi" - + "st\022\026\n\016fully_explored\030\005 \001(\010\032m\n\010Resource\022\032" - + "\n\022full_resource_name\030\001 \001(\t\022E\n\016analysis_s" - + "tate\030\002 \001(\0132-.google.cloud.asset.v1.IamPo" - + "licyAnalysisState\032\205\001\n\006Access\022\016\n\004role\030\001 \001" - + "(\tH\000\022\024\n\npermission\030\002 \001(\tH\000\022E\n\016analysis_s" - + "tate\030\003 \001(\0132-.google.cloud.asset.v1.IamPo" - + "licyAnalysisStateB\016\n\014oneof_access\032_\n\010Ide" - + "ntity\022\014\n\004name\030\001 \001(\t\022E\n\016analysis_state\030\002 " - + "\001(\0132-.google.cloud.asset.v1.IamPolicyAna" - + "lysisState\0320\n\004Edge\022\023\n\013source_node\030\001 \001(\t\022" - + "\023\n\013target_node\030\002 \001(\t\032\277\002\n\021AccessControlLi" - + "st\022J\n\tresources\030\001 \003(\01327.google.cloud.ass" - + "et.v1.IamPolicyAnalysisResult.Resource\022G" - + "\n\010accesses\030\002 \003(\01325.google.cloud.asset.v1" - + ".IamPolicyAnalysisResult.Access\022K\n\016resou" - + "rce_edges\030\003 \003(\01323.google.cloud.asset.v1." - + "IamPolicyAnalysisResult.Edge\022H\n\024conditio" - + "n_evaluation\030\004 \001(\0132*.google.cloud.asset." - + "v1.ConditionEvaluation\032\245\001\n\014IdentityList\022" - + "K\n\nidentities\030\001 \003(\01327.google.cloud.asset" - + ".v1.IamPolicyAnalysisResult.Identity\022H\n\013" - + "group_edges\030\002 \003(\01323.google.cloud.asset.v" - + "1.IamPolicyAnalysisResult.EdgeB\215\001\n\031com.g" - + "oogle.cloud.asset.v1B\nAssetProtoP\001Z/clou" - + "d.google.com/go/asset/apiv1/assetpb;asse" - + "tpb\370\001\001\252\002\025Google.Cloud.Asset.V1\312\002\025Google\\" - + "Cloud\\Asset\\V1b\006proto3" + + "\n\021relationship_type\030\004 \001(\t\"\241\001\n\003Tag\022\024\n\007tag" + + "_key\030\001 \001(\tH\000\210\001\001\022\027\n\ntag_key_id\030\002 \001(\tH\001\210\001\001" + + "\022\026\n\ttag_value\030\003 \001(\tH\002\210\001\001\022\031\n\014tag_value_id" + + "\030\004 \001(\tH\003\210\001\001B\n\n\010_tag_keyB\r\n\013_tag_key_idB\014" + + "\n\n_tag_valueB\017\n\r_tag_value_id\"\177\n\023Effecti" + + "veTagDetails\022\036\n\021attached_resource\030\001 \001(\tH" + + "\000\210\001\001\0222\n\016effective_tags\030\002 \003(\0132\032.google.cl" + + "oud.asset.v1.TagB\024\n\022_attached_resource\"\332" + + "\t\n\024ResourceSearchResult\022\014\n\004name\030\001 \001(\t\022\022\n" + + "\nasset_type\030\002 \001(\t\022\017\n\007project\030\003 \001(\t\022\017\n\007fo" + + "lders\030\021 \003(\t\022\024\n\014organization\030\022 \001(\t\022\024\n\014dis" + + "play_name\030\004 \001(\t\022\023\n\013description\030\005 \001(\t\022\020\n\010" + + "location\030\006 \001(\t\022G\n\006labels\030\007 \003(\01327.google." + + "cloud.asset.v1.ResourceSearchResult.Labe" + + "lsEntry\022\024\n\014network_tags\030\010 \003(\t\022\023\n\007kms_key" + + "\030\n \001(\tB\002\030\001\022\020\n\010kms_keys\030\034 \003(\t\022/\n\013create_t" + + "ime\030\013 \001(\0132\032.google.protobuf.Timestamp\022/\n" + + "\013update_time\030\014 \001(\0132\032.google.protobuf.Tim" + + "estamp\022\r\n\005state\030\r \001(\t\0226\n\025additional_attr" + + "ibutes\030\t \001(\0132\027.google.protobuf.Struct\022!\n" + + "\031parent_full_resource_name\030\023 \001(\t\022E\n\023vers" + + "ioned_resources\030\020 \003(\0132(.google.cloud.ass" + + "et.v1.VersionedResource\022C\n\022attached_reso" + + "urces\030\024 \003(\0132\'.google.cloud.asset.v1.Atta" + + "chedResource\022U\n\rrelationships\030\025 \003(\0132>.go" + + "ogle.cloud.asset.v1.ResourceSearchResult" + + ".RelationshipsEntry\022\024\n\010tag_keys\030\027 \003(\tB\002\030" + + "\001\022\026\n\ntag_values\030\031 \003(\tB\002\030\001\022\031\n\rtag_value_i" + + "ds\030\032 \003(\tB\002\030\001\022(\n\004tags\030\035 \003(\0132\032.google.clou" + + "d.asset.v1.Tag\022B\n\016effective_tags\030\036 \003(\0132*" + + ".google.cloud.asset.v1.EffectiveTagDetai" + + "ls\022\031\n\021parent_asset_type\030g \001(\t\022]\n\022scc_sec" + + "urity_marks\030 \003(\0132A.google.cloud.asset.v" + + "1.ResourceSearchResult.SccSecurityMarksE" + + "ntry\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005valu" + + "e\030\002 \001(\t:\0028\001\032]\n\022RelationshipsEntry\022\013\n\003key" + + "\030\001 \001(\t\0226\n\005value\030\002 \001(\0132\'.google.cloud.ass" + + "et.v1.RelatedResources:\0028\001\0327\n\025SccSecurit" + + "yMarksEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:" + + "\0028\001\"O\n\021VersionedResource\022\017\n\007version\030\001 \001(" + + "\t\022)\n\010resource\030\002 \001(\0132\027.google.protobuf.St" + + "ruct\"m\n\020AttachedResource\022\022\n\nasset_type\030\001" + + " \001(\t\022E\n\023versioned_resources\030\003 \003(\0132(.goog" + + "le.cloud.asset.v1.VersionedResource\"U\n\020R" + + "elatedResources\022A\n\021related_resources\030\001 \003" + + "(\0132&.google.cloud.asset.v1.RelatedResour" + + "ce\"A\n\017RelatedResource\022\022\n\nasset_type\030\001 \001(" + + "\t\022\032\n\022full_resource_name\030\002 \001(\t\"\217\004\n\025IamPol" + + "icySearchResult\022\020\n\010resource\030\001 \001(\t\022\022\n\nass" + + "et_type\030\005 \001(\t\022\017\n\007project\030\002 \001(\t\022\017\n\007folder" + + "s\030\006 \003(\t\022\024\n\014organization\030\007 \001(\t\022%\n\006policy\030" + + "\003 \001(\0132\025.google.iam.v1.Policy\022M\n\013explanat" + + "ion\030\004 \001(\01328.google.cloud.asset.v1.IamPol" + + "icySearchResult.Explanation\032\241\002\n\013Explanat" + + "ion\022m\n\023matched_permissions\030\001 \003(\0132P.googl" + + "e.cloud.asset.v1.IamPolicySearchResult.E" + + "xplanation.MatchedPermissionsEntry\032\"\n\013Pe" + + "rmissions\022\023\n\013permissions\030\001 \003(\t\032\177\n\027Matche" + + "dPermissionsEntry\022\013\n\003key\030\001 \001(\t\022S\n\005value\030" + + "\002 \001(\0132D.google.cloud.asset.v1.IamPolicyS" + + "earchResult.Explanation.Permissions:\0028\001\"" + + "G\n\026IamPolicyAnalysisState\022\036\n\004code\030\001 \001(\0162" + + "\020.google.rpc.Code\022\r\n\005cause\030\002 \001(\t\"\306\001\n\023Con" + + "ditionEvaluation\022T\n\020evaluation_value\030\001 \001" + + "(\0162:.google.cloud.asset.v1.ConditionEval" + + "uation.EvaluationValue\"Y\n\017EvaluationValu" + + "e\022 \n\034EVALUATION_VALUE_UNSPECIFIED\020\000\022\010\n\004T" + + "RUE\020\001\022\t\n\005FALSE\020\002\022\017\n\013CONDITIONAL\020\003\"\253\t\n\027Ia" + + "mPolicyAnalysisResult\022#\n\033attached_resour" + + "ce_full_name\030\001 \001(\t\022+\n\013iam_binding\030\002 \001(\0132" + + "\026.google.iam.v1.Binding\022^\n\024access_contro" + + "l_lists\030\003 \003(\0132@.google.cloud.asset.v1.Ia" + + "mPolicyAnalysisResult.AccessControlList\022" + + "R\n\ridentity_list\030\004 \001(\0132;.google.cloud.as" + + "set.v1.IamPolicyAnalysisResult.IdentityL" + + "ist\022\026\n\016fully_explored\030\005 \001(\010\032m\n\010Resource\022" + + "\032\n\022full_resource_name\030\001 \001(\t\022E\n\016analysis_" + + "state\030\002 \001(\0132-.google.cloud.asset.v1.IamP" + + "olicyAnalysisState\032\205\001\n\006Access\022\016\n\004role\030\001 " + + "\001(\tH\000\022\024\n\npermission\030\002 \001(\tH\000\022E\n\016analysis_" + + "state\030\003 \001(\0132-.google.cloud.asset.v1.IamP" + + "olicyAnalysisStateB\016\n\014oneof_access\032_\n\010Id" + + "entity\022\014\n\004name\030\001 \001(\t\022E\n\016analysis_state\030\002" + + " \001(\0132-.google.cloud.asset.v1.IamPolicyAn" + + "alysisState\0320\n\004Edge\022\023\n\013source_node\030\001 \001(\t" + + "\022\023\n\013target_node\030\002 \001(\t\032\277\002\n\021AccessControlL" + + "ist\022J\n\tresources\030\001 \003(\01327.google.cloud.as" + + "set.v1.IamPolicyAnalysisResult.Resource\022" + + "G\n\010accesses\030\002 \003(\01325.google.cloud.asset.v" + + "1.IamPolicyAnalysisResult.Access\022K\n\016reso" + + "urce_edges\030\003 \003(\01323.google.cloud.asset.v1" + + ".IamPolicyAnalysisResult.Edge\022H\n\024conditi" + + "on_evaluation\030\004 \001(\0132*.google.cloud.asset" + + ".v1.ConditionEvaluation\032\245\001\n\014IdentityList" + + "\022K\n\nidentities\030\001 \003(\01327.google.cloud.asse" + + "t.v1.IamPolicyAnalysisResult.Identity\022H\n" + + "\013group_edges\030\002 \003(\01323.google.cloud.asset." + + "v1.IamPolicyAnalysisResult.EdgeB\215\001\n\031com." + + "google.cloud.asset.v1B\nAssetProtoP\001Z/clo" + + "ud.google.com/go/asset/apiv1/assetpb;ass" + + "etpb\370\001\001\252\002\025Google.Cloud.Asset.V1\312\002\025Google" + + "\\Cloud\\Asset\\V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -411,7 +412,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_asset_v1_Tag_descriptor, new java.lang.String[] { - "TagKey", "TagValue", "TagValueId", + "TagKey", "TagKeyId", "TagValue", "TagValueId", }); internal_static_google_cloud_asset_v1_EffectiveTagDetails_descriptor = getDescriptor().getMessageTypes().get(8); diff --git a/java-asset/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ResourceSearchResult.java b/java-asset/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ResourceSearchResult.java index 91d5a27d6ce1..494156fea2a5 100644 --- a/java-asset/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ResourceSearchResult.java +++ b/java-asset/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ResourceSearchResult.java @@ -936,7 +936,7 @@ public com.google.protobuf.ByteString getNetworkTagsBytes(int index) { * string kms_key = 10 [deprecated = true]; * * @deprecated google.cloud.asset.v1.ResourceSearchResult.kms_key is deprecated. See - * google/cloud/asset/v1/assets.proto;l=468 + * google/cloud/asset/v1/assets.proto;l=471 * @return The kmsKey. */ @java.lang.Override @@ -978,7 +978,7 @@ public java.lang.String getKmsKey() { * string kms_key = 10 [deprecated = true]; * * @deprecated google.cloud.asset.v1.ResourceSearchResult.kms_key is deprecated. See - * google/cloud/asset/v1/assets.proto;l=468 + * google/cloud/asset/v1/assets.proto;l=471 * @return The bytes for kmsKey. */ @java.lang.Override @@ -1873,7 +1873,7 @@ public com.google.cloud.asset.v1.RelatedResources getRelationshipsOrThrow(java.l * repeated string tag_keys = 23 [deprecated = true]; * * @deprecated google.cloud.asset.v1.ResourceSearchResult.tag_keys is deprecated. See - * google/cloud/asset/v1/assets.proto;l=601 + * google/cloud/asset/v1/assets.proto;l=604 * @return A list containing the tagKeys. */ @java.lang.Deprecated @@ -1902,7 +1902,7 @@ public com.google.protobuf.ProtocolStringList getTagKeysList() { * repeated string tag_keys = 23 [deprecated = true]; * * @deprecated google.cloud.asset.v1.ResourceSearchResult.tag_keys is deprecated. See - * google/cloud/asset/v1/assets.proto;l=601 + * google/cloud/asset/v1/assets.proto;l=604 * @return The count of tagKeys. */ @java.lang.Deprecated @@ -1931,7 +1931,7 @@ public int getTagKeysCount() { * repeated string tag_keys = 23 [deprecated = true]; * * @deprecated google.cloud.asset.v1.ResourceSearchResult.tag_keys is deprecated. See - * google/cloud/asset/v1/assets.proto;l=601 + * google/cloud/asset/v1/assets.proto;l=604 * @param index The index of the element to return. * @return The tagKeys at the given index. */ @@ -1961,7 +1961,7 @@ public java.lang.String getTagKeys(int index) { * repeated string tag_keys = 23 [deprecated = true]; * * @deprecated google.cloud.asset.v1.ResourceSearchResult.tag_keys is deprecated. See - * google/cloud/asset/v1/assets.proto;l=601 + * google/cloud/asset/v1/assets.proto;l=604 * @param index The index of the value to return. * @return The bytes of the tagKeys at the given index. */ @@ -1999,7 +1999,7 @@ public com.google.protobuf.ByteString getTagKeysBytes(int index) { * repeated string tag_values = 25 [deprecated = true]; * * @deprecated google.cloud.asset.v1.ResourceSearchResult.tag_values is deprecated. See - * google/cloud/asset/v1/assets.proto;l=618 + * google/cloud/asset/v1/assets.proto;l=621 * @return A list containing the tagValues. */ @java.lang.Deprecated @@ -2030,7 +2030,7 @@ public com.google.protobuf.ProtocolStringList getTagValuesList() { * repeated string tag_values = 25 [deprecated = true]; * * @deprecated google.cloud.asset.v1.ResourceSearchResult.tag_values is deprecated. See - * google/cloud/asset/v1/assets.proto;l=618 + * google/cloud/asset/v1/assets.proto;l=621 * @return The count of tagValues. */ @java.lang.Deprecated @@ -2061,7 +2061,7 @@ public int getTagValuesCount() { * repeated string tag_values = 25 [deprecated = true]; * * @deprecated google.cloud.asset.v1.ResourceSearchResult.tag_values is deprecated. See - * google/cloud/asset/v1/assets.proto;l=618 + * google/cloud/asset/v1/assets.proto;l=621 * @param index The index of the element to return. * @return The tagValues at the given index. */ @@ -2093,7 +2093,7 @@ public java.lang.String getTagValues(int index) { * repeated string tag_values = 25 [deprecated = true]; * * @deprecated google.cloud.asset.v1.ResourceSearchResult.tag_values is deprecated. See - * google/cloud/asset/v1/assets.proto;l=618 + * google/cloud/asset/v1/assets.proto;l=621 * @param index The index of the value to return. * @return The bytes of the tagValues at the given index. */ @@ -2127,7 +2127,7 @@ public com.google.protobuf.ByteString getTagValuesBytes(int index) { * repeated string tag_value_ids = 26 [deprecated = true]; * * @deprecated google.cloud.asset.v1.ResourceSearchResult.tag_value_ids is deprecated. See - * google/cloud/asset/v1/assets.proto;l=631 + * google/cloud/asset/v1/assets.proto;l=634 * @return A list containing the tagValueIds. */ @java.lang.Deprecated @@ -2154,7 +2154,7 @@ public com.google.protobuf.ProtocolStringList getTagValueIdsList() { * repeated string tag_value_ids = 26 [deprecated = true]; * * @deprecated google.cloud.asset.v1.ResourceSearchResult.tag_value_ids is deprecated. See - * google/cloud/asset/v1/assets.proto;l=631 + * google/cloud/asset/v1/assets.proto;l=634 * @return The count of tagValueIds. */ @java.lang.Deprecated @@ -2181,7 +2181,7 @@ public int getTagValueIdsCount() { * repeated string tag_value_ids = 26 [deprecated = true]; * * @deprecated google.cloud.asset.v1.ResourceSearchResult.tag_value_ids is deprecated. See - * google/cloud/asset/v1/assets.proto;l=631 + * google/cloud/asset/v1/assets.proto;l=634 * @param index The index of the element to return. * @return The tagValueIds at the given index. */ @@ -2209,7 +2209,7 @@ public java.lang.String getTagValueIds(int index) { * repeated string tag_value_ids = 26 [deprecated = true]; * * @deprecated google.cloud.asset.v1.ResourceSearchResult.tag_value_ids is deprecated. See - * google/cloud/asset/v1/assets.proto;l=631 + * google/cloud/asset/v1/assets.proto;l=634 * @param index The index of the value to return. * @return The bytes of the tagValueIds at the given index. */ @@ -2234,6 +2234,7 @@ public com.google.protobuf.ByteString getTagValueIdsBytes(int index) { * - `tagKeys:"123456789/env*"` * - `tagKeys="123456789/env"` * - `tagKeys:"env"` + * - `tagKeyIds="tagKeys/123"` * - `tagValues:"env"` * - `tagValues:"env/prod"` * - `tagValues:"123456789/env/prod*"` @@ -2262,6 +2263,7 @@ public java.util.List getTagsList() { * - `tagKeys:"123456789/env*"` * - `tagKeys="123456789/env"` * - `tagKeys:"env"` + * - `tagKeyIds="tagKeys/123"` * - `tagValues:"env"` * - `tagValues:"env/prod"` * - `tagValues:"123456789/env/prod*"` @@ -2290,6 +2292,7 @@ public java.util.List getTagsO * - `tagKeys:"123456789/env*"` * - `tagKeys="123456789/env"` * - `tagKeys:"env"` + * - `tagKeyIds="tagKeys/123"` * - `tagValues:"env"` * - `tagValues:"env/prod"` * - `tagValues:"123456789/env/prod*"` @@ -2318,6 +2321,7 @@ public int getTagsCount() { * - `tagKeys:"123456789/env*"` * - `tagKeys="123456789/env"` * - `tagKeys:"env"` + * - `tagKeyIds="tagKeys/123"` * - `tagValues:"env"` * - `tagValues:"env/prod"` * - `tagValues:"123456789/env/prod*"` @@ -2346,6 +2350,7 @@ public com.google.cloud.asset.v1.Tag getTags(int index) { * - `tagKeys:"123456789/env*"` * - `tagKeys="123456789/env"` * - `tagKeys:"env"` + * - `tagKeyIds="tagKeys/123"` * - `tagValues:"env"` * - `tagValues:"env/prod"` * - `tagValues:"123456789/env/prod*"` @@ -2382,6 +2387,7 @@ public com.google.cloud.asset.v1.TagOrBuilder getTagsOrBuilder(int index) { * - `effectiveTagKeys:"123456789/env*"` * - `effectiveTagKeys="123456789/env"` * - `effectiveTagKeys:"env"` + * - `effectiveTagKeyIds="tagKeys/123"` * - `effectiveTagValues:"env"` * - `effectiveTagValues:"env/prod"` * - `effectiveTagValues:"123456789/env/prod*"` @@ -2410,6 +2416,7 @@ public java.util.List getEffectiv * - `effectiveTagKeys:"123456789/env*"` * - `effectiveTagKeys="123456789/env"` * - `effectiveTagKeys:"env"` + * - `effectiveTagKeyIds="tagKeys/123"` * - `effectiveTagValues:"env"` * - `effectiveTagValues:"env/prod"` * - `effectiveTagValues:"123456789/env/prod*"` @@ -2439,6 +2446,7 @@ public java.util.List getEffectiv * - `effectiveTagKeys:"123456789/env*"` * - `effectiveTagKeys="123456789/env"` * - `effectiveTagKeys:"env"` + * - `effectiveTagKeyIds="tagKeys/123"` * - `effectiveTagValues:"env"` * - `effectiveTagValues:"env/prod"` * - `effectiveTagValues:"123456789/env/prod*"` @@ -2467,6 +2475,7 @@ public int getEffectiveTagsCount() { * - `effectiveTagKeys:"123456789/env*"` * - `effectiveTagKeys="123456789/env"` * - `effectiveTagKeys:"env"` + * - `effectiveTagKeyIds="tagKeys/123"` * - `effectiveTagValues:"env"` * - `effectiveTagValues:"env/prod"` * - `effectiveTagValues:"123456789/env/prod*"` @@ -2495,6 +2504,7 @@ public com.google.cloud.asset.v1.EffectiveTagDetails getEffectiveTags(int index) * - `effectiveTagKeys:"123456789/env*"` * - `effectiveTagKeys="123456789/env"` * - `effectiveTagKeys:"env"` + * - `effectiveTagKeyIds="tagKeys/123"` * - `effectiveTagValues:"env"` * - `effectiveTagValues:"env/prod"` * - `effectiveTagValues:"123456789/env/prod*"` @@ -5825,7 +5835,7 @@ public Builder addNetworkTagsBytes(com.google.protobuf.ByteString value) { * string kms_key = 10 [deprecated = true]; * * @deprecated google.cloud.asset.v1.ResourceSearchResult.kms_key is deprecated. See - * google/cloud/asset/v1/assets.proto;l=468 + * google/cloud/asset/v1/assets.proto;l=471 * @return The kmsKey. */ @java.lang.Deprecated @@ -5866,7 +5876,7 @@ public java.lang.String getKmsKey() { * string kms_key = 10 [deprecated = true]; * * @deprecated google.cloud.asset.v1.ResourceSearchResult.kms_key is deprecated. See - * google/cloud/asset/v1/assets.proto;l=468 + * google/cloud/asset/v1/assets.proto;l=471 * @return The bytes for kmsKey. */ @java.lang.Deprecated @@ -5907,7 +5917,7 @@ public com.google.protobuf.ByteString getKmsKeyBytes() { * string kms_key = 10 [deprecated = true]; * * @deprecated google.cloud.asset.v1.ResourceSearchResult.kms_key is deprecated. See - * google/cloud/asset/v1/assets.proto;l=468 + * google/cloud/asset/v1/assets.proto;l=471 * @param value The kmsKey to set. * @return This builder for chaining. */ @@ -5947,7 +5957,7 @@ public Builder setKmsKey(java.lang.String value) { * string kms_key = 10 [deprecated = true]; * * @deprecated google.cloud.asset.v1.ResourceSearchResult.kms_key is deprecated. See - * google/cloud/asset/v1/assets.proto;l=468 + * google/cloud/asset/v1/assets.proto;l=471 * @return This builder for chaining. */ @java.lang.Deprecated @@ -5983,7 +5993,7 @@ public Builder clearKmsKey() { * string kms_key = 10 [deprecated = true]; * * @deprecated google.cloud.asset.v1.ResourceSearchResult.kms_key is deprecated. See - * google/cloud/asset/v1/assets.proto;l=468 + * google/cloud/asset/v1/assets.proto;l=471 * @param value The bytes for kmsKey to set. * @return This builder for chaining. */ @@ -8749,7 +8759,7 @@ private void ensureTagKeysIsMutable() { * repeated string tag_keys = 23 [deprecated = true]; * * @deprecated google.cloud.asset.v1.ResourceSearchResult.tag_keys is deprecated. See - * google/cloud/asset/v1/assets.proto;l=601 + * google/cloud/asset/v1/assets.proto;l=604 * @return A list containing the tagKeys. */ @java.lang.Deprecated @@ -8779,7 +8789,7 @@ public com.google.protobuf.ProtocolStringList getTagKeysList() { * repeated string tag_keys = 23 [deprecated = true]; * * @deprecated google.cloud.asset.v1.ResourceSearchResult.tag_keys is deprecated. See - * google/cloud/asset/v1/assets.proto;l=601 + * google/cloud/asset/v1/assets.proto;l=604 * @return The count of tagKeys. */ @java.lang.Deprecated @@ -8808,7 +8818,7 @@ public int getTagKeysCount() { * repeated string tag_keys = 23 [deprecated = true]; * * @deprecated google.cloud.asset.v1.ResourceSearchResult.tag_keys is deprecated. See - * google/cloud/asset/v1/assets.proto;l=601 + * google/cloud/asset/v1/assets.proto;l=604 * @param index The index of the element to return. * @return The tagKeys at the given index. */ @@ -8838,7 +8848,7 @@ public java.lang.String getTagKeys(int index) { * repeated string tag_keys = 23 [deprecated = true]; * * @deprecated google.cloud.asset.v1.ResourceSearchResult.tag_keys is deprecated. See - * google/cloud/asset/v1/assets.proto;l=601 + * google/cloud/asset/v1/assets.proto;l=604 * @param index The index of the value to return. * @return The bytes of the tagKeys at the given index. */ @@ -8868,7 +8878,7 @@ public com.google.protobuf.ByteString getTagKeysBytes(int index) { * repeated string tag_keys = 23 [deprecated = true]; * * @deprecated google.cloud.asset.v1.ResourceSearchResult.tag_keys is deprecated. See - * google/cloud/asset/v1/assets.proto;l=601 + * google/cloud/asset/v1/assets.proto;l=604 * @param index The index to set the value at. * @param value The tagKeys to set. * @return This builder for chaining. @@ -8906,7 +8916,7 @@ public Builder setTagKeys(int index, java.lang.String value) { * repeated string tag_keys = 23 [deprecated = true]; * * @deprecated google.cloud.asset.v1.ResourceSearchResult.tag_keys is deprecated. See - * google/cloud/asset/v1/assets.proto;l=601 + * google/cloud/asset/v1/assets.proto;l=604 * @param value The tagKeys to add. * @return This builder for chaining. */ @@ -8943,7 +8953,7 @@ public Builder addTagKeys(java.lang.String value) { * repeated string tag_keys = 23 [deprecated = true]; * * @deprecated google.cloud.asset.v1.ResourceSearchResult.tag_keys is deprecated. See - * google/cloud/asset/v1/assets.proto;l=601 + * google/cloud/asset/v1/assets.proto;l=604 * @param values The tagKeys to add. * @return This builder for chaining. */ @@ -8977,7 +8987,7 @@ public Builder addAllTagKeys(java.lang.Iterable values) { * repeated string tag_keys = 23 [deprecated = true]; * * @deprecated google.cloud.asset.v1.ResourceSearchResult.tag_keys is deprecated. See - * google/cloud/asset/v1/assets.proto;l=601 + * google/cloud/asset/v1/assets.proto;l=604 * @return This builder for chaining. */ @java.lang.Deprecated @@ -9010,7 +9020,7 @@ public Builder clearTagKeys() { * repeated string tag_keys = 23 [deprecated = true]; * * @deprecated google.cloud.asset.v1.ResourceSearchResult.tag_keys is deprecated. See - * google/cloud/asset/v1/assets.proto;l=601 + * google/cloud/asset/v1/assets.proto;l=604 * @param value The bytes of the tagKeys to add. * @return This builder for chaining. */ @@ -9060,7 +9070,7 @@ private void ensureTagValuesIsMutable() { * repeated string tag_values = 25 [deprecated = true]; * * @deprecated google.cloud.asset.v1.ResourceSearchResult.tag_values is deprecated. See - * google/cloud/asset/v1/assets.proto;l=618 + * google/cloud/asset/v1/assets.proto;l=621 * @return A list containing the tagValues. */ @java.lang.Deprecated @@ -9092,7 +9102,7 @@ public com.google.protobuf.ProtocolStringList getTagValuesList() { * repeated string tag_values = 25 [deprecated = true]; * * @deprecated google.cloud.asset.v1.ResourceSearchResult.tag_values is deprecated. See - * google/cloud/asset/v1/assets.proto;l=618 + * google/cloud/asset/v1/assets.proto;l=621 * @return The count of tagValues. */ @java.lang.Deprecated @@ -9123,7 +9133,7 @@ public int getTagValuesCount() { * repeated string tag_values = 25 [deprecated = true]; * * @deprecated google.cloud.asset.v1.ResourceSearchResult.tag_values is deprecated. See - * google/cloud/asset/v1/assets.proto;l=618 + * google/cloud/asset/v1/assets.proto;l=621 * @param index The index of the element to return. * @return The tagValues at the given index. */ @@ -9155,7 +9165,7 @@ public java.lang.String getTagValues(int index) { * repeated string tag_values = 25 [deprecated = true]; * * @deprecated google.cloud.asset.v1.ResourceSearchResult.tag_values is deprecated. See - * google/cloud/asset/v1/assets.proto;l=618 + * google/cloud/asset/v1/assets.proto;l=621 * @param index The index of the value to return. * @return The bytes of the tagValues at the given index. */ @@ -9187,7 +9197,7 @@ public com.google.protobuf.ByteString getTagValuesBytes(int index) { * repeated string tag_values = 25 [deprecated = true]; * * @deprecated google.cloud.asset.v1.ResourceSearchResult.tag_values is deprecated. See - * google/cloud/asset/v1/assets.proto;l=618 + * google/cloud/asset/v1/assets.proto;l=621 * @param index The index to set the value at. * @param value The tagValues to set. * @return This builder for chaining. @@ -9227,7 +9237,7 @@ public Builder setTagValues(int index, java.lang.String value) { * repeated string tag_values = 25 [deprecated = true]; * * @deprecated google.cloud.asset.v1.ResourceSearchResult.tag_values is deprecated. See - * google/cloud/asset/v1/assets.proto;l=618 + * google/cloud/asset/v1/assets.proto;l=621 * @param value The tagValues to add. * @return This builder for chaining. */ @@ -9266,7 +9276,7 @@ public Builder addTagValues(java.lang.String value) { * repeated string tag_values = 25 [deprecated = true]; * * @deprecated google.cloud.asset.v1.ResourceSearchResult.tag_values is deprecated. See - * google/cloud/asset/v1/assets.proto;l=618 + * google/cloud/asset/v1/assets.proto;l=621 * @param values The tagValues to add. * @return This builder for chaining. */ @@ -9302,7 +9312,7 @@ public Builder addAllTagValues(java.lang.Iterable values) { * repeated string tag_values = 25 [deprecated = true]; * * @deprecated google.cloud.asset.v1.ResourceSearchResult.tag_values is deprecated. See - * google/cloud/asset/v1/assets.proto;l=618 + * google/cloud/asset/v1/assets.proto;l=621 * @return This builder for chaining. */ @java.lang.Deprecated @@ -9337,7 +9347,7 @@ public Builder clearTagValues() { * repeated string tag_values = 25 [deprecated = true]; * * @deprecated google.cloud.asset.v1.ResourceSearchResult.tag_values is deprecated. See - * google/cloud/asset/v1/assets.proto;l=618 + * google/cloud/asset/v1/assets.proto;l=621 * @param value The bytes of the tagValues to add. * @return This builder for chaining. */ @@ -9383,7 +9393,7 @@ private void ensureTagValueIdsIsMutable() { * repeated string tag_value_ids = 26 [deprecated = true]; * * @deprecated google.cloud.asset.v1.ResourceSearchResult.tag_value_ids is deprecated. See - * google/cloud/asset/v1/assets.proto;l=631 + * google/cloud/asset/v1/assets.proto;l=634 * @return A list containing the tagValueIds. */ @java.lang.Deprecated @@ -9411,7 +9421,7 @@ public com.google.protobuf.ProtocolStringList getTagValueIdsList() { * repeated string tag_value_ids = 26 [deprecated = true]; * * @deprecated google.cloud.asset.v1.ResourceSearchResult.tag_value_ids is deprecated. See - * google/cloud/asset/v1/assets.proto;l=631 + * google/cloud/asset/v1/assets.proto;l=634 * @return The count of tagValueIds. */ @java.lang.Deprecated @@ -9438,7 +9448,7 @@ public int getTagValueIdsCount() { * repeated string tag_value_ids = 26 [deprecated = true]; * * @deprecated google.cloud.asset.v1.ResourceSearchResult.tag_value_ids is deprecated. See - * google/cloud/asset/v1/assets.proto;l=631 + * google/cloud/asset/v1/assets.proto;l=634 * @param index The index of the element to return. * @return The tagValueIds at the given index. */ @@ -9466,7 +9476,7 @@ public java.lang.String getTagValueIds(int index) { * repeated string tag_value_ids = 26 [deprecated = true]; * * @deprecated google.cloud.asset.v1.ResourceSearchResult.tag_value_ids is deprecated. See - * google/cloud/asset/v1/assets.proto;l=631 + * google/cloud/asset/v1/assets.proto;l=634 * @param index The index of the value to return. * @return The bytes of the tagValueIds at the given index. */ @@ -9494,7 +9504,7 @@ public com.google.protobuf.ByteString getTagValueIdsBytes(int index) { * repeated string tag_value_ids = 26 [deprecated = true]; * * @deprecated google.cloud.asset.v1.ResourceSearchResult.tag_value_ids is deprecated. See - * google/cloud/asset/v1/assets.proto;l=631 + * google/cloud/asset/v1/assets.proto;l=634 * @param index The index to set the value at. * @param value The tagValueIds to set. * @return This builder for chaining. @@ -9530,7 +9540,7 @@ public Builder setTagValueIds(int index, java.lang.String value) { * repeated string tag_value_ids = 26 [deprecated = true]; * * @deprecated google.cloud.asset.v1.ResourceSearchResult.tag_value_ids is deprecated. See - * google/cloud/asset/v1/assets.proto;l=631 + * google/cloud/asset/v1/assets.proto;l=634 * @param value The tagValueIds to add. * @return This builder for chaining. */ @@ -9565,7 +9575,7 @@ public Builder addTagValueIds(java.lang.String value) { * repeated string tag_value_ids = 26 [deprecated = true]; * * @deprecated google.cloud.asset.v1.ResourceSearchResult.tag_value_ids is deprecated. See - * google/cloud/asset/v1/assets.proto;l=631 + * google/cloud/asset/v1/assets.proto;l=634 * @param values The tagValueIds to add. * @return This builder for chaining. */ @@ -9597,7 +9607,7 @@ public Builder addAllTagValueIds(java.lang.Iterable values) { * repeated string tag_value_ids = 26 [deprecated = true]; * * @deprecated google.cloud.asset.v1.ResourceSearchResult.tag_value_ids is deprecated. See - * google/cloud/asset/v1/assets.proto;l=631 + * google/cloud/asset/v1/assets.proto;l=634 * @return This builder for chaining. */ @java.lang.Deprecated @@ -9628,7 +9638,7 @@ public Builder clearTagValueIds() { * repeated string tag_value_ids = 26 [deprecated = true]; * * @deprecated google.cloud.asset.v1.ResourceSearchResult.tag_value_ids is deprecated. See - * google/cloud/asset/v1/assets.proto;l=631 + * google/cloud/asset/v1/assets.proto;l=634 * @param value The bytes of the tagValueIds to add. * @return This builder for chaining. */ @@ -9672,6 +9682,7 @@ private void ensureTagsIsMutable() { * - `tagKeys:"123456789/env*"` * - `tagKeys="123456789/env"` * - `tagKeys:"env"` + * - `tagKeyIds="tagKeys/123"` * - `tagValues:"env"` * - `tagValues:"env/prod"` * - `tagValues:"123456789/env/prod*"` @@ -9703,6 +9714,7 @@ public java.util.List getTagsList() { * - `tagKeys:"123456789/env*"` * - `tagKeys="123456789/env"` * - `tagKeys:"env"` + * - `tagKeyIds="tagKeys/123"` * - `tagValues:"env"` * - `tagValues:"env/prod"` * - `tagValues:"123456789/env/prod*"` @@ -9734,6 +9746,7 @@ public int getTagsCount() { * - `tagKeys:"123456789/env*"` * - `tagKeys="123456789/env"` * - `tagKeys:"env"` + * - `tagKeyIds="tagKeys/123"` * - `tagValues:"env"` * - `tagValues:"env/prod"` * - `tagValues:"123456789/env/prod*"` @@ -9765,6 +9778,7 @@ public com.google.cloud.asset.v1.Tag getTags(int index) { * - `tagKeys:"123456789/env*"` * - `tagKeys="123456789/env"` * - `tagKeys:"env"` + * - `tagKeyIds="tagKeys/123"` * - `tagValues:"env"` * - `tagValues:"env/prod"` * - `tagValues:"123456789/env/prod*"` @@ -9802,6 +9816,7 @@ public Builder setTags(int index, com.google.cloud.asset.v1.Tag value) { * - `tagKeys:"123456789/env*"` * - `tagKeys="123456789/env"` * - `tagKeys:"env"` + * - `tagKeyIds="tagKeys/123"` * - `tagValues:"env"` * - `tagValues:"env/prod"` * - `tagValues:"123456789/env/prod*"` @@ -9836,6 +9851,7 @@ public Builder setTags(int index, com.google.cloud.asset.v1.Tag.Builder builderF * - `tagKeys:"123456789/env*"` * - `tagKeys="123456789/env"` * - `tagKeys:"env"` + * - `tagKeyIds="tagKeys/123"` * - `tagValues:"env"` * - `tagValues:"env/prod"` * - `tagValues:"123456789/env/prod*"` @@ -9873,6 +9889,7 @@ public Builder addTags(com.google.cloud.asset.v1.Tag value) { * - `tagKeys:"123456789/env*"` * - `tagKeys="123456789/env"` * - `tagKeys:"env"` + * - `tagKeyIds="tagKeys/123"` * - `tagValues:"env"` * - `tagValues:"env/prod"` * - `tagValues:"123456789/env/prod*"` @@ -9910,6 +9927,7 @@ public Builder addTags(int index, com.google.cloud.asset.v1.Tag value) { * - `tagKeys:"123456789/env*"` * - `tagKeys="123456789/env"` * - `tagKeys:"env"` + * - `tagKeyIds="tagKeys/123"` * - `tagValues:"env"` * - `tagValues:"env/prod"` * - `tagValues:"123456789/env/prod*"` @@ -9944,6 +9962,7 @@ public Builder addTags(com.google.cloud.asset.v1.Tag.Builder builderForValue) { * - `tagKeys:"123456789/env*"` * - `tagKeys="123456789/env"` * - `tagKeys:"env"` + * - `tagKeyIds="tagKeys/123"` * - `tagValues:"env"` * - `tagValues:"env/prod"` * - `tagValues:"123456789/env/prod*"` @@ -9978,6 +9997,7 @@ public Builder addTags(int index, com.google.cloud.asset.v1.Tag.Builder builderF * - `tagKeys:"123456789/env*"` * - `tagKeys="123456789/env"` * - `tagKeys:"env"` + * - `tagKeyIds="tagKeys/123"` * - `tagValues:"env"` * - `tagValues:"env/prod"` * - `tagValues:"123456789/env/prod*"` @@ -10012,6 +10032,7 @@ public Builder addAllTags(java.lang.Iterable getTagsO * - `tagKeys:"123456789/env*"` * - `tagKeys="123456789/env"` * - `tagKeys:"env"` + * - `tagKeyIds="tagKeys/123"` * - `tagValues:"env"` * - `tagValues:"env/prod"` * - `tagValues:"123456789/env/prod*"` @@ -10196,6 +10222,7 @@ public com.google.cloud.asset.v1.Tag.Builder addTagsBuilder() { * - `tagKeys:"123456789/env*"` * - `tagKeys="123456789/env"` * - `tagKeys:"env"` + * - `tagKeyIds="tagKeys/123"` * - `tagValues:"env"` * - `tagValues:"env/prod"` * - `tagValues:"123456789/env/prod*"` @@ -10224,6 +10251,7 @@ public com.google.cloud.asset.v1.Tag.Builder addTagsBuilder(int index) { * - `tagKeys:"123456789/env*"` * - `tagKeys="123456789/env"` * - `tagKeys:"env"` + * - `tagKeyIds="tagKeys/123"` * - `tagValues:"env"` * - `tagValues:"env/prod"` * - `tagValues:"123456789/env/prod*"` @@ -10289,6 +10317,7 @@ private void ensureEffectiveTagsIsMutable() { * - `effectiveTagKeys:"123456789/env*"` * - `effectiveTagKeys="123456789/env"` * - `effectiveTagKeys:"env"` + * - `effectiveTagKeyIds="tagKeys/123"` * - `effectiveTagValues:"env"` * - `effectiveTagValues:"env/prod"` * - `effectiveTagValues:"123456789/env/prod*"` @@ -10320,6 +10349,7 @@ public java.util.List getEffectiv * - `effectiveTagKeys:"123456789/env*"` * - `effectiveTagKeys="123456789/env"` * - `effectiveTagKeys:"env"` + * - `effectiveTagKeyIds="tagKeys/123"` * - `effectiveTagValues:"env"` * - `effectiveTagValues:"env/prod"` * - `effectiveTagValues:"123456789/env/prod*"` @@ -10351,6 +10381,7 @@ public int getEffectiveTagsCount() { * - `effectiveTagKeys:"123456789/env*"` * - `effectiveTagKeys="123456789/env"` * - `effectiveTagKeys:"env"` + * - `effectiveTagKeyIds="tagKeys/123"` * - `effectiveTagValues:"env"` * - `effectiveTagValues:"env/prod"` * - `effectiveTagValues:"123456789/env/prod*"` @@ -10382,6 +10413,7 @@ public com.google.cloud.asset.v1.EffectiveTagDetails getEffectiveTags(int index) * - `effectiveTagKeys:"123456789/env*"` * - `effectiveTagKeys="123456789/env"` * - `effectiveTagKeys:"env"` + * - `effectiveTagKeyIds="tagKeys/123"` * - `effectiveTagValues:"env"` * - `effectiveTagValues:"env/prod"` * - `effectiveTagValues:"123456789/env/prod*"` @@ -10420,6 +10452,7 @@ public Builder setEffectiveTags( * - `effectiveTagKeys:"123456789/env*"` * - `effectiveTagKeys="123456789/env"` * - `effectiveTagKeys:"env"` + * - `effectiveTagKeyIds="tagKeys/123"` * - `effectiveTagValues:"env"` * - `effectiveTagValues:"env/prod"` * - `effectiveTagValues:"123456789/env/prod*"` @@ -10455,6 +10488,7 @@ public Builder setEffectiveTags( * - `effectiveTagKeys:"123456789/env*"` * - `effectiveTagKeys="123456789/env"` * - `effectiveTagKeys:"env"` + * - `effectiveTagKeyIds="tagKeys/123"` * - `effectiveTagValues:"env"` * - `effectiveTagValues:"env/prod"` * - `effectiveTagValues:"123456789/env/prod*"` @@ -10492,6 +10526,7 @@ public Builder addEffectiveTags(com.google.cloud.asset.v1.EffectiveTagDetails va * - `effectiveTagKeys:"123456789/env*"` * - `effectiveTagKeys="123456789/env"` * - `effectiveTagKeys:"env"` + * - `effectiveTagKeyIds="tagKeys/123"` * - `effectiveTagValues:"env"` * - `effectiveTagValues:"env/prod"` * - `effectiveTagValues:"123456789/env/prod*"` @@ -10530,6 +10565,7 @@ public Builder addEffectiveTags( * - `effectiveTagKeys:"123456789/env*"` * - `effectiveTagKeys="123456789/env"` * - `effectiveTagKeys:"env"` + * - `effectiveTagKeyIds="tagKeys/123"` * - `effectiveTagValues:"env"` * - `effectiveTagValues:"env/prod"` * - `effectiveTagValues:"123456789/env/prod*"` @@ -10565,6 +10601,7 @@ public Builder addEffectiveTags( * - `effectiveTagKeys:"123456789/env*"` * - `effectiveTagKeys="123456789/env"` * - `effectiveTagKeys:"env"` + * - `effectiveTagKeyIds="tagKeys/123"` * - `effectiveTagValues:"env"` * - `effectiveTagValues:"env/prod"` * - `effectiveTagValues:"123456789/env/prod*"` @@ -10600,6 +10637,7 @@ public Builder addEffectiveTags( * - `effectiveTagKeys:"123456789/env*"` * - `effectiveTagKeys="123456789/env"` * - `effectiveTagKeys:"env"` + * - `effectiveTagKeyIds="tagKeys/123"` * - `effectiveTagValues:"env"` * - `effectiveTagValues:"env/prod"` * - `effectiveTagValues:"123456789/env/prod*"` @@ -10635,6 +10673,7 @@ public Builder addAllEffectiveTags( * - `effectiveTagKeys:"123456789/env*"` * - `effectiveTagKeys="123456789/env"` * - `effectiveTagKeys:"env"` + * - `effectiveTagKeyIds="tagKeys/123"` * - `effectiveTagValues:"env"` * - `effectiveTagValues:"env/prod"` * - `effectiveTagValues:"123456789/env/prod*"` @@ -10669,6 +10708,7 @@ public Builder clearEffectiveTags() { * - `effectiveTagKeys:"123456789/env*"` * - `effectiveTagKeys="123456789/env"` * - `effectiveTagKeys:"env"` + * - `effectiveTagKeyIds="tagKeys/123"` * - `effectiveTagValues:"env"` * - `effectiveTagValues:"env/prod"` * - `effectiveTagValues:"123456789/env/prod*"` @@ -10703,6 +10743,7 @@ public Builder removeEffectiveTags(int index) { * - `effectiveTagKeys:"123456789/env*"` * - `effectiveTagKeys="123456789/env"` * - `effectiveTagKeys:"env"` + * - `effectiveTagKeyIds="tagKeys/123"` * - `effectiveTagValues:"env"` * - `effectiveTagValues:"env/prod"` * - `effectiveTagValues:"123456789/env/prod*"` @@ -10731,6 +10772,7 @@ public com.google.cloud.asset.v1.EffectiveTagDetails.Builder getEffectiveTagsBui * - `effectiveTagKeys:"123456789/env*"` * - `effectiveTagKeys="123456789/env"` * - `effectiveTagKeys:"env"` + * - `effectiveTagKeyIds="tagKeys/123"` * - `effectiveTagValues:"env"` * - `effectiveTagValues:"env/prod"` * - `effectiveTagValues:"123456789/env/prod*"` @@ -10763,6 +10805,7 @@ public com.google.cloud.asset.v1.EffectiveTagDetailsOrBuilder getEffectiveTagsOr * - `effectiveTagKeys:"123456789/env*"` * - `effectiveTagKeys="123456789/env"` * - `effectiveTagKeys:"env"` + * - `effectiveTagKeyIds="tagKeys/123"` * - `effectiveTagValues:"env"` * - `effectiveTagValues:"env/prod"` * - `effectiveTagValues:"123456789/env/prod*"` @@ -10795,6 +10838,7 @@ public com.google.cloud.asset.v1.EffectiveTagDetailsOrBuilder getEffectiveTagsOr * - `effectiveTagKeys:"123456789/env*"` * - `effectiveTagKeys="123456789/env"` * - `effectiveTagKeys:"env"` + * - `effectiveTagKeyIds="tagKeys/123"` * - `effectiveTagValues:"env"` * - `effectiveTagValues:"env/prod"` * - `effectiveTagValues:"123456789/env/prod*"` @@ -10823,6 +10867,7 @@ public com.google.cloud.asset.v1.EffectiveTagDetails.Builder addEffectiveTagsBui * - `effectiveTagKeys:"123456789/env*"` * - `effectiveTagKeys="123456789/env"` * - `effectiveTagKeys:"env"` + * - `effectiveTagKeyIds="tagKeys/123"` * - `effectiveTagValues:"env"` * - `effectiveTagValues:"env/prod"` * - `effectiveTagValues:"123456789/env/prod*"` @@ -10852,6 +10897,7 @@ public com.google.cloud.asset.v1.EffectiveTagDetails.Builder addEffectiveTagsBui * - `effectiveTagKeys:"123456789/env*"` * - `effectiveTagKeys="123456789/env"` * - `effectiveTagKeys:"env"` + * - `effectiveTagKeyIds="tagKeys/123"` * - `effectiveTagValues:"env"` * - `effectiveTagValues:"env/prod"` * - `effectiveTagValues:"123456789/env/prod*"` diff --git a/java-asset/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ResourceSearchResultOrBuilder.java b/java-asset/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ResourceSearchResultOrBuilder.java index d83e52e6ce34..5f5ab80842ca 100644 --- a/java-asset/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ResourceSearchResultOrBuilder.java +++ b/java-asset/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ResourceSearchResultOrBuilder.java @@ -615,7 +615,7 @@ java.lang.String getLabelsOrDefault( * string kms_key = 10 [deprecated = true]; * * @deprecated google.cloud.asset.v1.ResourceSearchResult.kms_key is deprecated. See - * google/cloud/asset/v1/assets.proto;l=468 + * google/cloud/asset/v1/assets.proto;l=471 * @return The kmsKey. */ @java.lang.Deprecated @@ -646,7 +646,7 @@ java.lang.String getLabelsOrDefault( * string kms_key = 10 [deprecated = true]; * * @deprecated google.cloud.asset.v1.ResourceSearchResult.kms_key is deprecated. See - * google/cloud/asset/v1/assets.proto;l=468 + * google/cloud/asset/v1/assets.proto;l=471 * @return The bytes for kmsKey. */ @java.lang.Deprecated @@ -1334,7 +1334,7 @@ com.google.cloud.asset.v1.RelatedResources getRelationshipsOrDefault( * repeated string tag_keys = 23 [deprecated = true]; * * @deprecated google.cloud.asset.v1.ResourceSearchResult.tag_keys is deprecated. See - * google/cloud/asset/v1/assets.proto;l=601 + * google/cloud/asset/v1/assets.proto;l=604 * @return A list containing the tagKeys. */ @java.lang.Deprecated @@ -1361,7 +1361,7 @@ com.google.cloud.asset.v1.RelatedResources getRelationshipsOrDefault( * repeated string tag_keys = 23 [deprecated = true]; * * @deprecated google.cloud.asset.v1.ResourceSearchResult.tag_keys is deprecated. See - * google/cloud/asset/v1/assets.proto;l=601 + * google/cloud/asset/v1/assets.proto;l=604 * @return The count of tagKeys. */ @java.lang.Deprecated @@ -1388,7 +1388,7 @@ com.google.cloud.asset.v1.RelatedResources getRelationshipsOrDefault( * repeated string tag_keys = 23 [deprecated = true]; * * @deprecated google.cloud.asset.v1.ResourceSearchResult.tag_keys is deprecated. See - * google/cloud/asset/v1/assets.proto;l=601 + * google/cloud/asset/v1/assets.proto;l=604 * @param index The index of the element to return. * @return The tagKeys at the given index. */ @@ -1416,7 +1416,7 @@ com.google.cloud.asset.v1.RelatedResources getRelationshipsOrDefault( * repeated string tag_keys = 23 [deprecated = true]; * * @deprecated google.cloud.asset.v1.ResourceSearchResult.tag_keys is deprecated. See - * google/cloud/asset/v1/assets.proto;l=601 + * google/cloud/asset/v1/assets.proto;l=604 * @param index The index of the value to return. * @return The bytes of the tagKeys at the given index. */ @@ -1447,7 +1447,7 @@ com.google.cloud.asset.v1.RelatedResources getRelationshipsOrDefault( * repeated string tag_values = 25 [deprecated = true]; * * @deprecated google.cloud.asset.v1.ResourceSearchResult.tag_values is deprecated. See - * google/cloud/asset/v1/assets.proto;l=618 + * google/cloud/asset/v1/assets.proto;l=621 * @return A list containing the tagValues. */ @java.lang.Deprecated @@ -1476,7 +1476,7 @@ com.google.cloud.asset.v1.RelatedResources getRelationshipsOrDefault( * repeated string tag_values = 25 [deprecated = true]; * * @deprecated google.cloud.asset.v1.ResourceSearchResult.tag_values is deprecated. See - * google/cloud/asset/v1/assets.proto;l=618 + * google/cloud/asset/v1/assets.proto;l=621 * @return The count of tagValues. */ @java.lang.Deprecated @@ -1505,7 +1505,7 @@ com.google.cloud.asset.v1.RelatedResources getRelationshipsOrDefault( * repeated string tag_values = 25 [deprecated = true]; * * @deprecated google.cloud.asset.v1.ResourceSearchResult.tag_values is deprecated. See - * google/cloud/asset/v1/assets.proto;l=618 + * google/cloud/asset/v1/assets.proto;l=621 * @param index The index of the element to return. * @return The tagValues at the given index. */ @@ -1535,7 +1535,7 @@ com.google.cloud.asset.v1.RelatedResources getRelationshipsOrDefault( * repeated string tag_values = 25 [deprecated = true]; * * @deprecated google.cloud.asset.v1.ResourceSearchResult.tag_values is deprecated. See - * google/cloud/asset/v1/assets.proto;l=618 + * google/cloud/asset/v1/assets.proto;l=621 * @param index The index of the value to return. * @return The bytes of the tagValues at the given index. */ @@ -1562,7 +1562,7 @@ com.google.cloud.asset.v1.RelatedResources getRelationshipsOrDefault( * repeated string tag_value_ids = 26 [deprecated = true]; * * @deprecated google.cloud.asset.v1.ResourceSearchResult.tag_value_ids is deprecated. See - * google/cloud/asset/v1/assets.proto;l=631 + * google/cloud/asset/v1/assets.proto;l=634 * @return A list containing the tagValueIds. */ @java.lang.Deprecated @@ -1587,7 +1587,7 @@ com.google.cloud.asset.v1.RelatedResources getRelationshipsOrDefault( * repeated string tag_value_ids = 26 [deprecated = true]; * * @deprecated google.cloud.asset.v1.ResourceSearchResult.tag_value_ids is deprecated. See - * google/cloud/asset/v1/assets.proto;l=631 + * google/cloud/asset/v1/assets.proto;l=634 * @return The count of tagValueIds. */ @java.lang.Deprecated @@ -1612,7 +1612,7 @@ com.google.cloud.asset.v1.RelatedResources getRelationshipsOrDefault( * repeated string tag_value_ids = 26 [deprecated = true]; * * @deprecated google.cloud.asset.v1.ResourceSearchResult.tag_value_ids is deprecated. See - * google/cloud/asset/v1/assets.proto;l=631 + * google/cloud/asset/v1/assets.proto;l=634 * @param index The index of the element to return. * @return The tagValueIds at the given index. */ @@ -1638,7 +1638,7 @@ com.google.cloud.asset.v1.RelatedResources getRelationshipsOrDefault( * repeated string tag_value_ids = 26 [deprecated = true]; * * @deprecated google.cloud.asset.v1.ResourceSearchResult.tag_value_ids is deprecated. See - * google/cloud/asset/v1/assets.proto;l=631 + * google/cloud/asset/v1/assets.proto;l=634 * @param index The index of the value to return. * @return The bytes of the tagValueIds at the given index. */ @@ -1657,6 +1657,7 @@ com.google.cloud.asset.v1.RelatedResources getRelationshipsOrDefault( * - `tagKeys:"123456789/env*"` * - `tagKeys="123456789/env"` * - `tagKeys:"env"` + * - `tagKeyIds="tagKeys/123"` * - `tagValues:"env"` * - `tagValues:"env/prod"` * - `tagValues:"123456789/env/prod*"` @@ -1682,6 +1683,7 @@ com.google.cloud.asset.v1.RelatedResources getRelationshipsOrDefault( * - `tagKeys:"123456789/env*"` * - `tagKeys="123456789/env"` * - `tagKeys:"env"` + * - `tagKeyIds="tagKeys/123"` * - `tagValues:"env"` * - `tagValues:"env/prod"` * - `tagValues:"123456789/env/prod*"` @@ -1707,6 +1709,7 @@ com.google.cloud.asset.v1.RelatedResources getRelationshipsOrDefault( * - `tagKeys:"123456789/env*"` * - `tagKeys="123456789/env"` * - `tagKeys:"env"` + * - `tagKeyIds="tagKeys/123"` * - `tagValues:"env"` * - `tagValues:"env/prod"` * - `tagValues:"123456789/env/prod*"` @@ -1732,6 +1735,7 @@ com.google.cloud.asset.v1.RelatedResources getRelationshipsOrDefault( * - `tagKeys:"123456789/env*"` * - `tagKeys="123456789/env"` * - `tagKeys:"env"` + * - `tagKeyIds="tagKeys/123"` * - `tagValues:"env"` * - `tagValues:"env/prod"` * - `tagValues:"123456789/env/prod*"` @@ -1757,6 +1761,7 @@ com.google.cloud.asset.v1.RelatedResources getRelationshipsOrDefault( * - `tagKeys:"123456789/env*"` * - `tagKeys="123456789/env"` * - `tagKeys:"env"` + * - `tagKeyIds="tagKeys/123"` * - `tagValues:"env"` * - `tagValues:"env/prod"` * - `tagValues:"123456789/env/prod*"` @@ -1786,6 +1791,7 @@ com.google.cloud.asset.v1.RelatedResources getRelationshipsOrDefault( * - `effectiveTagKeys:"123456789/env*"` * - `effectiveTagKeys="123456789/env"` * - `effectiveTagKeys:"env"` + * - `effectiveTagKeyIds="tagKeys/123"` * - `effectiveTagValues:"env"` * - `effectiveTagValues:"env/prod"` * - `effectiveTagValues:"123456789/env/prod*"` @@ -1811,6 +1817,7 @@ com.google.cloud.asset.v1.RelatedResources getRelationshipsOrDefault( * - `effectiveTagKeys:"123456789/env*"` * - `effectiveTagKeys="123456789/env"` * - `effectiveTagKeys:"env"` + * - `effectiveTagKeyIds="tagKeys/123"` * - `effectiveTagValues:"env"` * - `effectiveTagValues:"env/prod"` * - `effectiveTagValues:"123456789/env/prod*"` @@ -1836,6 +1843,7 @@ com.google.cloud.asset.v1.RelatedResources getRelationshipsOrDefault( * - `effectiveTagKeys:"123456789/env*"` * - `effectiveTagKeys="123456789/env"` * - `effectiveTagKeys:"env"` + * - `effectiveTagKeyIds="tagKeys/123"` * - `effectiveTagValues:"env"` * - `effectiveTagValues:"env/prod"` * - `effectiveTagValues:"123456789/env/prod*"` @@ -1861,6 +1869,7 @@ com.google.cloud.asset.v1.RelatedResources getRelationshipsOrDefault( * - `effectiveTagKeys:"123456789/env*"` * - `effectiveTagKeys="123456789/env"` * - `effectiveTagKeys:"env"` + * - `effectiveTagKeyIds="tagKeys/123"` * - `effectiveTagValues:"env"` * - `effectiveTagValues:"env/prod"` * - `effectiveTagValues:"123456789/env/prod*"` @@ -1887,6 +1896,7 @@ com.google.cloud.asset.v1.RelatedResources getRelationshipsOrDefault( * - `effectiveTagKeys:"123456789/env*"` * - `effectiveTagKeys="123456789/env"` * - `effectiveTagKeys:"env"` + * - `effectiveTagKeyIds="tagKeys/123"` * - `effectiveTagValues:"env"` * - `effectiveTagValues:"env/prod"` * - `effectiveTagValues:"123456789/env/prod*"` diff --git a/java-asset/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/Tag.java b/java-asset/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/Tag.java index 058bddb7357e..48e22826d720 100644 --- a/java-asset/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/Tag.java +++ b/java-asset/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/Tag.java @@ -41,6 +41,7 @@ private Tag(com.google.protobuf.GeneratedMessageV3.Builder builder) { private Tag() { tagKey_ = ""; + tagKeyId_ = ""; tagValue_ = ""; tagValueId_ = ""; } @@ -132,6 +133,72 @@ public com.google.protobuf.ByteString getTagKeyBytes() { } } + public static final int TAG_KEY_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object tagKeyId_ = ""; + /** + * + * + *
+   * TagKey ID, in the format of tagKeys/{TAG_KEY_ID}.
+   * 
+ * + * optional string tag_key_id = 2; + * + * @return Whether the tagKeyId field is set. + */ + @java.lang.Override + public boolean hasTagKeyId() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * TagKey ID, in the format of tagKeys/{TAG_KEY_ID}.
+   * 
+ * + * optional string tag_key_id = 2; + * + * @return The tagKeyId. + */ + @java.lang.Override + public java.lang.String getTagKeyId() { + java.lang.Object ref = tagKeyId_; + 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(); + tagKeyId_ = s; + return s; + } + } + /** + * + * + *
+   * TagKey ID, in the format of tagKeys/{TAG_KEY_ID}.
+   * 
+ * + * optional string tag_key_id = 2; + * + * @return The bytes for tagKeyId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTagKeyIdBytes() { + java.lang.Object ref = tagKeyId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tagKeyId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + public static final int TAG_VALUE_FIELD_NUMBER = 3; @SuppressWarnings("serial") @@ -150,7 +217,7 @@ public com.google.protobuf.ByteString getTagKeyBytes() { */ @java.lang.Override public boolean hasTagValue() { - return ((bitField0_ & 0x00000002) != 0); + return ((bitField0_ & 0x00000004) != 0); } /** * @@ -218,7 +285,7 @@ public com.google.protobuf.ByteString getTagValueBytes() { */ @java.lang.Override public boolean hasTagValueId() { - return ((bitField0_ & 0x00000004) != 0); + return ((bitField0_ & 0x00000008) != 0); } /** * @@ -285,9 +352,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io com.google.protobuf.GeneratedMessageV3.writeString(output, 1, tagKey_); } if (((bitField0_ & 0x00000002) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, tagValue_); + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, tagKeyId_); } if (((bitField0_ & 0x00000004) != 0)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, tagValue_); + } + if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, tagValueId_); } getUnknownFields().writeTo(output); @@ -303,9 +373,12 @@ public int getSerializedSize() { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, tagKey_); } if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, tagValue_); + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, tagKeyId_); } if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, tagValue_); + } + if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, tagValueId_); } size += getUnknownFields().getSerializedSize(); @@ -327,6 +400,10 @@ public boolean equals(final java.lang.Object obj) { if (hasTagKey()) { if (!getTagKey().equals(other.getTagKey())) return false; } + if (hasTagKeyId() != other.hasTagKeyId()) return false; + if (hasTagKeyId()) { + if (!getTagKeyId().equals(other.getTagKeyId())) return false; + } if (hasTagValue() != other.hasTagValue()) return false; if (hasTagValue()) { if (!getTagValue().equals(other.getTagValue())) return false; @@ -350,6 +427,10 @@ public int hashCode() { hash = (37 * hash) + TAG_KEY_FIELD_NUMBER; hash = (53 * hash) + getTagKey().hashCode(); } + if (hasTagKeyId()) { + hash = (37 * hash) + TAG_KEY_ID_FIELD_NUMBER; + hash = (53 * hash) + getTagKeyId().hashCode(); + } if (hasTagValue()) { hash = (37 * hash) + TAG_VALUE_FIELD_NUMBER; hash = (53 * hash) + getTagValue().hashCode(); @@ -497,6 +578,7 @@ public Builder clear() { super.clear(); bitField0_ = 0; tagKey_ = ""; + tagKeyId_ = ""; tagValue_ = ""; tagValueId_ = ""; return this; @@ -540,13 +622,17 @@ private void buildPartial0(com.google.cloud.asset.v1.Tag result) { to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000002) != 0)) { - result.tagValue_ = tagValue_; + result.tagKeyId_ = tagKeyId_; to_bitField0_ |= 0x00000002; } if (((from_bitField0_ & 0x00000004) != 0)) { - result.tagValueId_ = tagValueId_; + result.tagValue_ = tagValue_; to_bitField0_ |= 0x00000004; } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.tagValueId_ = tagValueId_; + to_bitField0_ |= 0x00000008; + } result.bitField0_ |= to_bitField0_; } @@ -600,14 +686,19 @@ public Builder mergeFrom(com.google.cloud.asset.v1.Tag other) { bitField0_ |= 0x00000001; onChanged(); } + if (other.hasTagKeyId()) { + tagKeyId_ = other.tagKeyId_; + bitField0_ |= 0x00000002; + onChanged(); + } if (other.hasTagValue()) { tagValue_ = other.tagValue_; - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000004; onChanged(); } if (other.hasTagValueId()) { tagValueId_ = other.tagValueId_; - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); @@ -642,16 +733,22 @@ public Builder mergeFrom( bitField0_ |= 0x00000001; break; } // case 10 + case 18: + { + tagKeyId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 case 26: { tagValue_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000004; break; } // case 26 case 34: { tagValueId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; break; } // case 34 default: @@ -793,6 +890,126 @@ public Builder setTagKeyBytes(com.google.protobuf.ByteString value) { return this; } + private java.lang.Object tagKeyId_ = ""; + /** + * + * + *
+     * TagKey ID, in the format of tagKeys/{TAG_KEY_ID}.
+     * 
+ * + * optional string tag_key_id = 2; + * + * @return Whether the tagKeyId field is set. + */ + public boolean hasTagKeyId() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * TagKey ID, in the format of tagKeys/{TAG_KEY_ID}.
+     * 
+ * + * optional string tag_key_id = 2; + * + * @return The tagKeyId. + */ + public java.lang.String getTagKeyId() { + java.lang.Object ref = tagKeyId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tagKeyId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * TagKey ID, in the format of tagKeys/{TAG_KEY_ID}.
+     * 
+ * + * optional string tag_key_id = 2; + * + * @return The bytes for tagKeyId. + */ + public com.google.protobuf.ByteString getTagKeyIdBytes() { + java.lang.Object ref = tagKeyId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tagKeyId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * TagKey ID, in the format of tagKeys/{TAG_KEY_ID}.
+     * 
+ * + * optional string tag_key_id = 2; + * + * @param value The tagKeyId to set. + * @return This builder for chaining. + */ + public Builder setTagKeyId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + tagKeyId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * TagKey ID, in the format of tagKeys/{TAG_KEY_ID}.
+     * 
+ * + * optional string tag_key_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearTagKeyId() { + tagKeyId_ = getDefaultInstance().getTagKeyId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * TagKey ID, in the format of tagKeys/{TAG_KEY_ID}.
+     * 
+ * + * optional string tag_key_id = 2; + * + * @param value The bytes for tagKeyId to set. + * @return This builder for chaining. + */ + public Builder setTagKeyIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + tagKeyId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + private java.lang.Object tagValue_ = ""; /** * @@ -807,7 +1024,7 @@ public Builder setTagKeyBytes(com.google.protobuf.ByteString value) { * @return Whether the tagValue field is set. */ public boolean hasTagValue() { - return ((bitField0_ & 0x00000002) != 0); + return ((bitField0_ & 0x00000004) != 0); } /** * @@ -873,7 +1090,7 @@ public Builder setTagValue(java.lang.String value) { throw new NullPointerException(); } tagValue_ = value; - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -891,7 +1108,7 @@ public Builder setTagValue(java.lang.String value) { */ public Builder clearTagValue() { tagValue_ = getDefaultInstance().getTagValue(); - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000004); onChanged(); return this; } @@ -914,7 +1131,7 @@ public Builder setTagValueBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); tagValue_ = value; - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -932,7 +1149,7 @@ public Builder setTagValueBytes(com.google.protobuf.ByteString value) { * @return Whether the tagValueId field is set. */ public boolean hasTagValueId() { - return ((bitField0_ & 0x00000004) != 0); + return ((bitField0_ & 0x00000008) != 0); } /** * @@ -995,7 +1212,7 @@ public Builder setTagValueId(java.lang.String value) { throw new NullPointerException(); } tagValueId_ = value; - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -1012,7 +1229,7 @@ public Builder setTagValueId(java.lang.String value) { */ public Builder clearTagValueId() { tagValueId_ = getDefaultInstance().getTagValueId(); - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000008); onChanged(); return this; } @@ -1034,7 +1251,7 @@ public Builder setTagValueIdBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); tagValueId_ = value; - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); return this; } diff --git a/java-asset/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TagOrBuilder.java b/java-asset/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TagOrBuilder.java index 54d2157607d3..80b04933abdd 100644 --- a/java-asset/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TagOrBuilder.java +++ b/java-asset/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TagOrBuilder.java @@ -61,6 +61,43 @@ public interface TagOrBuilder */ com.google.protobuf.ByteString getTagKeyBytes(); + /** + * + * + *
+   * TagKey ID, in the format of tagKeys/{TAG_KEY_ID}.
+   * 
+ * + * optional string tag_key_id = 2; + * + * @return Whether the tagKeyId field is set. + */ + boolean hasTagKeyId(); + /** + * + * + *
+   * TagKey ID, in the format of tagKeys/{TAG_KEY_ID}.
+   * 
+ * + * optional string tag_key_id = 2; + * + * @return The tagKeyId. + */ + java.lang.String getTagKeyId(); + /** + * + * + *
+   * TagKey ID, in the format of tagKeys/{TAG_KEY_ID}.
+   * 
+ * + * optional string tag_key_id = 2; + * + * @return The bytes for tagKeyId. + */ + com.google.protobuf.ByteString getTagKeyIdBytes(); + /** * * diff --git a/java-asset/proto-google-cloud-asset-v1/src/main/proto/google/cloud/asset/v1/assets.proto b/java-asset/proto-google-cloud-asset-v1/src/main/proto/google/cloud/asset/v1/assets.proto index 868135e5ef53..85d518a469da 100644 --- a/java-asset/proto-google-cloud-asset-v1/src/main/proto/google/cloud/asset/v1/assets.proto +++ b/java-asset/proto-google-cloud-asset-v1/src/main/proto/google/cloud/asset/v1/assets.proto @@ -309,6 +309,9 @@ message Tag { // TagKey namespaced name, in the format of {ORG_ID}/{TAG_KEY_SHORT_NAME}. optional string tag_key = 1; + // TagKey ID, in the format of tagKeys/{TAG_KEY_ID}. + optional string tag_key_id = 2; + // TagValue namespaced name, in the format of // {ORG_ID}/{TAG_KEY_SHORT_NAME}/{TAG_VALUE_SHORT_NAME}. optional string tag_value = 3; @@ -639,6 +642,7 @@ message ResourceSearchResult { // - `tagKeys:"123456789/env*"` // - `tagKeys="123456789/env"` // - `tagKeys:"env"` + // - `tagKeyIds="tagKeys/123"` // - `tagValues:"env"` // - `tagValues:"env/prod"` // - `tagValues:"123456789/env/prod*"` @@ -660,6 +664,7 @@ message ResourceSearchResult { // - `effectiveTagKeys:"123456789/env*"` // - `effectiveTagKeys="123456789/env"` // - `effectiveTagKeys:"env"` + // - `effectiveTagKeyIds="tagKeys/123"` // - `effectiveTagValues:"env"` // - `effectiveTagValues:"env/prod"` // - `effectiveTagValues:"123456789/env/prod*"` diff --git a/java-assured-workloads/README.md b/java-assured-workloads/README.md index 4c7b27e0d26a..b80abdfb79db 100644 --- a/java-assured-workloads/README.md +++ b/java-assured-workloads/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.34.0 + 26.37.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-assured-workloads.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-assured-workloads/2.38.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-assured-workloads/2.41.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-automl/README.md b/java-automl/README.md index 9b12b681f6cf..6023183a05b8 100644 --- a/java-automl/README.md +++ b/java-automl/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.34.0 + 26.37.0 pom import @@ -206,7 +206,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-automl.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-automl/2.38.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-automl/2.41.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-bare-metal-solution/README.md b/java-bare-metal-solution/README.md index d08047f8fd47..8f3cc451c00a 100644 --- a/java-bare-metal-solution/README.md +++ b/java-bare-metal-solution/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -201,7 +201,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-bare-metal-solution.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-bare-metal-solution/0.38.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-bare-metal-solution/0.41.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-batch/README.md b/java-batch/README.md index bf3c4100d709..77675d1b1b5f 100644 --- a/java-batch/README.md +++ b/java-batch/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -201,7 +201,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-batch.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-batch/0.38.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-batch/0.41.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-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/TaskSpec.java b/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/TaskSpec.java index ecfc196b2f36..28cea604ab1c 100644 --- a/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/TaskSpec.java +++ b/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/TaskSpec.java @@ -252,6 +252,8 @@ public com.google.cloud.batch.v1.ComputeResourceOrBuilder getComputeResourceOrBu *
    * Maximum duration the task should run.
    * The task will be killed and marked as FAILED if over this limit.
+   * The valid value range for max_run_duration in seconds is [0,
+   * 315576000000.999999999],
    * 
* * .google.protobuf.Duration max_run_duration = 4; @@ -268,6 +270,8 @@ public boolean hasMaxRunDuration() { *
    * Maximum duration the task should run.
    * The task will be killed and marked as FAILED if over this limit.
+   * The valid value range for max_run_duration in seconds is [0,
+   * 315576000000.999999999],
    * 
* * .google.protobuf.Duration max_run_duration = 4; @@ -286,6 +290,8 @@ public com.google.protobuf.Duration getMaxRunDuration() { *
    * Maximum duration the task should run.
    * The task will be killed and marked as FAILED if over this limit.
+   * The valid value range for max_run_duration in seconds is [0,
+   * 315576000000.999999999],
    * 
* * .google.protobuf.Duration max_run_duration = 4; @@ -2076,6 +2082,8 @@ public com.google.cloud.batch.v1.ComputeResourceOrBuilder getComputeResourceOrBu *
      * Maximum duration the task should run.
      * The task will be killed and marked as FAILED if over this limit.
+     * The valid value range for max_run_duration in seconds is [0,
+     * 315576000000.999999999],
      * 
* * .google.protobuf.Duration max_run_duration = 4; @@ -2091,6 +2099,8 @@ public boolean hasMaxRunDuration() { *
      * Maximum duration the task should run.
      * The task will be killed and marked as FAILED if over this limit.
+     * The valid value range for max_run_duration in seconds is [0,
+     * 315576000000.999999999],
      * 
* * .google.protobuf.Duration max_run_duration = 4; @@ -2112,6 +2122,8 @@ public com.google.protobuf.Duration getMaxRunDuration() { *
      * Maximum duration the task should run.
      * The task will be killed and marked as FAILED if over this limit.
+     * The valid value range for max_run_duration in seconds is [0,
+     * 315576000000.999999999],
      * 
* * .google.protobuf.Duration max_run_duration = 4; @@ -2135,6 +2147,8 @@ public Builder setMaxRunDuration(com.google.protobuf.Duration value) { *
      * Maximum duration the task should run.
      * The task will be killed and marked as FAILED if over this limit.
+     * The valid value range for max_run_duration in seconds is [0,
+     * 315576000000.999999999],
      * 
* * .google.protobuf.Duration max_run_duration = 4; @@ -2155,6 +2169,8 @@ public Builder setMaxRunDuration(com.google.protobuf.Duration.Builder builderFor *
      * Maximum duration the task should run.
      * The task will be killed and marked as FAILED if over this limit.
+     * The valid value range for max_run_duration in seconds is [0,
+     * 315576000000.999999999],
      * 
* * .google.protobuf.Duration max_run_duration = 4; @@ -2183,6 +2199,8 @@ public Builder mergeMaxRunDuration(com.google.protobuf.Duration value) { *
      * Maximum duration the task should run.
      * The task will be killed and marked as FAILED if over this limit.
+     * The valid value range for max_run_duration in seconds is [0,
+     * 315576000000.999999999],
      * 
* * .google.protobuf.Duration max_run_duration = 4; @@ -2203,6 +2221,8 @@ public Builder clearMaxRunDuration() { *
      * Maximum duration the task should run.
      * The task will be killed and marked as FAILED if over this limit.
+     * The valid value range for max_run_duration in seconds is [0,
+     * 315576000000.999999999],
      * 
* * .google.protobuf.Duration max_run_duration = 4; @@ -2218,6 +2238,8 @@ public com.google.protobuf.Duration.Builder getMaxRunDurationBuilder() { *
      * Maximum duration the task should run.
      * The task will be killed and marked as FAILED if over this limit.
+     * The valid value range for max_run_duration in seconds is [0,
+     * 315576000000.999999999],
      * 
* * .google.protobuf.Duration max_run_duration = 4; @@ -2237,6 +2259,8 @@ public com.google.protobuf.DurationOrBuilder getMaxRunDurationOrBuilder() { *
      * Maximum duration the task should run.
      * The task will be killed and marked as FAILED if over this limit.
+     * The valid value range for max_run_duration in seconds is [0,
+     * 315576000000.999999999],
      * 
* * .google.protobuf.Duration max_run_duration = 4; diff --git a/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/TaskSpecOrBuilder.java b/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/TaskSpecOrBuilder.java index 81aef9721f12..0bab4b7afb46 100644 --- a/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/TaskSpecOrBuilder.java +++ b/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/TaskSpecOrBuilder.java @@ -161,6 +161,8 @@ public interface TaskSpecOrBuilder *
    * Maximum duration the task should run.
    * The task will be killed and marked as FAILED if over this limit.
+   * The valid value range for max_run_duration in seconds is [0,
+   * 315576000000.999999999],
    * 
* * .google.protobuf.Duration max_run_duration = 4; @@ -174,6 +176,8 @@ public interface TaskSpecOrBuilder *
    * Maximum duration the task should run.
    * The task will be killed and marked as FAILED if over this limit.
+   * The valid value range for max_run_duration in seconds is [0,
+   * 315576000000.999999999],
    * 
* * .google.protobuf.Duration max_run_duration = 4; @@ -187,6 +191,8 @@ public interface TaskSpecOrBuilder *
    * Maximum duration the task should run.
    * The task will be killed and marked as FAILED if over this limit.
+   * The valid value range for max_run_duration in seconds is [0,
+   * 315576000000.999999999],
    * 
* * .google.protobuf.Duration max_run_duration = 4; diff --git a/java-batch/proto-google-cloud-batch-v1/src/main/proto/google/cloud/batch/v1/task.proto b/java-batch/proto-google-cloud-batch-v1/src/main/proto/google/cloud/batch/v1/task.proto index 7037d20da0c6..132817685e45 100644 --- a/java-batch/proto-google-cloud-batch-v1/src/main/proto/google/cloud/batch/v1/task.proto +++ b/java-batch/proto-google-cloud-batch-v1/src/main/proto/google/cloud/batch/v1/task.proto @@ -333,6 +333,8 @@ message TaskSpec { // Maximum duration the task should run. // The task will be killed and marked as FAILED if over this limit. + // The valid value range for max_run_duration in seconds is [0, + // 315576000000.999999999], google.protobuf.Duration max_run_duration = 4; // Maximum number of retries on failures. diff --git a/java-batch/proto-google-cloud-batch-v1alpha/src/main/java/com/google/cloud/batch/v1alpha/ResourceAllowance.java b/java-batch/proto-google-cloud-batch-v1alpha/src/main/java/com/google/cloud/batch/v1alpha/ResourceAllowance.java index ecc4ca45049a..621c70669ba6 100644 --- a/java-batch/proto-google-cloud-batch-v1alpha/src/main/java/com/google/cloud/batch/v1alpha/ResourceAllowance.java +++ b/java-batch/proto-google-cloud-batch-v1alpha/src/main/java/com/google/cloud/batch/v1alpha/ResourceAllowance.java @@ -24,6 +24,8 @@ * *
  * The Resource Allowance description for Cloud Batch.
+ * Only one Resource Allowance is supported now under a specific location and
+ * project.
  * 
* * Protobuf type {@code google.cloud.batch.v1alpha.ResourceAllowance} @@ -800,6 +802,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * *
    * The Resource Allowance description for Cloud Batch.
+   * Only one Resource Allowance is supported now under a specific location and
+   * project.
    * 
* * Protobuf type {@code google.cloud.batch.v1alpha.ResourceAllowance} diff --git a/java-batch/proto-google-cloud-batch-v1alpha/src/main/java/com/google/cloud/batch/v1alpha/TaskSpec.java b/java-batch/proto-google-cloud-batch-v1alpha/src/main/java/com/google/cloud/batch/v1alpha/TaskSpec.java index c8a9ee01e0c3..872bb88a21e3 100644 --- a/java-batch/proto-google-cloud-batch-v1alpha/src/main/java/com/google/cloud/batch/v1alpha/TaskSpec.java +++ b/java-batch/proto-google-cloud-batch-v1alpha/src/main/java/com/google/cloud/batch/v1alpha/TaskSpec.java @@ -252,6 +252,8 @@ public com.google.cloud.batch.v1alpha.ComputeResourceOrBuilder getComputeResourc *
    * Maximum duration the task should run.
    * The task will be killed and marked as FAILED if over this limit.
+   * The valid value range for max_run_duration in seconds is [0,
+   * 315576000000.999999999],
    * 
* * .google.protobuf.Duration max_run_duration = 4; @@ -268,6 +270,8 @@ public boolean hasMaxRunDuration() { *
    * Maximum duration the task should run.
    * The task will be killed and marked as FAILED if over this limit.
+   * The valid value range for max_run_duration in seconds is [0,
+   * 315576000000.999999999],
    * 
* * .google.protobuf.Duration max_run_duration = 4; @@ -286,6 +290,8 @@ public com.google.protobuf.Duration getMaxRunDuration() { *
    * Maximum duration the task should run.
    * The task will be killed and marked as FAILED if over this limit.
+   * The valid value range for max_run_duration in seconds is [0,
+   * 315576000000.999999999],
    * 
* * .google.protobuf.Duration max_run_duration = 4; @@ -2081,6 +2087,8 @@ public com.google.cloud.batch.v1alpha.ComputeResourceOrBuilder getComputeResourc *
      * Maximum duration the task should run.
      * The task will be killed and marked as FAILED if over this limit.
+     * The valid value range for max_run_duration in seconds is [0,
+     * 315576000000.999999999],
      * 
* * .google.protobuf.Duration max_run_duration = 4; @@ -2096,6 +2104,8 @@ public boolean hasMaxRunDuration() { *
      * Maximum duration the task should run.
      * The task will be killed and marked as FAILED if over this limit.
+     * The valid value range for max_run_duration in seconds is [0,
+     * 315576000000.999999999],
      * 
* * .google.protobuf.Duration max_run_duration = 4; @@ -2117,6 +2127,8 @@ public com.google.protobuf.Duration getMaxRunDuration() { *
      * Maximum duration the task should run.
      * The task will be killed and marked as FAILED if over this limit.
+     * The valid value range for max_run_duration in seconds is [0,
+     * 315576000000.999999999],
      * 
* * .google.protobuf.Duration max_run_duration = 4; @@ -2140,6 +2152,8 @@ public Builder setMaxRunDuration(com.google.protobuf.Duration value) { *
      * Maximum duration the task should run.
      * The task will be killed and marked as FAILED if over this limit.
+     * The valid value range for max_run_duration in seconds is [0,
+     * 315576000000.999999999],
      * 
* * .google.protobuf.Duration max_run_duration = 4; @@ -2160,6 +2174,8 @@ public Builder setMaxRunDuration(com.google.protobuf.Duration.Builder builderFor *
      * Maximum duration the task should run.
      * The task will be killed and marked as FAILED if over this limit.
+     * The valid value range for max_run_duration in seconds is [0,
+     * 315576000000.999999999],
      * 
* * .google.protobuf.Duration max_run_duration = 4; @@ -2188,6 +2204,8 @@ public Builder mergeMaxRunDuration(com.google.protobuf.Duration value) { *
      * Maximum duration the task should run.
      * The task will be killed and marked as FAILED if over this limit.
+     * The valid value range for max_run_duration in seconds is [0,
+     * 315576000000.999999999],
      * 
* * .google.protobuf.Duration max_run_duration = 4; @@ -2208,6 +2226,8 @@ public Builder clearMaxRunDuration() { *
      * Maximum duration the task should run.
      * The task will be killed and marked as FAILED if over this limit.
+     * The valid value range for max_run_duration in seconds is [0,
+     * 315576000000.999999999],
      * 
* * .google.protobuf.Duration max_run_duration = 4; @@ -2223,6 +2243,8 @@ public com.google.protobuf.Duration.Builder getMaxRunDurationBuilder() { *
      * Maximum duration the task should run.
      * The task will be killed and marked as FAILED if over this limit.
+     * The valid value range for max_run_duration in seconds is [0,
+     * 315576000000.999999999],
      * 
* * .google.protobuf.Duration max_run_duration = 4; @@ -2242,6 +2264,8 @@ public com.google.protobuf.DurationOrBuilder getMaxRunDurationOrBuilder() { *
      * Maximum duration the task should run.
      * The task will be killed and marked as FAILED if over this limit.
+     * The valid value range for max_run_duration in seconds is [0,
+     * 315576000000.999999999],
      * 
* * .google.protobuf.Duration max_run_duration = 4; diff --git a/java-batch/proto-google-cloud-batch-v1alpha/src/main/java/com/google/cloud/batch/v1alpha/TaskSpecOrBuilder.java b/java-batch/proto-google-cloud-batch-v1alpha/src/main/java/com/google/cloud/batch/v1alpha/TaskSpecOrBuilder.java index fab2fe4b4b98..e7432b759f72 100644 --- a/java-batch/proto-google-cloud-batch-v1alpha/src/main/java/com/google/cloud/batch/v1alpha/TaskSpecOrBuilder.java +++ b/java-batch/proto-google-cloud-batch-v1alpha/src/main/java/com/google/cloud/batch/v1alpha/TaskSpecOrBuilder.java @@ -162,6 +162,8 @@ public interface TaskSpecOrBuilder *
    * Maximum duration the task should run.
    * The task will be killed and marked as FAILED if over this limit.
+   * The valid value range for max_run_duration in seconds is [0,
+   * 315576000000.999999999],
    * 
* * .google.protobuf.Duration max_run_duration = 4; @@ -175,6 +177,8 @@ public interface TaskSpecOrBuilder *
    * Maximum duration the task should run.
    * The task will be killed and marked as FAILED if over this limit.
+   * The valid value range for max_run_duration in seconds is [0,
+   * 315576000000.999999999],
    * 
* * .google.protobuf.Duration max_run_duration = 4; @@ -188,6 +192,8 @@ public interface TaskSpecOrBuilder *
    * Maximum duration the task should run.
    * The task will be killed and marked as FAILED if over this limit.
+   * The valid value range for max_run_duration in seconds is [0,
+   * 315576000000.999999999],
    * 
* * .google.protobuf.Duration max_run_duration = 4; diff --git a/java-batch/proto-google-cloud-batch-v1alpha/src/main/java/com/google/cloud/batch/v1alpha/UsageResourceAllowanceSpec.java b/java-batch/proto-google-cloud-batch-v1alpha/src/main/java/com/google/cloud/batch/v1alpha/UsageResourceAllowanceSpec.java index 69d24d5acc47..cff90b53582b 100644 --- a/java-batch/proto-google-cloud-batch-v1alpha/src/main/java/com/google/cloud/batch/v1alpha/UsageResourceAllowanceSpec.java +++ b/java-batch/proto-google-cloud-batch-v1alpha/src/main/java/com/google/cloud/batch/v1alpha/UsageResourceAllowanceSpec.java @@ -119,10 +119,13 @@ public interface LimitOrBuilder * *
      * Required. Limit value of a UsageResourceAllowance within its one
-     * duration. Default is 0. For example, you can set `limit` as 10000.0 with
-     * duration of the current month by setting `calendar_period` field as
-     * monthly. That means in your current month, 10000.0 is the cour hour
-     * limitation that your resources are allowed to consume.
+     * duration.
+     *
+     * Limit cannot be a negative value. Default is 0.
+     * For example, you can set `limit` as 10000.0 with duration of the current
+     * month by setting `calendar_period` field as monthly. That means in your
+     * current month, 10000.0 is the core hour limitation that your resources
+     * are allowed to consume.
      * 
* * optional double limit = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -135,10 +138,13 @@ public interface LimitOrBuilder * *
      * Required. Limit value of a UsageResourceAllowance within its one
-     * duration. Default is 0. For example, you can set `limit` as 10000.0 with
-     * duration of the current month by setting `calendar_period` field as
-     * monthly. That means in your current month, 10000.0 is the cour hour
-     * limitation that your resources are allowed to consume.
+     * duration.
+     *
+     * Limit cannot be a negative value. Default is 0.
+     * For example, you can set `limit` as 10000.0 with duration of the current
+     * month by setting `calendar_period` field as monthly. That means in your
+     * current month, 10000.0 is the core hour limitation that your resources
+     * are allowed to consume.
      * 
* * optional double limit = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -306,10 +312,13 @@ public com.google.cloud.batch.v1alpha.CalendarPeriod getCalendarPeriod() { * *
      * Required. Limit value of a UsageResourceAllowance within its one
-     * duration. Default is 0. For example, you can set `limit` as 10000.0 with
-     * duration of the current month by setting `calendar_period` field as
-     * monthly. That means in your current month, 10000.0 is the cour hour
-     * limitation that your resources are allowed to consume.
+     * duration.
+     *
+     * Limit cannot be a negative value. Default is 0.
+     * For example, you can set `limit` as 10000.0 with duration of the current
+     * month by setting `calendar_period` field as monthly. That means in your
+     * current month, 10000.0 is the core hour limitation that your resources
+     * are allowed to consume.
      * 
* * optional double limit = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -325,10 +334,13 @@ public boolean hasLimit() { * *
      * Required. Limit value of a UsageResourceAllowance within its one
-     * duration. Default is 0. For example, you can set `limit` as 10000.0 with
-     * duration of the current month by setting `calendar_period` field as
-     * monthly. That means in your current month, 10000.0 is the cour hour
-     * limitation that your resources are allowed to consume.
+     * duration.
+     *
+     * Limit cannot be a negative value. Default is 0.
+     * For example, you can set `limit` as 10000.0 with duration of the current
+     * month by setting `calendar_period` field as monthly. That means in your
+     * current month, 10000.0 is the core hour limitation that your resources
+     * are allowed to consume.
      * 
* * optional double limit = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -907,10 +919,13 @@ public Builder clearCalendarPeriod() { * *
        * Required. Limit value of a UsageResourceAllowance within its one
-       * duration. Default is 0. For example, you can set `limit` as 10000.0 with
-       * duration of the current month by setting `calendar_period` field as
-       * monthly. That means in your current month, 10000.0 is the cour hour
-       * limitation that your resources are allowed to consume.
+       * duration.
+       *
+       * Limit cannot be a negative value. Default is 0.
+       * For example, you can set `limit` as 10000.0 with duration of the current
+       * month by setting `calendar_period` field as monthly. That means in your
+       * current month, 10000.0 is the core hour limitation that your resources
+       * are allowed to consume.
        * 
* * optional double limit = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -926,10 +941,13 @@ public boolean hasLimit() { * *
        * Required. Limit value of a UsageResourceAllowance within its one
-       * duration. Default is 0. For example, you can set `limit` as 10000.0 with
-       * duration of the current month by setting `calendar_period` field as
-       * monthly. That means in your current month, 10000.0 is the cour hour
-       * limitation that your resources are allowed to consume.
+       * duration.
+       *
+       * Limit cannot be a negative value. Default is 0.
+       * For example, you can set `limit` as 10000.0 with duration of the current
+       * month by setting `calendar_period` field as monthly. That means in your
+       * current month, 10000.0 is the core hour limitation that your resources
+       * are allowed to consume.
        * 
* * optional double limit = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -945,10 +963,13 @@ public double getLimit() { * *
        * Required. Limit value of a UsageResourceAllowance within its one
-       * duration. Default is 0. For example, you can set `limit` as 10000.0 with
-       * duration of the current month by setting `calendar_period` field as
-       * monthly. That means in your current month, 10000.0 is the cour hour
-       * limitation that your resources are allowed to consume.
+       * duration.
+       *
+       * Limit cannot be a negative value. Default is 0.
+       * For example, you can set `limit` as 10000.0 with duration of the current
+       * month by setting `calendar_period` field as monthly. That means in your
+       * current month, 10000.0 is the core hour limitation that your resources
+       * are allowed to consume.
        * 
* * optional double limit = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -968,10 +989,13 @@ public Builder setLimit(double value) { * *
        * Required. Limit value of a UsageResourceAllowance within its one
-       * duration. Default is 0. For example, you can set `limit` as 10000.0 with
-       * duration of the current month by setting `calendar_period` field as
-       * monthly. That means in your current month, 10000.0 is the cour hour
-       * limitation that your resources are allowed to consume.
+       * duration.
+       *
+       * Limit cannot be a negative value. Default is 0.
+       * For example, you can set `limit` as 10000.0 with duration of the current
+       * month by setting `calendar_period` field as monthly. That means in your
+       * current month, 10000.0 is the core hour limitation that your resources
+       * are allowed to consume.
        * 
* * optional double limit = 2 [(.google.api.field_behavior) = REQUIRED]; diff --git a/java-batch/proto-google-cloud-batch-v1alpha/src/main/proto/google/cloud/batch/v1alpha/resource_allowance.proto b/java-batch/proto-google-cloud-batch-v1alpha/src/main/proto/google/cloud/batch/v1alpha/resource_allowance.proto index 78a18a7caac8..2fc987a72c84 100644 --- a/java-batch/proto-google-cloud-batch-v1alpha/src/main/proto/google/cloud/batch/v1alpha/resource_allowance.proto +++ b/java-batch/proto-google-cloud-batch-v1alpha/src/main/proto/google/cloud/batch/v1alpha/resource_allowance.proto @@ -70,6 +70,8 @@ enum ResourceAllowanceState { } // The Resource Allowance description for Cloud Batch. +// Only one Resource Allowance is supported now under a specific location and +// project. message ResourceAllowance { option (google.api.resource) = { type: "batch.googleapis.com/ResourceAllowance" @@ -140,10 +142,13 @@ message UsageResourceAllowanceSpec { } // Required. Limit value of a UsageResourceAllowance within its one - // duration. Default is 0. For example, you can set `limit` as 10000.0 with - // duration of the current month by setting `calendar_period` field as - // monthly. That means in your current month, 10000.0 is the cour hour - // limitation that your resources are allowed to consume. + // duration. + // + // Limit cannot be a negative value. Default is 0. + // For example, you can set `limit` as 10000.0 with duration of the current + // month by setting `calendar_period` field as monthly. That means in your + // current month, 10000.0 is the core hour limitation that your resources + // are allowed to consume. optional double limit = 2 [(google.api.field_behavior) = REQUIRED]; } diff --git a/java-batch/proto-google-cloud-batch-v1alpha/src/main/proto/google/cloud/batch/v1alpha/task.proto b/java-batch/proto-google-cloud-batch-v1alpha/src/main/proto/google/cloud/batch/v1alpha/task.proto index 5b259463d938..72cdb6e16bd8 100644 --- a/java-batch/proto-google-cloud-batch-v1alpha/src/main/proto/google/cloud/batch/v1alpha/task.proto +++ b/java-batch/proto-google-cloud-batch-v1alpha/src/main/proto/google/cloud/batch/v1alpha/task.proto @@ -352,6 +352,8 @@ message TaskSpec { // Maximum duration the task should run. // The task will be killed and marked as FAILED if over this limit. + // The valid value range for max_run_duration in seconds is [0, + // 315576000000.999999999], google.protobuf.Duration max_run_duration = 4; // Maximum number of retries on failures. diff --git a/java-beyondcorp-appconnections/README.md b/java-beyondcorp-appconnections/README.md index 27c79c5544d2..bd11125e6082 100644 --- a/java-beyondcorp-appconnections/README.md +++ b/java-beyondcorp-appconnections/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -201,7 +201,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-beyondcorp-appconnections.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-beyondcorp-appconnections/0.36.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-beyondcorp-appconnections/0.39.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-beyondcorp-appconnectors/README.md b/java-beyondcorp-appconnectors/README.md index 1558a5cae0cf..2b8f369fc4de 100644 --- a/java-beyondcorp-appconnectors/README.md +++ b/java-beyondcorp-appconnectors/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -201,7 +201,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-beyondcorp-appconnectors.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-beyondcorp-appconnectors/0.36.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-beyondcorp-appconnectors/0.39.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-beyondcorp-appgateways/README.md b/java-beyondcorp-appgateways/README.md index 7de9ecbae46b..0fde503c0349 100644 --- a/java-beyondcorp-appgateways/README.md +++ b/java-beyondcorp-appgateways/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -201,7 +201,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-beyondcorp-appgateways.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-beyondcorp-appgateways/0.36.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-beyondcorp-appgateways/0.39.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-beyondcorp-clientconnectorservices/README.md b/java-beyondcorp-clientconnectorservices/README.md index 840bf9bd8f7f..fb96c3f41133 100644 --- a/java-beyondcorp-clientconnectorservices/README.md +++ b/java-beyondcorp-clientconnectorservices/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -201,7 +201,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-beyondcorp-clientconnectorservices.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-beyondcorp-clientconnectorservices/0.36.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-beyondcorp-clientconnectorservices/0.39.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-beyondcorp-clientgateways/README.md b/java-beyondcorp-clientgateways/README.md index 9fd7ea691e37..1337c597af38 100644 --- a/java-beyondcorp-clientgateways/README.md +++ b/java-beyondcorp-clientgateways/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -201,7 +201,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-beyondcorp-clientgateways.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-beyondcorp-clientgateways/0.36.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-beyondcorp-clientgateways/0.39.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-biglake/README.md b/java-biglake/README.md index cffb9b576e25..d66de503a67f 100644 --- a/java-biglake/README.md +++ b/java-biglake/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -201,7 +201,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-biglake.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-biglake/0.26.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-biglake/0.29.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-bigquery-data-exchange/README.md b/java-bigquery-data-exchange/README.md index 2744e7902af9..9c4f92dca12e 100644 --- a/java-bigquery-data-exchange/README.md +++ b/java-bigquery-data-exchange/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -201,7 +201,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-bigquery-data-exchange.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-bigquery-data-exchange/2.33.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-bigquery-data-exchange/2.36.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-bigqueryconnection/README.md b/java-bigqueryconnection/README.md index 9eea37b853c6..560f30c479ae 100644 --- a/java-bigqueryconnection/README.md +++ b/java-bigqueryconnection/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.34.0 + 26.37.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-bigqueryconnection.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-bigqueryconnection/2.40.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-bigqueryconnection/2.43.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-bigquerydatapolicy/README.md b/java-bigquerydatapolicy/README.md index 023c8fc3a7a1..0969e9baa8f8 100644 --- a/java-bigquerydatapolicy/README.md +++ b/java-bigquerydatapolicy/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -201,7 +201,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-bigquerydatapolicy.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-bigquerydatapolicy/0.35.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-bigquerydatapolicy/0.38.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-bigquerydatatransfer/README.md b/java-bigquerydatatransfer/README.md index bb7d6964444b..f50ed42714b3 100644 --- a/java-bigquerydatatransfer/README.md +++ b/java-bigquerydatatransfer/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.34.0 + 26.37.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-bigquerydatatransfer.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-bigquerydatatransfer/2.38.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-bigquerydatatransfer/2.41.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-bigquerymigration/README.md b/java-bigquerymigration/README.md index db8a13aa431f..717ea0c6d518 100644 --- a/java-bigquerymigration/README.md +++ b/java-bigquerymigration/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -201,7 +201,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-bigquerymigration.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-bigquerymigration/0.41.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-bigquerymigration/0.44.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-bigqueryreservation/README.md b/java-bigqueryreservation/README.md index abeb1b53f243..273ffa1a8eba 100644 --- a/java-bigqueryreservation/README.md +++ b/java-bigqueryreservation/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.34.0 + 26.37.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-bigqueryreservation.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-bigqueryreservation/2.39.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-bigqueryreservation/2.42.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-billing/README.md b/java-billing/README.md index 2513b4586130..b4e569eb7dc3 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: com.google.cloud libraries-bom - 26.34.0 + 26.37.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-billing.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-billing/2.38.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-billing/2.41.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/README.md b/java-billingbudgets/README.md index 5dc4acc7c24a..f7c74fe5c5ab 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.34.0 + 26.37.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.38.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-billingbudgets/2.41.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-binary-authorization/README.md b/java-binary-authorization/README.md index a5027097db5f..979bad131a0a 100644 --- a/java-binary-authorization/README.md +++ b/java-binary-authorization/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.34.0 + 26.37.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-binary-authorization.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-binary-authorization/1.37.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-binary-authorization/1.40.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-certificate-manager/README.md b/java-certificate-manager/README.md index 5d5a7143189e..4cba41017b26 100644 --- a/java-certificate-manager/README.md +++ b/java-certificate-manager/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -201,7 +201,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-certificate-manager.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-certificate-manager/0.41.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-certificate-manager/0.44.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-channel/README.md b/java-channel/README.md index d0a45878acef..5e2579ab5ef8 100644 --- a/java-channel/README.md +++ b/java-channel/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.34.0 + 26.37.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-channel.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-channel/3.42.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-channel/3.45.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-chat/README.md b/java-chat/README.md index 363325729071..3713341f7ca3 100644 --- a/java-chat/README.md +++ b/java-chat/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -201,7 +201,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-chat.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-chat/0.2.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-chat/0.5.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-cloudbuild/README.md b/java-cloudbuild/README.md index 77202ea7d986..c38f497f05a3 100644 --- a/java-cloudbuild/README.md +++ b/java-cloudbuild/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.34.0 + 26.37.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-build.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-build/3.40.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-build/3.43.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-cloudcommerceconsumerprocurement/README.md b/java-cloudcommerceconsumerprocurement/README.md index 3d074b7d87e8..71a074b84712 100644 --- a/java-cloudcommerceconsumerprocurement/README.md +++ b/java-cloudcommerceconsumerprocurement/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -201,7 +201,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-cloudcommerceconsumerprocurement.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-cloudcommerceconsumerprocurement/0.36.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-cloudcommerceconsumerprocurement/0.39.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-cloudcontrolspartner/README.md b/java-cloudcontrolspartner/README.md index ad6950ed60a7..150790fc62ab 100644 --- a/java-cloudcontrolspartner/README.md +++ b/java-cloudcontrolspartner/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -201,7 +201,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-cloudcontrolspartner.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-cloudcontrolspartner/0.2.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-cloudcontrolspartner/0.5.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-cloudquotas/README.md b/java-cloudquotas/README.md index 831383934ed5..6a89e1b2a759 100644 --- a/java-cloudquotas/README.md +++ b/java-cloudquotas/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -203,7 +203,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-cloudquotas.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-cloudquotas/0.6.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-cloudquotas/0.9.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-cloudquotas/google-cloud-cloudquotas/src/main/resources/META-INF/native-image/com.google.api.cloudquotas.v1/reflect-config.json b/java-cloudquotas/google-cloud-cloudquotas/src/main/resources/META-INF/native-image/com.google.api.cloudquotas.v1/reflect-config.json index 164ab659b6ff..59c1f33cec88 100644 --- a/java-cloudquotas/google-cloud-cloudquotas/src/main/resources/META-INF/native-image/com.google.api.cloudquotas.v1/reflect-config.json +++ b/java-cloudquotas/google-cloud-cloudquotas/src/main/resources/META-INF/native-image/com.google.api.cloudquotas.v1/reflect-config.json @@ -647,6 +647,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.api.cloudquotas.v1.RolloutInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.cloudquotas.v1.RolloutInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.api.cloudquotas.v1.UpdateQuotaPreferenceRequest", "queryAllDeclaredConstructors": true, diff --git a/java-cloudquotas/proto-google-cloud-cloudquotas-v1/src/main/java/com/google/api/cloudquotas/v1/QuotaDetails.java b/java-cloudquotas/proto-google-cloud-cloudquotas-v1/src/main/java/com/google/api/cloudquotas/v1/QuotaDetails.java index 8d78b70b66a1..519cbb33b878 100644 --- a/java-cloudquotas/proto-google-cloud-cloudquotas-v1/src/main/java/com/google/api/cloudquotas/v1/QuotaDetails.java +++ b/java-cloudquotas/proto-google-cloud-cloudquotas-v1/src/main/java/com/google/api/cloudquotas/v1/QuotaDetails.java @@ -61,6 +61,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.api.cloudquotas.v1.QuotaDetails.Builder.class); } + private int bitField0_; public static final int VALUE_FIELD_NUMBER = 1; private long value_ = 0L; /** @@ -79,6 +80,62 @@ public long getValue() { return value_; } + public static final int ROLLOUT_INFO_FIELD_NUMBER = 3; + private com.google.api.cloudquotas.v1.RolloutInfo rolloutInfo_; + /** + * + * + *
+   * Rollout information of this quota.
+   * This field is present only if the effective limit will change due to the
+   * ongoing rollout of the service config.
+   * 
+ * + * .google.api.cloudquotas.v1.RolloutInfo rollout_info = 3; + * + * @return Whether the rolloutInfo field is set. + */ + @java.lang.Override + public boolean hasRolloutInfo() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Rollout information of this quota.
+   * This field is present only if the effective limit will change due to the
+   * ongoing rollout of the service config.
+   * 
+ * + * .google.api.cloudquotas.v1.RolloutInfo rollout_info = 3; + * + * @return The rolloutInfo. + */ + @java.lang.Override + public com.google.api.cloudquotas.v1.RolloutInfo getRolloutInfo() { + return rolloutInfo_ == null + ? com.google.api.cloudquotas.v1.RolloutInfo.getDefaultInstance() + : rolloutInfo_; + } + /** + * + * + *
+   * Rollout information of this quota.
+   * This field is present only if the effective limit will change due to the
+   * ongoing rollout of the service config.
+   * 
+ * + * .google.api.cloudquotas.v1.RolloutInfo rollout_info = 3; + */ + @java.lang.Override + public com.google.api.cloudquotas.v1.RolloutInfoOrBuilder getRolloutInfoOrBuilder() { + return rolloutInfo_ == null + ? com.google.api.cloudquotas.v1.RolloutInfo.getDefaultInstance() + : rolloutInfo_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -96,6 +153,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (value_ != 0L) { output.writeInt64(1, value_); } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getRolloutInfo()); + } getUnknownFields().writeTo(output); } @@ -108,6 +168,9 @@ public int getSerializedSize() { if (value_ != 0L) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, value_); } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getRolloutInfo()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -125,6 +188,10 @@ public boolean equals(final java.lang.Object obj) { (com.google.api.cloudquotas.v1.QuotaDetails) obj; if (getValue() != other.getValue()) return false; + if (hasRolloutInfo() != other.hasRolloutInfo()) return false; + if (hasRolloutInfo()) { + if (!getRolloutInfo().equals(other.getRolloutInfo())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -138,6 +205,10 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + VALUE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getValue()); + if (hasRolloutInfo()) { + hash = (37 * hash) + ROLLOUT_INFO_FIELD_NUMBER; + hash = (53 * hash) + getRolloutInfo().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -267,10 +338,19 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.api.cloudquotas.v1.QuotaDetails.newBuilder() - private Builder() {} + private Builder() { + maybeForceBuilderInitialization(); + } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getRolloutInfoFieldBuilder(); + } } @java.lang.Override @@ -278,6 +358,11 @@ public Builder clear() { super.clear(); bitField0_ = 0; value_ = 0L; + rolloutInfo_ = null; + if (rolloutInfoBuilder_ != null) { + rolloutInfoBuilder_.dispose(); + rolloutInfoBuilder_ = null; + } return this; } @@ -317,6 +402,13 @@ private void buildPartial0(com.google.api.cloudquotas.v1.QuotaDetails result) { if (((from_bitField0_ & 0x00000001) != 0)) { result.value_ = value_; } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.rolloutInfo_ = + rolloutInfoBuilder_ == null ? rolloutInfo_ : rolloutInfoBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -367,6 +459,9 @@ public Builder mergeFrom(com.google.api.cloudquotas.v1.QuotaDetails other) { if (other.getValue() != 0L) { setValue(other.getValue()); } + if (other.hasRolloutInfo()) { + mergeRolloutInfo(other.getRolloutInfo()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -399,6 +494,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000001; break; } // case 8 + case 26: + { + input.readMessage(getRolloutInfoFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 26 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -471,6 +572,210 @@ public Builder clearValue() { return this; } + private com.google.api.cloudquotas.v1.RolloutInfo rolloutInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.cloudquotas.v1.RolloutInfo, + com.google.api.cloudquotas.v1.RolloutInfo.Builder, + com.google.api.cloudquotas.v1.RolloutInfoOrBuilder> + rolloutInfoBuilder_; + /** + * + * + *
+     * Rollout information of this quota.
+     * This field is present only if the effective limit will change due to the
+     * ongoing rollout of the service config.
+     * 
+ * + * .google.api.cloudquotas.v1.RolloutInfo rollout_info = 3; + * + * @return Whether the rolloutInfo field is set. + */ + public boolean hasRolloutInfo() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Rollout information of this quota.
+     * This field is present only if the effective limit will change due to the
+     * ongoing rollout of the service config.
+     * 
+ * + * .google.api.cloudquotas.v1.RolloutInfo rollout_info = 3; + * + * @return The rolloutInfo. + */ + public com.google.api.cloudquotas.v1.RolloutInfo getRolloutInfo() { + if (rolloutInfoBuilder_ == null) { + return rolloutInfo_ == null + ? com.google.api.cloudquotas.v1.RolloutInfo.getDefaultInstance() + : rolloutInfo_; + } else { + return rolloutInfoBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Rollout information of this quota.
+     * This field is present only if the effective limit will change due to the
+     * ongoing rollout of the service config.
+     * 
+ * + * .google.api.cloudquotas.v1.RolloutInfo rollout_info = 3; + */ + public Builder setRolloutInfo(com.google.api.cloudquotas.v1.RolloutInfo value) { + if (rolloutInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rolloutInfo_ = value; + } else { + rolloutInfoBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Rollout information of this quota.
+     * This field is present only if the effective limit will change due to the
+     * ongoing rollout of the service config.
+     * 
+ * + * .google.api.cloudquotas.v1.RolloutInfo rollout_info = 3; + */ + public Builder setRolloutInfo( + com.google.api.cloudquotas.v1.RolloutInfo.Builder builderForValue) { + if (rolloutInfoBuilder_ == null) { + rolloutInfo_ = builderForValue.build(); + } else { + rolloutInfoBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Rollout information of this quota.
+     * This field is present only if the effective limit will change due to the
+     * ongoing rollout of the service config.
+     * 
+ * + * .google.api.cloudquotas.v1.RolloutInfo rollout_info = 3; + */ + public Builder mergeRolloutInfo(com.google.api.cloudquotas.v1.RolloutInfo value) { + if (rolloutInfoBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && rolloutInfo_ != null + && rolloutInfo_ != com.google.api.cloudquotas.v1.RolloutInfo.getDefaultInstance()) { + getRolloutInfoBuilder().mergeFrom(value); + } else { + rolloutInfo_ = value; + } + } else { + rolloutInfoBuilder_.mergeFrom(value); + } + if (rolloutInfo_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Rollout information of this quota.
+     * This field is present only if the effective limit will change due to the
+     * ongoing rollout of the service config.
+     * 
+ * + * .google.api.cloudquotas.v1.RolloutInfo rollout_info = 3; + */ + public Builder clearRolloutInfo() { + bitField0_ = (bitField0_ & ~0x00000002); + rolloutInfo_ = null; + if (rolloutInfoBuilder_ != null) { + rolloutInfoBuilder_.dispose(); + rolloutInfoBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Rollout information of this quota.
+     * This field is present only if the effective limit will change due to the
+     * ongoing rollout of the service config.
+     * 
+ * + * .google.api.cloudquotas.v1.RolloutInfo rollout_info = 3; + */ + public com.google.api.cloudquotas.v1.RolloutInfo.Builder getRolloutInfoBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getRolloutInfoFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Rollout information of this quota.
+     * This field is present only if the effective limit will change due to the
+     * ongoing rollout of the service config.
+     * 
+ * + * .google.api.cloudquotas.v1.RolloutInfo rollout_info = 3; + */ + public com.google.api.cloudquotas.v1.RolloutInfoOrBuilder getRolloutInfoOrBuilder() { + if (rolloutInfoBuilder_ != null) { + return rolloutInfoBuilder_.getMessageOrBuilder(); + } else { + return rolloutInfo_ == null + ? com.google.api.cloudquotas.v1.RolloutInfo.getDefaultInstance() + : rolloutInfo_; + } + } + /** + * + * + *
+     * Rollout information of this quota.
+     * This field is present only if the effective limit will change due to the
+     * ongoing rollout of the service config.
+     * 
+ * + * .google.api.cloudquotas.v1.RolloutInfo rollout_info = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.cloudquotas.v1.RolloutInfo, + com.google.api.cloudquotas.v1.RolloutInfo.Builder, + com.google.api.cloudquotas.v1.RolloutInfoOrBuilder> + getRolloutInfoFieldBuilder() { + if (rolloutInfoBuilder_ == null) { + rolloutInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.api.cloudquotas.v1.RolloutInfo, + com.google.api.cloudquotas.v1.RolloutInfo.Builder, + com.google.api.cloudquotas.v1.RolloutInfoOrBuilder>( + getRolloutInfo(), getParentForChildren(), isClean()); + rolloutInfo_ = null; + } + return rolloutInfoBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-cloudquotas/proto-google-cloud-cloudquotas-v1/src/main/java/com/google/api/cloudquotas/v1/QuotaDetailsOrBuilder.java b/java-cloudquotas/proto-google-cloud-cloudquotas-v1/src/main/java/com/google/api/cloudquotas/v1/QuotaDetailsOrBuilder.java index c8613aa5268a..b4e946446fa3 100644 --- a/java-cloudquotas/proto-google-cloud-cloudquotas-v1/src/main/java/com/google/api/cloudquotas/v1/QuotaDetailsOrBuilder.java +++ b/java-cloudquotas/proto-google-cloud-cloudquotas-v1/src/main/java/com/google/api/cloudquotas/v1/QuotaDetailsOrBuilder.java @@ -36,4 +36,45 @@ public interface QuotaDetailsOrBuilder * @return The value. */ long getValue(); + + /** + * + * + *
+   * Rollout information of this quota.
+   * This field is present only if the effective limit will change due to the
+   * ongoing rollout of the service config.
+   * 
+ * + * .google.api.cloudquotas.v1.RolloutInfo rollout_info = 3; + * + * @return Whether the rolloutInfo field is set. + */ + boolean hasRolloutInfo(); + /** + * + * + *
+   * Rollout information of this quota.
+   * This field is present only if the effective limit will change due to the
+   * ongoing rollout of the service config.
+   * 
+ * + * .google.api.cloudquotas.v1.RolloutInfo rollout_info = 3; + * + * @return The rolloutInfo. + */ + com.google.api.cloudquotas.v1.RolloutInfo getRolloutInfo(); + /** + * + * + *
+   * Rollout information of this quota.
+   * This field is present only if the effective limit will change due to the
+   * ongoing rollout of the service config.
+   * 
+ * + * .google.api.cloudquotas.v1.RolloutInfo rollout_info = 3; + */ + com.google.api.cloudquotas.v1.RolloutInfoOrBuilder getRolloutInfoOrBuilder(); } diff --git a/java-cloudquotas/proto-google-cloud-cloudquotas-v1/src/main/java/com/google/api/cloudquotas/v1/ResourcesProto.java b/java-cloudquotas/proto-google-cloud-cloudquotas-v1/src/main/java/com/google/api/cloudquotas/v1/ResourcesProto.java index ec8f3445efe6..41a7a122a2c3 100644 --- a/java-cloudquotas/proto-google-cloud-cloudquotas-v1/src/main/java/com/google/api/cloudquotas/v1/ResourcesProto.java +++ b/java-cloudquotas/proto-google-cloud-cloudquotas-v1/src/main/java/com/google/api/cloudquotas/v1/ResourcesProto.java @@ -64,6 +64,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_api_cloudquotas_v1_QuotaDetails_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_api_cloudquotas_v1_QuotaDetails_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_cloudquotas_v1_RolloutInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_cloudquotas_v1_RolloutInfo_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -143,17 +147,19 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "sionsEntry\0228\n\007details\030\002 \001(\0132\'.google.api" + ".cloudquotas.v1.QuotaDetails\022\034\n\024applicab" + "le_locations\030\003 \003(\t\0321\n\017DimensionsEntry\022\013\n" - + "\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\035\n\014QuotaDe" - + "tails\022\r\n\005value\030\001 \001(\003*~\n\020QuotaSafetyCheck" - + "\022\"\n\036QUOTA_SAFETY_CHECK_UNSPECIFIED\020\000\022\036\n\032" - + "QUOTA_DECREASE_BELOW_USAGE\020\001\022&\n\"QUOTA_DE" - + "CREASE_PERCENTAGE_TOO_HIGH\020\002B\321\001\n\035com.goo" - + "gle.api.cloudquotas.v1B\016ResourcesProtoP\001" - + "ZAcloud.google.com/go/cloudquotas/apiv1/" - + "cloudquotaspb;cloudquotaspb\252\002\033Google.Clo" - + "ud.CloudQuotas.V1\312\002\033Google\\Cloud\\CloudQu" - + "otas\\V1\352\002\036Google::Cloud::CloudQuotas::V1" - + "b\006proto3" + + "\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"[\n\014QuotaDe" + + "tails\022\r\n\005value\030\001 \001(\003\022<\n\014rollout_info\030\003 \001" + + "(\0132&.google.api.cloudquotas.v1.RolloutIn" + + "fo\"&\n\013RolloutInfo\022\027\n\017ongoing_rollout\030\001 \001" + + "(\010*~\n\020QuotaSafetyCheck\022\"\n\036QUOTA_SAFETY_C" + + "HECK_UNSPECIFIED\020\000\022\036\n\032QUOTA_DECREASE_BEL" + + "OW_USAGE\020\001\022&\n\"QUOTA_DECREASE_PERCENTAGE_" + + "TOO_HIGH\020\002B\321\001\n\035com.google.api.cloudquota" + + "s.v1B\016ResourcesProtoP\001ZAcloud.google.com" + + "/go/cloudquotas/apiv1/cloudquotaspb;clou" + + "dquotaspb\252\002\033Google.Cloud.CloudQuotas.V1\312" + + "\002\033Google\\Cloud\\CloudQuotas\\V1\352\002\036Google::" + + "Cloud::CloudQuotas::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -266,7 +272,15 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_api_cloudquotas_v1_QuotaDetails_descriptor, new java.lang.String[] { - "Value", + "Value", "RolloutInfo", + }); + internal_static_google_api_cloudquotas_v1_RolloutInfo_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_api_cloudquotas_v1_RolloutInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_cloudquotas_v1_RolloutInfo_descriptor, + new java.lang.String[] { + "OngoingRollout", }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RagContextRecallSpec.java b/java-cloudquotas/proto-google-cloud-cloudquotas-v1/src/main/java/com/google/api/cloudquotas/v1/RolloutInfo.java similarity index 60% rename from java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RagContextRecallSpec.java rename to java-cloudquotas/proto-google-cloud-cloudquotas-v1/src/main/java/com/google/api/cloudquotas/v1/RolloutInfo.java index f1d61be6981a..26576799e29c 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RagContextRecallSpec.java +++ b/java-cloudquotas/proto-google-cloud-cloudquotas-v1/src/main/java/com/google/api/cloudquotas/v1/RolloutInfo.java @@ -14,69 +14,69 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/aiplatform/v1beta1/evaluation_service.proto +// source: google/api/cloudquotas/v1/resources.proto // Protobuf Java Version: 3.25.2 -package com.google.cloud.aiplatform.v1beta1; +package com.google.api.cloudquotas.v1; /** * * *
- * Spec for rag context recall metric.
+ * [Output only] Rollout information of a quota.
  * 
* - * Protobuf type {@code google.cloud.aiplatform.v1beta1.RagContextRecallSpec} + * Protobuf type {@code google.api.cloudquotas.v1.RolloutInfo} */ -public final class RagContextRecallSpec extends com.google.protobuf.GeneratedMessageV3 +public final class RolloutInfo extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.RagContextRecallSpec) - RagContextRecallSpecOrBuilder { + // @@protoc_insertion_point(message_implements:google.api.cloudquotas.v1.RolloutInfo) + RolloutInfoOrBuilder { private static final long serialVersionUID = 0L; - // Use RagContextRecallSpec.newBuilder() to construct. - private RagContextRecallSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use RolloutInfo.newBuilder() to construct. + private RolloutInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private RagContextRecallSpec() {} + private RolloutInfo() {} @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new RagContextRecallSpec(); + return new RolloutInfo(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.aiplatform.v1beta1.EvaluationServiceProto - .internal_static_google_cloud_aiplatform_v1beta1_RagContextRecallSpec_descriptor; + return com.google.api.cloudquotas.v1.ResourcesProto + .internal_static_google_api_cloudquotas_v1_RolloutInfo_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.aiplatform.v1beta1.EvaluationServiceProto - .internal_static_google_cloud_aiplatform_v1beta1_RagContextRecallSpec_fieldAccessorTable + return com.google.api.cloudquotas.v1.ResourcesProto + .internal_static_google_api_cloudquotas_v1_RolloutInfo_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.aiplatform.v1beta1.RagContextRecallSpec.class, - com.google.cloud.aiplatform.v1beta1.RagContextRecallSpec.Builder.class); + com.google.api.cloudquotas.v1.RolloutInfo.class, + com.google.api.cloudquotas.v1.RolloutInfo.Builder.class); } - public static final int VERSION_FIELD_NUMBER = 2; - private int version_ = 0; + public static final int ONGOING_ROLLOUT_FIELD_NUMBER = 1; + private boolean ongoingRollout_ = false; /** * * *
-   * Optional. Which version to use for evaluation.
+   * Whether there is an ongoing rollout for a quota or not.
    * 
* - * int32 version = 2 [(.google.api.field_behavior) = OPTIONAL]; + * bool ongoing_rollout = 1; * - * @return The version. + * @return The ongoingRollout. */ @java.lang.Override - public int getVersion() { - return version_; + public boolean getOngoingRollout() { + return ongoingRollout_; } private byte memoizedIsInitialized = -1; @@ -93,8 +93,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (version_ != 0) { - output.writeInt32(2, version_); + if (ongoingRollout_ != false) { + output.writeBool(1, ongoingRollout_); } getUnknownFields().writeTo(output); } @@ -105,8 +105,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (version_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, version_); + if (ongoingRollout_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, ongoingRollout_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -118,13 +118,13 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.RagContextRecallSpec)) { + if (!(obj instanceof com.google.api.cloudquotas.v1.RolloutInfo)) { return super.equals(obj); } - com.google.cloud.aiplatform.v1beta1.RagContextRecallSpec other = - (com.google.cloud.aiplatform.v1beta1.RagContextRecallSpec) obj; + com.google.api.cloudquotas.v1.RolloutInfo other = + (com.google.api.cloudquotas.v1.RolloutInfo) obj; - if (getVersion() != other.getVersion()) return false; + if (getOngoingRollout() != other.getOngoingRollout()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -136,78 +136,78 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + VERSION_FIELD_NUMBER; - hash = (53 * hash) + getVersion(); + hash = (37 * hash) + ONGOING_ROLLOUT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getOngoingRollout()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.cloud.aiplatform.v1beta1.RagContextRecallSpec parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.api.cloudquotas.v1.RolloutInfo parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.aiplatform.v1beta1.RagContextRecallSpec parseFrom( + public static com.google.api.cloudquotas.v1.RolloutInfo parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.aiplatform.v1beta1.RagContextRecallSpec parseFrom( + public static com.google.api.cloudquotas.v1.RolloutInfo parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.aiplatform.v1beta1.RagContextRecallSpec parseFrom( + public static com.google.api.cloudquotas.v1.RolloutInfo parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.aiplatform.v1beta1.RagContextRecallSpec parseFrom(byte[] data) + public static com.google.api.cloudquotas.v1.RolloutInfo parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.aiplatform.v1beta1.RagContextRecallSpec parseFrom( + public static com.google.api.cloudquotas.v1.RolloutInfo parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.aiplatform.v1beta1.RagContextRecallSpec parseFrom( - java.io.InputStream input) throws java.io.IOException { + public static com.google.api.cloudquotas.v1.RolloutInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.aiplatform.v1beta1.RagContextRecallSpec parseFrom( + public static com.google.api.cloudquotas.v1.RolloutInfo parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.aiplatform.v1beta1.RagContextRecallSpec parseDelimitedFrom( + public static com.google.api.cloudquotas.v1.RolloutInfo parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.aiplatform.v1beta1.RagContextRecallSpec parseDelimitedFrom( + public static com.google.api.cloudquotas.v1.RolloutInfo parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.aiplatform.v1beta1.RagContextRecallSpec parseFrom( + public static com.google.api.cloudquotas.v1.RolloutInfo parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.aiplatform.v1beta1.RagContextRecallSpec parseFrom( + public static com.google.api.cloudquotas.v1.RolloutInfo parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -224,8 +224,7 @@ public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder( - com.google.cloud.aiplatform.v1beta1.RagContextRecallSpec prototype) { + public static Builder newBuilder(com.google.api.cloudquotas.v1.RolloutInfo prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -243,31 +242,31 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Spec for rag context recall metric.
+   * [Output only] Rollout information of a quota.
    * 
* - * Protobuf type {@code google.cloud.aiplatform.v1beta1.RagContextRecallSpec} + * Protobuf type {@code google.api.cloudquotas.v1.RolloutInfo} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.RagContextRecallSpec) - com.google.cloud.aiplatform.v1beta1.RagContextRecallSpecOrBuilder { + // @@protoc_insertion_point(builder_implements:google.api.cloudquotas.v1.RolloutInfo) + com.google.api.cloudquotas.v1.RolloutInfoOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.aiplatform.v1beta1.EvaluationServiceProto - .internal_static_google_cloud_aiplatform_v1beta1_RagContextRecallSpec_descriptor; + return com.google.api.cloudquotas.v1.ResourcesProto + .internal_static_google_api_cloudquotas_v1_RolloutInfo_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.aiplatform.v1beta1.EvaluationServiceProto - .internal_static_google_cloud_aiplatform_v1beta1_RagContextRecallSpec_fieldAccessorTable + return com.google.api.cloudquotas.v1.ResourcesProto + .internal_static_google_api_cloudquotas_v1_RolloutInfo_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.aiplatform.v1beta1.RagContextRecallSpec.class, - com.google.cloud.aiplatform.v1beta1.RagContextRecallSpec.Builder.class); + com.google.api.cloudquotas.v1.RolloutInfo.class, + com.google.api.cloudquotas.v1.RolloutInfo.Builder.class); } - // Construct using com.google.cloud.aiplatform.v1beta1.RagContextRecallSpec.newBuilder() + // Construct using com.google.api.cloudquotas.v1.RolloutInfo.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { @@ -278,24 +277,24 @@ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { public Builder clear() { super.clear(); bitField0_ = 0; - version_ = 0; + ongoingRollout_ = false; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.aiplatform.v1beta1.EvaluationServiceProto - .internal_static_google_cloud_aiplatform_v1beta1_RagContextRecallSpec_descriptor; + return com.google.api.cloudquotas.v1.ResourcesProto + .internal_static_google_api_cloudquotas_v1_RolloutInfo_descriptor; } @java.lang.Override - public com.google.cloud.aiplatform.v1beta1.RagContextRecallSpec getDefaultInstanceForType() { - return com.google.cloud.aiplatform.v1beta1.RagContextRecallSpec.getDefaultInstance(); + public com.google.api.cloudquotas.v1.RolloutInfo getDefaultInstanceForType() { + return com.google.api.cloudquotas.v1.RolloutInfo.getDefaultInstance(); } @java.lang.Override - public com.google.cloud.aiplatform.v1beta1.RagContextRecallSpec build() { - com.google.cloud.aiplatform.v1beta1.RagContextRecallSpec result = buildPartial(); + public com.google.api.cloudquotas.v1.RolloutInfo build() { + com.google.api.cloudquotas.v1.RolloutInfo result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -303,9 +302,9 @@ public com.google.cloud.aiplatform.v1beta1.RagContextRecallSpec build() { } @java.lang.Override - public com.google.cloud.aiplatform.v1beta1.RagContextRecallSpec buildPartial() { - com.google.cloud.aiplatform.v1beta1.RagContextRecallSpec result = - new com.google.cloud.aiplatform.v1beta1.RagContextRecallSpec(this); + public com.google.api.cloudquotas.v1.RolloutInfo buildPartial() { + com.google.api.cloudquotas.v1.RolloutInfo result = + new com.google.api.cloudquotas.v1.RolloutInfo(this); if (bitField0_ != 0) { buildPartial0(result); } @@ -313,10 +312,10 @@ public com.google.cloud.aiplatform.v1beta1.RagContextRecallSpec buildPartial() { return result; } - private void buildPartial0(com.google.cloud.aiplatform.v1beta1.RagContextRecallSpec result) { + private void buildPartial0(com.google.api.cloudquotas.v1.RolloutInfo result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { - result.version_ = version_; + result.ongoingRollout_ = ongoingRollout_; } } @@ -355,19 +354,18 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.aiplatform.v1beta1.RagContextRecallSpec) { - return mergeFrom((com.google.cloud.aiplatform.v1beta1.RagContextRecallSpec) other); + if (other instanceof com.google.api.cloudquotas.v1.RolloutInfo) { + return mergeFrom((com.google.api.cloudquotas.v1.RolloutInfo) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.RagContextRecallSpec other) { - if (other == com.google.cloud.aiplatform.v1beta1.RagContextRecallSpec.getDefaultInstance()) - return this; - if (other.getVersion() != 0) { - setVersion(other.getVersion()); + public Builder mergeFrom(com.google.api.cloudquotas.v1.RolloutInfo other) { + if (other == com.google.api.cloudquotas.v1.RolloutInfo.getDefaultInstance()) return this; + if (other.getOngoingRollout() != false) { + setOngoingRollout(other.getOngoingRollout()); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); @@ -395,12 +393,12 @@ public Builder mergeFrom( case 0: done = true; break; - case 16: + case 8: { - version_ = input.readInt32(); + ongoingRollout_ = input.readBool(); bitField0_ |= 0x00000001; break; - } // case 16 + } // case 8 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -420,37 +418,37 @@ public Builder mergeFrom( private int bitField0_; - private int version_; + private boolean ongoingRollout_; /** * * *
-     * Optional. Which version to use for evaluation.
+     * Whether there is an ongoing rollout for a quota or not.
      * 
* - * int32 version = 2 [(.google.api.field_behavior) = OPTIONAL]; + * bool ongoing_rollout = 1; * - * @return The version. + * @return The ongoingRollout. */ @java.lang.Override - public int getVersion() { - return version_; + public boolean getOngoingRollout() { + return ongoingRollout_; } /** * * *
-     * Optional. Which version to use for evaluation.
+     * Whether there is an ongoing rollout for a quota or not.
      * 
* - * int32 version = 2 [(.google.api.field_behavior) = OPTIONAL]; + * bool ongoing_rollout = 1; * - * @param value The version to set. + * @param value The ongoingRollout to set. * @return This builder for chaining. */ - public Builder setVersion(int value) { + public Builder setOngoingRollout(boolean value) { - version_ = value; + ongoingRollout_ = value; bitField0_ |= 0x00000001; onChanged(); return this; @@ -459,16 +457,16 @@ public Builder setVersion(int value) { * * *
-     * Optional. Which version to use for evaluation.
+     * Whether there is an ongoing rollout for a quota or not.
      * 
* - * int32 version = 2 [(.google.api.field_behavior) = OPTIONAL]; + * bool ongoing_rollout = 1; * * @return This builder for chaining. */ - public Builder clearVersion() { + public Builder clearOngoingRollout() { bitField0_ = (bitField0_ & ~0x00000001); - version_ = 0; + ongoingRollout_ = false; onChanged(); return this; } @@ -484,24 +482,24 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.RagContextRecallSpec) + // @@protoc_insertion_point(builder_scope:google.api.cloudquotas.v1.RolloutInfo) } - // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.RagContextRecallSpec) - private static final com.google.cloud.aiplatform.v1beta1.RagContextRecallSpec DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:google.api.cloudquotas.v1.RolloutInfo) + private static final com.google.api.cloudquotas.v1.RolloutInfo DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.RagContextRecallSpec(); + DEFAULT_INSTANCE = new com.google.api.cloudquotas.v1.RolloutInfo(); } - public static com.google.cloud.aiplatform.v1beta1.RagContextRecallSpec getDefaultInstance() { + public static com.google.api.cloudquotas.v1.RolloutInfo getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public RagContextRecallSpec parsePartialFrom( + public RolloutInfo parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -520,17 +518,17 @@ public RagContextRecallSpec parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.cloud.aiplatform.v1beta1.RagContextRecallSpec getDefaultInstanceForType() { + public com.google.api.cloudquotas.v1.RolloutInfo getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } diff --git a/java-cloudquotas/proto-google-cloud-cloudquotas-v1/src/main/java/com/google/api/cloudquotas/v1/RolloutInfoOrBuilder.java b/java-cloudquotas/proto-google-cloud-cloudquotas-v1/src/main/java/com/google/api/cloudquotas/v1/RolloutInfoOrBuilder.java new file mode 100644 index 000000000000..fa1532c0b753 --- /dev/null +++ b/java-cloudquotas/proto-google-cloud-cloudquotas-v1/src/main/java/com/google/api/cloudquotas/v1/RolloutInfoOrBuilder.java @@ -0,0 +1,39 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/cloudquotas/v1/resources.proto + +// Protobuf Java Version: 3.25.2 +package com.google.api.cloudquotas.v1; + +public interface RolloutInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.cloudquotas.v1.RolloutInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Whether there is an ongoing rollout for a quota or not.
+   * 
+ * + * bool ongoing_rollout = 1; + * + * @return The ongoingRollout. + */ + boolean getOngoingRollout(); +} diff --git a/java-cloudquotas/proto-google-cloud-cloudquotas-v1/src/main/proto/google/api/cloudquotas/v1/resources.proto b/java-cloudquotas/proto-google-cloud-cloudquotas-v1/src/main/proto/google/api/cloudquotas/v1/resources.proto index 0552f09bc19a..c6e4de310e8f 100644 --- a/java-cloudquotas/proto-google-cloud-cloudquotas-v1/src/main/proto/google/api/cloudquotas/v1/resources.proto +++ b/java-cloudquotas/proto-google-cloud-cloudquotas-v1/src/main/proto/google/api/cloudquotas/v1/resources.proto @@ -302,4 +302,15 @@ message DimensionsInfo { message QuotaDetails { // The value currently in effect and being enforced. int64 value = 1; + + // Rollout information of this quota. + // This field is present only if the effective limit will change due to the + // ongoing rollout of the service config. + RolloutInfo rollout_info = 3; +} + +// [Output only] Rollout information of a quota. +message RolloutInfo { + // Whether there is an ongoing rollout for a quota or not. + bool ongoing_rollout = 1; } diff --git a/java-cloudsupport/README.md b/java-cloudsupport/README.md index ecf83dc8fef9..2876e6b2ae1b 100644 --- a/java-cloudsupport/README.md +++ b/java-cloudsupport/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -201,7 +201,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-cloudsupport.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-cloudsupport/0.22.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-cloudsupport/0.25.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-compute/README.md b/java-compute/README.md index 51fee8639c74..aa219b1f973f 100644 --- a/java-compute/README.md +++ b/java-compute/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.34.0 + 26.37.0 pom import @@ -258,7 +258,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-compute.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-compute/1.48.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-compute/1.51.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-confidentialcomputing/README.md b/java-confidentialcomputing/README.md index 1ffcb624e1ec..4e74a724ca98 100644 --- a/java-confidentialcomputing/README.md +++ b/java-confidentialcomputing/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -201,7 +201,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-confidentialcomputing.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-confidentialcomputing/0.24.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-confidentialcomputing/0.27.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-contact-center-insights/README.md b/java-contact-center-insights/README.md index 9512011bed19..a9f63b94adca 100644 --- a/java-contact-center-insights/README.md +++ b/java-contact-center-insights/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.34.0 + 26.37.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-contact-center-insights.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-contact-center-insights/2.38.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-contact-center-insights/2.41.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-container/README.md b/java-container/README.md index 47c11059df42..82fc7bd6e863 100644 --- a/java-container/README.md +++ b/java-container/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.34.0 + 26.37.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-container.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-container/2.41.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-container/2.44.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-containeranalysis/README.md b/java-containeranalysis/README.md index c306c157f986..468a9e586f8c 100644 --- a/java-containeranalysis/README.md +++ b/java-containeranalysis/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.34.0 + 26.37.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-containeranalysis.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-containeranalysis/2.39.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-containeranalysis/2.42.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-contentwarehouse/README.md b/java-contentwarehouse/README.md index 8d701a730d05..fef84b6cb3b3 100644 --- a/java-contentwarehouse/README.md +++ b/java-contentwarehouse/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -201,7 +201,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-contentwarehouse.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-contentwarehouse/0.34.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-contentwarehouse/0.37.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-data-fusion/README.md b/java-data-fusion/README.md index 622ca4d22f1c..baf7d149a6ff 100644 --- a/java-data-fusion/README.md +++ b/java-data-fusion/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.34.0 + 26.37.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-data-fusion.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-data-fusion/1.38.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-data-fusion/1.41.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-datacatalog/README.md b/java-datacatalog/README.md index f5dcb1a216c5..871349a7dcc8 100644 --- a/java-datacatalog/README.md +++ b/java-datacatalog/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.34.0 + 26.37.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-datacatalog.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-datacatalog/1.44.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-datacatalog/1.47.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-dataflow/README.md b/java-dataflow/README.md index 5417c782e3cf..47e2d40f9b6d 100644 --- a/java-dataflow/README.md +++ b/java-dataflow/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -201,7 +201,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-dataflow.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-dataflow/0.42.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-dataflow/0.45.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-dataform/README.md b/java-dataform/README.md index e33883c2624e..0ee2a00bd079 100644 --- a/java-dataform/README.md +++ b/java-dataform/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -201,7 +201,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-dataform.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-dataform/0.37.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-dataform/0.40.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-datalabeling/README.md b/java-datalabeling/README.md index dbc37ebdf59f..a329164fe10b 100644 --- a/java-datalabeling/README.md +++ b/java-datalabeling/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -201,7 +201,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-datalabeling.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-datalabeling/0.158.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-datalabeling/0.161.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-datalineage/README.md b/java-datalineage/README.md index 5c65e031857f..8fec90ff260d 100644 --- a/java-datalineage/README.md +++ b/java-datalineage/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -201,7 +201,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-datalineage.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-datalineage/0.30.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-datalineage/0.33.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-dataplex/README.md b/java-dataplex/README.md index 30279d219192..8a6e95ac0a75 100644 --- a/java-dataplex/README.md +++ b/java-dataplex/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.34.0 + 26.37.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-dataplex.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-dataplex/1.36.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-dataplex/1.39.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-dataproc-metastore/README.md b/java-dataproc-metastore/README.md index 9b1d7c52da97..241fe4cc1a78 100644 --- a/java-dataproc-metastore/README.md +++ b/java-dataproc-metastore/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.34.0 + 26.37.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-dataproc-metastore.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-dataproc-metastore/2.39.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-dataproc-metastore/2.42.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-dataproc/README.md b/java-dataproc/README.md index d3d0de44b4a6..ac9bd8fa7bcf 100644 --- a/java-dataproc/README.md +++ b/java-dataproc/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.34.0 + 26.37.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-dataproc.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-dataproc/4.35.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-dataproc/4.38.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-datastream/README.md b/java-datastream/README.md index e8307db046ae..c5365bfe8a38 100644 --- a/java-datastream/README.md +++ b/java-datastream/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.34.0 + 26.37.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-datastream.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-datastream/1.37.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-datastream/1.40.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-debugger-client/README.md b/java-debugger-client/README.md index 33767f53120a..daa40f3dfca2 100644 --- a/java-debugger-client/README.md +++ b/java-debugger-client/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.34.0 + 26.37.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-debugger-client.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-debugger-client/1.38.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-debugger-client/1.41.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-deploy/README.md b/java-deploy/README.md index 6b011e559606..077748fc0274 100644 --- a/java-deploy/README.md +++ b/java-deploy/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.34.0 + 26.37.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-deploy.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-deploy/1.36.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-deploy/1.39.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-dialogflow-cx/README.md b/java-dialogflow-cx/README.md index d9bb79e9ad57..e1efa04c33fa 100644 --- a/java-dialogflow-cx/README.md +++ b/java-dialogflow-cx/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -201,7 +201,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-dialogflow-cx.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-dialogflow-cx/0.49.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-dialogflow-cx/0.52.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-dialogflow/README.md b/java-dialogflow/README.md index f72e19f36d70..e04fd63a026f 100644 --- a/java-dialogflow/README.md +++ b/java-dialogflow/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.34.0 + 26.37.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-dialogflow.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-dialogflow/4.44.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-dialogflow/4.47.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-discoveryengine/README.md b/java-discoveryengine/README.md index a73b35485fc8..03dd1c7c1425 100644 --- a/java-discoveryengine/README.md +++ b/java-discoveryengine/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -201,7 +201,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-discoveryengine.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-discoveryengine/0.34.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-discoveryengine/0.37.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-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/DocumentServiceClient.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/DocumentServiceClient.java index 7b7d4df58bc9..b7c03d3fca8e 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/DocumentServiceClient.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/DocumentServiceClient.java @@ -200,6 +200,25 @@ * * * + * + *

GetProcessedDocument + *

Gets the parsed layout information for a [Document][google.cloud.discoveryengine.v1alpha.Document]. + * + *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getProcessedDocument(GetProcessedDocumentRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getProcessedDocument(DocumentName name) + *

  • getProcessedDocument(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getProcessedDocumentCallable() + *

+ * + * * * *

See the individual methods for example code. @@ -1075,6 +1094,7 @@ public final UnaryCallable deleteDocumentCallable( * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]") * .toString()) * .setErrorConfig(ImportErrorConfig.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) * .setAutoGenerateIds(true) * .setIdField("idField1629396127") * .build(); @@ -1114,6 +1134,7 @@ public final UnaryCallable deleteDocumentCallable( * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]") * .toString()) * .setErrorConfig(ImportErrorConfig.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) * .setAutoGenerateIds(true) * .setIdField("idField1629396127") * .build(); @@ -1154,6 +1175,7 @@ public final UnaryCallable deleteDocumentCallable( * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]") * .toString()) * .setErrorConfig(ImportErrorConfig.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) * .setAutoGenerateIds(true) * .setIdField("idField1629396127") * .build(); @@ -1315,6 +1337,148 @@ public final UnaryCallable purgeDocumentsCalla return stub.purgeDocumentsCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the parsed layout information for a + * [Document][google.cloud.discoveryengine.v1alpha.Document]. + * + *

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 (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) {
+   *   DocumentName name =
+   *       DocumentName.ofProjectLocationDataStoreBranchDocumentName(
+   *           "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]", "[DOCUMENT]");
+   *   ProcessedDocument response = documentServiceClient.getProcessedDocument(name);
+   * }
+   * }
+ * + * @param name Required. Full resource name of + * [Document][google.cloud.discoveryengine.v1alpha.Document], such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. + *

If the caller does not have permission to access the + * [Document][google.cloud.discoveryengine.v1alpha.Document], regardless of whether or not it + * exists, a `PERMISSION_DENIED` error is returned. + *

If the requested [Document][google.cloud.discoveryengine.v1alpha.Document] does not + * exist, a `NOT_FOUND` error is returned. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ProcessedDocument getProcessedDocument(DocumentName name) { + GetProcessedDocumentRequest request = + GetProcessedDocumentRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getProcessedDocument(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the parsed layout information for a + * [Document][google.cloud.discoveryengine.v1alpha.Document]. + * + *

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 (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) {
+   *   String name =
+   *       DocumentName.ofProjectLocationDataStoreBranchDocumentName(
+   *               "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]", "[DOCUMENT]")
+   *           .toString();
+   *   ProcessedDocument response = documentServiceClient.getProcessedDocument(name);
+   * }
+   * }
+ * + * @param name Required. Full resource name of + * [Document][google.cloud.discoveryengine.v1alpha.Document], such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. + *

If the caller does not have permission to access the + * [Document][google.cloud.discoveryengine.v1alpha.Document], regardless of whether or not it + * exists, a `PERMISSION_DENIED` error is returned. + *

If the requested [Document][google.cloud.discoveryengine.v1alpha.Document] does not + * exist, a `NOT_FOUND` error is returned. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ProcessedDocument getProcessedDocument(String name) { + GetProcessedDocumentRequest request = + GetProcessedDocumentRequest.newBuilder().setName(name).build(); + return getProcessedDocument(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the parsed layout information for a + * [Document][google.cloud.discoveryengine.v1alpha.Document]. + * + *

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 (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) {
+   *   GetProcessedDocumentRequest request =
+   *       GetProcessedDocumentRequest.newBuilder()
+   *           .setName(
+   *               DocumentName.ofProjectLocationDataStoreBranchDocumentName(
+   *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]", "[DOCUMENT]")
+   *                   .toString())
+   *           .build();
+   *   ProcessedDocument response = documentServiceClient.getProcessedDocument(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ProcessedDocument getProcessedDocument(GetProcessedDocumentRequest request) { + return getProcessedDocumentCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the parsed layout information for a + * [Document][google.cloud.discoveryengine.v1alpha.Document]. + * + *

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 (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) {
+   *   GetProcessedDocumentRequest request =
+   *       GetProcessedDocumentRequest.newBuilder()
+   *           .setName(
+   *               DocumentName.ofProjectLocationDataStoreBranchDocumentName(
+   *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]", "[DOCUMENT]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       documentServiceClient.getProcessedDocumentCallable().futureCall(request);
+   *   // Do something.
+   *   ProcessedDocument response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + getProcessedDocumentCallable() { + return stub.getProcessedDocumentCallable(); + } + @Override public final void close() { stub.close(); diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/DocumentServiceSettings.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/DocumentServiceSettings.java index 16838a609e70..2eb344f2bd21 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/DocumentServiceSettings.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/DocumentServiceSettings.java @@ -130,6 +130,12 @@ public UnaryCallSettings purgeDocumentsSetting return ((DocumentServiceStubSettings) getStubSettings()).purgeDocumentsOperationSettings(); } + /** Returns the object with the settings used for calls to getProcessedDocument. */ + public UnaryCallSettings + getProcessedDocumentSettings() { + return ((DocumentServiceStubSettings) getStubSettings()).getProcessedDocumentSettings(); + } + public static final DocumentServiceSettings create(DocumentServiceStubSettings stub) throws IOException { return new DocumentServiceSettings.Builder(stub.toBuilder()).build(); @@ -293,6 +299,12 @@ public UnaryCallSettings.Builder purgeDocument return getStubSettingsBuilder().purgeDocumentsOperationSettings(); } + /** Returns the builder for the settings used for calls to getProcessedDocument. */ + public UnaryCallSettings.Builder + getProcessedDocumentSettings() { + return getStubSettingsBuilder().getProcessedDocumentSettings(); + } + @Override public DocumentServiceSettings build() throws IOException { return new DocumentServiceSettings(this); diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/RankServiceClient.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/RankServiceClient.java new file mode 100644 index 000000000000..a4f5d8550c2c --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/RankServiceClient.java @@ -0,0 +1,280 @@ +/* + * Copyright 2024 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.discoveryengine.v1alpha; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.discoveryengine.v1alpha.stub.RankServiceStub; +import com.google.cloud.discoveryengine.v1alpha.stub.RankServiceStubSettings; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Service for ranking text records. + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

{@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 (RankServiceClient rankServiceClient = RankServiceClient.create()) {
+ *   RankRequest request =
+ *       RankRequest.newBuilder()
+ *           .setRankingConfig(
+ *               RankingConfigName.of("[PROJECT]", "[LOCATION]", "[RANKING_CONFIG]").toString())
+ *           .setModel("model104069929")
+ *           .setTopN(110545924)
+ *           .setQuery("query107944136")
+ *           .addAllRecords(new ArrayList())
+ *           .setIgnoreRecordDetailsInResponse(true)
+ *           .build();
+ *   RankResponse response = rankServiceClient.rank(request);
+ * }
+ * }
+ * + *

Note: close() needs to be called on the RankServiceClient object to clean up resources such as + * threads. In the example above, try-with-resources is used, which automatically calls close(). + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Methods
MethodDescriptionMethod Variants

Rank

Ranks a list of text records based on the given input query.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • rank(RankRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • rankCallable() + *

+ *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of RankServiceSettings to + * create(). For example: + * + *

To customize credentials: + * + *

{@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
+ * RankServiceSettings rankServiceSettings =
+ *     RankServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * RankServiceClient rankServiceClient = RankServiceClient.create(rankServiceSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@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
+ * RankServiceSettings rankServiceSettings =
+ *     RankServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * RankServiceClient rankServiceClient = RankServiceClient.create(rankServiceSettings);
+ * }
+ * + *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *

{@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
+ * RankServiceSettings rankServiceSettings = RankServiceSettings.newHttpJsonBuilder().build();
+ * RankServiceClient rankServiceClient = RankServiceClient.create(rankServiceSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class RankServiceClient implements BackgroundResource { + private final RankServiceSettings settings; + private final RankServiceStub stub; + + /** Constructs an instance of RankServiceClient with default settings. */ + public static final RankServiceClient create() throws IOException { + return create(RankServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of RankServiceClient, using the given settings. The channels are created + * based on the settings passed in, or defaults for any settings that are not set. + */ + public static final RankServiceClient create(RankServiceSettings settings) throws IOException { + return new RankServiceClient(settings); + } + + /** + * Constructs an instance of RankServiceClient, using the given stub for making calls. This is for + * advanced usage - prefer using create(RankServiceSettings). + */ + public static final RankServiceClient create(RankServiceStub stub) { + return new RankServiceClient(stub); + } + + /** + * Constructs an instance of RankServiceClient, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected RankServiceClient(RankServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((RankServiceStubSettings) settings.getStubSettings()).createStub(); + } + + protected RankServiceClient(RankServiceStub stub) { + this.settings = null; + this.stub = stub; + } + + public final RankServiceSettings getSettings() { + return settings; + } + + public RankServiceStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Ranks a list of text records based on the given input query. + * + *

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 (RankServiceClient rankServiceClient = RankServiceClient.create()) {
+   *   RankRequest request =
+   *       RankRequest.newBuilder()
+   *           .setRankingConfig(
+   *               RankingConfigName.of("[PROJECT]", "[LOCATION]", "[RANKING_CONFIG]").toString())
+   *           .setModel("model104069929")
+   *           .setTopN(110545924)
+   *           .setQuery("query107944136")
+   *           .addAllRecords(new ArrayList())
+   *           .setIgnoreRecordDetailsInResponse(true)
+   *           .build();
+   *   RankResponse response = rankServiceClient.rank(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final RankResponse rank(RankRequest request) { + return rankCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Ranks a list of text records based on the given input query. + * + *

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 (RankServiceClient rankServiceClient = RankServiceClient.create()) {
+   *   RankRequest request =
+   *       RankRequest.newBuilder()
+   *           .setRankingConfig(
+   *               RankingConfigName.of("[PROJECT]", "[LOCATION]", "[RANKING_CONFIG]").toString())
+   *           .setModel("model104069929")
+   *           .setTopN(110545924)
+   *           .setQuery("query107944136")
+   *           .addAllRecords(new ArrayList())
+   *           .setIgnoreRecordDetailsInResponse(true)
+   *           .build();
+   *   ApiFuture future = rankServiceClient.rankCallable().futureCall(request);
+   *   // Do something.
+   *   RankResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable rankCallable() { + return stub.rankCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/RankServiceSettings.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/RankServiceSettings.java new file mode 100644 index 000000000000..312ff3d67f40 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/RankServiceSettings.java @@ -0,0 +1,202 @@ +/* + * Copyright 2024 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.discoveryengine.v1alpha; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.discoveryengine.v1alpha.stub.RankServiceStubSettings; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link RankServiceClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (discoveryengine.googleapis.com) and default port (443) are + * used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of rank to 30 seconds: + * + *

{@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
+ * RankServiceSettings.Builder rankServiceSettingsBuilder = RankServiceSettings.newBuilder();
+ * rankServiceSettingsBuilder
+ *     .rankSettings()
+ *     .setRetrySettings(
+ *         rankServiceSettingsBuilder
+ *             .rankSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * RankServiceSettings rankServiceSettings = rankServiceSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class RankServiceSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to rank. */ + public UnaryCallSettings rankSettings() { + return ((RankServiceStubSettings) getStubSettings()).rankSettings(); + } + + public static final RankServiceSettings create(RankServiceStubSettings stub) throws IOException { + return new RankServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return RankServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return RankServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return RankServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return RankServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return RankServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return RankServiceStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return RankServiceStubSettings.defaultTransportChannelProvider(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return RankServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected RankServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for RankServiceSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(RankServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(RankServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(RankServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(RankServiceStubSettings.newBuilder()); + } + + private static Builder createHttpJsonDefault() { + return new Builder(RankServiceStubSettings.newHttpJsonBuilder()); + } + + public RankServiceStubSettings.Builder getStubSettingsBuilder() { + return ((RankServiceStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to rank. */ + public UnaryCallSettings.Builder rankSettings() { + return getStubSettingsBuilder().rankSettings(); + } + + @Override + public RankServiceSettings build() throws IOException { + return new RankServiceSettings(this); + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/ServingConfigServiceClient.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/ServingConfigServiceClient.java index 6c73f12d51be..34080eb15780 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/ServingConfigServiceClient.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/ServingConfigServiceClient.java @@ -36,7 +36,8 @@ // AUTO-GENERATED DOCUMENTATION AND CLASS. /** - * Service Description: Service for operations related to [ServingConfig][]. + * Service Description: Service for operations related to + * [ServingConfig][google.cloud.discoveryengine.v1alpha.ServingConfig]. * *

This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. Sample code to get started: diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/gapic_metadata.json b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/gapic_metadata.json index 19a22ebc2133..626297948478 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/gapic_metadata.json +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/gapic_metadata.json @@ -124,6 +124,9 @@ "GetDocument": { "methods": ["getDocument", "getDocument", "getDocument", "getDocumentCallable"] }, + "GetProcessedDocument": { + "methods": ["getProcessedDocument", "getProcessedDocument", "getProcessedDocument", "getProcessedDocumentCallable"] + }, "ImportDocuments": { "methods": ["importDocumentsAsync", "importDocumentsOperationCallable", "importDocumentsCallable"] }, @@ -185,6 +188,18 @@ } } }, + "RankService": { + "clients": { + "grpc": { + "libraryClient": "RankServiceClient", + "rpcs": { + "Rank": { + "methods": ["rank", "rankCallable"] + } + } + } + } + }, "RecommendationService": { "clients": { "grpc": { diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/package-info.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/package-info.java index 3e71f8b14740..575c38faf3ef 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/package-info.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/package-info.java @@ -195,6 +195,33 @@ * } * } * + *

======================= RankServiceClient ======================= + * + *

Service Description: Service for ranking text records. + * + *

Sample for RankServiceClient: + * + *

{@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 (RankServiceClient rankServiceClient = RankServiceClient.create()) {
+ *   RankRequest request =
+ *       RankRequest.newBuilder()
+ *           .setRankingConfig(
+ *               RankingConfigName.of("[PROJECT]", "[LOCATION]", "[RANKING_CONFIG]").toString())
+ *           .setModel("model104069929")
+ *           .setTopN(110545924)
+ *           .setQuery("query107944136")
+ *           .addAllRecords(new ArrayList())
+ *           .setIgnoreRecordDetailsInResponse(true)
+ *           .build();
+ *   RankResponse response = rankServiceClient.rank(request);
+ * }
+ * }
+ * *

======================= RecommendationServiceClient ======================= * *

Service Description: Service for making recommendations. @@ -328,7 +355,8 @@ * *

======================= ServingConfigServiceClient ======================= * - *

Service Description: Service for operations related to [ServingConfig][]. + *

Service Description: Service for operations related to + * [ServingConfig][google.cloud.discoveryengine.v1alpha.ServingConfig]. * *

Sample for ServingConfigServiceClient: * diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/DocumentServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/DocumentServiceStub.java index 0fbaf7ca29a2..ad5946b54471 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/DocumentServiceStub.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/DocumentServiceStub.java @@ -26,11 +26,13 @@ import com.google.cloud.discoveryengine.v1alpha.DeleteDocumentRequest; import com.google.cloud.discoveryengine.v1alpha.Document; import com.google.cloud.discoveryengine.v1alpha.GetDocumentRequest; +import com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest; import com.google.cloud.discoveryengine.v1alpha.ImportDocumentsMetadata; import com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest; import com.google.cloud.discoveryengine.v1alpha.ImportDocumentsResponse; import com.google.cloud.discoveryengine.v1alpha.ListDocumentsRequest; import com.google.cloud.discoveryengine.v1alpha.ListDocumentsResponse; +import com.google.cloud.discoveryengine.v1alpha.ProcessedDocument; import com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsMetadata; import com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest; import com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsResponse; @@ -101,6 +103,11 @@ public UnaryCallable purgeDocumentsCallable() throw new UnsupportedOperationException("Not implemented: purgeDocumentsCallable()"); } + public UnaryCallable + getProcessedDocumentCallable() { + throw new UnsupportedOperationException("Not implemented: getProcessedDocumentCallable()"); + } + @Override public abstract void close(); } diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/DocumentServiceStubSettings.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/DocumentServiceStubSettings.java index b4e3c8e52b45..126f59132eb7 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/DocumentServiceStubSettings.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/DocumentServiceStubSettings.java @@ -51,11 +51,13 @@ import com.google.cloud.discoveryengine.v1alpha.DeleteDocumentRequest; import com.google.cloud.discoveryengine.v1alpha.Document; import com.google.cloud.discoveryengine.v1alpha.GetDocumentRequest; +import com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest; import com.google.cloud.discoveryengine.v1alpha.ImportDocumentsMetadata; import com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest; import com.google.cloud.discoveryengine.v1alpha.ImportDocumentsResponse; import com.google.cloud.discoveryengine.v1alpha.ListDocumentsRequest; import com.google.cloud.discoveryengine.v1alpha.ListDocumentsResponse; +import com.google.cloud.discoveryengine.v1alpha.ProcessedDocument; import com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsMetadata; import com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest; import com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsResponse; @@ -131,6 +133,8 @@ public class DocumentServiceStubSettings extends StubSettings purgeDocumentsOperationSettings; + private final UnaryCallSettings + getProcessedDocumentSettings; private static final PagedListDescriptor LIST_DOCUMENTS_PAGE_STR_DESC = @@ -235,6 +239,12 @@ public UnaryCallSettings purgeDocumentsSetting return purgeDocumentsOperationSettings; } + /** Returns the object with the settings used for calls to getProcessedDocument. */ + public UnaryCallSettings + getProcessedDocumentSettings() { + return getProcessedDocumentSettings; + } + public DocumentServiceStub createStub() throws IOException { if (getTransportChannelProvider() .getTransportName() @@ -363,6 +373,7 @@ protected DocumentServiceStubSettings(Builder settingsBuilder) throws IOExceptio importDocumentsOperationSettings = settingsBuilder.importDocumentsOperationSettings().build(); purgeDocumentsSettings = settingsBuilder.purgeDocumentsSettings().build(); purgeDocumentsOperationSettings = settingsBuilder.purgeDocumentsOperationSettings().build(); + getProcessedDocumentSettings = settingsBuilder.getProcessedDocumentSettings().build(); } /** Builder for DocumentServiceStubSettings. */ @@ -385,6 +396,8 @@ public static class Builder extends StubSettings.Builder purgeDocumentsOperationSettings; + private final UnaryCallSettings.Builder + getProcessedDocumentSettings; private static final ImmutableMap> RETRYABLE_CODE_DEFINITIONS; @@ -446,6 +459,7 @@ protected Builder(ClientContext clientContext) { importDocumentsOperationSettings = OperationCallSettings.newBuilder(); purgeDocumentsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); purgeDocumentsOperationSettings = OperationCallSettings.newBuilder(); + getProcessedDocumentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( @@ -455,7 +469,8 @@ protected Builder(ClientContext clientContext) { updateDocumentSettings, deleteDocumentSettings, importDocumentsSettings, - purgeDocumentsSettings); + purgeDocumentsSettings, + getProcessedDocumentSettings); initDefaults(this); } @@ -471,6 +486,7 @@ protected Builder(DocumentServiceStubSettings settings) { importDocumentsOperationSettings = settings.importDocumentsOperationSettings.toBuilder(); purgeDocumentsSettings = settings.purgeDocumentsSettings.toBuilder(); purgeDocumentsOperationSettings = settings.purgeDocumentsOperationSettings.toBuilder(); + getProcessedDocumentSettings = settings.getProcessedDocumentSettings.toBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( @@ -480,7 +496,8 @@ protected Builder(DocumentServiceStubSettings settings) { updateDocumentSettings, deleteDocumentSettings, importDocumentsSettings, - purgeDocumentsSettings); + purgeDocumentsSettings, + getProcessedDocumentSettings); } private static Builder createDefault() { @@ -543,6 +560,11 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + builder + .getProcessedDocumentSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + builder .importDocumentsOperationSettings() .setInitialCallSettings( @@ -660,6 +682,12 @@ public UnaryCallSettings.Builder purgeDocument return purgeDocumentsOperationSettings; } + /** Returns the builder for the settings used for calls to getProcessedDocument. */ + public UnaryCallSettings.Builder + getProcessedDocumentSettings() { + return getProcessedDocumentSettings; + } + /** Returns the endpoint set by the user or the the service's default endpoint. */ @Override public String getEndpoint() { diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/GrpcDocumentServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/GrpcDocumentServiceStub.java index 0850e31a1992..58e1902b1ee1 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/GrpcDocumentServiceStub.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/GrpcDocumentServiceStub.java @@ -31,11 +31,13 @@ import com.google.cloud.discoveryengine.v1alpha.DeleteDocumentRequest; import com.google.cloud.discoveryengine.v1alpha.Document; import com.google.cloud.discoveryengine.v1alpha.GetDocumentRequest; +import com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest; import com.google.cloud.discoveryengine.v1alpha.ImportDocumentsMetadata; import com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest; import com.google.cloud.discoveryengine.v1alpha.ImportDocumentsResponse; import com.google.cloud.discoveryengine.v1alpha.ListDocumentsRequest; import com.google.cloud.discoveryengine.v1alpha.ListDocumentsResponse; +import com.google.cloud.discoveryengine.v1alpha.ProcessedDocument; import com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsMetadata; import com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest; import com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsResponse; @@ -133,6 +135,17 @@ public class GrpcDocumentServiceStub extends DocumentServiceStub { .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); + private static final MethodDescriptor + getProcessedDocumentMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.discoveryengine.v1alpha.DocumentService/GetProcessedDocument") + .setRequestMarshaller( + ProtoUtils.marshaller(GetProcessedDocumentRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ProcessedDocument.getDefaultInstance())) + .build(); + private final UnaryCallable getDocumentCallable; private final UnaryCallable listDocumentsCallable; private final UnaryCallable @@ -148,6 +161,8 @@ public class GrpcDocumentServiceStub extends DocumentServiceStub { private final OperationCallable< PurgeDocumentsRequest, PurgeDocumentsResponse, PurgeDocumentsMetadata> purgeDocumentsOperationCallable; + private final UnaryCallable + getProcessedDocumentCallable; private final BackgroundResource backgroundResources; private final GrpcOperationsStub operationsStub; @@ -263,6 +278,17 @@ protected GrpcDocumentServiceStub( return builder.build(); }) .build(); + GrpcCallSettings + getProcessedDocumentTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getProcessedDocumentMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); this.getDocumentCallable = callableFactory.createUnaryCallable( @@ -300,6 +326,11 @@ protected GrpcDocumentServiceStub( settings.purgeDocumentsOperationSettings(), clientContext, operationsStub); + this.getProcessedDocumentCallable = + callableFactory.createUnaryCallable( + getProcessedDocumentTransportSettings, + settings.getProcessedDocumentSettings(), + clientContext); this.backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); @@ -362,6 +393,12 @@ public UnaryCallable purgeDocumentsCallable() return purgeDocumentsOperationCallable; } + @Override + public UnaryCallable + getProcessedDocumentCallable() { + return getProcessedDocumentCallable; + } + @Override public final void close() { try { diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/GrpcRankServiceCallableFactory.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/GrpcRankServiceCallableFactory.java new file mode 100644 index 000000000000..cd1fc08a3e91 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/GrpcRankServiceCallableFactory.java @@ -0,0 +1,115 @@ +/* + * Copyright 2024 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.discoveryengine.v1alpha.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the RankService service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcRankServiceCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/GrpcRankServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/GrpcRankServiceStub.java new file mode 100644 index 000000000000..8296935a8bce --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/GrpcRankServiceStub.java @@ -0,0 +1,160 @@ +/* + * Copyright 2024 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.discoveryengine.v1alpha.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.discoveryengine.v1alpha.RankRequest; +import com.google.cloud.discoveryengine.v1alpha.RankResponse; +import com.google.longrunning.stub.GrpcOperationsStub; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the RankService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcRankServiceStub extends RankServiceStub { + private static final MethodDescriptor rankMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.discoveryengine.v1alpha.RankService/Rank") + .setRequestMarshaller(ProtoUtils.marshaller(RankRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(RankResponse.getDefaultInstance())) + .build(); + + private final UnaryCallable rankCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcRankServiceStub create(RankServiceStubSettings settings) + throws IOException { + return new GrpcRankServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcRankServiceStub create(ClientContext clientContext) throws IOException { + return new GrpcRankServiceStub(RankServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcRankServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcRankServiceStub( + RankServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcRankServiceStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcRankServiceStub(RankServiceStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcRankServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcRankServiceStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcRankServiceStub( + RankServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings rankTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(rankMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("ranking_config", String.valueOf(request.getRankingConfig())); + return builder.build(); + }) + .build(); + + this.rankCallable = + callableFactory.createUnaryCallable( + rankTransportSettings, settings.rankSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable rankCallable() { + return rankCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonCompletionServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonCompletionServiceStub.java index ee88cf21240c..5e20b77cea2f 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonCompletionServiceStub.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonCompletionServiceStub.java @@ -324,6 +324,11 @@ protected HttpJsonCompletionServiceStub( .setGet( "/v1alpha/{name=projects/*/locations/*/dataStores/*/operations/*}") .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/evaluations/*/operations/*}") + .build()) .addAdditionalBindings( HttpRule.newBuilder() .setGet("/v1alpha/{name=projects/*/locations/*/operations/*}") diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonDataStoreServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonDataStoreServiceStub.java index 19ca794e682f..9f2a47b63623 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonDataStoreServiceStub.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonDataStoreServiceStub.java @@ -496,6 +496,11 @@ protected HttpJsonDataStoreServiceStub( .setGet( "/v1alpha/{name=projects/*/locations/*/dataStores/*/operations/*}") .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/evaluations/*/operations/*}") + .build()) .addAdditionalBindings( HttpRule.newBuilder() .setGet("/v1alpha/{name=projects/*/locations/*/operations/*}") diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonDocumentServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonDocumentServiceStub.java index 07046cc59ba3..770c6095fb93 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonDocumentServiceStub.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonDocumentServiceStub.java @@ -39,11 +39,13 @@ import com.google.cloud.discoveryengine.v1alpha.DeleteDocumentRequest; import com.google.cloud.discoveryengine.v1alpha.Document; import com.google.cloud.discoveryengine.v1alpha.GetDocumentRequest; +import com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest; import com.google.cloud.discoveryengine.v1alpha.ImportDocumentsMetadata; import com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest; import com.google.cloud.discoveryengine.v1alpha.ImportDocumentsResponse; import com.google.cloud.discoveryengine.v1alpha.ListDocumentsRequest; import com.google.cloud.discoveryengine.v1alpha.ListDocumentsResponse; +import com.google.cloud.discoveryengine.v1alpha.ProcessedDocument; import com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsMetadata; import com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest; import com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsResponse; @@ -360,6 +362,51 @@ public class HttpJsonDocumentServiceStub extends DocumentServiceStub { HttpJsonOperationSnapshot.create(response)) .build(); + private static final ApiMethodDescriptor + getProcessedDocumentMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.discoveryengine.v1alpha.DocumentService/GetProcessedDocument") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{name=projects/*/locations/*/dataStores/*/branches/*/documents/*}:getProcessedDocument", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setAdditionalPaths( + "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*}:getProcessedDocument") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, + "processedDocumentFormat", + request.getProcessedDocumentFormatValue()); + serializer.putQueryParam( + fields, + "processedDocumentType", + request.getProcessedDocumentTypeValue()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ProcessedDocument.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + private final UnaryCallable getDocumentCallable; private final UnaryCallable listDocumentsCallable; private final UnaryCallable @@ -375,6 +422,8 @@ public class HttpJsonDocumentServiceStub extends DocumentServiceStub { private final OperationCallable< PurgeDocumentsRequest, PurgeDocumentsResponse, PurgeDocumentsMetadata> purgeDocumentsOperationCallable; + private final UnaryCallable + getProcessedDocumentCallable; private final BackgroundResource backgroundResources; private final HttpJsonOperationsStub httpJsonOperationsStub; @@ -484,6 +533,11 @@ protected HttpJsonDocumentServiceStub( .setGet( "/v1alpha/{name=projects/*/locations/*/dataStores/*/operations/*}") .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/evaluations/*/operations/*}") + .build()) .addAdditionalBindings( HttpRule.newBuilder() .setGet("/v1alpha/{name=projects/*/locations/*/operations/*}") @@ -642,6 +696,18 @@ protected HttpJsonDocumentServiceStub( return builder.build(); }) .build(); + HttpJsonCallSettings + getProcessedDocumentTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getProcessedDocumentMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); this.getDocumentCallable = callableFactory.createUnaryCallable( @@ -679,6 +745,11 @@ protected HttpJsonDocumentServiceStub( settings.purgeDocumentsOperationSettings(), clientContext, httpJsonOperationsStub); + this.getProcessedDocumentCallable = + callableFactory.createUnaryCallable( + getProcessedDocumentTransportSettings, + settings.getProcessedDocumentSettings(), + clientContext); this.backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); @@ -694,6 +765,7 @@ public static List getMethodDescriptors() { methodDescriptors.add(deleteDocumentMethodDescriptor); methodDescriptors.add(importDocumentsMethodDescriptor); methodDescriptors.add(purgeDocumentsMethodDescriptor); + methodDescriptors.add(getProcessedDocumentMethodDescriptor); return methodDescriptors; } @@ -754,6 +826,12 @@ public UnaryCallable purgeDocumentsCallable() return purgeDocumentsOperationCallable; } + @Override + public UnaryCallable + getProcessedDocumentCallable() { + return getProcessedDocumentCallable; + } + @Override public final void close() { try { diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonEngineServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonEngineServiceStub.java index f8a721c9a4ab..5c28a8a30e93 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonEngineServiceStub.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonEngineServiceStub.java @@ -505,6 +505,11 @@ protected HttpJsonEngineServiceStub( .setGet( "/v1alpha/{name=projects/*/locations/*/dataStores/*/operations/*}") .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/evaluations/*/operations/*}") + .build()) .addAdditionalBindings( HttpRule.newBuilder() .setGet("/v1alpha/{name=projects/*/locations/*/operations/*}") diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonEstimateBillingServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonEstimateBillingServiceStub.java index cba0f24f0fc8..90981387afa6 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonEstimateBillingServiceStub.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonEstimateBillingServiceStub.java @@ -218,6 +218,11 @@ protected HttpJsonEstimateBillingServiceStub( .setGet( "/v1alpha/{name=projects/*/locations/*/dataStores/*/operations/*}") .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/evaluations/*/operations/*}") + .build()) .addAdditionalBindings( HttpRule.newBuilder() .setGet("/v1alpha/{name=projects/*/locations/*/operations/*}") diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonRankServiceCallableFactory.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonRankServiceCallableFactory.java new file mode 100644 index 000000000000..5548b0a51733 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonRankServiceCallableFactory.java @@ -0,0 +1,103 @@ +/* + * Copyright 2024 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.discoveryengine.v1alpha.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the RankService service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonRankServiceCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonRankServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonRankServiceStub.java new file mode 100644 index 000000000000..e2902a8167e0 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonRankServiceStub.java @@ -0,0 +1,200 @@ +/* + * Copyright 2024 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.discoveryengine.v1alpha.stub; + +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.discoveryengine.v1alpha.RankRequest; +import com.google.cloud.discoveryengine.v1alpha.RankResponse; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the RankService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonRankServiceStub extends RankServiceStub { + private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); + + private static final ApiMethodDescriptor rankMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.discoveryengine.v1alpha.RankService/Rank") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{rankingConfig=projects/*/locations/*/rankingConfigs/*}:rank", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "rankingConfig", request.getRankingConfig()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearRankingConfig().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(RankResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable rankCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonRankServiceStub create(RankServiceStubSettings settings) + throws IOException { + return new HttpJsonRankServiceStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonRankServiceStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonRankServiceStub( + RankServiceStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonRankServiceStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonRankServiceStub( + RankServiceStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonRankServiceStub, using the given settings. This is protected + * so that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected HttpJsonRankServiceStub(RankServiceStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new HttpJsonRankServiceCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonRankServiceStub, using the given settings. This is protected + * so that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected HttpJsonRankServiceStub( + RankServiceStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + + HttpJsonCallSettings rankTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(rankMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("ranking_config", String.valueOf(request.getRankingConfig())); + return builder.build(); + }) + .build(); + + this.rankCallable = + callableFactory.createUnaryCallable( + rankTransportSettings, settings.rankSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(rankMethodDescriptor); + return methodDescriptors; + } + + @Override + public UnaryCallable rankCallable() { + return rankCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonSchemaServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonSchemaServiceStub.java index 92b2a1cc0675..35c7437e10a1 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonSchemaServiceStub.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonSchemaServiceStub.java @@ -397,6 +397,11 @@ protected HttpJsonSchemaServiceStub( .setGet( "/v1alpha/{name=projects/*/locations/*/dataStores/*/operations/*}") .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/evaluations/*/operations/*}") + .build()) .addAdditionalBindings( HttpRule.newBuilder() .setGet("/v1alpha/{name=projects/*/locations/*/operations/*}") diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonSearchTuningServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonSearchTuningServiceStub.java index 8b8f37056141..829c18c7a489 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonSearchTuningServiceStub.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonSearchTuningServiceStub.java @@ -218,6 +218,11 @@ protected HttpJsonSearchTuningServiceStub( .setGet( "/v1alpha/{name=projects/*/locations/*/dataStores/*/operations/*}") .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/evaluations/*/operations/*}") + .build()) .addAdditionalBindings( HttpRule.newBuilder() .setGet("/v1alpha/{name=projects/*/locations/*/operations/*}") diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonSiteSearchEngineServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonSiteSearchEngineServiceStub.java index 888e0a9d1e4b..eb907a76683f 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonSiteSearchEngineServiceStub.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonSiteSearchEngineServiceStub.java @@ -777,6 +777,11 @@ protected HttpJsonSiteSearchEngineServiceStub( .setGet( "/v1alpha/{name=projects/*/locations/*/dataStores/*/operations/*}") .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/evaluations/*/operations/*}") + .build()) .addAdditionalBindings( HttpRule.newBuilder() .setGet("/v1alpha/{name=projects/*/locations/*/operations/*}") diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonUserEventServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonUserEventServiceStub.java index 803225b6280e..e8713deafc98 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonUserEventServiceStub.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonUserEventServiceStub.java @@ -360,6 +360,11 @@ protected HttpJsonUserEventServiceStub( .setGet( "/v1alpha/{name=projects/*/locations/*/dataStores/*/operations/*}") .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/evaluations/*/operations/*}") + .build()) .addAdditionalBindings( HttpRule.newBuilder() .setGet("/v1alpha/{name=projects/*/locations/*/operations/*}") diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/RankServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/RankServiceStub.java new file mode 100644 index 000000000000..f049ca261503 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/RankServiceStub.java @@ -0,0 +1,42 @@ +/* + * Copyright 2024 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.discoveryengine.v1alpha.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.discoveryengine.v1alpha.RankRequest; +import com.google.cloud.discoveryengine.v1alpha.RankResponse; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the RankService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public abstract class RankServiceStub implements BackgroundResource { + + public UnaryCallable rankCallable() { + throw new UnsupportedOperationException("Not implemented: rankCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/RankServiceStubSettings.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/RankServiceStubSettings.java new file mode 100644 index 000000000000..61177b573245 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/RankServiceStubSettings.java @@ -0,0 +1,333 @@ +/* + * Copyright 2024 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.discoveryengine.v1alpha.stub; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.discoveryengine.v1alpha.RankRequest; +import com.google.cloud.discoveryengine.v1alpha.RankResponse; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link RankServiceStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (discoveryengine.googleapis.com) and default port (443) are + * used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of rank to 30 seconds: + * + *

{@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
+ * RankServiceStubSettings.Builder rankServiceSettingsBuilder =
+ *     RankServiceStubSettings.newBuilder();
+ * rankServiceSettingsBuilder
+ *     .rankSettings()
+ *     .setRetrySettings(
+ *         rankServiceSettingsBuilder
+ *             .rankSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * RankServiceStubSettings rankServiceSettings = rankServiceSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class RankServiceStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final UnaryCallSettings rankSettings; + + /** Returns the object with the settings used for calls to rank. */ + public UnaryCallSettings rankSettings() { + return rankSettings; + } + + public RankServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcRankServiceStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonRankServiceStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns the endpoint set by the user or the the service's default endpoint. */ + @Override + public String getEndpoint() { + if (super.getEndpoint() != null) { + return super.getEndpoint(); + } + return getDefaultEndpoint(); + } + + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "discoveryengine"; + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "discoveryengine.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "discoveryengine.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(RankServiceStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(RankServiceStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return RankServiceStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected RankServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + rankSettings = settingsBuilder.rankSettings().build(); + } + + /** Builder for RankServiceStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder rankSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); + definitions.put("no_retry_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + rankSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = ImmutableList.>of(rankSettings); + initDefaults(this); + } + + protected Builder(RankServiceStubSettings settings) { + super(settings); + + rankSettings = settings.rankSettings.toBuilder(); + + unaryMethodSettingsBuilders = ImmutableList.>of(rankSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .rankSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to rank. */ + public UnaryCallSettings.Builder rankSettings() { + return rankSettings; + } + + /** Returns the endpoint set by the user or the the service's default endpoint. */ + @Override + public String getEndpoint() { + if (super.getEndpoint() != null) { + return super.getEndpoint(); + } + return getDefaultEndpoint(); + } + + @Override + public RankServiceStubSettings build() throws IOException { + return new RankServiceStubSettings(this); + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/resources/META-INF/native-image/com.google.cloud.discoveryengine.v1alpha/reflect-config.json b/java-discoveryengine/google-cloud-discoveryengine/src/main/resources/META-INF/native-image/com.google.cloud.discoveryengine.v1alpha/reflect-config.json index bf5166f3e635..7321b39b8fe2 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/main/resources/META-INF/native-image/com.google.cloud.discoveryengine.v1alpha/reflect-config.json +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/resources/META-INF/native-image/com.google.cloud.discoveryengine.v1alpha/reflect-config.json @@ -539,6 +539,96 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.BigtableOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.BigtableOptions$BigtableColumn", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.BigtableOptions$BigtableColumn$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.BigtableOptions$BigtableColumnFamily", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.BigtableOptions$BigtableColumnFamily$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.BigtableOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.BigtableOptions$Encoding", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.BigtableOptions$Type", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.BigtableSource", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.BigtableSource$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.discoveryengine.v1alpha.Chunk", "queryAllDeclaredConstructors": true, @@ -557,6 +647,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.Chunk$ChunkMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.Chunk$ChunkMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.discoveryengine.v1alpha.Chunk$DocumentMetadata", "queryAllDeclaredConstructors": true, @@ -575,6 +683,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.Chunk$PageSpan", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.Chunk$PageSpan$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.CloudSqlSource", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.CloudSqlSource$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.discoveryengine.v1alpha.CollectUserEventRequest", "queryAllDeclaredConstructors": true, @@ -1898,6 +2042,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.FhirStoreSource", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.FhirStoreSource$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.discoveryengine.v1alpha.FieldConfig", "queryAllDeclaredConstructors": true, @@ -1979,6 +2141,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.FirestoreSource", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.FirestoreSource$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.discoveryengine.v1alpha.GcsSource", "queryAllDeclaredConstructors": true, @@ -2123,6 +2303,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest$ProcessedDocumentFormat", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest$ProcessedDocumentType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.discoveryengine.v1alpha.GetSchemaRequest", "queryAllDeclaredConstructors": true, @@ -2258,6 +2474,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.discoveryengine.v1alpha.ImportDocumentsMetadata", "queryAllDeclaredConstructors": true, @@ -2906,6 +3158,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.ProcessedDocument", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.ProcessedDocument$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsMetadata", "queryAllDeclaredConstructors": true, @@ -3086,6 +3356,60 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.RankRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.RankRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.RankResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.RankResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.RankingRecord", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.RankingRecord$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.discoveryengine.v1alpha.RecommendRequest", "queryAllDeclaredConstructors": true, @@ -3374,6 +3698,60 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.SearchRequest$BoostSpec$ConditionBoostSpec$BoostControlSpec", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.SearchRequest$BoostSpec$ConditionBoostSpec$BoostControlSpec$AttributeType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.SearchRequest$BoostSpec$ConditionBoostSpec$BoostControlSpec$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.SearchRequest$BoostSpec$ConditionBoostSpec$BoostControlSpec$ControlPoint", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.SearchRequest$BoostSpec$ConditionBoostSpec$BoostControlSpec$ControlPoint$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.SearchRequest$BoostSpec$ConditionBoostSpec$BoostControlSpec$InterpolationType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.discoveryengine.v1alpha.SearchRequest$BoostSpec$ConditionBoostSpec$Builder", "queryAllDeclaredConstructors": true, @@ -3410,6 +3788,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.SearchRequest$ContentSearchSpec$ChunkSpec", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.SearchRequest$ContentSearchSpec$ChunkSpec$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.discoveryengine.v1alpha.SearchRequest$ContentSearchSpec$ExtractiveContentSpec", "queryAllDeclaredConstructors": true, @@ -3905,6 +4301,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.SearchResponse$Summary$Reference$ChunkContent", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.SearchResponse$Summary$Reference$ChunkContent$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.discoveryengine.v1alpha.SearchResponse$Summary$SafetyAttributes", "queryAllDeclaredConstructors": true, @@ -4067,6 +4481,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.SpannerSource", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.SpannerSource$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.discoveryengine.v1alpha.SuggestionDenyListEntry", "queryAllDeclaredConstructors": true, diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/ChunkServiceClientHttpJsonTest.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/ChunkServiceClientHttpJsonTest.java index 095cb397683c..5ebf13a48498 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/ChunkServiceClientHttpJsonTest.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/ChunkServiceClientHttpJsonTest.java @@ -93,6 +93,8 @@ public void getChunkTest() throws Exception { .setContent("content951530617") .setDocumentMetadata(Chunk.DocumentMetadata.newBuilder().build()) .setDerivedStructData(Struct.newBuilder().build()) + .setPageSpan(Chunk.PageSpan.newBuilder().build()) + .setChunkMetadata(Chunk.ChunkMetadata.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -153,6 +155,8 @@ public void getChunkTest2() throws Exception { .setContent("content951530617") .setDocumentMetadata(Chunk.DocumentMetadata.newBuilder().build()) .setDerivedStructData(Struct.newBuilder().build()) + .setPageSpan(Chunk.PageSpan.newBuilder().build()) + .setChunkMetadata(Chunk.ChunkMetadata.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/ChunkServiceClientTest.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/ChunkServiceClientTest.java index 613b594fcb00..0826b22594c9 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/ChunkServiceClientTest.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/ChunkServiceClientTest.java @@ -99,6 +99,8 @@ public void getChunkTest() throws Exception { .setContent("content951530617") .setDocumentMetadata(Chunk.DocumentMetadata.newBuilder().build()) .setDerivedStructData(Struct.newBuilder().build()) + .setPageSpan(Chunk.PageSpan.newBuilder().build()) + .setChunkMetadata(Chunk.ChunkMetadata.newBuilder().build()) .build(); mockChunkService.addResponse(expectedResponse); @@ -153,6 +155,8 @@ public void getChunkTest2() throws Exception { .setContent("content951530617") .setDocumentMetadata(Chunk.DocumentMetadata.newBuilder().build()) .setDerivedStructData(Struct.newBuilder().build()) + .setPageSpan(Chunk.PageSpan.newBuilder().build()) + .setChunkMetadata(Chunk.ChunkMetadata.newBuilder().build()) .build(); mockChunkService.addResponse(expectedResponse); diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/DocumentServiceClientHttpJsonTest.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/DocumentServiceClientHttpJsonTest.java index 763f6c951cad..a44d7fa66ec1 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/DocumentServiceClientHttpJsonTest.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/DocumentServiceClientHttpJsonTest.java @@ -616,6 +616,7 @@ public void importDocumentsTest() throws Exception { "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]") .toString()) .setErrorConfig(ImportErrorConfig.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) .setAutoGenerateIds(true) .setIdField("idField1629396127") .build(); @@ -653,6 +654,7 @@ public void importDocumentsExceptionTest() throws Exception { "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]") .toString()) .setErrorConfig(ImportErrorConfig.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) .setAutoGenerateIds(true) .setIdField("idField1629396127") .build(); @@ -729,4 +731,104 @@ public void purgeDocumentsExceptionTest() throws Exception { } catch (ExecutionException e) { } } + + @Test + public void getProcessedDocumentTest() throws Exception { + ProcessedDocument expectedResponse = + ProcessedDocument.newBuilder() + .setDocument( + DocumentName.ofProjectLocationDataStoreBranchDocumentName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]", "[DOCUMENT]") + .toString()) + .build(); + mockService.addResponse(expectedResponse); + + DocumentName name = + DocumentName.ofProjectLocationDataStoreBranchDocumentName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]", "[DOCUMENT]"); + + ProcessedDocument actualResponse = client.getProcessedDocument(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getProcessedDocumentExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DocumentName name = + DocumentName.ofProjectLocationDataStoreBranchDocumentName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]", "[DOCUMENT]"); + client.getProcessedDocument(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getProcessedDocumentTest2() throws Exception { + ProcessedDocument expectedResponse = + ProcessedDocument.newBuilder() + .setDocument( + DocumentName.ofProjectLocationDataStoreBranchDocumentName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]", "[DOCUMENT]") + .toString()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-2446/locations/location-2446/dataStores/dataStore-2446/branches/branche-2446/documents/document-2446"; + + ProcessedDocument actualResponse = client.getProcessedDocument(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getProcessedDocumentExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-2446/locations/location-2446/dataStores/dataStore-2446/branches/branche-2446/documents/document-2446"; + client.getProcessedDocument(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } } diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/DocumentServiceClientTest.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/DocumentServiceClientTest.java index 8b2ee3b98f50..b891d5d8ccec 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/DocumentServiceClientTest.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/DocumentServiceClientTest.java @@ -540,6 +540,7 @@ public void importDocumentsTest() throws Exception { "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]") .toString()) .setErrorConfig(ImportErrorConfig.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) .setAutoGenerateIds(true) .setIdField("idField1629396127") .build(); @@ -554,9 +555,15 @@ public void importDocumentsTest() throws Exception { Assert.assertEquals(request.getInlineSource(), actualRequest.getInlineSource()); Assert.assertEquals(request.getGcsSource(), actualRequest.getGcsSource()); Assert.assertEquals(request.getBigquerySource(), actualRequest.getBigquerySource()); + Assert.assertEquals(request.getFhirStoreSource(), actualRequest.getFhirStoreSource()); + Assert.assertEquals(request.getSpannerSource(), actualRequest.getSpannerSource()); + Assert.assertEquals(request.getCloudSqlSource(), actualRequest.getCloudSqlSource()); + Assert.assertEquals(request.getFirestoreSource(), actualRequest.getFirestoreSource()); + Assert.assertEquals(request.getBigtableSource(), actualRequest.getBigtableSource()); Assert.assertEquals(request.getParent(), actualRequest.getParent()); Assert.assertEquals(request.getErrorConfig(), actualRequest.getErrorConfig()); Assert.assertEquals(request.getReconciliationMode(), actualRequest.getReconciliationMode()); + Assert.assertEquals(request.getUpdateMask(), actualRequest.getUpdateMask()); Assert.assertEquals(request.getAutoGenerateIds(), actualRequest.getAutoGenerateIds()); Assert.assertEquals(request.getIdField(), actualRequest.getIdField()); Assert.assertTrue( @@ -578,6 +585,7 @@ public void importDocumentsExceptionTest() throws Exception { "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]") .toString()) .setErrorConfig(ImportErrorConfig.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) .setAutoGenerateIds(true) .setIdField("idField1629396127") .build(); @@ -658,4 +666,92 @@ public void purgeDocumentsExceptionTest() throws Exception { Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); } } + + @Test + public void getProcessedDocumentTest() throws Exception { + ProcessedDocument expectedResponse = + ProcessedDocument.newBuilder() + .setDocument( + DocumentName.ofProjectLocationDataStoreBranchDocumentName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]", "[DOCUMENT]") + .toString()) + .build(); + mockDocumentService.addResponse(expectedResponse); + + DocumentName name = + DocumentName.ofProjectLocationDataStoreBranchDocumentName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]", "[DOCUMENT]"); + + ProcessedDocument actualResponse = client.getProcessedDocument(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDocumentService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetProcessedDocumentRequest actualRequest = + ((GetProcessedDocumentRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getProcessedDocumentExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDocumentService.addException(exception); + + try { + DocumentName name = + DocumentName.ofProjectLocationDataStoreBranchDocumentName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]", "[DOCUMENT]"); + client.getProcessedDocument(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getProcessedDocumentTest2() throws Exception { + ProcessedDocument expectedResponse = + ProcessedDocument.newBuilder() + .setDocument( + DocumentName.ofProjectLocationDataStoreBranchDocumentName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]", "[DOCUMENT]") + .toString()) + .build(); + mockDocumentService.addResponse(expectedResponse); + + String name = "name3373707"; + + ProcessedDocument actualResponse = client.getProcessedDocument(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDocumentService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetProcessedDocumentRequest actualRequest = + ((GetProcessedDocumentRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getProcessedDocumentExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDocumentService.addException(exception); + + try { + String name = "name3373707"; + client.getProcessedDocument(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } } diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/MockDocumentServiceImpl.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/MockDocumentServiceImpl.java index 9ae0b925005b..bb429a4e2f7f 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/MockDocumentServiceImpl.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/MockDocumentServiceImpl.java @@ -205,4 +205,25 @@ public void purgeDocuments( Exception.class.getName()))); } } + + @Override + public void getProcessedDocument( + GetProcessedDocumentRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ProcessedDocument) { + requests.add(request); + responseObserver.onNext(((ProcessedDocument) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetProcessedDocument, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ProcessedDocument.class.getName(), + Exception.class.getName()))); + } + } } diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/MockRankService.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/MockRankService.java new file mode 100644 index 000000000000..33d6996afb0f --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/MockRankService.java @@ -0,0 +1,59 @@ +/* + * Copyright 2024 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.discoveryengine.v1alpha; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockRankService implements MockGrpcService { + private final MockRankServiceImpl serviceImpl; + + public MockRankService() { + serviceImpl = new MockRankServiceImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/MockRankServiceImpl.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/MockRankServiceImpl.java new file mode 100644 index 000000000000..90c86925786b --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/MockRankServiceImpl.java @@ -0,0 +1,80 @@ +/* + * Copyright 2024 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.discoveryengine.v1alpha; + +import com.google.api.core.BetaApi; +import com.google.cloud.discoveryengine.v1alpha.RankServiceGrpc.RankServiceImplBase; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockRankServiceImpl extends RankServiceImplBase { + private List requests; + private Queue responses; + + public MockRankServiceImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void rank(RankRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof RankResponse) { + requests.add(request); + responseObserver.onNext(((RankResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method Rank, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + RankResponse.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/RankServiceClientHttpJsonTest.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/RankServiceClientHttpJsonTest.java new file mode 100644 index 000000000000..0ce730342fb3 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/RankServiceClientHttpJsonTest.java @@ -0,0 +1,134 @@ +/* + * Copyright 2024 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.discoveryengine.v1alpha; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.cloud.discoveryengine.v1alpha.stub.HttpJsonRankServiceStub; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class RankServiceClientHttpJsonTest { + private static MockHttpService mockService; + private static RankServiceClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonRankServiceStub.getMethodDescriptors(), + RankServiceSettings.getDefaultEndpoint()); + RankServiceSettings settings = + RankServiceSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + RankServiceSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = RankServiceClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void rankTest() throws Exception { + RankResponse expectedResponse = + RankResponse.newBuilder().addAllRecords(new ArrayList()).build(); + mockService.addResponse(expectedResponse); + + RankRequest request = + RankRequest.newBuilder() + .setRankingConfig( + RankingConfigName.of("[PROJECT]", "[LOCATION]", "[RANKING_CONFIG]").toString()) + .setModel("model104069929") + .setTopN(110545924) + .setQuery("query107944136") + .addAllRecords(new ArrayList()) + .setIgnoreRecordDetailsInResponse(true) + .build(); + + RankResponse actualResponse = client.rank(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void rankExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + RankRequest request = + RankRequest.newBuilder() + .setRankingConfig( + RankingConfigName.of("[PROJECT]", "[LOCATION]", "[RANKING_CONFIG]").toString()) + .setModel("model104069929") + .setTopN(110545924) + .setQuery("query107944136") + .addAllRecords(new ArrayList()) + .setIgnoreRecordDetailsInResponse(true) + .build(); + client.rank(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/RankServiceClientTest.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/RankServiceClientTest.java new file mode 100644 index 000000000000..2f77c7a8184c --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/RankServiceClientTest.java @@ -0,0 +1,142 @@ +/* + * Copyright 2024 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.discoveryengine.v1alpha; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.protobuf.AbstractMessage; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class RankServiceClientTest { + private static MockLocations mockLocations; + private static MockRankService mockRankService; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private RankServiceClient client; + + @BeforeClass + public static void startStaticServer() { + mockRankService = new MockRankService(); + mockLocations = new MockLocations(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList(mockRankService, mockLocations)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + RankServiceSettings settings = + RankServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = RankServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void rankTest() throws Exception { + RankResponse expectedResponse = + RankResponse.newBuilder().addAllRecords(new ArrayList()).build(); + mockRankService.addResponse(expectedResponse); + + RankRequest request = + RankRequest.newBuilder() + .setRankingConfig( + RankingConfigName.of("[PROJECT]", "[LOCATION]", "[RANKING_CONFIG]").toString()) + .setModel("model104069929") + .setTopN(110545924) + .setQuery("query107944136") + .addAllRecords(new ArrayList()) + .setIgnoreRecordDetailsInResponse(true) + .build(); + + RankResponse actualResponse = client.rank(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockRankService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RankRequest actualRequest = ((RankRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getRankingConfig(), actualRequest.getRankingConfig()); + Assert.assertEquals(request.getModel(), actualRequest.getModel()); + Assert.assertEquals(request.getTopN(), actualRequest.getTopN()); + Assert.assertEquals(request.getQuery(), actualRequest.getQuery()); + Assert.assertEquals(request.getRecordsList(), actualRequest.getRecordsList()); + Assert.assertEquals( + request.getIgnoreRecordDetailsInResponse(), + actualRequest.getIgnoreRecordDetailsInResponse()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void rankExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRankService.addException(exception); + + try { + RankRequest request = + RankRequest.newBuilder() + .setRankingConfig( + RankingConfigName.of("[PROJECT]", "[LOCATION]", "[RANKING_CONFIG]").toString()) + .setModel("model104069929") + .setTopN(110545924) + .setQuery("query107944136") + .addAllRecords(new ArrayList()) + .setIgnoreRecordDetailsInResponse(true) + .build(); + client.rank(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/SearchTuningServiceClientHttpJsonTest.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/SearchTuningServiceClientHttpJsonTest.java index e9162282fd00..bf7181fa1019 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/SearchTuningServiceClientHttpJsonTest.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/SearchTuningServiceClientHttpJsonTest.java @@ -30,6 +30,7 @@ import com.google.rpc.Status; import java.io.IOException; import java.util.ArrayList; +import java.util.HashMap; import java.util.List; import java.util.concurrent.ExecutionException; import javax.annotation.Generated; @@ -82,6 +83,7 @@ public void trainCustomModelTest() throws Exception { .addAllErrorSamples(new ArrayList()) .setErrorConfig(ImportErrorConfig.newBuilder().build()) .setModelStatus("modelStatus488502395") + .putAllMetrics(new HashMap()) .build(); Operation resultOperation = Operation.newBuilder() diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/SearchTuningServiceClientTest.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/SearchTuningServiceClientTest.java index c07854b3edbe..30603f9e0810 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/SearchTuningServiceClientTest.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/SearchTuningServiceClientTest.java @@ -32,6 +32,7 @@ import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; +import java.util.HashMap; import java.util.List; import java.util.UUID; import java.util.concurrent.ExecutionException; @@ -91,6 +92,7 @@ public void trainCustomModelTest() throws Exception { .addAllErrorSamples(new ArrayList()) .setErrorConfig(ImportErrorConfig.newBuilder().build()) .setModelStatus("modelStatus488502395") + .putAllMetrics(new HashMap()) .build(); Operation resultOperation = Operation.newBuilder() diff --git a/java-discoveryengine/grpc-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/DocumentServiceGrpc.java b/java-discoveryengine/grpc-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/DocumentServiceGrpc.java index 9653b49a75b7..1d3027be7eb0 100644 --- a/java-discoveryengine/grpc-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/DocumentServiceGrpc.java +++ b/java-discoveryengine/grpc-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/DocumentServiceGrpc.java @@ -362,6 +362,56 @@ private DocumentServiceGrpc() {} return getPurgeDocumentsMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest, + com.google.cloud.discoveryengine.v1alpha.ProcessedDocument> + getGetProcessedDocumentMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetProcessedDocument", + requestType = com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest.class, + responseType = com.google.cloud.discoveryengine.v1alpha.ProcessedDocument.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest, + com.google.cloud.discoveryengine.v1alpha.ProcessedDocument> + getGetProcessedDocumentMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest, + com.google.cloud.discoveryengine.v1alpha.ProcessedDocument> + getGetProcessedDocumentMethod; + if ((getGetProcessedDocumentMethod = DocumentServiceGrpc.getGetProcessedDocumentMethod) + == null) { + synchronized (DocumentServiceGrpc.class) { + if ((getGetProcessedDocumentMethod = DocumentServiceGrpc.getGetProcessedDocumentMethod) + == null) { + DocumentServiceGrpc.getGetProcessedDocumentMethod = + getGetProcessedDocumentMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GetProcessedDocument")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1alpha.ProcessedDocument + .getDefaultInstance())) + .setSchemaDescriptor( + new DocumentServiceMethodDescriptorSupplier("GetProcessedDocument")) + .build(); + } + } + } + return getGetProcessedDocumentMethod; + } + /** Creates a new async stub that supports all call types for the service */ public static DocumentServiceStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = @@ -534,6 +584,22 @@ default void purgeDocuments( io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( getPurgeDocumentsMethod(), responseObserver); } + + /** + * + * + *
+     * Gets the parsed layout information for a
+     * [Document][google.cloud.discoveryengine.v1alpha.Document].
+     * 
+ */ + default void getProcessedDocument( + com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetProcessedDocumentMethod(), responseObserver); + } } /** @@ -708,6 +774,24 @@ public void purgeDocuments( request, responseObserver); } + + /** + * + * + *
+     * Gets the parsed layout information for a
+     * [Document][google.cloud.discoveryengine.v1alpha.Document].
+     * 
+ */ + public void getProcessedDocument( + com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetProcessedDocumentMethod(), getCallOptions()), + request, + responseObserver); + } } /** @@ -840,6 +924,20 @@ public com.google.longrunning.Operation purgeDocuments( return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getPurgeDocumentsMethod(), getCallOptions(), request); } + + /** + * + * + *
+     * Gets the parsed layout information for a
+     * [Document][google.cloud.discoveryengine.v1alpha.Document].
+     * 
+ */ + public com.google.cloud.discoveryengine.v1alpha.ProcessedDocument getProcessedDocument( + com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetProcessedDocumentMethod(), getCallOptions(), request); + } } /** @@ -976,6 +1074,22 @@ protected DocumentServiceFutureStub build( return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getPurgeDocumentsMethod(), getCallOptions()), request); } + + /** + * + * + *
+     * Gets the parsed layout information for a
+     * [Document][google.cloud.discoveryengine.v1alpha.Document].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.discoveryengine.v1alpha.ProcessedDocument> + getProcessedDocument( + com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetProcessedDocumentMethod(), getCallOptions()), request); + } } private static final int METHODID_GET_DOCUMENT = 0; @@ -985,6 +1099,7 @@ protected DocumentServiceFutureStub build( private static final int METHODID_DELETE_DOCUMENT = 4; private static final int METHODID_IMPORT_DOCUMENTS = 5; private static final int METHODID_PURGE_DOCUMENTS = 6; + private static final int METHODID_GET_PROCESSED_DOCUMENT = 7; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -1043,6 +1158,13 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_GET_PROCESSED_DOCUMENT: + serviceImpl.getProcessedDocument( + (com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.discoveryengine.v1alpha.ProcessedDocument>) + responseObserver); + break; default: throw new AssertionError(); } @@ -1107,6 +1229,13 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser new MethodHandlers< com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest, com.google.longrunning.Operation>(service, METHODID_PURGE_DOCUMENTS))) + .addMethod( + getGetProcessedDocumentMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest, + com.google.cloud.discoveryengine.v1alpha.ProcessedDocument>( + service, METHODID_GET_PROCESSED_DOCUMENT))) .build(); } @@ -1165,6 +1294,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getDeleteDocumentMethod()) .addMethod(getImportDocumentsMethod()) .addMethod(getPurgeDocumentsMethod()) + .addMethod(getGetProcessedDocumentMethod()) .build(); } } diff --git a/java-discoveryengine/grpc-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/RankServiceGrpc.java b/java-discoveryengine/grpc-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/RankServiceGrpc.java new file mode 100644 index 000000000000..e7fcd5b3e3e5 --- /dev/null +++ b/java-discoveryengine/grpc-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/RankServiceGrpc.java @@ -0,0 +1,373 @@ +/* + * Copyright 2024 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.discoveryengine.v1alpha; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * Service for ranking text records.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/discoveryengine/v1alpha/rank_service.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class RankServiceGrpc { + + private RankServiceGrpc() {} + + public static final java.lang.String SERVICE_NAME = + "google.cloud.discoveryengine.v1alpha.RankService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.RankRequest, + com.google.cloud.discoveryengine.v1alpha.RankResponse> + getRankMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "Rank", + requestType = com.google.cloud.discoveryengine.v1alpha.RankRequest.class, + responseType = com.google.cloud.discoveryengine.v1alpha.RankResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.RankRequest, + com.google.cloud.discoveryengine.v1alpha.RankResponse> + getRankMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.RankRequest, + com.google.cloud.discoveryengine.v1alpha.RankResponse> + getRankMethod; + if ((getRankMethod = RankServiceGrpc.getRankMethod) == null) { + synchronized (RankServiceGrpc.class) { + if ((getRankMethod = RankServiceGrpc.getRankMethod) == null) { + RankServiceGrpc.getRankMethod = + getRankMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "Rank")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1alpha.RankRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1alpha.RankResponse + .getDefaultInstance())) + .setSchemaDescriptor(new RankServiceMethodDescriptorSupplier("Rank")) + .build(); + } + } + } + return getRankMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static RankServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public RankServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new RankServiceStub(channel, callOptions); + } + }; + return RankServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static RankServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public RankServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new RankServiceBlockingStub(channel, callOptions); + } + }; + return RankServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static RankServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public RankServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new RankServiceFutureStub(channel, callOptions); + } + }; + return RankServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Service for ranking text records.
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Ranks a list of text records based on the given input query.
+     * 
+ */ + default void rank( + com.google.cloud.discoveryengine.v1alpha.RankRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRankMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service RankService. + * + *
+   * Service for ranking text records.
+   * 
+ */ + public abstract static class RankServiceImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return RankServiceGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service RankService. + * + *
+   * Service for ranking text records.
+   * 
+ */ + public static final class RankServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private RankServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected RankServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new RankServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * Ranks a list of text records based on the given input query.
+     * 
+ */ + public void rank( + com.google.cloud.discoveryengine.v1alpha.RankRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getRankMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service RankService. + * + *
+   * Service for ranking text records.
+   * 
+ */ + public static final class RankServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private RankServiceBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected RankServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new RankServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Ranks a list of text records based on the given input query.
+     * 
+ */ + public com.google.cloud.discoveryengine.v1alpha.RankResponse rank( + com.google.cloud.discoveryengine.v1alpha.RankRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getRankMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service RankService. + * + *
+   * Service for ranking text records.
+   * 
+ */ + public static final class RankServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private RankServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected RankServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new RankServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Ranks a list of text records based on the given input query.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.discoveryengine.v1alpha.RankResponse> + rank(com.google.cloud.discoveryengine.v1alpha.RankRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getRankMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_RANK = 0; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_RANK: + serviceImpl.rank( + (com.google.cloud.discoveryengine.v1alpha.RankRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getRankMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.discoveryengine.v1alpha.RankRequest, + com.google.cloud.discoveryengine.v1alpha.RankResponse>(service, METHODID_RANK))) + .build(); + } + + private abstract static class RankServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + RankServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.RankServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("RankService"); + } + } + + private static final class RankServiceFileDescriptorSupplier + extends RankServiceBaseDescriptorSupplier { + RankServiceFileDescriptorSupplier() {} + } + + private static final class RankServiceMethodDescriptorSupplier + extends RankServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + RankServiceMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (RankServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new RankServiceFileDescriptorSupplier()) + .addMethod(getRankMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-discoveryengine/grpc-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ServingConfigServiceGrpc.java b/java-discoveryengine/grpc-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ServingConfigServiceGrpc.java index 46d42c5f92a0..8ff542de9268 100644 --- a/java-discoveryengine/grpc-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ServingConfigServiceGrpc.java +++ b/java-discoveryengine/grpc-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ServingConfigServiceGrpc.java @@ -21,7 +21,8 @@ * * *
- * Service for operations related to [ServingConfig][].
+ * Service for operations related to
+ * [ServingConfig][google.cloud.discoveryengine.v1alpha.ServingConfig].
  * 
*/ @javax.annotation.Generated( @@ -228,7 +229,8 @@ public ServingConfigServiceFutureStub newStub( * * *
-   * Service for operations related to [ServingConfig][].
+   * Service for operations related to
+   * [ServingConfig][google.cloud.discoveryengine.v1alpha.ServingConfig].
    * 
*/ public interface AsyncService { @@ -286,7 +288,8 @@ default void listServingConfigs( * Base class for the server implementation of the service ServingConfigService. * *
-   * Service for operations related to [ServingConfig][].
+   * Service for operations related to
+   * [ServingConfig][google.cloud.discoveryengine.v1alpha.ServingConfig].
    * 
*/ public abstract static class ServingConfigServiceImplBase @@ -302,7 +305,8 @@ public final io.grpc.ServerServiceDefinition bindService() { * A stub to allow clients to do asynchronous rpc calls to service ServingConfigService. * *
-   * Service for operations related to [ServingConfig][].
+   * Service for operations related to
+   * [ServingConfig][google.cloud.discoveryengine.v1alpha.ServingConfig].
    * 
*/ public static final class ServingConfigServiceStub @@ -376,7 +380,8 @@ public void listServingConfigs( * A stub to allow clients to do synchronous rpc calls to service ServingConfigService. * *
-   * Service for operations related to [ServingConfig][].
+   * Service for operations related to
+   * [ServingConfig][google.cloud.discoveryengine.v1alpha.ServingConfig].
    * 
*/ public static final class ServingConfigServiceBlockingStub @@ -438,7 +443,8 @@ public com.google.cloud.discoveryengine.v1alpha.ListServingConfigsResponse listS * A stub to allow clients to do ListenableFuture-style rpc calls to service ServingConfigService. * *
-   * Service for operations related to [ServingConfig][].
+   * Service for operations related to
+   * [ServingConfig][google.cloud.discoveryengine.v1alpha.ServingConfig].
    * 
*/ public static final class ServingConfigServiceFutureStub diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/BigtableOptions.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/BigtableOptions.java new file mode 100644 index 000000000000..70171aa1ce27 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/BigtableOptions.java @@ -0,0 +1,4658 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/import_config.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * The Bigtable Options object that contains information to support
+ * the import.
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.BigtableOptions} + */ +public final class BigtableOptions extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.BigtableOptions) + BigtableOptionsOrBuilder { + private static final long serialVersionUID = 0L; + // Use BigtableOptions.newBuilder() to construct. + private BigtableOptions(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BigtableOptions() { + keyFieldName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BigtableOptions(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_BigtableOptions_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 2: + return internalGetFamilies(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_BigtableOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.class, + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.Builder.class); + } + + /** + * + * + *
+   * The type of values in a Bigtable column or column family.
+   * The values are expected to be encoded using
+   * [HBase
+   * Bytes.toBytes](https://hbase.apache.org/apidocs/org/apache/hadoop/hbase/util/Bytes.html)
+   * function when the encoding value is set to `BINARY`.
+   * 
+ * + * Protobuf enum {@code google.cloud.discoveryengine.v1alpha.BigtableOptions.Type} + */ + public enum Type implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The type is unspecified.
+     * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * String type.
+     * 
+ * + * STRING = 1; + */ + STRING(1), + /** + * + * + *
+     * Numerical type.
+     * 
+ * + * NUMBER = 2; + */ + NUMBER(2), + /** + * + * + *
+     * Integer type.
+     * 
+ * + * INTEGER = 3; + */ + INTEGER(3), + /** + * + * + *
+     * Variable length integer type.
+     * 
+ * + * VAR_INTEGER = 4; + */ + VAR_INTEGER(4), + /** + * + * + *
+     * BigDecimal type.
+     * 
+ * + * BIG_NUMERIC = 5; + */ + BIG_NUMERIC(5), + /** + * + * + *
+     * Boolean type.
+     * 
+ * + * BOOLEAN = 6; + */ + BOOLEAN(6), + /** + * + * + *
+     * JSON type.
+     * 
+ * + * JSON = 7; + */ + JSON(7), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The type is unspecified.
+     * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + public static final int TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * String type.
+     * 
+ * + * STRING = 1; + */ + public static final int STRING_VALUE = 1; + /** + * + * + *
+     * Numerical type.
+     * 
+ * + * NUMBER = 2; + */ + public static final int NUMBER_VALUE = 2; + /** + * + * + *
+     * Integer type.
+     * 
+ * + * INTEGER = 3; + */ + public static final int INTEGER_VALUE = 3; + /** + * + * + *
+     * Variable length integer type.
+     * 
+ * + * VAR_INTEGER = 4; + */ + public static final int VAR_INTEGER_VALUE = 4; + /** + * + * + *
+     * BigDecimal type.
+     * 
+ * + * BIG_NUMERIC = 5; + */ + public static final int BIG_NUMERIC_VALUE = 5; + /** + * + * + *
+     * Boolean type.
+     * 
+ * + * BOOLEAN = 6; + */ + public static final int BOOLEAN_VALUE = 6; + /** + * + * + *
+     * JSON type.
+     * 
+ * + * JSON = 7; + */ + public static final int JSON_VALUE = 7; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Type valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Type forNumber(int value) { + switch (value) { + case 0: + return TYPE_UNSPECIFIED; + case 1: + return STRING; + case 2: + return NUMBER; + case 3: + return INTEGER; + case 4: + return VAR_INTEGER; + case 5: + return BIG_NUMERIC; + case 6: + return BOOLEAN; + case 7: + return JSON; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Type findValueByNumber(int number) { + return Type.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.BigtableOptions.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Type[] VALUES = values(); + + public static Type valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Type(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1alpha.BigtableOptions.Type) + } + + /** + * + * + *
+   * The encoding mode of a Bigtable column or column family.
+   * 
+ * + * Protobuf enum {@code google.cloud.discoveryengine.v1alpha.BigtableOptions.Encoding} + */ + public enum Encoding implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The encoding is unspecified.
+     * 
+ * + * ENCODING_UNSPECIFIED = 0; + */ + ENCODING_UNSPECIFIED(0), + /** + * + * + *
+     * Text encoding.
+     * 
+ * + * TEXT = 1; + */ + TEXT(1), + /** + * + * + *
+     * Binary encoding.
+     * 
+ * + * BINARY = 2; + */ + BINARY(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The encoding is unspecified.
+     * 
+ * + * ENCODING_UNSPECIFIED = 0; + */ + public static final int ENCODING_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Text encoding.
+     * 
+ * + * TEXT = 1; + */ + public static final int TEXT_VALUE = 1; + /** + * + * + *
+     * Binary encoding.
+     * 
+ * + * BINARY = 2; + */ + public static final int BINARY_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Encoding valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Encoding forNumber(int value) { + switch (value) { + case 0: + return ENCODING_UNSPECIFIED; + case 1: + return TEXT; + case 2: + return BINARY; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Encoding findValueByNumber(int number) { + return Encoding.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.BigtableOptions.getDescriptor() + .getEnumTypes() + .get(1); + } + + private static final Encoding[] VALUES = values(); + + public static Encoding valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Encoding(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1alpha.BigtableOptions.Encoding) + } + + public interface BigtableColumnFamilyOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The field name to use for this column family in the document. The
+     * name has to match the pattern `[a-zA-Z0-9][a-zA-Z0-9-_]*`. If not set,
+     * it is parsed from the family name with best effort. However, due to
+     * different naming patterns, field name collisions could happen, where
+     * parsing behavior is undefined.
+     * 
+ * + * string field_name = 1; + * + * @return The fieldName. + */ + java.lang.String getFieldName(); + /** + * + * + *
+     * The field name to use for this column family in the document. The
+     * name has to match the pattern `[a-zA-Z0-9][a-zA-Z0-9-_]*`. If not set,
+     * it is parsed from the family name with best effort. However, due to
+     * different naming patterns, field name collisions could happen, where
+     * parsing behavior is undefined.
+     * 
+ * + * string field_name = 1; + * + * @return The bytes for fieldName. + */ + com.google.protobuf.ByteString getFieldNameBytes(); + + /** + * + * + *
+     * The encoding mode of the values when the type is not STRING.
+     * Acceptable encoding values are:
+     *
+     * * `TEXT`: indicates values are alphanumeric text strings.
+     * * `BINARY`: indicates values are encoded using `HBase Bytes.toBytes`
+     * family of functions. This can be overridden for a specific column
+     * by listing that column in `columns` and specifying an encoding for it.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigtableOptions.Encoding encoding = 2; + * + * @return The enum numeric value on the wire for encoding. + */ + int getEncodingValue(); + /** + * + * + *
+     * The encoding mode of the values when the type is not STRING.
+     * Acceptable encoding values are:
+     *
+     * * `TEXT`: indicates values are alphanumeric text strings.
+     * * `BINARY`: indicates values are encoded using `HBase Bytes.toBytes`
+     * family of functions. This can be overridden for a specific column
+     * by listing that column in `columns` and specifying an encoding for it.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigtableOptions.Encoding encoding = 2; + * + * @return The encoding. + */ + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.Encoding getEncoding(); + + /** + * + * + *
+     * The type of values in this column family.
+     * The values are expected to be encoded using `HBase Bytes.toBytes`
+     * function when the encoding value is set to `BINARY`.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigtableOptions.Type type = 3; + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + * + * + *
+     * The type of values in this column family.
+     * The values are expected to be encoded using `HBase Bytes.toBytes`
+     * function when the encoding value is set to `BINARY`.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigtableOptions.Type type = 3; + * + * @return The type. + */ + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.Type getType(); + + /** + * + * + *
+     * The list of objects that contains column level information for each
+     * column. If a column is not present in this list it will be ignored.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn columns = 4; + * + */ + java.util.List + getColumnsList(); + /** + * + * + *
+     * The list of objects that contains column level information for each
+     * column. If a column is not present in this list it will be ignored.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn columns = 4; + * + */ + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn getColumns(int index); + /** + * + * + *
+     * The list of objects that contains column level information for each
+     * column. If a column is not present in this list it will be ignored.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn columns = 4; + * + */ + int getColumnsCount(); + /** + * + * + *
+     * The list of objects that contains column level information for each
+     * column. If a column is not present in this list it will be ignored.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn columns = 4; + * + */ + java.util.List< + ? extends + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnOrBuilder> + getColumnsOrBuilderList(); + /** + * + * + *
+     * The list of objects that contains column level information for each
+     * column. If a column is not present in this list it will be ignored.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn columns = 4; + * + */ + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnOrBuilder + getColumnsOrBuilder(int index); + } + /** + * + * + *
+   * The column family of the Bigtable.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily} + */ + public static final class BigtableColumnFamily extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily) + BigtableColumnFamilyOrBuilder { + private static final long serialVersionUID = 0L; + // Use BigtableColumnFamily.newBuilder() to construct. + private BigtableColumnFamily(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BigtableColumnFamily() { + fieldName_ = ""; + encoding_ = 0; + type_ = 0; + columns_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BigtableColumnFamily(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_BigtableOptions_BigtableColumnFamily_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_BigtableOptions_BigtableColumnFamily_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily.class, + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily.Builder + .class); + } + + public static final int FIELD_NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object fieldName_ = ""; + /** + * + * + *
+     * The field name to use for this column family in the document. The
+     * name has to match the pattern `[a-zA-Z0-9][a-zA-Z0-9-_]*`. If not set,
+     * it is parsed from the family name with best effort. However, due to
+     * different naming patterns, field name collisions could happen, where
+     * parsing behavior is undefined.
+     * 
+ * + * string field_name = 1; + * + * @return The fieldName. + */ + @java.lang.Override + public java.lang.String getFieldName() { + java.lang.Object ref = fieldName_; + 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(); + fieldName_ = s; + return s; + } + } + /** + * + * + *
+     * The field name to use for this column family in the document. The
+     * name has to match the pattern `[a-zA-Z0-9][a-zA-Z0-9-_]*`. If not set,
+     * it is parsed from the family name with best effort. However, due to
+     * different naming patterns, field name collisions could happen, where
+     * parsing behavior is undefined.
+     * 
+ * + * string field_name = 1; + * + * @return The bytes for fieldName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFieldNameBytes() { + java.lang.Object ref = fieldName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + fieldName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENCODING_FIELD_NUMBER = 2; + private int encoding_ = 0; + /** + * + * + *
+     * The encoding mode of the values when the type is not STRING.
+     * Acceptable encoding values are:
+     *
+     * * `TEXT`: indicates values are alphanumeric text strings.
+     * * `BINARY`: indicates values are encoded using `HBase Bytes.toBytes`
+     * family of functions. This can be overridden for a specific column
+     * by listing that column in `columns` and specifying an encoding for it.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigtableOptions.Encoding encoding = 2; + * + * @return The enum numeric value on the wire for encoding. + */ + @java.lang.Override + public int getEncodingValue() { + return encoding_; + } + /** + * + * + *
+     * The encoding mode of the values when the type is not STRING.
+     * Acceptable encoding values are:
+     *
+     * * `TEXT`: indicates values are alphanumeric text strings.
+     * * `BINARY`: indicates values are encoded using `HBase Bytes.toBytes`
+     * family of functions. This can be overridden for a specific column
+     * by listing that column in `columns` and specifying an encoding for it.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigtableOptions.Encoding encoding = 2; + * + * @return The encoding. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.BigtableOptions.Encoding getEncoding() { + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.Encoding result = + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.Encoding.forNumber(encoding_); + return result == null + ? com.google.cloud.discoveryengine.v1alpha.BigtableOptions.Encoding.UNRECOGNIZED + : result; + } + + public static final int TYPE_FIELD_NUMBER = 3; + private int type_ = 0; + /** + * + * + *
+     * The type of values in this column family.
+     * The values are expected to be encoded using `HBase Bytes.toBytes`
+     * function when the encoding value is set to `BINARY`.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigtableOptions.Type type = 3; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+     * The type of values in this column family.
+     * The values are expected to be encoded using `HBase Bytes.toBytes`
+     * function when the encoding value is set to `BINARY`.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigtableOptions.Type type = 3; + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.BigtableOptions.Type getType() { + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.Type result = + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.Type.forNumber(type_); + return result == null + ? com.google.cloud.discoveryengine.v1alpha.BigtableOptions.Type.UNRECOGNIZED + : result; + } + + public static final int COLUMNS_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List + columns_; + /** + * + * + *
+     * The list of objects that contains column level information for each
+     * column. If a column is not present in this list it will be ignored.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn columns = 4; + * + */ + @java.lang.Override + public java.util.List + getColumnsList() { + return columns_; + } + /** + * + * + *
+     * The list of objects that contains column level information for each
+     * column. If a column is not present in this list it will be ignored.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn columns = 4; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnOrBuilder> + getColumnsOrBuilderList() { + return columns_; + } + /** + * + * + *
+     * The list of objects that contains column level information for each
+     * column. If a column is not present in this list it will be ignored.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn columns = 4; + * + */ + @java.lang.Override + public int getColumnsCount() { + return columns_.size(); + } + /** + * + * + *
+     * The list of objects that contains column level information for each
+     * column. If a column is not present in this list it will be ignored.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn columns = 4; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn getColumns( + int index) { + return columns_.get(index); + } + /** + * + * + *
+     * The list of objects that contains column level information for each
+     * column. If a column is not present in this list it will be ignored.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn columns = 4; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnOrBuilder + getColumnsOrBuilder(int index) { + return columns_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fieldName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, fieldName_); + } + if (encoding_ + != com.google.cloud.discoveryengine.v1alpha.BigtableOptions.Encoding.ENCODING_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, encoding_); + } + if (type_ + != com.google.cloud.discoveryengine.v1alpha.BigtableOptions.Type.TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(3, type_); + } + for (int i = 0; i < columns_.size(); i++) { + output.writeMessage(4, columns_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fieldName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, fieldName_); + } + if (encoding_ + != com.google.cloud.discoveryengine.v1alpha.BigtableOptions.Encoding.ENCODING_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, encoding_); + } + if (type_ + != com.google.cloud.discoveryengine.v1alpha.BigtableOptions.Type.TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, type_); + } + for (int i = 0; i < columns_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, columns_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily other = + (com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily) obj; + + if (!getFieldName().equals(other.getFieldName())) return false; + if (encoding_ != other.encoding_) return false; + if (type_ != other.type_) return false; + if (!getColumnsList().equals(other.getColumnsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + FIELD_NAME_FIELD_NUMBER; + hash = (53 * hash) + getFieldName().hashCode(); + hash = (37 * hash) + ENCODING_FIELD_NUMBER; + hash = (53 * hash) + encoding_; + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + if (getColumnsCount() > 0) { + hash = (37 * hash) + COLUMNS_FIELD_NUMBER; + hash = (53 * hash) + getColumnsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * The column family of the Bigtable.
+     * 
+ * + * Protobuf type {@code + * google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily) + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamilyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_BigtableOptions_BigtableColumnFamily_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_BigtableOptions_BigtableColumnFamily_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily.class, + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily + .Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + fieldName_ = ""; + encoding_ = 0; + type_ = 0; + if (columnsBuilder_ == null) { + columns_ = java.util.Collections.emptyList(); + } else { + columns_ = null; + columnsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_BigtableOptions_BigtableColumnFamily_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily build() { + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily + buildPartial() { + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily result = + new com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily result) { + if (columnsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + columns_ = java.util.Collections.unmodifiableList(columns_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.columns_ = columns_; + } else { + result.columns_ = columnsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.fieldName_ = fieldName_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.encoding_ = encoding_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.type_ = type_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily + .getDefaultInstance()) return this; + if (!other.getFieldName().isEmpty()) { + fieldName_ = other.fieldName_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.encoding_ != 0) { + setEncodingValue(other.getEncodingValue()); + } + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (columnsBuilder_ == null) { + if (!other.columns_.isEmpty()) { + if (columns_.isEmpty()) { + columns_ = other.columns_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureColumnsIsMutable(); + columns_.addAll(other.columns_); + } + onChanged(); + } + } else { + if (!other.columns_.isEmpty()) { + if (columnsBuilder_.isEmpty()) { + columnsBuilder_.dispose(); + columnsBuilder_ = null; + columns_ = other.columns_; + bitField0_ = (bitField0_ & ~0x00000008); + columnsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getColumnsFieldBuilder() + : null; + } else { + columnsBuilder_.addAllMessages(other.columns_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + fieldName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + encoding_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + type_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: + { + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn m = + input.readMessage( + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn + .parser(), + extensionRegistry); + if (columnsBuilder_ == null) { + ensureColumnsIsMutable(); + columns_.add(m); + } else { + columnsBuilder_.addMessage(m); + } + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object fieldName_ = ""; + /** + * + * + *
+       * The field name to use for this column family in the document. The
+       * name has to match the pattern `[a-zA-Z0-9][a-zA-Z0-9-_]*`. If not set,
+       * it is parsed from the family name with best effort. However, due to
+       * different naming patterns, field name collisions could happen, where
+       * parsing behavior is undefined.
+       * 
+ * + * string field_name = 1; + * + * @return The fieldName. + */ + public java.lang.String getFieldName() { + java.lang.Object ref = fieldName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fieldName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The field name to use for this column family in the document. The
+       * name has to match the pattern `[a-zA-Z0-9][a-zA-Z0-9-_]*`. If not set,
+       * it is parsed from the family name with best effort. However, due to
+       * different naming patterns, field name collisions could happen, where
+       * parsing behavior is undefined.
+       * 
+ * + * string field_name = 1; + * + * @return The bytes for fieldName. + */ + public com.google.protobuf.ByteString getFieldNameBytes() { + java.lang.Object ref = fieldName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + fieldName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The field name to use for this column family in the document. The
+       * name has to match the pattern `[a-zA-Z0-9][a-zA-Z0-9-_]*`. If not set,
+       * it is parsed from the family name with best effort. However, due to
+       * different naming patterns, field name collisions could happen, where
+       * parsing behavior is undefined.
+       * 
+ * + * string field_name = 1; + * + * @param value The fieldName to set. + * @return This builder for chaining. + */ + public Builder setFieldName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + fieldName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The field name to use for this column family in the document. The
+       * name has to match the pattern `[a-zA-Z0-9][a-zA-Z0-9-_]*`. If not set,
+       * it is parsed from the family name with best effort. However, due to
+       * different naming patterns, field name collisions could happen, where
+       * parsing behavior is undefined.
+       * 
+ * + * string field_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearFieldName() { + fieldName_ = getDefaultInstance().getFieldName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * The field name to use for this column family in the document. The
+       * name has to match the pattern `[a-zA-Z0-9][a-zA-Z0-9-_]*`. If not set,
+       * it is parsed from the family name with best effort. However, due to
+       * different naming patterns, field name collisions could happen, where
+       * parsing behavior is undefined.
+       * 
+ * + * string field_name = 1; + * + * @param value The bytes for fieldName to set. + * @return This builder for chaining. + */ + public Builder setFieldNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + fieldName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int encoding_ = 0; + /** + * + * + *
+       * The encoding mode of the values when the type is not STRING.
+       * Acceptable encoding values are:
+       *
+       * * `TEXT`: indicates values are alphanumeric text strings.
+       * * `BINARY`: indicates values are encoded using `HBase Bytes.toBytes`
+       * family of functions. This can be overridden for a specific column
+       * by listing that column in `columns` and specifying an encoding for it.
+       * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigtableOptions.Encoding encoding = 2; + * + * @return The enum numeric value on the wire for encoding. + */ + @java.lang.Override + public int getEncodingValue() { + return encoding_; + } + /** + * + * + *
+       * The encoding mode of the values when the type is not STRING.
+       * Acceptable encoding values are:
+       *
+       * * `TEXT`: indicates values are alphanumeric text strings.
+       * * `BINARY`: indicates values are encoded using `HBase Bytes.toBytes`
+       * family of functions. This can be overridden for a specific column
+       * by listing that column in `columns` and specifying an encoding for it.
+       * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigtableOptions.Encoding encoding = 2; + * + * @param value The enum numeric value on the wire for encoding to set. + * @return This builder for chaining. + */ + public Builder setEncodingValue(int value) { + encoding_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * The encoding mode of the values when the type is not STRING.
+       * Acceptable encoding values are:
+       *
+       * * `TEXT`: indicates values are alphanumeric text strings.
+       * * `BINARY`: indicates values are encoded using `HBase Bytes.toBytes`
+       * family of functions. This can be overridden for a specific column
+       * by listing that column in `columns` and specifying an encoding for it.
+       * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigtableOptions.Encoding encoding = 2; + * + * @return The encoding. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.BigtableOptions.Encoding getEncoding() { + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.Encoding result = + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.Encoding.forNumber(encoding_); + return result == null + ? com.google.cloud.discoveryengine.v1alpha.BigtableOptions.Encoding.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * The encoding mode of the values when the type is not STRING.
+       * Acceptable encoding values are:
+       *
+       * * `TEXT`: indicates values are alphanumeric text strings.
+       * * `BINARY`: indicates values are encoded using `HBase Bytes.toBytes`
+       * family of functions. This can be overridden for a specific column
+       * by listing that column in `columns` and specifying an encoding for it.
+       * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigtableOptions.Encoding encoding = 2; + * + * @param value The encoding to set. + * @return This builder for chaining. + */ + public Builder setEncoding( + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.Encoding value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + encoding_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * The encoding mode of the values when the type is not STRING.
+       * Acceptable encoding values are:
+       *
+       * * `TEXT`: indicates values are alphanumeric text strings.
+       * * `BINARY`: indicates values are encoded using `HBase Bytes.toBytes`
+       * family of functions. This can be overridden for a specific column
+       * by listing that column in `columns` and specifying an encoding for it.
+       * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigtableOptions.Encoding encoding = 2; + * + * @return This builder for chaining. + */ + public Builder clearEncoding() { + bitField0_ = (bitField0_ & ~0x00000002); + encoding_ = 0; + onChanged(); + return this; + } + + private int type_ = 0; + /** + * + * + *
+       * The type of values in this column family.
+       * The values are expected to be encoded using `HBase Bytes.toBytes`
+       * function when the encoding value is set to `BINARY`.
+       * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigtableOptions.Type type = 3; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+       * The type of values in this column family.
+       * The values are expected to be encoded using `HBase Bytes.toBytes`
+       * function when the encoding value is set to `BINARY`.
+       * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigtableOptions.Type type = 3; + * + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + type_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * The type of values in this column family.
+       * The values are expected to be encoded using `HBase Bytes.toBytes`
+       * function when the encoding value is set to `BINARY`.
+       * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigtableOptions.Type type = 3; + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.BigtableOptions.Type getType() { + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.Type result = + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.Type.forNumber(type_); + return result == null + ? com.google.cloud.discoveryengine.v1alpha.BigtableOptions.Type.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * The type of values in this column family.
+       * The values are expected to be encoded using `HBase Bytes.toBytes`
+       * function when the encoding value is set to `BINARY`.
+       * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigtableOptions.Type type = 3; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.cloud.discoveryengine.v1alpha.BigtableOptions.Type value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * The type of values in this column family.
+       * The values are expected to be encoded using `HBase Bytes.toBytes`
+       * function when the encoding value is set to `BINARY`.
+       * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigtableOptions.Type type = 3; + * + * @return This builder for chaining. + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000004); + type_ = 0; + onChanged(); + return this; + } + + private java.util.List< + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn> + columns_ = java.util.Collections.emptyList(); + + private void ensureColumnsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + columns_ = + new java.util.ArrayList< + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn>( + columns_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn, + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn.Builder, + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnOrBuilder> + columnsBuilder_; + + /** + * + * + *
+       * The list of objects that contains column level information for each
+       * column. If a column is not present in this list it will be ignored.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn columns = 4; + * + */ + public java.util.List + getColumnsList() { + if (columnsBuilder_ == null) { + return java.util.Collections.unmodifiableList(columns_); + } else { + return columnsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * The list of objects that contains column level information for each
+       * column. If a column is not present in this list it will be ignored.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn columns = 4; + * + */ + public int getColumnsCount() { + if (columnsBuilder_ == null) { + return columns_.size(); + } else { + return columnsBuilder_.getCount(); + } + } + /** + * + * + *
+       * The list of objects that contains column level information for each
+       * column. If a column is not present in this list it will be ignored.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn columns = 4; + * + */ + public com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn getColumns( + int index) { + if (columnsBuilder_ == null) { + return columns_.get(index); + } else { + return columnsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * The list of objects that contains column level information for each
+       * column. If a column is not present in this list it will be ignored.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn columns = 4; + * + */ + public Builder setColumns( + int index, + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn value) { + if (columnsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureColumnsIsMutable(); + columns_.set(index, value); + onChanged(); + } else { + columnsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * The list of objects that contains column level information for each
+       * column. If a column is not present in this list it will be ignored.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn columns = 4; + * + */ + public Builder setColumns( + int index, + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn.Builder + builderForValue) { + if (columnsBuilder_ == null) { + ensureColumnsIsMutable(); + columns_.set(index, builderForValue.build()); + onChanged(); + } else { + columnsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * The list of objects that contains column level information for each
+       * column. If a column is not present in this list it will be ignored.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn columns = 4; + * + */ + public Builder addColumns( + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn value) { + if (columnsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureColumnsIsMutable(); + columns_.add(value); + onChanged(); + } else { + columnsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * The list of objects that contains column level information for each
+       * column. If a column is not present in this list it will be ignored.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn columns = 4; + * + */ + public Builder addColumns( + int index, + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn value) { + if (columnsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureColumnsIsMutable(); + columns_.add(index, value); + onChanged(); + } else { + columnsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * The list of objects that contains column level information for each
+       * column. If a column is not present in this list it will be ignored.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn columns = 4; + * + */ + public Builder addColumns( + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn.Builder + builderForValue) { + if (columnsBuilder_ == null) { + ensureColumnsIsMutable(); + columns_.add(builderForValue.build()); + onChanged(); + } else { + columnsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * The list of objects that contains column level information for each
+       * column. If a column is not present in this list it will be ignored.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn columns = 4; + * + */ + public Builder addColumns( + int index, + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn.Builder + builderForValue) { + if (columnsBuilder_ == null) { + ensureColumnsIsMutable(); + columns_.add(index, builderForValue.build()); + onChanged(); + } else { + columnsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * The list of objects that contains column level information for each
+       * column. If a column is not present in this list it will be ignored.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn columns = 4; + * + */ + public Builder addAllColumns( + java.lang.Iterable< + ? extends com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn> + values) { + if (columnsBuilder_ == null) { + ensureColumnsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, columns_); + onChanged(); + } else { + columnsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * The list of objects that contains column level information for each
+       * column. If a column is not present in this list it will be ignored.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn columns = 4; + * + */ + public Builder clearColumns() { + if (columnsBuilder_ == null) { + columns_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + columnsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * The list of objects that contains column level information for each
+       * column. If a column is not present in this list it will be ignored.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn columns = 4; + * + */ + public Builder removeColumns(int index) { + if (columnsBuilder_ == null) { + ensureColumnsIsMutable(); + columns_.remove(index); + onChanged(); + } else { + columnsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * The list of objects that contains column level information for each
+       * column. If a column is not present in this list it will be ignored.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn columns = 4; + * + */ + public com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn.Builder + getColumnsBuilder(int index) { + return getColumnsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * The list of objects that contains column level information for each
+       * column. If a column is not present in this list it will be ignored.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn columns = 4; + * + */ + public com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnOrBuilder + getColumnsOrBuilder(int index) { + if (columnsBuilder_ == null) { + return columns_.get(index); + } else { + return columnsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * The list of objects that contains column level information for each
+       * column. If a column is not present in this list it will be ignored.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn columns = 4; + * + */ + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnOrBuilder> + getColumnsOrBuilderList() { + if (columnsBuilder_ != null) { + return columnsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(columns_); + } + } + /** + * + * + *
+       * The list of objects that contains column level information for each
+       * column. If a column is not present in this list it will be ignored.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn columns = 4; + * + */ + public com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn.Builder + addColumnsBuilder() { + return getColumnsFieldBuilder() + .addBuilder( + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn + .getDefaultInstance()); + } + /** + * + * + *
+       * The list of objects that contains column level information for each
+       * column. If a column is not present in this list it will be ignored.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn columns = 4; + * + */ + public com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn.Builder + addColumnsBuilder(int index) { + return getColumnsFieldBuilder() + .addBuilder( + index, + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn + .getDefaultInstance()); + } + /** + * + * + *
+       * The list of objects that contains column level information for each
+       * column. If a column is not present in this list it will be ignored.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn columns = 4; + * + */ + public java.util.List< + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn.Builder> + getColumnsBuilderList() { + return getColumnsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn, + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn.Builder, + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnOrBuilder> + getColumnsFieldBuilder() { + if (columnsBuilder_ == null) { + columnsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn, + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn.Builder, + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnOrBuilder>( + columns_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); + columns_ = null; + } + return columnsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily) + private static final com.google.cloud.discoveryengine.v1alpha.BigtableOptions + .BigtableColumnFamily + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily(); + } + + public static com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BigtableColumnFamily parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface BigtableColumnOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. Qualifier of the column. If it cannot be decoded with utf-8,
+     * use a base-64 encoded string instead.
+     * 
+ * + * bytes qualifier = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The qualifier. + */ + com.google.protobuf.ByteString getQualifier(); + + /** + * + * + *
+     * The field name to use for this column in the document. The name has to
+     * match the pattern `[a-zA-Z0-9][a-zA-Z0-9-_]*`.
+     * If not set, it is parsed from the qualifier bytes with best effort.
+     * However, due to different naming patterns, field name collisions could
+     * happen, where parsing behavior is undefined.
+     * 
+ * + * string field_name = 2; + * + * @return The fieldName. + */ + java.lang.String getFieldName(); + /** + * + * + *
+     * The field name to use for this column in the document. The name has to
+     * match the pattern `[a-zA-Z0-9][a-zA-Z0-9-_]*`.
+     * If not set, it is parsed from the qualifier bytes with best effort.
+     * However, due to different naming patterns, field name collisions could
+     * happen, where parsing behavior is undefined.
+     * 
+ * + * string field_name = 2; + * + * @return The bytes for fieldName. + */ + com.google.protobuf.ByteString getFieldNameBytes(); + + /** + * + * + *
+     * The encoding mode of the values when the type is not `STRING`.
+     * Acceptable encoding values are:
+     *
+     * * `TEXT`: indicates values are alphanumeric text strings.
+     * * `BINARY`: indicates values are encoded using `HBase Bytes.toBytes`
+     * family of functions. This can be overridden for a specific column
+     * by listing that column in `columns` and specifying an encoding for it.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigtableOptions.Encoding encoding = 3; + * + * @return The enum numeric value on the wire for encoding. + */ + int getEncodingValue(); + /** + * + * + *
+     * The encoding mode of the values when the type is not `STRING`.
+     * Acceptable encoding values are:
+     *
+     * * `TEXT`: indicates values are alphanumeric text strings.
+     * * `BINARY`: indicates values are encoded using `HBase Bytes.toBytes`
+     * family of functions. This can be overridden for a specific column
+     * by listing that column in `columns` and specifying an encoding for it.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigtableOptions.Encoding encoding = 3; + * + * @return The encoding. + */ + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.Encoding getEncoding(); + + /** + * + * + *
+     * The type of values in this column family.
+     * The values are expected to be encoded using `HBase Bytes.toBytes`
+     * function when the encoding value is set to `BINARY`.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigtableOptions.Type type = 4; + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + * + * + *
+     * The type of values in this column family.
+     * The values are expected to be encoded using `HBase Bytes.toBytes`
+     * function when the encoding value is set to `BINARY`.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigtableOptions.Type type = 4; + * + * @return The type. + */ + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.Type getType(); + } + /** + * + * + *
+   * The column of the Bigtable.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn} + */ + public static final class BigtableColumn extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn) + BigtableColumnOrBuilder { + private static final long serialVersionUID = 0L; + // Use BigtableColumn.newBuilder() to construct. + private BigtableColumn(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BigtableColumn() { + qualifier_ = com.google.protobuf.ByteString.EMPTY; + fieldName_ = ""; + encoding_ = 0; + type_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BigtableColumn(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_BigtableOptions_BigtableColumn_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_BigtableOptions_BigtableColumn_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn.class, + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn.Builder + .class); + } + + public static final int QUALIFIER_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString qualifier_ = com.google.protobuf.ByteString.EMPTY; + /** + * + * + *
+     * Required. Qualifier of the column. If it cannot be decoded with utf-8,
+     * use a base-64 encoded string instead.
+     * 
+ * + * bytes qualifier = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The qualifier. + */ + @java.lang.Override + public com.google.protobuf.ByteString getQualifier() { + return qualifier_; + } + + public static final int FIELD_NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object fieldName_ = ""; + /** + * + * + *
+     * The field name to use for this column in the document. The name has to
+     * match the pattern `[a-zA-Z0-9][a-zA-Z0-9-_]*`.
+     * If not set, it is parsed from the qualifier bytes with best effort.
+     * However, due to different naming patterns, field name collisions could
+     * happen, where parsing behavior is undefined.
+     * 
+ * + * string field_name = 2; + * + * @return The fieldName. + */ + @java.lang.Override + public java.lang.String getFieldName() { + java.lang.Object ref = fieldName_; + 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(); + fieldName_ = s; + return s; + } + } + /** + * + * + *
+     * The field name to use for this column in the document. The name has to
+     * match the pattern `[a-zA-Z0-9][a-zA-Z0-9-_]*`.
+     * If not set, it is parsed from the qualifier bytes with best effort.
+     * However, due to different naming patterns, field name collisions could
+     * happen, where parsing behavior is undefined.
+     * 
+ * + * string field_name = 2; + * + * @return The bytes for fieldName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFieldNameBytes() { + java.lang.Object ref = fieldName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + fieldName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENCODING_FIELD_NUMBER = 3; + private int encoding_ = 0; + /** + * + * + *
+     * The encoding mode of the values when the type is not `STRING`.
+     * Acceptable encoding values are:
+     *
+     * * `TEXT`: indicates values are alphanumeric text strings.
+     * * `BINARY`: indicates values are encoded using `HBase Bytes.toBytes`
+     * family of functions. This can be overridden for a specific column
+     * by listing that column in `columns` and specifying an encoding for it.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigtableOptions.Encoding encoding = 3; + * + * @return The enum numeric value on the wire for encoding. + */ + @java.lang.Override + public int getEncodingValue() { + return encoding_; + } + /** + * + * + *
+     * The encoding mode of the values when the type is not `STRING`.
+     * Acceptable encoding values are:
+     *
+     * * `TEXT`: indicates values are alphanumeric text strings.
+     * * `BINARY`: indicates values are encoded using `HBase Bytes.toBytes`
+     * family of functions. This can be overridden for a specific column
+     * by listing that column in `columns` and specifying an encoding for it.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigtableOptions.Encoding encoding = 3; + * + * @return The encoding. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.BigtableOptions.Encoding getEncoding() { + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.Encoding result = + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.Encoding.forNumber(encoding_); + return result == null + ? com.google.cloud.discoveryengine.v1alpha.BigtableOptions.Encoding.UNRECOGNIZED + : result; + } + + public static final int TYPE_FIELD_NUMBER = 4; + private int type_ = 0; + /** + * + * + *
+     * The type of values in this column family.
+     * The values are expected to be encoded using `HBase Bytes.toBytes`
+     * function when the encoding value is set to `BINARY`.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigtableOptions.Type type = 4; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+     * The type of values in this column family.
+     * The values are expected to be encoded using `HBase Bytes.toBytes`
+     * function when the encoding value is set to `BINARY`.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigtableOptions.Type type = 4; + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.BigtableOptions.Type getType() { + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.Type result = + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.Type.forNumber(type_); + return result == null + ? com.google.cloud.discoveryengine.v1alpha.BigtableOptions.Type.UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!qualifier_.isEmpty()) { + output.writeBytes(1, qualifier_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fieldName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, fieldName_); + } + if (encoding_ + != com.google.cloud.discoveryengine.v1alpha.BigtableOptions.Encoding.ENCODING_UNSPECIFIED + .getNumber()) { + output.writeEnum(3, encoding_); + } + if (type_ + != com.google.cloud.discoveryengine.v1alpha.BigtableOptions.Type.TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(4, type_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!qualifier_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream.computeBytesSize(1, qualifier_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fieldName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, fieldName_); + } + if (encoding_ + != com.google.cloud.discoveryengine.v1alpha.BigtableOptions.Encoding.ENCODING_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, encoding_); + } + if (type_ + != com.google.cloud.discoveryengine.v1alpha.BigtableOptions.Type.TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, type_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn other = + (com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn) obj; + + if (!getQualifier().equals(other.getQualifier())) return false; + if (!getFieldName().equals(other.getFieldName())) return false; + if (encoding_ != other.encoding_) return false; + if (type_ != other.type_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + QUALIFIER_FIELD_NUMBER; + hash = (53 * hash) + getQualifier().hashCode(); + hash = (37 * hash) + FIELD_NAME_FIELD_NUMBER; + hash = (53 * hash) + getFieldName().hashCode(); + hash = (37 * hash) + ENCODING_FIELD_NUMBER; + hash = (53 * hash) + encoding_; + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * The column of the Bigtable.
+     * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn) + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_BigtableOptions_BigtableColumn_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_BigtableOptions_BigtableColumn_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn.class, + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn.Builder + .class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + qualifier_ = com.google.protobuf.ByteString.EMPTY; + fieldName_ = ""; + encoding_ = 0; + type_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_BigtableOptions_BigtableColumn_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn build() { + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn + buildPartial() { + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn result = + new com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.qualifier_ = qualifier_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.fieldName_ = fieldName_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.encoding_ = encoding_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.type_ = type_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn + .getDefaultInstance()) return this; + if (other.getQualifier() != com.google.protobuf.ByteString.EMPTY) { + setQualifier(other.getQualifier()); + } + if (!other.getFieldName().isEmpty()) { + fieldName_ = other.fieldName_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.encoding_ != 0) { + setEncodingValue(other.getEncodingValue()); + } + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + qualifier_ = input.readBytes(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + fieldName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + encoding_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: + { + type_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.ByteString qualifier_ = com.google.protobuf.ByteString.EMPTY; + /** + * + * + *
+       * Required. Qualifier of the column. If it cannot be decoded with utf-8,
+       * use a base-64 encoded string instead.
+       * 
+ * + * bytes qualifier = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The qualifier. + */ + @java.lang.Override + public com.google.protobuf.ByteString getQualifier() { + return qualifier_; + } + /** + * + * + *
+       * Required. Qualifier of the column. If it cannot be decoded with utf-8,
+       * use a base-64 encoded string instead.
+       * 
+ * + * bytes qualifier = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The qualifier to set. + * @return This builder for chaining. + */ + public Builder setQualifier(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + qualifier_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Qualifier of the column. If it cannot be decoded with utf-8,
+       * use a base-64 encoded string instead.
+       * 
+ * + * bytes qualifier = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearQualifier() { + bitField0_ = (bitField0_ & ~0x00000001); + qualifier_ = getDefaultInstance().getQualifier(); + onChanged(); + return this; + } + + private java.lang.Object fieldName_ = ""; + /** + * + * + *
+       * The field name to use for this column in the document. The name has to
+       * match the pattern `[a-zA-Z0-9][a-zA-Z0-9-_]*`.
+       * If not set, it is parsed from the qualifier bytes with best effort.
+       * However, due to different naming patterns, field name collisions could
+       * happen, where parsing behavior is undefined.
+       * 
+ * + * string field_name = 2; + * + * @return The fieldName. + */ + public java.lang.String getFieldName() { + java.lang.Object ref = fieldName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fieldName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The field name to use for this column in the document. The name has to
+       * match the pattern `[a-zA-Z0-9][a-zA-Z0-9-_]*`.
+       * If not set, it is parsed from the qualifier bytes with best effort.
+       * However, due to different naming patterns, field name collisions could
+       * happen, where parsing behavior is undefined.
+       * 
+ * + * string field_name = 2; + * + * @return The bytes for fieldName. + */ + public com.google.protobuf.ByteString getFieldNameBytes() { + java.lang.Object ref = fieldName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + fieldName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The field name to use for this column in the document. The name has to
+       * match the pattern `[a-zA-Z0-9][a-zA-Z0-9-_]*`.
+       * If not set, it is parsed from the qualifier bytes with best effort.
+       * However, due to different naming patterns, field name collisions could
+       * happen, where parsing behavior is undefined.
+       * 
+ * + * string field_name = 2; + * + * @param value The fieldName to set. + * @return This builder for chaining. + */ + public Builder setFieldName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + fieldName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * The field name to use for this column in the document. The name has to
+       * match the pattern `[a-zA-Z0-9][a-zA-Z0-9-_]*`.
+       * If not set, it is parsed from the qualifier bytes with best effort.
+       * However, due to different naming patterns, field name collisions could
+       * happen, where parsing behavior is undefined.
+       * 
+ * + * string field_name = 2; + * + * @return This builder for chaining. + */ + public Builder clearFieldName() { + fieldName_ = getDefaultInstance().getFieldName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * The field name to use for this column in the document. The name has to
+       * match the pattern `[a-zA-Z0-9][a-zA-Z0-9-_]*`.
+       * If not set, it is parsed from the qualifier bytes with best effort.
+       * However, due to different naming patterns, field name collisions could
+       * happen, where parsing behavior is undefined.
+       * 
+ * + * string field_name = 2; + * + * @param value The bytes for fieldName to set. + * @return This builder for chaining. + */ + public Builder setFieldNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + fieldName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int encoding_ = 0; + /** + * + * + *
+       * The encoding mode of the values when the type is not `STRING`.
+       * Acceptable encoding values are:
+       *
+       * * `TEXT`: indicates values are alphanumeric text strings.
+       * * `BINARY`: indicates values are encoded using `HBase Bytes.toBytes`
+       * family of functions. This can be overridden for a specific column
+       * by listing that column in `columns` and specifying an encoding for it.
+       * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigtableOptions.Encoding encoding = 3; + * + * @return The enum numeric value on the wire for encoding. + */ + @java.lang.Override + public int getEncodingValue() { + return encoding_; + } + /** + * + * + *
+       * The encoding mode of the values when the type is not `STRING`.
+       * Acceptable encoding values are:
+       *
+       * * `TEXT`: indicates values are alphanumeric text strings.
+       * * `BINARY`: indicates values are encoded using `HBase Bytes.toBytes`
+       * family of functions. This can be overridden for a specific column
+       * by listing that column in `columns` and specifying an encoding for it.
+       * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigtableOptions.Encoding encoding = 3; + * + * @param value The enum numeric value on the wire for encoding to set. + * @return This builder for chaining. + */ + public Builder setEncodingValue(int value) { + encoding_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * The encoding mode of the values when the type is not `STRING`.
+       * Acceptable encoding values are:
+       *
+       * * `TEXT`: indicates values are alphanumeric text strings.
+       * * `BINARY`: indicates values are encoded using `HBase Bytes.toBytes`
+       * family of functions. This can be overridden for a specific column
+       * by listing that column in `columns` and specifying an encoding for it.
+       * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigtableOptions.Encoding encoding = 3; + * + * @return The encoding. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.BigtableOptions.Encoding getEncoding() { + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.Encoding result = + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.Encoding.forNumber(encoding_); + return result == null + ? com.google.cloud.discoveryengine.v1alpha.BigtableOptions.Encoding.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * The encoding mode of the values when the type is not `STRING`.
+       * Acceptable encoding values are:
+       *
+       * * `TEXT`: indicates values are alphanumeric text strings.
+       * * `BINARY`: indicates values are encoded using `HBase Bytes.toBytes`
+       * family of functions. This can be overridden for a specific column
+       * by listing that column in `columns` and specifying an encoding for it.
+       * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigtableOptions.Encoding encoding = 3; + * + * @param value The encoding to set. + * @return This builder for chaining. + */ + public Builder setEncoding( + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.Encoding value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + encoding_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * The encoding mode of the values when the type is not `STRING`.
+       * Acceptable encoding values are:
+       *
+       * * `TEXT`: indicates values are alphanumeric text strings.
+       * * `BINARY`: indicates values are encoded using `HBase Bytes.toBytes`
+       * family of functions. This can be overridden for a specific column
+       * by listing that column in `columns` and specifying an encoding for it.
+       * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigtableOptions.Encoding encoding = 3; + * + * @return This builder for chaining. + */ + public Builder clearEncoding() { + bitField0_ = (bitField0_ & ~0x00000004); + encoding_ = 0; + onChanged(); + return this; + } + + private int type_ = 0; + /** + * + * + *
+       * The type of values in this column family.
+       * The values are expected to be encoded using `HBase Bytes.toBytes`
+       * function when the encoding value is set to `BINARY`.
+       * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigtableOptions.Type type = 4; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+       * The type of values in this column family.
+       * The values are expected to be encoded using `HBase Bytes.toBytes`
+       * function when the encoding value is set to `BINARY`.
+       * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigtableOptions.Type type = 4; + * + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + type_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * The type of values in this column family.
+       * The values are expected to be encoded using `HBase Bytes.toBytes`
+       * function when the encoding value is set to `BINARY`.
+       * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigtableOptions.Type type = 4; + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.BigtableOptions.Type getType() { + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.Type result = + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.Type.forNumber(type_); + return result == null + ? com.google.cloud.discoveryengine.v1alpha.BigtableOptions.Type.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * The type of values in this column family.
+       * The values are expected to be encoded using `HBase Bytes.toBytes`
+       * function when the encoding value is set to `BINARY`.
+       * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigtableOptions.Type type = 4; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.cloud.discoveryengine.v1alpha.BigtableOptions.Type value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * The type of values in this column family.
+       * The values are expected to be encoded using `HBase Bytes.toBytes`
+       * function when the encoding value is set to `BINARY`.
+       * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigtableOptions.Type type = 4; + * + * @return This builder for chaining. + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000008); + type_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn) + private static final com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn(); + } + + public static com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BigtableColumn parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumn + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int KEY_FIELD_NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object keyFieldName_ = ""; + /** + * + * + *
+   * The field name used for saving row key value in the document. The name has
+   * to match the pattern `[a-zA-Z0-9][a-zA-Z0-9-_]*`.
+   * 
+ * + * string key_field_name = 1; + * + * @return The keyFieldName. + */ + @java.lang.Override + public java.lang.String getKeyFieldName() { + java.lang.Object ref = keyFieldName_; + 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(); + keyFieldName_ = s; + return s; + } + } + /** + * + * + *
+   * The field name used for saving row key value in the document. The name has
+   * to match the pattern `[a-zA-Z0-9][a-zA-Z0-9-_]*`.
+   * 
+ * + * string key_field_name = 1; + * + * @return The bytes for keyFieldName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKeyFieldNameBytes() { + java.lang.Object ref = keyFieldName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + keyFieldName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FAMILIES_FIELD_NUMBER = 2; + + private static final class FamiliesDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily> + defaultEntry = + com.google.protobuf.MapEntry + . + newDefaultInstance( + com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_BigtableOptions_FamiliesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.cloud.discoveryengine.v1alpha.BigtableOptions + .BigtableColumnFamily.getDefaultInstance()); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily> + families_; + + private com.google.protobuf.MapField< + java.lang.String, + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily> + internalGetFamilies() { + if (families_ == null) { + return com.google.protobuf.MapField.emptyMapField(FamiliesDefaultEntryHolder.defaultEntry); + } + return families_; + } + + public int getFamiliesCount() { + return internalGetFamilies().getMap().size(); + } + /** + * + * + *
+   * The mapping from family names to an object that contains column families
+   * level information for the given column family. If a family is not present
+   * in this map it will be ignored.
+   * 
+ * + * + * map<string, .google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily> families = 2; + * + */ + @java.lang.Override + public boolean containsFamilies(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetFamilies().getMap().containsKey(key); + } + /** Use {@link #getFamiliesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map< + java.lang.String, + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily> + getFamilies() { + return getFamiliesMap(); + } + /** + * + * + *
+   * The mapping from family names to an object that contains column families
+   * level information for the given column family. If a family is not present
+   * in this map it will be ignored.
+   * 
+ * + * + * map<string, .google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily> families = 2; + * + */ + @java.lang.Override + public java.util.Map< + java.lang.String, + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily> + getFamiliesMap() { + return internalGetFamilies().getMap(); + } + /** + * + * + *
+   * The mapping from family names to an object that contains column families
+   * level information for the given column family. If a family is not present
+   * in this map it will be ignored.
+   * 
+ * + * + * map<string, .google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily> families = 2; + * + */ + @java.lang.Override + public /* nullable */ com.google.cloud.discoveryengine.v1alpha.BigtableOptions + .BigtableColumnFamily + getFamiliesOrDefault( + java.lang.String key, + /* nullable */ + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily + defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map< + java.lang.String, + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily> + map = internalGetFamilies().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * The mapping from family names to an object that contains column families
+   * level information for the given column family. If a family is not present
+   * in this map it will be ignored.
+   * 
+ * + * + * map<string, .google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily> families = 2; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily + getFamiliesOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map< + java.lang.String, + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily> + map = internalGetFamilies().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(keyFieldName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, keyFieldName_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetFamilies(), FamiliesDefaultEntryHolder.defaultEntry, 2); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(keyFieldName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, keyFieldName_); + } + for (java.util.Map.Entry< + java.lang.String, + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily> + entry : internalGetFamilies().getMap().entrySet()) { + com.google.protobuf.MapEntry< + java.lang.String, + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily> + families__ = + FamiliesDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, families__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.BigtableOptions)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.BigtableOptions other = + (com.google.cloud.discoveryengine.v1alpha.BigtableOptions) obj; + + if (!getKeyFieldName().equals(other.getKeyFieldName())) return false; + if (!internalGetFamilies().equals(other.internalGetFamilies())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + KEY_FIELD_NAME_FIELD_NUMBER; + hash = (53 * hash) + getKeyFieldName().hashCode(); + if (!internalGetFamilies().getMap().isEmpty()) { + hash = (37 * hash) + FAMILIES_FIELD_NUMBER; + hash = (53 * hash) + internalGetFamilies().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.BigtableOptions parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.BigtableOptions parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.BigtableOptions parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.BigtableOptions parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.BigtableOptions parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.BigtableOptions parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.BigtableOptions parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.BigtableOptions parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.BigtableOptions parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.BigtableOptions parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.BigtableOptions parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.BigtableOptions parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.BigtableOptions prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The Bigtable Options object that contains information to support
+   * the import.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.BigtableOptions} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.BigtableOptions) + com.google.cloud.discoveryengine.v1alpha.BigtableOptionsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_BigtableOptions_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 2: + return internalGetFamilies(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 2: + return internalGetMutableFamilies(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_BigtableOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.class, + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1alpha.BigtableOptions.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + keyFieldName_ = ""; + internalGetMutableFamilies().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_BigtableOptions_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.BigtableOptions getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.BigtableOptions.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.BigtableOptions build() { + com.google.cloud.discoveryengine.v1alpha.BigtableOptions result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.BigtableOptions buildPartial() { + com.google.cloud.discoveryengine.v1alpha.BigtableOptions result = + new com.google.cloud.discoveryengine.v1alpha.BigtableOptions(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.discoveryengine.v1alpha.BigtableOptions result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.keyFieldName_ = keyFieldName_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.families_ = internalGetFamilies().build(FamiliesDefaultEntryHolder.defaultEntry); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.BigtableOptions) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.BigtableOptions) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1alpha.BigtableOptions other) { + if (other == com.google.cloud.discoveryengine.v1alpha.BigtableOptions.getDefaultInstance()) + return this; + if (!other.getKeyFieldName().isEmpty()) { + keyFieldName_ = other.keyFieldName_; + bitField0_ |= 0x00000001; + onChanged(); + } + internalGetMutableFamilies().mergeFrom(other.internalGetFamilies()); + bitField0_ |= 0x00000002; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + keyFieldName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.protobuf.MapEntry< + java.lang.String, + com.google.cloud.discoveryengine.v1alpha.BigtableOptions + .BigtableColumnFamily> + families__ = + input.readMessage( + FamiliesDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableFamilies() + .ensureBuilderMap() + .put(families__.getKey(), families__.getValue()); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object keyFieldName_ = ""; + /** + * + * + *
+     * The field name used for saving row key value in the document. The name has
+     * to match the pattern `[a-zA-Z0-9][a-zA-Z0-9-_]*`.
+     * 
+ * + * string key_field_name = 1; + * + * @return The keyFieldName. + */ + public java.lang.String getKeyFieldName() { + java.lang.Object ref = keyFieldName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + keyFieldName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The field name used for saving row key value in the document. The name has
+     * to match the pattern `[a-zA-Z0-9][a-zA-Z0-9-_]*`.
+     * 
+ * + * string key_field_name = 1; + * + * @return The bytes for keyFieldName. + */ + public com.google.protobuf.ByteString getKeyFieldNameBytes() { + java.lang.Object ref = keyFieldName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + keyFieldName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The field name used for saving row key value in the document. The name has
+     * to match the pattern `[a-zA-Z0-9][a-zA-Z0-9-_]*`.
+     * 
+ * + * string key_field_name = 1; + * + * @param value The keyFieldName to set. + * @return This builder for chaining. + */ + public Builder setKeyFieldName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + keyFieldName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The field name used for saving row key value in the document. The name has
+     * to match the pattern `[a-zA-Z0-9][a-zA-Z0-9-_]*`.
+     * 
+ * + * string key_field_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearKeyFieldName() { + keyFieldName_ = getDefaultInstance().getKeyFieldName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The field name used for saving row key value in the document. The name has
+     * to match the pattern `[a-zA-Z0-9][a-zA-Z0-9-_]*`.
+     * 
+ * + * string key_field_name = 1; + * + * @param value The bytes for keyFieldName to set. + * @return This builder for chaining. + */ + public Builder setKeyFieldNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + keyFieldName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private static final class FamiliesConverter + implements com.google.protobuf.MapFieldBuilder.Converter< + java.lang.String, + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamilyOrBuilder, + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily> { + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily build( + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamilyOrBuilder + val) { + if (val + instanceof + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily) { + return (com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily) + val; + } + return ((com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily + .Builder) + val) + .build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry< + java.lang.String, + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily> + defaultEntry() { + return FamiliesDefaultEntryHolder.defaultEntry; + } + }; + + private static final FamiliesConverter familiesConverter = new FamiliesConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamilyOrBuilder, + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily, + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily.Builder> + families_; + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamilyOrBuilder, + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily, + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily.Builder> + internalGetFamilies() { + if (families_ == null) { + return new com.google.protobuf.MapFieldBuilder<>(familiesConverter); + } + return families_; + } + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamilyOrBuilder, + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily, + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily.Builder> + internalGetMutableFamilies() { + if (families_ == null) { + families_ = new com.google.protobuf.MapFieldBuilder<>(familiesConverter); + } + bitField0_ |= 0x00000002; + onChanged(); + return families_; + } + + public int getFamiliesCount() { + return internalGetFamilies().ensureBuilderMap().size(); + } + /** + * + * + *
+     * The mapping from family names to an object that contains column families
+     * level information for the given column family. If a family is not present
+     * in this map it will be ignored.
+     * 
+ * + * + * map<string, .google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily> families = 2; + * + */ + @java.lang.Override + public boolean containsFamilies(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetFamilies().ensureBuilderMap().containsKey(key); + } + /** Use {@link #getFamiliesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map< + java.lang.String, + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily> + getFamilies() { + return getFamiliesMap(); + } + /** + * + * + *
+     * The mapping from family names to an object that contains column families
+     * level information for the given column family. If a family is not present
+     * in this map it will be ignored.
+     * 
+ * + * + * map<string, .google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily> families = 2; + * + */ + @java.lang.Override + public java.util.Map< + java.lang.String, + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily> + getFamiliesMap() { + return internalGetFamilies().getImmutableMap(); + } + /** + * + * + *
+     * The mapping from family names to an object that contains column families
+     * level information for the given column family. If a family is not present
+     * in this map it will be ignored.
+     * 
+ * + * + * map<string, .google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily> families = 2; + * + */ + @java.lang.Override + public /* nullable */ com.google.cloud.discoveryengine.v1alpha.BigtableOptions + .BigtableColumnFamily + getFamiliesOrDefault( + java.lang.String key, + /* nullable */ + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily + defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map< + java.lang.String, + com.google.cloud.discoveryengine.v1alpha.BigtableOptions + .BigtableColumnFamilyOrBuilder> + map = internalGetMutableFamilies().ensureBuilderMap(); + return map.containsKey(key) ? familiesConverter.build(map.get(key)) : defaultValue; + } + /** + * + * + *
+     * The mapping from family names to an object that contains column families
+     * level information for the given column family. If a family is not present
+     * in this map it will be ignored.
+     * 
+ * + * + * map<string, .google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily> families = 2; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily + getFamiliesOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map< + java.lang.String, + com.google.cloud.discoveryengine.v1alpha.BigtableOptions + .BigtableColumnFamilyOrBuilder> + map = internalGetMutableFamilies().ensureBuilderMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return familiesConverter.build(map.get(key)); + } + + public Builder clearFamilies() { + bitField0_ = (bitField0_ & ~0x00000002); + internalGetMutableFamilies().clear(); + return this; + } + /** + * + * + *
+     * The mapping from family names to an object that contains column families
+     * level information for the given column family. If a family is not present
+     * in this map it will be ignored.
+     * 
+ * + * + * map<string, .google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily> families = 2; + * + */ + public Builder removeFamilies(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableFamilies().ensureBuilderMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map< + java.lang.String, + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily> + getMutableFamilies() { + bitField0_ |= 0x00000002; + return internalGetMutableFamilies().ensureMessageMap(); + } + /** + * + * + *
+     * The mapping from family names to an object that contains column families
+     * level information for the given column family. If a family is not present
+     * in this map it will be ignored.
+     * 
+ * + * + * map<string, .google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily> families = 2; + * + */ + public Builder putFamilies( + java.lang.String key, + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableFamilies().ensureBuilderMap().put(key, value); + bitField0_ |= 0x00000002; + return this; + } + /** + * + * + *
+     * The mapping from family names to an object that contains column families
+     * level information for the given column family. If a family is not present
+     * in this map it will be ignored.
+     * 
+ * + * + * map<string, .google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily> families = 2; + * + */ + public Builder putAllFamilies( + java.util.Map< + java.lang.String, + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily> + values) { + for (java.util.Map.Entry< + java.lang.String, + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily> + e : values.entrySet()) { + if (e.getKey() == null || e.getValue() == null) { + throw new NullPointerException(); + } + } + internalGetMutableFamilies().ensureBuilderMap().putAll(values); + bitField0_ |= 0x00000002; + return this; + } + /** + * + * + *
+     * The mapping from family names to an object that contains column families
+     * level information for the given column family. If a family is not present
+     * in this map it will be ignored.
+     * 
+ * + * + * map<string, .google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily> families = 2; + * + */ + public com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily.Builder + putFamiliesBuilderIfAbsent(java.lang.String key) { + java.util.Map< + java.lang.String, + com.google.cloud.discoveryengine.v1alpha.BigtableOptions + .BigtableColumnFamilyOrBuilder> + builderMap = internalGetMutableFamilies().ensureBuilderMap(); + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamilyOrBuilder entry = + builderMap.get(key); + if (entry == null) { + entry = + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily + .newBuilder(); + builderMap.put(key, entry); + } + if (entry + instanceof + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily) { + entry = + ((com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily) entry) + .toBuilder(); + builderMap.put(key, entry); + } + return (com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily.Builder) + entry; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.BigtableOptions) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.BigtableOptions) + private static final com.google.cloud.discoveryengine.v1alpha.BigtableOptions DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.BigtableOptions(); + } + + public static com.google.cloud.discoveryengine.v1alpha.BigtableOptions getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BigtableOptions parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.BigtableOptions getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/BigtableOptionsOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/BigtableOptionsOrBuilder.java new file mode 100644 index 000000000000..66b74b10469a --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/BigtableOptionsOrBuilder.java @@ -0,0 +1,140 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/import_config.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.discoveryengine.v1alpha; + +public interface BigtableOptionsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.BigtableOptions) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The field name used for saving row key value in the document. The name has
+   * to match the pattern `[a-zA-Z0-9][a-zA-Z0-9-_]*`.
+   * 
+ * + * string key_field_name = 1; + * + * @return The keyFieldName. + */ + java.lang.String getKeyFieldName(); + /** + * + * + *
+   * The field name used for saving row key value in the document. The name has
+   * to match the pattern `[a-zA-Z0-9][a-zA-Z0-9-_]*`.
+   * 
+ * + * string key_field_name = 1; + * + * @return The bytes for keyFieldName. + */ + com.google.protobuf.ByteString getKeyFieldNameBytes(); + + /** + * + * + *
+   * The mapping from family names to an object that contains column families
+   * level information for the given column family. If a family is not present
+   * in this map it will be ignored.
+   * 
+ * + * + * map<string, .google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily> families = 2; + * + */ + int getFamiliesCount(); + /** + * + * + *
+   * The mapping from family names to an object that contains column families
+   * level information for the given column family. If a family is not present
+   * in this map it will be ignored.
+   * 
+ * + * + * map<string, .google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily> families = 2; + * + */ + boolean containsFamilies(java.lang.String key); + /** Use {@link #getFamiliesMap()} instead. */ + @java.lang.Deprecated + java.util.Map< + java.lang.String, + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily> + getFamilies(); + /** + * + * + *
+   * The mapping from family names to an object that contains column families
+   * level information for the given column family. If a family is not present
+   * in this map it will be ignored.
+   * 
+ * + * + * map<string, .google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily> families = 2; + * + */ + java.util.Map< + java.lang.String, + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily> + getFamiliesMap(); + /** + * + * + *
+   * The mapping from family names to an object that contains column families
+   * level information for the given column family. If a family is not present
+   * in this map it will be ignored.
+   * 
+ * + * + * map<string, .google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily> families = 2; + * + */ + /* nullable */ + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily + getFamiliesOrDefault( + java.lang.String key, + /* nullable */ + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily + defaultValue); + /** + * + * + *
+   * The mapping from family names to an object that contains column families
+   * level information for the given column family. If a family is not present
+   * in this map it will be ignored.
+   * 
+ * + * + * map<string, .google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily> families = 2; + * + */ + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.BigtableColumnFamily getFamiliesOrThrow( + java.lang.String key); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/BigtableSource.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/BigtableSource.java new file mode 100644 index 000000000000..16e464096bd7 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/BigtableSource.java @@ -0,0 +1,1327 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/import_config.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * The Cloud Bigtable source for importing data.
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.BigtableSource} + */ +public final class BigtableSource extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.BigtableSource) + BigtableSourceOrBuilder { + private static final long serialVersionUID = 0L; + // Use BigtableSource.newBuilder() to construct. + private BigtableSource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BigtableSource() { + projectId_ = ""; + instanceId_ = ""; + tableId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BigtableSource(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_BigtableSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_BigtableSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.BigtableSource.class, + com.google.cloud.discoveryengine.v1alpha.BigtableSource.Builder.class); + } + + private int bitField0_; + public static final int PROJECT_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object projectId_ = ""; + /** + * + * + *
+   * The project ID that the Bigtable source is in with a length limit of 128
+   * characters. If not specified, inherits the project ID from the parent
+   * request.
+   * 
+ * + * string project_id = 1; + * + * @return The projectId. + */ + @java.lang.Override + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + 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(); + projectId_ = s; + return s; + } + } + /** + * + * + *
+   * The project ID that the Bigtable source is in with a length limit of 128
+   * characters. If not specified, inherits the project ID from the parent
+   * request.
+   * 
+ * + * string project_id = 1; + * + * @return The bytes for projectId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INSTANCE_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object instanceId_ = ""; + /** + * + * + *
+   * Required. The instance ID of the Cloud Bigtable that needs to be imported.
+   * 
+ * + * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The instanceId. + */ + @java.lang.Override + public java.lang.String getInstanceId() { + java.lang.Object ref = instanceId_; + 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(); + instanceId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The instance ID of the Cloud Bigtable that needs to be imported.
+   * 
+ * + * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for instanceId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInstanceIdBytes() { + java.lang.Object ref = instanceId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TABLE_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object tableId_ = ""; + /** + * + * + *
+   * Required. The table ID of the Cloud Bigtable that needs to be imported.
+   * 
+ * + * string table_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The tableId. + */ + @java.lang.Override + public java.lang.String getTableId() { + java.lang.Object ref = tableId_; + 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(); + tableId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The table ID of the Cloud Bigtable that needs to be imported.
+   * 
+ * + * string table_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for tableId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTableIdBytes() { + java.lang.Object ref = tableId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tableId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BIGTABLE_OPTIONS_FIELD_NUMBER = 4; + private com.google.cloud.discoveryengine.v1alpha.BigtableOptions bigtableOptions_; + /** + * + * + *
+   * Required. Bigtable options that contains information needed when parsing
+   * data into typed structures. For example, column type annotations.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.BigtableOptions bigtable_options = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the bigtableOptions field is set. + */ + @java.lang.Override + public boolean hasBigtableOptions() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. Bigtable options that contains information needed when parsing
+   * data into typed structures. For example, column type annotations.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.BigtableOptions bigtable_options = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bigtableOptions. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.BigtableOptions getBigtableOptions() { + return bigtableOptions_ == null + ? com.google.cloud.discoveryengine.v1alpha.BigtableOptions.getDefaultInstance() + : bigtableOptions_; + } + /** + * + * + *
+   * Required. Bigtable options that contains information needed when parsing
+   * data into typed structures. For example, column type annotations.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.BigtableOptions bigtable_options = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.BigtableOptionsOrBuilder + getBigtableOptionsOrBuilder() { + return bigtableOptions_ == null + ? com.google.cloud.discoveryengine.v1alpha.BigtableOptions.getDefaultInstance() + : bigtableOptions_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, instanceId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tableId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, tableId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(4, getBigtableOptions()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, instanceId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tableId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, tableId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getBigtableOptions()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.BigtableSource)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.BigtableSource other = + (com.google.cloud.discoveryengine.v1alpha.BigtableSource) obj; + + if (!getProjectId().equals(other.getProjectId())) return false; + if (!getInstanceId().equals(other.getInstanceId())) return false; + if (!getTableId().equals(other.getTableId())) return false; + if (hasBigtableOptions() != other.hasBigtableOptions()) return false; + if (hasBigtableOptions()) { + if (!getBigtableOptions().equals(other.getBigtableOptions())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PROJECT_ID_FIELD_NUMBER; + hash = (53 * hash) + getProjectId().hashCode(); + hash = (37 * hash) + INSTANCE_ID_FIELD_NUMBER; + hash = (53 * hash) + getInstanceId().hashCode(); + hash = (37 * hash) + TABLE_ID_FIELD_NUMBER; + hash = (53 * hash) + getTableId().hashCode(); + if (hasBigtableOptions()) { + hash = (37 * hash) + BIGTABLE_OPTIONS_FIELD_NUMBER; + hash = (53 * hash) + getBigtableOptions().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.BigtableSource parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.BigtableSource parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.BigtableSource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.BigtableSource parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.BigtableSource parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.BigtableSource parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.BigtableSource parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.BigtableSource parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.BigtableSource parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.BigtableSource parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.BigtableSource parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.BigtableSource parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.BigtableSource prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The Cloud Bigtable source for importing data.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.BigtableSource} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.BigtableSource) + com.google.cloud.discoveryengine.v1alpha.BigtableSourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_BigtableSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_BigtableSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.BigtableSource.class, + com.google.cloud.discoveryengine.v1alpha.BigtableSource.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1alpha.BigtableSource.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getBigtableOptionsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + projectId_ = ""; + instanceId_ = ""; + tableId_ = ""; + bigtableOptions_ = null; + if (bigtableOptionsBuilder_ != null) { + bigtableOptionsBuilder_.dispose(); + bigtableOptionsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_BigtableSource_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.BigtableSource getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.BigtableSource.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.BigtableSource build() { + com.google.cloud.discoveryengine.v1alpha.BigtableSource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.BigtableSource buildPartial() { + com.google.cloud.discoveryengine.v1alpha.BigtableSource result = + new com.google.cloud.discoveryengine.v1alpha.BigtableSource(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.discoveryengine.v1alpha.BigtableSource result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.projectId_ = projectId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.instanceId_ = instanceId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.tableId_ = tableId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.bigtableOptions_ = + bigtableOptionsBuilder_ == null ? bigtableOptions_ : bigtableOptionsBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.BigtableSource) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.BigtableSource) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1alpha.BigtableSource other) { + if (other == com.google.cloud.discoveryengine.v1alpha.BigtableSource.getDefaultInstance()) + return this; + if (!other.getProjectId().isEmpty()) { + projectId_ = other.projectId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getInstanceId().isEmpty()) { + instanceId_ = other.instanceId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getTableId().isEmpty()) { + tableId_ = other.tableId_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasBigtableOptions()) { + mergeBigtableOptions(other.getBigtableOptions()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + projectId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + instanceId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + tableId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage(getBigtableOptionsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object projectId_ = ""; + /** + * + * + *
+     * The project ID that the Bigtable source is in with a length limit of 128
+     * characters. If not specified, inherits the project ID from the parent
+     * request.
+     * 
+ * + * string project_id = 1; + * + * @return The projectId. + */ + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The project ID that the Bigtable source is in with a length limit of 128
+     * characters. If not specified, inherits the project ID from the parent
+     * request.
+     * 
+ * + * string project_id = 1; + * + * @return The bytes for projectId. + */ + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The project ID that the Bigtable source is in with a length limit of 128
+     * characters. If not specified, inherits the project ID from the parent
+     * request.
+     * 
+ * + * string project_id = 1; + * + * @param value The projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + projectId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The project ID that the Bigtable source is in with a length limit of 128
+     * characters. If not specified, inherits the project ID from the parent
+     * request.
+     * 
+ * + * string project_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearProjectId() { + projectId_ = getDefaultInstance().getProjectId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The project ID that the Bigtable source is in with a length limit of 128
+     * characters. If not specified, inherits the project ID from the parent
+     * request.
+     * 
+ * + * string project_id = 1; + * + * @param value The bytes for projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + projectId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object instanceId_ = ""; + /** + * + * + *
+     * Required. The instance ID of the Cloud Bigtable that needs to be imported.
+     * 
+ * + * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The instanceId. + */ + public java.lang.String getInstanceId() { + java.lang.Object ref = instanceId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instanceId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The instance ID of the Cloud Bigtable that needs to be imported.
+     * 
+ * + * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for instanceId. + */ + public com.google.protobuf.ByteString getInstanceIdBytes() { + java.lang.Object ref = instanceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The instance ID of the Cloud Bigtable that needs to be imported.
+     * 
+ * + * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The instanceId to set. + * @return This builder for chaining. + */ + public Builder setInstanceId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + instanceId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The instance ID of the Cloud Bigtable that needs to be imported.
+     * 
+ * + * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearInstanceId() { + instanceId_ = getDefaultInstance().getInstanceId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The instance ID of the Cloud Bigtable that needs to be imported.
+     * 
+ * + * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for instanceId to set. + * @return This builder for chaining. + */ + public Builder setInstanceIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + instanceId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object tableId_ = ""; + /** + * + * + *
+     * Required. The table ID of the Cloud Bigtable that needs to be imported.
+     * 
+ * + * string table_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The tableId. + */ + public java.lang.String getTableId() { + java.lang.Object ref = tableId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tableId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The table ID of the Cloud Bigtable that needs to be imported.
+     * 
+ * + * string table_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for tableId. + */ + public com.google.protobuf.ByteString getTableIdBytes() { + java.lang.Object ref = tableId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tableId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The table ID of the Cloud Bigtable that needs to be imported.
+     * 
+ * + * string table_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The tableId to set. + * @return This builder for chaining. + */ + public Builder setTableId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + tableId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The table ID of the Cloud Bigtable that needs to be imported.
+     * 
+ * + * string table_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearTableId() { + tableId_ = getDefaultInstance().getTableId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The table ID of the Cloud Bigtable that needs to be imported.
+     * 
+ * + * string table_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for tableId to set. + * @return This builder for chaining. + */ + public Builder setTableIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + tableId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.cloud.discoveryengine.v1alpha.BigtableOptions bigtableOptions_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.BigtableOptions, + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.Builder, + com.google.cloud.discoveryengine.v1alpha.BigtableOptionsOrBuilder> + bigtableOptionsBuilder_; + /** + * + * + *
+     * Required. Bigtable options that contains information needed when parsing
+     * data into typed structures. For example, column type annotations.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.BigtableOptions bigtable_options = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the bigtableOptions field is set. + */ + public boolean hasBigtableOptions() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Required. Bigtable options that contains information needed when parsing
+     * data into typed structures. For example, column type annotations.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.BigtableOptions bigtable_options = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bigtableOptions. + */ + public com.google.cloud.discoveryengine.v1alpha.BigtableOptions getBigtableOptions() { + if (bigtableOptionsBuilder_ == null) { + return bigtableOptions_ == null + ? com.google.cloud.discoveryengine.v1alpha.BigtableOptions.getDefaultInstance() + : bigtableOptions_; + } else { + return bigtableOptionsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Bigtable options that contains information needed when parsing
+     * data into typed structures. For example, column type annotations.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.BigtableOptions bigtable_options = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setBigtableOptions( + com.google.cloud.discoveryengine.v1alpha.BigtableOptions value) { + if (bigtableOptionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + bigtableOptions_ = value; + } else { + bigtableOptionsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Bigtable options that contains information needed when parsing
+     * data into typed structures. For example, column type annotations.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.BigtableOptions bigtable_options = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setBigtableOptions( + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.Builder builderForValue) { + if (bigtableOptionsBuilder_ == null) { + bigtableOptions_ = builderForValue.build(); + } else { + bigtableOptionsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Bigtable options that contains information needed when parsing
+     * data into typed structures. For example, column type annotations.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.BigtableOptions bigtable_options = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeBigtableOptions( + com.google.cloud.discoveryengine.v1alpha.BigtableOptions value) { + if (bigtableOptionsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && bigtableOptions_ != null + && bigtableOptions_ + != com.google.cloud.discoveryengine.v1alpha.BigtableOptions.getDefaultInstance()) { + getBigtableOptionsBuilder().mergeFrom(value); + } else { + bigtableOptions_ = value; + } + } else { + bigtableOptionsBuilder_.mergeFrom(value); + } + if (bigtableOptions_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. Bigtable options that contains information needed when parsing
+     * data into typed structures. For example, column type annotations.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.BigtableOptions bigtable_options = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearBigtableOptions() { + bitField0_ = (bitField0_ & ~0x00000008); + bigtableOptions_ = null; + if (bigtableOptionsBuilder_ != null) { + bigtableOptionsBuilder_.dispose(); + bigtableOptionsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Bigtable options that contains information needed when parsing
+     * data into typed structures. For example, column type annotations.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.BigtableOptions bigtable_options = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.discoveryengine.v1alpha.BigtableOptions.Builder + getBigtableOptionsBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getBigtableOptionsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Bigtable options that contains information needed when parsing
+     * data into typed structures. For example, column type annotations.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.BigtableOptions bigtable_options = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.discoveryengine.v1alpha.BigtableOptionsOrBuilder + getBigtableOptionsOrBuilder() { + if (bigtableOptionsBuilder_ != null) { + return bigtableOptionsBuilder_.getMessageOrBuilder(); + } else { + return bigtableOptions_ == null + ? com.google.cloud.discoveryengine.v1alpha.BigtableOptions.getDefaultInstance() + : bigtableOptions_; + } + } + /** + * + * + *
+     * Required. Bigtable options that contains information needed when parsing
+     * data into typed structures. For example, column type annotations.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.BigtableOptions bigtable_options = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.BigtableOptions, + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.Builder, + com.google.cloud.discoveryengine.v1alpha.BigtableOptionsOrBuilder> + getBigtableOptionsFieldBuilder() { + if (bigtableOptionsBuilder_ == null) { + bigtableOptionsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.BigtableOptions, + com.google.cloud.discoveryengine.v1alpha.BigtableOptions.Builder, + com.google.cloud.discoveryengine.v1alpha.BigtableOptionsOrBuilder>( + getBigtableOptions(), getParentForChildren(), isClean()); + bigtableOptions_ = null; + } + return bigtableOptionsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.BigtableSource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.BigtableSource) + private static final com.google.cloud.discoveryengine.v1alpha.BigtableSource DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.BigtableSource(); + } + + public static com.google.cloud.discoveryengine.v1alpha.BigtableSource getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BigtableSource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.BigtableSource getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/BigtableSourceOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/BigtableSourceOrBuilder.java new file mode 100644 index 000000000000..66b2e96a6302 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/BigtableSourceOrBuilder.java @@ -0,0 +1,149 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/import_config.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.discoveryengine.v1alpha; + +public interface BigtableSourceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.BigtableSource) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The project ID that the Bigtable source is in with a length limit of 128
+   * characters. If not specified, inherits the project ID from the parent
+   * request.
+   * 
+ * + * string project_id = 1; + * + * @return The projectId. + */ + java.lang.String getProjectId(); + /** + * + * + *
+   * The project ID that the Bigtable source is in with a length limit of 128
+   * characters. If not specified, inherits the project ID from the parent
+   * request.
+   * 
+ * + * string project_id = 1; + * + * @return The bytes for projectId. + */ + com.google.protobuf.ByteString getProjectIdBytes(); + + /** + * + * + *
+   * Required. The instance ID of the Cloud Bigtable that needs to be imported.
+   * 
+ * + * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The instanceId. + */ + java.lang.String getInstanceId(); + /** + * + * + *
+   * Required. The instance ID of the Cloud Bigtable that needs to be imported.
+   * 
+ * + * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for instanceId. + */ + com.google.protobuf.ByteString getInstanceIdBytes(); + + /** + * + * + *
+   * Required. The table ID of the Cloud Bigtable that needs to be imported.
+   * 
+ * + * string table_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The tableId. + */ + java.lang.String getTableId(); + /** + * + * + *
+   * Required. The table ID of the Cloud Bigtable that needs to be imported.
+   * 
+ * + * string table_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for tableId. + */ + com.google.protobuf.ByteString getTableIdBytes(); + + /** + * + * + *
+   * Required. Bigtable options that contains information needed when parsing
+   * data into typed structures. For example, column type annotations.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.BigtableOptions bigtable_options = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the bigtableOptions field is set. + */ + boolean hasBigtableOptions(); + /** + * + * + *
+   * Required. Bigtable options that contains information needed when parsing
+   * data into typed structures. For example, column type annotations.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.BigtableOptions bigtable_options = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bigtableOptions. + */ + com.google.cloud.discoveryengine.v1alpha.BigtableOptions getBigtableOptions(); + /** + * + * + *
+   * Required. Bigtable options that contains information needed when parsing
+   * data into typed structures. For example, column type annotations.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.BigtableOptions bigtable_options = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.discoveryengine.v1alpha.BigtableOptionsOrBuilder getBigtableOptionsOrBuilder(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/Chunk.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/Chunk.java index c53556bdabda..a66bedc177ae 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/Chunk.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/Chunk.java @@ -926,6 +926,2429 @@ public com.google.protobuf.Parser getParserForType() { } } + public interface PageSpanOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.Chunk.PageSpan) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The start page of the chunk.
+     * 
+ * + * int32 page_start = 1; + * + * @return The pageStart. + */ + int getPageStart(); + + /** + * + * + *
+     * The end page of the chunk.
+     * 
+ * + * int32 page_end = 2; + * + * @return The pageEnd. + */ + int getPageEnd(); + } + /** + * + * + *
+   * Page span of the chunk.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.Chunk.PageSpan} + */ + public static final class PageSpan extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.Chunk.PageSpan) + PageSpanOrBuilder { + private static final long serialVersionUID = 0L; + // Use PageSpan.newBuilder() to construct. + private PageSpan(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PageSpan() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PageSpan(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.ChunkProto + .internal_static_google_cloud_discoveryengine_v1alpha_Chunk_PageSpan_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.ChunkProto + .internal_static_google_cloud_discoveryengine_v1alpha_Chunk_PageSpan_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.Chunk.PageSpan.class, + com.google.cloud.discoveryengine.v1alpha.Chunk.PageSpan.Builder.class); + } + + public static final int PAGE_START_FIELD_NUMBER = 1; + private int pageStart_ = 0; + /** + * + * + *
+     * The start page of the chunk.
+     * 
+ * + * int32 page_start = 1; + * + * @return The pageStart. + */ + @java.lang.Override + public int getPageStart() { + return pageStart_; + } + + public static final int PAGE_END_FIELD_NUMBER = 2; + private int pageEnd_ = 0; + /** + * + * + *
+     * The end page of the chunk.
+     * 
+ * + * int32 page_end = 2; + * + * @return The pageEnd. + */ + @java.lang.Override + public int getPageEnd() { + return pageEnd_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (pageStart_ != 0) { + output.writeInt32(1, pageStart_); + } + if (pageEnd_ != 0) { + output.writeInt32(2, pageEnd_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (pageStart_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, pageStart_); + } + if (pageEnd_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageEnd_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.Chunk.PageSpan)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.Chunk.PageSpan other = + (com.google.cloud.discoveryengine.v1alpha.Chunk.PageSpan) obj; + + if (getPageStart() != other.getPageStart()) return false; + if (getPageEnd() != other.getPageEnd()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PAGE_START_FIELD_NUMBER; + hash = (53 * hash) + getPageStart(); + hash = (37 * hash) + PAGE_END_FIELD_NUMBER; + hash = (53 * hash) + getPageEnd(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.Chunk.PageSpan parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.Chunk.PageSpan parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.Chunk.PageSpan parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.Chunk.PageSpan parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.Chunk.PageSpan parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.Chunk.PageSpan parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.Chunk.PageSpan parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.Chunk.PageSpan parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.Chunk.PageSpan parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.Chunk.PageSpan parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.Chunk.PageSpan parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.Chunk.PageSpan parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.Chunk.PageSpan prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Page span of the chunk.
+     * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.Chunk.PageSpan} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.Chunk.PageSpan) + com.google.cloud.discoveryengine.v1alpha.Chunk.PageSpanOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.ChunkProto + .internal_static_google_cloud_discoveryengine_v1alpha_Chunk_PageSpan_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.ChunkProto + .internal_static_google_cloud_discoveryengine_v1alpha_Chunk_PageSpan_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.Chunk.PageSpan.class, + com.google.cloud.discoveryengine.v1alpha.Chunk.PageSpan.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1alpha.Chunk.PageSpan.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + pageStart_ = 0; + pageEnd_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.ChunkProto + .internal_static_google_cloud_discoveryengine_v1alpha_Chunk_PageSpan_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.Chunk.PageSpan getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.Chunk.PageSpan.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.Chunk.PageSpan build() { + com.google.cloud.discoveryengine.v1alpha.Chunk.PageSpan result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.Chunk.PageSpan buildPartial() { + com.google.cloud.discoveryengine.v1alpha.Chunk.PageSpan result = + new com.google.cloud.discoveryengine.v1alpha.Chunk.PageSpan(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.discoveryengine.v1alpha.Chunk.PageSpan result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.pageStart_ = pageStart_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageEnd_ = pageEnd_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.Chunk.PageSpan) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.Chunk.PageSpan) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1alpha.Chunk.PageSpan other) { + if (other == com.google.cloud.discoveryengine.v1alpha.Chunk.PageSpan.getDefaultInstance()) + return this; + if (other.getPageStart() != 0) { + setPageStart(other.getPageStart()); + } + if (other.getPageEnd() != 0) { + setPageEnd(other.getPageEnd()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + pageStart_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + pageEnd_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int pageStart_; + /** + * + * + *
+       * The start page of the chunk.
+       * 
+ * + * int32 page_start = 1; + * + * @return The pageStart. + */ + @java.lang.Override + public int getPageStart() { + return pageStart_; + } + /** + * + * + *
+       * The start page of the chunk.
+       * 
+ * + * int32 page_start = 1; + * + * @param value The pageStart to set. + * @return This builder for chaining. + */ + public Builder setPageStart(int value) { + + pageStart_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The start page of the chunk.
+       * 
+ * + * int32 page_start = 1; + * + * @return This builder for chaining. + */ + public Builder clearPageStart() { + bitField0_ = (bitField0_ & ~0x00000001); + pageStart_ = 0; + onChanged(); + return this; + } + + private int pageEnd_; + /** + * + * + *
+       * The end page of the chunk.
+       * 
+ * + * int32 page_end = 2; + * + * @return The pageEnd. + */ + @java.lang.Override + public int getPageEnd() { + return pageEnd_; + } + /** + * + * + *
+       * The end page of the chunk.
+       * 
+ * + * int32 page_end = 2; + * + * @param value The pageEnd to set. + * @return This builder for chaining. + */ + public Builder setPageEnd(int value) { + + pageEnd_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * The end page of the chunk.
+       * 
+ * + * int32 page_end = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageEnd() { + bitField0_ = (bitField0_ & ~0x00000002); + pageEnd_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.Chunk.PageSpan) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.Chunk.PageSpan) + private static final com.google.cloud.discoveryengine.v1alpha.Chunk.PageSpan DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.Chunk.PageSpan(); + } + + public static com.google.cloud.discoveryengine.v1alpha.Chunk.PageSpan getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PageSpan parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.Chunk.PageSpan getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ChunkMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The previous chunks of the current chunk. The number is controlled by
+     * [SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks].
+     * This field is only populated on
+     * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+     * API.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Chunk previous_chunks = 1; + */ + java.util.List getPreviousChunksList(); + /** + * + * + *
+     * The previous chunks of the current chunk. The number is controlled by
+     * [SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks].
+     * This field is only populated on
+     * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+     * API.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Chunk previous_chunks = 1; + */ + com.google.cloud.discoveryengine.v1alpha.Chunk getPreviousChunks(int index); + /** + * + * + *
+     * The previous chunks of the current chunk. The number is controlled by
+     * [SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks].
+     * This field is only populated on
+     * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+     * API.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Chunk previous_chunks = 1; + */ + int getPreviousChunksCount(); + /** + * + * + *
+     * The previous chunks of the current chunk. The number is controlled by
+     * [SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks].
+     * This field is only populated on
+     * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+     * API.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Chunk previous_chunks = 1; + */ + java.util.List + getPreviousChunksOrBuilderList(); + /** + * + * + *
+     * The previous chunks of the current chunk. The number is controlled by
+     * [SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks].
+     * This field is only populated on
+     * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+     * API.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Chunk previous_chunks = 1; + */ + com.google.cloud.discoveryengine.v1alpha.ChunkOrBuilder getPreviousChunksOrBuilder(int index); + + /** + * + * + *
+     * The next chunks of the current chunk. The number is controlled by
+     * [SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks].
+     * This field is only populated on
+     * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+     * API.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Chunk next_chunks = 2; + */ + java.util.List getNextChunksList(); + /** + * + * + *
+     * The next chunks of the current chunk. The number is controlled by
+     * [SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks].
+     * This field is only populated on
+     * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+     * API.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Chunk next_chunks = 2; + */ + com.google.cloud.discoveryengine.v1alpha.Chunk getNextChunks(int index); + /** + * + * + *
+     * The next chunks of the current chunk. The number is controlled by
+     * [SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks].
+     * This field is only populated on
+     * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+     * API.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Chunk next_chunks = 2; + */ + int getNextChunksCount(); + /** + * + * + *
+     * The next chunks of the current chunk. The number is controlled by
+     * [SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks].
+     * This field is only populated on
+     * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+     * API.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Chunk next_chunks = 2; + */ + java.util.List + getNextChunksOrBuilderList(); + /** + * + * + *
+     * The next chunks of the current chunk. The number is controlled by
+     * [SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks].
+     * This field is only populated on
+     * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+     * API.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Chunk next_chunks = 2; + */ + com.google.cloud.discoveryengine.v1alpha.ChunkOrBuilder getNextChunksOrBuilder(int index); + } + /** + * + * + *
+   * Metadata of the current chunk. This field is only populated on
+   * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+   * API.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata} + */ + public static final class ChunkMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata) + ChunkMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use ChunkMetadata.newBuilder() to construct. + private ChunkMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ChunkMetadata() { + previousChunks_ = java.util.Collections.emptyList(); + nextChunks_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ChunkMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.ChunkProto + .internal_static_google_cloud_discoveryengine_v1alpha_Chunk_ChunkMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.ChunkProto + .internal_static_google_cloud_discoveryengine_v1alpha_Chunk_ChunkMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata.class, + com.google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata.Builder.class); + } + + public static final int PREVIOUS_CHUNKS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List previousChunks_; + /** + * + * + *
+     * The previous chunks of the current chunk. The number is controlled by
+     * [SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks].
+     * This field is only populated on
+     * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+     * API.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Chunk previous_chunks = 1; + */ + @java.lang.Override + public java.util.List getPreviousChunksList() { + return previousChunks_; + } + /** + * + * + *
+     * The previous chunks of the current chunk. The number is controlled by
+     * [SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks].
+     * This field is only populated on
+     * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+     * API.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Chunk previous_chunks = 1; + */ + @java.lang.Override + public java.util.List + getPreviousChunksOrBuilderList() { + return previousChunks_; + } + /** + * + * + *
+     * The previous chunks of the current chunk. The number is controlled by
+     * [SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks].
+     * This field is only populated on
+     * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+     * API.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Chunk previous_chunks = 1; + */ + @java.lang.Override + public int getPreviousChunksCount() { + return previousChunks_.size(); + } + /** + * + * + *
+     * The previous chunks of the current chunk. The number is controlled by
+     * [SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks].
+     * This field is only populated on
+     * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+     * API.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Chunk previous_chunks = 1; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.Chunk getPreviousChunks(int index) { + return previousChunks_.get(index); + } + /** + * + * + *
+     * The previous chunks of the current chunk. The number is controlled by
+     * [SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks].
+     * This field is only populated on
+     * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+     * API.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Chunk previous_chunks = 1; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ChunkOrBuilder getPreviousChunksOrBuilder( + int index) { + return previousChunks_.get(index); + } + + public static final int NEXT_CHUNKS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List nextChunks_; + /** + * + * + *
+     * The next chunks of the current chunk. The number is controlled by
+     * [SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks].
+     * This field is only populated on
+     * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+     * API.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Chunk next_chunks = 2; + */ + @java.lang.Override + public java.util.List getNextChunksList() { + return nextChunks_; + } + /** + * + * + *
+     * The next chunks of the current chunk. The number is controlled by
+     * [SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks].
+     * This field is only populated on
+     * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+     * API.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Chunk next_chunks = 2; + */ + @java.lang.Override + public java.util.List + getNextChunksOrBuilderList() { + return nextChunks_; + } + /** + * + * + *
+     * The next chunks of the current chunk. The number is controlled by
+     * [SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks].
+     * This field is only populated on
+     * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+     * API.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Chunk next_chunks = 2; + */ + @java.lang.Override + public int getNextChunksCount() { + return nextChunks_.size(); + } + /** + * + * + *
+     * The next chunks of the current chunk. The number is controlled by
+     * [SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks].
+     * This field is only populated on
+     * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+     * API.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Chunk next_chunks = 2; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.Chunk getNextChunks(int index) { + return nextChunks_.get(index); + } + /** + * + * + *
+     * The next chunks of the current chunk. The number is controlled by
+     * [SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks].
+     * This field is only populated on
+     * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+     * API.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Chunk next_chunks = 2; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ChunkOrBuilder getNextChunksOrBuilder( + int index) { + return nextChunks_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < previousChunks_.size(); i++) { + output.writeMessage(1, previousChunks_.get(i)); + } + for (int i = 0; i < nextChunks_.size(); i++) { + output.writeMessage(2, nextChunks_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < previousChunks_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, previousChunks_.get(i)); + } + for (int i = 0; i < nextChunks_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, nextChunks_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata other = + (com.google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata) obj; + + if (!getPreviousChunksList().equals(other.getPreviousChunksList())) return false; + if (!getNextChunksList().equals(other.getNextChunksList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getPreviousChunksCount() > 0) { + hash = (37 * hash) + PREVIOUS_CHUNKS_FIELD_NUMBER; + hash = (53 * hash) + getPreviousChunksList().hashCode(); + } + if (getNextChunksCount() > 0) { + hash = (37 * hash) + NEXT_CHUNKS_FIELD_NUMBER; + hash = (53 * hash) + getNextChunksList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Metadata of the current chunk. This field is only populated on
+     * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+     * API.
+     * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata) + com.google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.ChunkProto + .internal_static_google_cloud_discoveryengine_v1alpha_Chunk_ChunkMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.ChunkProto + .internal_static_google_cloud_discoveryengine_v1alpha_Chunk_ChunkMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata.class, + com.google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (previousChunksBuilder_ == null) { + previousChunks_ = java.util.Collections.emptyList(); + } else { + previousChunks_ = null; + previousChunksBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + if (nextChunksBuilder_ == null) { + nextChunks_ = java.util.Collections.emptyList(); + } else { + nextChunks_ = null; + nextChunksBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.ChunkProto + .internal_static_google_cloud_discoveryengine_v1alpha_Chunk_ChunkMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata build() { + com.google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata buildPartial() { + com.google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata result = + new com.google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata result) { + if (previousChunksBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + previousChunks_ = java.util.Collections.unmodifiableList(previousChunks_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.previousChunks_ = previousChunks_; + } else { + result.previousChunks_ = previousChunksBuilder_.build(); + } + if (nextChunksBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + nextChunks_ = java.util.Collections.unmodifiableList(nextChunks_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.nextChunks_ = nextChunks_; + } else { + result.nextChunks_ = nextChunksBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata.getDefaultInstance()) + return this; + if (previousChunksBuilder_ == null) { + if (!other.previousChunks_.isEmpty()) { + if (previousChunks_.isEmpty()) { + previousChunks_ = other.previousChunks_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePreviousChunksIsMutable(); + previousChunks_.addAll(other.previousChunks_); + } + onChanged(); + } + } else { + if (!other.previousChunks_.isEmpty()) { + if (previousChunksBuilder_.isEmpty()) { + previousChunksBuilder_.dispose(); + previousChunksBuilder_ = null; + previousChunks_ = other.previousChunks_; + bitField0_ = (bitField0_ & ~0x00000001); + previousChunksBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPreviousChunksFieldBuilder() + : null; + } else { + previousChunksBuilder_.addAllMessages(other.previousChunks_); + } + } + } + if (nextChunksBuilder_ == null) { + if (!other.nextChunks_.isEmpty()) { + if (nextChunks_.isEmpty()) { + nextChunks_ = other.nextChunks_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureNextChunksIsMutable(); + nextChunks_.addAll(other.nextChunks_); + } + onChanged(); + } + } else { + if (!other.nextChunks_.isEmpty()) { + if (nextChunksBuilder_.isEmpty()) { + nextChunksBuilder_.dispose(); + nextChunksBuilder_ = null; + nextChunks_ = other.nextChunks_; + bitField0_ = (bitField0_ & ~0x00000002); + nextChunksBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getNextChunksFieldBuilder() + : null; + } else { + nextChunksBuilder_.addAllMessages(other.nextChunks_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.discoveryengine.v1alpha.Chunk m = + input.readMessage( + com.google.cloud.discoveryengine.v1alpha.Chunk.parser(), + extensionRegistry); + if (previousChunksBuilder_ == null) { + ensurePreviousChunksIsMutable(); + previousChunks_.add(m); + } else { + previousChunksBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + com.google.cloud.discoveryengine.v1alpha.Chunk m = + input.readMessage( + com.google.cloud.discoveryengine.v1alpha.Chunk.parser(), + extensionRegistry); + if (nextChunksBuilder_ == null) { + ensureNextChunksIsMutable(); + nextChunks_.add(m); + } else { + nextChunksBuilder_.addMessage(m); + } + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List previousChunks_ = + java.util.Collections.emptyList(); + + private void ensurePreviousChunksIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + previousChunks_ = + new java.util.ArrayList( + previousChunks_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.Chunk, + com.google.cloud.discoveryengine.v1alpha.Chunk.Builder, + com.google.cloud.discoveryengine.v1alpha.ChunkOrBuilder> + previousChunksBuilder_; + + /** + * + * + *
+       * The previous chunks of the current chunk. The number is controlled by
+       * [SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks].
+       * This field is only populated on
+       * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+       * API.
+       * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Chunk previous_chunks = 1; + */ + public java.util.List + getPreviousChunksList() { + if (previousChunksBuilder_ == null) { + return java.util.Collections.unmodifiableList(previousChunks_); + } else { + return previousChunksBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * The previous chunks of the current chunk. The number is controlled by
+       * [SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks].
+       * This field is only populated on
+       * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+       * API.
+       * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Chunk previous_chunks = 1; + */ + public int getPreviousChunksCount() { + if (previousChunksBuilder_ == null) { + return previousChunks_.size(); + } else { + return previousChunksBuilder_.getCount(); + } + } + /** + * + * + *
+       * The previous chunks of the current chunk. The number is controlled by
+       * [SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks].
+       * This field is only populated on
+       * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+       * API.
+       * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Chunk previous_chunks = 1; + */ + public com.google.cloud.discoveryengine.v1alpha.Chunk getPreviousChunks(int index) { + if (previousChunksBuilder_ == null) { + return previousChunks_.get(index); + } else { + return previousChunksBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * The previous chunks of the current chunk. The number is controlled by
+       * [SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks].
+       * This field is only populated on
+       * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+       * API.
+       * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Chunk previous_chunks = 1; + */ + public Builder setPreviousChunks( + int index, com.google.cloud.discoveryengine.v1alpha.Chunk value) { + if (previousChunksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePreviousChunksIsMutable(); + previousChunks_.set(index, value); + onChanged(); + } else { + previousChunksBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * The previous chunks of the current chunk. The number is controlled by
+       * [SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks].
+       * This field is only populated on
+       * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+       * API.
+       * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Chunk previous_chunks = 1; + */ + public Builder setPreviousChunks( + int index, com.google.cloud.discoveryengine.v1alpha.Chunk.Builder builderForValue) { + if (previousChunksBuilder_ == null) { + ensurePreviousChunksIsMutable(); + previousChunks_.set(index, builderForValue.build()); + onChanged(); + } else { + previousChunksBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * The previous chunks of the current chunk. The number is controlled by
+       * [SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks].
+       * This field is only populated on
+       * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+       * API.
+       * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Chunk previous_chunks = 1; + */ + public Builder addPreviousChunks(com.google.cloud.discoveryengine.v1alpha.Chunk value) { + if (previousChunksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePreviousChunksIsMutable(); + previousChunks_.add(value); + onChanged(); + } else { + previousChunksBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * The previous chunks of the current chunk. The number is controlled by
+       * [SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks].
+       * This field is only populated on
+       * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+       * API.
+       * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Chunk previous_chunks = 1; + */ + public Builder addPreviousChunks( + int index, com.google.cloud.discoveryengine.v1alpha.Chunk value) { + if (previousChunksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePreviousChunksIsMutable(); + previousChunks_.add(index, value); + onChanged(); + } else { + previousChunksBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * The previous chunks of the current chunk. The number is controlled by
+       * [SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks].
+       * This field is only populated on
+       * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+       * API.
+       * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Chunk previous_chunks = 1; + */ + public Builder addPreviousChunks( + com.google.cloud.discoveryengine.v1alpha.Chunk.Builder builderForValue) { + if (previousChunksBuilder_ == null) { + ensurePreviousChunksIsMutable(); + previousChunks_.add(builderForValue.build()); + onChanged(); + } else { + previousChunksBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * The previous chunks of the current chunk. The number is controlled by
+       * [SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks].
+       * This field is only populated on
+       * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+       * API.
+       * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Chunk previous_chunks = 1; + */ + public Builder addPreviousChunks( + int index, com.google.cloud.discoveryengine.v1alpha.Chunk.Builder builderForValue) { + if (previousChunksBuilder_ == null) { + ensurePreviousChunksIsMutable(); + previousChunks_.add(index, builderForValue.build()); + onChanged(); + } else { + previousChunksBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * The previous chunks of the current chunk. The number is controlled by
+       * [SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks].
+       * This field is only populated on
+       * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+       * API.
+       * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Chunk previous_chunks = 1; + */ + public Builder addAllPreviousChunks( + java.lang.Iterable values) { + if (previousChunksBuilder_ == null) { + ensurePreviousChunksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, previousChunks_); + onChanged(); + } else { + previousChunksBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * The previous chunks of the current chunk. The number is controlled by
+       * [SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks].
+       * This field is only populated on
+       * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+       * API.
+       * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Chunk previous_chunks = 1; + */ + public Builder clearPreviousChunks() { + if (previousChunksBuilder_ == null) { + previousChunks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + previousChunksBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * The previous chunks of the current chunk. The number is controlled by
+       * [SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks].
+       * This field is only populated on
+       * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+       * API.
+       * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Chunk previous_chunks = 1; + */ + public Builder removePreviousChunks(int index) { + if (previousChunksBuilder_ == null) { + ensurePreviousChunksIsMutable(); + previousChunks_.remove(index); + onChanged(); + } else { + previousChunksBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * The previous chunks of the current chunk. The number is controlled by
+       * [SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks].
+       * This field is only populated on
+       * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+       * API.
+       * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Chunk previous_chunks = 1; + */ + public com.google.cloud.discoveryengine.v1alpha.Chunk.Builder getPreviousChunksBuilder( + int index) { + return getPreviousChunksFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * The previous chunks of the current chunk. The number is controlled by
+       * [SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks].
+       * This field is only populated on
+       * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+       * API.
+       * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Chunk previous_chunks = 1; + */ + public com.google.cloud.discoveryengine.v1alpha.ChunkOrBuilder getPreviousChunksOrBuilder( + int index) { + if (previousChunksBuilder_ == null) { + return previousChunks_.get(index); + } else { + return previousChunksBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * The previous chunks of the current chunk. The number is controlled by
+       * [SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks].
+       * This field is only populated on
+       * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+       * API.
+       * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Chunk previous_chunks = 1; + */ + public java.util.List + getPreviousChunksOrBuilderList() { + if (previousChunksBuilder_ != null) { + return previousChunksBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(previousChunks_); + } + } + /** + * + * + *
+       * The previous chunks of the current chunk. The number is controlled by
+       * [SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks].
+       * This field is only populated on
+       * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+       * API.
+       * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Chunk previous_chunks = 1; + */ + public com.google.cloud.discoveryengine.v1alpha.Chunk.Builder addPreviousChunksBuilder() { + return getPreviousChunksFieldBuilder() + .addBuilder(com.google.cloud.discoveryengine.v1alpha.Chunk.getDefaultInstance()); + } + /** + * + * + *
+       * The previous chunks of the current chunk. The number is controlled by
+       * [SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks].
+       * This field is only populated on
+       * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+       * API.
+       * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Chunk previous_chunks = 1; + */ + public com.google.cloud.discoveryengine.v1alpha.Chunk.Builder addPreviousChunksBuilder( + int index) { + return getPreviousChunksFieldBuilder() + .addBuilder(index, com.google.cloud.discoveryengine.v1alpha.Chunk.getDefaultInstance()); + } + /** + * + * + *
+       * The previous chunks of the current chunk. The number is controlled by
+       * [SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks].
+       * This field is only populated on
+       * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+       * API.
+       * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Chunk previous_chunks = 1; + */ + public java.util.List + getPreviousChunksBuilderList() { + return getPreviousChunksFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.Chunk, + com.google.cloud.discoveryengine.v1alpha.Chunk.Builder, + com.google.cloud.discoveryengine.v1alpha.ChunkOrBuilder> + getPreviousChunksFieldBuilder() { + if (previousChunksBuilder_ == null) { + previousChunksBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.Chunk, + com.google.cloud.discoveryengine.v1alpha.Chunk.Builder, + com.google.cloud.discoveryengine.v1alpha.ChunkOrBuilder>( + previousChunks_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + previousChunks_ = null; + } + return previousChunksBuilder_; + } + + private java.util.List nextChunks_ = + java.util.Collections.emptyList(); + + private void ensureNextChunksIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + nextChunks_ = + new java.util.ArrayList(nextChunks_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.Chunk, + com.google.cloud.discoveryengine.v1alpha.Chunk.Builder, + com.google.cloud.discoveryengine.v1alpha.ChunkOrBuilder> + nextChunksBuilder_; + + /** + * + * + *
+       * The next chunks of the current chunk. The number is controlled by
+       * [SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks].
+       * This field is only populated on
+       * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+       * API.
+       * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Chunk next_chunks = 2; + */ + public java.util.List getNextChunksList() { + if (nextChunksBuilder_ == null) { + return java.util.Collections.unmodifiableList(nextChunks_); + } else { + return nextChunksBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * The next chunks of the current chunk. The number is controlled by
+       * [SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks].
+       * This field is only populated on
+       * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+       * API.
+       * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Chunk next_chunks = 2; + */ + public int getNextChunksCount() { + if (nextChunksBuilder_ == null) { + return nextChunks_.size(); + } else { + return nextChunksBuilder_.getCount(); + } + } + /** + * + * + *
+       * The next chunks of the current chunk. The number is controlled by
+       * [SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks].
+       * This field is only populated on
+       * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+       * API.
+       * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Chunk next_chunks = 2; + */ + public com.google.cloud.discoveryengine.v1alpha.Chunk getNextChunks(int index) { + if (nextChunksBuilder_ == null) { + return nextChunks_.get(index); + } else { + return nextChunksBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * The next chunks of the current chunk. The number is controlled by
+       * [SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks].
+       * This field is only populated on
+       * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+       * API.
+       * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Chunk next_chunks = 2; + */ + public Builder setNextChunks( + int index, com.google.cloud.discoveryengine.v1alpha.Chunk value) { + if (nextChunksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNextChunksIsMutable(); + nextChunks_.set(index, value); + onChanged(); + } else { + nextChunksBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * The next chunks of the current chunk. The number is controlled by
+       * [SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks].
+       * This field is only populated on
+       * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+       * API.
+       * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Chunk next_chunks = 2; + */ + public Builder setNextChunks( + int index, com.google.cloud.discoveryengine.v1alpha.Chunk.Builder builderForValue) { + if (nextChunksBuilder_ == null) { + ensureNextChunksIsMutable(); + nextChunks_.set(index, builderForValue.build()); + onChanged(); + } else { + nextChunksBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * The next chunks of the current chunk. The number is controlled by
+       * [SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks].
+       * This field is only populated on
+       * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+       * API.
+       * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Chunk next_chunks = 2; + */ + public Builder addNextChunks(com.google.cloud.discoveryengine.v1alpha.Chunk value) { + if (nextChunksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNextChunksIsMutable(); + nextChunks_.add(value); + onChanged(); + } else { + nextChunksBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * The next chunks of the current chunk. The number is controlled by
+       * [SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks].
+       * This field is only populated on
+       * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+       * API.
+       * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Chunk next_chunks = 2; + */ + public Builder addNextChunks( + int index, com.google.cloud.discoveryengine.v1alpha.Chunk value) { + if (nextChunksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNextChunksIsMutable(); + nextChunks_.add(index, value); + onChanged(); + } else { + nextChunksBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * The next chunks of the current chunk. The number is controlled by
+       * [SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks].
+       * This field is only populated on
+       * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+       * API.
+       * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Chunk next_chunks = 2; + */ + public Builder addNextChunks( + com.google.cloud.discoveryengine.v1alpha.Chunk.Builder builderForValue) { + if (nextChunksBuilder_ == null) { + ensureNextChunksIsMutable(); + nextChunks_.add(builderForValue.build()); + onChanged(); + } else { + nextChunksBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * The next chunks of the current chunk. The number is controlled by
+       * [SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks].
+       * This field is only populated on
+       * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+       * API.
+       * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Chunk next_chunks = 2; + */ + public Builder addNextChunks( + int index, com.google.cloud.discoveryengine.v1alpha.Chunk.Builder builderForValue) { + if (nextChunksBuilder_ == null) { + ensureNextChunksIsMutable(); + nextChunks_.add(index, builderForValue.build()); + onChanged(); + } else { + nextChunksBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * The next chunks of the current chunk. The number is controlled by
+       * [SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks].
+       * This field is only populated on
+       * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+       * API.
+       * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Chunk next_chunks = 2; + */ + public Builder addAllNextChunks( + java.lang.Iterable values) { + if (nextChunksBuilder_ == null) { + ensureNextChunksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, nextChunks_); + onChanged(); + } else { + nextChunksBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * The next chunks of the current chunk. The number is controlled by
+       * [SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks].
+       * This field is only populated on
+       * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+       * API.
+       * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Chunk next_chunks = 2; + */ + public Builder clearNextChunks() { + if (nextChunksBuilder_ == null) { + nextChunks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + nextChunksBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * The next chunks of the current chunk. The number is controlled by
+       * [SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks].
+       * This field is only populated on
+       * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+       * API.
+       * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Chunk next_chunks = 2; + */ + public Builder removeNextChunks(int index) { + if (nextChunksBuilder_ == null) { + ensureNextChunksIsMutable(); + nextChunks_.remove(index); + onChanged(); + } else { + nextChunksBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * The next chunks of the current chunk. The number is controlled by
+       * [SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks].
+       * This field is only populated on
+       * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+       * API.
+       * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Chunk next_chunks = 2; + */ + public com.google.cloud.discoveryengine.v1alpha.Chunk.Builder getNextChunksBuilder( + int index) { + return getNextChunksFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * The next chunks of the current chunk. The number is controlled by
+       * [SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks].
+       * This field is only populated on
+       * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+       * API.
+       * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Chunk next_chunks = 2; + */ + public com.google.cloud.discoveryengine.v1alpha.ChunkOrBuilder getNextChunksOrBuilder( + int index) { + if (nextChunksBuilder_ == null) { + return nextChunks_.get(index); + } else { + return nextChunksBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * The next chunks of the current chunk. The number is controlled by
+       * [SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks].
+       * This field is only populated on
+       * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+       * API.
+       * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Chunk next_chunks = 2; + */ + public java.util.List + getNextChunksOrBuilderList() { + if (nextChunksBuilder_ != null) { + return nextChunksBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(nextChunks_); + } + } + /** + * + * + *
+       * The next chunks of the current chunk. The number is controlled by
+       * [SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks].
+       * This field is only populated on
+       * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+       * API.
+       * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Chunk next_chunks = 2; + */ + public com.google.cloud.discoveryengine.v1alpha.Chunk.Builder addNextChunksBuilder() { + return getNextChunksFieldBuilder() + .addBuilder(com.google.cloud.discoveryengine.v1alpha.Chunk.getDefaultInstance()); + } + /** + * + * + *
+       * The next chunks of the current chunk. The number is controlled by
+       * [SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks].
+       * This field is only populated on
+       * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+       * API.
+       * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Chunk next_chunks = 2; + */ + public com.google.cloud.discoveryengine.v1alpha.Chunk.Builder addNextChunksBuilder( + int index) { + return getNextChunksFieldBuilder() + .addBuilder(index, com.google.cloud.discoveryengine.v1alpha.Chunk.getDefaultInstance()); + } + /** + * + * + *
+       * The next chunks of the current chunk. The number is controlled by
+       * [SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks].
+       * This field is only populated on
+       * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+       * API.
+       * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Chunk next_chunks = 2; + */ + public java.util.List + getNextChunksBuilderList() { + return getNextChunksFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.Chunk, + com.google.cloud.discoveryengine.v1alpha.Chunk.Builder, + com.google.cloud.discoveryengine.v1alpha.ChunkOrBuilder> + getNextChunksFieldBuilder() { + if (nextChunksBuilder_ == null) { + nextChunksBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.Chunk, + com.google.cloud.discoveryengine.v1alpha.Chunk.Builder, + com.google.cloud.discoveryengine.v1alpha.ChunkOrBuilder>( + nextChunks_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + nextChunks_ = null; + } + return nextChunksBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata) + private static final com.google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata(); + } + + public static com.google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ChunkMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + private int bitField0_; public static final int NAME_FIELD_NUMBER = 1; @@ -996,7 +3419,7 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-   * Unique chunk id of the current chunk.
+   * Unique chunk ID of the current chunk.
    * 
* * string id = 2; @@ -1019,7 +3442,7 @@ public java.lang.String getId() { * * *
-   * Unique chunk id of the current chunk.
+   * Unique chunk ID of the current chunk.
    * 
* * string id = 2; @@ -1188,19 +3611,126 @@ public com.google.protobuf.Struct getDerivedStructData() { * * *
-   * Output only. This field is OUTPUT_ONLY.
-   * It contains derived data that are not in the original input document.
+   * Output only. This field is OUTPUT_ONLY.
+   * It contains derived data that are not in the original input document.
+   * 
+ * + * + * .google.protobuf.Struct derived_struct_data = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getDerivedStructDataOrBuilder() { + return derivedStructData_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : derivedStructData_; + } + + public static final int PAGE_SPAN_FIELD_NUMBER = 6; + private com.google.cloud.discoveryengine.v1alpha.Chunk.PageSpan pageSpan_; + /** + * + * + *
+   * Page span of the chunk.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.Chunk.PageSpan page_span = 6; + * + * @return Whether the pageSpan field is set. + */ + @java.lang.Override + public boolean hasPageSpan() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+   * Page span of the chunk.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.Chunk.PageSpan page_span = 6; + * + * @return The pageSpan. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.Chunk.PageSpan getPageSpan() { + return pageSpan_ == null + ? com.google.cloud.discoveryengine.v1alpha.Chunk.PageSpan.getDefaultInstance() + : pageSpan_; + } + /** + * + * + *
+   * Page span of the chunk.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.Chunk.PageSpan page_span = 6; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.Chunk.PageSpanOrBuilder getPageSpanOrBuilder() { + return pageSpan_ == null + ? com.google.cloud.discoveryengine.v1alpha.Chunk.PageSpan.getDefaultInstance() + : pageSpan_; + } + + public static final int CHUNK_METADATA_FIELD_NUMBER = 7; + private com.google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata chunkMetadata_; + /** + * + * + *
+   * Output only. Metadata of the current chunk.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata chunk_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the chunkMetadata field is set. + */ + @java.lang.Override + public boolean hasChunkMetadata() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+   * Output only. Metadata of the current chunk.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata chunk_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The chunkMetadata. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata getChunkMetadata() { + return chunkMetadata_ == null + ? com.google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata.getDefaultInstance() + : chunkMetadata_; + } + /** + * + * + *
+   * Output only. Metadata of the current chunk.
    * 
* * - * .google.protobuf.Struct derived_struct_data = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata chunk_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ @java.lang.Override - public com.google.protobuf.StructOrBuilder getDerivedStructDataOrBuilder() { - return derivedStructData_ == null - ? com.google.protobuf.Struct.getDefaultInstance() - : derivedStructData_; + public com.google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadataOrBuilder + getChunkMetadataOrBuilder() { + return chunkMetadata_ == null + ? com.google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata.getDefaultInstance() + : chunkMetadata_; } private byte memoizedIsInitialized = -1; @@ -1232,6 +3762,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(5, getDocumentMetadata()); } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(6, getPageSpan()); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(7, getChunkMetadata()); + } getUnknownFields().writeTo(output); } @@ -1256,6 +3792,12 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getDocumentMetadata()); } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getPageSpan()); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getChunkMetadata()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -1283,6 +3825,14 @@ public boolean equals(final java.lang.Object obj) { if (hasDerivedStructData()) { if (!getDerivedStructData().equals(other.getDerivedStructData())) return false; } + if (hasPageSpan() != other.hasPageSpan()) return false; + if (hasPageSpan()) { + if (!getPageSpan().equals(other.getPageSpan())) return false; + } + if (hasChunkMetadata() != other.hasChunkMetadata()) return false; + if (hasChunkMetadata()) { + if (!getChunkMetadata().equals(other.getChunkMetadata())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1308,6 +3858,14 @@ public int hashCode() { hash = (37 * hash) + DERIVED_STRUCT_DATA_FIELD_NUMBER; hash = (53 * hash) + getDerivedStructData().hashCode(); } + if (hasPageSpan()) { + hash = (37 * hash) + PAGE_SPAN_FIELD_NUMBER; + hash = (53 * hash) + getPageSpan().hashCode(); + } + if (hasChunkMetadata()) { + hash = (37 * hash) + CHUNK_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getChunkMetadata().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -1451,6 +4009,8 @@ private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { getDocumentMetadataFieldBuilder(); getDerivedStructDataFieldBuilder(); + getPageSpanFieldBuilder(); + getChunkMetadataFieldBuilder(); } } @@ -1471,6 +4031,16 @@ public Builder clear() { derivedStructDataBuilder_.dispose(); derivedStructDataBuilder_ = null; } + pageSpan_ = null; + if (pageSpanBuilder_ != null) { + pageSpanBuilder_.dispose(); + pageSpanBuilder_ = null; + } + chunkMetadata_ = null; + if (chunkMetadataBuilder_ != null) { + chunkMetadataBuilder_.dispose(); + chunkMetadataBuilder_ = null; + } return this; } @@ -1529,6 +4099,15 @@ private void buildPartial0(com.google.cloud.discoveryengine.v1alpha.Chunk result : derivedStructDataBuilder_.build(); to_bitField0_ |= 0x00000002; } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.pageSpan_ = pageSpanBuilder_ == null ? pageSpan_ : pageSpanBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.chunkMetadata_ = + chunkMetadataBuilder_ == null ? chunkMetadata_ : chunkMetadataBuilder_.build(); + to_bitField0_ |= 0x00000008; + } result.bitField0_ |= to_bitField0_; } @@ -1598,6 +4177,12 @@ public Builder mergeFrom(com.google.cloud.discoveryengine.v1alpha.Chunk other) { if (other.hasDerivedStructData()) { mergeDerivedStructData(other.getDerivedStructData()); } + if (other.hasPageSpan()) { + mergePageSpan(other.getPageSpan()); + } + if (other.hasChunkMetadata()) { + mergeChunkMetadata(other.getChunkMetadata()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -1656,6 +4241,18 @@ public Builder mergeFrom( bitField0_ |= 0x00000008; break; } // case 42 + case 50: + { + input.readMessage(getPageSpanFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + input.readMessage(getChunkMetadataFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1811,7 +4408,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { * * *
-     * Unique chunk id of the current chunk.
+     * Unique chunk ID of the current chunk.
      * 
* * string id = 2; @@ -1833,7 +4430,7 @@ public java.lang.String getId() { * * *
-     * Unique chunk id of the current chunk.
+     * Unique chunk ID of the current chunk.
      * 
* * string id = 2; @@ -1855,7 +4452,7 @@ public com.google.protobuf.ByteString getIdBytes() { * * *
-     * Unique chunk id of the current chunk.
+     * Unique chunk ID of the current chunk.
      * 
* * string id = 2; @@ -1876,7 +4473,7 @@ public Builder setId(java.lang.String value) { * * *
-     * Unique chunk id of the current chunk.
+     * Unique chunk ID of the current chunk.
      * 
* * string id = 2; @@ -1893,7 +4490,7 @@ public Builder clearId() { * * *
-     * Unique chunk id of the current chunk.
+     * Unique chunk ID of the current chunk.
      * 
* * string id = 2; @@ -2431,6 +5028,403 @@ public com.google.protobuf.StructOrBuilder getDerivedStructDataOrBuilder() { return derivedStructDataBuilder_; } + private com.google.cloud.discoveryengine.v1alpha.Chunk.PageSpan pageSpan_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.Chunk.PageSpan, + com.google.cloud.discoveryengine.v1alpha.Chunk.PageSpan.Builder, + com.google.cloud.discoveryengine.v1alpha.Chunk.PageSpanOrBuilder> + pageSpanBuilder_; + /** + * + * + *
+     * Page span of the chunk.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.Chunk.PageSpan page_span = 6; + * + * @return Whether the pageSpan field is set. + */ + public boolean hasPageSpan() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+     * Page span of the chunk.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.Chunk.PageSpan page_span = 6; + * + * @return The pageSpan. + */ + public com.google.cloud.discoveryengine.v1alpha.Chunk.PageSpan getPageSpan() { + if (pageSpanBuilder_ == null) { + return pageSpan_ == null + ? com.google.cloud.discoveryengine.v1alpha.Chunk.PageSpan.getDefaultInstance() + : pageSpan_; + } else { + return pageSpanBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Page span of the chunk.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.Chunk.PageSpan page_span = 6; + */ + public Builder setPageSpan(com.google.cloud.discoveryengine.v1alpha.Chunk.PageSpan value) { + if (pageSpanBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + pageSpan_ = value; + } else { + pageSpanBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Page span of the chunk.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.Chunk.PageSpan page_span = 6; + */ + public Builder setPageSpan( + com.google.cloud.discoveryengine.v1alpha.Chunk.PageSpan.Builder builderForValue) { + if (pageSpanBuilder_ == null) { + pageSpan_ = builderForValue.build(); + } else { + pageSpanBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Page span of the chunk.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.Chunk.PageSpan page_span = 6; + */ + public Builder mergePageSpan(com.google.cloud.discoveryengine.v1alpha.Chunk.PageSpan value) { + if (pageSpanBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && pageSpan_ != null + && pageSpan_ + != com.google.cloud.discoveryengine.v1alpha.Chunk.PageSpan.getDefaultInstance()) { + getPageSpanBuilder().mergeFrom(value); + } else { + pageSpan_ = value; + } + } else { + pageSpanBuilder_.mergeFrom(value); + } + if (pageSpan_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Page span of the chunk.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.Chunk.PageSpan page_span = 6; + */ + public Builder clearPageSpan() { + bitField0_ = (bitField0_ & ~0x00000020); + pageSpan_ = null; + if (pageSpanBuilder_ != null) { + pageSpanBuilder_.dispose(); + pageSpanBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Page span of the chunk.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.Chunk.PageSpan page_span = 6; + */ + public com.google.cloud.discoveryengine.v1alpha.Chunk.PageSpan.Builder getPageSpanBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getPageSpanFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Page span of the chunk.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.Chunk.PageSpan page_span = 6; + */ + public com.google.cloud.discoveryengine.v1alpha.Chunk.PageSpanOrBuilder getPageSpanOrBuilder() { + if (pageSpanBuilder_ != null) { + return pageSpanBuilder_.getMessageOrBuilder(); + } else { + return pageSpan_ == null + ? com.google.cloud.discoveryengine.v1alpha.Chunk.PageSpan.getDefaultInstance() + : pageSpan_; + } + } + /** + * + * + *
+     * Page span of the chunk.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.Chunk.PageSpan page_span = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.Chunk.PageSpan, + com.google.cloud.discoveryengine.v1alpha.Chunk.PageSpan.Builder, + com.google.cloud.discoveryengine.v1alpha.Chunk.PageSpanOrBuilder> + getPageSpanFieldBuilder() { + if (pageSpanBuilder_ == null) { + pageSpanBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.Chunk.PageSpan, + com.google.cloud.discoveryengine.v1alpha.Chunk.PageSpan.Builder, + com.google.cloud.discoveryengine.v1alpha.Chunk.PageSpanOrBuilder>( + getPageSpan(), getParentForChildren(), isClean()); + pageSpan_ = null; + } + return pageSpanBuilder_; + } + + private com.google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata chunkMetadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata, + com.google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata.Builder, + com.google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadataOrBuilder> + chunkMetadataBuilder_; + /** + * + * + *
+     * Output only. Metadata of the current chunk.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata chunk_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the chunkMetadata field is set. + */ + public boolean hasChunkMetadata() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+     * Output only. Metadata of the current chunk.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata chunk_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The chunkMetadata. + */ + public com.google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata getChunkMetadata() { + if (chunkMetadataBuilder_ == null) { + return chunkMetadata_ == null + ? com.google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata.getDefaultInstance() + : chunkMetadata_; + } else { + return chunkMetadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Metadata of the current chunk.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata chunk_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setChunkMetadata( + com.google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata value) { + if (chunkMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + chunkMetadata_ = value; + } else { + chunkMetadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Metadata of the current chunk.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata chunk_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setChunkMetadata( + com.google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata.Builder builderForValue) { + if (chunkMetadataBuilder_ == null) { + chunkMetadata_ = builderForValue.build(); + } else { + chunkMetadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Metadata of the current chunk.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata chunk_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeChunkMetadata( + com.google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata value) { + if (chunkMetadataBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && chunkMetadata_ != null + && chunkMetadata_ + != com.google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata + .getDefaultInstance()) { + getChunkMetadataBuilder().mergeFrom(value); + } else { + chunkMetadata_ = value; + } + } else { + chunkMetadataBuilder_.mergeFrom(value); + } + if (chunkMetadata_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. Metadata of the current chunk.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata chunk_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearChunkMetadata() { + bitField0_ = (bitField0_ & ~0x00000040); + chunkMetadata_ = null; + if (chunkMetadataBuilder_ != null) { + chunkMetadataBuilder_.dispose(); + chunkMetadataBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Metadata of the current chunk.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata chunk_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata.Builder + getChunkMetadataBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getChunkMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Metadata of the current chunk.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata chunk_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadataOrBuilder + getChunkMetadataOrBuilder() { + if (chunkMetadataBuilder_ != null) { + return chunkMetadataBuilder_.getMessageOrBuilder(); + } else { + return chunkMetadata_ == null + ? com.google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata.getDefaultInstance() + : chunkMetadata_; + } + } + /** + * + * + *
+     * Output only. Metadata of the current chunk.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata chunk_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata, + com.google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata.Builder, + com.google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadataOrBuilder> + getChunkMetadataFieldBuilder() { + if (chunkMetadataBuilder_ == null) { + chunkMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata, + com.google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata.Builder, + com.google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadataOrBuilder>( + getChunkMetadata(), getParentForChildren(), isClean()); + chunkMetadata_ = null; + } + return chunkMetadataBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ChunkOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ChunkOrBuilder.java index 3d41954e000a..4b3c192e837c 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ChunkOrBuilder.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ChunkOrBuilder.java @@ -63,7 +63,7 @@ public interface ChunkOrBuilder * * *
-   * Unique chunk id of the current chunk.
+   * Unique chunk ID of the current chunk.
    * 
* * string id = 2; @@ -75,7 +75,7 @@ public interface ChunkOrBuilder * * *
-   * Unique chunk id of the current chunk.
+   * Unique chunk ID of the current chunk.
    * 
* * string id = 2; @@ -191,4 +191,80 @@ public interface ChunkOrBuilder * */ com.google.protobuf.StructOrBuilder getDerivedStructDataOrBuilder(); + + /** + * + * + *
+   * Page span of the chunk.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.Chunk.PageSpan page_span = 6; + * + * @return Whether the pageSpan field is set. + */ + boolean hasPageSpan(); + /** + * + * + *
+   * Page span of the chunk.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.Chunk.PageSpan page_span = 6; + * + * @return The pageSpan. + */ + com.google.cloud.discoveryengine.v1alpha.Chunk.PageSpan getPageSpan(); + /** + * + * + *
+   * Page span of the chunk.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.Chunk.PageSpan page_span = 6; + */ + com.google.cloud.discoveryengine.v1alpha.Chunk.PageSpanOrBuilder getPageSpanOrBuilder(); + + /** + * + * + *
+   * Output only. Metadata of the current chunk.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata chunk_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the chunkMetadata field is set. + */ + boolean hasChunkMetadata(); + /** + * + * + *
+   * Output only. Metadata of the current chunk.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata chunk_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The chunkMetadata. + */ + com.google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata getChunkMetadata(); + /** + * + * + *
+   * Output only. Metadata of the current chunk.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadata chunk_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.discoveryengine.v1alpha.Chunk.ChunkMetadataOrBuilder getChunkMetadataOrBuilder(); } diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ChunkProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ChunkProto.java index 0b5ca802c69f..9ed535790cd1 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ChunkProto.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ChunkProto.java @@ -36,6 +36,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_discoveryengine_v1alpha_Chunk_DocumentMetadata_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_discoveryengine_v1alpha_Chunk_DocumentMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_Chunk_PageSpan_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_Chunk_PageSpan_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_Chunk_ChunkMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_Chunk_ChunkMetadata_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -49,28 +57,37 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "hunk.proto\022$google.cloud.discoveryengine" + ".v1alpha\032\037google/api/field_behavior.prot" + "o\032\031google/api/resource.proto\032\034google/pro" - + "tobuf/struct.proto\"\253\004\n\005Chunk\022\014\n\004name\030\001 \001" + + "tobuf/struct.proto\"\230\007\n\005Chunk\022\014\n\004name\030\001 \001" + "(\t\022\n\n\002id\030\002 \001(\t\022\017\n\007content\030\003 \001(\t\022W\n\021docum" + "ent_metadata\030\005 \001(\0132<.google.cloud.discov" + "eryengine.v1alpha.Chunk.DocumentMetadata" + "\0229\n\023derived_struct_data\030\004 \001(\0132\027.google.p" - + "rotobuf.StructB\003\340A\003\032.\n\020DocumentMetadata\022" - + "\013\n\003uri\030\001 \001(\t\022\r\n\005title\030\002 \001(\t:\262\002\352A\256\002\n$disc" - + "overyengine.googleapis.com/Chunk\022uprojec" - + "ts/{project}/locations/{location}/dataSt" - + "ores/{data_store}/branches/{branch}/docu" - + "ments/{document}/chunks/{chunk}\022\216\001projec" - + "ts/{project}/locations/{location}/collec" - + "tions/{collection}/dataStores/{data_stor" - + "e}/branches/{branch}/documents/{document" - + "}/chunks/{chunk}B\226\002\n(com.google.cloud.di" - + "scoveryengine.v1alphaB\nChunkProtoP\001ZRclo" - + "ud.google.com/go/discoveryengine/apiv1al" - + "pha/discoveryenginepb;discoveryenginepb\242" - + "\002\017DISCOVERYENGINE\252\002$Google.Cloud.Discove" - + "ryEngine.V1Alpha\312\002$Google\\Cloud\\Discover" - + "yEngine\\V1alpha\352\002\'Google::Cloud::Discove" - + "ryEngine::V1alphab\006proto3" + + "rotobuf.StructB\003\340A\003\022G\n\tpage_span\030\006 \001(\01324" + + ".google.cloud.discoveryengine.v1alpha.Ch" + + "unk.PageSpan\022V\n\016chunk_metadata\030\007 \001(\01329.g" + + "oogle.cloud.discoveryengine.v1alpha.Chun" + + "k.ChunkMetadataB\003\340A\003\032.\n\020DocumentMetadata" + + "\022\013\n\003uri\030\001 \001(\t\022\r\n\005title\030\002 \001(\t\0320\n\010PageSpan" + + "\022\022\n\npage_start\030\001 \001(\005\022\020\n\010page_end\030\002 \001(\005\032\227" + + "\001\n\rChunkMetadata\022D\n\017previous_chunks\030\001 \003(" + + "\0132+.google.cloud.discoveryengine.v1alpha" + + ".Chunk\022@\n\013next_chunks\030\002 \003(\0132+.google.clo" + + "ud.discoveryengine.v1alpha.Chunk:\262\002\352A\256\002\n" + + "$discoveryengine.googleapis.com/Chunk\022up" + + "rojects/{project}/locations/{location}/d" + + "ataStores/{data_store}/branches/{branch}" + + "/documents/{document}/chunks/{chunk}\022\216\001p" + + "rojects/{project}/locations/{location}/c" + + "ollections/{collection}/dataStores/{data" + + "_store}/branches/{branch}/documents/{doc" + + "ument}/chunks/{chunk}B\226\002\n(com.google.clo" + + "ud.discoveryengine.v1alphaB\nChunkProtoP\001" + + "ZRcloud.google.com/go/discoveryengine/ap" + + "iv1alpha/discoveryenginepb;discoveryengi" + + "nepb\242\002\017DISCOVERYENGINE\252\002$Google.Cloud.Di" + + "scoveryEngine.V1Alpha\312\002$Google\\Cloud\\Dis" + + "coveryEngine\\V1alpha\352\002\'Google::Cloud::Di" + + "scoveryEngine::V1alphab\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -86,7 +103,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_discoveryengine_v1alpha_Chunk_descriptor, new java.lang.String[] { - "Name", "Id", "Content", "DocumentMetadata", "DerivedStructData", + "Name", + "Id", + "Content", + "DocumentMetadata", + "DerivedStructData", + "PageSpan", + "ChunkMetadata", }); internal_static_google_cloud_discoveryengine_v1alpha_Chunk_DocumentMetadata_descriptor = internal_static_google_cloud_discoveryengine_v1alpha_Chunk_descriptor @@ -98,6 +121,26 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Uri", "Title", }); + internal_static_google_cloud_discoveryengine_v1alpha_Chunk_PageSpan_descriptor = + internal_static_google_cloud_discoveryengine_v1alpha_Chunk_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_discoveryengine_v1alpha_Chunk_PageSpan_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_Chunk_PageSpan_descriptor, + new java.lang.String[] { + "PageStart", "PageEnd", + }); + internal_static_google_cloud_discoveryengine_v1alpha_Chunk_ChunkMetadata_descriptor = + internal_static_google_cloud_discoveryengine_v1alpha_Chunk_descriptor + .getNestedTypes() + .get(2); + internal_static_google_cloud_discoveryengine_v1alpha_Chunk_ChunkMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_Chunk_ChunkMetadata_descriptor, + new java.lang.String[] { + "PreviousChunks", "NextChunks", + }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/CloudSqlSource.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/CloudSqlSource.java new file mode 100644 index 000000000000..720e860e5602 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/CloudSqlSource.java @@ -0,0 +1,1525 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/import_config.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * Cloud SQL source import data from.
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.CloudSqlSource} + */ +public final class CloudSqlSource extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.CloudSqlSource) + CloudSqlSourceOrBuilder { + private static final long serialVersionUID = 0L; + // Use CloudSqlSource.newBuilder() to construct. + private CloudSqlSource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CloudSqlSource() { + projectId_ = ""; + instanceId_ = ""; + databaseId_ = ""; + tableId_ = ""; + gcsStagingDir_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CloudSqlSource(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_CloudSqlSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_CloudSqlSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.CloudSqlSource.class, + com.google.cloud.discoveryengine.v1alpha.CloudSqlSource.Builder.class); + } + + public static final int PROJECT_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object projectId_ = ""; + /** + * + * + *
+   * The project ID that the Cloud SQL source is in with a length limit of 128
+   * characters. If not specified, inherits the project ID from the parent
+   * request.
+   * 
+ * + * string project_id = 1; + * + * @return The projectId. + */ + @java.lang.Override + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + 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(); + projectId_ = s; + return s; + } + } + /** + * + * + *
+   * The project ID that the Cloud SQL source is in with a length limit of 128
+   * characters. If not specified, inherits the project ID from the parent
+   * request.
+   * 
+ * + * string project_id = 1; + * + * @return The bytes for projectId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INSTANCE_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object instanceId_ = ""; + /** + * + * + *
+   * Required. The Cloud SQL instance to copy the data from with a length limit
+   * of 256 characters.
+   * 
+ * + * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The instanceId. + */ + @java.lang.Override + public java.lang.String getInstanceId() { + java.lang.Object ref = instanceId_; + 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(); + instanceId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The Cloud SQL instance to copy the data from with a length limit
+   * of 256 characters.
+   * 
+ * + * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for instanceId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInstanceIdBytes() { + java.lang.Object ref = instanceId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATABASE_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object databaseId_ = ""; + /** + * + * + *
+   * Required. The Cloud SQL database to copy the data from with a length limit
+   * of 256 characters.
+   * 
+ * + * string database_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The databaseId. + */ + @java.lang.Override + public java.lang.String getDatabaseId() { + java.lang.Object ref = databaseId_; + 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(); + databaseId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The Cloud SQL database to copy the data from with a length limit
+   * of 256 characters.
+   * 
+ * + * string database_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for databaseId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDatabaseIdBytes() { + java.lang.Object ref = databaseId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + databaseId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TABLE_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object tableId_ = ""; + /** + * + * + *
+   * Required. The Cloud SQL table to copy the data from with a length limit of
+   * 256 characters.
+   * 
+ * + * string table_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The tableId. + */ + @java.lang.Override + public java.lang.String getTableId() { + java.lang.Object ref = tableId_; + 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(); + tableId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The Cloud SQL table to copy the data from with a length limit of
+   * 256 characters.
+   * 
+ * + * string table_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for tableId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTableIdBytes() { + java.lang.Object ref = tableId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tableId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GCS_STAGING_DIR_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object gcsStagingDir_ = ""; + /** + * + * + *
+   * Intermediate Cloud Storage directory used for the import with a length
+   * limit of 2,000 characters. Can be specified if one wants to have the
+   * Cloud SQL export to a specific Cloud Storage directory.
+   *
+   * Please ensure that the Cloud SQL service account has the necessary Cloud
+   * Storage Admin permissions to access the specified Cloud Storage directory.
+   * 
+ * + * string gcs_staging_dir = 5; + * + * @return The gcsStagingDir. + */ + @java.lang.Override + public java.lang.String getGcsStagingDir() { + java.lang.Object ref = gcsStagingDir_; + 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(); + gcsStagingDir_ = s; + return s; + } + } + /** + * + * + *
+   * Intermediate Cloud Storage directory used for the import with a length
+   * limit of 2,000 characters. Can be specified if one wants to have the
+   * Cloud SQL export to a specific Cloud Storage directory.
+   *
+   * Please ensure that the Cloud SQL service account has the necessary Cloud
+   * Storage Admin permissions to access the specified Cloud Storage directory.
+   * 
+ * + * string gcs_staging_dir = 5; + * + * @return The bytes for gcsStagingDir. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGcsStagingDirBytes() { + java.lang.Object ref = gcsStagingDir_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + gcsStagingDir_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OFFLOAD_FIELD_NUMBER = 6; + private boolean offload_ = false; + /** + * + * + *
+   * Option for serverless export. Enabling this option will incur
+   * additional cost. More info can be found
+   * [here](https://cloud.google.com/sql/pricing#serverless).
+   * 
+ * + * bool offload = 6; + * + * @return The offload. + */ + @java.lang.Override + public boolean getOffload() { + return offload_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, instanceId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(databaseId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, databaseId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tableId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, tableId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gcsStagingDir_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, gcsStagingDir_); + } + if (offload_ != false) { + output.writeBool(6, offload_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, instanceId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(databaseId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, databaseId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tableId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, tableId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gcsStagingDir_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, gcsStagingDir_); + } + if (offload_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, offload_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.CloudSqlSource)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.CloudSqlSource other = + (com.google.cloud.discoveryengine.v1alpha.CloudSqlSource) obj; + + if (!getProjectId().equals(other.getProjectId())) return false; + if (!getInstanceId().equals(other.getInstanceId())) return false; + if (!getDatabaseId().equals(other.getDatabaseId())) return false; + if (!getTableId().equals(other.getTableId())) return false; + if (!getGcsStagingDir().equals(other.getGcsStagingDir())) return false; + if (getOffload() != other.getOffload()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PROJECT_ID_FIELD_NUMBER; + hash = (53 * hash) + getProjectId().hashCode(); + hash = (37 * hash) + INSTANCE_ID_FIELD_NUMBER; + hash = (53 * hash) + getInstanceId().hashCode(); + hash = (37 * hash) + DATABASE_ID_FIELD_NUMBER; + hash = (53 * hash) + getDatabaseId().hashCode(); + hash = (37 * hash) + TABLE_ID_FIELD_NUMBER; + hash = (53 * hash) + getTableId().hashCode(); + hash = (37 * hash) + GCS_STAGING_DIR_FIELD_NUMBER; + hash = (53 * hash) + getGcsStagingDir().hashCode(); + hash = (37 * hash) + OFFLOAD_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getOffload()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.CloudSqlSource parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.CloudSqlSource parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.CloudSqlSource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.CloudSqlSource parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.CloudSqlSource parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.CloudSqlSource parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.CloudSqlSource parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.CloudSqlSource parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.CloudSqlSource parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.CloudSqlSource parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.CloudSqlSource parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.CloudSqlSource parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.CloudSqlSource prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Cloud SQL source import data from.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.CloudSqlSource} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.CloudSqlSource) + com.google.cloud.discoveryengine.v1alpha.CloudSqlSourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_CloudSqlSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_CloudSqlSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.CloudSqlSource.class, + com.google.cloud.discoveryengine.v1alpha.CloudSqlSource.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1alpha.CloudSqlSource.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + projectId_ = ""; + instanceId_ = ""; + databaseId_ = ""; + tableId_ = ""; + gcsStagingDir_ = ""; + offload_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_CloudSqlSource_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.CloudSqlSource getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.CloudSqlSource.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.CloudSqlSource build() { + com.google.cloud.discoveryengine.v1alpha.CloudSqlSource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.CloudSqlSource buildPartial() { + com.google.cloud.discoveryengine.v1alpha.CloudSqlSource result = + new com.google.cloud.discoveryengine.v1alpha.CloudSqlSource(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.discoveryengine.v1alpha.CloudSqlSource result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.projectId_ = projectId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.instanceId_ = instanceId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.databaseId_ = databaseId_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.tableId_ = tableId_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.gcsStagingDir_ = gcsStagingDir_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.offload_ = offload_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.CloudSqlSource) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.CloudSqlSource) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1alpha.CloudSqlSource other) { + if (other == com.google.cloud.discoveryengine.v1alpha.CloudSqlSource.getDefaultInstance()) + return this; + if (!other.getProjectId().isEmpty()) { + projectId_ = other.projectId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getInstanceId().isEmpty()) { + instanceId_ = other.instanceId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getDatabaseId().isEmpty()) { + databaseId_ = other.databaseId_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getTableId().isEmpty()) { + tableId_ = other.tableId_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getGcsStagingDir().isEmpty()) { + gcsStagingDir_ = other.gcsStagingDir_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.getOffload() != false) { + setOffload(other.getOffload()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + projectId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + instanceId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + databaseId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + tableId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + gcsStagingDir_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 48: + { + offload_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case 48 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object projectId_ = ""; + /** + * + * + *
+     * The project ID that the Cloud SQL source is in with a length limit of 128
+     * characters. If not specified, inherits the project ID from the parent
+     * request.
+     * 
+ * + * string project_id = 1; + * + * @return The projectId. + */ + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The project ID that the Cloud SQL source is in with a length limit of 128
+     * characters. If not specified, inherits the project ID from the parent
+     * request.
+     * 
+ * + * string project_id = 1; + * + * @return The bytes for projectId. + */ + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The project ID that the Cloud SQL source is in with a length limit of 128
+     * characters. If not specified, inherits the project ID from the parent
+     * request.
+     * 
+ * + * string project_id = 1; + * + * @param value The projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + projectId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The project ID that the Cloud SQL source is in with a length limit of 128
+     * characters. If not specified, inherits the project ID from the parent
+     * request.
+     * 
+ * + * string project_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearProjectId() { + projectId_ = getDefaultInstance().getProjectId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The project ID that the Cloud SQL source is in with a length limit of 128
+     * characters. If not specified, inherits the project ID from the parent
+     * request.
+     * 
+ * + * string project_id = 1; + * + * @param value The bytes for projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + projectId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object instanceId_ = ""; + /** + * + * + *
+     * Required. The Cloud SQL instance to copy the data from with a length limit
+     * of 256 characters.
+     * 
+ * + * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The instanceId. + */ + public java.lang.String getInstanceId() { + java.lang.Object ref = instanceId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instanceId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The Cloud SQL instance to copy the data from with a length limit
+     * of 256 characters.
+     * 
+ * + * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for instanceId. + */ + public com.google.protobuf.ByteString getInstanceIdBytes() { + java.lang.Object ref = instanceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The Cloud SQL instance to copy the data from with a length limit
+     * of 256 characters.
+     * 
+ * + * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The instanceId to set. + * @return This builder for chaining. + */ + public Builder setInstanceId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + instanceId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Cloud SQL instance to copy the data from with a length limit
+     * of 256 characters.
+     * 
+ * + * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearInstanceId() { + instanceId_ = getDefaultInstance().getInstanceId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Cloud SQL instance to copy the data from with a length limit
+     * of 256 characters.
+     * 
+ * + * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for instanceId to set. + * @return This builder for chaining. + */ + public Builder setInstanceIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + instanceId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object databaseId_ = ""; + /** + * + * + *
+     * Required. The Cloud SQL database to copy the data from with a length limit
+     * of 256 characters.
+     * 
+ * + * string database_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The databaseId. + */ + public java.lang.String getDatabaseId() { + java.lang.Object ref = databaseId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + databaseId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The Cloud SQL database to copy the data from with a length limit
+     * of 256 characters.
+     * 
+ * + * string database_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for databaseId. + */ + public com.google.protobuf.ByteString getDatabaseIdBytes() { + java.lang.Object ref = databaseId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + databaseId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The Cloud SQL database to copy the data from with a length limit
+     * of 256 characters.
+     * 
+ * + * string database_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The databaseId to set. + * @return This builder for chaining. + */ + public Builder setDatabaseId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + databaseId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Cloud SQL database to copy the data from with a length limit
+     * of 256 characters.
+     * 
+ * + * string database_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDatabaseId() { + databaseId_ = getDefaultInstance().getDatabaseId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Cloud SQL database to copy the data from with a length limit
+     * of 256 characters.
+     * 
+ * + * string database_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for databaseId to set. + * @return This builder for chaining. + */ + public Builder setDatabaseIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + databaseId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object tableId_ = ""; + /** + * + * + *
+     * Required. The Cloud SQL table to copy the data from with a length limit of
+     * 256 characters.
+     * 
+ * + * string table_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The tableId. + */ + public java.lang.String getTableId() { + java.lang.Object ref = tableId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tableId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The Cloud SQL table to copy the data from with a length limit of
+     * 256 characters.
+     * 
+ * + * string table_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for tableId. + */ + public com.google.protobuf.ByteString getTableIdBytes() { + java.lang.Object ref = tableId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tableId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The Cloud SQL table to copy the data from with a length limit of
+     * 256 characters.
+     * 
+ * + * string table_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The tableId to set. + * @return This builder for chaining. + */ + public Builder setTableId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + tableId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Cloud SQL table to copy the data from with a length limit of
+     * 256 characters.
+     * 
+ * + * string table_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearTableId() { + tableId_ = getDefaultInstance().getTableId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Cloud SQL table to copy the data from with a length limit of
+     * 256 characters.
+     * 
+ * + * string table_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for tableId to set. + * @return This builder for chaining. + */ + public Builder setTableIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + tableId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object gcsStagingDir_ = ""; + /** + * + * + *
+     * Intermediate Cloud Storage directory used for the import with a length
+     * limit of 2,000 characters. Can be specified if one wants to have the
+     * Cloud SQL export to a specific Cloud Storage directory.
+     *
+     * Please ensure that the Cloud SQL service account has the necessary Cloud
+     * Storage Admin permissions to access the specified Cloud Storage directory.
+     * 
+ * + * string gcs_staging_dir = 5; + * + * @return The gcsStagingDir. + */ + public java.lang.String getGcsStagingDir() { + java.lang.Object ref = gcsStagingDir_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gcsStagingDir_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Intermediate Cloud Storage directory used for the import with a length
+     * limit of 2,000 characters. Can be specified if one wants to have the
+     * Cloud SQL export to a specific Cloud Storage directory.
+     *
+     * Please ensure that the Cloud SQL service account has the necessary Cloud
+     * Storage Admin permissions to access the specified Cloud Storage directory.
+     * 
+ * + * string gcs_staging_dir = 5; + * + * @return The bytes for gcsStagingDir. + */ + public com.google.protobuf.ByteString getGcsStagingDirBytes() { + java.lang.Object ref = gcsStagingDir_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + gcsStagingDir_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Intermediate Cloud Storage directory used for the import with a length
+     * limit of 2,000 characters. Can be specified if one wants to have the
+     * Cloud SQL export to a specific Cloud Storage directory.
+     *
+     * Please ensure that the Cloud SQL service account has the necessary Cloud
+     * Storage Admin permissions to access the specified Cloud Storage directory.
+     * 
+ * + * string gcs_staging_dir = 5; + * + * @param value The gcsStagingDir to set. + * @return This builder for chaining. + */ + public Builder setGcsStagingDir(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + gcsStagingDir_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Intermediate Cloud Storage directory used for the import with a length
+     * limit of 2,000 characters. Can be specified if one wants to have the
+     * Cloud SQL export to a specific Cloud Storage directory.
+     *
+     * Please ensure that the Cloud SQL service account has the necessary Cloud
+     * Storage Admin permissions to access the specified Cloud Storage directory.
+     * 
+ * + * string gcs_staging_dir = 5; + * + * @return This builder for chaining. + */ + public Builder clearGcsStagingDir() { + gcsStagingDir_ = getDefaultInstance().getGcsStagingDir(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Intermediate Cloud Storage directory used for the import with a length
+     * limit of 2,000 characters. Can be specified if one wants to have the
+     * Cloud SQL export to a specific Cloud Storage directory.
+     *
+     * Please ensure that the Cloud SQL service account has the necessary Cloud
+     * Storage Admin permissions to access the specified Cloud Storage directory.
+     * 
+ * + * string gcs_staging_dir = 5; + * + * @param value The bytes for gcsStagingDir to set. + * @return This builder for chaining. + */ + public Builder setGcsStagingDirBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + gcsStagingDir_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private boolean offload_; + /** + * + * + *
+     * Option for serverless export. Enabling this option will incur
+     * additional cost. More info can be found
+     * [here](https://cloud.google.com/sql/pricing#serverless).
+     * 
+ * + * bool offload = 6; + * + * @return The offload. + */ + @java.lang.Override + public boolean getOffload() { + return offload_; + } + /** + * + * + *
+     * Option for serverless export. Enabling this option will incur
+     * additional cost. More info can be found
+     * [here](https://cloud.google.com/sql/pricing#serverless).
+     * 
+ * + * bool offload = 6; + * + * @param value The offload to set. + * @return This builder for chaining. + */ + public Builder setOffload(boolean value) { + + offload_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Option for serverless export. Enabling this option will incur
+     * additional cost. More info can be found
+     * [here](https://cloud.google.com/sql/pricing#serverless).
+     * 
+ * + * bool offload = 6; + * + * @return This builder for chaining. + */ + public Builder clearOffload() { + bitField0_ = (bitField0_ & ~0x00000020); + offload_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.CloudSqlSource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.CloudSqlSource) + private static final com.google.cloud.discoveryengine.v1alpha.CloudSqlSource DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.CloudSqlSource(); + } + + public static com.google.cloud.discoveryengine.v1alpha.CloudSqlSource getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CloudSqlSource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.CloudSqlSource getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/CloudSqlSourceOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/CloudSqlSourceOrBuilder.java new file mode 100644 index 000000000000..32901f26303a --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/CloudSqlSourceOrBuilder.java @@ -0,0 +1,186 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/import_config.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.discoveryengine.v1alpha; + +public interface CloudSqlSourceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.CloudSqlSource) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The project ID that the Cloud SQL source is in with a length limit of 128
+   * characters. If not specified, inherits the project ID from the parent
+   * request.
+   * 
+ * + * string project_id = 1; + * + * @return The projectId. + */ + java.lang.String getProjectId(); + /** + * + * + *
+   * The project ID that the Cloud SQL source is in with a length limit of 128
+   * characters. If not specified, inherits the project ID from the parent
+   * request.
+   * 
+ * + * string project_id = 1; + * + * @return The bytes for projectId. + */ + com.google.protobuf.ByteString getProjectIdBytes(); + + /** + * + * + *
+   * Required. The Cloud SQL instance to copy the data from with a length limit
+   * of 256 characters.
+   * 
+ * + * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The instanceId. + */ + java.lang.String getInstanceId(); + /** + * + * + *
+   * Required. The Cloud SQL instance to copy the data from with a length limit
+   * of 256 characters.
+   * 
+ * + * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for instanceId. + */ + com.google.protobuf.ByteString getInstanceIdBytes(); + + /** + * + * + *
+   * Required. The Cloud SQL database to copy the data from with a length limit
+   * of 256 characters.
+   * 
+ * + * string database_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The databaseId. + */ + java.lang.String getDatabaseId(); + /** + * + * + *
+   * Required. The Cloud SQL database to copy the data from with a length limit
+   * of 256 characters.
+   * 
+ * + * string database_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for databaseId. + */ + com.google.protobuf.ByteString getDatabaseIdBytes(); + + /** + * + * + *
+   * Required. The Cloud SQL table to copy the data from with a length limit of
+   * 256 characters.
+   * 
+ * + * string table_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The tableId. + */ + java.lang.String getTableId(); + /** + * + * + *
+   * Required. The Cloud SQL table to copy the data from with a length limit of
+   * 256 characters.
+   * 
+ * + * string table_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for tableId. + */ + com.google.protobuf.ByteString getTableIdBytes(); + + /** + * + * + *
+   * Intermediate Cloud Storage directory used for the import with a length
+   * limit of 2,000 characters. Can be specified if one wants to have the
+   * Cloud SQL export to a specific Cloud Storage directory.
+   *
+   * Please ensure that the Cloud SQL service account has the necessary Cloud
+   * Storage Admin permissions to access the specified Cloud Storage directory.
+   * 
+ * + * string gcs_staging_dir = 5; + * + * @return The gcsStagingDir. + */ + java.lang.String getGcsStagingDir(); + /** + * + * + *
+   * Intermediate Cloud Storage directory used for the import with a length
+   * limit of 2,000 characters. Can be specified if one wants to have the
+   * Cloud SQL export to a specific Cloud Storage directory.
+   *
+   * Please ensure that the Cloud SQL service account has the necessary Cloud
+   * Storage Admin permissions to access the specified Cloud Storage directory.
+   * 
+ * + * string gcs_staging_dir = 5; + * + * @return The bytes for gcsStagingDir. + */ + com.google.protobuf.ByteString getGcsStagingDirBytes(); + + /** + * + * + *
+   * Option for serverless export. Enabling this option will incur
+   * additional cost. More info can be found
+   * [here](https://cloud.google.com/sql/pricing#serverless).
+   * 
+ * + * bool offload = 6; + * + * @return The offload. + */ + boolean getOffload(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/CommonProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/CommonProto.java index 7025d456cda4..1e13ff0ff360 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/CommonProto.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/CommonProto.java @@ -100,35 +100,45 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "rce_pool_name\030\001 \001(\t\"@\n\007IdpType\022\030\n\024IDP_TY" + "PE_UNSPECIFIED\020\000\022\n\n\006GSUITE\020\001\022\017\n\013THIRD_PA" + "RTY\020\002\"?\n\tPrincipal\022\021\n\007user_id\030\001 \001(\tH\000\022\022\n" - + "\010group_id\030\002 \001(\tH\000B\013\n\tprincipal*M\n\020Indust" + + "\010group_id\030\002 \001(\tH\000B\013\n\tprincipal*b\n\020Indust" + "ryVertical\022!\n\035INDUSTRY_VERTICAL_UNSPECIF" - + "IED\020\000\022\013\n\007GENERIC\020\001\022\t\n\005MEDIA\020\002*\201\001\n\014Soluti" - + "onType\022\035\n\031SOLUTION_TYPE_UNSPECIFIED\020\000\022 \n" - + "\034SOLUTION_TYPE_RECOMMENDATION\020\001\022\030\n\024SOLUT" - + "ION_TYPE_SEARCH\020\002\022\026\n\022SOLUTION_TYPE_CHAT\020" - + "\003*_\n\nSearchTier\022\033\n\027SEARCH_TIER_UNSPECIFI" - + "ED\020\000\022\030\n\024SEARCH_TIER_STANDARD\020\001\022\032\n\026SEARCH" - + "_TIER_ENTERPRISE\020\002*C\n\013SearchAddOn\022\035\n\031SEA" - + "RCH_ADD_ON_UNSPECIFIED\020\000\022\025\n\021SEARCH_ADD_O" - + "N_LLM\020\001B\306\005\n(com.google.cloud.discoveryen" - + "gine.v1alphaB\013CommonProtoP\001ZRcloud.googl" - + "e.com/go/discoveryengine/apiv1alpha/disc" - + "overyenginepb;discoveryenginepb\242\002\017DISCOV" - + "ERYENGINE\252\002$Google.Cloud.DiscoveryEngine" - + ".V1Alpha\312\002$Google\\Cloud\\DiscoveryEngine\\" - + "V1alpha\352\002\'Google::Cloud::DiscoveryEngine" - + "::V1alpha\352A\346\001\n%discoveryengine.googleapi" - + "s.com/Branch\022Qprojects/{project}/locatio" - + "ns/{location}/dataStores/{data_store}/br" - + "anches/{branch}\022jprojects/{project}/loca" - + "tions/{location}/collections/{collection" - + "}/dataStores/{data_store}/branches/{bran" - + "ch}\352Am\n)discoveryengine.googleapis.com/C" - + "ollection\022@projects/{project}/locations/" - + "{location}/collections/{collection}\352AR\n\'" - + "discoveryengine.googleapis.com/Location\022" - + "\'projects/{project}/locations/{location}" - + "b\006proto3" + + "IED\020\000\022\013\n\007GENERIC\020\001\022\t\n\005MEDIA\020\002\022\023\n\017HEALTHC" + + "ARE_FHIR\020\007*\244\001\n\014SolutionType\022\035\n\031SOLUTION_" + + "TYPE_UNSPECIFIED\020\000\022 \n\034SOLUTION_TYPE_RECO" + + "MMENDATION\020\001\022\030\n\024SOLUTION_TYPE_SEARCH\020\002\022\026" + + "\n\022SOLUTION_TYPE_CHAT\020\003\022!\n\035SOLUTION_TYPE_" + + "GENERATIVE_CHAT\020\004*_\n\nSearchTier\022\033\n\027SEARC" + + "H_TIER_UNSPECIFIED\020\000\022\030\n\024SEARCH_TIER_STAN" + + "DARD\020\001\022\032\n\026SEARCH_TIER_ENTERPRISE\020\002*C\n\013Se" + + "archAddOn\022\035\n\031SEARCH_ADD_ON_UNSPECIFIED\020\000" + + "\022\025\n\021SEARCH_ADD_ON_LLM\020\001B\274\010\n(com.google.c" + + "loud.discoveryengine.v1alphaB\013CommonProt" + + "oP\001ZRcloud.google.com/go/discoveryengine" + + "/apiv1alpha/discoveryenginepb;discoverye" + + "nginepb\242\002\017DISCOVERYENGINE\252\002$Google.Cloud" + + ".DiscoveryEngine.V1Alpha\312\002$Google\\Cloud\\" + + "DiscoveryEngine\\V1alpha\352\002\'Google::Cloud:" + + ":DiscoveryEngine::V1alpha\352A\346\001\n%discovery" + + "engine.googleapis.com/Branch\022Qprojects/{" + + "project}/locations/{location}/dataStores" + + "/{data_store}/branches/{branch}\022jproject" + + "s/{project}/locations/{location}/collect" + + "ions/{collection}/dataStores/{data_store" + + "}/branches/{branch}\352Am\n)discoveryengine." + + "googleapis.com/Collection\022@projects/{pro" + + "ject}/locations/{location}/collections/{" + + "collection}\352AR\n\'discoveryengine.googleap" + + "is.com/Location\022\'projects/{project}/loca" + + "tions/{location}\352A}\n.discoveryengine.goo" + + "gleapis.com/GroundingConfig\022Kprojects/{p" + + "roject}/locations/{location}/groundingCo" + + "nfigs/{grounding_config}\352Aw\n,discoveryen" + + "gine.googleapis.com/RankingConfig\022Gproje" + + "cts/{project}/locations/{location}/ranki" + + "ngConfigs/{ranking_config}\352Ay\n#healthcar" + + "e.googleapis.com/FhirStore\022Rprojects/{pr" + + "oject}/locations/{location}/datasets/{da" + + "taset}/fhirStores/{fhir_store}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/DocumentProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/DocumentProto.java index 5eafc7e0c553..e5ad1b47083b 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/DocumentProto.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/DocumentProto.java @@ -44,6 +44,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_discoveryengine_v1alpha_Document_AclInfo_AccessRestriction_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_discoveryengine_v1alpha_Document_AclInfo_AccessRestriction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_ProcessedDocument_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_ProcessedDocument_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -84,14 +88,17 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "s/{project}/locations/{location}/collect" + "ions/{collection}/dataStores/{data_store" + "}/branches/{branch}/documents/{document}" - + "B\006\n\004dataB\231\002\n(com.google.cloud.discoverye" - + "ngine.v1alphaB\rDocumentProtoP\001ZRcloud.go" - + "ogle.com/go/discoveryengine/apiv1alpha/d" - + "iscoveryenginepb;discoveryenginepb\242\002\017DIS" - + "COVERYENGINE\252\002$Google.Cloud.DiscoveryEng" - + "ine.V1Alpha\312\002$Google\\Cloud\\DiscoveryEngi" - + "ne\\V1alpha\352\002\'Google::Cloud::DiscoveryEng" - + "ine::V1alphab\006proto3" + + "B\006\n\004data\"\204\001\n\021ProcessedDocument\022\023\n\tjson_d" + + "ata\030\002 \001(\tH\000\022A\n\010document\030\001 \001(\tB/\340A\002\372A)\n\'d" + + "iscoveryengine.googleapis.com/DocumentB\027" + + "\n\025processed_data_formatB\231\002\n(com.google.c" + + "loud.discoveryengine.v1alphaB\rDocumentPr" + + "otoP\001ZRcloud.google.com/go/discoveryengi" + + "ne/apiv1alpha/discoveryenginepb;discover" + + "yenginepb\242\002\017DISCOVERYENGINE\252\002$Google.Clo" + + "ud.DiscoveryEngine.V1Alpha\312\002$Google\\Clou" + + "d\\DiscoveryEngine\\V1alpha\352\002\'Google::Clou" + + "d::DiscoveryEngine::V1alphab\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -151,10 +158,19 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Principals", }); + internal_static_google_cloud_discoveryengine_v1alpha_ProcessedDocument_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_discoveryengine_v1alpha_ProcessedDocument_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_ProcessedDocument_descriptor, + new java.lang.String[] { + "JsonData", "Document", "ProcessedDataFormat", + }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceReference); com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); com.google.api.FieldBehaviorProto.getDescriptor(); diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/DocumentServiceProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/DocumentServiceProto.java index 1c6c9f46af1b..778cd4e8f63e 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/DocumentServiceProto.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/DocumentServiceProto.java @@ -52,6 +52,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_discoveryengine_v1alpha_DeleteDocumentRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_discoveryengine_v1alpha_DeleteDocumentRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_GetProcessedDocumentRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_GetProcessedDocumentRequest_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -92,80 +96,103 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "update_mask\030\003 \001(\0132\032.google.protobuf.Fiel" + "dMask\"V\n\025DeleteDocumentRequest\022=\n\004name\030\001" + " \001(\tB/\340A\002\372A)\n\'discoveryengine.googleapis" - + ".com/Document2\270\024\n\017DocumentService\022\260\002\n\013Ge" - + "tDocument\0228.google.cloud.discoveryengine" - + ".v1alpha.GetDocumentRequest\032..google.clo" - + "ud.discoveryengine.v1alpha.Document\"\266\001\332A" - + "\004name\202\323\344\223\002\250\001\022J/v1alpha/{name=projects/*/" - + "locations/*/dataStores/*/branches/*/docu" - + "ments/*}ZZ\022X/v1alpha/{name=projects/*/lo" - + "cations/*/collections/*/dataStores/*/bra" - + "nches/*/documents/*}\022\303\002\n\rListDocuments\022:" - + ".google.cloud.discoveryengine.v1alpha.Li" - + "stDocumentsRequest\032;.google.cloud.discov" - + "eryengine.v1alpha.ListDocumentsResponse\"" - + "\270\001\332A\006parent\202\323\344\223\002\250\001\022J/v1alpha/{parent=pro" - + "jects/*/locations/*/dataStores/*/branche" - + "s/*}/documentsZZ\022X/v1alpha/{parent=proje" - + "cts/*/locations/*/collections/*/dataStor" - + "es/*/branches/*}/documents\022\341\002\n\016CreateDoc" - + "ument\022;.google.cloud.discoveryengine.v1a" - + "lpha.CreateDocumentRequest\032..google.clou" - + "d.discoveryengine.v1alpha.Document\"\341\001\332A\033" - + "parent,document,document_id\202\323\344\223\002\274\001\"J/v1a" - + "lpha/{parent=projects/*/locations/*/data" - + "Stores/*/branches/*}/documents:\010document" - + "Zd\"X/v1alpha/{parent=projects/*/location" - + "s/*/collections/*/dataStores/*/branches/" - + "*}/documents:\010document\022\354\002\n\016UpdateDocumen" - + "t\022;.google.cloud.discoveryengine.v1alpha" - + ".UpdateDocumentRequest\032..google.cloud.di" - + "scoveryengine.v1alpha.Document\"\354\001\332A\024docu" - + "ment,update_mask\202\323\344\223\002\316\0012S/v1alpha/{docum" - + "ent.name=projects/*/locations/*/dataStor" - + "es/*/branches/*/documents/*}:\010documentZm" - + "2a/v1alpha/{document.name=projects/*/loc" - + "ations/*/collections/*/dataStores/*/bran" - + "ches/*/documents/*}:\010document\022\236\002\n\016Delete" - + "Document\022;.google.cloud.discoveryengine." - + "v1alpha.DeleteDocumentRequest\032\026.google.p" - + "rotobuf.Empty\"\266\001\332A\004name\202\323\344\223\002\250\001*J/v1alpha" - + "/{name=projects/*/locations/*/dataStores" - + "/*/branches/*/documents/*}ZZ*X/v1alpha/{" - + "name=projects/*/locations/*/collections/" - + "*/dataStores/*/branches/*/documents/*}\022\263" - + "\003\n\017ImportDocuments\022<.google.cloud.discov" - + "eryengine.v1alpha.ImportDocumentsRequest" - + "\032\035.google.longrunning.Operation\"\302\002\312A|\n - * Spec for rag context recall instance. + * Cloud FhirStore source import data from. * * - * Protobuf type {@code google.cloud.aiplatform.v1beta1.RagContextRecallInstance} + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.FhirStoreSource} */ -public final class RagContextRecallInstance extends com.google.protobuf.GeneratedMessageV3 +public final class FhirStoreSource extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.RagContextRecallInstance) - RagContextRecallInstanceOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.FhirStoreSource) + FhirStoreSourceOrBuilder { private static final long serialVersionUID = 0L; - // Use RagContextRecallInstance.newBuilder() to construct. - private RagContextRecallInstance(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use FhirStoreSource.newBuilder() to construct. + private FhirStoreSource(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private RagContextRecallInstance() { - reference_ = ""; - context_ = ""; + private FhirStoreSource() { + fhirStore_ = ""; + gcsStagingDir_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new RagContextRecallInstance(); + return new FhirStoreSource(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.aiplatform.v1beta1.EvaluationServiceProto - .internal_static_google_cloud_aiplatform_v1beta1_RagContextRecallInstance_descriptor; + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_FhirStoreSource_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.aiplatform.v1beta1.EvaluationServiceProto - .internal_static_google_cloud_aiplatform_v1beta1_RagContextRecallInstance_fieldAccessorTable + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_FhirStoreSource_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.aiplatform.v1beta1.RagContextRecallInstance.class, - com.google.cloud.aiplatform.v1beta1.RagContextRecallInstance.Builder.class); + com.google.cloud.discoveryengine.v1alpha.FhirStoreSource.class, + com.google.cloud.discoveryengine.v1alpha.FhirStoreSource.Builder.class); } - private int bitField0_; - public static final int REFERENCE_FIELD_NUMBER = 1; + public static final int FHIR_STORE_FIELD_NUMBER = 1; @SuppressWarnings("serial") - private volatile java.lang.Object reference_ = ""; + private volatile java.lang.Object fhirStore_ = ""; /** * * *
-   * Required. Ground truth used to compare against the context.
+   * Required. The full resource name of the FHIR store to import data from, in
+   * the format of
+   * `projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_store}`.
    * 
* - * optional string reference = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string fhir_store = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * - * @return Whether the reference field is set. + * @return The fhirStore. */ @java.lang.Override - public boolean hasReference() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * - * - *
-   * Required. Ground truth used to compare against the context.
-   * 
- * - * optional string reference = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The reference. - */ - @java.lang.Override - public java.lang.String getReference() { - java.lang.Object ref = reference_; + public java.lang.String getFhirStore() { + java.lang.Object ref = fhirStore_; 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(); - reference_ = s; + fhirStore_ = s; return s; } } @@ -111,65 +99,56 @@ public java.lang.String getReference() { * * *
-   * Required. Ground truth used to compare against the context.
+   * Required. The full resource name of the FHIR store to import data from, in
+   * the format of
+   * `projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_store}`.
    * 
* - * optional string reference = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string fhir_store = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * - * @return The bytes for reference. + * @return The bytes for fhirStore. */ @java.lang.Override - public com.google.protobuf.ByteString getReferenceBytes() { - java.lang.Object ref = reference_; + public com.google.protobuf.ByteString getFhirStoreBytes() { + java.lang.Object ref = fhirStore_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - reference_ = b; + fhirStore_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - public static final int CONTEXT_FIELD_NUMBER = 2; + public static final int GCS_STAGING_DIR_FIELD_NUMBER = 2; @SuppressWarnings("serial") - private volatile java.lang.Object context_ = ""; + private volatile java.lang.Object gcsStagingDir_ = ""; /** * * *
-   * Required. Retrieved facts from RAG pipeline as context to be evaluated.
+   * Intermediate Cloud Storage directory used for the import with a length
+   * limit of 2,000 characters. Can be specified if one wants to have the
+   * FhirStore export to a specific Cloud Storage directory.
    * 
* - * optional string context = 2 [(.google.api.field_behavior) = REQUIRED]; + * string gcs_staging_dir = 2; * - * @return Whether the context field is set. + * @return The gcsStagingDir. */ @java.lang.Override - public boolean hasContext() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * - * - *
-   * Required. Retrieved facts from RAG pipeline as context to be evaluated.
-   * 
- * - * optional string context = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The context. - */ - @java.lang.Override - public java.lang.String getContext() { - java.lang.Object ref = context_; + public java.lang.String getGcsStagingDir() { + java.lang.Object ref = gcsStagingDir_; 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(); - context_ = s; + gcsStagingDir_ = s; return s; } } @@ -177,20 +156,22 @@ public java.lang.String getContext() { * * *
-   * Required. Retrieved facts from RAG pipeline as context to be evaluated.
+   * Intermediate Cloud Storage directory used for the import with a length
+   * limit of 2,000 characters. Can be specified if one wants to have the
+   * FhirStore export to a specific Cloud Storage directory.
    * 
* - * optional string context = 2 [(.google.api.field_behavior) = REQUIRED]; + * string gcs_staging_dir = 2; * - * @return The bytes for context. + * @return The bytes for gcsStagingDir. */ @java.lang.Override - public com.google.protobuf.ByteString getContextBytes() { - java.lang.Object ref = context_; + public com.google.protobuf.ByteString getGcsStagingDirBytes() { + java.lang.Object ref = gcsStagingDir_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - context_ = b; + gcsStagingDir_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -211,11 +192,11 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, reference_); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fhirStore_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, fhirStore_); } - if (((bitField0_ & 0x00000002) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, context_); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gcsStagingDir_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, gcsStagingDir_); } getUnknownFields().writeTo(output); } @@ -226,11 +207,11 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, reference_); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fhirStore_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, fhirStore_); } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, context_); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gcsStagingDir_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, gcsStagingDir_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -242,20 +223,14 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.RagContextRecallInstance)) { + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.FhirStoreSource)) { return super.equals(obj); } - com.google.cloud.aiplatform.v1beta1.RagContextRecallInstance other = - (com.google.cloud.aiplatform.v1beta1.RagContextRecallInstance) obj; + com.google.cloud.discoveryengine.v1alpha.FhirStoreSource other = + (com.google.cloud.discoveryengine.v1alpha.FhirStoreSource) obj; - if (hasReference() != other.hasReference()) return false; - if (hasReference()) { - if (!getReference().equals(other.getReference())) return false; - } - if (hasContext() != other.hasContext()) return false; - if (hasContext()) { - if (!getContext().equals(other.getContext())) return false; - } + if (!getFhirStore().equals(other.getFhirStore())) return false; + if (!getGcsStagingDir().equals(other.getGcsStagingDir())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -267,84 +242,80 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (hasReference()) { - hash = (37 * hash) + REFERENCE_FIELD_NUMBER; - hash = (53 * hash) + getReference().hashCode(); - } - if (hasContext()) { - hash = (37 * hash) + CONTEXT_FIELD_NUMBER; - hash = (53 * hash) + getContext().hashCode(); - } + hash = (37 * hash) + FHIR_STORE_FIELD_NUMBER; + hash = (53 * hash) + getFhirStore().hashCode(); + hash = (37 * hash) + GCS_STAGING_DIR_FIELD_NUMBER; + hash = (53 * hash) + getGcsStagingDir().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.cloud.aiplatform.v1beta1.RagContextRecallInstance parseFrom( + public static com.google.cloud.discoveryengine.v1alpha.FhirStoreSource parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.aiplatform.v1beta1.RagContextRecallInstance parseFrom( + public static com.google.cloud.discoveryengine.v1alpha.FhirStoreSource parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.aiplatform.v1beta1.RagContextRecallInstance parseFrom( + public static com.google.cloud.discoveryengine.v1alpha.FhirStoreSource parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.aiplatform.v1beta1.RagContextRecallInstance parseFrom( + public static com.google.cloud.discoveryengine.v1alpha.FhirStoreSource parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.aiplatform.v1beta1.RagContextRecallInstance parseFrom(byte[] data) + public static com.google.cloud.discoveryengine.v1alpha.FhirStoreSource parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.aiplatform.v1beta1.RagContextRecallInstance parseFrom( + public static com.google.cloud.discoveryengine.v1alpha.FhirStoreSource parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.aiplatform.v1beta1.RagContextRecallInstance parseFrom( + public static com.google.cloud.discoveryengine.v1alpha.FhirStoreSource parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.aiplatform.v1beta1.RagContextRecallInstance parseFrom( + public static com.google.cloud.discoveryengine.v1alpha.FhirStoreSource parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.aiplatform.v1beta1.RagContextRecallInstance parseDelimitedFrom( + public static com.google.cloud.discoveryengine.v1alpha.FhirStoreSource parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.aiplatform.v1beta1.RagContextRecallInstance parseDelimitedFrom( + public static com.google.cloud.discoveryengine.v1alpha.FhirStoreSource parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } - public static com.google.cloud.aiplatform.v1beta1.RagContextRecallInstance parseFrom( + public static com.google.cloud.discoveryengine.v1alpha.FhirStoreSource parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.aiplatform.v1beta1.RagContextRecallInstance parseFrom( + public static com.google.cloud.discoveryengine.v1alpha.FhirStoreSource parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -362,7 +333,7 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.cloud.aiplatform.v1beta1.RagContextRecallInstance prototype) { + com.google.cloud.discoveryengine.v1alpha.FhirStoreSource prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -380,31 +351,31 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Spec for rag context recall instance.
+   * Cloud FhirStore source import data from.
    * 
* - * Protobuf type {@code google.cloud.aiplatform.v1beta1.RagContextRecallInstance} + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.FhirStoreSource} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.RagContextRecallInstance) - com.google.cloud.aiplatform.v1beta1.RagContextRecallInstanceOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.FhirStoreSource) + com.google.cloud.discoveryengine.v1alpha.FhirStoreSourceOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.aiplatform.v1beta1.EvaluationServiceProto - .internal_static_google_cloud_aiplatform_v1beta1_RagContextRecallInstance_descriptor; + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_FhirStoreSource_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.aiplatform.v1beta1.EvaluationServiceProto - .internal_static_google_cloud_aiplatform_v1beta1_RagContextRecallInstance_fieldAccessorTable + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_FhirStoreSource_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.aiplatform.v1beta1.RagContextRecallInstance.class, - com.google.cloud.aiplatform.v1beta1.RagContextRecallInstance.Builder.class); + com.google.cloud.discoveryengine.v1alpha.FhirStoreSource.class, + com.google.cloud.discoveryengine.v1alpha.FhirStoreSource.Builder.class); } - // Construct using com.google.cloud.aiplatform.v1beta1.RagContextRecallInstance.newBuilder() + // Construct using com.google.cloud.discoveryengine.v1alpha.FhirStoreSource.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { @@ -415,26 +386,25 @@ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { public Builder clear() { super.clear(); bitField0_ = 0; - reference_ = ""; - context_ = ""; + fhirStore_ = ""; + gcsStagingDir_ = ""; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.aiplatform.v1beta1.EvaluationServiceProto - .internal_static_google_cloud_aiplatform_v1beta1_RagContextRecallInstance_descriptor; + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_FhirStoreSource_descriptor; } @java.lang.Override - public com.google.cloud.aiplatform.v1beta1.RagContextRecallInstance - getDefaultInstanceForType() { - return com.google.cloud.aiplatform.v1beta1.RagContextRecallInstance.getDefaultInstance(); + public com.google.cloud.discoveryengine.v1alpha.FhirStoreSource getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.FhirStoreSource.getDefaultInstance(); } @java.lang.Override - public com.google.cloud.aiplatform.v1beta1.RagContextRecallInstance build() { - com.google.cloud.aiplatform.v1beta1.RagContextRecallInstance result = buildPartial(); + public com.google.cloud.discoveryengine.v1alpha.FhirStoreSource build() { + com.google.cloud.discoveryengine.v1alpha.FhirStoreSource result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -442,9 +412,9 @@ public com.google.cloud.aiplatform.v1beta1.RagContextRecallInstance build() { } @java.lang.Override - public com.google.cloud.aiplatform.v1beta1.RagContextRecallInstance buildPartial() { - com.google.cloud.aiplatform.v1beta1.RagContextRecallInstance result = - new com.google.cloud.aiplatform.v1beta1.RagContextRecallInstance(this); + public com.google.cloud.discoveryengine.v1alpha.FhirStoreSource buildPartial() { + com.google.cloud.discoveryengine.v1alpha.FhirStoreSource result = + new com.google.cloud.discoveryengine.v1alpha.FhirStoreSource(this); if (bitField0_ != 0) { buildPartial0(result); } @@ -452,19 +422,14 @@ public com.google.cloud.aiplatform.v1beta1.RagContextRecallInstance buildPartial return result; } - private void buildPartial0( - com.google.cloud.aiplatform.v1beta1.RagContextRecallInstance result) { + private void buildPartial0(com.google.cloud.discoveryengine.v1alpha.FhirStoreSource result) { int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { - result.reference_ = reference_; - to_bitField0_ |= 0x00000001; + result.fhirStore_ = fhirStore_; } if (((from_bitField0_ & 0x00000002) != 0)) { - result.context_ = context_; - to_bitField0_ |= 0x00000002; + result.gcsStagingDir_ = gcsStagingDir_; } - result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -502,25 +467,24 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.aiplatform.v1beta1.RagContextRecallInstance) { - return mergeFrom((com.google.cloud.aiplatform.v1beta1.RagContextRecallInstance) other); + if (other instanceof com.google.cloud.discoveryengine.v1alpha.FhirStoreSource) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.FhirStoreSource) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.RagContextRecallInstance other) { - if (other - == com.google.cloud.aiplatform.v1beta1.RagContextRecallInstance.getDefaultInstance()) + public Builder mergeFrom(com.google.cloud.discoveryengine.v1alpha.FhirStoreSource other) { + if (other == com.google.cloud.discoveryengine.v1alpha.FhirStoreSource.getDefaultInstance()) return this; - if (other.hasReference()) { - reference_ = other.reference_; + if (!other.getFhirStore().isEmpty()) { + fhirStore_ = other.fhirStore_; bitField0_ |= 0x00000001; onChanged(); } - if (other.hasContext()) { - context_ = other.context_; + if (!other.getGcsStagingDir().isEmpty()) { + gcsStagingDir_ = other.gcsStagingDir_; bitField0_ |= 0x00000002; onChanged(); } @@ -552,13 +516,13 @@ public Builder mergeFrom( break; case 10: { - reference_ = input.readStringRequireUtf8(); + fhirStore_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 case 18: { - context_ = input.readStringRequireUtf8(); + gcsStagingDir_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000002; break; } // case 18 @@ -581,38 +545,28 @@ public Builder mergeFrom( private int bitField0_; - private java.lang.Object reference_ = ""; + private java.lang.Object fhirStore_ = ""; /** * * *
-     * Required. Ground truth used to compare against the context.
+     * Required. The full resource name of the FHIR store to import data from, in
+     * the format of
+     * `projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_store}`.
      * 
* - * optional string reference = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string fhir_store = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * - * @return Whether the reference field is set. + * @return The fhirStore. */ - public boolean hasReference() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * - * - *
-     * Required. Ground truth used to compare against the context.
-     * 
- * - * optional string reference = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The reference. - */ - public java.lang.String getReference() { - java.lang.Object ref = reference_; + public java.lang.String getFhirStore() { + java.lang.Object ref = fhirStore_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - reference_ = s; + fhirStore_ = s; return s; } else { return (java.lang.String) ref; @@ -622,19 +576,23 @@ public java.lang.String getReference() { * * *
-     * Required. Ground truth used to compare against the context.
+     * Required. The full resource name of the FHIR store to import data from, in
+     * the format of
+     * `projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_store}`.
      * 
* - * optional string reference = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string fhir_store = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * - * @return The bytes for reference. + * @return The bytes for fhirStore. */ - public com.google.protobuf.ByteString getReferenceBytes() { - java.lang.Object ref = reference_; + public com.google.protobuf.ByteString getFhirStoreBytes() { + java.lang.Object ref = fhirStore_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - reference_ = b; + fhirStore_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -644,19 +602,23 @@ public com.google.protobuf.ByteString getReferenceBytes() { * * *
-     * Required. Ground truth used to compare against the context.
+     * Required. The full resource name of the FHIR store to import data from, in
+     * the format of
+     * `projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_store}`.
      * 
* - * optional string reference = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string fhir_store = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * - * @param value The reference to set. + * @param value The fhirStore to set. * @return This builder for chaining. */ - public Builder setReference(java.lang.String value) { + public Builder setFhirStore(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - reference_ = value; + fhirStore_ = value; bitField0_ |= 0x00000001; onChanged(); return this; @@ -665,15 +627,19 @@ public Builder setReference(java.lang.String value) { * * *
-     * Required. Ground truth used to compare against the context.
+     * Required. The full resource name of the FHIR store to import data from, in
+     * the format of
+     * `projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_store}`.
      * 
* - * optional string reference = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string fhir_store = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return This builder for chaining. */ - public Builder clearReference() { - reference_ = getDefaultInstance().getReference(); + public Builder clearFhirStore() { + fhirStore_ = getDefaultInstance().getFhirStore(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; @@ -682,57 +648,49 @@ public Builder clearReference() { * * *
-     * Required. Ground truth used to compare against the context.
+     * Required. The full resource name of the FHIR store to import data from, in
+     * the format of
+     * `projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_store}`.
      * 
* - * optional string reference = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string fhir_store = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * - * @param value The bytes for reference to set. + * @param value The bytes for fhirStore to set. * @return This builder for chaining. */ - public Builder setReferenceBytes(com.google.protobuf.ByteString value) { + public Builder setFhirStoreBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); - reference_ = value; + fhirStore_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } - private java.lang.Object context_ = ""; - /** - * - * - *
-     * Required. Retrieved facts from RAG pipeline as context to be evaluated.
-     * 
- * - * optional string context = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return Whether the context field is set. - */ - public boolean hasContext() { - return ((bitField0_ & 0x00000002) != 0); - } + private java.lang.Object gcsStagingDir_ = ""; /** * * *
-     * Required. Retrieved facts from RAG pipeline as context to be evaluated.
+     * Intermediate Cloud Storage directory used for the import with a length
+     * limit of 2,000 characters. Can be specified if one wants to have the
+     * FhirStore export to a specific Cloud Storage directory.
      * 
* - * optional string context = 2 [(.google.api.field_behavior) = REQUIRED]; + * string gcs_staging_dir = 2; * - * @return The context. + * @return The gcsStagingDir. */ - public java.lang.String getContext() { - java.lang.Object ref = context_; + public java.lang.String getGcsStagingDir() { + java.lang.Object ref = gcsStagingDir_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - context_ = s; + gcsStagingDir_ = s; return s; } else { return (java.lang.String) ref; @@ -742,19 +700,21 @@ public java.lang.String getContext() { * * *
-     * Required. Retrieved facts from RAG pipeline as context to be evaluated.
+     * Intermediate Cloud Storage directory used for the import with a length
+     * limit of 2,000 characters. Can be specified if one wants to have the
+     * FhirStore export to a specific Cloud Storage directory.
      * 
* - * optional string context = 2 [(.google.api.field_behavior) = REQUIRED]; + * string gcs_staging_dir = 2; * - * @return The bytes for context. + * @return The bytes for gcsStagingDir. */ - public com.google.protobuf.ByteString getContextBytes() { - java.lang.Object ref = context_; + public com.google.protobuf.ByteString getGcsStagingDirBytes() { + java.lang.Object ref = gcsStagingDir_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - context_ = b; + gcsStagingDir_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -764,19 +724,21 @@ public com.google.protobuf.ByteString getContextBytes() { * * *
-     * Required. Retrieved facts from RAG pipeline as context to be evaluated.
+     * Intermediate Cloud Storage directory used for the import with a length
+     * limit of 2,000 characters. Can be specified if one wants to have the
+     * FhirStore export to a specific Cloud Storage directory.
      * 
* - * optional string context = 2 [(.google.api.field_behavior) = REQUIRED]; + * string gcs_staging_dir = 2; * - * @param value The context to set. + * @param value The gcsStagingDir to set. * @return This builder for chaining. */ - public Builder setContext(java.lang.String value) { + public Builder setGcsStagingDir(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - context_ = value; + gcsStagingDir_ = value; bitField0_ |= 0x00000002; onChanged(); return this; @@ -785,15 +747,17 @@ public Builder setContext(java.lang.String value) { * * *
-     * Required. Retrieved facts from RAG pipeline as context to be evaluated.
+     * Intermediate Cloud Storage directory used for the import with a length
+     * limit of 2,000 characters. Can be specified if one wants to have the
+     * FhirStore export to a specific Cloud Storage directory.
      * 
* - * optional string context = 2 [(.google.api.field_behavior) = REQUIRED]; + * string gcs_staging_dir = 2; * * @return This builder for chaining. */ - public Builder clearContext() { - context_ = getDefaultInstance().getContext(); + public Builder clearGcsStagingDir() { + gcsStagingDir_ = getDefaultInstance().getGcsStagingDir(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; @@ -802,20 +766,22 @@ public Builder clearContext() { * * *
-     * Required. Retrieved facts from RAG pipeline as context to be evaluated.
+     * Intermediate Cloud Storage directory used for the import with a length
+     * limit of 2,000 characters. Can be specified if one wants to have the
+     * FhirStore export to a specific Cloud Storage directory.
      * 
* - * optional string context = 2 [(.google.api.field_behavior) = REQUIRED]; + * string gcs_staging_dir = 2; * - * @param value The bytes for context to set. + * @param value The bytes for gcsStagingDir to set. * @return This builder for chaining. */ - public Builder setContextBytes(com.google.protobuf.ByteString value) { + public Builder setGcsStagingDirBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); - context_ = value; + gcsStagingDir_ = value; bitField0_ |= 0x00000002; onChanged(); return this; @@ -832,25 +798,24 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.RagContextRecallInstance) + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.FhirStoreSource) } - // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.RagContextRecallInstance) - private static final com.google.cloud.aiplatform.v1beta1.RagContextRecallInstance - DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.FhirStoreSource) + private static final com.google.cloud.discoveryengine.v1alpha.FhirStoreSource DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.RagContextRecallInstance(); + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.FhirStoreSource(); } - public static com.google.cloud.aiplatform.v1beta1.RagContextRecallInstance getDefaultInstance() { + public static com.google.cloud.discoveryengine.v1alpha.FhirStoreSource getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public RagContextRecallInstance parsePartialFrom( + public FhirStoreSource parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -869,17 +834,17 @@ public RagContextRecallInstance parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.cloud.aiplatform.v1beta1.RagContextRecallInstance getDefaultInstanceForType() { + public com.google.cloud.discoveryengine.v1alpha.FhirStoreSource getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/FhirStoreSourceOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/FhirStoreSourceOrBuilder.java new file mode 100644 index 000000000000..a461903df007 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/FhirStoreSourceOrBuilder.java @@ -0,0 +1,88 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/import_config.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.discoveryengine.v1alpha; + +public interface FhirStoreSourceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.FhirStoreSource) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The full resource name of the FHIR store to import data from, in
+   * the format of
+   * `projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_store}`.
+   * 
+ * + * + * string fhir_store = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The fhirStore. + */ + java.lang.String getFhirStore(); + /** + * + * + *
+   * Required. The full resource name of the FHIR store to import data from, in
+   * the format of
+   * `projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_store}`.
+   * 
+ * + * + * string fhir_store = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for fhirStore. + */ + com.google.protobuf.ByteString getFhirStoreBytes(); + + /** + * + * + *
+   * Intermediate Cloud Storage directory used for the import with a length
+   * limit of 2,000 characters. Can be specified if one wants to have the
+   * FhirStore export to a specific Cloud Storage directory.
+   * 
+ * + * string gcs_staging_dir = 2; + * + * @return The gcsStagingDir. + */ + java.lang.String getGcsStagingDir(); + /** + * + * + *
+   * Intermediate Cloud Storage directory used for the import with a length
+   * limit of 2,000 characters. Can be specified if one wants to have the
+   * FhirStore export to a specific Cloud Storage directory.
+   * 
+ * + * string gcs_staging_dir = 2; + * + * @return The bytes for gcsStagingDir. + */ + com.google.protobuf.ByteString getGcsStagingDirBytes(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/FirestoreSource.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/FirestoreSource.java new file mode 100644 index 000000000000..a66472a500cb --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/FirestoreSource.java @@ -0,0 +1,1235 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/import_config.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * Firestore source import data from.
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.FirestoreSource} + */ +public final class FirestoreSource extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.FirestoreSource) + FirestoreSourceOrBuilder { + private static final long serialVersionUID = 0L; + // Use FirestoreSource.newBuilder() to construct. + private FirestoreSource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FirestoreSource() { + projectId_ = ""; + databaseId_ = ""; + collectionId_ = ""; + gcsStagingDir_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FirestoreSource(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_FirestoreSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_FirestoreSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.FirestoreSource.class, + com.google.cloud.discoveryengine.v1alpha.FirestoreSource.Builder.class); + } + + public static final int PROJECT_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object projectId_ = ""; + /** + * + * + *
+   * The project ID that the Cloud SQL source is in with a length limit of 128
+   * characters. If not specified, inherits the project ID from the parent
+   * request.
+   * 
+ * + * string project_id = 1; + * + * @return The projectId. + */ + @java.lang.Override + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + 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(); + projectId_ = s; + return s; + } + } + /** + * + * + *
+   * The project ID that the Cloud SQL source is in with a length limit of 128
+   * characters. If not specified, inherits the project ID from the parent
+   * request.
+   * 
+ * + * string project_id = 1; + * + * @return The bytes for projectId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATABASE_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object databaseId_ = ""; + /** + * + * + *
+   * Required. The Firestore database to copy the data from with a length limit
+   * of 256 characters.
+   * 
+ * + * string database_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The databaseId. + */ + @java.lang.Override + public java.lang.String getDatabaseId() { + java.lang.Object ref = databaseId_; + 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(); + databaseId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The Firestore database to copy the data from with a length limit
+   * of 256 characters.
+   * 
+ * + * string database_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for databaseId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDatabaseIdBytes() { + java.lang.Object ref = databaseId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + databaseId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int COLLECTION_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object collectionId_ = ""; + /** + * + * + *
+   * Required. The Firestore collection to copy the data from with a length
+   * limit of 1,500 characters.
+   * 
+ * + * string collection_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The collectionId. + */ + @java.lang.Override + public java.lang.String getCollectionId() { + java.lang.Object ref = collectionId_; + 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(); + collectionId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The Firestore collection to copy the data from with a length
+   * limit of 1,500 characters.
+   * 
+ * + * string collection_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for collectionId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCollectionIdBytes() { + java.lang.Object ref = collectionId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + collectionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GCS_STAGING_DIR_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object gcsStagingDir_ = ""; + /** + * + * + *
+   * Intermediate Cloud Storage directory used for the import with a length
+   * limit of 2,000 characters. Can be specified if one wants to have the
+   * Firestore export to a specific Cloud Storage directory.
+   *
+   * Please ensure that the Firestore service account has the necessary Cloud
+   * Storage Admin permissions to access the specified Cloud Storage directory.
+   * 
+ * + * string gcs_staging_dir = 4; + * + * @return The gcsStagingDir. + */ + @java.lang.Override + public java.lang.String getGcsStagingDir() { + java.lang.Object ref = gcsStagingDir_; + 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(); + gcsStagingDir_ = s; + return s; + } + } + /** + * + * + *
+   * Intermediate Cloud Storage directory used for the import with a length
+   * limit of 2,000 characters. Can be specified if one wants to have the
+   * Firestore export to a specific Cloud Storage directory.
+   *
+   * Please ensure that the Firestore service account has the necessary Cloud
+   * Storage Admin permissions to access the specified Cloud Storage directory.
+   * 
+ * + * string gcs_staging_dir = 4; + * + * @return The bytes for gcsStagingDir. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGcsStagingDirBytes() { + java.lang.Object ref = gcsStagingDir_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + gcsStagingDir_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(databaseId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, databaseId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(collectionId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, collectionId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gcsStagingDir_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, gcsStagingDir_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(databaseId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, databaseId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(collectionId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, collectionId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gcsStagingDir_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, gcsStagingDir_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.FirestoreSource)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.FirestoreSource other = + (com.google.cloud.discoveryengine.v1alpha.FirestoreSource) obj; + + if (!getProjectId().equals(other.getProjectId())) return false; + if (!getDatabaseId().equals(other.getDatabaseId())) return false; + if (!getCollectionId().equals(other.getCollectionId())) return false; + if (!getGcsStagingDir().equals(other.getGcsStagingDir())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PROJECT_ID_FIELD_NUMBER; + hash = (53 * hash) + getProjectId().hashCode(); + hash = (37 * hash) + DATABASE_ID_FIELD_NUMBER; + hash = (53 * hash) + getDatabaseId().hashCode(); + hash = (37 * hash) + COLLECTION_ID_FIELD_NUMBER; + hash = (53 * hash) + getCollectionId().hashCode(); + hash = (37 * hash) + GCS_STAGING_DIR_FIELD_NUMBER; + hash = (53 * hash) + getGcsStagingDir().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.FirestoreSource parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.FirestoreSource parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.FirestoreSource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.FirestoreSource parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.FirestoreSource parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.FirestoreSource parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.FirestoreSource parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.FirestoreSource parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.FirestoreSource parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.FirestoreSource parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.FirestoreSource parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.FirestoreSource parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.FirestoreSource prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Firestore source import data from.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.FirestoreSource} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.FirestoreSource) + com.google.cloud.discoveryengine.v1alpha.FirestoreSourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_FirestoreSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_FirestoreSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.FirestoreSource.class, + com.google.cloud.discoveryengine.v1alpha.FirestoreSource.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1alpha.FirestoreSource.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + projectId_ = ""; + databaseId_ = ""; + collectionId_ = ""; + gcsStagingDir_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_FirestoreSource_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.FirestoreSource getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.FirestoreSource.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.FirestoreSource build() { + com.google.cloud.discoveryengine.v1alpha.FirestoreSource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.FirestoreSource buildPartial() { + com.google.cloud.discoveryengine.v1alpha.FirestoreSource result = + new com.google.cloud.discoveryengine.v1alpha.FirestoreSource(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.discoveryengine.v1alpha.FirestoreSource result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.projectId_ = projectId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.databaseId_ = databaseId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.collectionId_ = collectionId_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.gcsStagingDir_ = gcsStagingDir_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.FirestoreSource) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.FirestoreSource) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1alpha.FirestoreSource other) { + if (other == com.google.cloud.discoveryengine.v1alpha.FirestoreSource.getDefaultInstance()) + return this; + if (!other.getProjectId().isEmpty()) { + projectId_ = other.projectId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDatabaseId().isEmpty()) { + databaseId_ = other.databaseId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getCollectionId().isEmpty()) { + collectionId_ = other.collectionId_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getGcsStagingDir().isEmpty()) { + gcsStagingDir_ = other.gcsStagingDir_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + projectId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + databaseId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + collectionId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + gcsStagingDir_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object projectId_ = ""; + /** + * + * + *
+     * The project ID that the Cloud SQL source is in with a length limit of 128
+     * characters. If not specified, inherits the project ID from the parent
+     * request.
+     * 
+ * + * string project_id = 1; + * + * @return The projectId. + */ + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The project ID that the Cloud SQL source is in with a length limit of 128
+     * characters. If not specified, inherits the project ID from the parent
+     * request.
+     * 
+ * + * string project_id = 1; + * + * @return The bytes for projectId. + */ + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The project ID that the Cloud SQL source is in with a length limit of 128
+     * characters. If not specified, inherits the project ID from the parent
+     * request.
+     * 
+ * + * string project_id = 1; + * + * @param value The projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + projectId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The project ID that the Cloud SQL source is in with a length limit of 128
+     * characters. If not specified, inherits the project ID from the parent
+     * request.
+     * 
+ * + * string project_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearProjectId() { + projectId_ = getDefaultInstance().getProjectId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The project ID that the Cloud SQL source is in with a length limit of 128
+     * characters. If not specified, inherits the project ID from the parent
+     * request.
+     * 
+ * + * string project_id = 1; + * + * @param value The bytes for projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + projectId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object databaseId_ = ""; + /** + * + * + *
+     * Required. The Firestore database to copy the data from with a length limit
+     * of 256 characters.
+     * 
+ * + * string database_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The databaseId. + */ + public java.lang.String getDatabaseId() { + java.lang.Object ref = databaseId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + databaseId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The Firestore database to copy the data from with a length limit
+     * of 256 characters.
+     * 
+ * + * string database_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for databaseId. + */ + public com.google.protobuf.ByteString getDatabaseIdBytes() { + java.lang.Object ref = databaseId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + databaseId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The Firestore database to copy the data from with a length limit
+     * of 256 characters.
+     * 
+ * + * string database_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The databaseId to set. + * @return This builder for chaining. + */ + public Builder setDatabaseId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + databaseId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Firestore database to copy the data from with a length limit
+     * of 256 characters.
+     * 
+ * + * string database_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDatabaseId() { + databaseId_ = getDefaultInstance().getDatabaseId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Firestore database to copy the data from with a length limit
+     * of 256 characters.
+     * 
+ * + * string database_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for databaseId to set. + * @return This builder for chaining. + */ + public Builder setDatabaseIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + databaseId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object collectionId_ = ""; + /** + * + * + *
+     * Required. The Firestore collection to copy the data from with a length
+     * limit of 1,500 characters.
+     * 
+ * + * string collection_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The collectionId. + */ + public java.lang.String getCollectionId() { + java.lang.Object ref = collectionId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + collectionId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The Firestore collection to copy the data from with a length
+     * limit of 1,500 characters.
+     * 
+ * + * string collection_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for collectionId. + */ + public com.google.protobuf.ByteString getCollectionIdBytes() { + java.lang.Object ref = collectionId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + collectionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The Firestore collection to copy the data from with a length
+     * limit of 1,500 characters.
+     * 
+ * + * string collection_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The collectionId to set. + * @return This builder for chaining. + */ + public Builder setCollectionId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + collectionId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Firestore collection to copy the data from with a length
+     * limit of 1,500 characters.
+     * 
+ * + * string collection_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearCollectionId() { + collectionId_ = getDefaultInstance().getCollectionId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Firestore collection to copy the data from with a length
+     * limit of 1,500 characters.
+     * 
+ * + * string collection_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for collectionId to set. + * @return This builder for chaining. + */ + public Builder setCollectionIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + collectionId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object gcsStagingDir_ = ""; + /** + * + * + *
+     * Intermediate Cloud Storage directory used for the import with a length
+     * limit of 2,000 characters. Can be specified if one wants to have the
+     * Firestore export to a specific Cloud Storage directory.
+     *
+     * Please ensure that the Firestore service account has the necessary Cloud
+     * Storage Admin permissions to access the specified Cloud Storage directory.
+     * 
+ * + * string gcs_staging_dir = 4; + * + * @return The gcsStagingDir. + */ + public java.lang.String getGcsStagingDir() { + java.lang.Object ref = gcsStagingDir_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gcsStagingDir_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Intermediate Cloud Storage directory used for the import with a length
+     * limit of 2,000 characters. Can be specified if one wants to have the
+     * Firestore export to a specific Cloud Storage directory.
+     *
+     * Please ensure that the Firestore service account has the necessary Cloud
+     * Storage Admin permissions to access the specified Cloud Storage directory.
+     * 
+ * + * string gcs_staging_dir = 4; + * + * @return The bytes for gcsStagingDir. + */ + public com.google.protobuf.ByteString getGcsStagingDirBytes() { + java.lang.Object ref = gcsStagingDir_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + gcsStagingDir_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Intermediate Cloud Storage directory used for the import with a length
+     * limit of 2,000 characters. Can be specified if one wants to have the
+     * Firestore export to a specific Cloud Storage directory.
+     *
+     * Please ensure that the Firestore service account has the necessary Cloud
+     * Storage Admin permissions to access the specified Cloud Storage directory.
+     * 
+ * + * string gcs_staging_dir = 4; + * + * @param value The gcsStagingDir to set. + * @return This builder for chaining. + */ + public Builder setGcsStagingDir(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + gcsStagingDir_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Intermediate Cloud Storage directory used for the import with a length
+     * limit of 2,000 characters. Can be specified if one wants to have the
+     * Firestore export to a specific Cloud Storage directory.
+     *
+     * Please ensure that the Firestore service account has the necessary Cloud
+     * Storage Admin permissions to access the specified Cloud Storage directory.
+     * 
+ * + * string gcs_staging_dir = 4; + * + * @return This builder for chaining. + */ + public Builder clearGcsStagingDir() { + gcsStagingDir_ = getDefaultInstance().getGcsStagingDir(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Intermediate Cloud Storage directory used for the import with a length
+     * limit of 2,000 characters. Can be specified if one wants to have the
+     * Firestore export to a specific Cloud Storage directory.
+     *
+     * Please ensure that the Firestore service account has the necessary Cloud
+     * Storage Admin permissions to access the specified Cloud Storage directory.
+     * 
+ * + * string gcs_staging_dir = 4; + * + * @param value The bytes for gcsStagingDir to set. + * @return This builder for chaining. + */ + public Builder setGcsStagingDirBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + gcsStagingDir_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.FirestoreSource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.FirestoreSource) + private static final com.google.cloud.discoveryengine.v1alpha.FirestoreSource DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.FirestoreSource(); + } + + public static com.google.cloud.discoveryengine.v1alpha.FirestoreSource getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FirestoreSource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.FirestoreSource getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/FirestoreSourceOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/FirestoreSourceOrBuilder.java new file mode 100644 index 000000000000..6f2341e01b35 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/FirestoreSourceOrBuilder.java @@ -0,0 +1,144 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/import_config.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.discoveryengine.v1alpha; + +public interface FirestoreSourceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.FirestoreSource) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The project ID that the Cloud SQL source is in with a length limit of 128
+   * characters. If not specified, inherits the project ID from the parent
+   * request.
+   * 
+ * + * string project_id = 1; + * + * @return The projectId. + */ + java.lang.String getProjectId(); + /** + * + * + *
+   * The project ID that the Cloud SQL source is in with a length limit of 128
+   * characters. If not specified, inherits the project ID from the parent
+   * request.
+   * 
+ * + * string project_id = 1; + * + * @return The bytes for projectId. + */ + com.google.protobuf.ByteString getProjectIdBytes(); + + /** + * + * + *
+   * Required. The Firestore database to copy the data from with a length limit
+   * of 256 characters.
+   * 
+ * + * string database_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The databaseId. + */ + java.lang.String getDatabaseId(); + /** + * + * + *
+   * Required. The Firestore database to copy the data from with a length limit
+   * of 256 characters.
+   * 
+ * + * string database_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for databaseId. + */ + com.google.protobuf.ByteString getDatabaseIdBytes(); + + /** + * + * + *
+   * Required. The Firestore collection to copy the data from with a length
+   * limit of 1,500 characters.
+   * 
+ * + * string collection_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The collectionId. + */ + java.lang.String getCollectionId(); + /** + * + * + *
+   * Required. The Firestore collection to copy the data from with a length
+   * limit of 1,500 characters.
+   * 
+ * + * string collection_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for collectionId. + */ + com.google.protobuf.ByteString getCollectionIdBytes(); + + /** + * + * + *
+   * Intermediate Cloud Storage directory used for the import with a length
+   * limit of 2,000 characters. Can be specified if one wants to have the
+   * Firestore export to a specific Cloud Storage directory.
+   *
+   * Please ensure that the Firestore service account has the necessary Cloud
+   * Storage Admin permissions to access the specified Cloud Storage directory.
+   * 
+ * + * string gcs_staging_dir = 4; + * + * @return The gcsStagingDir. + */ + java.lang.String getGcsStagingDir(); + /** + * + * + *
+   * Intermediate Cloud Storage directory used for the import with a length
+   * limit of 2,000 characters. Can be specified if one wants to have the
+   * Firestore export to a specific Cloud Storage directory.
+   *
+   * Please ensure that the Firestore service account has the necessary Cloud
+   * Storage Admin permissions to access the specified Cloud Storage directory.
+   * 
+ * + * string gcs_staging_dir = 4; + * + * @return The bytes for gcsStagingDir. + */ + com.google.protobuf.ByteString getGcsStagingDirBytes(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/GetProcessedDocumentRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/GetProcessedDocumentRequest.java new file mode 100644 index 000000000000..9dfd793f3c0a --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/GetProcessedDocumentRequest.java @@ -0,0 +1,1390 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/document_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * Request message for
+ * [DocumentService.GetDocument][google.cloud.discoveryengine.v1alpha.DocumentService.GetDocument]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest} + */ +public final class GetProcessedDocumentRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest) + GetProcessedDocumentRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetProcessedDocumentRequest.newBuilder() to construct. + private GetProcessedDocumentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetProcessedDocumentRequest() { + name_ = ""; + processedDocumentType_ = 0; + processedDocumentFormat_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetProcessedDocumentRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.DocumentServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_GetProcessedDocumentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.DocumentServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_GetProcessedDocumentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest.class, + com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest.Builder.class); + } + + /** + * + * + *
+   * The type of processing to return in the response.
+   * 
+ * + * Protobuf enum {@code + * google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest.ProcessedDocumentType} + */ + public enum ProcessedDocumentType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Default value.
+     * 
+ * + * PROCESSED_DOCUMENT_TYPE_UNSPECIFIED = 0; + */ + PROCESSED_DOCUMENT_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Available for all data store parsing configs.
+     * 
+ * + * PARSED_DOCUMENT = 1; + */ + PARSED_DOCUMENT(1), + /** + * + * + *
+     * Only available if ChunkingConfig is enabeld on the data store.
+     * 
+ * + * CHUNKED_DOCUMENT = 2; + */ + CHUNKED_DOCUMENT(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Default value.
+     * 
+ * + * PROCESSED_DOCUMENT_TYPE_UNSPECIFIED = 0; + */ + public static final int PROCESSED_DOCUMENT_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Available for all data store parsing configs.
+     * 
+ * + * PARSED_DOCUMENT = 1; + */ + public static final int PARSED_DOCUMENT_VALUE = 1; + /** + * + * + *
+     * Only available if ChunkingConfig is enabeld on the data store.
+     * 
+ * + * CHUNKED_DOCUMENT = 2; + */ + public static final int CHUNKED_DOCUMENT_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ProcessedDocumentType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ProcessedDocumentType forNumber(int value) { + switch (value) { + case 0: + return PROCESSED_DOCUMENT_TYPE_UNSPECIFIED; + case 1: + return PARSED_DOCUMENT; + case 2: + return CHUNKED_DOCUMENT; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ProcessedDocumentType findValueByNumber(int number) { + return ProcessedDocumentType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final ProcessedDocumentType[] VALUES = values(); + + public static ProcessedDocumentType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ProcessedDocumentType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest.ProcessedDocumentType) + } + + /** + * + * + *
+   * The format of the returned processed document. If unspecified, defaults to
+   * JSON.
+   * 
+ * + * Protobuf enum {@code + * google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest.ProcessedDocumentFormat} + */ + public enum ProcessedDocumentFormat implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Default value.
+     * 
+ * + * PROCESSED_DOCUMENT_FORMAT_UNSPECIFIED = 0; + */ + PROCESSED_DOCUMENT_FORMAT_UNSPECIFIED(0), + /** + * + * + *
+     * output format will be a JSON string representation of processed document.
+     * 
+ * + * JSON = 1; + */ + JSON(1), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Default value.
+     * 
+ * + * PROCESSED_DOCUMENT_FORMAT_UNSPECIFIED = 0; + */ + public static final int PROCESSED_DOCUMENT_FORMAT_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * output format will be a JSON string representation of processed document.
+     * 
+ * + * JSON = 1; + */ + public static final int JSON_VALUE = 1; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ProcessedDocumentFormat valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ProcessedDocumentFormat forNumber(int value) { + switch (value) { + case 0: + return PROCESSED_DOCUMENT_FORMAT_UNSPECIFIED; + case 1: + return JSON; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ProcessedDocumentFormat findValueByNumber(int number) { + return ProcessedDocumentFormat.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest.getDescriptor() + .getEnumTypes() + .get(1); + } + + private static final ProcessedDocumentFormat[] VALUES = values(); + + public static ProcessedDocumentFormat valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ProcessedDocumentFormat(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest.ProcessedDocumentFormat) + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Full resource name of
+   * [Document][google.cloud.discoveryengine.v1alpha.Document], such as
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`.
+   *
+   * If the caller does not have permission to access the
+   * [Document][google.cloud.discoveryengine.v1alpha.Document], regardless of
+   * whether or not it exists, a `PERMISSION_DENIED` error is returned.
+   *
+   * If the requested [Document][google.cloud.discoveryengine.v1alpha.Document]
+   * does not exist, a `NOT_FOUND` error is returned.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Full resource name of
+   * [Document][google.cloud.discoveryengine.v1alpha.Document], such as
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`.
+   *
+   * If the caller does not have permission to access the
+   * [Document][google.cloud.discoveryengine.v1alpha.Document], regardless of
+   * whether or not it exists, a `PERMISSION_DENIED` error is returned.
+   *
+   * If the requested [Document][google.cloud.discoveryengine.v1alpha.Document]
+   * does not exist, a `NOT_FOUND` error is returned.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROCESSED_DOCUMENT_TYPE_FIELD_NUMBER = 2; + private int processedDocumentType_ = 0; + /** + * + * + *
+   * Required. What type of processing to return.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest.ProcessedDocumentType processed_document_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for processedDocumentType. + */ + @java.lang.Override + public int getProcessedDocumentTypeValue() { + return processedDocumentType_; + } + /** + * + * + *
+   * Required. What type of processing to return.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest.ProcessedDocumentType processed_document_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The processedDocumentType. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest.ProcessedDocumentType + getProcessedDocumentType() { + com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest.ProcessedDocumentType + result = + com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest + .ProcessedDocumentType.forNumber(processedDocumentType_); + return result == null + ? com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest.ProcessedDocumentType + .UNRECOGNIZED + : result; + } + + public static final int PROCESSED_DOCUMENT_FORMAT_FIELD_NUMBER = 3; + private int processedDocumentFormat_ = 0; + /** + * + * + *
+   * What format output should be.  If unspecified, defaults to JSON.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest.ProcessedDocumentFormat processed_document_format = 3; + * + * + * @return The enum numeric value on the wire for processedDocumentFormat. + */ + @java.lang.Override + public int getProcessedDocumentFormatValue() { + return processedDocumentFormat_; + } + /** + * + * + *
+   * What format output should be.  If unspecified, defaults to JSON.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest.ProcessedDocumentFormat processed_document_format = 3; + * + * + * @return The processedDocumentFormat. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest + .ProcessedDocumentFormat + getProcessedDocumentFormat() { + com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest.ProcessedDocumentFormat + result = + com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest + .ProcessedDocumentFormat.forNumber(processedDocumentFormat_); + return result == null + ? com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest + .ProcessedDocumentFormat.UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (processedDocumentType_ + != com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest + .ProcessedDocumentType.PROCESSED_DOCUMENT_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, processedDocumentType_); + } + if (processedDocumentFormat_ + != com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest + .ProcessedDocumentFormat.PROCESSED_DOCUMENT_FORMAT_UNSPECIFIED + .getNumber()) { + output.writeEnum(3, processedDocumentFormat_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (processedDocumentType_ + != com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest + .ProcessedDocumentType.PROCESSED_DOCUMENT_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, processedDocumentType_); + } + if (processedDocumentFormat_ + != com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest + .ProcessedDocumentFormat.PROCESSED_DOCUMENT_FORMAT_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, processedDocumentFormat_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest other = + (com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (processedDocumentType_ != other.processedDocumentType_) return false; + if (processedDocumentFormat_ != other.processedDocumentFormat_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + PROCESSED_DOCUMENT_TYPE_FIELD_NUMBER; + hash = (53 * hash) + processedDocumentType_; + hash = (37 * hash) + PROCESSED_DOCUMENT_FORMAT_FIELD_NUMBER; + hash = (53 * hash) + processedDocumentFormat_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for
+   * [DocumentService.GetDocument][google.cloud.discoveryengine.v1alpha.DocumentService.GetDocument]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest) + com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.DocumentServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_GetProcessedDocumentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.DocumentServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_GetProcessedDocumentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest.class, + com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + processedDocumentType_ = 0; + processedDocumentFormat_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.DocumentServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_GetProcessedDocumentRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest build() { + com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest buildPartial() { + com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest result = + new com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.processedDocumentType_ = processedDocumentType_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.processedDocumentFormat_ = processedDocumentFormat_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.processedDocumentType_ != 0) { + setProcessedDocumentTypeValue(other.getProcessedDocumentTypeValue()); + } + if (other.processedDocumentFormat_ != 0) { + setProcessedDocumentFormatValue(other.getProcessedDocumentFormatValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + processedDocumentType_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + processedDocumentFormat_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Full resource name of
+     * [Document][google.cloud.discoveryengine.v1alpha.Document], such as
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`.
+     *
+     * If the caller does not have permission to access the
+     * [Document][google.cloud.discoveryengine.v1alpha.Document], regardless of
+     * whether or not it exists, a `PERMISSION_DENIED` error is returned.
+     *
+     * If the requested [Document][google.cloud.discoveryengine.v1alpha.Document]
+     * does not exist, a `NOT_FOUND` error is returned.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Full resource name of
+     * [Document][google.cloud.discoveryengine.v1alpha.Document], such as
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`.
+     *
+     * If the caller does not have permission to access the
+     * [Document][google.cloud.discoveryengine.v1alpha.Document], regardless of
+     * whether or not it exists, a `PERMISSION_DENIED` error is returned.
+     *
+     * If the requested [Document][google.cloud.discoveryengine.v1alpha.Document]
+     * does not exist, a `NOT_FOUND` error is returned.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Full resource name of
+     * [Document][google.cloud.discoveryengine.v1alpha.Document], such as
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`.
+     *
+     * If the caller does not have permission to access the
+     * [Document][google.cloud.discoveryengine.v1alpha.Document], regardless of
+     * whether or not it exists, a `PERMISSION_DENIED` error is returned.
+     *
+     * If the requested [Document][google.cloud.discoveryengine.v1alpha.Document]
+     * does not exist, a `NOT_FOUND` error is returned.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Full resource name of
+     * [Document][google.cloud.discoveryengine.v1alpha.Document], such as
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`.
+     *
+     * If the caller does not have permission to access the
+     * [Document][google.cloud.discoveryengine.v1alpha.Document], regardless of
+     * whether or not it exists, a `PERMISSION_DENIED` error is returned.
+     *
+     * If the requested [Document][google.cloud.discoveryengine.v1alpha.Document]
+     * does not exist, a `NOT_FOUND` error is returned.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Full resource name of
+     * [Document][google.cloud.discoveryengine.v1alpha.Document], such as
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`.
+     *
+     * If the caller does not have permission to access the
+     * [Document][google.cloud.discoveryengine.v1alpha.Document], regardless of
+     * whether or not it exists, a `PERMISSION_DENIED` error is returned.
+     *
+     * If the requested [Document][google.cloud.discoveryengine.v1alpha.Document]
+     * does not exist, a `NOT_FOUND` error is returned.
+     * 
+ * + * + * 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. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int processedDocumentType_ = 0; + /** + * + * + *
+     * Required. What type of processing to return.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest.ProcessedDocumentType processed_document_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for processedDocumentType. + */ + @java.lang.Override + public int getProcessedDocumentTypeValue() { + return processedDocumentType_; + } + /** + * + * + *
+     * Required. What type of processing to return.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest.ProcessedDocumentType processed_document_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for processedDocumentType to set. + * @return This builder for chaining. + */ + public Builder setProcessedDocumentTypeValue(int value) { + processedDocumentType_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. What type of processing to return.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest.ProcessedDocumentType processed_document_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The processedDocumentType. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest + .ProcessedDocumentType + getProcessedDocumentType() { + com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest.ProcessedDocumentType + result = + com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest + .ProcessedDocumentType.forNumber(processedDocumentType_); + return result == null + ? com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest + .ProcessedDocumentType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Required. What type of processing to return.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest.ProcessedDocumentType processed_document_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The processedDocumentType to set. + * @return This builder for chaining. + */ + public Builder setProcessedDocumentType( + com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest.ProcessedDocumentType + value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + processedDocumentType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. What type of processing to return.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest.ProcessedDocumentType processed_document_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearProcessedDocumentType() { + bitField0_ = (bitField0_ & ~0x00000002); + processedDocumentType_ = 0; + onChanged(); + return this; + } + + private int processedDocumentFormat_ = 0; + /** + * + * + *
+     * What format output should be.  If unspecified, defaults to JSON.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest.ProcessedDocumentFormat processed_document_format = 3; + * + * + * @return The enum numeric value on the wire for processedDocumentFormat. + */ + @java.lang.Override + public int getProcessedDocumentFormatValue() { + return processedDocumentFormat_; + } + /** + * + * + *
+     * What format output should be.  If unspecified, defaults to JSON.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest.ProcessedDocumentFormat processed_document_format = 3; + * + * + * @param value The enum numeric value on the wire for processedDocumentFormat to set. + * @return This builder for chaining. + */ + public Builder setProcessedDocumentFormatValue(int value) { + processedDocumentFormat_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * What format output should be.  If unspecified, defaults to JSON.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest.ProcessedDocumentFormat processed_document_format = 3; + * + * + * @return The processedDocumentFormat. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest + .ProcessedDocumentFormat + getProcessedDocumentFormat() { + com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest.ProcessedDocumentFormat + result = + com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest + .ProcessedDocumentFormat.forNumber(processedDocumentFormat_); + return result == null + ? com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest + .ProcessedDocumentFormat.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * What format output should be.  If unspecified, defaults to JSON.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest.ProcessedDocumentFormat processed_document_format = 3; + * + * + * @param value The processedDocumentFormat to set. + * @return This builder for chaining. + */ + public Builder setProcessedDocumentFormat( + com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest.ProcessedDocumentFormat + value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + processedDocumentFormat_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * What format output should be.  If unspecified, defaults to JSON.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest.ProcessedDocumentFormat processed_document_format = 3; + * + * + * @return This builder for chaining. + */ + public Builder clearProcessedDocumentFormat() { + bitField0_ = (bitField0_ & ~0x00000004); + processedDocumentFormat_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest) + private static final com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest(); + } + + public static com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetProcessedDocumentRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/GetProcessedDocumentRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/GetProcessedDocumentRequestOrBuilder.java new file mode 100644 index 000000000000..772e64549cda --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/GetProcessedDocumentRequestOrBuilder.java @@ -0,0 +1,133 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/document_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.discoveryengine.v1alpha; + +public interface GetProcessedDocumentRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Full resource name of
+   * [Document][google.cloud.discoveryengine.v1alpha.Document], such as
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`.
+   *
+   * If the caller does not have permission to access the
+   * [Document][google.cloud.discoveryengine.v1alpha.Document], regardless of
+   * whether or not it exists, a `PERMISSION_DENIED` error is returned.
+   *
+   * If the requested [Document][google.cloud.discoveryengine.v1alpha.Document]
+   * does not exist, a `NOT_FOUND` error is returned.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Full resource name of
+   * [Document][google.cloud.discoveryengine.v1alpha.Document], such as
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`.
+   *
+   * If the caller does not have permission to access the
+   * [Document][google.cloud.discoveryengine.v1alpha.Document], regardless of
+   * whether or not it exists, a `PERMISSION_DENIED` error is returned.
+   *
+   * If the requested [Document][google.cloud.discoveryengine.v1alpha.Document]
+   * does not exist, a `NOT_FOUND` error is returned.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. What type of processing to return.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest.ProcessedDocumentType processed_document_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for processedDocumentType. + */ + int getProcessedDocumentTypeValue(); + /** + * + * + *
+   * Required. What type of processing to return.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest.ProcessedDocumentType processed_document_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The processedDocumentType. + */ + com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest.ProcessedDocumentType + getProcessedDocumentType(); + + /** + * + * + *
+   * What format output should be.  If unspecified, defaults to JSON.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest.ProcessedDocumentFormat processed_document_format = 3; + * + * + * @return The enum numeric value on the wire for processedDocumentFormat. + */ + int getProcessedDocumentFormatValue(); + /** + * + * + *
+   * What format output should be.  If unspecified, defaults to JSON.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest.ProcessedDocumentFormat processed_document_format = 3; + * + * + * @return The processedDocumentFormat. + */ + com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest.ProcessedDocumentFormat + getProcessedDocumentFormat(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ImportCompletionSuggestionsMetadata.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ImportCompletionSuggestionsMetadata.java new file mode 100644 index 000000000000..852caf7b3fc4 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ImportCompletionSuggestionsMetadata.java @@ -0,0 +1,1023 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/import_config.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * Metadata related to the progress of the ImportCompletionSuggestions
+ * operation. This will be returned by the google.longrunning.Operation.metadata
+ * field.
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsMetadata} + */ +public final class ImportCompletionSuggestionsMetadata + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsMetadata) + ImportCompletionSuggestionsMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImportCompletionSuggestionsMetadata.newBuilder() to construct. + private ImportCompletionSuggestionsMetadata( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ImportCompletionSuggestionsMetadata() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ImportCompletionSuggestionsMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_ImportCompletionSuggestionsMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_ImportCompletionSuggestionsMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsMetadata.class, + com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsMetadata.Builder + .class); + } + + private int bitField0_; + public static final int CREATE_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Operation create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Operation create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Operation create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Operation last update time. If the operation is done, this is also the
+   * finish time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Operation last update time. If the operation is done, this is also the
+   * finish time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Operation last update time. If the operation is done, this is also the
+   * finish time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getUpdateTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateTime()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsMetadata)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsMetadata other = + (com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsMetadata) obj; + + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsMetadata + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsMetadata + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsMetadata + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsMetadata + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsMetadata + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsMetadata + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsMetadata + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsMetadata + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsMetadata + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsMetadata + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsMetadata + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Metadata related to the progress of the ImportCompletionSuggestions
+   * operation. This will be returned by the google.longrunning.Operation.metadata
+   * field.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsMetadata) + com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_ImportCompletionSuggestionsMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_ImportCompletionSuggestionsMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsMetadata.class, + com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsMetadata.Builder + .class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getCreateTimeFieldBuilder(); + getUpdateTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_ImportCompletionSuggestionsMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsMetadata + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsMetadata + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsMetadata build() { + com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsMetadata result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsMetadata + buildPartial() { + com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsMetadata result = + new com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsMetadata result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsMetadata) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsMetadata other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsMetadata + .getDefaultInstance()) return this; + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000001); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000002); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsMetadata) + private static final com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsMetadata(); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImportCompletionSuggestionsMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ImportCompletionSuggestionsMetadataOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ImportCompletionSuggestionsMetadataOrBuilder.java new file mode 100644 index 000000000000..a5d002e48a98 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ImportCompletionSuggestionsMetadataOrBuilder.java @@ -0,0 +1,99 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/import_config.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.discoveryengine.v1alpha; + +public interface ImportCompletionSuggestionsMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Operation create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Operation create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Operation create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Operation last update time. If the operation is done, this is also the
+   * finish time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Operation last update time. If the operation is done, this is also the
+   * finish time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Operation last update time. If the operation is done, this is also the
+   * finish time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ImportCompletionSuggestionsResponse.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ImportCompletionSuggestionsResponse.java new file mode 100644 index 000000000000..9dc978aca34d --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ImportCompletionSuggestionsResponse.java @@ -0,0 +1,1159 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/import_config.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * Response of the
+ * [CompletionService.ImportCompletionSuggestions][google.cloud.discoveryengine.v1alpha.CompletionService.ImportCompletionSuggestions]
+ * method. If the long running operation is done, this message is returned by
+ * the google.longrunning.Operations.response field if the operation is
+ * successful.
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsResponse} + */ +public final class ImportCompletionSuggestionsResponse + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsResponse) + ImportCompletionSuggestionsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImportCompletionSuggestionsResponse.newBuilder() to construct. + private ImportCompletionSuggestionsResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ImportCompletionSuggestionsResponse() { + errorSamples_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ImportCompletionSuggestionsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_ImportCompletionSuggestionsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_ImportCompletionSuggestionsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsResponse.class, + com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsResponse.Builder + .class); + } + + public static final int ERROR_SAMPLES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List errorSamples_; + /** + * + * + *
+   * A sample of errors encountered while processing the request.
+   * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + @java.lang.Override + public java.util.List getErrorSamplesList() { + return errorSamples_; + } + /** + * + * + *
+   * A sample of errors encountered while processing the request.
+   * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + @java.lang.Override + public java.util.List getErrorSamplesOrBuilderList() { + return errorSamples_; + } + /** + * + * + *
+   * A sample of errors encountered while processing the request.
+   * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + @java.lang.Override + public int getErrorSamplesCount() { + return errorSamples_.size(); + } + /** + * + * + *
+   * A sample of errors encountered while processing the request.
+   * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + @java.lang.Override + public com.google.rpc.Status getErrorSamples(int index) { + return errorSamples_.get(index); + } + /** + * + * + *
+   * A sample of errors encountered while processing the request.
+   * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getErrorSamplesOrBuilder(int index) { + return errorSamples_.get(index); + } + + public static final int SUCCESS_COUNT_FIELD_NUMBER = 2; + private long successCount_ = 0L; + /** + * + * + *
+   * Count of
+   * [CompletionSuggestion][google.cloud.discoveryengine.v1alpha.CompletionSuggestion]s
+   * successfully imported.
+   * 
+ * + * int64 success_count = 2; + * + * @return The successCount. + */ + @java.lang.Override + public long getSuccessCount() { + return successCount_; + } + + public static final int FAILURE_COUNT_FIELD_NUMBER = 3; + private long failureCount_ = 0L; + /** + * + * + *
+   * Count of
+   * [CompletionSuggestion][google.cloud.discoveryengine.v1alpha.CompletionSuggestion]s
+   * that failed to be imported.
+   * 
+ * + * int64 failure_count = 3; + * + * @return The failureCount. + */ + @java.lang.Override + public long getFailureCount() { + return failureCount_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < errorSamples_.size(); i++) { + output.writeMessage(1, errorSamples_.get(i)); + } + if (successCount_ != 0L) { + output.writeInt64(2, successCount_); + } + if (failureCount_ != 0L) { + output.writeInt64(3, failureCount_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < errorSamples_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, errorSamples_.get(i)); + } + if (successCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, successCount_); + } + if (failureCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, failureCount_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsResponse)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsResponse other = + (com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsResponse) obj; + + if (!getErrorSamplesList().equals(other.getErrorSamplesList())) return false; + if (getSuccessCount() != other.getSuccessCount()) return false; + if (getFailureCount() != other.getFailureCount()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getErrorSamplesCount() > 0) { + hash = (37 * hash) + ERROR_SAMPLES_FIELD_NUMBER; + hash = (53 * hash) + getErrorSamplesList().hashCode(); + } + hash = (37 * hash) + SUCCESS_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getSuccessCount()); + hash = (37 * hash) + FAILURE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getFailureCount()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsResponse + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsResponse + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsResponse + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsResponse + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsResponse + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsResponse + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsResponse + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsResponse + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsResponse + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsResponse + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response of the
+   * [CompletionService.ImportCompletionSuggestions][google.cloud.discoveryengine.v1alpha.CompletionService.ImportCompletionSuggestions]
+   * method. If the long running operation is done, this message is returned by
+   * the google.longrunning.Operations.response field if the operation is
+   * successful.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsResponse) + com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_ImportCompletionSuggestionsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_ImportCompletionSuggestionsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsResponse.class, + com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsResponse.Builder + .class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (errorSamplesBuilder_ == null) { + errorSamples_ = java.util.Collections.emptyList(); + } else { + errorSamples_ = null; + errorSamplesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + successCount_ = 0L; + failureCount_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_ImportCompletionSuggestionsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsResponse + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsResponse build() { + com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsResponse + buildPartial() { + com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsResponse result = + new com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsResponse result) { + if (errorSamplesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + errorSamples_ = java.util.Collections.unmodifiableList(errorSamples_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.errorSamples_ = errorSamples_; + } else { + result.errorSamples_ = errorSamplesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.successCount_ = successCount_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.failureCount_ = failureCount_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsResponse) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsResponse other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsResponse + .getDefaultInstance()) return this; + if (errorSamplesBuilder_ == null) { + if (!other.errorSamples_.isEmpty()) { + if (errorSamples_.isEmpty()) { + errorSamples_ = other.errorSamples_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureErrorSamplesIsMutable(); + errorSamples_.addAll(other.errorSamples_); + } + onChanged(); + } + } else { + if (!other.errorSamples_.isEmpty()) { + if (errorSamplesBuilder_.isEmpty()) { + errorSamplesBuilder_.dispose(); + errorSamplesBuilder_ = null; + errorSamples_ = other.errorSamples_; + bitField0_ = (bitField0_ & ~0x00000001); + errorSamplesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getErrorSamplesFieldBuilder() + : null; + } else { + errorSamplesBuilder_.addAllMessages(other.errorSamples_); + } + } + } + if (other.getSuccessCount() != 0L) { + setSuccessCount(other.getSuccessCount()); + } + if (other.getFailureCount() != 0L) { + setFailureCount(other.getFailureCount()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.rpc.Status m = + input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); + if (errorSamplesBuilder_ == null) { + ensureErrorSamplesIsMutable(); + errorSamples_.add(m); + } else { + errorSamplesBuilder_.addMessage(m); + } + break; + } // case 10 + case 16: + { + successCount_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + failureCount_ = input.readInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List errorSamples_ = java.util.Collections.emptyList(); + + private void ensureErrorSamplesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + errorSamples_ = new java.util.ArrayList(errorSamples_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + errorSamplesBuilder_; + + /** + * + * + *
+     * A sample of errors encountered while processing the request.
+     * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + public java.util.List getErrorSamplesList() { + if (errorSamplesBuilder_ == null) { + return java.util.Collections.unmodifiableList(errorSamples_); + } else { + return errorSamplesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A sample of errors encountered while processing the request.
+     * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + public int getErrorSamplesCount() { + if (errorSamplesBuilder_ == null) { + return errorSamples_.size(); + } else { + return errorSamplesBuilder_.getCount(); + } + } + /** + * + * + *
+     * A sample of errors encountered while processing the request.
+     * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + public com.google.rpc.Status getErrorSamples(int index) { + if (errorSamplesBuilder_ == null) { + return errorSamples_.get(index); + } else { + return errorSamplesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A sample of errors encountered while processing the request.
+     * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + public Builder setErrorSamples(int index, com.google.rpc.Status value) { + if (errorSamplesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureErrorSamplesIsMutable(); + errorSamples_.set(index, value); + onChanged(); + } else { + errorSamplesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A sample of errors encountered while processing the request.
+     * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + public Builder setErrorSamples(int index, com.google.rpc.Status.Builder builderForValue) { + if (errorSamplesBuilder_ == null) { + ensureErrorSamplesIsMutable(); + errorSamples_.set(index, builderForValue.build()); + onChanged(); + } else { + errorSamplesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A sample of errors encountered while processing the request.
+     * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + public Builder addErrorSamples(com.google.rpc.Status value) { + if (errorSamplesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureErrorSamplesIsMutable(); + errorSamples_.add(value); + onChanged(); + } else { + errorSamplesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A sample of errors encountered while processing the request.
+     * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + public Builder addErrorSamples(int index, com.google.rpc.Status value) { + if (errorSamplesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureErrorSamplesIsMutable(); + errorSamples_.add(index, value); + onChanged(); + } else { + errorSamplesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A sample of errors encountered while processing the request.
+     * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + public Builder addErrorSamples(com.google.rpc.Status.Builder builderForValue) { + if (errorSamplesBuilder_ == null) { + ensureErrorSamplesIsMutable(); + errorSamples_.add(builderForValue.build()); + onChanged(); + } else { + errorSamplesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A sample of errors encountered while processing the request.
+     * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + public Builder addErrorSamples(int index, com.google.rpc.Status.Builder builderForValue) { + if (errorSamplesBuilder_ == null) { + ensureErrorSamplesIsMutable(); + errorSamples_.add(index, builderForValue.build()); + onChanged(); + } else { + errorSamplesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A sample of errors encountered while processing the request.
+     * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + public Builder addAllErrorSamples(java.lang.Iterable values) { + if (errorSamplesBuilder_ == null) { + ensureErrorSamplesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, errorSamples_); + onChanged(); + } else { + errorSamplesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A sample of errors encountered while processing the request.
+     * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + public Builder clearErrorSamples() { + if (errorSamplesBuilder_ == null) { + errorSamples_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + errorSamplesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A sample of errors encountered while processing the request.
+     * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + public Builder removeErrorSamples(int index) { + if (errorSamplesBuilder_ == null) { + ensureErrorSamplesIsMutable(); + errorSamples_.remove(index); + onChanged(); + } else { + errorSamplesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A sample of errors encountered while processing the request.
+     * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + public com.google.rpc.Status.Builder getErrorSamplesBuilder(int index) { + return getErrorSamplesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A sample of errors encountered while processing the request.
+     * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + public com.google.rpc.StatusOrBuilder getErrorSamplesOrBuilder(int index) { + if (errorSamplesBuilder_ == null) { + return errorSamples_.get(index); + } else { + return errorSamplesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A sample of errors encountered while processing the request.
+     * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + public java.util.List getErrorSamplesOrBuilderList() { + if (errorSamplesBuilder_ != null) { + return errorSamplesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(errorSamples_); + } + } + /** + * + * + *
+     * A sample of errors encountered while processing the request.
+     * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + public com.google.rpc.Status.Builder addErrorSamplesBuilder() { + return getErrorSamplesFieldBuilder().addBuilder(com.google.rpc.Status.getDefaultInstance()); + } + /** + * + * + *
+     * A sample of errors encountered while processing the request.
+     * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + public com.google.rpc.Status.Builder addErrorSamplesBuilder(int index) { + return getErrorSamplesFieldBuilder() + .addBuilder(index, com.google.rpc.Status.getDefaultInstance()); + } + /** + * + * + *
+     * A sample of errors encountered while processing the request.
+     * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + public java.util.List getErrorSamplesBuilderList() { + return getErrorSamplesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getErrorSamplesFieldBuilder() { + if (errorSamplesBuilder_ == null) { + errorSamplesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.rpc.Status, + com.google.rpc.Status.Builder, + com.google.rpc.StatusOrBuilder>( + errorSamples_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + errorSamples_ = null; + } + return errorSamplesBuilder_; + } + + private long successCount_; + /** + * + * + *
+     * Count of
+     * [CompletionSuggestion][google.cloud.discoveryengine.v1alpha.CompletionSuggestion]s
+     * successfully imported.
+     * 
+ * + * int64 success_count = 2; + * + * @return The successCount. + */ + @java.lang.Override + public long getSuccessCount() { + return successCount_; + } + /** + * + * + *
+     * Count of
+     * [CompletionSuggestion][google.cloud.discoveryengine.v1alpha.CompletionSuggestion]s
+     * successfully imported.
+     * 
+ * + * int64 success_count = 2; + * + * @param value The successCount to set. + * @return This builder for chaining. + */ + public Builder setSuccessCount(long value) { + + successCount_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Count of
+     * [CompletionSuggestion][google.cloud.discoveryengine.v1alpha.CompletionSuggestion]s
+     * successfully imported.
+     * 
+ * + * int64 success_count = 2; + * + * @return This builder for chaining. + */ + public Builder clearSuccessCount() { + bitField0_ = (bitField0_ & ~0x00000002); + successCount_ = 0L; + onChanged(); + return this; + } + + private long failureCount_; + /** + * + * + *
+     * Count of
+     * [CompletionSuggestion][google.cloud.discoveryengine.v1alpha.CompletionSuggestion]s
+     * that failed to be imported.
+     * 
+ * + * int64 failure_count = 3; + * + * @return The failureCount. + */ + @java.lang.Override + public long getFailureCount() { + return failureCount_; + } + /** + * + * + *
+     * Count of
+     * [CompletionSuggestion][google.cloud.discoveryengine.v1alpha.CompletionSuggestion]s
+     * that failed to be imported.
+     * 
+ * + * int64 failure_count = 3; + * + * @param value The failureCount to set. + * @return This builder for chaining. + */ + public Builder setFailureCount(long value) { + + failureCount_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Count of
+     * [CompletionSuggestion][google.cloud.discoveryengine.v1alpha.CompletionSuggestion]s
+     * that failed to be imported.
+     * 
+ * + * int64 failure_count = 3; + * + * @return This builder for chaining. + */ + public Builder clearFailureCount() { + bitField0_ = (bitField0_ & ~0x00000004); + failureCount_ = 0L; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsResponse) + private static final com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsResponse(); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImportCompletionSuggestionsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ImportCompletionSuggestionsResponseOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ImportCompletionSuggestionsResponseOrBuilder.java new file mode 100644 index 000000000000..49d99da7eddf --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ImportCompletionSuggestionsResponseOrBuilder.java @@ -0,0 +1,107 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/import_config.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.discoveryengine.v1alpha; + +public interface ImportCompletionSuggestionsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A sample of errors encountered while processing the request.
+   * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + java.util.List getErrorSamplesList(); + /** + * + * + *
+   * A sample of errors encountered while processing the request.
+   * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + com.google.rpc.Status getErrorSamples(int index); + /** + * + * + *
+   * A sample of errors encountered while processing the request.
+   * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + int getErrorSamplesCount(); + /** + * + * + *
+   * A sample of errors encountered while processing the request.
+   * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + java.util.List getErrorSamplesOrBuilderList(); + /** + * + * + *
+   * A sample of errors encountered while processing the request.
+   * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + com.google.rpc.StatusOrBuilder getErrorSamplesOrBuilder(int index); + + /** + * + * + *
+   * Count of
+   * [CompletionSuggestion][google.cloud.discoveryengine.v1alpha.CompletionSuggestion]s
+   * successfully imported.
+   * 
+ * + * int64 success_count = 2; + * + * @return The successCount. + */ + long getSuccessCount(); + + /** + * + * + *
+   * Count of
+   * [CompletionSuggestion][google.cloud.discoveryengine.v1alpha.CompletionSuggestion]s
+   * that failed to be imported.
+   * 
+ * + * int64 failure_count = 3; + * + * @return The failureCount. + */ + long getFailureCount(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ImportConfigProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ImportConfigProto.java index 70f3918eb85c..529cc40dd1bd 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ImportConfigProto.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ImportConfigProto.java @@ -36,6 +36,42 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_discoveryengine_v1alpha_BigQuerySource_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_discoveryengine_v1alpha_BigQuerySource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_SpannerSource_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_SpannerSource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_BigtableOptions_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_BigtableOptions_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_BigtableOptions_BigtableColumnFamily_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_BigtableOptions_BigtableColumnFamily_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_BigtableOptions_BigtableColumn_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_BigtableOptions_BigtableColumn_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_BigtableOptions_FamiliesEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_BigtableOptions_FamiliesEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_BigtableSource_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_BigtableSource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_FhirStoreSource_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_FhirStoreSource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_CloudSqlSource_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_CloudSqlSource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_FirestoreSource_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_FirestoreSource_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_discoveryengine_v1alpha_ImportErrorConfig_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -88,6 +124,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_discoveryengine_v1alpha_ImportSuggestionDenyListEntriesMetadata_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_discoveryengine_v1alpha_ImportSuggestionDenyListEntriesMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_ImportCompletionSuggestionsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_ImportCompletionSuggestionsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_ImportCompletionSuggestionsMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_ImportCompletionSuggestionsMetadata_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -105,91 +149,151 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "etion.proto\0323google/cloud/discoveryengin" + "e/v1alpha/document.proto\0325google/cloud/d" + "iscoveryengine/v1alpha/user_event.proto\032" - + "\037google/protobuf/timestamp.proto\032\027google" - + "/rpc/status.proto\032\026google/type/date.prot" - + "o\"9\n\tGcsSource\022\027\n\ninput_uris\030\001 \003(\tB\003\340A\002\022" - + "\023\n\013data_schema\030\002 \001(\t\"\274\001\n\016BigQuerySource\022" - + "+\n\016partition_date\030\005 \001(\0132\021.google.type.Da" - + "teH\000\022\022\n\nproject_id\030\001 \001(\t\022\027\n\ndataset_id\030\002" - + " \001(\tB\003\340A\002\022\025\n\010table_id\030\003 \001(\tB\003\340A\002\022\027\n\017gcs_" - + "staging_dir\030\004 \001(\t\022\023\n\013data_schema\030\006 \001(\tB\013" - + "\n\tpartition\"8\n\021ImportErrorConfig\022\024\n\ngcs_" - + "prefix\030\001 \001(\tH\000B\r\n\013destination\"\214\004\n\027Import" - + "UserEventsRequest\022c\n\rinline_source\030\002 \001(\013" - + "2J.google.cloud.discoveryengine.v1alpha." - + "ImportUserEventsRequest.InlineSourceH\000\022E" - + "\n\ngcs_source\030\003 \001(\0132/.google.cloud.discov" - + "eryengine.v1alpha.GcsSourceH\000\022O\n\017bigquer" - + "y_source\030\004 \001(\01324.google.cloud.discoverye" - + "ngine.v1alpha.BigQuerySourceH\000\022@\n\006parent" - + "\030\001 \001(\tB0\340A\002\372A*\n(discoveryengine.googleap" - + "is.com/DataStore\022M\n\014error_config\030\005 \001(\01327" + + " google/protobuf/field_mask.proto\032\037googl" + + "e/protobuf/timestamp.proto\032\027google/rpc/s" + + "tatus.proto\032\026google/type/date.proto\"9\n\tG" + + "csSource\022\027\n\ninput_uris\030\001 \003(\tB\003\340A\002\022\023\n\013dat" + + "a_schema\030\002 \001(\t\"\274\001\n\016BigQuerySource\022+\n\016par" + + "tition_date\030\005 \001(\0132\021.google.type.DateH\000\022\022" + + "\n\nproject_id\030\001 \001(\t\022\027\n\ndataset_id\030\002 \001(\tB\003" + + "\340A\002\022\025\n\010table_id\030\003 \001(\tB\003\340A\002\022\027\n\017gcs_stagin" + + "g_dir\030\004 \001(\t\022\023\n\013data_schema\030\006 \001(\tB\013\n\tpart" + + "ition\"\211\001\n\rSpannerSource\022\022\n\nproject_id\030\001 " + + "\001(\t\022\030\n\013instance_id\030\002 \001(\tB\003\340A\002\022\030\n\013databas" + + "e_id\030\003 \001(\tB\003\340A\002\022\025\n\010table_id\030\004 \001(\tB\003\340A\002\022\031" + + "\n\021enable_data_boost\030\005 \001(\010\"\260\007\n\017BigtableOp" + + "tions\022\026\n\016key_field_name\030\001 \001(\t\022U\n\010familie" + + "s\030\002 \003(\0132C.google.cloud.discoveryengine.v" + + "1alpha.BigtableOptions.FamiliesEntry\032\235\002\n" + + "\024BigtableColumnFamily\022\022\n\nfield_name\030\001 \001(" + + "\t\022P\n\010encoding\030\002 \001(\0162>.google.cloud.disco" + + "veryengine.v1alpha.BigtableOptions.Encod" + + "ing\022H\n\004type\030\003 \001(\0162:.google.cloud.discove" + + "ryengine.v1alpha.BigtableOptions.Type\022U\n" + + "\007columns\030\004 \003(\0132D.google.cloud.discoverye" + + "ngine.v1alpha.BigtableOptions.BigtableCo" + + "lumn\032\330\001\n\016BigtableColumn\022\026\n\tqualifier\030\001 \001" + + "(\014B\003\340A\002\022\022\n\nfield_name\030\002 \001(\t\022P\n\010encoding\030" + + "\003 \001(\0162>.google.cloud.discoveryengine.v1a" + + "lpha.BigtableOptions.Encoding\022H\n\004type\030\004 " + + "\001(\0162:.google.cloud.discoveryengine.v1alp" + + "ha.BigtableOptions.Type\032{\n\rFamiliesEntry" + + "\022\013\n\003key\030\001 \001(\t\022Y\n\005value\030\002 \001(\0132J.google.cl" + + "oud.discoveryengine.v1alpha.BigtableOpti" + + "ons.BigtableColumnFamily:\0028\001\"z\n\004Type\022\024\n\020" + + "TYPE_UNSPECIFIED\020\000\022\n\n\006STRING\020\001\022\n\n\006NUMBER" + + "\020\002\022\013\n\007INTEGER\020\003\022\017\n\013VAR_INTEGER\020\004\022\017\n\013BIG_" + + "NUMERIC\020\005\022\013\n\007BOOLEAN\020\006\022\010\n\004JSON\020\007\":\n\010Enco" + + "ding\022\030\n\024ENCODING_UNSPECIFIED\020\000\022\010\n\004TEXT\020\001" + + "\022\n\n\006BINARY\020\002\"\253\001\n\016BigtableSource\022\022\n\nproje" + + "ct_id\030\001 \001(\t\022\030\n\013instance_id\030\002 \001(\tB\003\340A\002\022\025\n" + + "\010table_id\030\003 \001(\tB\003\340A\002\022T\n\020bigtable_options" + + "\030\004 \001(\01325.google.cloud.discoveryengine.v1" + + "alpha.BigtableOptionsB\003\340A\002\"k\n\017FhirStoreS" + + "ource\022?\n\nfhir_store\030\001 \001(\tB+\340A\002\372A%\n#healt" + + "hcare.googleapis.com/FhirStore\022\027\n\017gcs_st" + + "aging_dir\030\002 \001(\t\"\231\001\n\016CloudSqlSource\022\022\n\npr" + + "oject_id\030\001 \001(\t\022\030\n\013instance_id\030\002 \001(\tB\003\340A\002" + + "\022\030\n\013database_id\030\003 \001(\tB\003\340A\002\022\025\n\010table_id\030\004" + + " \001(\tB\003\340A\002\022\027\n\017gcs_staging_dir\030\005 \001(\t\022\017\n\007of" + + "fload\030\006 \001(\010\"t\n\017FirestoreSource\022\022\n\nprojec" + + "t_id\030\001 \001(\t\022\030\n\013database_id\030\002 \001(\tB\003\340A\002\022\032\n\r" + + "collection_id\030\003 \001(\tB\003\340A\002\022\027\n\017gcs_staging_" + + "dir\030\004 \001(\t\"8\n\021ImportErrorConfig\022\024\n\ngcs_pr" + + "efix\030\001 \001(\tH\000B\r\n\013destination\"\214\004\n\027ImportUs" + + "erEventsRequest\022c\n\rinline_source\030\002 \001(\0132J" + ".google.cloud.discoveryengine.v1alpha.Im" - + "portErrorConfig\032Y\n\014InlineSource\022I\n\013user_" - + "events\030\001 \003(\0132/.google.cloud.discoveryeng" - + "ine.v1alpha.UserEventB\003\340A\002B\010\n\006source\"\320\001\n" - + "\030ImportUserEventsResponse\022)\n\rerror_sampl" - + "es\030\001 \003(\0132\022.google.rpc.Status\022M\n\014error_co" - + "nfig\030\002 \001(\01327.google.cloud.discoveryengin" - + "e.v1alpha.ImportErrorConfig\022\033\n\023joined_ev" - + "ents_count\030\003 \001(\003\022\035\n\025unjoined_events_coun" - + "t\030\004 \001(\003\"\252\001\n\030ImportUserEventsMetadata\022/\n\013" - + "create_time\030\001 \001(\0132\032.google.protobuf.Time" - + "stamp\022/\n\013update_time\030\002 \001(\0132\032.google.prot" - + "obuf.Timestamp\022\025\n\rsuccess_count\030\003 \001(\003\022\025\n" - + "\rfailure_count\030\004 \001(\003\"\251\001\n\027ImportDocuments" - + "Metadata\022/\n\013create_time\030\001 \001(\0132\032.google.p" - + "rotobuf.Timestamp\022/\n\013update_time\030\002 \001(\0132\032" - + ".google.protobuf.Timestamp\022\025\n\rsuccess_co" - + "unt\030\003 \001(\003\022\025\n\rfailure_count\030\004 \001(\003\"\365\005\n\026Imp" - + "ortDocumentsRequest\022b\n\rinline_source\030\002 \001" - + "(\0132I.google.cloud.discoveryengine.v1alph" - + "a.ImportDocumentsRequest.InlineSourceH\000\022" - + "E\n\ngcs_source\030\003 \001(\0132/.google.cloud.disco" - + "veryengine.v1alpha.GcsSourceH\000\022O\n\017bigque" - + "ry_source\030\004 \001(\01324.google.cloud.discovery" - + "engine.v1alpha.BigQuerySourceH\000\022=\n\006paren" - + "t\030\001 \001(\tB-\340A\002\372A\'\n%discoveryengine.googlea" - + "pis.com/Branch\022M\n\014error_config\030\005 \001(\01327.g" + + "portUserEventsRequest.InlineSourceH\000\022E\n\n" + + "gcs_source\030\003 \001(\0132/.google.cloud.discover" + + "yengine.v1alpha.GcsSourceH\000\022O\n\017bigquery_" + + "source\030\004 \001(\01324.google.cloud.discoveryeng" + + "ine.v1alpha.BigQuerySourceH\000\022@\n\006parent\030\001" + + " \001(\tB0\340A\002\372A*\n(discoveryengine.googleapis" + + ".com/DataStore\022M\n\014error_config\030\005 \001(\01327.g" + "oogle.cloud.discoveryengine.v1alpha.Impo" - + "rtErrorConfig\022l\n\023reconciliation_mode\030\006 \001" - + "(\0162O.google.cloud.discoveryengine.v1alph" - + "a.ImportDocumentsRequest.ReconciliationM" - + "ode\022\031\n\021auto_generate_ids\030\010 \001(\010\022\020\n\010id_fie" - + "ld\030\t \001(\t\032V\n\014InlineSource\022F\n\tdocuments\030\001 " - + "\003(\0132..google.cloud.discoveryengine.v1alp" - + "ha.DocumentB\003\340A\002\"T\n\022ReconciliationMode\022#" - + "\n\037RECONCILIATION_MODE_UNSPECIFIED\020\000\022\017\n\013I" - + "NCREMENTAL\020\001\022\010\n\004FULL\020\002B\010\n\006source\"\223\001\n\027Imp" - + "ortDocumentsResponse\022)\n\rerror_samples\030\001 " - + "\003(\0132\022.google.rpc.Status\022M\n\014error_config\030" - + "\002 \001(\01327.google.cloud.discoveryengine.v1a" - + "lpha.ImportErrorConfig\"\224\003\n&ImportSuggest" - + "ionDenyListEntriesRequest\022r\n\rinline_sour" - + "ce\030\002 \001(\0132Y.google.cloud.discoveryengine." - + "v1alpha.ImportSuggestionDenyListEntriesR" - + "equest.InlineSourceH\000\022E\n\ngcs_source\030\003 \001(" - + "\0132/.google.cloud.discoveryengine.v1alpha" - + ".GcsSourceH\000\022@\n\006parent\030\001 \001(\tB0\340A\002\372A*\n(di" - + "scoveryengine.googleapis.com/DataStore\032c" - + "\n\014InlineSource\022S\n\007entries\030\001 \003(\0132=.google" - + ".cloud.discoveryengine.v1alpha.Suggestio" - + "nDenyListEntryB\003\340A\002B\010\n\006source\"\222\001\n\'Import" - + "SuggestionDenyListEntriesResponse\022)\n\rerr" - + "or_samples\030\001 \003(\0132\022.google.rpc.Status\022\036\n\026" - + "imported_entries_count\030\002 \001(\003\022\034\n\024failed_e" - + "ntries_count\030\003 \001(\003\"\213\001\n\'ImportSuggestionD" - + "enyListEntriesMetadata\022/\n\013create_time\030\001 " - + "\001(\0132\032.google.protobuf.Timestamp\022/\n\013updat" - + "e_time\030\002 \001(\0132\032.google.protobuf.Timestamp" - + "B\235\002\n(com.google.cloud.discoveryengine.v1" - + "alphaB\021ImportConfigProtoP\001ZRcloud.google" - + ".com/go/discoveryengine/apiv1alpha/disco" - + "veryenginepb;discoveryenginepb\242\002\017DISCOVE" - + "RYENGINE\252\002$Google.Cloud.DiscoveryEngine." - + "V1Alpha\312\002$Google\\Cloud\\DiscoveryEngine\\V" - + "1alpha\352\002\'Google::Cloud::DiscoveryEngine:" - + ":V1alphab\006proto3" + + "rtErrorConfig\032Y\n\014InlineSource\022I\n\013user_ev" + + "ents\030\001 \003(\0132/.google.cloud.discoveryengin" + + "e.v1alpha.UserEventB\003\340A\002B\010\n\006source\"\320\001\n\030I" + + "mportUserEventsResponse\022)\n\rerror_samples" + + "\030\001 \003(\0132\022.google.rpc.Status\022M\n\014error_conf" + + "ig\030\002 \001(\01327.google.cloud.discoveryengine." + + "v1alpha.ImportErrorConfig\022\033\n\023joined_even" + + "ts_count\030\003 \001(\003\022\035\n\025unjoined_events_count\030" + + "\004 \001(\003\"\252\001\n\030ImportUserEventsMetadata\022/\n\013cr" + + "eate_time\030\001 \001(\0132\032.google.protobuf.Timest" + + "amp\022/\n\013update_time\030\002 \001(\0132\032.google.protob" + + "uf.Timestamp\022\025\n\rsuccess_count\030\003 \001(\003\022\025\n\rf" + + "ailure_count\030\004 \001(\003\"\276\001\n\027ImportDocumentsMe" + + "tadata\022/\n\013create_time\030\001 \001(\0132\032.google.pro" + + "tobuf.Timestamp\022/\n\013update_time\030\002 \001(\0132\032.g" + + "oogle.protobuf.Timestamp\022\025\n\rsuccess_coun" + + "t\030\003 \001(\003\022\025\n\rfailure_count\030\004 \001(\003\022\023\n\013total_" + + "count\030\005 \001(\003\"\277\t\n\026ImportDocumentsRequest\022b" + + "\n\rinline_source\030\002 \001(\0132I.google.cloud.dis" + + "coveryengine.v1alpha.ImportDocumentsRequ" + + "est.InlineSourceH\000\022E\n\ngcs_source\030\003 \001(\0132/" + + ".google.cloud.discoveryengine.v1alpha.Gc" + + "sSourceH\000\022O\n\017bigquery_source\030\004 \001(\01324.goo" + + "gle.cloud.discoveryengine.v1alpha.BigQue" + + "rySourceH\000\022R\n\021fhir_store_source\030\n \001(\01325." + + "google.cloud.discoveryengine.v1alpha.Fhi" + + "rStoreSourceH\000\022M\n\016spanner_source\030\013 \001(\01323" + + ".google.cloud.discoveryengine.v1alpha.Sp" + + "annerSourceH\000\022P\n\020cloud_sql_source\030\014 \001(\0132" + + "4.google.cloud.discoveryengine.v1alpha.C" + + "loudSqlSourceH\000\022Q\n\020firestore_source\030\r \001(" + + "\01325.google.cloud.discoveryengine.v1alpha" + + ".FirestoreSourceH\000\022O\n\017bigtable_source\030\017 " + + "\001(\01324.google.cloud.discoveryengine.v1alp" + + "ha.BigtableSourceH\000\022=\n\006parent\030\001 \001(\tB-\340A\002" + + "\372A\'\n%discoveryengine.googleapis.com/Bran" + + "ch\022M\n\014error_config\030\005 \001(\01327.google.cloud." + + "discoveryengine.v1alpha.ImportErrorConfi" + + "g\022l\n\023reconciliation_mode\030\006 \001(\0162O.google." + + "cloud.discoveryengine.v1alpha.ImportDocu" + + "mentsRequest.ReconciliationMode\022/\n\013updat" + + "e_mask\030\007 \001(\0132\032.google.protobuf.FieldMask" + + "\022\031\n\021auto_generate_ids\030\010 \001(\010\022\020\n\010id_field\030" + + "\t \001(\t\032V\n\014InlineSource\022F\n\tdocuments\030\001 \003(\013" + + "2..google.cloud.discoveryengine.v1alpha." + + "DocumentB\003\340A\002\"T\n\022ReconciliationMode\022#\n\037R" + + "ECONCILIATION_MODE_UNSPECIFIED\020\000\022\017\n\013INCR" + + "EMENTAL\020\001\022\010\n\004FULL\020\002B\010\n\006source\"\223\001\n\027Import" + + "DocumentsResponse\022)\n\rerror_samples\030\001 \003(\013" + + "2\022.google.rpc.Status\022M\n\014error_config\030\002 \001" + + "(\01327.google.cloud.discoveryengine.v1alph" + + "a.ImportErrorConfig\"\224\003\n&ImportSuggestion" + + "DenyListEntriesRequest\022r\n\rinline_source\030" + + "\002 \001(\0132Y.google.cloud.discoveryengine.v1a" + + "lpha.ImportSuggestionDenyListEntriesRequ" + + "est.InlineSourceH\000\022E\n\ngcs_source\030\003 \001(\0132/" + + ".google.cloud.discoveryengine.v1alpha.Gc" + + "sSourceH\000\022@\n\006parent\030\001 \001(\tB0\340A\002\372A*\n(disco" + + "veryengine.googleapis.com/DataStore\032c\n\014I" + + "nlineSource\022S\n\007entries\030\001 \003(\0132=.google.cl" + + "oud.discoveryengine.v1alpha.SuggestionDe" + + "nyListEntryB\003\340A\002B\010\n\006source\"\222\001\n\'ImportSug" + + "gestionDenyListEntriesResponse\022)\n\rerror_" + + "samples\030\001 \003(\0132\022.google.rpc.Status\022\036\n\026imp" + + "orted_entries_count\030\002 \001(\003\022\034\n\024failed_entr" + + "ies_count\030\003 \001(\003\"\213\001\n\'ImportSuggestionDeny" + + "ListEntriesMetadata\022/\n\013create_time\030\001 \001(\013" + + "2\032.google.protobuf.Timestamp\022/\n\013update_t" + + "ime\030\002 \001(\0132\032.google.protobuf.Timestamp\"~\n" + + "#ImportCompletionSuggestionsResponse\022)\n\r" + + "error_samples\030\001 \003(\0132\022.google.rpc.Status\022" + + "\025\n\rsuccess_count\030\002 \001(\003\022\025\n\rfailure_count\030" + + "\003 \001(\003\"\207\001\n#ImportCompletionSuggestionsMet" + + "adata\022/\n\013create_time\030\001 \001(\0132\032.google.prot" + + "obuf.Timestamp\022/\n\013update_time\030\002 \001(\0132\032.go" + + "ogle.protobuf.TimestampB\235\002\n(com.google.c" + + "loud.discoveryengine.v1alphaB\021ImportConf" + + "igProtoP\001ZRcloud.google.com/go/discovery" + + "engine/apiv1alpha/discoveryenginepb;disc" + + "overyenginepb\242\002\017DISCOVERYENGINE\252\002$Google" + + ".Cloud.DiscoveryEngine.V1Alpha\312\002$Google\\" + + "Cloud\\DiscoveryEngine\\V1alpha\352\002\'Google::" + + "Cloud::DiscoveryEngine::V1alphab\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -200,6 +304,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.cloud.discoveryengine.v1alpha.CompletionProto.getDescriptor(), com.google.cloud.discoveryengine.v1alpha.DocumentProto.getDescriptor(), com.google.cloud.discoveryengine.v1alpha.UserEventProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), com.google.rpc.StatusProto.getDescriptor(), com.google.type.DateProto.getDescriptor(), @@ -226,8 +331,86 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "DataSchema", "Partition", }); - internal_static_google_cloud_discoveryengine_v1alpha_ImportErrorConfig_descriptor = + internal_static_google_cloud_discoveryengine_v1alpha_SpannerSource_descriptor = getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_discoveryengine_v1alpha_SpannerSource_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_SpannerSource_descriptor, + new java.lang.String[] { + "ProjectId", "InstanceId", "DatabaseId", "TableId", "EnableDataBoost", + }); + internal_static_google_cloud_discoveryengine_v1alpha_BigtableOptions_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_discoveryengine_v1alpha_BigtableOptions_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_BigtableOptions_descriptor, + new java.lang.String[] { + "KeyFieldName", "Families", + }); + internal_static_google_cloud_discoveryengine_v1alpha_BigtableOptions_BigtableColumnFamily_descriptor = + internal_static_google_cloud_discoveryengine_v1alpha_BigtableOptions_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_discoveryengine_v1alpha_BigtableOptions_BigtableColumnFamily_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_BigtableOptions_BigtableColumnFamily_descriptor, + new java.lang.String[] { + "FieldName", "Encoding", "Type", "Columns", + }); + internal_static_google_cloud_discoveryengine_v1alpha_BigtableOptions_BigtableColumn_descriptor = + internal_static_google_cloud_discoveryengine_v1alpha_BigtableOptions_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_discoveryengine_v1alpha_BigtableOptions_BigtableColumn_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_BigtableOptions_BigtableColumn_descriptor, + new java.lang.String[] { + "Qualifier", "FieldName", "Encoding", "Type", + }); + internal_static_google_cloud_discoveryengine_v1alpha_BigtableOptions_FamiliesEntry_descriptor = + internal_static_google_cloud_discoveryengine_v1alpha_BigtableOptions_descriptor + .getNestedTypes() + .get(2); + internal_static_google_cloud_discoveryengine_v1alpha_BigtableOptions_FamiliesEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_BigtableOptions_FamiliesEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_discoveryengine_v1alpha_BigtableSource_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_discoveryengine_v1alpha_BigtableSource_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_BigtableSource_descriptor, + new java.lang.String[] { + "ProjectId", "InstanceId", "TableId", "BigtableOptions", + }); + internal_static_google_cloud_discoveryengine_v1alpha_FhirStoreSource_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_discoveryengine_v1alpha_FhirStoreSource_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_FhirStoreSource_descriptor, + new java.lang.String[] { + "FhirStore", "GcsStagingDir", + }); + internal_static_google_cloud_discoveryengine_v1alpha_CloudSqlSource_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_discoveryengine_v1alpha_CloudSqlSource_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_CloudSqlSource_descriptor, + new java.lang.String[] { + "ProjectId", "InstanceId", "DatabaseId", "TableId", "GcsStagingDir", "Offload", + }); + internal_static_google_cloud_discoveryengine_v1alpha_FirestoreSource_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_discoveryengine_v1alpha_FirestoreSource_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_FirestoreSource_descriptor, + new java.lang.String[] { + "ProjectId", "DatabaseId", "CollectionId", "GcsStagingDir", + }); + internal_static_google_cloud_discoveryengine_v1alpha_ImportErrorConfig_descriptor = + getDescriptor().getMessageTypes().get(8); internal_static_google_cloud_discoveryengine_v1alpha_ImportErrorConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_discoveryengine_v1alpha_ImportErrorConfig_descriptor, @@ -235,7 +418,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "GcsPrefix", "Destination", }); internal_static_google_cloud_discoveryengine_v1alpha_ImportUserEventsRequest_descriptor = - getDescriptor().getMessageTypes().get(3); + getDescriptor().getMessageTypes().get(9); internal_static_google_cloud_discoveryengine_v1alpha_ImportUserEventsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_discoveryengine_v1alpha_ImportUserEventsRequest_descriptor, @@ -253,7 +436,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "UserEvents", }); internal_static_google_cloud_discoveryengine_v1alpha_ImportUserEventsResponse_descriptor = - getDescriptor().getMessageTypes().get(4); + getDescriptor().getMessageTypes().get(10); internal_static_google_cloud_discoveryengine_v1alpha_ImportUserEventsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_discoveryengine_v1alpha_ImportUserEventsResponse_descriptor, @@ -261,7 +444,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ErrorSamples", "ErrorConfig", "JoinedEventsCount", "UnjoinedEventsCount", }); internal_static_google_cloud_discoveryengine_v1alpha_ImportUserEventsMetadata_descriptor = - getDescriptor().getMessageTypes().get(5); + getDescriptor().getMessageTypes().get(11); internal_static_google_cloud_discoveryengine_v1alpha_ImportUserEventsMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_discoveryengine_v1alpha_ImportUserEventsMetadata_descriptor, @@ -269,15 +452,15 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "CreateTime", "UpdateTime", "SuccessCount", "FailureCount", }); internal_static_google_cloud_discoveryengine_v1alpha_ImportDocumentsMetadata_descriptor = - getDescriptor().getMessageTypes().get(6); + getDescriptor().getMessageTypes().get(12); internal_static_google_cloud_discoveryengine_v1alpha_ImportDocumentsMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_discoveryengine_v1alpha_ImportDocumentsMetadata_descriptor, new java.lang.String[] { - "CreateTime", "UpdateTime", "SuccessCount", "FailureCount", + "CreateTime", "UpdateTime", "SuccessCount", "FailureCount", "TotalCount", }); internal_static_google_cloud_discoveryengine_v1alpha_ImportDocumentsRequest_descriptor = - getDescriptor().getMessageTypes().get(7); + getDescriptor().getMessageTypes().get(13); internal_static_google_cloud_discoveryengine_v1alpha_ImportDocumentsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_discoveryengine_v1alpha_ImportDocumentsRequest_descriptor, @@ -285,9 +468,15 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "InlineSource", "GcsSource", "BigquerySource", + "FhirStoreSource", + "SpannerSource", + "CloudSqlSource", + "FirestoreSource", + "BigtableSource", "Parent", "ErrorConfig", "ReconciliationMode", + "UpdateMask", "AutoGenerateIds", "IdField", "Source", @@ -303,7 +492,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Documents", }); internal_static_google_cloud_discoveryengine_v1alpha_ImportDocumentsResponse_descriptor = - getDescriptor().getMessageTypes().get(8); + getDescriptor().getMessageTypes().get(14); internal_static_google_cloud_discoveryengine_v1alpha_ImportDocumentsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_discoveryengine_v1alpha_ImportDocumentsResponse_descriptor, @@ -311,7 +500,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ErrorSamples", "ErrorConfig", }); internal_static_google_cloud_discoveryengine_v1alpha_ImportSuggestionDenyListEntriesRequest_descriptor = - getDescriptor().getMessageTypes().get(9); + getDescriptor().getMessageTypes().get(15); internal_static_google_cloud_discoveryengine_v1alpha_ImportSuggestionDenyListEntriesRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_discoveryengine_v1alpha_ImportSuggestionDenyListEntriesRequest_descriptor, @@ -329,7 +518,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Entries", }); internal_static_google_cloud_discoveryengine_v1alpha_ImportSuggestionDenyListEntriesResponse_descriptor = - getDescriptor().getMessageTypes().get(10); + getDescriptor().getMessageTypes().get(16); internal_static_google_cloud_discoveryengine_v1alpha_ImportSuggestionDenyListEntriesResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_discoveryengine_v1alpha_ImportSuggestionDenyListEntriesResponse_descriptor, @@ -337,13 +526,29 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ErrorSamples", "ImportedEntriesCount", "FailedEntriesCount", }); internal_static_google_cloud_discoveryengine_v1alpha_ImportSuggestionDenyListEntriesMetadata_descriptor = - getDescriptor().getMessageTypes().get(11); + getDescriptor().getMessageTypes().get(17); internal_static_google_cloud_discoveryengine_v1alpha_ImportSuggestionDenyListEntriesMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_discoveryengine_v1alpha_ImportSuggestionDenyListEntriesMetadata_descriptor, new java.lang.String[] { "CreateTime", "UpdateTime", }); + internal_static_google_cloud_discoveryengine_v1alpha_ImportCompletionSuggestionsResponse_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_google_cloud_discoveryengine_v1alpha_ImportCompletionSuggestionsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_ImportCompletionSuggestionsResponse_descriptor, + new java.lang.String[] { + "ErrorSamples", "SuccessCount", "FailureCount", + }); + internal_static_google_cloud_discoveryengine_v1alpha_ImportCompletionSuggestionsMetadata_descriptor = + getDescriptor().getMessageTypes().get(19); + internal_static_google_cloud_discoveryengine_v1alpha_ImportCompletionSuggestionsMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_ImportCompletionSuggestionsMetadata_descriptor, + new java.lang.String[] { + "CreateTime", "UpdateTime", + }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); @@ -355,6 +560,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.cloud.discoveryengine.v1alpha.CompletionProto.getDescriptor(); com.google.cloud.discoveryengine.v1alpha.DocumentProto.getDescriptor(); com.google.cloud.discoveryengine.v1alpha.UserEventProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); com.google.rpc.StatusProto.getDescriptor(); com.google.type.DateProto.getDescriptor(); diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ImportDocumentsMetadata.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ImportDocumentsMetadata.java index b89fcdde386e..229290a262ea 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ImportDocumentsMetadata.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ImportDocumentsMetadata.java @@ -194,6 +194,24 @@ public long getFailureCount() { return failureCount_; } + public static final int TOTAL_COUNT_FIELD_NUMBER = 5; + private long totalCount_ = 0L; + /** + * + * + *
+   * Total count of entries that were processed.
+   * 
+ * + * int64 total_count = 5; + * + * @return The totalCount. + */ + @java.lang.Override + public long getTotalCount() { + return totalCount_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -220,6 +238,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (failureCount_ != 0L) { output.writeInt64(4, failureCount_); } + if (totalCount_ != 0L) { + output.writeInt64(5, totalCount_); + } getUnknownFields().writeTo(output); } @@ -241,6 +262,9 @@ public int getSerializedSize() { if (failureCount_ != 0L) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, failureCount_); } + if (totalCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(5, totalCount_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -267,6 +291,7 @@ public boolean equals(final java.lang.Object obj) { } if (getSuccessCount() != other.getSuccessCount()) return false; if (getFailureCount() != other.getFailureCount()) return false; + if (getTotalCount() != other.getTotalCount()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -290,6 +315,8 @@ public int hashCode() { hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getSuccessCount()); hash = (37 * hash) + FAILURE_COUNT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getFailureCount()); + hash = (37 * hash) + TOTAL_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTotalCount()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -453,6 +480,7 @@ public Builder clear() { } successCount_ = 0L; failureCount_ = 0L; + totalCount_ = 0L; return this; } @@ -506,6 +534,9 @@ private void buildPartial0( if (((from_bitField0_ & 0x00000008) != 0)) { result.failureCount_ = failureCount_; } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.totalCount_ = totalCount_; + } result.bitField0_ |= to_bitField0_; } @@ -569,6 +600,9 @@ public Builder mergeFrom( if (other.getFailureCount() != 0L) { setFailureCount(other.getFailureCount()); } + if (other.getTotalCount() != 0L) { + setTotalCount(other.getTotalCount()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -619,6 +653,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000008; break; } // case 32 + case 40: + { + totalCount_ = input.readInt64(); + bitField0_ |= 0x00000010; + break; + } // case 40 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1123,6 +1163,59 @@ public Builder clearFailureCount() { return this; } + private long totalCount_; + /** + * + * + *
+     * Total count of entries that were processed.
+     * 
+ * + * int64 total_count = 5; + * + * @return The totalCount. + */ + @java.lang.Override + public long getTotalCount() { + return totalCount_; + } + /** + * + * + *
+     * Total count of entries that were processed.
+     * 
+ * + * int64 total_count = 5; + * + * @param value The totalCount to set. + * @return This builder for chaining. + */ + public Builder setTotalCount(long value) { + + totalCount_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Total count of entries that were processed.
+     * 
+ * + * int64 total_count = 5; + * + * @return This builder for chaining. + */ + public Builder clearTotalCount() { + bitField0_ = (bitField0_ & ~0x00000010); + totalCount_ = 0L; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ImportDocumentsMetadataOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ImportDocumentsMetadataOrBuilder.java index af96b3b2836b..951efc022976 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ImportDocumentsMetadataOrBuilder.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ImportDocumentsMetadataOrBuilder.java @@ -122,4 +122,17 @@ public interface ImportDocumentsMetadataOrBuilder * @return The failureCount. */ long getFailureCount(); + + /** + * + * + *
+   * Total count of entries that were processed.
+   * 
+ * + * int64 total_count = 5; + * + * @return The totalCount. + */ + long getTotalCount(); } diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ImportDocumentsRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ImportDocumentsRequest.java index 04aab17612a2..1ef27a7b0b9f 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ImportDocumentsRequest.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ImportDocumentsRequest.java @@ -1374,6 +1374,11 @@ public enum SourceCase INLINE_SOURCE(2), GCS_SOURCE(3), BIGQUERY_SOURCE(4), + FHIR_STORE_SOURCE(10), + SPANNER_SOURCE(11), + CLOUD_SQL_SOURCE(12), + FIRESTORE_SOURCE(13), + BIGTABLE_SOURCE(15), SOURCE_NOT_SET(0); private final int value; @@ -1398,6 +1403,16 @@ public static SourceCase forNumber(int value) { return GCS_SOURCE; case 4: return BIGQUERY_SOURCE; + case 10: + return FHIR_STORE_SOURCE; + case 11: + return SPANNER_SOURCE; + case 12: + return CLOUD_SQL_SOURCE; + case 13: + return FIRESTORE_SOURCE; + case 15: + return BIGTABLE_SOURCE; case 0: return SOURCE_NOT_SET; default: @@ -1578,6 +1593,266 @@ public com.google.cloud.discoveryengine.v1alpha.BigQuerySource getBigquerySource return com.google.cloud.discoveryengine.v1alpha.BigQuerySource.getDefaultInstance(); } + public static final int FHIR_STORE_SOURCE_FIELD_NUMBER = 10; + /** + * + * + *
+   * FhirStore input source.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.FhirStoreSource fhir_store_source = 10; + * + * @return Whether the fhirStoreSource field is set. + */ + @java.lang.Override + public boolean hasFhirStoreSource() { + return sourceCase_ == 10; + } + /** + * + * + *
+   * FhirStore input source.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.FhirStoreSource fhir_store_source = 10; + * + * @return The fhirStoreSource. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.FhirStoreSource getFhirStoreSource() { + if (sourceCase_ == 10) { + return (com.google.cloud.discoveryengine.v1alpha.FhirStoreSource) source_; + } + return com.google.cloud.discoveryengine.v1alpha.FhirStoreSource.getDefaultInstance(); + } + /** + * + * + *
+   * FhirStore input source.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.FhirStoreSource fhir_store_source = 10; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.FhirStoreSourceOrBuilder + getFhirStoreSourceOrBuilder() { + if (sourceCase_ == 10) { + return (com.google.cloud.discoveryengine.v1alpha.FhirStoreSource) source_; + } + return com.google.cloud.discoveryengine.v1alpha.FhirStoreSource.getDefaultInstance(); + } + + public static final int SPANNER_SOURCE_FIELD_NUMBER = 11; + /** + * + * + *
+   * Spanner input source.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.SpannerSource spanner_source = 11; + * + * @return Whether the spannerSource field is set. + */ + @java.lang.Override + public boolean hasSpannerSource() { + return sourceCase_ == 11; + } + /** + * + * + *
+   * Spanner input source.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.SpannerSource spanner_source = 11; + * + * @return The spannerSource. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SpannerSource getSpannerSource() { + if (sourceCase_ == 11) { + return (com.google.cloud.discoveryengine.v1alpha.SpannerSource) source_; + } + return com.google.cloud.discoveryengine.v1alpha.SpannerSource.getDefaultInstance(); + } + /** + * + * + *
+   * Spanner input source.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.SpannerSource spanner_source = 11; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SpannerSourceOrBuilder + getSpannerSourceOrBuilder() { + if (sourceCase_ == 11) { + return (com.google.cloud.discoveryengine.v1alpha.SpannerSource) source_; + } + return com.google.cloud.discoveryengine.v1alpha.SpannerSource.getDefaultInstance(); + } + + public static final int CLOUD_SQL_SOURCE_FIELD_NUMBER = 12; + /** + * + * + *
+   * Cloud SQL input source.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.CloudSqlSource cloud_sql_source = 12; + * + * @return Whether the cloudSqlSource field is set. + */ + @java.lang.Override + public boolean hasCloudSqlSource() { + return sourceCase_ == 12; + } + /** + * + * + *
+   * Cloud SQL input source.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.CloudSqlSource cloud_sql_source = 12; + * + * @return The cloudSqlSource. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.CloudSqlSource getCloudSqlSource() { + if (sourceCase_ == 12) { + return (com.google.cloud.discoveryengine.v1alpha.CloudSqlSource) source_; + } + return com.google.cloud.discoveryengine.v1alpha.CloudSqlSource.getDefaultInstance(); + } + /** + * + * + *
+   * Cloud SQL input source.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.CloudSqlSource cloud_sql_source = 12; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.CloudSqlSourceOrBuilder + getCloudSqlSourceOrBuilder() { + if (sourceCase_ == 12) { + return (com.google.cloud.discoveryengine.v1alpha.CloudSqlSource) source_; + } + return com.google.cloud.discoveryengine.v1alpha.CloudSqlSource.getDefaultInstance(); + } + + public static final int FIRESTORE_SOURCE_FIELD_NUMBER = 13; + /** + * + * + *
+   * Firestore input source.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.FirestoreSource firestore_source = 13; + * + * @return Whether the firestoreSource field is set. + */ + @java.lang.Override + public boolean hasFirestoreSource() { + return sourceCase_ == 13; + } + /** + * + * + *
+   * Firestore input source.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.FirestoreSource firestore_source = 13; + * + * @return The firestoreSource. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.FirestoreSource getFirestoreSource() { + if (sourceCase_ == 13) { + return (com.google.cloud.discoveryengine.v1alpha.FirestoreSource) source_; + } + return com.google.cloud.discoveryengine.v1alpha.FirestoreSource.getDefaultInstance(); + } + /** + * + * + *
+   * Firestore input source.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.FirestoreSource firestore_source = 13; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.FirestoreSourceOrBuilder + getFirestoreSourceOrBuilder() { + if (sourceCase_ == 13) { + return (com.google.cloud.discoveryengine.v1alpha.FirestoreSource) source_; + } + return com.google.cloud.discoveryengine.v1alpha.FirestoreSource.getDefaultInstance(); + } + + public static final int BIGTABLE_SOURCE_FIELD_NUMBER = 15; + /** + * + * + *
+   * Cloud Bigtable input source.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigtableSource bigtable_source = 15; + * + * @return Whether the bigtableSource field is set. + */ + @java.lang.Override + public boolean hasBigtableSource() { + return sourceCase_ == 15; + } + /** + * + * + *
+   * Cloud Bigtable input source.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigtableSource bigtable_source = 15; + * + * @return The bigtableSource. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.BigtableSource getBigtableSource() { + if (sourceCase_ == 15) { + return (com.google.cloud.discoveryengine.v1alpha.BigtableSource) source_; + } + return com.google.cloud.discoveryengine.v1alpha.BigtableSource.getDefaultInstance(); + } + /** + * + * + *
+   * Cloud Bigtable input source.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigtableSource bigtable_source = 15; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.BigtableSourceOrBuilder + getBigtableSourceOrBuilder() { + if (sourceCase_ == 15) { + return (com.google.cloud.discoveryengine.v1alpha.BigtableSource) source_; + } + return com.google.cloud.discoveryengine.v1alpha.BigtableSource.getDefaultInstance(); + } + public static final int PARENT_FIELD_NUMBER = 1; @SuppressWarnings("serial") @@ -1736,6 +2011,55 @@ public int getReconciliationModeValue() { : result; } + public static final int UPDATE_MASK_FIELD_NUMBER = 7; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Indicates which fields in the provided imported documents to update. If
+   * not set, the default is to update all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 7; + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Indicates which fields in the provided imported documents to update. If
+   * not set, the default is to update all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 7; + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Indicates which fields in the provided imported documents to update. If
+   * not set, the default is to update all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 7; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + public static final int AUTO_GENERATE_IDS_FIELD_NUMBER = 8; private boolean autoGenerateIds_ = false; /** @@ -1755,14 +2079,18 @@ public int getReconciliationModeValue() { * [id_field][google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.id_field], * otherwise, documents without IDs fail to be imported. * - * Only set this field when using - * [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource] or - * [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource], and - * when + * Supported data sources: + * + * * [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource]. * [GcsSource.data_schema][google.cloud.discoveryengine.v1alpha.GcsSource.data_schema] - * or + * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. + * * [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource]. * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1alpha.BigQuerySource.data_schema] - * is `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. + * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. + * * [SpannerSource][google.cloud.discoveryengine.v1alpha.SpannerSource]. + * * [CloudSqlSource][google.cloud.discoveryengine.v1alpha.CloudSqlSource]. + * * [FirestoreSource][google.cloud.discoveryengine.v1alpha.FirestoreSource]. + * * [BigtableSource][google.cloud.discoveryengine.v1alpha.BigtableSource]. * * * bool auto_generate_ids = 8; @@ -1782,35 +2110,40 @@ public boolean getAutoGenerateIds() { * * *
-   * The field in the Cloud Storage and BigQuery sources that indicates the
-   * unique IDs of the documents.
+   * The field indicates the ID field or column to be used as unique IDs of
+   * the documents.
    *
    * For [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource] it is the
    * key of the JSON field. For instance, `my_id` for JSON `{"my_id":
-   * "some_uuid"}`. For
-   * [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource] it is
-   * the column name of the BigQuery table where the unique ids are stored.
+   * "some_uuid"}`. For others, it may be the column name of the table where the
+   * unique ids are stored.
    *
-   * The values of the JSON field or the BigQuery column are used as the
+   * The values of the JSON field or the table column are used as the
    * [Document.id][google.cloud.discoveryengine.v1alpha.Document.id]s. The JSON
-   * field or the BigQuery column must be of string type, and the values must be
+   * field or the table column must be of string type, and the values must be
    * set as valid strings conform to
    * [RFC-1034](https://tools.ietf.org/html/rfc1034) with 1-63 characters.
    * Otherwise, documents without valid IDs fail to be imported.
    *
-   * Only set this field when using
-   * [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource] or
-   * [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource], and
-   * when
-   * [GcsSource.data_schema][google.cloud.discoveryengine.v1alpha.GcsSource.data_schema]
-   * or
-   * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1alpha.BigQuerySource.data_schema]
-   * is `custom`. And only set this field when
+   * Only set this field when
    * [auto_generate_ids][google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.auto_generate_ids]
    * is unset or set as `false`. Otherwise, an INVALID_ARGUMENT error is thrown.
    *
    * If it is unset, a default value `_id` is used when importing from the
    * allowed data sources.
+   *
+   * Supported data sources:
+   *
+   * * [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource].
+   * [GcsSource.data_schema][google.cloud.discoveryengine.v1alpha.GcsSource.data_schema]
+   * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
+   * * [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource].
+   * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1alpha.BigQuerySource.data_schema]
+   * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
+   * * [SpannerSource][google.cloud.discoveryengine.v1alpha.SpannerSource].
+   * * [CloudSqlSource][google.cloud.discoveryengine.v1alpha.CloudSqlSource].
+   * * [FirestoreSource][google.cloud.discoveryengine.v1alpha.FirestoreSource].
+   * * [BigtableSource][google.cloud.discoveryengine.v1alpha.BigtableSource].
    * 
* * string id_field = 9; @@ -1833,35 +2166,40 @@ public java.lang.String getIdField() { * * *
-   * The field in the Cloud Storage and BigQuery sources that indicates the
-   * unique IDs of the documents.
+   * The field indicates the ID field or column to be used as unique IDs of
+   * the documents.
    *
    * For [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource] it is the
    * key of the JSON field. For instance, `my_id` for JSON `{"my_id":
-   * "some_uuid"}`. For
-   * [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource] it is
-   * the column name of the BigQuery table where the unique ids are stored.
+   * "some_uuid"}`. For others, it may be the column name of the table where the
+   * unique ids are stored.
    *
-   * The values of the JSON field or the BigQuery column are used as the
+   * The values of the JSON field or the table column are used as the
    * [Document.id][google.cloud.discoveryengine.v1alpha.Document.id]s. The JSON
-   * field or the BigQuery column must be of string type, and the values must be
+   * field or the table column must be of string type, and the values must be
    * set as valid strings conform to
    * [RFC-1034](https://tools.ietf.org/html/rfc1034) with 1-63 characters.
    * Otherwise, documents without valid IDs fail to be imported.
    *
-   * Only set this field when using
-   * [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource] or
-   * [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource], and
-   * when
-   * [GcsSource.data_schema][google.cloud.discoveryengine.v1alpha.GcsSource.data_schema]
-   * or
-   * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1alpha.BigQuerySource.data_schema]
-   * is `custom`. And only set this field when
+   * Only set this field when
    * [auto_generate_ids][google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.auto_generate_ids]
    * is unset or set as `false`. Otherwise, an INVALID_ARGUMENT error is thrown.
    *
    * If it is unset, a default value `_id` is used when importing from the
    * allowed data sources.
+   *
+   * Supported data sources:
+   *
+   * * [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource].
+   * [GcsSource.data_schema][google.cloud.discoveryengine.v1alpha.GcsSource.data_schema]
+   * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
+   * * [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource].
+   * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1alpha.BigQuerySource.data_schema]
+   * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
+   * * [SpannerSource][google.cloud.discoveryengine.v1alpha.SpannerSource].
+   * * [CloudSqlSource][google.cloud.discoveryengine.v1alpha.CloudSqlSource].
+   * * [FirestoreSource][google.cloud.discoveryengine.v1alpha.FirestoreSource].
+   * * [BigtableSource][google.cloud.discoveryengine.v1alpha.BigtableSource].
    * 
* * string id_field = 9; @@ -1918,12 +2256,30 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(6, reconciliationMode_); } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(7, getUpdateMask()); + } if (autoGenerateIds_ != false) { output.writeBool(8, autoGenerateIds_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(idField_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 9, idField_); } + if (sourceCase_ == 10) { + output.writeMessage(10, (com.google.cloud.discoveryengine.v1alpha.FhirStoreSource) source_); + } + if (sourceCase_ == 11) { + output.writeMessage(11, (com.google.cloud.discoveryengine.v1alpha.SpannerSource) source_); + } + if (sourceCase_ == 12) { + output.writeMessage(12, (com.google.cloud.discoveryengine.v1alpha.CloudSqlSource) source_); + } + if (sourceCase_ == 13) { + output.writeMessage(13, (com.google.cloud.discoveryengine.v1alpha.FirestoreSource) source_); + } + if (sourceCase_ == 15) { + output.writeMessage(15, (com.google.cloud.discoveryengine.v1alpha.BigtableSource) source_); + } getUnknownFields().writeTo(output); } @@ -1962,12 +2318,40 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, reconciliationMode_); } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getUpdateMask()); + } if (autoGenerateIds_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(8, autoGenerateIds_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(idField_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, idField_); } + if (sourceCase_ == 10) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 10, (com.google.cloud.discoveryengine.v1alpha.FhirStoreSource) source_); + } + if (sourceCase_ == 11) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 11, (com.google.cloud.discoveryengine.v1alpha.SpannerSource) source_); + } + if (sourceCase_ == 12) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 12, (com.google.cloud.discoveryengine.v1alpha.CloudSqlSource) source_); + } + if (sourceCase_ == 13) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 13, (com.google.cloud.discoveryengine.v1alpha.FirestoreSource) source_); + } + if (sourceCase_ == 15) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 15, (com.google.cloud.discoveryengine.v1alpha.BigtableSource) source_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -1990,6 +2374,10 @@ public boolean equals(final java.lang.Object obj) { if (!getErrorConfig().equals(other.getErrorConfig())) return false; } if (reconciliationMode_ != other.reconciliationMode_) return false; + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } if (getAutoGenerateIds() != other.getAutoGenerateIds()) return false; if (!getIdField().equals(other.getIdField())) return false; if (!getSourceCase().equals(other.getSourceCase())) return false; @@ -2003,6 +2391,21 @@ public boolean equals(final java.lang.Object obj) { case 4: if (!getBigquerySource().equals(other.getBigquerySource())) return false; break; + case 10: + if (!getFhirStoreSource().equals(other.getFhirStoreSource())) return false; + break; + case 11: + if (!getSpannerSource().equals(other.getSpannerSource())) return false; + break; + case 12: + if (!getCloudSqlSource().equals(other.getCloudSqlSource())) return false; + break; + case 13: + if (!getFirestoreSource().equals(other.getFirestoreSource())) return false; + break; + case 15: + if (!getBigtableSource().equals(other.getBigtableSource())) return false; + break; case 0: default: } @@ -2025,6 +2428,10 @@ public int hashCode() { } hash = (37 * hash) + RECONCILIATION_MODE_FIELD_NUMBER; hash = (53 * hash) + reconciliationMode_; + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } hash = (37 * hash) + AUTO_GENERATE_IDS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAutoGenerateIds()); hash = (37 * hash) + ID_FIELD_FIELD_NUMBER; @@ -2042,6 +2449,26 @@ public int hashCode() { hash = (37 * hash) + BIGQUERY_SOURCE_FIELD_NUMBER; hash = (53 * hash) + getBigquerySource().hashCode(); break; + case 10: + hash = (37 * hash) + FHIR_STORE_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getFhirStoreSource().hashCode(); + break; + case 11: + hash = (37 * hash) + SPANNER_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getSpannerSource().hashCode(); + break; + case 12: + hash = (37 * hash) + CLOUD_SQL_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getCloudSqlSource().hashCode(); + break; + case 13: + hash = (37 * hash) + FIRESTORE_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getFirestoreSource().hashCode(); + break; + case 15: + hash = (37 * hash) + BIGTABLE_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getBigtableSource().hashCode(); + break; case 0: default: } @@ -2187,6 +2614,7 @@ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { getErrorConfigFieldBuilder(); + getUpdateMaskFieldBuilder(); } } @@ -2203,6 +2631,21 @@ public Builder clear() { if (bigquerySourceBuilder_ != null) { bigquerySourceBuilder_.clear(); } + if (fhirStoreSourceBuilder_ != null) { + fhirStoreSourceBuilder_.clear(); + } + if (spannerSourceBuilder_ != null) { + spannerSourceBuilder_.clear(); + } + if (cloudSqlSourceBuilder_ != null) { + cloudSqlSourceBuilder_.clear(); + } + if (firestoreSourceBuilder_ != null) { + firestoreSourceBuilder_.clear(); + } + if (bigtableSourceBuilder_ != null) { + bigtableSourceBuilder_.clear(); + } parent_ = ""; errorConfig_ = null; if (errorConfigBuilder_ != null) { @@ -2210,6 +2653,11 @@ public Builder clear() { errorConfigBuilder_ = null; } reconciliationMode_ = 0; + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } autoGenerateIds_ = false; idField_ = ""; sourceCase_ = 0; @@ -2253,22 +2701,26 @@ public com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest buildPart private void buildPartial0( com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest result) { int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000008) != 0)) { + if (((from_bitField0_ & 0x00000100) != 0)) { result.parent_ = parent_; } int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000010) != 0)) { + if (((from_bitField0_ & 0x00000200) != 0)) { result.errorConfig_ = errorConfigBuilder_ == null ? errorConfig_ : errorConfigBuilder_.build(); to_bitField0_ |= 0x00000001; } - if (((from_bitField0_ & 0x00000020) != 0)) { + if (((from_bitField0_ & 0x00000400) != 0)) { result.reconciliationMode_ = reconciliationMode_; } - if (((from_bitField0_ & 0x00000040) != 0)) { + if (((from_bitField0_ & 0x00000800) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00001000) != 0)) { result.autoGenerateIds_ = autoGenerateIds_; } - if (((from_bitField0_ & 0x00000080) != 0)) { + if (((from_bitField0_ & 0x00002000) != 0)) { result.idField_ = idField_; } result.bitField0_ |= to_bitField0_; @@ -2287,6 +2739,21 @@ private void buildPartialOneofs( if (sourceCase_ == 4 && bigquerySourceBuilder_ != null) { result.source_ = bigquerySourceBuilder_.build(); } + if (sourceCase_ == 10 && fhirStoreSourceBuilder_ != null) { + result.source_ = fhirStoreSourceBuilder_.build(); + } + if (sourceCase_ == 11 && spannerSourceBuilder_ != null) { + result.source_ = spannerSourceBuilder_.build(); + } + if (sourceCase_ == 12 && cloudSqlSourceBuilder_ != null) { + result.source_ = cloudSqlSourceBuilder_.build(); + } + if (sourceCase_ == 13 && firestoreSourceBuilder_ != null) { + result.source_ = firestoreSourceBuilder_.build(); + } + if (sourceCase_ == 15 && bigtableSourceBuilder_ != null) { + result.source_ = bigtableSourceBuilder_.build(); + } } @java.lang.Override @@ -2339,7 +2806,7 @@ public Builder mergeFrom( return this; if (!other.getParent().isEmpty()) { parent_ = other.parent_; - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000100; onChanged(); } if (other.hasErrorConfig()) { @@ -2348,12 +2815,15 @@ public Builder mergeFrom( if (other.reconciliationMode_ != 0) { setReconciliationModeValue(other.getReconciliationModeValue()); } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } if (other.getAutoGenerateIds() != false) { setAutoGenerateIds(other.getAutoGenerateIds()); } if (!other.getIdField().isEmpty()) { idField_ = other.idField_; - bitField0_ |= 0x00000080; + bitField0_ |= 0x00002000; onChanged(); } switch (other.getSourceCase()) { @@ -2372,15 +2842,40 @@ public Builder mergeFrom( mergeBigquerySource(other.getBigquerySource()); break; } - case SOURCE_NOT_SET: + case FHIR_STORE_SOURCE: { + mergeFhirStoreSource(other.getFhirStoreSource()); break; } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } + case SPANNER_SOURCE: + { + mergeSpannerSource(other.getSpannerSource()); + break; + } + case CLOUD_SQL_SOURCE: + { + mergeCloudSqlSource(other.getCloudSqlSource()); + break; + } + case FIRESTORE_SOURCE: + { + mergeFirestoreSource(other.getFirestoreSource()); + break; + } + case BIGTABLE_SOURCE: + { + mergeBigtableSource(other.getBigtableSource()); + break; + } + case SOURCE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } @java.lang.Override public final boolean isInitialized() { @@ -2406,7 +2901,7 @@ public Builder mergeFrom( case 10: { parent_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000100; break; } // case 10 case 18: @@ -2430,27 +2925,63 @@ public Builder mergeFrom( case 42: { input.readMessage(getErrorConfigFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000200; break; } // case 42 case 48: { reconciliationMode_ = input.readEnum(); - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000400; break; } // case 48 + case 58: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000800; + break; + } // case 58 case 64: { autoGenerateIds_ = input.readBool(); - bitField0_ |= 0x00000040; + bitField0_ |= 0x00001000; break; } // case 64 case 74: { idField_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; + bitField0_ |= 0x00002000; break; } // case 74 + case 82: + { + input.readMessage(getFhirStoreSourceFieldBuilder().getBuilder(), extensionRegistry); + sourceCase_ = 10; + break; + } // case 82 + case 90: + { + input.readMessage(getSpannerSourceFieldBuilder().getBuilder(), extensionRegistry); + sourceCase_ = 11; + break; + } // case 90 + case 98: + { + input.readMessage(getCloudSqlSourceFieldBuilder().getBuilder(), extensionRegistry); + sourceCase_ = 12; + break; + } // case 98 + case 106: + { + input.readMessage(getFirestoreSourceFieldBuilder().getBuilder(), extensionRegistry); + sourceCase_ = 13; + break; + } // case 106 + case 122: + { + input.readMessage(getBigtableSourceFieldBuilder().getBuilder(), extensionRegistry); + sourceCase_ = 15; + break; + } // case 122 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -2857,21 +3388,1088 @@ public Builder mergeGcsSource(com.google.cloud.discoveryengine.v1alpha.GcsSource * Cloud Storage location for the input content. * * - * .google.cloud.discoveryengine.v1alpha.GcsSource gcs_source = 3; + * .google.cloud.discoveryengine.v1alpha.GcsSource gcs_source = 3; + */ + public Builder clearGcsSource() { + if (gcsSourceBuilder_ == null) { + if (sourceCase_ == 3) { + sourceCase_ = 0; + source_ = null; + onChanged(); + } + } else { + if (sourceCase_ == 3) { + sourceCase_ = 0; + source_ = null; + } + gcsSourceBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Cloud Storage location for the input content.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.GcsSource gcs_source = 3; + */ + public com.google.cloud.discoveryengine.v1alpha.GcsSource.Builder getGcsSourceBuilder() { + return getGcsSourceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Cloud Storage location for the input content.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.GcsSource gcs_source = 3; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.GcsSourceOrBuilder getGcsSourceOrBuilder() { + if ((sourceCase_ == 3) && (gcsSourceBuilder_ != null)) { + return gcsSourceBuilder_.getMessageOrBuilder(); + } else { + if (sourceCase_ == 3) { + return (com.google.cloud.discoveryengine.v1alpha.GcsSource) source_; + } + return com.google.cloud.discoveryengine.v1alpha.GcsSource.getDefaultInstance(); + } + } + /** + * + * + *
+     * Cloud Storage location for the input content.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.GcsSource gcs_source = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.GcsSource, + com.google.cloud.discoveryengine.v1alpha.GcsSource.Builder, + com.google.cloud.discoveryengine.v1alpha.GcsSourceOrBuilder> + getGcsSourceFieldBuilder() { + if (gcsSourceBuilder_ == null) { + if (!(sourceCase_ == 3)) { + source_ = com.google.cloud.discoveryengine.v1alpha.GcsSource.getDefaultInstance(); + } + gcsSourceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.GcsSource, + com.google.cloud.discoveryengine.v1alpha.GcsSource.Builder, + com.google.cloud.discoveryengine.v1alpha.GcsSourceOrBuilder>( + (com.google.cloud.discoveryengine.v1alpha.GcsSource) source_, + getParentForChildren(), + isClean()); + source_ = null; + } + sourceCase_ = 3; + onChanged(); + return gcsSourceBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.BigQuerySource, + com.google.cloud.discoveryengine.v1alpha.BigQuerySource.Builder, + com.google.cloud.discoveryengine.v1alpha.BigQuerySourceOrBuilder> + bigquerySourceBuilder_; + /** + * + * + *
+     * BigQuery input source.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigQuerySource bigquery_source = 4; + * + * @return Whether the bigquerySource field is set. + */ + @java.lang.Override + public boolean hasBigquerySource() { + return sourceCase_ == 4; + } + /** + * + * + *
+     * BigQuery input source.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigQuerySource bigquery_source = 4; + * + * @return The bigquerySource. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.BigQuerySource getBigquerySource() { + if (bigquerySourceBuilder_ == null) { + if (sourceCase_ == 4) { + return (com.google.cloud.discoveryengine.v1alpha.BigQuerySource) source_; + } + return com.google.cloud.discoveryengine.v1alpha.BigQuerySource.getDefaultInstance(); + } else { + if (sourceCase_ == 4) { + return bigquerySourceBuilder_.getMessage(); + } + return com.google.cloud.discoveryengine.v1alpha.BigQuerySource.getDefaultInstance(); + } + } + /** + * + * + *
+     * BigQuery input source.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigQuerySource bigquery_source = 4; + */ + public Builder setBigquerySource( + com.google.cloud.discoveryengine.v1alpha.BigQuerySource value) { + if (bigquerySourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + onChanged(); + } else { + bigquerySourceBuilder_.setMessage(value); + } + sourceCase_ = 4; + return this; + } + /** + * + * + *
+     * BigQuery input source.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigQuerySource bigquery_source = 4; + */ + public Builder setBigquerySource( + com.google.cloud.discoveryengine.v1alpha.BigQuerySource.Builder builderForValue) { + if (bigquerySourceBuilder_ == null) { + source_ = builderForValue.build(); + onChanged(); + } else { + bigquerySourceBuilder_.setMessage(builderForValue.build()); + } + sourceCase_ = 4; + return this; + } + /** + * + * + *
+     * BigQuery input source.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigQuerySource bigquery_source = 4; + */ + public Builder mergeBigquerySource( + com.google.cloud.discoveryengine.v1alpha.BigQuerySource value) { + if (bigquerySourceBuilder_ == null) { + if (sourceCase_ == 4 + && source_ + != com.google.cloud.discoveryengine.v1alpha.BigQuerySource.getDefaultInstance()) { + source_ = + com.google.cloud.discoveryengine.v1alpha.BigQuerySource.newBuilder( + (com.google.cloud.discoveryengine.v1alpha.BigQuerySource) source_) + .mergeFrom(value) + .buildPartial(); + } else { + source_ = value; + } + onChanged(); + } else { + if (sourceCase_ == 4) { + bigquerySourceBuilder_.mergeFrom(value); + } else { + bigquerySourceBuilder_.setMessage(value); + } + } + sourceCase_ = 4; + return this; + } + /** + * + * + *
+     * BigQuery input source.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigQuerySource bigquery_source = 4; + */ + public Builder clearBigquerySource() { + if (bigquerySourceBuilder_ == null) { + if (sourceCase_ == 4) { + sourceCase_ = 0; + source_ = null; + onChanged(); + } + } else { + if (sourceCase_ == 4) { + sourceCase_ = 0; + source_ = null; + } + bigquerySourceBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * BigQuery input source.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigQuerySource bigquery_source = 4; + */ + public com.google.cloud.discoveryengine.v1alpha.BigQuerySource.Builder + getBigquerySourceBuilder() { + return getBigquerySourceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * BigQuery input source.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigQuerySource bigquery_source = 4; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.BigQuerySourceOrBuilder + getBigquerySourceOrBuilder() { + if ((sourceCase_ == 4) && (bigquerySourceBuilder_ != null)) { + return bigquerySourceBuilder_.getMessageOrBuilder(); + } else { + if (sourceCase_ == 4) { + return (com.google.cloud.discoveryengine.v1alpha.BigQuerySource) source_; + } + return com.google.cloud.discoveryengine.v1alpha.BigQuerySource.getDefaultInstance(); + } + } + /** + * + * + *
+     * BigQuery input source.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigQuerySource bigquery_source = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.BigQuerySource, + com.google.cloud.discoveryengine.v1alpha.BigQuerySource.Builder, + com.google.cloud.discoveryengine.v1alpha.BigQuerySourceOrBuilder> + getBigquerySourceFieldBuilder() { + if (bigquerySourceBuilder_ == null) { + if (!(sourceCase_ == 4)) { + source_ = com.google.cloud.discoveryengine.v1alpha.BigQuerySource.getDefaultInstance(); + } + bigquerySourceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.BigQuerySource, + com.google.cloud.discoveryengine.v1alpha.BigQuerySource.Builder, + com.google.cloud.discoveryengine.v1alpha.BigQuerySourceOrBuilder>( + (com.google.cloud.discoveryengine.v1alpha.BigQuerySource) source_, + getParentForChildren(), + isClean()); + source_ = null; + } + sourceCase_ = 4; + onChanged(); + return bigquerySourceBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.FhirStoreSource, + com.google.cloud.discoveryengine.v1alpha.FhirStoreSource.Builder, + com.google.cloud.discoveryengine.v1alpha.FhirStoreSourceOrBuilder> + fhirStoreSourceBuilder_; + /** + * + * + *
+     * FhirStore input source.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.FhirStoreSource fhir_store_source = 10; + * + * @return Whether the fhirStoreSource field is set. + */ + @java.lang.Override + public boolean hasFhirStoreSource() { + return sourceCase_ == 10; + } + /** + * + * + *
+     * FhirStore input source.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.FhirStoreSource fhir_store_source = 10; + * + * @return The fhirStoreSource. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.FhirStoreSource getFhirStoreSource() { + if (fhirStoreSourceBuilder_ == null) { + if (sourceCase_ == 10) { + return (com.google.cloud.discoveryengine.v1alpha.FhirStoreSource) source_; + } + return com.google.cloud.discoveryengine.v1alpha.FhirStoreSource.getDefaultInstance(); + } else { + if (sourceCase_ == 10) { + return fhirStoreSourceBuilder_.getMessage(); + } + return com.google.cloud.discoveryengine.v1alpha.FhirStoreSource.getDefaultInstance(); + } + } + /** + * + * + *
+     * FhirStore input source.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.FhirStoreSource fhir_store_source = 10; + */ + public Builder setFhirStoreSource( + com.google.cloud.discoveryengine.v1alpha.FhirStoreSource value) { + if (fhirStoreSourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + onChanged(); + } else { + fhirStoreSourceBuilder_.setMessage(value); + } + sourceCase_ = 10; + return this; + } + /** + * + * + *
+     * FhirStore input source.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.FhirStoreSource fhir_store_source = 10; + */ + public Builder setFhirStoreSource( + com.google.cloud.discoveryengine.v1alpha.FhirStoreSource.Builder builderForValue) { + if (fhirStoreSourceBuilder_ == null) { + source_ = builderForValue.build(); + onChanged(); + } else { + fhirStoreSourceBuilder_.setMessage(builderForValue.build()); + } + sourceCase_ = 10; + return this; + } + /** + * + * + *
+     * FhirStore input source.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.FhirStoreSource fhir_store_source = 10; + */ + public Builder mergeFhirStoreSource( + com.google.cloud.discoveryengine.v1alpha.FhirStoreSource value) { + if (fhirStoreSourceBuilder_ == null) { + if (sourceCase_ == 10 + && source_ + != com.google.cloud.discoveryengine.v1alpha.FhirStoreSource.getDefaultInstance()) { + source_ = + com.google.cloud.discoveryengine.v1alpha.FhirStoreSource.newBuilder( + (com.google.cloud.discoveryengine.v1alpha.FhirStoreSource) source_) + .mergeFrom(value) + .buildPartial(); + } else { + source_ = value; + } + onChanged(); + } else { + if (sourceCase_ == 10) { + fhirStoreSourceBuilder_.mergeFrom(value); + } else { + fhirStoreSourceBuilder_.setMessage(value); + } + } + sourceCase_ = 10; + return this; + } + /** + * + * + *
+     * FhirStore input source.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.FhirStoreSource fhir_store_source = 10; + */ + public Builder clearFhirStoreSource() { + if (fhirStoreSourceBuilder_ == null) { + if (sourceCase_ == 10) { + sourceCase_ = 0; + source_ = null; + onChanged(); + } + } else { + if (sourceCase_ == 10) { + sourceCase_ = 0; + source_ = null; + } + fhirStoreSourceBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * FhirStore input source.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.FhirStoreSource fhir_store_source = 10; + */ + public com.google.cloud.discoveryengine.v1alpha.FhirStoreSource.Builder + getFhirStoreSourceBuilder() { + return getFhirStoreSourceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * FhirStore input source.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.FhirStoreSource fhir_store_source = 10; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.FhirStoreSourceOrBuilder + getFhirStoreSourceOrBuilder() { + if ((sourceCase_ == 10) && (fhirStoreSourceBuilder_ != null)) { + return fhirStoreSourceBuilder_.getMessageOrBuilder(); + } else { + if (sourceCase_ == 10) { + return (com.google.cloud.discoveryengine.v1alpha.FhirStoreSource) source_; + } + return com.google.cloud.discoveryengine.v1alpha.FhirStoreSource.getDefaultInstance(); + } + } + /** + * + * + *
+     * FhirStore input source.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.FhirStoreSource fhir_store_source = 10; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.FhirStoreSource, + com.google.cloud.discoveryengine.v1alpha.FhirStoreSource.Builder, + com.google.cloud.discoveryengine.v1alpha.FhirStoreSourceOrBuilder> + getFhirStoreSourceFieldBuilder() { + if (fhirStoreSourceBuilder_ == null) { + if (!(sourceCase_ == 10)) { + source_ = com.google.cloud.discoveryengine.v1alpha.FhirStoreSource.getDefaultInstance(); + } + fhirStoreSourceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.FhirStoreSource, + com.google.cloud.discoveryengine.v1alpha.FhirStoreSource.Builder, + com.google.cloud.discoveryengine.v1alpha.FhirStoreSourceOrBuilder>( + (com.google.cloud.discoveryengine.v1alpha.FhirStoreSource) source_, + getParentForChildren(), + isClean()); + source_ = null; + } + sourceCase_ = 10; + onChanged(); + return fhirStoreSourceBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SpannerSource, + com.google.cloud.discoveryengine.v1alpha.SpannerSource.Builder, + com.google.cloud.discoveryengine.v1alpha.SpannerSourceOrBuilder> + spannerSourceBuilder_; + /** + * + * + *
+     * Spanner input source.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.SpannerSource spanner_source = 11; + * + * @return Whether the spannerSource field is set. + */ + @java.lang.Override + public boolean hasSpannerSource() { + return sourceCase_ == 11; + } + /** + * + * + *
+     * Spanner input source.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.SpannerSource spanner_source = 11; + * + * @return The spannerSource. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SpannerSource getSpannerSource() { + if (spannerSourceBuilder_ == null) { + if (sourceCase_ == 11) { + return (com.google.cloud.discoveryengine.v1alpha.SpannerSource) source_; + } + return com.google.cloud.discoveryengine.v1alpha.SpannerSource.getDefaultInstance(); + } else { + if (sourceCase_ == 11) { + return spannerSourceBuilder_.getMessage(); + } + return com.google.cloud.discoveryengine.v1alpha.SpannerSource.getDefaultInstance(); + } + } + /** + * + * + *
+     * Spanner input source.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.SpannerSource spanner_source = 11; + */ + public Builder setSpannerSource(com.google.cloud.discoveryengine.v1alpha.SpannerSource value) { + if (spannerSourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + onChanged(); + } else { + spannerSourceBuilder_.setMessage(value); + } + sourceCase_ = 11; + return this; + } + /** + * + * + *
+     * Spanner input source.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.SpannerSource spanner_source = 11; + */ + public Builder setSpannerSource( + com.google.cloud.discoveryengine.v1alpha.SpannerSource.Builder builderForValue) { + if (spannerSourceBuilder_ == null) { + source_ = builderForValue.build(); + onChanged(); + } else { + spannerSourceBuilder_.setMessage(builderForValue.build()); + } + sourceCase_ = 11; + return this; + } + /** + * + * + *
+     * Spanner input source.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.SpannerSource spanner_source = 11; + */ + public Builder mergeSpannerSource( + com.google.cloud.discoveryengine.v1alpha.SpannerSource value) { + if (spannerSourceBuilder_ == null) { + if (sourceCase_ == 11 + && source_ + != com.google.cloud.discoveryengine.v1alpha.SpannerSource.getDefaultInstance()) { + source_ = + com.google.cloud.discoveryengine.v1alpha.SpannerSource.newBuilder( + (com.google.cloud.discoveryengine.v1alpha.SpannerSource) source_) + .mergeFrom(value) + .buildPartial(); + } else { + source_ = value; + } + onChanged(); + } else { + if (sourceCase_ == 11) { + spannerSourceBuilder_.mergeFrom(value); + } else { + spannerSourceBuilder_.setMessage(value); + } + } + sourceCase_ = 11; + return this; + } + /** + * + * + *
+     * Spanner input source.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.SpannerSource spanner_source = 11; + */ + public Builder clearSpannerSource() { + if (spannerSourceBuilder_ == null) { + if (sourceCase_ == 11) { + sourceCase_ = 0; + source_ = null; + onChanged(); + } + } else { + if (sourceCase_ == 11) { + sourceCase_ = 0; + source_ = null; + } + spannerSourceBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Spanner input source.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.SpannerSource spanner_source = 11; + */ + public com.google.cloud.discoveryengine.v1alpha.SpannerSource.Builder + getSpannerSourceBuilder() { + return getSpannerSourceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Spanner input source.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.SpannerSource spanner_source = 11; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SpannerSourceOrBuilder + getSpannerSourceOrBuilder() { + if ((sourceCase_ == 11) && (spannerSourceBuilder_ != null)) { + return spannerSourceBuilder_.getMessageOrBuilder(); + } else { + if (sourceCase_ == 11) { + return (com.google.cloud.discoveryengine.v1alpha.SpannerSource) source_; + } + return com.google.cloud.discoveryengine.v1alpha.SpannerSource.getDefaultInstance(); + } + } + /** + * + * + *
+     * Spanner input source.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.SpannerSource spanner_source = 11; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SpannerSource, + com.google.cloud.discoveryengine.v1alpha.SpannerSource.Builder, + com.google.cloud.discoveryengine.v1alpha.SpannerSourceOrBuilder> + getSpannerSourceFieldBuilder() { + if (spannerSourceBuilder_ == null) { + if (!(sourceCase_ == 11)) { + source_ = com.google.cloud.discoveryengine.v1alpha.SpannerSource.getDefaultInstance(); + } + spannerSourceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SpannerSource, + com.google.cloud.discoveryengine.v1alpha.SpannerSource.Builder, + com.google.cloud.discoveryengine.v1alpha.SpannerSourceOrBuilder>( + (com.google.cloud.discoveryengine.v1alpha.SpannerSource) source_, + getParentForChildren(), + isClean()); + source_ = null; + } + sourceCase_ = 11; + onChanged(); + return spannerSourceBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.CloudSqlSource, + com.google.cloud.discoveryengine.v1alpha.CloudSqlSource.Builder, + com.google.cloud.discoveryengine.v1alpha.CloudSqlSourceOrBuilder> + cloudSqlSourceBuilder_; + /** + * + * + *
+     * Cloud SQL input source.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.CloudSqlSource cloud_sql_source = 12; + * + * @return Whether the cloudSqlSource field is set. + */ + @java.lang.Override + public boolean hasCloudSqlSource() { + return sourceCase_ == 12; + } + /** + * + * + *
+     * Cloud SQL input source.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.CloudSqlSource cloud_sql_source = 12; + * + * @return The cloudSqlSource. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.CloudSqlSource getCloudSqlSource() { + if (cloudSqlSourceBuilder_ == null) { + if (sourceCase_ == 12) { + return (com.google.cloud.discoveryengine.v1alpha.CloudSqlSource) source_; + } + return com.google.cloud.discoveryengine.v1alpha.CloudSqlSource.getDefaultInstance(); + } else { + if (sourceCase_ == 12) { + return cloudSqlSourceBuilder_.getMessage(); + } + return com.google.cloud.discoveryengine.v1alpha.CloudSqlSource.getDefaultInstance(); + } + } + /** + * + * + *
+     * Cloud SQL input source.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.CloudSqlSource cloud_sql_source = 12; + */ + public Builder setCloudSqlSource( + com.google.cloud.discoveryengine.v1alpha.CloudSqlSource value) { + if (cloudSqlSourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + onChanged(); + } else { + cloudSqlSourceBuilder_.setMessage(value); + } + sourceCase_ = 12; + return this; + } + /** + * + * + *
+     * Cloud SQL input source.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.CloudSqlSource cloud_sql_source = 12; + */ + public Builder setCloudSqlSource( + com.google.cloud.discoveryengine.v1alpha.CloudSqlSource.Builder builderForValue) { + if (cloudSqlSourceBuilder_ == null) { + source_ = builderForValue.build(); + onChanged(); + } else { + cloudSqlSourceBuilder_.setMessage(builderForValue.build()); + } + sourceCase_ = 12; + return this; + } + /** + * + * + *
+     * Cloud SQL input source.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.CloudSqlSource cloud_sql_source = 12; + */ + public Builder mergeCloudSqlSource( + com.google.cloud.discoveryengine.v1alpha.CloudSqlSource value) { + if (cloudSqlSourceBuilder_ == null) { + if (sourceCase_ == 12 + && source_ + != com.google.cloud.discoveryengine.v1alpha.CloudSqlSource.getDefaultInstance()) { + source_ = + com.google.cloud.discoveryengine.v1alpha.CloudSqlSource.newBuilder( + (com.google.cloud.discoveryengine.v1alpha.CloudSqlSource) source_) + .mergeFrom(value) + .buildPartial(); + } else { + source_ = value; + } + onChanged(); + } else { + if (sourceCase_ == 12) { + cloudSqlSourceBuilder_.mergeFrom(value); + } else { + cloudSqlSourceBuilder_.setMessage(value); + } + } + sourceCase_ = 12; + return this; + } + /** + * + * + *
+     * Cloud SQL input source.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.CloudSqlSource cloud_sql_source = 12; + */ + public Builder clearCloudSqlSource() { + if (cloudSqlSourceBuilder_ == null) { + if (sourceCase_ == 12) { + sourceCase_ = 0; + source_ = null; + onChanged(); + } + } else { + if (sourceCase_ == 12) { + sourceCase_ = 0; + source_ = null; + } + cloudSqlSourceBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Cloud SQL input source.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.CloudSqlSource cloud_sql_source = 12; + */ + public com.google.cloud.discoveryengine.v1alpha.CloudSqlSource.Builder + getCloudSqlSourceBuilder() { + return getCloudSqlSourceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Cloud SQL input source.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.CloudSqlSource cloud_sql_source = 12; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.CloudSqlSourceOrBuilder + getCloudSqlSourceOrBuilder() { + if ((sourceCase_ == 12) && (cloudSqlSourceBuilder_ != null)) { + return cloudSqlSourceBuilder_.getMessageOrBuilder(); + } else { + if (sourceCase_ == 12) { + return (com.google.cloud.discoveryengine.v1alpha.CloudSqlSource) source_; + } + return com.google.cloud.discoveryengine.v1alpha.CloudSqlSource.getDefaultInstance(); + } + } + /** + * + * + *
+     * Cloud SQL input source.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.CloudSqlSource cloud_sql_source = 12; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.CloudSqlSource, + com.google.cloud.discoveryengine.v1alpha.CloudSqlSource.Builder, + com.google.cloud.discoveryengine.v1alpha.CloudSqlSourceOrBuilder> + getCloudSqlSourceFieldBuilder() { + if (cloudSqlSourceBuilder_ == null) { + if (!(sourceCase_ == 12)) { + source_ = com.google.cloud.discoveryengine.v1alpha.CloudSqlSource.getDefaultInstance(); + } + cloudSqlSourceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.CloudSqlSource, + com.google.cloud.discoveryengine.v1alpha.CloudSqlSource.Builder, + com.google.cloud.discoveryengine.v1alpha.CloudSqlSourceOrBuilder>( + (com.google.cloud.discoveryengine.v1alpha.CloudSqlSource) source_, + getParentForChildren(), + isClean()); + source_ = null; + } + sourceCase_ = 12; + onChanged(); + return cloudSqlSourceBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.FirestoreSource, + com.google.cloud.discoveryengine.v1alpha.FirestoreSource.Builder, + com.google.cloud.discoveryengine.v1alpha.FirestoreSourceOrBuilder> + firestoreSourceBuilder_; + /** + * + * + *
+     * Firestore input source.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.FirestoreSource firestore_source = 13; + * + * @return Whether the firestoreSource field is set. + */ + @java.lang.Override + public boolean hasFirestoreSource() { + return sourceCase_ == 13; + } + /** + * + * + *
+     * Firestore input source.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.FirestoreSource firestore_source = 13; + * + * @return The firestoreSource. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.FirestoreSource getFirestoreSource() { + if (firestoreSourceBuilder_ == null) { + if (sourceCase_ == 13) { + return (com.google.cloud.discoveryengine.v1alpha.FirestoreSource) source_; + } + return com.google.cloud.discoveryengine.v1alpha.FirestoreSource.getDefaultInstance(); + } else { + if (sourceCase_ == 13) { + return firestoreSourceBuilder_.getMessage(); + } + return com.google.cloud.discoveryengine.v1alpha.FirestoreSource.getDefaultInstance(); + } + } + /** + * + * + *
+     * Firestore input source.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.FirestoreSource firestore_source = 13; + */ + public Builder setFirestoreSource( + com.google.cloud.discoveryengine.v1alpha.FirestoreSource value) { + if (firestoreSourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + onChanged(); + } else { + firestoreSourceBuilder_.setMessage(value); + } + sourceCase_ = 13; + return this; + } + /** + * + * + *
+     * Firestore input source.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.FirestoreSource firestore_source = 13; + */ + public Builder setFirestoreSource( + com.google.cloud.discoveryengine.v1alpha.FirestoreSource.Builder builderForValue) { + if (firestoreSourceBuilder_ == null) { + source_ = builderForValue.build(); + onChanged(); + } else { + firestoreSourceBuilder_.setMessage(builderForValue.build()); + } + sourceCase_ = 13; + return this; + } + /** + * + * + *
+     * Firestore input source.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.FirestoreSource firestore_source = 13; + */ + public Builder mergeFirestoreSource( + com.google.cloud.discoveryengine.v1alpha.FirestoreSource value) { + if (firestoreSourceBuilder_ == null) { + if (sourceCase_ == 13 + && source_ + != com.google.cloud.discoveryengine.v1alpha.FirestoreSource.getDefaultInstance()) { + source_ = + com.google.cloud.discoveryengine.v1alpha.FirestoreSource.newBuilder( + (com.google.cloud.discoveryengine.v1alpha.FirestoreSource) source_) + .mergeFrom(value) + .buildPartial(); + } else { + source_ = value; + } + onChanged(); + } else { + if (sourceCase_ == 13) { + firestoreSourceBuilder_.mergeFrom(value); + } else { + firestoreSourceBuilder_.setMessage(value); + } + } + sourceCase_ = 13; + return this; + } + /** + * + * + *
+     * Firestore input source.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.FirestoreSource firestore_source = 13; */ - public Builder clearGcsSource() { - if (gcsSourceBuilder_ == null) { - if (sourceCase_ == 3) { + public Builder clearFirestoreSource() { + if (firestoreSourceBuilder_ == null) { + if (sourceCase_ == 13) { sourceCase_ = 0; source_ = null; onChanged(); } } else { - if (sourceCase_ == 3) { + if (sourceCase_ == 13) { sourceCase_ = 0; source_ = null; } - gcsSourceBuilder_.clear(); + firestoreSourceBuilder_.clear(); } return this; } @@ -2879,173 +4477,175 @@ public Builder clearGcsSource() { * * *
-     * Cloud Storage location for the input content.
+     * Firestore input source.
      * 
* - * .google.cloud.discoveryengine.v1alpha.GcsSource gcs_source = 3; + * .google.cloud.discoveryengine.v1alpha.FirestoreSource firestore_source = 13; */ - public com.google.cloud.discoveryengine.v1alpha.GcsSource.Builder getGcsSourceBuilder() { - return getGcsSourceFieldBuilder().getBuilder(); + public com.google.cloud.discoveryengine.v1alpha.FirestoreSource.Builder + getFirestoreSourceBuilder() { + return getFirestoreSourceFieldBuilder().getBuilder(); } /** * * *
-     * Cloud Storage location for the input content.
+     * Firestore input source.
      * 
* - * .google.cloud.discoveryengine.v1alpha.GcsSource gcs_source = 3; + * .google.cloud.discoveryengine.v1alpha.FirestoreSource firestore_source = 13; */ @java.lang.Override - public com.google.cloud.discoveryengine.v1alpha.GcsSourceOrBuilder getGcsSourceOrBuilder() { - if ((sourceCase_ == 3) && (gcsSourceBuilder_ != null)) { - return gcsSourceBuilder_.getMessageOrBuilder(); + public com.google.cloud.discoveryengine.v1alpha.FirestoreSourceOrBuilder + getFirestoreSourceOrBuilder() { + if ((sourceCase_ == 13) && (firestoreSourceBuilder_ != null)) { + return firestoreSourceBuilder_.getMessageOrBuilder(); } else { - if (sourceCase_ == 3) { - return (com.google.cloud.discoveryengine.v1alpha.GcsSource) source_; + if (sourceCase_ == 13) { + return (com.google.cloud.discoveryengine.v1alpha.FirestoreSource) source_; } - return com.google.cloud.discoveryengine.v1alpha.GcsSource.getDefaultInstance(); + return com.google.cloud.discoveryengine.v1alpha.FirestoreSource.getDefaultInstance(); } } /** * * *
-     * Cloud Storage location for the input content.
+     * Firestore input source.
      * 
* - * .google.cloud.discoveryengine.v1alpha.GcsSource gcs_source = 3; + * .google.cloud.discoveryengine.v1alpha.FirestoreSource firestore_source = 13; */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.discoveryengine.v1alpha.GcsSource, - com.google.cloud.discoveryengine.v1alpha.GcsSource.Builder, - com.google.cloud.discoveryengine.v1alpha.GcsSourceOrBuilder> - getGcsSourceFieldBuilder() { - if (gcsSourceBuilder_ == null) { - if (!(sourceCase_ == 3)) { - source_ = com.google.cloud.discoveryengine.v1alpha.GcsSource.getDefaultInstance(); + com.google.cloud.discoveryengine.v1alpha.FirestoreSource, + com.google.cloud.discoveryengine.v1alpha.FirestoreSource.Builder, + com.google.cloud.discoveryengine.v1alpha.FirestoreSourceOrBuilder> + getFirestoreSourceFieldBuilder() { + if (firestoreSourceBuilder_ == null) { + if (!(sourceCase_ == 13)) { + source_ = com.google.cloud.discoveryengine.v1alpha.FirestoreSource.getDefaultInstance(); } - gcsSourceBuilder_ = + firestoreSourceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.discoveryengine.v1alpha.GcsSource, - com.google.cloud.discoveryengine.v1alpha.GcsSource.Builder, - com.google.cloud.discoveryengine.v1alpha.GcsSourceOrBuilder>( - (com.google.cloud.discoveryengine.v1alpha.GcsSource) source_, + com.google.cloud.discoveryengine.v1alpha.FirestoreSource, + com.google.cloud.discoveryengine.v1alpha.FirestoreSource.Builder, + com.google.cloud.discoveryengine.v1alpha.FirestoreSourceOrBuilder>( + (com.google.cloud.discoveryengine.v1alpha.FirestoreSource) source_, getParentForChildren(), isClean()); source_ = null; } - sourceCase_ = 3; + sourceCase_ = 13; onChanged(); - return gcsSourceBuilder_; + return firestoreSourceBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.discoveryengine.v1alpha.BigQuerySource, - com.google.cloud.discoveryengine.v1alpha.BigQuerySource.Builder, - com.google.cloud.discoveryengine.v1alpha.BigQuerySourceOrBuilder> - bigquerySourceBuilder_; + com.google.cloud.discoveryengine.v1alpha.BigtableSource, + com.google.cloud.discoveryengine.v1alpha.BigtableSource.Builder, + com.google.cloud.discoveryengine.v1alpha.BigtableSourceOrBuilder> + bigtableSourceBuilder_; /** * * *
-     * BigQuery input source.
+     * Cloud Bigtable input source.
      * 
* - * .google.cloud.discoveryengine.v1alpha.BigQuerySource bigquery_source = 4; + * .google.cloud.discoveryengine.v1alpha.BigtableSource bigtable_source = 15; * - * @return Whether the bigquerySource field is set. + * @return Whether the bigtableSource field is set. */ @java.lang.Override - public boolean hasBigquerySource() { - return sourceCase_ == 4; + public boolean hasBigtableSource() { + return sourceCase_ == 15; } /** * * *
-     * BigQuery input source.
+     * Cloud Bigtable input source.
      * 
* - * .google.cloud.discoveryengine.v1alpha.BigQuerySource bigquery_source = 4; + * .google.cloud.discoveryengine.v1alpha.BigtableSource bigtable_source = 15; * - * @return The bigquerySource. + * @return The bigtableSource. */ @java.lang.Override - public com.google.cloud.discoveryengine.v1alpha.BigQuerySource getBigquerySource() { - if (bigquerySourceBuilder_ == null) { - if (sourceCase_ == 4) { - return (com.google.cloud.discoveryengine.v1alpha.BigQuerySource) source_; + public com.google.cloud.discoveryengine.v1alpha.BigtableSource getBigtableSource() { + if (bigtableSourceBuilder_ == null) { + if (sourceCase_ == 15) { + return (com.google.cloud.discoveryengine.v1alpha.BigtableSource) source_; } - return com.google.cloud.discoveryengine.v1alpha.BigQuerySource.getDefaultInstance(); + return com.google.cloud.discoveryengine.v1alpha.BigtableSource.getDefaultInstance(); } else { - if (sourceCase_ == 4) { - return bigquerySourceBuilder_.getMessage(); + if (sourceCase_ == 15) { + return bigtableSourceBuilder_.getMessage(); } - return com.google.cloud.discoveryengine.v1alpha.BigQuerySource.getDefaultInstance(); + return com.google.cloud.discoveryengine.v1alpha.BigtableSource.getDefaultInstance(); } } /** * * *
-     * BigQuery input source.
+     * Cloud Bigtable input source.
      * 
* - * .google.cloud.discoveryengine.v1alpha.BigQuerySource bigquery_source = 4; + * .google.cloud.discoveryengine.v1alpha.BigtableSource bigtable_source = 15; */ - public Builder setBigquerySource( - com.google.cloud.discoveryengine.v1alpha.BigQuerySource value) { - if (bigquerySourceBuilder_ == null) { + public Builder setBigtableSource( + com.google.cloud.discoveryengine.v1alpha.BigtableSource value) { + if (bigtableSourceBuilder_ == null) { if (value == null) { throw new NullPointerException(); } source_ = value; onChanged(); } else { - bigquerySourceBuilder_.setMessage(value); + bigtableSourceBuilder_.setMessage(value); } - sourceCase_ = 4; + sourceCase_ = 15; return this; } /** * * *
-     * BigQuery input source.
+     * Cloud Bigtable input source.
      * 
* - * .google.cloud.discoveryengine.v1alpha.BigQuerySource bigquery_source = 4; + * .google.cloud.discoveryengine.v1alpha.BigtableSource bigtable_source = 15; */ - public Builder setBigquerySource( - com.google.cloud.discoveryengine.v1alpha.BigQuerySource.Builder builderForValue) { - if (bigquerySourceBuilder_ == null) { + public Builder setBigtableSource( + com.google.cloud.discoveryengine.v1alpha.BigtableSource.Builder builderForValue) { + if (bigtableSourceBuilder_ == null) { source_ = builderForValue.build(); onChanged(); } else { - bigquerySourceBuilder_.setMessage(builderForValue.build()); + bigtableSourceBuilder_.setMessage(builderForValue.build()); } - sourceCase_ = 4; + sourceCase_ = 15; return this; } /** * * *
-     * BigQuery input source.
+     * Cloud Bigtable input source.
      * 
* - * .google.cloud.discoveryengine.v1alpha.BigQuerySource bigquery_source = 4; + * .google.cloud.discoveryengine.v1alpha.BigtableSource bigtable_source = 15; */ - public Builder mergeBigquerySource( - com.google.cloud.discoveryengine.v1alpha.BigQuerySource value) { - if (bigquerySourceBuilder_ == null) { - if (sourceCase_ == 4 + public Builder mergeBigtableSource( + com.google.cloud.discoveryengine.v1alpha.BigtableSource value) { + if (bigtableSourceBuilder_ == null) { + if (sourceCase_ == 15 && source_ - != com.google.cloud.discoveryengine.v1alpha.BigQuerySource.getDefaultInstance()) { + != com.google.cloud.discoveryengine.v1alpha.BigtableSource.getDefaultInstance()) { source_ = - com.google.cloud.discoveryengine.v1alpha.BigQuerySource.newBuilder( - (com.google.cloud.discoveryengine.v1alpha.BigQuerySource) source_) + com.google.cloud.discoveryengine.v1alpha.BigtableSource.newBuilder( + (com.google.cloud.discoveryengine.v1alpha.BigtableSource) source_) .mergeFrom(value) .buildPartial(); } else { @@ -3053,37 +4653,37 @@ public Builder mergeBigquerySource( } onChanged(); } else { - if (sourceCase_ == 4) { - bigquerySourceBuilder_.mergeFrom(value); + if (sourceCase_ == 15) { + bigtableSourceBuilder_.mergeFrom(value); } else { - bigquerySourceBuilder_.setMessage(value); + bigtableSourceBuilder_.setMessage(value); } } - sourceCase_ = 4; + sourceCase_ = 15; return this; } /** * * *
-     * BigQuery input source.
+     * Cloud Bigtable input source.
      * 
* - * .google.cloud.discoveryengine.v1alpha.BigQuerySource bigquery_source = 4; + * .google.cloud.discoveryengine.v1alpha.BigtableSource bigtable_source = 15; */ - public Builder clearBigquerySource() { - if (bigquerySourceBuilder_ == null) { - if (sourceCase_ == 4) { + public Builder clearBigtableSource() { + if (bigtableSourceBuilder_ == null) { + if (sourceCase_ == 15) { sourceCase_ = 0; source_ = null; onChanged(); } } else { - if (sourceCase_ == 4) { + if (sourceCase_ == 15) { sourceCase_ = 0; source_ = null; } - bigquerySourceBuilder_.clear(); + bigtableSourceBuilder_.clear(); } return this; } @@ -3091,67 +4691,67 @@ public Builder clearBigquerySource() { * * *
-     * BigQuery input source.
+     * Cloud Bigtable input source.
      * 
* - * .google.cloud.discoveryengine.v1alpha.BigQuerySource bigquery_source = 4; + * .google.cloud.discoveryengine.v1alpha.BigtableSource bigtable_source = 15; */ - public com.google.cloud.discoveryengine.v1alpha.BigQuerySource.Builder - getBigquerySourceBuilder() { - return getBigquerySourceFieldBuilder().getBuilder(); + public com.google.cloud.discoveryengine.v1alpha.BigtableSource.Builder + getBigtableSourceBuilder() { + return getBigtableSourceFieldBuilder().getBuilder(); } /** * * *
-     * BigQuery input source.
+     * Cloud Bigtable input source.
      * 
* - * .google.cloud.discoveryengine.v1alpha.BigQuerySource bigquery_source = 4; + * .google.cloud.discoveryengine.v1alpha.BigtableSource bigtable_source = 15; */ @java.lang.Override - public com.google.cloud.discoveryengine.v1alpha.BigQuerySourceOrBuilder - getBigquerySourceOrBuilder() { - if ((sourceCase_ == 4) && (bigquerySourceBuilder_ != null)) { - return bigquerySourceBuilder_.getMessageOrBuilder(); + public com.google.cloud.discoveryengine.v1alpha.BigtableSourceOrBuilder + getBigtableSourceOrBuilder() { + if ((sourceCase_ == 15) && (bigtableSourceBuilder_ != null)) { + return bigtableSourceBuilder_.getMessageOrBuilder(); } else { - if (sourceCase_ == 4) { - return (com.google.cloud.discoveryengine.v1alpha.BigQuerySource) source_; + if (sourceCase_ == 15) { + return (com.google.cloud.discoveryengine.v1alpha.BigtableSource) source_; } - return com.google.cloud.discoveryengine.v1alpha.BigQuerySource.getDefaultInstance(); + return com.google.cloud.discoveryengine.v1alpha.BigtableSource.getDefaultInstance(); } } /** * * *
-     * BigQuery input source.
+     * Cloud Bigtable input source.
      * 
* - * .google.cloud.discoveryengine.v1alpha.BigQuerySource bigquery_source = 4; + * .google.cloud.discoveryengine.v1alpha.BigtableSource bigtable_source = 15; */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.discoveryengine.v1alpha.BigQuerySource, - com.google.cloud.discoveryengine.v1alpha.BigQuerySource.Builder, - com.google.cloud.discoveryengine.v1alpha.BigQuerySourceOrBuilder> - getBigquerySourceFieldBuilder() { - if (bigquerySourceBuilder_ == null) { - if (!(sourceCase_ == 4)) { - source_ = com.google.cloud.discoveryengine.v1alpha.BigQuerySource.getDefaultInstance(); + com.google.cloud.discoveryengine.v1alpha.BigtableSource, + com.google.cloud.discoveryengine.v1alpha.BigtableSource.Builder, + com.google.cloud.discoveryengine.v1alpha.BigtableSourceOrBuilder> + getBigtableSourceFieldBuilder() { + if (bigtableSourceBuilder_ == null) { + if (!(sourceCase_ == 15)) { + source_ = com.google.cloud.discoveryengine.v1alpha.BigtableSource.getDefaultInstance(); } - bigquerySourceBuilder_ = + bigtableSourceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.discoveryengine.v1alpha.BigQuerySource, - com.google.cloud.discoveryengine.v1alpha.BigQuerySource.Builder, - com.google.cloud.discoveryengine.v1alpha.BigQuerySourceOrBuilder>( - (com.google.cloud.discoveryengine.v1alpha.BigQuerySource) source_, + com.google.cloud.discoveryengine.v1alpha.BigtableSource, + com.google.cloud.discoveryengine.v1alpha.BigtableSource.Builder, + com.google.cloud.discoveryengine.v1alpha.BigtableSourceOrBuilder>( + (com.google.cloud.discoveryengine.v1alpha.BigtableSource) source_, getParentForChildren(), isClean()); source_ = null; } - sourceCase_ = 4; + sourceCase_ = 15; onChanged(); - return bigquerySourceBuilder_; + return bigtableSourceBuilder_; } private java.lang.Object parent_ = ""; @@ -3228,7 +4828,7 @@ public Builder setParent(java.lang.String value) { throw new NullPointerException(); } parent_ = value; - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000100; onChanged(); return this; } @@ -3249,7 +4849,7 @@ public Builder setParent(java.lang.String value) { */ public Builder clearParent() { parent_ = getDefaultInstance().getParent(); - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000100); onChanged(); return this; } @@ -3275,7 +4875,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); parent_ = value; - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000100; onChanged(); return this; } @@ -3298,7 +4898,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * @return Whether the errorConfig field is set. */ public boolean hasErrorConfig() { - return ((bitField0_ & 0x00000010) != 0); + return ((bitField0_ & 0x00000200) != 0); } /** * @@ -3339,7 +4939,7 @@ public Builder setErrorConfig( } else { errorConfigBuilder_.setMessage(value); } - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000200; onChanged(); return this; } @@ -3359,7 +4959,7 @@ public Builder setErrorConfig( } else { errorConfigBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000200; onChanged(); return this; } @@ -3375,7 +4975,7 @@ public Builder setErrorConfig( public Builder mergeErrorConfig( com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig value) { if (errorConfigBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0) + if (((bitField0_ & 0x00000200) != 0) && errorConfig_ != null && errorConfig_ != com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig @@ -3388,7 +4988,7 @@ public Builder mergeErrorConfig( errorConfigBuilder_.mergeFrom(value); } if (errorConfig_ != null) { - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000200; onChanged(); } return this; @@ -3403,7 +5003,7 @@ public Builder mergeErrorConfig( * .google.cloud.discoveryengine.v1alpha.ImportErrorConfig error_config = 5; */ public Builder clearErrorConfig() { - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000200); errorConfig_ = null; if (errorConfigBuilder_ != null) { errorConfigBuilder_.dispose(); @@ -3423,7 +5023,7 @@ public Builder clearErrorConfig() { */ public com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig.Builder getErrorConfigBuilder() { - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000200; onChanged(); return getErrorConfigFieldBuilder().getBuilder(); } @@ -3510,7 +5110,7 @@ public int getReconciliationModeValue() { */ public Builder setReconciliationModeValue(int value) { reconciliationMode_ = value; - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000400; onChanged(); return this; } @@ -3561,7 +5161,7 @@ public Builder setReconciliationMode( if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000400; reconciliationMode_ = value.getNumber(); onChanged(); return this; @@ -3582,12 +5182,206 @@ public Builder setReconciliationMode( * @return This builder for chaining. */ public Builder clearReconciliationMode() { - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000400); reconciliationMode_ = 0; onChanged(); return this; } + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * Indicates which fields in the provided imported documents to update. If
+     * not set, the default is to update all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 7; + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000800) != 0); + } + /** + * + * + *
+     * Indicates which fields in the provided imported documents to update. If
+     * not set, the default is to update all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 7; + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Indicates which fields in the provided imported documents to update. If
+     * not set, the default is to update all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 7; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+     * Indicates which fields in the provided imported documents to update. If
+     * not set, the default is to update all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 7; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+     * Indicates which fields in the provided imported documents to update. If
+     * not set, the default is to update all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 7; + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000800) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + if (updateMask_ != null) { + bitField0_ |= 0x00000800; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Indicates which fields in the provided imported documents to update. If
+     * not set, the default is to update all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 7; + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000800); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Indicates which fields in the provided imported documents to update. If
+     * not set, the default is to update all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 7; + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000800; + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Indicates which fields in the provided imported documents to update. If
+     * not set, the default is to update all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 7; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Indicates which fields in the provided imported documents to update. If
+     * not set, the default is to update all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + private boolean autoGenerateIds_; /** * @@ -3606,14 +5400,18 @@ public Builder clearReconciliationMode() { * [id_field][google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.id_field], * otherwise, documents without IDs fail to be imported. * - * Only set this field when using - * [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource] or - * [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource], and - * when + * Supported data sources: + * + * * [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource]. * [GcsSource.data_schema][google.cloud.discoveryengine.v1alpha.GcsSource.data_schema] - * or + * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. + * * [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource]. * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1alpha.BigQuerySource.data_schema] - * is `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. + * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. + * * [SpannerSource][google.cloud.discoveryengine.v1alpha.SpannerSource]. + * * [CloudSqlSource][google.cloud.discoveryengine.v1alpha.CloudSqlSource]. + * * [FirestoreSource][google.cloud.discoveryengine.v1alpha.FirestoreSource]. + * * [BigtableSource][google.cloud.discoveryengine.v1alpha.BigtableSource]. * * * bool auto_generate_ids = 8; @@ -3641,14 +5439,18 @@ public boolean getAutoGenerateIds() { * [id_field][google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.id_field], * otherwise, documents without IDs fail to be imported. * - * Only set this field when using - * [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource] or - * [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource], and - * when + * Supported data sources: + * + * * [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource]. * [GcsSource.data_schema][google.cloud.discoveryengine.v1alpha.GcsSource.data_schema] - * or + * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. + * * [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource]. * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1alpha.BigQuerySource.data_schema] - * is `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. + * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. + * * [SpannerSource][google.cloud.discoveryengine.v1alpha.SpannerSource]. + * * [CloudSqlSource][google.cloud.discoveryengine.v1alpha.CloudSqlSource]. + * * [FirestoreSource][google.cloud.discoveryengine.v1alpha.FirestoreSource]. + * * [BigtableSource][google.cloud.discoveryengine.v1alpha.BigtableSource]. * * * bool auto_generate_ids = 8; @@ -3659,7 +5461,7 @@ public boolean getAutoGenerateIds() { public Builder setAutoGenerateIds(boolean value) { autoGenerateIds_ = value; - bitField0_ |= 0x00000040; + bitField0_ |= 0x00001000; onChanged(); return this; } @@ -3680,14 +5482,18 @@ public Builder setAutoGenerateIds(boolean value) { * [id_field][google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.id_field], * otherwise, documents without IDs fail to be imported. * - * Only set this field when using - * [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource] or - * [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource], and - * when + * Supported data sources: + * + * * [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource]. * [GcsSource.data_schema][google.cloud.discoveryengine.v1alpha.GcsSource.data_schema] - * or + * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. + * * [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource]. * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1alpha.BigQuerySource.data_schema] - * is `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. + * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. + * * [SpannerSource][google.cloud.discoveryengine.v1alpha.SpannerSource]. + * * [CloudSqlSource][google.cloud.discoveryengine.v1alpha.CloudSqlSource]. + * * [FirestoreSource][google.cloud.discoveryengine.v1alpha.FirestoreSource]. + * * [BigtableSource][google.cloud.discoveryengine.v1alpha.BigtableSource]. * * * bool auto_generate_ids = 8; @@ -3695,7 +5501,7 @@ public Builder setAutoGenerateIds(boolean value) { * @return This builder for chaining. */ public Builder clearAutoGenerateIds() { - bitField0_ = (bitField0_ & ~0x00000040); + bitField0_ = (bitField0_ & ~0x00001000); autoGenerateIds_ = false; onChanged(); return this; @@ -3706,35 +5512,40 @@ public Builder clearAutoGenerateIds() { * * *
-     * The field in the Cloud Storage and BigQuery sources that indicates the
-     * unique IDs of the documents.
+     * The field indicates the ID field or column to be used as unique IDs of
+     * the documents.
      *
      * For [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource] it is the
      * key of the JSON field. For instance, `my_id` for JSON `{"my_id":
-     * "some_uuid"}`. For
-     * [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource] it is
-     * the column name of the BigQuery table where the unique ids are stored.
+     * "some_uuid"}`. For others, it may be the column name of the table where the
+     * unique ids are stored.
      *
-     * The values of the JSON field or the BigQuery column are used as the
+     * The values of the JSON field or the table column are used as the
      * [Document.id][google.cloud.discoveryengine.v1alpha.Document.id]s. The JSON
-     * field or the BigQuery column must be of string type, and the values must be
+     * field or the table column must be of string type, and the values must be
      * set as valid strings conform to
      * [RFC-1034](https://tools.ietf.org/html/rfc1034) with 1-63 characters.
      * Otherwise, documents without valid IDs fail to be imported.
      *
-     * Only set this field when using
-     * [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource] or
-     * [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource], and
-     * when
-     * [GcsSource.data_schema][google.cloud.discoveryengine.v1alpha.GcsSource.data_schema]
-     * or
-     * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1alpha.BigQuerySource.data_schema]
-     * is `custom`. And only set this field when
+     * Only set this field when
      * [auto_generate_ids][google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.auto_generate_ids]
      * is unset or set as `false`. Otherwise, an INVALID_ARGUMENT error is thrown.
      *
      * If it is unset, a default value `_id` is used when importing from the
      * allowed data sources.
+     *
+     * Supported data sources:
+     *
+     * * [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource].
+     * [GcsSource.data_schema][google.cloud.discoveryengine.v1alpha.GcsSource.data_schema]
+     * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
+     * * [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource].
+     * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1alpha.BigQuerySource.data_schema]
+     * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
+     * * [SpannerSource][google.cloud.discoveryengine.v1alpha.SpannerSource].
+     * * [CloudSqlSource][google.cloud.discoveryengine.v1alpha.CloudSqlSource].
+     * * [FirestoreSource][google.cloud.discoveryengine.v1alpha.FirestoreSource].
+     * * [BigtableSource][google.cloud.discoveryengine.v1alpha.BigtableSource].
      * 
* * string id_field = 9; @@ -3756,35 +5567,40 @@ public java.lang.String getIdField() { * * *
-     * The field in the Cloud Storage and BigQuery sources that indicates the
-     * unique IDs of the documents.
+     * The field indicates the ID field or column to be used as unique IDs of
+     * the documents.
      *
      * For [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource] it is the
      * key of the JSON field. For instance, `my_id` for JSON `{"my_id":
-     * "some_uuid"}`. For
-     * [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource] it is
-     * the column name of the BigQuery table where the unique ids are stored.
+     * "some_uuid"}`. For others, it may be the column name of the table where the
+     * unique ids are stored.
      *
-     * The values of the JSON field or the BigQuery column are used as the
+     * The values of the JSON field or the table column are used as the
      * [Document.id][google.cloud.discoveryengine.v1alpha.Document.id]s. The JSON
-     * field or the BigQuery column must be of string type, and the values must be
+     * field or the table column must be of string type, and the values must be
      * set as valid strings conform to
      * [RFC-1034](https://tools.ietf.org/html/rfc1034) with 1-63 characters.
      * Otherwise, documents without valid IDs fail to be imported.
      *
-     * Only set this field when using
-     * [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource] or
-     * [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource], and
-     * when
-     * [GcsSource.data_schema][google.cloud.discoveryengine.v1alpha.GcsSource.data_schema]
-     * or
-     * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1alpha.BigQuerySource.data_schema]
-     * is `custom`. And only set this field when
+     * Only set this field when
      * [auto_generate_ids][google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.auto_generate_ids]
      * is unset or set as `false`. Otherwise, an INVALID_ARGUMENT error is thrown.
      *
      * If it is unset, a default value `_id` is used when importing from the
      * allowed data sources.
+     *
+     * Supported data sources:
+     *
+     * * [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource].
+     * [GcsSource.data_schema][google.cloud.discoveryengine.v1alpha.GcsSource.data_schema]
+     * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
+     * * [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource].
+     * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1alpha.BigQuerySource.data_schema]
+     * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
+     * * [SpannerSource][google.cloud.discoveryengine.v1alpha.SpannerSource].
+     * * [CloudSqlSource][google.cloud.discoveryengine.v1alpha.CloudSqlSource].
+     * * [FirestoreSource][google.cloud.discoveryengine.v1alpha.FirestoreSource].
+     * * [BigtableSource][google.cloud.discoveryengine.v1alpha.BigtableSource].
      * 
* * string id_field = 9; @@ -3806,35 +5622,40 @@ public com.google.protobuf.ByteString getIdFieldBytes() { * * *
-     * The field in the Cloud Storage and BigQuery sources that indicates the
-     * unique IDs of the documents.
+     * The field indicates the ID field or column to be used as unique IDs of
+     * the documents.
      *
      * For [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource] it is the
      * key of the JSON field. For instance, `my_id` for JSON `{"my_id":
-     * "some_uuid"}`. For
-     * [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource] it is
-     * the column name of the BigQuery table where the unique ids are stored.
+     * "some_uuid"}`. For others, it may be the column name of the table where the
+     * unique ids are stored.
      *
-     * The values of the JSON field or the BigQuery column are used as the
+     * The values of the JSON field or the table column are used as the
      * [Document.id][google.cloud.discoveryengine.v1alpha.Document.id]s. The JSON
-     * field or the BigQuery column must be of string type, and the values must be
+     * field or the table column must be of string type, and the values must be
      * set as valid strings conform to
      * [RFC-1034](https://tools.ietf.org/html/rfc1034) with 1-63 characters.
      * Otherwise, documents without valid IDs fail to be imported.
      *
-     * Only set this field when using
-     * [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource] or
-     * [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource], and
-     * when
-     * [GcsSource.data_schema][google.cloud.discoveryengine.v1alpha.GcsSource.data_schema]
-     * or
-     * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1alpha.BigQuerySource.data_schema]
-     * is `custom`. And only set this field when
+     * Only set this field when
      * [auto_generate_ids][google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.auto_generate_ids]
      * is unset or set as `false`. Otherwise, an INVALID_ARGUMENT error is thrown.
      *
      * If it is unset, a default value `_id` is used when importing from the
      * allowed data sources.
+     *
+     * Supported data sources:
+     *
+     * * [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource].
+     * [GcsSource.data_schema][google.cloud.discoveryengine.v1alpha.GcsSource.data_schema]
+     * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
+     * * [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource].
+     * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1alpha.BigQuerySource.data_schema]
+     * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
+     * * [SpannerSource][google.cloud.discoveryengine.v1alpha.SpannerSource].
+     * * [CloudSqlSource][google.cloud.discoveryengine.v1alpha.CloudSqlSource].
+     * * [FirestoreSource][google.cloud.discoveryengine.v1alpha.FirestoreSource].
+     * * [BigtableSource][google.cloud.discoveryengine.v1alpha.BigtableSource].
      * 
* * string id_field = 9; @@ -3847,7 +5668,7 @@ public Builder setIdField(java.lang.String value) { throw new NullPointerException(); } idField_ = value; - bitField0_ |= 0x00000080; + bitField0_ |= 0x00002000; onChanged(); return this; } @@ -3855,35 +5676,40 @@ public Builder setIdField(java.lang.String value) { * * *
-     * The field in the Cloud Storage and BigQuery sources that indicates the
-     * unique IDs of the documents.
+     * The field indicates the ID field or column to be used as unique IDs of
+     * the documents.
      *
      * For [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource] it is the
      * key of the JSON field. For instance, `my_id` for JSON `{"my_id":
-     * "some_uuid"}`. For
-     * [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource] it is
-     * the column name of the BigQuery table where the unique ids are stored.
+     * "some_uuid"}`. For others, it may be the column name of the table where the
+     * unique ids are stored.
      *
-     * The values of the JSON field or the BigQuery column are used as the
+     * The values of the JSON field or the table column are used as the
      * [Document.id][google.cloud.discoveryengine.v1alpha.Document.id]s. The JSON
-     * field or the BigQuery column must be of string type, and the values must be
+     * field or the table column must be of string type, and the values must be
      * set as valid strings conform to
      * [RFC-1034](https://tools.ietf.org/html/rfc1034) with 1-63 characters.
      * Otherwise, documents without valid IDs fail to be imported.
      *
-     * Only set this field when using
-     * [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource] or
-     * [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource], and
-     * when
-     * [GcsSource.data_schema][google.cloud.discoveryengine.v1alpha.GcsSource.data_schema]
-     * or
-     * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1alpha.BigQuerySource.data_schema]
-     * is `custom`. And only set this field when
+     * Only set this field when
      * [auto_generate_ids][google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.auto_generate_ids]
      * is unset or set as `false`. Otherwise, an INVALID_ARGUMENT error is thrown.
      *
      * If it is unset, a default value `_id` is used when importing from the
      * allowed data sources.
+     *
+     * Supported data sources:
+     *
+     * * [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource].
+     * [GcsSource.data_schema][google.cloud.discoveryengine.v1alpha.GcsSource.data_schema]
+     * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
+     * * [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource].
+     * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1alpha.BigQuerySource.data_schema]
+     * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
+     * * [SpannerSource][google.cloud.discoveryengine.v1alpha.SpannerSource].
+     * * [CloudSqlSource][google.cloud.discoveryengine.v1alpha.CloudSqlSource].
+     * * [FirestoreSource][google.cloud.discoveryengine.v1alpha.FirestoreSource].
+     * * [BigtableSource][google.cloud.discoveryengine.v1alpha.BigtableSource].
      * 
* * string id_field = 9; @@ -3892,7 +5718,7 @@ public Builder setIdField(java.lang.String value) { */ public Builder clearIdField() { idField_ = getDefaultInstance().getIdField(); - bitField0_ = (bitField0_ & ~0x00000080); + bitField0_ = (bitField0_ & ~0x00002000); onChanged(); return this; } @@ -3900,35 +5726,40 @@ public Builder clearIdField() { * * *
-     * The field in the Cloud Storage and BigQuery sources that indicates the
-     * unique IDs of the documents.
+     * The field indicates the ID field or column to be used as unique IDs of
+     * the documents.
      *
      * For [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource] it is the
      * key of the JSON field. For instance, `my_id` for JSON `{"my_id":
-     * "some_uuid"}`. For
-     * [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource] it is
-     * the column name of the BigQuery table where the unique ids are stored.
+     * "some_uuid"}`. For others, it may be the column name of the table where the
+     * unique ids are stored.
      *
-     * The values of the JSON field or the BigQuery column are used as the
+     * The values of the JSON field or the table column are used as the
      * [Document.id][google.cloud.discoveryengine.v1alpha.Document.id]s. The JSON
-     * field or the BigQuery column must be of string type, and the values must be
+     * field or the table column must be of string type, and the values must be
      * set as valid strings conform to
      * [RFC-1034](https://tools.ietf.org/html/rfc1034) with 1-63 characters.
      * Otherwise, documents without valid IDs fail to be imported.
      *
-     * Only set this field when using
-     * [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource] or
-     * [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource], and
-     * when
-     * [GcsSource.data_schema][google.cloud.discoveryengine.v1alpha.GcsSource.data_schema]
-     * or
-     * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1alpha.BigQuerySource.data_schema]
-     * is `custom`. And only set this field when
+     * Only set this field when
      * [auto_generate_ids][google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.auto_generate_ids]
      * is unset or set as `false`. Otherwise, an INVALID_ARGUMENT error is thrown.
      *
      * If it is unset, a default value `_id` is used when importing from the
      * allowed data sources.
+     *
+     * Supported data sources:
+     *
+     * * [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource].
+     * [GcsSource.data_schema][google.cloud.discoveryengine.v1alpha.GcsSource.data_schema]
+     * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
+     * * [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource].
+     * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1alpha.BigQuerySource.data_schema]
+     * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
+     * * [SpannerSource][google.cloud.discoveryengine.v1alpha.SpannerSource].
+     * * [CloudSqlSource][google.cloud.discoveryengine.v1alpha.CloudSqlSource].
+     * * [FirestoreSource][google.cloud.discoveryengine.v1alpha.FirestoreSource].
+     * * [BigtableSource][google.cloud.discoveryengine.v1alpha.BigtableSource].
      * 
* * string id_field = 9; @@ -3942,7 +5773,7 @@ public Builder setIdFieldBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); idField_ = value; - bitField0_ |= 0x00000080; + bitField0_ |= 0x00002000; onChanged(); return this; } diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ImportDocumentsRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ImportDocumentsRequestOrBuilder.java index e19b3843edda..04f9197e5f03 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ImportDocumentsRequestOrBuilder.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ImportDocumentsRequestOrBuilder.java @@ -136,6 +136,181 @@ public interface ImportDocumentsRequestOrBuilder */ com.google.cloud.discoveryengine.v1alpha.BigQuerySourceOrBuilder getBigquerySourceOrBuilder(); + /** + * + * + *
+   * FhirStore input source.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.FhirStoreSource fhir_store_source = 10; + * + * @return Whether the fhirStoreSource field is set. + */ + boolean hasFhirStoreSource(); + /** + * + * + *
+   * FhirStore input source.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.FhirStoreSource fhir_store_source = 10; + * + * @return The fhirStoreSource. + */ + com.google.cloud.discoveryengine.v1alpha.FhirStoreSource getFhirStoreSource(); + /** + * + * + *
+   * FhirStore input source.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.FhirStoreSource fhir_store_source = 10; + */ + com.google.cloud.discoveryengine.v1alpha.FhirStoreSourceOrBuilder getFhirStoreSourceOrBuilder(); + + /** + * + * + *
+   * Spanner input source.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.SpannerSource spanner_source = 11; + * + * @return Whether the spannerSource field is set. + */ + boolean hasSpannerSource(); + /** + * + * + *
+   * Spanner input source.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.SpannerSource spanner_source = 11; + * + * @return The spannerSource. + */ + com.google.cloud.discoveryengine.v1alpha.SpannerSource getSpannerSource(); + /** + * + * + *
+   * Spanner input source.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.SpannerSource spanner_source = 11; + */ + com.google.cloud.discoveryengine.v1alpha.SpannerSourceOrBuilder getSpannerSourceOrBuilder(); + + /** + * + * + *
+   * Cloud SQL input source.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.CloudSqlSource cloud_sql_source = 12; + * + * @return Whether the cloudSqlSource field is set. + */ + boolean hasCloudSqlSource(); + /** + * + * + *
+   * Cloud SQL input source.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.CloudSqlSource cloud_sql_source = 12; + * + * @return The cloudSqlSource. + */ + com.google.cloud.discoveryengine.v1alpha.CloudSqlSource getCloudSqlSource(); + /** + * + * + *
+   * Cloud SQL input source.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.CloudSqlSource cloud_sql_source = 12; + */ + com.google.cloud.discoveryengine.v1alpha.CloudSqlSourceOrBuilder getCloudSqlSourceOrBuilder(); + + /** + * + * + *
+   * Firestore input source.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.FirestoreSource firestore_source = 13; + * + * @return Whether the firestoreSource field is set. + */ + boolean hasFirestoreSource(); + /** + * + * + *
+   * Firestore input source.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.FirestoreSource firestore_source = 13; + * + * @return The firestoreSource. + */ + com.google.cloud.discoveryengine.v1alpha.FirestoreSource getFirestoreSource(); + /** + * + * + *
+   * Firestore input source.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.FirestoreSource firestore_source = 13; + */ + com.google.cloud.discoveryengine.v1alpha.FirestoreSourceOrBuilder getFirestoreSourceOrBuilder(); + + /** + * + * + *
+   * Cloud Bigtable input source.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigtableSource bigtable_source = 15; + * + * @return Whether the bigtableSource field is set. + */ + boolean hasBigtableSource(); + /** + * + * + *
+   * Cloud Bigtable input source.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigtableSource bigtable_source = 15; + * + * @return The bigtableSource. + */ + com.google.cloud.discoveryengine.v1alpha.BigtableSource getBigtableSource(); + /** + * + * + *
+   * Cloud Bigtable input source.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigtableSource bigtable_source = 15; + */ + com.google.cloud.discoveryengine.v1alpha.BigtableSourceOrBuilder getBigtableSourceOrBuilder(); + /** * * @@ -238,6 +413,44 @@ public interface ImportDocumentsRequestOrBuilder com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.ReconciliationMode getReconciliationMode(); + /** + * + * + *
+   * Indicates which fields in the provided imported documents to update. If
+   * not set, the default is to update all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 7; + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Indicates which fields in the provided imported documents to update. If
+   * not set, the default is to update all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 7; + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Indicates which fields in the provided imported documents to update. If
+   * not set, the default is to update all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 7; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + /** * * @@ -255,14 +468,18 @@ public interface ImportDocumentsRequestOrBuilder * [id_field][google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.id_field], * otherwise, documents without IDs fail to be imported. * - * Only set this field when using - * [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource] or - * [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource], and - * when + * Supported data sources: + * + * * [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource]. * [GcsSource.data_schema][google.cloud.discoveryengine.v1alpha.GcsSource.data_schema] - * or + * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. + * * [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource]. * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1alpha.BigQuerySource.data_schema] - * is `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. + * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. + * * [SpannerSource][google.cloud.discoveryengine.v1alpha.SpannerSource]. + * * [CloudSqlSource][google.cloud.discoveryengine.v1alpha.CloudSqlSource]. + * * [FirestoreSource][google.cloud.discoveryengine.v1alpha.FirestoreSource]. + * * [BigtableSource][google.cloud.discoveryengine.v1alpha.BigtableSource]. * * * bool auto_generate_ids = 8; @@ -275,35 +492,40 @@ public interface ImportDocumentsRequestOrBuilder * * *
-   * The field in the Cloud Storage and BigQuery sources that indicates the
-   * unique IDs of the documents.
+   * The field indicates the ID field or column to be used as unique IDs of
+   * the documents.
    *
    * For [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource] it is the
    * key of the JSON field. For instance, `my_id` for JSON `{"my_id":
-   * "some_uuid"}`. For
-   * [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource] it is
-   * the column name of the BigQuery table where the unique ids are stored.
+   * "some_uuid"}`. For others, it may be the column name of the table where the
+   * unique ids are stored.
    *
-   * The values of the JSON field or the BigQuery column are used as the
+   * The values of the JSON field or the table column are used as the
    * [Document.id][google.cloud.discoveryengine.v1alpha.Document.id]s. The JSON
-   * field or the BigQuery column must be of string type, and the values must be
+   * field or the table column must be of string type, and the values must be
    * set as valid strings conform to
    * [RFC-1034](https://tools.ietf.org/html/rfc1034) with 1-63 characters.
    * Otherwise, documents without valid IDs fail to be imported.
    *
-   * Only set this field when using
-   * [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource] or
-   * [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource], and
-   * when
-   * [GcsSource.data_schema][google.cloud.discoveryengine.v1alpha.GcsSource.data_schema]
-   * or
-   * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1alpha.BigQuerySource.data_schema]
-   * is `custom`. And only set this field when
+   * Only set this field when
    * [auto_generate_ids][google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.auto_generate_ids]
    * is unset or set as `false`. Otherwise, an INVALID_ARGUMENT error is thrown.
    *
    * If it is unset, a default value `_id` is used when importing from the
    * allowed data sources.
+   *
+   * Supported data sources:
+   *
+   * * [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource].
+   * [GcsSource.data_schema][google.cloud.discoveryengine.v1alpha.GcsSource.data_schema]
+   * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
+   * * [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource].
+   * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1alpha.BigQuerySource.data_schema]
+   * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
+   * * [SpannerSource][google.cloud.discoveryengine.v1alpha.SpannerSource].
+   * * [CloudSqlSource][google.cloud.discoveryengine.v1alpha.CloudSqlSource].
+   * * [FirestoreSource][google.cloud.discoveryengine.v1alpha.FirestoreSource].
+   * * [BigtableSource][google.cloud.discoveryengine.v1alpha.BigtableSource].
    * 
* * string id_field = 9; @@ -315,35 +537,40 @@ public interface ImportDocumentsRequestOrBuilder * * *
-   * The field in the Cloud Storage and BigQuery sources that indicates the
-   * unique IDs of the documents.
+   * The field indicates the ID field or column to be used as unique IDs of
+   * the documents.
    *
    * For [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource] it is the
    * key of the JSON field. For instance, `my_id` for JSON `{"my_id":
-   * "some_uuid"}`. For
-   * [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource] it is
-   * the column name of the BigQuery table where the unique ids are stored.
+   * "some_uuid"}`. For others, it may be the column name of the table where the
+   * unique ids are stored.
    *
-   * The values of the JSON field or the BigQuery column are used as the
+   * The values of the JSON field or the table column are used as the
    * [Document.id][google.cloud.discoveryengine.v1alpha.Document.id]s. The JSON
-   * field or the BigQuery column must be of string type, and the values must be
+   * field or the table column must be of string type, and the values must be
    * set as valid strings conform to
    * [RFC-1034](https://tools.ietf.org/html/rfc1034) with 1-63 characters.
    * Otherwise, documents without valid IDs fail to be imported.
    *
-   * Only set this field when using
-   * [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource] or
-   * [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource], and
-   * when
-   * [GcsSource.data_schema][google.cloud.discoveryengine.v1alpha.GcsSource.data_schema]
-   * or
-   * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1alpha.BigQuerySource.data_schema]
-   * is `custom`. And only set this field when
+   * Only set this field when
    * [auto_generate_ids][google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.auto_generate_ids]
    * is unset or set as `false`. Otherwise, an INVALID_ARGUMENT error is thrown.
    *
    * If it is unset, a default value `_id` is used when importing from the
    * allowed data sources.
+   *
+   * Supported data sources:
+   *
+   * * [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource].
+   * [GcsSource.data_schema][google.cloud.discoveryengine.v1alpha.GcsSource.data_schema]
+   * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
+   * * [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource].
+   * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1alpha.BigQuerySource.data_schema]
+   * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
+   * * [SpannerSource][google.cloud.discoveryengine.v1alpha.SpannerSource].
+   * * [CloudSqlSource][google.cloud.discoveryengine.v1alpha.CloudSqlSource].
+   * * [FirestoreSource][google.cloud.discoveryengine.v1alpha.FirestoreSource].
+   * * [BigtableSource][google.cloud.discoveryengine.v1alpha.BigtableSource].
    * 
* * string id_field = 9; diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/IndustryVertical.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/IndustryVertical.java index 59a6bcb6ae9e..b4b1a2e55ae5 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/IndustryVertical.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/IndustryVertical.java @@ -61,6 +61,16 @@ public enum IndustryVertical implements com.google.protobuf.ProtocolMessageEnum * MEDIA = 2; */ MEDIA(2), + /** + * + * + *
+   * The healthcare FHIR vertical.
+   * 
+ * + * HEALTHCARE_FHIR = 7; + */ + HEALTHCARE_FHIR(7), UNRECOGNIZED(-1), ; @@ -95,6 +105,16 @@ public enum IndustryVertical implements com.google.protobuf.ProtocolMessageEnum * MEDIA = 2; */ public static final int MEDIA_VALUE = 2; + /** + * + * + *
+   * The healthcare FHIR vertical.
+   * 
+ * + * HEALTHCARE_FHIR = 7; + */ + public static final int HEALTHCARE_FHIR_VALUE = 7; public final int getNumber() { if (this == UNRECOGNIZED) { @@ -126,6 +146,8 @@ public static IndustryVertical forNumber(int value) { return GENERIC; case 2: return MEDIA; + case 7: + return HEALTHCARE_FHIR; default: return null; } diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ProcessedDocument.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ProcessedDocument.java new file mode 100644 index 000000000000..e76e7b2a232c --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ProcessedDocument.java @@ -0,0 +1,964 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/document.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * Document captures all raw metadata information of items to be recommended or
+ * searched.
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.ProcessedDocument} + */ +public final class ProcessedDocument extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.ProcessedDocument) + ProcessedDocumentOrBuilder { + private static final long serialVersionUID = 0L; + // Use ProcessedDocument.newBuilder() to construct. + private ProcessedDocument(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ProcessedDocument() { + document_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ProcessedDocument(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.DocumentProto + .internal_static_google_cloud_discoveryengine_v1alpha_ProcessedDocument_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.DocumentProto + .internal_static_google_cloud_discoveryengine_v1alpha_ProcessedDocument_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.ProcessedDocument.class, + com.google.cloud.discoveryengine.v1alpha.ProcessedDocument.Builder.class); + } + + private int processedDataFormatCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object processedDataFormat_; + + public enum ProcessedDataFormatCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + JSON_DATA(2), + PROCESSEDDATAFORMAT_NOT_SET(0); + private final int value; + + private ProcessedDataFormatCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ProcessedDataFormatCase valueOf(int value) { + return forNumber(value); + } + + public static ProcessedDataFormatCase forNumber(int value) { + switch (value) { + case 2: + return JSON_DATA; + case 0: + return PROCESSEDDATAFORMAT_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ProcessedDataFormatCase getProcessedDataFormatCase() { + return ProcessedDataFormatCase.forNumber(processedDataFormatCase_); + } + + public static final int JSON_DATA_FIELD_NUMBER = 2; + /** + * + * + *
+   * The JSON string representation of the processed document.
+   * 
+ * + * string json_data = 2; + * + * @return Whether the jsonData field is set. + */ + public boolean hasJsonData() { + return processedDataFormatCase_ == 2; + } + /** + * + * + *
+   * The JSON string representation of the processed document.
+   * 
+ * + * string json_data = 2; + * + * @return The jsonData. + */ + public java.lang.String getJsonData() { + java.lang.Object ref = ""; + if (processedDataFormatCase_ == 2) { + ref = processedDataFormat_; + } + 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(); + if (processedDataFormatCase_ == 2) { + processedDataFormat_ = s; + } + return s; + } + } + /** + * + * + *
+   * The JSON string representation of the processed document.
+   * 
+ * + * string json_data = 2; + * + * @return The bytes for jsonData. + */ + public com.google.protobuf.ByteString getJsonDataBytes() { + java.lang.Object ref = ""; + if (processedDataFormatCase_ == 2) { + ref = processedDataFormat_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (processedDataFormatCase_ == 2) { + processedDataFormat_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DOCUMENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object document_ = ""; + /** + * + * + *
+   * Required. Full resource name of the referenced document, in the format
+   * `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`.
+   * 
+ * + * + * string document = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The document. + */ + @java.lang.Override + public java.lang.String getDocument() { + java.lang.Object ref = document_; + 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(); + document_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Full resource name of the referenced document, in the format
+   * `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`.
+   * 
+ * + * + * string document = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for document. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDocumentBytes() { + java.lang.Object ref = document_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + document_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(document_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, document_); + } + if (processedDataFormatCase_ == 2) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, processedDataFormat_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(document_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, document_); + } + if (processedDataFormatCase_ == 2) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, processedDataFormat_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.ProcessedDocument)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.ProcessedDocument other = + (com.google.cloud.discoveryengine.v1alpha.ProcessedDocument) obj; + + if (!getDocument().equals(other.getDocument())) return false; + if (!getProcessedDataFormatCase().equals(other.getProcessedDataFormatCase())) return false; + switch (processedDataFormatCase_) { + case 2: + if (!getJsonData().equals(other.getJsonData())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DOCUMENT_FIELD_NUMBER; + hash = (53 * hash) + getDocument().hashCode(); + switch (processedDataFormatCase_) { + case 2: + hash = (37 * hash) + JSON_DATA_FIELD_NUMBER; + hash = (53 * hash) + getJsonData().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.ProcessedDocument parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.ProcessedDocument parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ProcessedDocument parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.ProcessedDocument parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ProcessedDocument parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.ProcessedDocument parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ProcessedDocument parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.ProcessedDocument parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ProcessedDocument parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.ProcessedDocument parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ProcessedDocument parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.ProcessedDocument parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.ProcessedDocument prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Document captures all raw metadata information of items to be recommended or
+   * searched.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.ProcessedDocument} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.ProcessedDocument) + com.google.cloud.discoveryengine.v1alpha.ProcessedDocumentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.DocumentProto + .internal_static_google_cloud_discoveryengine_v1alpha_ProcessedDocument_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.DocumentProto + .internal_static_google_cloud_discoveryengine_v1alpha_ProcessedDocument_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.ProcessedDocument.class, + com.google.cloud.discoveryengine.v1alpha.ProcessedDocument.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1alpha.ProcessedDocument.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + document_ = ""; + processedDataFormatCase_ = 0; + processedDataFormat_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.DocumentProto + .internal_static_google_cloud_discoveryengine_v1alpha_ProcessedDocument_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ProcessedDocument getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.ProcessedDocument.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ProcessedDocument build() { + com.google.cloud.discoveryengine.v1alpha.ProcessedDocument result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ProcessedDocument buildPartial() { + com.google.cloud.discoveryengine.v1alpha.ProcessedDocument result = + new com.google.cloud.discoveryengine.v1alpha.ProcessedDocument(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.discoveryengine.v1alpha.ProcessedDocument result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.document_ = document_; + } + } + + private void buildPartialOneofs( + com.google.cloud.discoveryengine.v1alpha.ProcessedDocument result) { + result.processedDataFormatCase_ = processedDataFormatCase_; + result.processedDataFormat_ = this.processedDataFormat_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.ProcessedDocument) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.ProcessedDocument) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1alpha.ProcessedDocument other) { + if (other == com.google.cloud.discoveryengine.v1alpha.ProcessedDocument.getDefaultInstance()) + return this; + if (!other.getDocument().isEmpty()) { + document_ = other.document_; + bitField0_ |= 0x00000002; + onChanged(); + } + switch (other.getProcessedDataFormatCase()) { + case JSON_DATA: + { + processedDataFormatCase_ = 2; + processedDataFormat_ = other.processedDataFormat_; + onChanged(); + break; + } + case PROCESSEDDATAFORMAT_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + document_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + processedDataFormatCase_ = 2; + processedDataFormat_ = s; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int processedDataFormatCase_ = 0; + private java.lang.Object processedDataFormat_; + + public ProcessedDataFormatCase getProcessedDataFormatCase() { + return ProcessedDataFormatCase.forNumber(processedDataFormatCase_); + } + + public Builder clearProcessedDataFormat() { + processedDataFormatCase_ = 0; + processedDataFormat_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+     * The JSON string representation of the processed document.
+     * 
+ * + * string json_data = 2; + * + * @return Whether the jsonData field is set. + */ + @java.lang.Override + public boolean hasJsonData() { + return processedDataFormatCase_ == 2; + } + /** + * + * + *
+     * The JSON string representation of the processed document.
+     * 
+ * + * string json_data = 2; + * + * @return The jsonData. + */ + @java.lang.Override + public java.lang.String getJsonData() { + java.lang.Object ref = ""; + if (processedDataFormatCase_ == 2) { + ref = processedDataFormat_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (processedDataFormatCase_ == 2) { + processedDataFormat_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The JSON string representation of the processed document.
+     * 
+ * + * string json_data = 2; + * + * @return The bytes for jsonData. + */ + @java.lang.Override + public com.google.protobuf.ByteString getJsonDataBytes() { + java.lang.Object ref = ""; + if (processedDataFormatCase_ == 2) { + ref = processedDataFormat_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (processedDataFormatCase_ == 2) { + processedDataFormat_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The JSON string representation of the processed document.
+     * 
+ * + * string json_data = 2; + * + * @param value The jsonData to set. + * @return This builder for chaining. + */ + public Builder setJsonData(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + processedDataFormatCase_ = 2; + processedDataFormat_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The JSON string representation of the processed document.
+     * 
+ * + * string json_data = 2; + * + * @return This builder for chaining. + */ + public Builder clearJsonData() { + if (processedDataFormatCase_ == 2) { + processedDataFormatCase_ = 0; + processedDataFormat_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The JSON string representation of the processed document.
+     * 
+ * + * string json_data = 2; + * + * @param value The bytes for jsonData to set. + * @return This builder for chaining. + */ + public Builder setJsonDataBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + processedDataFormatCase_ = 2; + processedDataFormat_ = value; + onChanged(); + return this; + } + + private java.lang.Object document_ = ""; + /** + * + * + *
+     * Required. Full resource name of the referenced document, in the format
+     * `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`.
+     * 
+ * + * + * string document = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The document. + */ + public java.lang.String getDocument() { + java.lang.Object ref = document_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + document_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Full resource name of the referenced document, in the format
+     * `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`.
+     * 
+ * + * + * string document = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for document. + */ + public com.google.protobuf.ByteString getDocumentBytes() { + java.lang.Object ref = document_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + document_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Full resource name of the referenced document, in the format
+     * `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`.
+     * 
+ * + * + * string document = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The document to set. + * @return This builder for chaining. + */ + public Builder setDocument(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + document_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Full resource name of the referenced document, in the format
+     * `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`.
+     * 
+ * + * + * string document = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearDocument() { + document_ = getDefaultInstance().getDocument(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Full resource name of the referenced document, in the format
+     * `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`.
+     * 
+ * + * + * string document = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for document to set. + * @return This builder for chaining. + */ + public Builder setDocumentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + document_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.ProcessedDocument) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.ProcessedDocument) + private static final com.google.cloud.discoveryengine.v1alpha.ProcessedDocument DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.ProcessedDocument(); + } + + public static com.google.cloud.discoveryengine.v1alpha.ProcessedDocument getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ProcessedDocument parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ProcessedDocument getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ProcessedDocumentOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ProcessedDocumentOrBuilder.java new file mode 100644 index 000000000000..930a6da74792 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ProcessedDocumentOrBuilder.java @@ -0,0 +1,97 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/document.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.discoveryengine.v1alpha; + +public interface ProcessedDocumentOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.ProcessedDocument) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The JSON string representation of the processed document.
+   * 
+ * + * string json_data = 2; + * + * @return Whether the jsonData field is set. + */ + boolean hasJsonData(); + /** + * + * + *
+   * The JSON string representation of the processed document.
+   * 
+ * + * string json_data = 2; + * + * @return The jsonData. + */ + java.lang.String getJsonData(); + /** + * + * + *
+   * The JSON string representation of the processed document.
+   * 
+ * + * string json_data = 2; + * + * @return The bytes for jsonData. + */ + com.google.protobuf.ByteString getJsonDataBytes(); + + /** + * + * + *
+   * Required. Full resource name of the referenced document, in the format
+   * `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`.
+   * 
+ * + * + * string document = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The document. + */ + java.lang.String getDocument(); + /** + * + * + *
+   * Required. Full resource name of the referenced document, in the format
+   * `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`.
+   * 
+ * + * + * string document = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for document. + */ + com.google.protobuf.ByteString getDocumentBytes(); + + com.google.cloud.discoveryengine.v1alpha.ProcessedDocument.ProcessedDataFormatCase + getProcessedDataFormatCase(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/RankRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/RankRequest.java new file mode 100644 index 000000000000..bbe647ce8579 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/RankRequest.java @@ -0,0 +1,1797 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/rank_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * Request message for
+ * [RankService.Rank][google.cloud.discoveryengine.v1alpha.RankService.Rank]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.RankRequest} + */ +public final class RankRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.RankRequest) + RankRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use RankRequest.newBuilder() to construct. + private RankRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RankRequest() { + rankingConfig_ = ""; + model_ = ""; + query_ = ""; + records_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RankRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.RankServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_RankRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.RankServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_RankRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.RankRequest.class, + com.google.cloud.discoveryengine.v1alpha.RankRequest.Builder.class); + } + + public static final int RANKING_CONFIG_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object rankingConfig_ = ""; + /** + * + * + *
+   * Required. The resource name of the rank service config, such as
+   * `projects/{project_num}/locations/{location_id}/rankingConfigs/default_ranking_config`.
+   * 
+ * + * + * string ranking_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The rankingConfig. + */ + @java.lang.Override + public java.lang.String getRankingConfig() { + java.lang.Object ref = rankingConfig_; + 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(); + rankingConfig_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the rank service config, such as
+   * `projects/{project_num}/locations/{location_id}/rankingConfigs/default_ranking_config`.
+   * 
+ * + * + * string ranking_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for rankingConfig. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRankingConfigBytes() { + java.lang.Object ref = rankingConfig_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + rankingConfig_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MODEL_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object model_ = ""; + /** + * + * + *
+   * The identifier of the model to use. It is one of:
+   *
+   * * `semantic-ranker-512@latest`: Semantic ranking model with maxiumn input
+   * token size 512.
+   *
+   * It is set to `semantic-ranker-512@latest` by default if unspecified.
+   * 
+ * + * string model = 2; + * + * @return The model. + */ + @java.lang.Override + public java.lang.String getModel() { + java.lang.Object ref = model_; + 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(); + model_ = s; + return s; + } + } + /** + * + * + *
+   * The identifier of the model to use. It is one of:
+   *
+   * * `semantic-ranker-512@latest`: Semantic ranking model with maxiumn input
+   * token size 512.
+   *
+   * It is set to `semantic-ranker-512@latest` by default if unspecified.
+   * 
+ * + * string model = 2; + * + * @return The bytes for model. + */ + @java.lang.Override + public com.google.protobuf.ByteString getModelBytes() { + java.lang.Object ref = model_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + model_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TOP_N_FIELD_NUMBER = 3; + private int topN_ = 0; + /** + * + * + *
+   * The number of results to return. If this is unset or no bigger than zero,
+   * returns all results.
+   * 
+ * + * int32 top_n = 3; + * + * @return The topN. + */ + @java.lang.Override + public int getTopN() { + return topN_; + } + + public static final int QUERY_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object query_ = ""; + /** + * + * + *
+   * The query to use.
+   * 
+ * + * string query = 4; + * + * @return The query. + */ + @java.lang.Override + public java.lang.String getQuery() { + java.lang.Object ref = query_; + 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(); + query_ = s; + return s; + } + } + /** + * + * + *
+   * The query to use.
+   * 
+ * + * string query = 4; + * + * @return The bytes for query. + */ + @java.lang.Override + public com.google.protobuf.ByteString getQueryBytes() { + java.lang.Object ref = query_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + query_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RECORDS_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private java.util.List records_; + /** + * + * + *
+   * Required. A list of records to rank. At most 200 records to rank.
+   * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RankingRecord records = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List getRecordsList() { + return records_; + } + /** + * + * + *
+   * Required. A list of records to rank. At most 200 records to rank.
+   * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RankingRecord records = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getRecordsOrBuilderList() { + return records_; + } + /** + * + * + *
+   * Required. A list of records to rank. At most 200 records to rank.
+   * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RankingRecord records = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getRecordsCount() { + return records_.size(); + } + /** + * + * + *
+   * Required. A list of records to rank. At most 200 records to rank.
+   * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RankingRecord records = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.RankingRecord getRecords(int index) { + return records_.get(index); + } + /** + * + * + *
+   * Required. A list of records to rank. At most 200 records to rank.
+   * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RankingRecord records = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.RankingRecordOrBuilder getRecordsOrBuilder( + int index) { + return records_.get(index); + } + + public static final int IGNORE_RECORD_DETAILS_IN_RESPONSE_FIELD_NUMBER = 6; + private boolean ignoreRecordDetailsInResponse_ = false; + /** + * + * + *
+   * If true, the response will contain only record ID and score. By default, it
+   * is false, the response will contain record details.
+   * 
+ * + * bool ignore_record_details_in_response = 6; + * + * @return The ignoreRecordDetailsInResponse. + */ + @java.lang.Override + public boolean getIgnoreRecordDetailsInResponse() { + return ignoreRecordDetailsInResponse_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rankingConfig_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, rankingConfig_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, model_); + } + if (topN_ != 0) { + output.writeInt32(3, topN_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(query_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, query_); + } + for (int i = 0; i < records_.size(); i++) { + output.writeMessage(5, records_.get(i)); + } + if (ignoreRecordDetailsInResponse_ != false) { + output.writeBool(6, ignoreRecordDetailsInResponse_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rankingConfig_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, rankingConfig_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, model_); + } + if (topN_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, topN_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(query_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, query_); + } + for (int i = 0; i < records_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, records_.get(i)); + } + if (ignoreRecordDetailsInResponse_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize(6, ignoreRecordDetailsInResponse_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.RankRequest)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.RankRequest other = + (com.google.cloud.discoveryengine.v1alpha.RankRequest) obj; + + if (!getRankingConfig().equals(other.getRankingConfig())) return false; + if (!getModel().equals(other.getModel())) return false; + if (getTopN() != other.getTopN()) return false; + if (!getQuery().equals(other.getQuery())) return false; + if (!getRecordsList().equals(other.getRecordsList())) return false; + if (getIgnoreRecordDetailsInResponse() != other.getIgnoreRecordDetailsInResponse()) + return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + RANKING_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getRankingConfig().hashCode(); + hash = (37 * hash) + MODEL_FIELD_NUMBER; + hash = (53 * hash) + getModel().hashCode(); + hash = (37 * hash) + TOP_N_FIELD_NUMBER; + hash = (53 * hash) + getTopN(); + hash = (37 * hash) + QUERY_FIELD_NUMBER; + hash = (53 * hash) + getQuery().hashCode(); + if (getRecordsCount() > 0) { + hash = (37 * hash) + RECORDS_FIELD_NUMBER; + hash = (53 * hash) + getRecordsList().hashCode(); + } + hash = (37 * hash) + IGNORE_RECORD_DETAILS_IN_RESPONSE_FIELD_NUMBER; + hash = + (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIgnoreRecordDetailsInResponse()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.RankRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.RankRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.RankRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.RankRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.RankRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.RankRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.RankRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.RankRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.RankRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.RankRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.RankRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.RankRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.discoveryengine.v1alpha.RankRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for
+   * [RankService.Rank][google.cloud.discoveryengine.v1alpha.RankService.Rank]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.RankRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.RankRequest) + com.google.cloud.discoveryengine.v1alpha.RankRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.RankServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_RankRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.RankServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_RankRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.RankRequest.class, + com.google.cloud.discoveryengine.v1alpha.RankRequest.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1alpha.RankRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + rankingConfig_ = ""; + model_ = ""; + topN_ = 0; + query_ = ""; + if (recordsBuilder_ == null) { + records_ = java.util.Collections.emptyList(); + } else { + records_ = null; + recordsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + ignoreRecordDetailsInResponse_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.RankServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_RankRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.RankRequest getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.RankRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.RankRequest build() { + com.google.cloud.discoveryengine.v1alpha.RankRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.RankRequest buildPartial() { + com.google.cloud.discoveryengine.v1alpha.RankRequest result = + new com.google.cloud.discoveryengine.v1alpha.RankRequest(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.discoveryengine.v1alpha.RankRequest result) { + if (recordsBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + records_ = java.util.Collections.unmodifiableList(records_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.records_ = records_; + } else { + result.records_ = recordsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.discoveryengine.v1alpha.RankRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.rankingConfig_ = rankingConfig_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.model_ = model_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.topN_ = topN_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.query_ = query_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.ignoreRecordDetailsInResponse_ = ignoreRecordDetailsInResponse_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.RankRequest) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.RankRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1alpha.RankRequest other) { + if (other == com.google.cloud.discoveryengine.v1alpha.RankRequest.getDefaultInstance()) + return this; + if (!other.getRankingConfig().isEmpty()) { + rankingConfig_ = other.rankingConfig_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getModel().isEmpty()) { + model_ = other.model_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getTopN() != 0) { + setTopN(other.getTopN()); + } + if (!other.getQuery().isEmpty()) { + query_ = other.query_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (recordsBuilder_ == null) { + if (!other.records_.isEmpty()) { + if (records_.isEmpty()) { + records_ = other.records_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureRecordsIsMutable(); + records_.addAll(other.records_); + } + onChanged(); + } + } else { + if (!other.records_.isEmpty()) { + if (recordsBuilder_.isEmpty()) { + recordsBuilder_.dispose(); + recordsBuilder_ = null; + records_ = other.records_; + bitField0_ = (bitField0_ & ~0x00000010); + recordsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getRecordsFieldBuilder() + : null; + } else { + recordsBuilder_.addAllMessages(other.records_); + } + } + } + if (other.getIgnoreRecordDetailsInResponse() != false) { + setIgnoreRecordDetailsInResponse(other.getIgnoreRecordDetailsInResponse()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + rankingConfig_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + model_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + topN_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: + { + query_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + com.google.cloud.discoveryengine.v1alpha.RankingRecord m = + input.readMessage( + com.google.cloud.discoveryengine.v1alpha.RankingRecord.parser(), + extensionRegistry); + if (recordsBuilder_ == null) { + ensureRecordsIsMutable(); + records_.add(m); + } else { + recordsBuilder_.addMessage(m); + } + break; + } // case 42 + case 48: + { + ignoreRecordDetailsInResponse_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case 48 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object rankingConfig_ = ""; + /** + * + * + *
+     * Required. The resource name of the rank service config, such as
+     * `projects/{project_num}/locations/{location_id}/rankingConfigs/default_ranking_config`.
+     * 
+ * + * + * string ranking_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The rankingConfig. + */ + public java.lang.String getRankingConfig() { + java.lang.Object ref = rankingConfig_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + rankingConfig_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the rank service config, such as
+     * `projects/{project_num}/locations/{location_id}/rankingConfigs/default_ranking_config`.
+     * 
+ * + * + * string ranking_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for rankingConfig. + */ + public com.google.protobuf.ByteString getRankingConfigBytes() { + java.lang.Object ref = rankingConfig_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + rankingConfig_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the rank service config, such as
+     * `projects/{project_num}/locations/{location_id}/rankingConfigs/default_ranking_config`.
+     * 
+ * + * + * string ranking_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The rankingConfig to set. + * @return This builder for chaining. + */ + public Builder setRankingConfig(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + rankingConfig_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the rank service config, such as
+     * `projects/{project_num}/locations/{location_id}/rankingConfigs/default_ranking_config`.
+     * 
+ * + * + * string ranking_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRankingConfig() { + rankingConfig_ = getDefaultInstance().getRankingConfig(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the rank service config, such as
+     * `projects/{project_num}/locations/{location_id}/rankingConfigs/default_ranking_config`.
+     * 
+ * + * + * string ranking_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for rankingConfig to set. + * @return This builder for chaining. + */ + public Builder setRankingConfigBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + rankingConfig_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object model_ = ""; + /** + * + * + *
+     * The identifier of the model to use. It is one of:
+     *
+     * * `semantic-ranker-512@latest`: Semantic ranking model with maxiumn input
+     * token size 512.
+     *
+     * It is set to `semantic-ranker-512@latest` by default if unspecified.
+     * 
+ * + * string model = 2; + * + * @return The model. + */ + public java.lang.String getModel() { + java.lang.Object ref = model_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + model_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The identifier of the model to use. It is one of:
+     *
+     * * `semantic-ranker-512@latest`: Semantic ranking model with maxiumn input
+     * token size 512.
+     *
+     * It is set to `semantic-ranker-512@latest` by default if unspecified.
+     * 
+ * + * string model = 2; + * + * @return The bytes for model. + */ + public com.google.protobuf.ByteString getModelBytes() { + java.lang.Object ref = model_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + model_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The identifier of the model to use. It is one of:
+     *
+     * * `semantic-ranker-512@latest`: Semantic ranking model with maxiumn input
+     * token size 512.
+     *
+     * It is set to `semantic-ranker-512@latest` by default if unspecified.
+     * 
+ * + * string model = 2; + * + * @param value The model to set. + * @return This builder for chaining. + */ + public Builder setModel(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + model_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The identifier of the model to use. It is one of:
+     *
+     * * `semantic-ranker-512@latest`: Semantic ranking model with maxiumn input
+     * token size 512.
+     *
+     * It is set to `semantic-ranker-512@latest` by default if unspecified.
+     * 
+ * + * string model = 2; + * + * @return This builder for chaining. + */ + public Builder clearModel() { + model_ = getDefaultInstance().getModel(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The identifier of the model to use. It is one of:
+     *
+     * * `semantic-ranker-512@latest`: Semantic ranking model with maxiumn input
+     * token size 512.
+     *
+     * It is set to `semantic-ranker-512@latest` by default if unspecified.
+     * 
+ * + * string model = 2; + * + * @param value The bytes for model to set. + * @return This builder for chaining. + */ + public Builder setModelBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + model_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int topN_; + /** + * + * + *
+     * The number of results to return. If this is unset or no bigger than zero,
+     * returns all results.
+     * 
+ * + * int32 top_n = 3; + * + * @return The topN. + */ + @java.lang.Override + public int getTopN() { + return topN_; + } + /** + * + * + *
+     * The number of results to return. If this is unset or no bigger than zero,
+     * returns all results.
+     * 
+ * + * int32 top_n = 3; + * + * @param value The topN to set. + * @return This builder for chaining. + */ + public Builder setTopN(int value) { + + topN_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The number of results to return. If this is unset or no bigger than zero,
+     * returns all results.
+     * 
+ * + * int32 top_n = 3; + * + * @return This builder for chaining. + */ + public Builder clearTopN() { + bitField0_ = (bitField0_ & ~0x00000004); + topN_ = 0; + onChanged(); + return this; + } + + private java.lang.Object query_ = ""; + /** + * + * + *
+     * The query to use.
+     * 
+ * + * string query = 4; + * + * @return The query. + */ + public java.lang.String getQuery() { + java.lang.Object ref = query_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + query_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The query to use.
+     * 
+ * + * string query = 4; + * + * @return The bytes for query. + */ + public com.google.protobuf.ByteString getQueryBytes() { + java.lang.Object ref = query_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + query_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The query to use.
+     * 
+ * + * string query = 4; + * + * @param value The query to set. + * @return This builder for chaining. + */ + public Builder setQuery(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + query_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The query to use.
+     * 
+ * + * string query = 4; + * + * @return This builder for chaining. + */ + public Builder clearQuery() { + query_ = getDefaultInstance().getQuery(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * The query to use.
+     * 
+ * + * string query = 4; + * + * @param value The bytes for query to set. + * @return This builder for chaining. + */ + public Builder setQueryBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + query_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.util.List records_ = + java.util.Collections.emptyList(); + + private void ensureRecordsIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + records_ = + new java.util.ArrayList( + records_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.RankingRecord, + com.google.cloud.discoveryengine.v1alpha.RankingRecord.Builder, + com.google.cloud.discoveryengine.v1alpha.RankingRecordOrBuilder> + recordsBuilder_; + + /** + * + * + *
+     * Required. A list of records to rank. At most 200 records to rank.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RankingRecord records = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List getRecordsList() { + if (recordsBuilder_ == null) { + return java.util.Collections.unmodifiableList(records_); + } else { + return recordsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Required. A list of records to rank. At most 200 records to rank.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RankingRecord records = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getRecordsCount() { + if (recordsBuilder_ == null) { + return records_.size(); + } else { + return recordsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Required. A list of records to rank. At most 200 records to rank.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RankingRecord records = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.discoveryengine.v1alpha.RankingRecord getRecords(int index) { + if (recordsBuilder_ == null) { + return records_.get(index); + } else { + return recordsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Required. A list of records to rank. At most 200 records to rank.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RankingRecord records = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setRecords( + int index, com.google.cloud.discoveryengine.v1alpha.RankingRecord value) { + if (recordsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRecordsIsMutable(); + records_.set(index, value); + onChanged(); + } else { + recordsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. A list of records to rank. At most 200 records to rank.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RankingRecord records = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setRecords( + int index, com.google.cloud.discoveryengine.v1alpha.RankingRecord.Builder builderForValue) { + if (recordsBuilder_ == null) { + ensureRecordsIsMutable(); + records_.set(index, builderForValue.build()); + onChanged(); + } else { + recordsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. A list of records to rank. At most 200 records to rank.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RankingRecord records = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addRecords(com.google.cloud.discoveryengine.v1alpha.RankingRecord value) { + if (recordsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRecordsIsMutable(); + records_.add(value); + onChanged(); + } else { + recordsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Required. A list of records to rank. At most 200 records to rank.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RankingRecord records = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addRecords( + int index, com.google.cloud.discoveryengine.v1alpha.RankingRecord value) { + if (recordsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRecordsIsMutable(); + records_.add(index, value); + onChanged(); + } else { + recordsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. A list of records to rank. At most 200 records to rank.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RankingRecord records = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addRecords( + com.google.cloud.discoveryengine.v1alpha.RankingRecord.Builder builderForValue) { + if (recordsBuilder_ == null) { + ensureRecordsIsMutable(); + records_.add(builderForValue.build()); + onChanged(); + } else { + recordsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. A list of records to rank. At most 200 records to rank.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RankingRecord records = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addRecords( + int index, com.google.cloud.discoveryengine.v1alpha.RankingRecord.Builder builderForValue) { + if (recordsBuilder_ == null) { + ensureRecordsIsMutable(); + records_.add(index, builderForValue.build()); + onChanged(); + } else { + recordsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. A list of records to rank. At most 200 records to rank.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RankingRecord records = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllRecords( + java.lang.Iterable + values) { + if (recordsBuilder_ == null) { + ensureRecordsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, records_); + onChanged(); + } else { + recordsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Required. A list of records to rank. At most 200 records to rank.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RankingRecord records = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearRecords() { + if (recordsBuilder_ == null) { + records_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + recordsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Required. A list of records to rank. At most 200 records to rank.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RankingRecord records = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeRecords(int index) { + if (recordsBuilder_ == null) { + ensureRecordsIsMutable(); + records_.remove(index); + onChanged(); + } else { + recordsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Required. A list of records to rank. At most 200 records to rank.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RankingRecord records = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.discoveryengine.v1alpha.RankingRecord.Builder getRecordsBuilder( + int index) { + return getRecordsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Required. A list of records to rank. At most 200 records to rank.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RankingRecord records = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.discoveryengine.v1alpha.RankingRecordOrBuilder getRecordsOrBuilder( + int index) { + if (recordsBuilder_ == null) { + return records_.get(index); + } else { + return recordsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Required. A list of records to rank. At most 200 records to rank.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RankingRecord records = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getRecordsOrBuilderList() { + if (recordsBuilder_ != null) { + return recordsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(records_); + } + } + /** + * + * + *
+     * Required. A list of records to rank. At most 200 records to rank.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RankingRecord records = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.discoveryengine.v1alpha.RankingRecord.Builder addRecordsBuilder() { + return getRecordsFieldBuilder() + .addBuilder(com.google.cloud.discoveryengine.v1alpha.RankingRecord.getDefaultInstance()); + } + /** + * + * + *
+     * Required. A list of records to rank. At most 200 records to rank.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RankingRecord records = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.discoveryengine.v1alpha.RankingRecord.Builder addRecordsBuilder( + int index) { + return getRecordsFieldBuilder() + .addBuilder( + index, com.google.cloud.discoveryengine.v1alpha.RankingRecord.getDefaultInstance()); + } + /** + * + * + *
+     * Required. A list of records to rank. At most 200 records to rank.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RankingRecord records = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getRecordsBuilderList() { + return getRecordsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.RankingRecord, + com.google.cloud.discoveryengine.v1alpha.RankingRecord.Builder, + com.google.cloud.discoveryengine.v1alpha.RankingRecordOrBuilder> + getRecordsFieldBuilder() { + if (recordsBuilder_ == null) { + recordsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.RankingRecord, + com.google.cloud.discoveryengine.v1alpha.RankingRecord.Builder, + com.google.cloud.discoveryengine.v1alpha.RankingRecordOrBuilder>( + records_, ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean()); + records_ = null; + } + return recordsBuilder_; + } + + private boolean ignoreRecordDetailsInResponse_; + /** + * + * + *
+     * If true, the response will contain only record ID and score. By default, it
+     * is false, the response will contain record details.
+     * 
+ * + * bool ignore_record_details_in_response = 6; + * + * @return The ignoreRecordDetailsInResponse. + */ + @java.lang.Override + public boolean getIgnoreRecordDetailsInResponse() { + return ignoreRecordDetailsInResponse_; + } + /** + * + * + *
+     * If true, the response will contain only record ID and score. By default, it
+     * is false, the response will contain record details.
+     * 
+ * + * bool ignore_record_details_in_response = 6; + * + * @param value The ignoreRecordDetailsInResponse to set. + * @return This builder for chaining. + */ + public Builder setIgnoreRecordDetailsInResponse(boolean value) { + + ignoreRecordDetailsInResponse_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * If true, the response will contain only record ID and score. By default, it
+     * is false, the response will contain record details.
+     * 
+ * + * bool ignore_record_details_in_response = 6; + * + * @return This builder for chaining. + */ + public Builder clearIgnoreRecordDetailsInResponse() { + bitField0_ = (bitField0_ & ~0x00000020); + ignoreRecordDetailsInResponse_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.RankRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.RankRequest) + private static final com.google.cloud.discoveryengine.v1alpha.RankRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.RankRequest(); + } + + public static com.google.cloud.discoveryengine.v1alpha.RankRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RankRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.RankRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/RankRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/RankRequestOrBuilder.java new file mode 100644 index 000000000000..9c4db2a05593 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/RankRequestOrBuilder.java @@ -0,0 +1,207 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/rank_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.discoveryengine.v1alpha; + +public interface RankRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.RankRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the rank service config, such as
+   * `projects/{project_num}/locations/{location_id}/rankingConfigs/default_ranking_config`.
+   * 
+ * + * + * string ranking_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The rankingConfig. + */ + java.lang.String getRankingConfig(); + /** + * + * + *
+   * Required. The resource name of the rank service config, such as
+   * `projects/{project_num}/locations/{location_id}/rankingConfigs/default_ranking_config`.
+   * 
+ * + * + * string ranking_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for rankingConfig. + */ + com.google.protobuf.ByteString getRankingConfigBytes(); + + /** + * + * + *
+   * The identifier of the model to use. It is one of:
+   *
+   * * `semantic-ranker-512@latest`: Semantic ranking model with maxiumn input
+   * token size 512.
+   *
+   * It is set to `semantic-ranker-512@latest` by default if unspecified.
+   * 
+ * + * string model = 2; + * + * @return The model. + */ + java.lang.String getModel(); + /** + * + * + *
+   * The identifier of the model to use. It is one of:
+   *
+   * * `semantic-ranker-512@latest`: Semantic ranking model with maxiumn input
+   * token size 512.
+   *
+   * It is set to `semantic-ranker-512@latest` by default if unspecified.
+   * 
+ * + * string model = 2; + * + * @return The bytes for model. + */ + com.google.protobuf.ByteString getModelBytes(); + + /** + * + * + *
+   * The number of results to return. If this is unset or no bigger than zero,
+   * returns all results.
+   * 
+ * + * int32 top_n = 3; + * + * @return The topN. + */ + int getTopN(); + + /** + * + * + *
+   * The query to use.
+   * 
+ * + * string query = 4; + * + * @return The query. + */ + java.lang.String getQuery(); + /** + * + * + *
+   * The query to use.
+   * 
+ * + * string query = 4; + * + * @return The bytes for query. + */ + com.google.protobuf.ByteString getQueryBytes(); + + /** + * + * + *
+   * Required. A list of records to rank. At most 200 records to rank.
+   * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RankingRecord records = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List getRecordsList(); + /** + * + * + *
+   * Required. A list of records to rank. At most 200 records to rank.
+   * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RankingRecord records = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.discoveryengine.v1alpha.RankingRecord getRecords(int index); + /** + * + * + *
+   * Required. A list of records to rank. At most 200 records to rank.
+   * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RankingRecord records = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getRecordsCount(); + /** + * + * + *
+   * Required. A list of records to rank. At most 200 records to rank.
+   * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RankingRecord records = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getRecordsOrBuilderList(); + /** + * + * + *
+   * Required. A list of records to rank. At most 200 records to rank.
+   * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RankingRecord records = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.discoveryengine.v1alpha.RankingRecordOrBuilder getRecordsOrBuilder(int index); + + /** + * + * + *
+   * If true, the response will contain only record ID and score. By default, it
+   * is false, the response will contain record details.
+   * 
+ * + * bool ignore_record_details_in_response = 6; + * + * @return The ignoreRecordDetailsInResponse. + */ + boolean getIgnoreRecordDetailsInResponse(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/RankResponse.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/RankResponse.java new file mode 100644 index 000000000000..dadc24e58e4a --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/RankResponse.java @@ -0,0 +1,953 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/rank_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * Response message for
+ * [RankService.Rank][google.cloud.discoveryengine.v1alpha.RankService.Rank]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.RankResponse} + */ +public final class RankResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.RankResponse) + RankResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use RankResponse.newBuilder() to construct. + private RankResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RankResponse() { + records_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RankResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.RankServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_RankResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.RankServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_RankResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.RankResponse.class, + com.google.cloud.discoveryengine.v1alpha.RankResponse.Builder.class); + } + + public static final int RECORDS_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private java.util.List records_; + /** + * + * + *
+   * A list of records sorted by descending score.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.RankingRecord records = 5; + */ + @java.lang.Override + public java.util.List getRecordsList() { + return records_; + } + /** + * + * + *
+   * A list of records sorted by descending score.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.RankingRecord records = 5; + */ + @java.lang.Override + public java.util.List + getRecordsOrBuilderList() { + return records_; + } + /** + * + * + *
+   * A list of records sorted by descending score.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.RankingRecord records = 5; + */ + @java.lang.Override + public int getRecordsCount() { + return records_.size(); + } + /** + * + * + *
+   * A list of records sorted by descending score.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.RankingRecord records = 5; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.RankingRecord getRecords(int index) { + return records_.get(index); + } + /** + * + * + *
+   * A list of records sorted by descending score.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.RankingRecord records = 5; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.RankingRecordOrBuilder getRecordsOrBuilder( + int index) { + return records_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < records_.size(); i++) { + output.writeMessage(5, records_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < records_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, records_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.RankResponse)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.RankResponse other = + (com.google.cloud.discoveryengine.v1alpha.RankResponse) obj; + + if (!getRecordsList().equals(other.getRecordsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getRecordsCount() > 0) { + hash = (37 * hash) + RECORDS_FIELD_NUMBER; + hash = (53 * hash) + getRecordsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.RankResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.RankResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.RankResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.RankResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.RankResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.RankResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.RankResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.RankResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.RankResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.RankResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.RankResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.RankResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.RankResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for
+   * [RankService.Rank][google.cloud.discoveryengine.v1alpha.RankService.Rank]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.RankResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.RankResponse) + com.google.cloud.discoveryengine.v1alpha.RankResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.RankServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_RankResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.RankServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_RankResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.RankResponse.class, + com.google.cloud.discoveryengine.v1alpha.RankResponse.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1alpha.RankResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (recordsBuilder_ == null) { + records_ = java.util.Collections.emptyList(); + } else { + records_ = null; + recordsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.RankServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_RankResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.RankResponse getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.RankResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.RankResponse build() { + com.google.cloud.discoveryengine.v1alpha.RankResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.RankResponse buildPartial() { + com.google.cloud.discoveryengine.v1alpha.RankResponse result = + new com.google.cloud.discoveryengine.v1alpha.RankResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.discoveryengine.v1alpha.RankResponse result) { + if (recordsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + records_ = java.util.Collections.unmodifiableList(records_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.records_ = records_; + } else { + result.records_ = recordsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.discoveryengine.v1alpha.RankResponse result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.RankResponse) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.RankResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1alpha.RankResponse other) { + if (other == com.google.cloud.discoveryengine.v1alpha.RankResponse.getDefaultInstance()) + return this; + if (recordsBuilder_ == null) { + if (!other.records_.isEmpty()) { + if (records_.isEmpty()) { + records_ = other.records_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRecordsIsMutable(); + records_.addAll(other.records_); + } + onChanged(); + } + } else { + if (!other.records_.isEmpty()) { + if (recordsBuilder_.isEmpty()) { + recordsBuilder_.dispose(); + recordsBuilder_ = null; + records_ = other.records_; + bitField0_ = (bitField0_ & ~0x00000001); + recordsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getRecordsFieldBuilder() + : null; + } else { + recordsBuilder_.addAllMessages(other.records_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 42: + { + com.google.cloud.discoveryengine.v1alpha.RankingRecord m = + input.readMessage( + com.google.cloud.discoveryengine.v1alpha.RankingRecord.parser(), + extensionRegistry); + if (recordsBuilder_ == null) { + ensureRecordsIsMutable(); + records_.add(m); + } else { + recordsBuilder_.addMessage(m); + } + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List records_ = + java.util.Collections.emptyList(); + + private void ensureRecordsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + records_ = + new java.util.ArrayList( + records_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.RankingRecord, + com.google.cloud.discoveryengine.v1alpha.RankingRecord.Builder, + com.google.cloud.discoveryengine.v1alpha.RankingRecordOrBuilder> + recordsBuilder_; + + /** + * + * + *
+     * A list of records sorted by descending score.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.RankingRecord records = 5; + */ + public java.util.List getRecordsList() { + if (recordsBuilder_ == null) { + return java.util.Collections.unmodifiableList(records_); + } else { + return recordsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of records sorted by descending score.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.RankingRecord records = 5; + */ + public int getRecordsCount() { + if (recordsBuilder_ == null) { + return records_.size(); + } else { + return recordsBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of records sorted by descending score.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.RankingRecord records = 5; + */ + public com.google.cloud.discoveryengine.v1alpha.RankingRecord getRecords(int index) { + if (recordsBuilder_ == null) { + return records_.get(index); + } else { + return recordsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of records sorted by descending score.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.RankingRecord records = 5; + */ + public Builder setRecords( + int index, com.google.cloud.discoveryengine.v1alpha.RankingRecord value) { + if (recordsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRecordsIsMutable(); + records_.set(index, value); + onChanged(); + } else { + recordsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of records sorted by descending score.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.RankingRecord records = 5; + */ + public Builder setRecords( + int index, com.google.cloud.discoveryengine.v1alpha.RankingRecord.Builder builderForValue) { + if (recordsBuilder_ == null) { + ensureRecordsIsMutable(); + records_.set(index, builderForValue.build()); + onChanged(); + } else { + recordsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of records sorted by descending score.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.RankingRecord records = 5; + */ + public Builder addRecords(com.google.cloud.discoveryengine.v1alpha.RankingRecord value) { + if (recordsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRecordsIsMutable(); + records_.add(value); + onChanged(); + } else { + recordsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of records sorted by descending score.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.RankingRecord records = 5; + */ + public Builder addRecords( + int index, com.google.cloud.discoveryengine.v1alpha.RankingRecord value) { + if (recordsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRecordsIsMutable(); + records_.add(index, value); + onChanged(); + } else { + recordsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of records sorted by descending score.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.RankingRecord records = 5; + */ + public Builder addRecords( + com.google.cloud.discoveryengine.v1alpha.RankingRecord.Builder builderForValue) { + if (recordsBuilder_ == null) { + ensureRecordsIsMutable(); + records_.add(builderForValue.build()); + onChanged(); + } else { + recordsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of records sorted by descending score.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.RankingRecord records = 5; + */ + public Builder addRecords( + int index, com.google.cloud.discoveryengine.v1alpha.RankingRecord.Builder builderForValue) { + if (recordsBuilder_ == null) { + ensureRecordsIsMutable(); + records_.add(index, builderForValue.build()); + onChanged(); + } else { + recordsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of records sorted by descending score.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.RankingRecord records = 5; + */ + public Builder addAllRecords( + java.lang.Iterable + values) { + if (recordsBuilder_ == null) { + ensureRecordsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, records_); + onChanged(); + } else { + recordsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A list of records sorted by descending score.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.RankingRecord records = 5; + */ + public Builder clearRecords() { + if (recordsBuilder_ == null) { + records_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + recordsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of records sorted by descending score.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.RankingRecord records = 5; + */ + public Builder removeRecords(int index) { + if (recordsBuilder_ == null) { + ensureRecordsIsMutable(); + records_.remove(index); + onChanged(); + } else { + recordsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of records sorted by descending score.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.RankingRecord records = 5; + */ + public com.google.cloud.discoveryengine.v1alpha.RankingRecord.Builder getRecordsBuilder( + int index) { + return getRecordsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of records sorted by descending score.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.RankingRecord records = 5; + */ + public com.google.cloud.discoveryengine.v1alpha.RankingRecordOrBuilder getRecordsOrBuilder( + int index) { + if (recordsBuilder_ == null) { + return records_.get(index); + } else { + return recordsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of records sorted by descending score.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.RankingRecord records = 5; + */ + public java.util.List + getRecordsOrBuilderList() { + if (recordsBuilder_ != null) { + return recordsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(records_); + } + } + /** + * + * + *
+     * A list of records sorted by descending score.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.RankingRecord records = 5; + */ + public com.google.cloud.discoveryengine.v1alpha.RankingRecord.Builder addRecordsBuilder() { + return getRecordsFieldBuilder() + .addBuilder(com.google.cloud.discoveryengine.v1alpha.RankingRecord.getDefaultInstance()); + } + /** + * + * + *
+     * A list of records sorted by descending score.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.RankingRecord records = 5; + */ + public com.google.cloud.discoveryengine.v1alpha.RankingRecord.Builder addRecordsBuilder( + int index) { + return getRecordsFieldBuilder() + .addBuilder( + index, com.google.cloud.discoveryengine.v1alpha.RankingRecord.getDefaultInstance()); + } + /** + * + * + *
+     * A list of records sorted by descending score.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.RankingRecord records = 5; + */ + public java.util.List + getRecordsBuilderList() { + return getRecordsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.RankingRecord, + com.google.cloud.discoveryengine.v1alpha.RankingRecord.Builder, + com.google.cloud.discoveryengine.v1alpha.RankingRecordOrBuilder> + getRecordsFieldBuilder() { + if (recordsBuilder_ == null) { + recordsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.RankingRecord, + com.google.cloud.discoveryengine.v1alpha.RankingRecord.Builder, + com.google.cloud.discoveryengine.v1alpha.RankingRecordOrBuilder>( + records_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + records_ = null; + } + return recordsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.RankResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.RankResponse) + private static final com.google.cloud.discoveryengine.v1alpha.RankResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.RankResponse(); + } + + public static com.google.cloud.discoveryengine.v1alpha.RankResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RankResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.RankResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/RankResponseOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/RankResponseOrBuilder.java new file mode 100644 index 000000000000..a014d379f525 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/RankResponseOrBuilder.java @@ -0,0 +1,78 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/rank_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.discoveryengine.v1alpha; + +public interface RankResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.RankResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A list of records sorted by descending score.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.RankingRecord records = 5; + */ + java.util.List getRecordsList(); + /** + * + * + *
+   * A list of records sorted by descending score.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.RankingRecord records = 5; + */ + com.google.cloud.discoveryengine.v1alpha.RankingRecord getRecords(int index); + /** + * + * + *
+   * A list of records sorted by descending score.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.RankingRecord records = 5; + */ + int getRecordsCount(); + /** + * + * + *
+   * A list of records sorted by descending score.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.RankingRecord records = 5; + */ + java.util.List + getRecordsOrBuilderList(); + /** + * + * + *
+   * A list of records sorted by descending score.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.RankingRecord records = 5; + */ + com.google.cloud.discoveryengine.v1alpha.RankingRecordOrBuilder getRecordsOrBuilder(int index); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/RankServiceProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/RankServiceProto.java new file mode 100644 index 000000000000..a8ee217d3967 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/RankServiceProto.java @@ -0,0 +1,133 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/rank_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.discoveryengine.v1alpha; + +public final class RankServiceProto { + private RankServiceProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_RankingRecord_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_RankingRecord_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_RankRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_RankRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_RankResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_RankResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n7google/cloud/discoveryengine/v1alpha/r" + + "ank_service.proto\022$google.cloud.discover" + + "yengine.v1alpha\032\034google/api/annotations." + + "proto\032\027google/api/client.proto\032\037google/a" + + "pi/field_behavior.proto\032\031google/api/reso" + + "urce.proto\"J\n\rRankingRecord\022\n\n\002id\030\001 \001(\t\022" + + "\r\n\005title\030\002 \001(\t\022\017\n\007content\030\003 \001(\t\022\r\n\005score" + + "\030\004 \001(\002\"\376\001\n\013RankRequest\022L\n\016ranking_config" + + "\030\001 \001(\tB4\340A\002\372A.\n,discoveryengine.googleap" + + "is.com/RankingConfig\022\r\n\005model\030\002 \001(\t\022\r\n\005t" + + "op_n\030\003 \001(\005\022\r\n\005query\030\004 \001(\t\022I\n\007records\030\005 \003" + + "(\01323.google.cloud.discoveryengine.v1alph" + + "a.RankingRecordB\003\340A\002\022)\n!ignore_record_de" + + "tails_in_response\030\006 \001(\010\"T\n\014RankResponse\022" + + "D\n\007records\030\005 \003(\01323.google.cloud.discover" + + "yengine.v1alpha.RankingRecord2\244\002\n\013RankSe" + + "rvice\022\300\001\n\004Rank\0221.google.cloud.discoverye" + + "ngine.v1alpha.RankRequest\0322.google.cloud" + + ".discoveryengine.v1alpha.RankResponse\"Q\202" + + "\323\344\223\002K\"F/v1alpha/{ranking_config=projects" + + "/*/locations/*/rankingConfigs/*}:rank:\001*" + + "\032R\312A\036discoveryengine.googleapis.com\322A.ht" + + "tps://www.googleapis.com/auth/cloud-plat" + + "formB\234\002\n(com.google.cloud.discoveryengin" + + "e.v1alphaB\020RankServiceProtoP\001ZRcloud.goo" + + "gle.com/go/discoveryengine/apiv1alpha/di" + + "scoveryenginepb;discoveryenginepb\242\002\017DISC" + + "OVERYENGINE\252\002$Google.Cloud.DiscoveryEngi" + + "ne.V1Alpha\312\002$Google\\Cloud\\DiscoveryEngin" + + "e\\V1alpha\352\002\'Google::Cloud::DiscoveryEngi" + + "ne::V1alphab\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + }); + internal_static_google_cloud_discoveryengine_v1alpha_RankingRecord_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_discoveryengine_v1alpha_RankingRecord_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_RankingRecord_descriptor, + new java.lang.String[] { + "Id", "Title", "Content", "Score", + }); + internal_static_google_cloud_discoveryengine_v1alpha_RankRequest_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_discoveryengine_v1alpha_RankRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_RankRequest_descriptor, + new java.lang.String[] { + "RankingConfig", "Model", "TopN", "Query", "Records", "IgnoreRecordDetailsInResponse", + }); + internal_static_google_cloud_discoveryengine_v1alpha_RankResponse_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_discoveryengine_v1alpha_RankResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_RankResponse_descriptor, + new java.lang.String[] { + "Records", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/RankingConfigName.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/RankingConfigName.java new file mode 100644 index 000000000000..a843db29393a --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/RankingConfigName.java @@ -0,0 +1,227 @@ +/* + * Copyright 2024 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.discoveryengine.v1alpha; + +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 RankingConfigName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_RANKING_CONFIG = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/rankingConfigs/{ranking_config}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String rankingConfig; + + @Deprecated + protected RankingConfigName() { + project = null; + location = null; + rankingConfig = null; + } + + private RankingConfigName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + rankingConfig = Preconditions.checkNotNull(builder.getRankingConfig()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getRankingConfig() { + return rankingConfig; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static RankingConfigName of(String project, String location, String rankingConfig) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setRankingConfig(rankingConfig) + .build(); + } + + public static String format(String project, String location, String rankingConfig) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setRankingConfig(rankingConfig) + .build() + .toString(); + } + + public static RankingConfigName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_RANKING_CONFIG.validatedMatch( + formattedString, "RankingConfigName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("ranking_config")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (RankingConfigName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_RANKING_CONFIG.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (rankingConfig != null) { + fieldMapBuilder.put("ranking_config", rankingConfig); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_RANKING_CONFIG.instantiate( + "project", project, "location", location, "ranking_config", rankingConfig); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + RankingConfigName that = ((RankingConfigName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.rankingConfig, that.rankingConfig); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(rankingConfig); + return h; + } + + /** Builder for projects/{project}/locations/{location}/rankingConfigs/{ranking_config}. */ + public static class Builder { + private String project; + private String location; + private String rankingConfig; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getRankingConfig() { + return rankingConfig; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setRankingConfig(String rankingConfig) { + this.rankingConfig = rankingConfig; + return this; + } + + private Builder(RankingConfigName rankingConfigName) { + this.project = rankingConfigName.project; + this.location = rankingConfigName.location; + this.rankingConfig = rankingConfigName.rankingConfig; + } + + public RankingConfigName build() { + return new RankingConfigName(this); + } + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/RankingRecord.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/RankingRecord.java new file mode 100644 index 000000000000..48b28eed2eb4 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/RankingRecord.java @@ -0,0 +1,1144 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/rank_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * Record message for
+ * [RankService.Rank][google.cloud.discoveryengine.v1alpha.RankService.Rank]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.RankingRecord} + */ +public final class RankingRecord extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.RankingRecord) + RankingRecordOrBuilder { + private static final long serialVersionUID = 0L; + // Use RankingRecord.newBuilder() to construct. + private RankingRecord(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RankingRecord() { + id_ = ""; + title_ = ""; + content_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RankingRecord(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.RankServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_RankingRecord_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.RankServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_RankingRecord_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.RankingRecord.class, + com.google.cloud.discoveryengine.v1alpha.RankingRecord.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + * + * + *
+   * The unique ID to represent the record.
+   * 
+ * + * string id = 1; + * + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + 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(); + id_ = s; + return s; + } + } + /** + * + * + *
+   * The unique ID to represent the record.
+   * 
+ * + * string id = 1; + * + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TITLE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object title_ = ""; + /** + * + * + *
+   * The title of the record. Empty by default.
+   * At least one of
+   * [title][google.cloud.discoveryengine.v1alpha.RankingRecord.title] or
+   * [content][google.cloud.discoveryengine.v1alpha.RankingRecord.content]
+   * should be set otherwise an INVALID_ARGUMENT error is thrown.
+   * 
+ * + * string title = 2; + * + * @return The title. + */ + @java.lang.Override + public java.lang.String getTitle() { + java.lang.Object ref = title_; + 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(); + title_ = s; + return s; + } + } + /** + * + * + *
+   * The title of the record. Empty by default.
+   * At least one of
+   * [title][google.cloud.discoveryengine.v1alpha.RankingRecord.title] or
+   * [content][google.cloud.discoveryengine.v1alpha.RankingRecord.content]
+   * should be set otherwise an INVALID_ARGUMENT error is thrown.
+   * 
+ * + * string title = 2; + * + * @return The bytes for title. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONTENT_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object content_ = ""; + /** + * + * + *
+   * The content of the record. Empty by default.
+   * At least one of
+   * [title][google.cloud.discoveryengine.v1alpha.RankingRecord.title] or
+   * [content][google.cloud.discoveryengine.v1alpha.RankingRecord.content]
+   * should be set otherwise an INVALID_ARGUMENT error is thrown.
+   * 
+ * + * string content = 3; + * + * @return The content. + */ + @java.lang.Override + public java.lang.String getContent() { + java.lang.Object ref = content_; + 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(); + content_ = s; + return s; + } + } + /** + * + * + *
+   * The content of the record. Empty by default.
+   * At least one of
+   * [title][google.cloud.discoveryengine.v1alpha.RankingRecord.title] or
+   * [content][google.cloud.discoveryengine.v1alpha.RankingRecord.content]
+   * should be set otherwise an INVALID_ARGUMENT error is thrown.
+   * 
+ * + * string content = 3; + * + * @return The bytes for content. + */ + @java.lang.Override + public com.google.protobuf.ByteString getContentBytes() { + java.lang.Object ref = content_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + content_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SCORE_FIELD_NUMBER = 4; + private float score_ = 0F; + /** + * + * + *
+   * The score of this record based on the given query and selected model.
+   * 
+ * + * float score = 4; + * + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, title_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(content_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, content_); + } + if (java.lang.Float.floatToRawIntBits(score_) != 0) { + output.writeFloat(4, score_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, title_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(content_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, content_); + } + if (java.lang.Float.floatToRawIntBits(score_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(4, score_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.RankingRecord)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.RankingRecord other = + (com.google.cloud.discoveryengine.v1alpha.RankingRecord) obj; + + if (!getId().equals(other.getId())) return false; + if (!getTitle().equals(other.getTitle())) return false; + if (!getContent().equals(other.getContent())) return false; + if (java.lang.Float.floatToIntBits(getScore()) + != java.lang.Float.floatToIntBits(other.getScore())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (37 * hash) + TITLE_FIELD_NUMBER; + hash = (53 * hash) + getTitle().hashCode(); + hash = (37 * hash) + CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getContent().hashCode(); + hash = (37 * hash) + SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getScore()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.RankingRecord parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.RankingRecord parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.RankingRecord parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.RankingRecord parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.RankingRecord parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.RankingRecord parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.RankingRecord parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.RankingRecord parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.RankingRecord parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.RankingRecord parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.RankingRecord parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.RankingRecord parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.RankingRecord prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Record message for
+   * [RankService.Rank][google.cloud.discoveryengine.v1alpha.RankService.Rank]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.RankingRecord} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.RankingRecord) + com.google.cloud.discoveryengine.v1alpha.RankingRecordOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.RankServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_RankingRecord_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.RankServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_RankingRecord_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.RankingRecord.class, + com.google.cloud.discoveryengine.v1alpha.RankingRecord.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1alpha.RankingRecord.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + title_ = ""; + content_ = ""; + score_ = 0F; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.RankServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_RankingRecord_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.RankingRecord getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.RankingRecord.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.RankingRecord build() { + com.google.cloud.discoveryengine.v1alpha.RankingRecord result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.RankingRecord buildPartial() { + com.google.cloud.discoveryengine.v1alpha.RankingRecord result = + new com.google.cloud.discoveryengine.v1alpha.RankingRecord(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.discoveryengine.v1alpha.RankingRecord result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.title_ = title_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.content_ = content_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.score_ = score_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.RankingRecord) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.RankingRecord) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1alpha.RankingRecord other) { + if (other == com.google.cloud.discoveryengine.v1alpha.RankingRecord.getDefaultInstance()) + return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getTitle().isEmpty()) { + title_ = other.title_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getContent().isEmpty()) { + content_ = other.content_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.getScore() != 0F) { + setScore(other.getScore()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + title_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + content_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 37: + { + score_ = input.readFloat(); + bitField0_ |= 0x00000008; + break; + } // case 37 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + * + * + *
+     * The unique ID to represent the record.
+     * 
+ * + * string id = 1; + * + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The unique ID to represent the record.
+     * 
+ * + * string id = 1; + * + * @return The bytes for id. + */ + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The unique ID to represent the record.
+     * 
+ * + * string id = 1; + * + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The unique ID to represent the record.
+     * 
+ * + * string id = 1; + * + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The unique ID to represent the record.
+     * 
+ * + * string id = 1; + * + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object title_ = ""; + /** + * + * + *
+     * The title of the record. Empty by default.
+     * At least one of
+     * [title][google.cloud.discoveryengine.v1alpha.RankingRecord.title] or
+     * [content][google.cloud.discoveryengine.v1alpha.RankingRecord.content]
+     * should be set otherwise an INVALID_ARGUMENT error is thrown.
+     * 
+ * + * string title = 2; + * + * @return The title. + */ + public java.lang.String getTitle() { + java.lang.Object ref = title_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + title_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The title of the record. Empty by default.
+     * At least one of
+     * [title][google.cloud.discoveryengine.v1alpha.RankingRecord.title] or
+     * [content][google.cloud.discoveryengine.v1alpha.RankingRecord.content]
+     * should be set otherwise an INVALID_ARGUMENT error is thrown.
+     * 
+ * + * string title = 2; + * + * @return The bytes for title. + */ + public com.google.protobuf.ByteString getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The title of the record. Empty by default.
+     * At least one of
+     * [title][google.cloud.discoveryengine.v1alpha.RankingRecord.title] or
+     * [content][google.cloud.discoveryengine.v1alpha.RankingRecord.content]
+     * should be set otherwise an INVALID_ARGUMENT error is thrown.
+     * 
+ * + * string title = 2; + * + * @param value The title to set. + * @return This builder for chaining. + */ + public Builder setTitle(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + title_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The title of the record. Empty by default.
+     * At least one of
+     * [title][google.cloud.discoveryengine.v1alpha.RankingRecord.title] or
+     * [content][google.cloud.discoveryengine.v1alpha.RankingRecord.content]
+     * should be set otherwise an INVALID_ARGUMENT error is thrown.
+     * 
+ * + * string title = 2; + * + * @return This builder for chaining. + */ + public Builder clearTitle() { + title_ = getDefaultInstance().getTitle(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The title of the record. Empty by default.
+     * At least one of
+     * [title][google.cloud.discoveryengine.v1alpha.RankingRecord.title] or
+     * [content][google.cloud.discoveryengine.v1alpha.RankingRecord.content]
+     * should be set otherwise an INVALID_ARGUMENT error is thrown.
+     * 
+ * + * string title = 2; + * + * @param value The bytes for title to set. + * @return This builder for chaining. + */ + public Builder setTitleBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + title_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object content_ = ""; + /** + * + * + *
+     * The content of the record. Empty by default.
+     * At least one of
+     * [title][google.cloud.discoveryengine.v1alpha.RankingRecord.title] or
+     * [content][google.cloud.discoveryengine.v1alpha.RankingRecord.content]
+     * should be set otherwise an INVALID_ARGUMENT error is thrown.
+     * 
+ * + * string content = 3; + * + * @return The content. + */ + public java.lang.String getContent() { + java.lang.Object ref = content_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + content_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The content of the record. Empty by default.
+     * At least one of
+     * [title][google.cloud.discoveryengine.v1alpha.RankingRecord.title] or
+     * [content][google.cloud.discoveryengine.v1alpha.RankingRecord.content]
+     * should be set otherwise an INVALID_ARGUMENT error is thrown.
+     * 
+ * + * string content = 3; + * + * @return The bytes for content. + */ + public com.google.protobuf.ByteString getContentBytes() { + java.lang.Object ref = content_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + content_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The content of the record. Empty by default.
+     * At least one of
+     * [title][google.cloud.discoveryengine.v1alpha.RankingRecord.title] or
+     * [content][google.cloud.discoveryengine.v1alpha.RankingRecord.content]
+     * should be set otherwise an INVALID_ARGUMENT error is thrown.
+     * 
+ * + * string content = 3; + * + * @param value The content to set. + * @return This builder for chaining. + */ + public Builder setContent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + content_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The content of the record. Empty by default.
+     * At least one of
+     * [title][google.cloud.discoveryengine.v1alpha.RankingRecord.title] or
+     * [content][google.cloud.discoveryengine.v1alpha.RankingRecord.content]
+     * should be set otherwise an INVALID_ARGUMENT error is thrown.
+     * 
+ * + * string content = 3; + * + * @return This builder for chaining. + */ + public Builder clearContent() { + content_ = getDefaultInstance().getContent(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * The content of the record. Empty by default.
+     * At least one of
+     * [title][google.cloud.discoveryengine.v1alpha.RankingRecord.title] or
+     * [content][google.cloud.discoveryengine.v1alpha.RankingRecord.content]
+     * should be set otherwise an INVALID_ARGUMENT error is thrown.
+     * 
+ * + * string content = 3; + * + * @param value The bytes for content to set. + * @return This builder for chaining. + */ + public Builder setContentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + content_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private float score_; + /** + * + * + *
+     * The score of this record based on the given query and selected model.
+     * 
+ * + * float score = 4; + * + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + /** + * + * + *
+     * The score of this record based on the given query and selected model.
+     * 
+ * + * float score = 4; + * + * @param value The score to set. + * @return This builder for chaining. + */ + public Builder setScore(float value) { + + score_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The score of this record based on the given query and selected model.
+     * 
+ * + * float score = 4; + * + * @return This builder for chaining. + */ + public Builder clearScore() { + bitField0_ = (bitField0_ & ~0x00000008); + score_ = 0F; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.RankingRecord) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.RankingRecord) + private static final com.google.cloud.discoveryengine.v1alpha.RankingRecord DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.RankingRecord(); + } + + public static com.google.cloud.discoveryengine.v1alpha.RankingRecord getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RankingRecord parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.RankingRecord getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/RankingRecordOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/RankingRecordOrBuilder.java new file mode 100644 index 000000000000..8b30763f589b --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/RankingRecordOrBuilder.java @@ -0,0 +1,130 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/rank_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.discoveryengine.v1alpha; + +public interface RankingRecordOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.RankingRecord) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The unique ID to represent the record.
+   * 
+ * + * string id = 1; + * + * @return The id. + */ + java.lang.String getId(); + /** + * + * + *
+   * The unique ID to represent the record.
+   * 
+ * + * string id = 1; + * + * @return The bytes for id. + */ + com.google.protobuf.ByteString getIdBytes(); + + /** + * + * + *
+   * The title of the record. Empty by default.
+   * At least one of
+   * [title][google.cloud.discoveryengine.v1alpha.RankingRecord.title] or
+   * [content][google.cloud.discoveryengine.v1alpha.RankingRecord.content]
+   * should be set otherwise an INVALID_ARGUMENT error is thrown.
+   * 
+ * + * string title = 2; + * + * @return The title. + */ + java.lang.String getTitle(); + /** + * + * + *
+   * The title of the record. Empty by default.
+   * At least one of
+   * [title][google.cloud.discoveryengine.v1alpha.RankingRecord.title] or
+   * [content][google.cloud.discoveryengine.v1alpha.RankingRecord.content]
+   * should be set otherwise an INVALID_ARGUMENT error is thrown.
+   * 
+ * + * string title = 2; + * + * @return The bytes for title. + */ + com.google.protobuf.ByteString getTitleBytes(); + + /** + * + * + *
+   * The content of the record. Empty by default.
+   * At least one of
+   * [title][google.cloud.discoveryengine.v1alpha.RankingRecord.title] or
+   * [content][google.cloud.discoveryengine.v1alpha.RankingRecord.content]
+   * should be set otherwise an INVALID_ARGUMENT error is thrown.
+   * 
+ * + * string content = 3; + * + * @return The content. + */ + java.lang.String getContent(); + /** + * + * + *
+   * The content of the record. Empty by default.
+   * At least one of
+   * [title][google.cloud.discoveryengine.v1alpha.RankingRecord.title] or
+   * [content][google.cloud.discoveryengine.v1alpha.RankingRecord.content]
+   * should be set otherwise an INVALID_ARGUMENT error is thrown.
+   * 
+ * + * string content = 3; + * + * @return The bytes for content. + */ + com.google.protobuf.ByteString getContentBytes(); + + /** + * + * + *
+   * The score of this record based on the given query and selected model.
+   * 
+ * + * float score = 4; + * + * @return The score. + */ + float getScore(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SearchRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SearchRequest.java index 5d3ee2853127..c2a580bcd6fc 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SearchRequest.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SearchRequest.java @@ -6709,20 +6709,22 @@ public interface ConditionBoostSpecOrBuilder * Strength of the condition boost, which should be in [-1, 1]. Negative * boost means demotion. Default is 0.0. * - * Setting to 1.0 gives the document a big promotion. However, it does not - * necessarily mean that the boosted document will be the top result at - * all times, nor that other documents will be excluded. Results could - * still be shown even when none of them matches the condition. And - * results that are significantly more relevant to the search query can - * still trump your heavily favored but irrelevant documents. + * Setting to 1.0 gives the document a big promotion. However, it does + * not necessarily mean that the boosted document will be the top result + * at all times, nor that other documents will be excluded. Results + * could still be shown even when none of them matches the condition. + * And results that are significantly more relevant to the search query + * can still trump your heavily favored but irrelevant documents. * * Setting to -1.0 gives the document a big demotion. However, results * that are deeply relevant might still be shown. The document will have - * an upstream battle to get a fairly high ranking, but it is not blocked - * out completely. + * an upstream battle to get a fairly high ranking, but it is not + * blocked out completely. * * Setting to 0.0 means no boost applied. The boosting condition is - * ignored. + * ignored. Only one of the (condition, boost) combination or the + * boost_control_spec below are set. If both are set then the global boost + * is ignored and the more fine-grained boost_control_spec is applied. * * * float boost = 2; @@ -6730,6 +6732,54 @@ public interface ConditionBoostSpecOrBuilder * @return The boost. */ float getBoost(); + + /** + * + * + *
+       * Complex specification for custom ranking based on customer defined
+       * attribute value.
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec boost_control_spec = 3; + * + * + * @return Whether the boostControlSpec field is set. + */ + boolean hasBoostControlSpec(); + /** + * + * + *
+       * Complex specification for custom ranking based on customer defined
+       * attribute value.
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec boost_control_spec = 3; + * + * + * @return The boostControlSpec. + */ + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .BoostControlSpec + getBoostControlSpec(); + /** + * + * + *
+       * Complex specification for custom ranking based on customer defined
+       * attribute value.
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec boost_control_spec = 3; + * + */ + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .BoostControlSpecOrBuilder + getBoostControlSpecOrBuilder(); } /** * @@ -6778,1546 +6828,5080 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { .Builder.class); } - public static final int CONDITION_FIELD_NUMBER = 1; + public interface BoostControlSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec) + com.google.protobuf.MessageOrBuilder { - @SuppressWarnings("serial") - private volatile java.lang.Object condition_ = ""; - /** - * - * - *
-       * An expression which specifies a boost condition. The syntax and
-       * supported fields are the same as a filter expression. See
-       * [SearchRequest.filter][google.cloud.discoveryengine.v1alpha.SearchRequest.filter]
-       * for detail syntax and limitations.
-       *
-       * Examples:
-       *
-       * * To boost documents with document ID "doc_1" or "doc_2", and
-       * color "Red" or "Blue":
-       * `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))`
-       * 
- * - * string condition = 1; - * - * @return The condition. - */ - @java.lang.Override - public java.lang.String getCondition() { - java.lang.Object ref = condition_; - 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(); - condition_ = s; - return s; - } + /** + * + * + *
+         * The name of the field whose value will be used to determine the
+         * boost amount.
+         * 
+ * + * string field_name = 1; + * + * @return The fieldName. + */ + java.lang.String getFieldName(); + /** + * + * + *
+         * The name of the field whose value will be used to determine the
+         * boost amount.
+         * 
+ * + * string field_name = 1; + * + * @return The bytes for fieldName. + */ + com.google.protobuf.ByteString getFieldNameBytes(); + + /** + * + * + *
+         * The attribute type to be used to determine the boost amount. The
+         * attribute value can be derived from the field value of the specified
+         * field_name. In the case of numerical it is straightforward i.e.
+         * attribute_value = numerical_field_value. In the case of freshness
+         * however, attribute_value = (time.now() - datetime_field_value).
+         * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.AttributeType attribute_type = 2; + * + * + * @return The enum numeric value on the wire for attributeType. + */ + int getAttributeTypeValue(); + /** + * + * + *
+         * The attribute type to be used to determine the boost amount. The
+         * attribute value can be derived from the field value of the specified
+         * field_name. In the case of numerical it is straightforward i.e.
+         * attribute_value = numerical_field_value. In the case of freshness
+         * however, attribute_value = (time.now() - datetime_field_value).
+         * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.AttributeType attribute_type = 2; + * + * + * @return The attributeType. + */ + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .BoostControlSpec.AttributeType + getAttributeType(); + + /** + * + * + *
+         * The interpolation type to be applied to connect the control points
+         * listed below.
+         * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.InterpolationType interpolation_type = 3; + * + * + * @return The enum numeric value on the wire for interpolationType. + */ + int getInterpolationTypeValue(); + /** + * + * + *
+         * The interpolation type to be applied to connect the control points
+         * listed below.
+         * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.InterpolationType interpolation_type = 3; + * + * + * @return The interpolationType. + */ + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .BoostControlSpec.InterpolationType + getInterpolationType(); + + /** + * + * + *
+         * The control points used to define the curve. The monotonic function
+         * (defined through the interpolation_type above) passes through the
+         * control points listed here.
+         * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint control_points = 4; + * + */ + java.util.List< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .BoostControlSpec.ControlPoint> + getControlPointsList(); + /** + * + * + *
+         * The control points used to define the curve. The monotonic function
+         * (defined through the interpolation_type above) passes through the
+         * control points listed here.
+         * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint control_points = 4; + * + */ + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .BoostControlSpec.ControlPoint + getControlPoints(int index); + /** + * + * + *
+         * The control points used to define the curve. The monotonic function
+         * (defined through the interpolation_type above) passes through the
+         * control points listed here.
+         * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint control_points = 4; + * + */ + int getControlPointsCount(); + /** + * + * + *
+         * The control points used to define the curve. The monotonic function
+         * (defined through the interpolation_type above) passes through the
+         * control points listed here.
+         * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint control_points = 4; + * + */ + java.util.List< + ? extends + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec.ControlPointOrBuilder> + getControlPointsOrBuilderList(); + /** + * + * + *
+         * The control points used to define the curve. The monotonic function
+         * (defined through the interpolation_type above) passes through the
+         * control points listed here.
+         * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint control_points = 4; + * + */ + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .BoostControlSpec.ControlPointOrBuilder + getControlPointsOrBuilder(int index); } /** * * *
-       * An expression which specifies a boost condition. The syntax and
-       * supported fields are the same as a filter expression. See
-       * [SearchRequest.filter][google.cloud.discoveryengine.v1alpha.SearchRequest.filter]
-       * for detail syntax and limitations.
-       *
-       * Examples:
-       *
-       * * To boost documents with document ID "doc_1" or "doc_2", and
-       * color "Red" or "Blue":
-       * `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))`
+       * Specification for custom ranking based on customer specified attribute
+       * value. It provides more controls for customized ranking than the simple
+       * (condition, boost) combination above.
        * 
* - * string condition = 1; - * - * @return The bytes for condition. + * Protobuf type {@code + * google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec} */ - @java.lang.Override - public com.google.protobuf.ByteString getConditionBytes() { - java.lang.Object ref = condition_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - condition_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + public static final class BoostControlSpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec) + BoostControlSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use BoostControlSpec.newBuilder() to construct. + private BoostControlSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); } - } - - public static final int BOOST_FIELD_NUMBER = 2; - private float boost_ = 0F; - /** - * - * - *
-       * Strength of the condition boost, which should be in [-1, 1]. Negative
-       * boost means demotion. Default is 0.0.
-       *
-       * Setting to 1.0 gives the document a big promotion. However, it does not
-       * necessarily mean that the boosted document will be the top result at
-       * all times, nor that other documents will be excluded. Results could
-       * still be shown even when none of them matches the condition. And
-       * results that are significantly more relevant to the search query can
-       * still trump your heavily favored but irrelevant documents.
-       *
-       * Setting to -1.0 gives the document a big demotion. However, results
-       * that are deeply relevant might still be shown. The document will have
-       * an upstream battle to get a fairly high ranking, but it is not blocked
-       * out completely.
-       *
-       * Setting to 0.0 means no boost applied. The boosting condition is
-       * ignored.
-       * 
- * - * float boost = 2; - * - * @return The boost. - */ - @java.lang.Override - public float getBoost() { - return boost_; - } - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(condition_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, condition_); + private BoostControlSpec() { + fieldName_ = ""; + attributeType_ = 0; + interpolationType_ = 0; + controlPoints_ = java.util.Collections.emptyList(); } - if (java.lang.Float.floatToRawIntBits(boost_) != 0) { - output.writeFloat(2, boost_); + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BoostControlSpec(); } - getUnknownFields().writeTo(output); - } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_BoostSpec_ConditionBoostSpec_BoostControlSpec_descriptor; + } - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(condition_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, condition_); - } - if (java.lang.Float.floatToRawIntBits(boost_) != 0) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, boost_); + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_BoostSpec_ConditionBoostSpec_BoostControlSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec.class, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec.Builder.class); } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj - instanceof - com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec)) { - return super.equals(obj); - } - com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec other = - (com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec) - obj; + /** + * + * + *
+         * The attribute(or function) for which the custom ranking is to be
+         * applied.
+         * 
+ * + * Protobuf enum {@code + * google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.AttributeType} + */ + public enum AttributeType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+           * Unspecified AttributeType.
+           * 
+ * + * ATTRIBUTE_TYPE_UNSPECIFIED = 0; + */ + ATTRIBUTE_TYPE_UNSPECIFIED(0), + /** + * + * + *
+           * The value of the numerical field will be used to dynamically update
+           * the boost amount. In this case, the attribute_value (the x value)
+           * of the control point will be the actual value of the numerical
+           * field for which the boost_amount is specified.
+           * 
+ * + * NUMERICAL = 1; + */ + NUMERICAL(1), + /** + * + * + *
+           * For the freshness use case the attribute value will be the duration
+           * between the current time and the date in the datetime field
+           * specified. The value must be formatted as an XSD `dayTimeDuration`
+           * value (a restricted subset of an ISO 8601 duration value). The
+           * pattern for this is: `[nD][T[nH][nM][nS]]`.
+           * E.g. `5D`, `3DT12H30M`, `T24H`.
+           * 
+ * + * FRESHNESS = 2; + */ + FRESHNESS(2), + UNRECOGNIZED(-1), + ; - if (!getCondition().equals(other.getCondition())) return false; - if (java.lang.Float.floatToIntBits(getBoost()) - != java.lang.Float.floatToIntBits(other.getBoost())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } + /** + * + * + *
+           * Unspecified AttributeType.
+           * 
+ * + * ATTRIBUTE_TYPE_UNSPECIFIED = 0; + */ + public static final int ATTRIBUTE_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+           * The value of the numerical field will be used to dynamically update
+           * the boost amount. In this case, the attribute_value (the x value)
+           * of the control point will be the actual value of the numerical
+           * field for which the boost_amount is specified.
+           * 
+ * + * NUMERICAL = 1; + */ + public static final int NUMERICAL_VALUE = 1; + /** + * + * + *
+           * For the freshness use case the attribute value will be the duration
+           * between the current time and the date in the datetime field
+           * specified. The value must be formatted as an XSD `dayTimeDuration`
+           * value (a restricted subset of an ISO 8601 duration value). The
+           * pattern for this is: `[nD][T[nH][nM][nS]]`.
+           * E.g. `5D`, `3DT12H30M`, `T24H`.
+           * 
+ * + * FRESHNESS = 2; + */ + public static final int FRESHNESS_VALUE = 2; - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + CONDITION_FIELD_NUMBER; - hash = (53 * hash) + getCondition().hashCode(); - hash = (37 * hash) + BOOST_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getBoost()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } - public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec - .ConditionBoostSpec - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static AttributeType valueOf(int value) { + return forNumber(value); + } - public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec - .ConditionBoostSpec - parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static AttributeType forNumber(int value) { + switch (value) { + case 0: + return ATTRIBUTE_TYPE_UNSPECIFIED; + case 1: + return NUMERICAL; + case 2: + return FRESHNESS; + default: + return null; + } + } - public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec - .ConditionBoostSpec - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } - public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec - .ConditionBoostSpec - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public AttributeType findValueByNumber(int number) { + return AttributeType.forNumber(number); + } + }; - public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec - .ConditionBoostSpec - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } - public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec - .ConditionBoostSpec - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } - public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec - .ConditionBoostSpec - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec.getDescriptor() + .getEnumTypes() + .get(0); + } - public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec - .ConditionBoostSpec - parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } + private static final AttributeType[] VALUES = values(); - public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec - .ConditionBoostSpec - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } + public static AttributeType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } - public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec - .ConditionBoostSpec - parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } + private final int value; - public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec - .ConditionBoostSpec - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } + private AttributeType(int value) { + this.value = value; + } - public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec - .ConditionBoostSpec - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } + // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.AttributeType) + } - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } + /** + * + * + *
+         * The interpolation type to be applied. Default will be linear
+         * (Piecewise Linear).
+         * 
+ * + * Protobuf enum {@code + * google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.InterpolationType} + */ + public enum InterpolationType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+           * Interpolation type is unspecified. In this case, it defaults to
+           * Linear.
+           * 
+ * + * INTERPOLATION_TYPE_UNSPECIFIED = 0; + */ + INTERPOLATION_TYPE_UNSPECIFIED(0), + /** + * + * + *
+           * Piecewise linear interpolation will be applied.
+           * 
+ * + * LINEAR = 1; + */ + LINEAR(1), + UNRECOGNIZED(-1), + ; - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } + /** + * + * + *
+           * Interpolation type is unspecified. In this case, it defaults to
+           * Linear.
+           * 
+ * + * INTERPOLATION_TYPE_UNSPECIFIED = 0; + */ + public static final int INTERPOLATION_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+           * Piecewise linear interpolation will be applied.
+           * 
+ * + * LINEAR = 1; + */ + public static final int LINEAR_VALUE = 1; - public static Builder newBuilder( - com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec - prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static InterpolationType valueOf(int value) { + return forNumber(value); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-       * Boost applies to documents which match a condition.
-       * 
- * - * Protobuf type {@code - * google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec) - com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec - .ConditionBoostSpecOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_BoostSpec_ConditionBoostSpec_descriptor; - } + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static InterpolationType forNumber(int value) { + switch (value) { + case 0: + return INTERPOLATION_TYPE_UNSPECIFIED; + case 1: + return LINEAR; + default: + return null; + } + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_BoostSpec_ConditionBoostSpec_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec - .ConditionBoostSpec.class, - com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec - .ConditionBoostSpec.Builder.class); - } + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } - // Construct using - // com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.newBuilder() - private Builder() {} + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public InterpolationType findValueByNumber(int number) { + return InterpolationType.forNumber(number); + } + }; - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - condition_ = ""; - boost_ = 0F; - return this; - } + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_BoostSpec_ConditionBoostSpec_descriptor; - } + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec.getDescriptor() + .getEnumTypes() + .get(1); + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec - getDefaultInstanceForType() { - return com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec - .getDefaultInstance(); - } + private static final InterpolationType[] VALUES = values(); - @java.lang.Override - public com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec - build() { - com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec - result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); + public static InterpolationType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; } - return result; - } - @java.lang.Override - public com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec - buildPartial() { - com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec - result = - new com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec - .ConditionBoostSpec(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } + private final int value; - private void buildPartial0( - com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec - result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.condition_ = condition_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.boost_ = boost_; + private InterpolationType(int value) { + this.value = value; } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); + // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.InterpolationType) } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } + public interface ControlPointOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint) + com.google.protobuf.MessageOrBuilder { - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } + /** + * + * + *
+           * Can be one of:
+           * 1. The numerical field value.
+           * 2. The duration spec for freshness:
+           * The value must be formatted as an XSD `dayTimeDuration` value (a
+           * restricted subset of an ISO 8601 duration value). The pattern for
+           * this is: `[nD][T[nH][nM][nS]]`.
+           * 
+ * + * string attribute_value = 1; + * + * @return The attributeValue. + */ + java.lang.String getAttributeValue(); + /** + * + * + *
+           * Can be one of:
+           * 1. The numerical field value.
+           * 2. The duration spec for freshness:
+           * The value must be formatted as an XSD `dayTimeDuration` value (a
+           * restricted subset of an ISO 8601 duration value). The pattern for
+           * this is: `[nD][T[nH][nM][nS]]`.
+           * 
+ * + * string attribute_value = 1; + * + * @return The bytes for attributeValue. + */ + com.google.protobuf.ByteString getAttributeValueBytes(); - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); + /** + * + * + *
+           * The value between -1 to 1 by which to boost the score if the
+           * attribute_value evaluates to the value specified above.
+           * 
+ * + * float boost_amount = 2; + * + * @return The boostAmount. + */ + float getBoostAmount(); } + /** + * + * + *
+         * The control points used to define the curve. The curve defined
+         * through these control points can only be monotonically increasing
+         * or decreasing(constant values are acceptable).
+         * 
+ * + * Protobuf type {@code + * google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint} + */ + public static final class ControlPoint extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint) + ControlPointOrBuilder { + private static final long serialVersionUID = 0L; + // Use ControlPoint.newBuilder() to construct. + private ControlPoint(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } + private ControlPoint() { + attributeValue_ = ""; + } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof - com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec) { - return mergeFrom( - (com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec - .ConditionBoostSpec) - other); - } else { - super.mergeFrom(other); - return this; + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ControlPoint(); } - } - public Builder mergeFrom( - com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec - other) { - if (other - == com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec - .getDefaultInstance()) return this; - if (!other.getCondition().isEmpty()) { - condition_ = other.condition_; - bitField0_ |= 0x00000001; - onChanged(); + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_BoostSpec_ConditionBoostSpec_BoostControlSpec_ControlPoint_descriptor; } - if (other.getBoost() != 0F) { - setBoost(other.getBoost()); + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_BoostSpec_ConditionBoostSpec_BoostControlSpec_ControlPoint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec.ControlPoint.class, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec.ControlPoint.Builder.class); } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - @java.lang.Override - public final boolean isInitialized() { - return true; - } + public static final int ATTRIBUTE_VALUE_FIELD_NUMBER = 1; - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); + @SuppressWarnings("serial") + private volatile java.lang.Object attributeValue_ = ""; + /** + * + * + *
+           * Can be one of:
+           * 1. The numerical field value.
+           * 2. The duration spec for freshness:
+           * The value must be formatted as an XSD `dayTimeDuration` value (a
+           * restricted subset of an ISO 8601 duration value). The pattern for
+           * this is: `[nD][T[nH][nM][nS]]`.
+           * 
+ * + * string attribute_value = 1; + * + * @return The attributeValue. + */ + @java.lang.Override + public java.lang.String getAttributeValue() { + java.lang.Object ref = attributeValue_; + 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(); + attributeValue_ = s; + return s; + } + } + /** + * + * + *
+           * Can be one of:
+           * 1. The numerical field value.
+           * 2. The duration spec for freshness:
+           * The value must be formatted as an XSD `dayTimeDuration` value (a
+           * restricted subset of an ISO 8601 duration value). The pattern for
+           * this is: `[nD][T[nH][nM][nS]]`.
+           * 
+ * + * string attribute_value = 1; + * + * @return The bytes for attributeValue. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAttributeValueBytes() { + java.lang.Object ref = attributeValue_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + attributeValue_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - condition_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 21: - { - boost_ = input.readFloat(); - bitField0_ |= 0x00000002; - break; - } // case 21 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; + public static final int BOOST_AMOUNT_FIELD_NUMBER = 2; + private float boostAmount_ = 0F; + /** + * + * + *
+           * The value between -1 to 1 by which to boost the score if the
+           * attribute_value evaluates to the value specified above.
+           * 
+ * + * float boost_amount = 2; + * + * @return The boostAmount. + */ + @java.lang.Override + public float getBoostAmount() { + return boostAmount_; + } - private java.lang.Object condition_ = ""; - /** - * - * - *
-         * An expression which specifies a boost condition. The syntax and
-         * supported fields are the same as a filter expression. See
-         * [SearchRequest.filter][google.cloud.discoveryengine.v1alpha.SearchRequest.filter]
-         * for detail syntax and limitations.
-         *
-         * Examples:
-         *
-         * * To boost documents with document ID "doc_1" or "doc_2", and
-         * color "Red" or "Blue":
-         * `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))`
-         * 
- * - * string condition = 1; - * - * @return The condition. - */ - public java.lang.String getCondition() { - java.lang.Object ref = condition_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - condition_ = s; - return s; - } else { - return (java.lang.String) ref; + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; } - } - /** - * - * - *
-         * An expression which specifies a boost condition. The syntax and
-         * supported fields are the same as a filter expression. See
-         * [SearchRequest.filter][google.cloud.discoveryengine.v1alpha.SearchRequest.filter]
-         * for detail syntax and limitations.
-         *
-         * Examples:
-         *
-         * * To boost documents with document ID "doc_1" or "doc_2", and
-         * color "Red" or "Blue":
-         * `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))`
-         * 
- * - * string condition = 1; - * - * @return The bytes for condition. - */ - public com.google.protobuf.ByteString getConditionBytes() { - java.lang.Object ref = condition_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - condition_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attributeValue_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, attributeValue_); + } + if (java.lang.Float.floatToRawIntBits(boostAmount_) != 0) { + output.writeFloat(2, boostAmount_); + } + getUnknownFields().writeTo(output); } - } - /** - * - * - *
-         * An expression which specifies a boost condition. The syntax and
-         * supported fields are the same as a filter expression. See
-         * [SearchRequest.filter][google.cloud.discoveryengine.v1alpha.SearchRequest.filter]
-         * for detail syntax and limitations.
-         *
-         * Examples:
-         *
-         * * To boost documents with document ID "doc_1" or "doc_2", and
-         * color "Red" or "Blue":
-         * `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))`
-         * 
- * - * string condition = 1; - * - * @param value The condition to set. - * @return This builder for chaining. - */ - public Builder setCondition(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attributeValue_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, attributeValue_); + } + if (java.lang.Float.floatToRawIntBits(boostAmount_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, boostAmount_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; } - condition_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-         * An expression which specifies a boost condition. The syntax and
-         * supported fields are the same as a filter expression. See
-         * [SearchRequest.filter][google.cloud.discoveryengine.v1alpha.SearchRequest.filter]
-         * for detail syntax and limitations.
-         *
-         * Examples:
-         *
-         * * To boost documents with document ID "doc_1" or "doc_2", and
-         * color "Red" or "Blue":
-         * `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))`
-         * 
- * - * string condition = 1; - * - * @return This builder for chaining. - */ - public Builder clearCondition() { - condition_ = getDefaultInstance().getCondition(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-         * An expression which specifies a boost condition. The syntax and
-         * supported fields are the same as a filter expression. See
-         * [SearchRequest.filter][google.cloud.discoveryengine.v1alpha.SearchRequest.filter]
-         * for detail syntax and limitations.
-         *
-         * Examples:
-         *
-         * * To boost documents with document ID "doc_1" or "doc_2", and
-         * color "Red" or "Blue":
-         * `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))`
-         * 
- * - * string condition = 1; - * - * @param value The bytes for condition to set. - * @return This builder for chaining. - */ - public Builder setConditionBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .BoostControlSpec.ControlPoint)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .BoostControlSpec.ControlPoint + other = + (com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec.ControlPoint) + obj; + + if (!getAttributeValue().equals(other.getAttributeValue())) return false; + if (java.lang.Float.floatToIntBits(getBoostAmount()) + != java.lang.Float.floatToIntBits(other.getBoostAmount())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; } - checkByteStringIsUtf8(value); - condition_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - private float boost_; - /** - * - * - *
-         * Strength of the condition boost, which should be in [-1, 1]. Negative
-         * boost means demotion. Default is 0.0.
-         *
-         * Setting to 1.0 gives the document a big promotion. However, it does not
-         * necessarily mean that the boosted document will be the top result at
-         * all times, nor that other documents will be excluded. Results could
-         * still be shown even when none of them matches the condition. And
-         * results that are significantly more relevant to the search query can
-         * still trump your heavily favored but irrelevant documents.
-         *
-         * Setting to -1.0 gives the document a big demotion. However, results
-         * that are deeply relevant might still be shown. The document will have
-         * an upstream battle to get a fairly high ranking, but it is not blocked
-         * out completely.
-         *
-         * Setting to 0.0 means no boost applied. The boosting condition is
-         * ignored.
-         * 
- * - * float boost = 2; - * - * @return The boost. - */ - @java.lang.Override - public float getBoost() { - return boost_; - } - /** - * - * - *
-         * Strength of the condition boost, which should be in [-1, 1]. Negative
-         * boost means demotion. Default is 0.0.
-         *
-         * Setting to 1.0 gives the document a big promotion. However, it does not
-         * necessarily mean that the boosted document will be the top result at
-         * all times, nor that other documents will be excluded. Results could
-         * still be shown even when none of them matches the condition. And
-         * results that are significantly more relevant to the search query can
-         * still trump your heavily favored but irrelevant documents.
-         *
-         * Setting to -1.0 gives the document a big demotion. However, results
-         * that are deeply relevant might still be shown. The document will have
-         * an upstream battle to get a fairly high ranking, but it is not blocked
-         * out completely.
-         *
-         * Setting to 0.0 means no boost applied. The boosting condition is
-         * ignored.
-         * 
- * - * float boost = 2; - * - * @param value The boost to set. - * @return This builder for chaining. - */ - public Builder setBoost(float value) { + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ATTRIBUTE_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getAttributeValue().hashCode(); + hash = (37 * hash) + BOOST_AMOUNT_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getBoostAmount()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } - boost_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-         * Strength of the condition boost, which should be in [-1, 1]. Negative
-         * boost means demotion. Default is 0.0.
-         *
-         * Setting to 1.0 gives the document a big promotion. However, it does not
-         * necessarily mean that the boosted document will be the top result at
-         * all times, nor that other documents will be excluded. Results could
-         * still be shown even when none of them matches the condition. And
-         * results that are significantly more relevant to the search query can
-         * still trump your heavily favored but irrelevant documents.
-         *
-         * Setting to -1.0 gives the document a big demotion. However, results
-         * that are deeply relevant might still be shown. The document will have
-         * an upstream battle to get a fairly high ranking, but it is not blocked
-         * out completely.
-         *
-         * Setting to 0.0 means no boost applied. The boosting condition is
-         * ignored.
-         * 
- * - * float boost = 2; - * - * @return This builder for chaining. - */ - public Builder clearBoost() { - bitField0_ = (bitField0_ & ~0x00000002); - boost_ = 0F; - onChanged(); - return this; - } + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec.ControlPoint + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec.ControlPoint + parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec.ControlPoint + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec) - } + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec.ControlPoint + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec) - private static final com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec - .ConditionBoostSpec - DEFAULT_INSTANCE; + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec.ControlPoint + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - static { - DEFAULT_INSTANCE = - new com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec - .ConditionBoostSpec(); - } + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec.ControlPoint + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec - .ConditionBoostSpec - getDefaultInstance() { - return DEFAULT_INSTANCE; - } + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec.ControlPoint + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec.ControlPoint + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec.ControlPoint + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec.ControlPoint + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec.ControlPoint + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec.ControlPoint + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .BoostControlSpec.ControlPoint + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+           * The control points used to define the curve. The curve defined
+           * through these control points can only be monotonically increasing
+           * or decreasing(constant values are acceptable).
+           * 
+ * + * Protobuf type {@code + * google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint) + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .BoostControlSpec.ControlPointOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_BoostSpec_ConditionBoostSpec_BoostControlSpec_ControlPoint_descriptor; + } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { @java.lang.Override - public ConditionBoostSpec parsePartialFrom( + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_BoostSpec_ConditionBoostSpec_BoostControlSpec_ControlPoint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec.ControlPoint.class, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec.ControlPoint.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + attributeValue_ = ""; + boostAmount_ = 0F; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_BoostSpec_ConditionBoostSpec_BoostControlSpec_ControlPoint_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec.ControlPoint + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec.ControlPoint.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec.ControlPoint + build() { + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .BoostControlSpec.ControlPoint + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec.ControlPoint + buildPartial() { + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .BoostControlSpec.ControlPoint + result = + new com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec.ControlPoint(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .BoostControlSpec.ControlPoint + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.attributeValue_ = attributeValue_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.boostAmount_ = boostAmount_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec.ControlPoint) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec.ControlPoint) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .BoostControlSpec.ControlPoint + other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec.ControlPoint.getDefaultInstance()) + return this; + if (!other.getAttributeValue().isEmpty()) { + attributeValue_ = other.attributeValue_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getBoostAmount() != 0F) { + setBoostAmount(other.getBoostAmount()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - builder.mergeFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + attributeValue_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 21: + { + boostAmount_ = input.readFloat(); + bitField0_ |= 0x00000002; + break; + } // case 21 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object attributeValue_ = ""; + /** + * + * + *
+             * Can be one of:
+             * 1. The numerical field value.
+             * 2. The duration spec for freshness:
+             * The value must be formatted as an XSD `dayTimeDuration` value (a
+             * restricted subset of an ISO 8601 duration value). The pattern for
+             * this is: `[nD][T[nH][nM][nS]]`.
+             * 
+ * + * string attribute_value = 1; + * + * @return The attributeValue. + */ + public java.lang.String getAttributeValue() { + java.lang.Object ref = attributeValue_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + attributeValue_ = s; + return s; + } else { + return (java.lang.String) ref; } - return builder.buildPartial(); } - }; + /** + * + * + *
+             * Can be one of:
+             * 1. The numerical field value.
+             * 2. The duration spec for freshness:
+             * The value must be formatted as an XSD `dayTimeDuration` value (a
+             * restricted subset of an ISO 8601 duration value). The pattern for
+             * this is: `[nD][T[nH][nM][nS]]`.
+             * 
+ * + * string attribute_value = 1; + * + * @return The bytes for attributeValue. + */ + public com.google.protobuf.ByteString getAttributeValueBytes() { + java.lang.Object ref = attributeValue_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + attributeValue_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+             * Can be one of:
+             * 1. The numerical field value.
+             * 2. The duration spec for freshness:
+             * The value must be formatted as an XSD `dayTimeDuration` value (a
+             * restricted subset of an ISO 8601 duration value). The pattern for
+             * this is: `[nD][T[nH][nM][nS]]`.
+             * 
+ * + * string attribute_value = 1; + * + * @param value The attributeValue to set. + * @return This builder for chaining. + */ + public Builder setAttributeValue(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + attributeValue_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+             * Can be one of:
+             * 1. The numerical field value.
+             * 2. The duration spec for freshness:
+             * The value must be formatted as an XSD `dayTimeDuration` value (a
+             * restricted subset of an ISO 8601 duration value). The pattern for
+             * this is: `[nD][T[nH][nM][nS]]`.
+             * 
+ * + * string attribute_value = 1; + * + * @return This builder for chaining. + */ + public Builder clearAttributeValue() { + attributeValue_ = getDefaultInstance().getAttributeValue(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+             * Can be one of:
+             * 1. The numerical field value.
+             * 2. The duration spec for freshness:
+             * The value must be formatted as an XSD `dayTimeDuration` value (a
+             * restricted subset of an ISO 8601 duration value). The pattern for
+             * this is: `[nD][T[nH][nM][nS]]`.
+             * 
+ * + * string attribute_value = 1; + * + * @param value The bytes for attributeValue to set. + * @return This builder for chaining. + */ + public Builder setAttributeValueBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + attributeValue_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } - public static com.google.protobuf.Parser parser() { - return PARSER; - } + private float boostAmount_; + /** + * + * + *
+             * The value between -1 to 1 by which to boost the score if the
+             * attribute_value evaluates to the value specified above.
+             * 
+ * + * float boost_amount = 2; + * + * @return The boostAmount. + */ + @java.lang.Override + public float getBoostAmount() { + return boostAmount_; + } + /** + * + * + *
+             * The value between -1 to 1 by which to boost the score if the
+             * attribute_value evaluates to the value specified above.
+             * 
+ * + * float boost_amount = 2; + * + * @param value The boostAmount to set. + * @return This builder for chaining. + */ + public Builder setBoostAmount(float value) { + + boostAmount_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+             * The value between -1 to 1 by which to boost the score if the
+             * attribute_value evaluates to the value specified above.
+             * 
+ * + * float boost_amount = 2; + * + * @return This builder for chaining. + */ + public Builder clearBoostAmount() { + bitField0_ = (bitField0_ & ~0x00000002); + boostAmount_ = 0F; + onChanged(); + return this; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } - public static final int CONDITION_BOOST_SPECS_FIELD_NUMBER = 1; + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint) + } - @SuppressWarnings("serial") - private java.util.List< - com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec> - conditionBoostSpecs_; - /** - * - * - *
-     * Condition boost specifications. If a document matches multiple conditions
-     * in the specifictions, boost scores from these specifications are all
-     * applied and combined in a non-linear way. Maximum number of
-     * specifications is 20.
-     * 
- * - * - * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1; - * - */ - @java.lang.Override - public java.util.List< - com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec> - getConditionBoostSpecsList() { - return conditionBoostSpecs_; - } - /** - * - * - *
-     * Condition boost specifications. If a document matches multiple conditions
-     * in the specifictions, boost scores from these specifications are all
-     * applied and combined in a non-linear way. Maximum number of
-     * specifications is 20.
-     * 
- * - * - * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1; - * - */ - @java.lang.Override - public java.util.List< - ? extends - com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec - .ConditionBoostSpecOrBuilder> - getConditionBoostSpecsOrBuilderList() { - return conditionBoostSpecs_; - } - /** - * - * - *
-     * Condition boost specifications. If a document matches multiple conditions
-     * in the specifictions, boost scores from these specifications are all
-     * applied and combined in a non-linear way. Maximum number of
-     * specifications is 20.
-     * 
- * - * - * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1; - * - */ - @java.lang.Override - public int getConditionBoostSpecsCount() { - return conditionBoostSpecs_.size(); - } - /** - * - * - *
-     * Condition boost specifications. If a document matches multiple conditions
-     * in the specifictions, boost scores from these specifications are all
-     * applied and combined in a non-linear way. Maximum number of
-     * specifications is 20.
-     * 
- * - * - * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1; - * - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec - getConditionBoostSpecs(int index) { - return conditionBoostSpecs_.get(index); - } - /** - * - * - *
-     * Condition boost specifications. If a document matches multiple conditions
-     * in the specifictions, boost scores from these specifications are all
-     * applied and combined in a non-linear way. Maximum number of
-     * specifications is 20.
-     * 
- * - * - * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1; - * - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec - .ConditionBoostSpecOrBuilder - getConditionBoostSpecsOrBuilder(int index) { - return conditionBoostSpecs_.get(index); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < conditionBoostSpecs_.size(); i++) { - output.writeMessage(1, conditionBoostSpecs_.get(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint) + private static final com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec.ControlPoint + DEFAULT_INSTANCE; - size = 0; - for (int i = 0; i < conditionBoostSpecs_.size(); i++) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 1, conditionBoostSpecs_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec.ControlPoint(); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec)) { - return super.equals(obj); - } - com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec other = - (com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec) obj; + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec.ControlPoint + getDefaultInstance() { + return DEFAULT_INSTANCE; + } - if (!getConditionBoostSpecsList().equals(other.getConditionBoostSpecsList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ControlPoint parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getConditionBoostSpecsCount() > 0) { - hash = (37 * hash) + CONDITION_BOOST_SPECS_FIELD_NUMBER; - hash = (53 * hash) + getConditionBoostSpecsList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } + public static com.google.protobuf.Parser parser() { + return PARSER; + } - public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } - public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .BoostControlSpec.ControlPoint + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } - public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + public static final int FIELD_NAME_FIELD_NUMBER = 1; - public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + @SuppressWarnings("serial") + private volatile java.lang.Object fieldName_ = ""; + /** + * + * + *
+         * The name of the field whose value will be used to determine the
+         * boost amount.
+         * 
+ * + * string field_name = 1; + * + * @return The fieldName. + */ + @java.lang.Override + public java.lang.String getFieldName() { + java.lang.Object ref = fieldName_; + 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(); + fieldName_ = s; + return s; + } + } + /** + * + * + *
+         * The name of the field whose value will be used to determine the
+         * boost amount.
+         * 
+ * + * string field_name = 1; + * + * @return The bytes for fieldName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFieldNameBytes() { + java.lang.Object ref = fieldName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + fieldName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + public static final int ATTRIBUTE_TYPE_FIELD_NUMBER = 2; + private int attributeType_ = 0; + /** + * + * + *
+         * The attribute type to be used to determine the boost amount. The
+         * attribute value can be derived from the field value of the specified
+         * field_name. In the case of numerical it is straightforward i.e.
+         * attribute_value = numerical_field_value. In the case of freshness
+         * however, attribute_value = (time.now() - datetime_field_value).
+         * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.AttributeType attribute_type = 2; + * + * + * @return The enum numeric value on the wire for attributeType. + */ + @java.lang.Override + public int getAttributeTypeValue() { + return attributeType_; + } + /** + * + * + *
+         * The attribute type to be used to determine the boost amount. The
+         * attribute value can be derived from the field value of the specified
+         * field_name. In the case of numerical it is straightforward i.e.
+         * attribute_value = numerical_field_value. In the case of freshness
+         * however, attribute_value = (time.now() - datetime_field_value).
+         * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.AttributeType attribute_type = 2; + * + * + * @return The attributeType. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .BoostControlSpec.AttributeType + getAttributeType() { + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .BoostControlSpec.AttributeType + result = + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec.AttributeType.forNumber(attributeType_); + return result == null + ? com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .BoostControlSpec.AttributeType.UNRECOGNIZED + : result; + } - public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + public static final int INTERPOLATION_TYPE_FIELD_NUMBER = 3; + private int interpolationType_ = 0; + /** + * + * + *
+         * The interpolation type to be applied to connect the control points
+         * listed below.
+         * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.InterpolationType interpolation_type = 3; + * + * + * @return The enum numeric value on the wire for interpolationType. + */ + @java.lang.Override + public int getInterpolationTypeValue() { + return interpolationType_; + } + /** + * + * + *
+         * The interpolation type to be applied to connect the control points
+         * listed below.
+         * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.InterpolationType interpolation_type = 3; + * + * + * @return The interpolationType. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .BoostControlSpec.InterpolationType + getInterpolationType() { + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .BoostControlSpec.InterpolationType + result = + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec.InterpolationType.forNumber( + interpolationType_); + return result == null + ? com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .BoostControlSpec.InterpolationType.UNRECOGNIZED + : result; + } - public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } + public static final int CONTROL_POINTS_FIELD_NUMBER = 4; - public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .BoostControlSpec.ControlPoint> + controlPoints_; + /** + * + * + *
+         * The control points used to define the curve. The monotonic function
+         * (defined through the interpolation_type above) passes through the
+         * control points listed here.
+         * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint control_points = 4; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .BoostControlSpec.ControlPoint> + getControlPointsList() { + return controlPoints_; + } + /** + * + * + *
+         * The control points used to define the curve. The monotonic function
+         * (defined through the interpolation_type above) passes through the
+         * control points listed here.
+         * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint control_points = 4; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec.ControlPointOrBuilder> + getControlPointsOrBuilderList() { + return controlPoints_; + } + /** + * + * + *
+         * The control points used to define the curve. The monotonic function
+         * (defined through the interpolation_type above) passes through the
+         * control points listed here.
+         * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint control_points = 4; + * + */ + @java.lang.Override + public int getControlPointsCount() { + return controlPoints_.size(); + } + /** + * + * + *
+         * The control points used to define the curve. The monotonic function
+         * (defined through the interpolation_type above) passes through the
+         * control points listed here.
+         * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint control_points = 4; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .BoostControlSpec.ControlPoint + getControlPoints(int index) { + return controlPoints_.get(index); + } + /** + * + * + *
+         * The control points used to define the curve. The monotonic function
+         * (defined through the interpolation_type above) passes through the
+         * control points listed here.
+         * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint control_points = 4; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .BoostControlSpec.ControlPointOrBuilder + getControlPointsOrBuilder(int index) { + return controlPoints_.get(index); + } - public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } + private byte memoizedIsInitialized = -1; - public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; - public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } + memoizedIsInitialized = 1; + return true; + } - public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fieldName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, fieldName_); + } + if (attributeType_ + != com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .BoostControlSpec.AttributeType.ATTRIBUTE_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, attributeType_); + } + if (interpolationType_ + != com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .BoostControlSpec.InterpolationType.INTERPOLATION_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(3, interpolationType_); + } + for (int i = 0; i < controlPoints_.size(); i++) { + output.writeMessage(4, controlPoints_.get(i)); + } + getUnknownFields().writeTo(output); + } - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fieldName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, fieldName_); + } + if (attributeType_ + != com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .BoostControlSpec.AttributeType.ATTRIBUTE_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, attributeType_); + } + if (interpolationType_ + != com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .BoostControlSpec.InterpolationType.INTERPOLATION_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, interpolationType_); + } + for (int i = 0; i < controlPoints_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(4, controlPoints_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } - public static Builder newBuilder( - com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .BoostControlSpec)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .BoostControlSpec + other = + (com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec) + obj; - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } + if (!getFieldName().equals(other.getFieldName())) return false; + if (attributeType_ != other.attributeType_) return false; + if (interpolationType_ != other.interpolationType_) return false; + if (!getControlPointsList().equals(other.getControlPointsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-     * Boost specification to boost certain documents.
-     * 
- * - * Protobuf type {@code google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec) - com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpecOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_BoostSpec_descriptor; - } + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + FIELD_NAME_FIELD_NUMBER; + hash = (53 * hash) + getFieldName().hashCode(); + hash = (37 * hash) + ATTRIBUTE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + attributeType_; + hash = (37 * hash) + INTERPOLATION_TYPE_FIELD_NUMBER; + hash = (53 * hash) + interpolationType_; + if (getControlPointsCount() > 0) { + hash = (37 * hash) + CONTROL_POINTS_FIELD_NUMBER; + hash = (53 * hash) + getControlPointsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_BoostSpec_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.class, - com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.Builder.class); - } + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - // Construct using - // com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.newBuilder() - private Builder() {} + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec + parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (conditionBoostSpecsBuilder_ == null) { - conditionBoostSpecs_ = java.util.Collections.emptyList(); - } else { - conditionBoostSpecs_ = null; - conditionBoostSpecsBuilder_.clear(); + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); } - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_BoostSpec_descriptor; - } + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec - getDefaultInstanceForType() { - return com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec - .getDefaultInstance(); - } + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec build() { - com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - return result; - } - @java.lang.Override - public com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec buildPartial() { - com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec result = - new com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); } - onBuilt(); - return result; - } - private void buildPartialRepeatedFields( - com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec result) { - if (conditionBoostSpecsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - conditionBoostSpecs_ = java.util.Collections.unmodifiableList(conditionBoostSpecs_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.conditionBoostSpecs_ = conditionBoostSpecs_; - } else { - result.conditionBoostSpecs_ = conditionBoostSpecsBuilder_.build(); + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input); } - } - private void buildPartial0( - com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec result) { - int from_bitField0_ = bitField0_; - } + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } - @java.lang.Override - public Builder clone() { - return super.clone(); - } + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .BoostControlSpec + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec) { - return mergeFrom( - (com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec) other); - } else { - super.mergeFrom(other); - return this; + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; } - } + /** + * + * + *
+         * Specification for custom ranking based on customer specified attribute
+         * value. It provides more controls for customized ranking than the simple
+         * (condition, boost) combination above.
+         * 
+ * + * Protobuf type {@code + * google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec) + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .BoostControlSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_BoostSpec_ConditionBoostSpec_BoostControlSpec_descriptor; + } - public Builder mergeFrom( - com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec other) { - if (other - == com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec - .getDefaultInstance()) return this; - if (conditionBoostSpecsBuilder_ == null) { - if (!other.conditionBoostSpecs_.isEmpty()) { - if (conditionBoostSpecs_.isEmpty()) { - conditionBoostSpecs_ = other.conditionBoostSpecs_; - bitField0_ = (bitField0_ & ~0x00000001); + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_BoostSpec_ConditionBoostSpec_BoostControlSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec.class, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + fieldName_ = ""; + attributeType_ = 0; + interpolationType_ = 0; + if (controlPointsBuilder_ == null) { + controlPoints_ = java.util.Collections.emptyList(); } else { - ensureConditionBoostSpecsIsMutable(); - conditionBoostSpecs_.addAll(other.conditionBoostSpecs_); + controlPoints_ = null; + controlPointsBuilder_.clear(); } - onChanged(); + bitField0_ = (bitField0_ & ~0x00000008); + return this; } - } else { - if (!other.conditionBoostSpecs_.isEmpty()) { - if (conditionBoostSpecsBuilder_.isEmpty()) { - conditionBoostSpecsBuilder_.dispose(); - conditionBoostSpecsBuilder_ = null; - conditionBoostSpecs_ = other.conditionBoostSpecs_; - bitField0_ = (bitField0_ & ~0x00000001); - conditionBoostSpecsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getConditionBoostSpecsFieldBuilder() - : null; - } else { - conditionBoostSpecsBuilder_.addAllMessages(other.conditionBoostSpecs_); + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_BoostSpec_ConditionBoostSpec_BoostControlSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .BoostControlSpec + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .BoostControlSpec + build() { + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .BoostControlSpec + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); } + return result; } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - @java.lang.Override - public final boolean isInitialized() { - return true; - } + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .BoostControlSpec + buildPartial() { + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .BoostControlSpec + result = + new com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec - .ConditionBoostSpec - m = - input.readMessage( - com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec - .ConditionBoostSpec.parser(), - extensionRegistry); - if (conditionBoostSpecsBuilder_ == null) { - ensureConditionBoostSpecsIsMutable(); - conditionBoostSpecs_.add(m); - } else { - conditionBoostSpecsBuilder_.addMessage(m); - } - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } + private void buildPartialRepeatedFields( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .BoostControlSpec + result) { + if (controlPointsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + controlPoints_ = java.util.Collections.unmodifiableList(controlPoints_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.controlPoints_ = controlPoints_; + } else { + result.controlPoints_ = controlPointsBuilder_.build(); + } + } - private int bitField0_; + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .BoostControlSpec + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.fieldName_ = fieldName_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.attributeType_ = attributeType_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.interpolationType_ = interpolationType_; + } + } - private java.util.List< - com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec> - conditionBoostSpecs_ = java.util.Collections.emptyList(); + @java.lang.Override + public Builder clone() { + return super.clone(); + } - private void ensureConditionBoostSpecsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - conditionBoostSpecs_ = - new java.util.ArrayList< - com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec - .ConditionBoostSpec>(conditionBoostSpecs_); - bitField0_ |= 0x00000001; - } - } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec, - com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec - .Builder, - com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec - .ConditionBoostSpecOrBuilder> - conditionBoostSpecsBuilder_; + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } - /** - * - * - *
-       * Condition boost specifications. If a document matches multiple conditions
-       * in the specifictions, boost scores from these specifications are all
-       * applied and combined in a non-linear way. Maximum number of
-       * specifications is 20.
-       * 
- * - * - * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1; - * - */ - public java.util.List< - com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec> - getConditionBoostSpecsList() { - if (conditionBoostSpecsBuilder_ == null) { - return java.util.Collections.unmodifiableList(conditionBoostSpecs_); - } else { - return conditionBoostSpecsBuilder_.getMessageList(); - } - } - /** - * - * - *
-       * Condition boost specifications. If a document matches multiple conditions
-       * in the specifictions, boost scores from these specifications are all
-       * applied and combined in a non-linear way. Maximum number of
-       * specifications is 20.
-       * 
- * - * - * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1; - * - */ - public int getConditionBoostSpecsCount() { - if (conditionBoostSpecsBuilder_ == null) { - return conditionBoostSpecs_.size(); - } else { - return conditionBoostSpecsBuilder_.getCount(); - } - } - /** - * - * - *
-       * Condition boost specifications. If a document matches multiple conditions
-       * in the specifictions, boost scores from these specifications are all
-       * applied and combined in a non-linear way. Maximum number of
-       * specifications is 20.
-       * 
- * - * - * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1; - * - */ - public com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec - getConditionBoostSpecs(int index) { - if (conditionBoostSpecsBuilder_ == null) { - return conditionBoostSpecs_.get(index); - } else { - return conditionBoostSpecsBuilder_.getMessage(index); - } - } - /** - * - * - *
-       * Condition boost specifications. If a document matches multiple conditions
-       * in the specifictions, boost scores from these specifications are all
-       * applied and combined in a non-linear way. Maximum number of
-       * specifications is 20.
-       * 
- * - * - * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1; - * - */ - public Builder setConditionBoostSpecs( - int index, - com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec - value) { - if (conditionBoostSpecsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); } - ensureConditionBoostSpecsIsMutable(); - conditionBoostSpecs_.set(index, value); - onChanged(); - } else { - conditionBoostSpecsBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-       * Condition boost specifications. If a document matches multiple conditions
-       * in the specifictions, boost scores from these specifications are all
-       * applied and combined in a non-linear way. Maximum number of
-       * specifications is 20.
-       * 
- * - * - * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1; - * - */ - public Builder setConditionBoostSpecs( - int index, - com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec - .Builder - builderForValue) { - if (conditionBoostSpecsBuilder_ == null) { - ensureConditionBoostSpecsIsMutable(); - conditionBoostSpecs_.set(index, builderForValue.build()); - onChanged(); - } else { - conditionBoostSpecsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-       * Condition boost specifications. If a document matches multiple conditions
-       * in the specifictions, boost scores from these specifications are all
-       * applied and combined in a non-linear way. Maximum number of
-       * specifications is 20.
-       * 
- * - * - * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1; - * - */ - public Builder addConditionBoostSpecs( - com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec - value) { - if (conditionBoostSpecsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); } - ensureConditionBoostSpecsIsMutable(); - conditionBoostSpecs_.add(value); - onChanged(); - } else { - conditionBoostSpecsBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-       * Condition boost specifications. If a document matches multiple conditions
-       * in the specifictions, boost scores from these specifications are all
-       * applied and combined in a non-linear way. Maximum number of
-       * specifications is 20.
+
+          @java.lang.Override
+          public Builder addRepeatedField(
+              com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
+            return super.addRepeatedField(field, value);
+          }
+
+          @java.lang.Override
+          public Builder mergeFrom(com.google.protobuf.Message other) {
+            if (other
+                instanceof
+                com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec
+                    .BoostControlSpec) {
+              return mergeFrom(
+                  (com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec
+                          .ConditionBoostSpec.BoostControlSpec)
+                      other);
+            } else {
+              super.mergeFrom(other);
+              return this;
+            }
+          }
+
+          public Builder mergeFrom(
+              com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec
+                      .BoostControlSpec
+                  other) {
+            if (other
+                == com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec
+                    .ConditionBoostSpec.BoostControlSpec.getDefaultInstance()) return this;
+            if (!other.getFieldName().isEmpty()) {
+              fieldName_ = other.fieldName_;
+              bitField0_ |= 0x00000001;
+              onChanged();
+            }
+            if (other.attributeType_ != 0) {
+              setAttributeTypeValue(other.getAttributeTypeValue());
+            }
+            if (other.interpolationType_ != 0) {
+              setInterpolationTypeValue(other.getInterpolationTypeValue());
+            }
+            if (controlPointsBuilder_ == null) {
+              if (!other.controlPoints_.isEmpty()) {
+                if (controlPoints_.isEmpty()) {
+                  controlPoints_ = other.controlPoints_;
+                  bitField0_ = (bitField0_ & ~0x00000008);
+                } else {
+                  ensureControlPointsIsMutable();
+                  controlPoints_.addAll(other.controlPoints_);
+                }
+                onChanged();
+              }
+            } else {
+              if (!other.controlPoints_.isEmpty()) {
+                if (controlPointsBuilder_.isEmpty()) {
+                  controlPointsBuilder_.dispose();
+                  controlPointsBuilder_ = null;
+                  controlPoints_ = other.controlPoints_;
+                  bitField0_ = (bitField0_ & ~0x00000008);
+                  controlPointsBuilder_ =
+                      com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
+                          ? getControlPointsFieldBuilder()
+                          : null;
+                } else {
+                  controlPointsBuilder_.addAllMessages(other.controlPoints_);
+                }
+              }
+            }
+            this.mergeUnknownFields(other.getUnknownFields());
+            onChanged();
+            return this;
+          }
+
+          @java.lang.Override
+          public final boolean isInitialized() {
+            return true;
+          }
+
+          @java.lang.Override
+          public Builder mergeFrom(
+              com.google.protobuf.CodedInputStream input,
+              com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+              throws java.io.IOException {
+            if (extensionRegistry == null) {
+              throw new java.lang.NullPointerException();
+            }
+            try {
+              boolean done = false;
+              while (!done) {
+                int tag = input.readTag();
+                switch (tag) {
+                  case 0:
+                    done = true;
+                    break;
+                  case 10:
+                    {
+                      fieldName_ = input.readStringRequireUtf8();
+                      bitField0_ |= 0x00000001;
+                      break;
+                    } // case 10
+                  case 16:
+                    {
+                      attributeType_ = input.readEnum();
+                      bitField0_ |= 0x00000002;
+                      break;
+                    } // case 16
+                  case 24:
+                    {
+                      interpolationType_ = input.readEnum();
+                      bitField0_ |= 0x00000004;
+                      break;
+                    } // case 24
+                  case 34:
+                    {
+                      com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec
+                              .ConditionBoostSpec.BoostControlSpec.ControlPoint
+                          m =
+                              input.readMessage(
+                                  com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec
+                                      .ConditionBoostSpec.BoostControlSpec.ControlPoint.parser(),
+                                  extensionRegistry);
+                      if (controlPointsBuilder_ == null) {
+                        ensureControlPointsIsMutable();
+                        controlPoints_.add(m);
+                      } else {
+                        controlPointsBuilder_.addMessage(m);
+                      }
+                      break;
+                    } // case 34
+                  default:
+                    {
+                      if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                        done = true; // was an endgroup tag
+                      }
+                      break;
+                    } // default:
+                } // switch (tag)
+              } // while (!done)
+            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+              throw e.unwrapIOException();
+            } finally {
+              onChanged();
+            } // finally
+            return this;
+          }
+
+          private int bitField0_;
+
+          private java.lang.Object fieldName_ = "";
+          /**
+           *
+           *
+           * 
+           * The name of the field whose value will be used to determine the
+           * boost amount.
+           * 
+ * + * string field_name = 1; + * + * @return The fieldName. + */ + public java.lang.String getFieldName() { + java.lang.Object ref = fieldName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fieldName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+           * The name of the field whose value will be used to determine the
+           * boost amount.
+           * 
+ * + * string field_name = 1; + * + * @return The bytes for fieldName. + */ + public com.google.protobuf.ByteString getFieldNameBytes() { + java.lang.Object ref = fieldName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + fieldName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+           * The name of the field whose value will be used to determine the
+           * boost amount.
+           * 
+ * + * string field_name = 1; + * + * @param value The fieldName to set. + * @return This builder for chaining. + */ + public Builder setFieldName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + fieldName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+           * The name of the field whose value will be used to determine the
+           * boost amount.
+           * 
+ * + * string field_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearFieldName() { + fieldName_ = getDefaultInstance().getFieldName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+           * The name of the field whose value will be used to determine the
+           * boost amount.
+           * 
+ * + * string field_name = 1; + * + * @param value The bytes for fieldName to set. + * @return This builder for chaining. + */ + public Builder setFieldNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + fieldName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int attributeType_ = 0; + /** + * + * + *
+           * The attribute type to be used to determine the boost amount. The
+           * attribute value can be derived from the field value of the specified
+           * field_name. In the case of numerical it is straightforward i.e.
+           * attribute_value = numerical_field_value. In the case of freshness
+           * however, attribute_value = (time.now() - datetime_field_value).
+           * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.AttributeType attribute_type = 2; + * + * + * @return The enum numeric value on the wire for attributeType. + */ + @java.lang.Override + public int getAttributeTypeValue() { + return attributeType_; + } + /** + * + * + *
+           * The attribute type to be used to determine the boost amount. The
+           * attribute value can be derived from the field value of the specified
+           * field_name. In the case of numerical it is straightforward i.e.
+           * attribute_value = numerical_field_value. In the case of freshness
+           * however, attribute_value = (time.now() - datetime_field_value).
+           * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.AttributeType attribute_type = 2; + * + * + * @param value The enum numeric value on the wire for attributeType to set. + * @return This builder for chaining. + */ + public Builder setAttributeTypeValue(int value) { + attributeType_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+           * The attribute type to be used to determine the boost amount. The
+           * attribute value can be derived from the field value of the specified
+           * field_name. In the case of numerical it is straightforward i.e.
+           * attribute_value = numerical_field_value. In the case of freshness
+           * however, attribute_value = (time.now() - datetime_field_value).
+           * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.AttributeType attribute_type = 2; + * + * + * @return The attributeType. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .BoostControlSpec.AttributeType + getAttributeType() { + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .BoostControlSpec.AttributeType + result = + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec.AttributeType.forNumber( + attributeType_); + return result == null + ? com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec.AttributeType.UNRECOGNIZED + : result; + } + /** + * + * + *
+           * The attribute type to be used to determine the boost amount. The
+           * attribute value can be derived from the field value of the specified
+           * field_name. In the case of numerical it is straightforward i.e.
+           * attribute_value = numerical_field_value. In the case of freshness
+           * however, attribute_value = (time.now() - datetime_field_value).
+           * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.AttributeType attribute_type = 2; + * + * + * @param value The attributeType to set. + * @return This builder for chaining. + */ + public Builder setAttributeType( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .BoostControlSpec.AttributeType + value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + attributeType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+           * The attribute type to be used to determine the boost amount. The
+           * attribute value can be derived from the field value of the specified
+           * field_name. In the case of numerical it is straightforward i.e.
+           * attribute_value = numerical_field_value. In the case of freshness
+           * however, attribute_value = (time.now() - datetime_field_value).
+           * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.AttributeType attribute_type = 2; + * + * + * @return This builder for chaining. + */ + public Builder clearAttributeType() { + bitField0_ = (bitField0_ & ~0x00000002); + attributeType_ = 0; + onChanged(); + return this; + } + + private int interpolationType_ = 0; + /** + * + * + *
+           * The interpolation type to be applied to connect the control points
+           * listed below.
+           * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.InterpolationType interpolation_type = 3; + * + * + * @return The enum numeric value on the wire for interpolationType. + */ + @java.lang.Override + public int getInterpolationTypeValue() { + return interpolationType_; + } + /** + * + * + *
+           * The interpolation type to be applied to connect the control points
+           * listed below.
+           * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.InterpolationType interpolation_type = 3; + * + * + * @param value The enum numeric value on the wire for interpolationType to set. + * @return This builder for chaining. + */ + public Builder setInterpolationTypeValue(int value) { + interpolationType_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+           * The interpolation type to be applied to connect the control points
+           * listed below.
+           * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.InterpolationType interpolation_type = 3; + * + * + * @return The interpolationType. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .BoostControlSpec.InterpolationType + getInterpolationType() { + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .BoostControlSpec.InterpolationType + result = + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec.InterpolationType.forNumber( + interpolationType_); + return result == null + ? com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec.InterpolationType.UNRECOGNIZED + : result; + } + /** + * + * + *
+           * The interpolation type to be applied to connect the control points
+           * listed below.
+           * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.InterpolationType interpolation_type = 3; + * + * + * @param value The interpolationType to set. + * @return This builder for chaining. + */ + public Builder setInterpolationType( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .BoostControlSpec.InterpolationType + value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + interpolationType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+           * The interpolation type to be applied to connect the control points
+           * listed below.
+           * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.InterpolationType interpolation_type = 3; + * + * + * @return This builder for chaining. + */ + public Builder clearInterpolationType() { + bitField0_ = (bitField0_ & ~0x00000004); + interpolationType_ = 0; + onChanged(); + return this; + } + + private java.util.List< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec.ControlPoint> + controlPoints_ = java.util.Collections.emptyList(); + + private void ensureControlPointsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + controlPoints_ = + new java.util.ArrayList< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec.ControlPoint>(controlPoints_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec.ControlPoint, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec.ControlPoint.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec.ControlPointOrBuilder> + controlPointsBuilder_; + + /** + * + * + *
+           * The control points used to define the curve. The monotonic function
+           * (defined through the interpolation_type above) passes through the
+           * control points listed here.
+           * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint control_points = 4; + * + */ + public java.util.List< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec.ControlPoint> + getControlPointsList() { + if (controlPointsBuilder_ == null) { + return java.util.Collections.unmodifiableList(controlPoints_); + } else { + return controlPointsBuilder_.getMessageList(); + } + } + /** + * + * + *
+           * The control points used to define the curve. The monotonic function
+           * (defined through the interpolation_type above) passes through the
+           * control points listed here.
+           * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint control_points = 4; + * + */ + public int getControlPointsCount() { + if (controlPointsBuilder_ == null) { + return controlPoints_.size(); + } else { + return controlPointsBuilder_.getCount(); + } + } + /** + * + * + *
+           * The control points used to define the curve. The monotonic function
+           * (defined through the interpolation_type above) passes through the
+           * control points listed here.
+           * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint control_points = 4; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .BoostControlSpec.ControlPoint + getControlPoints(int index) { + if (controlPointsBuilder_ == null) { + return controlPoints_.get(index); + } else { + return controlPointsBuilder_.getMessage(index); + } + } + /** + * + * + *
+           * The control points used to define the curve. The monotonic function
+           * (defined through the interpolation_type above) passes through the
+           * control points listed here.
+           * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint control_points = 4; + * + */ + public Builder setControlPoints( + int index, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .BoostControlSpec.ControlPoint + value) { + if (controlPointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureControlPointsIsMutable(); + controlPoints_.set(index, value); + onChanged(); + } else { + controlPointsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+           * The control points used to define the curve. The monotonic function
+           * (defined through the interpolation_type above) passes through the
+           * control points listed here.
+           * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint control_points = 4; + * + */ + public Builder setControlPoints( + int index, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .BoostControlSpec.ControlPoint.Builder + builderForValue) { + if (controlPointsBuilder_ == null) { + ensureControlPointsIsMutable(); + controlPoints_.set(index, builderForValue.build()); + onChanged(); + } else { + controlPointsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+           * The control points used to define the curve. The monotonic function
+           * (defined through the interpolation_type above) passes through the
+           * control points listed here.
+           * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint control_points = 4; + * + */ + public Builder addControlPoints( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .BoostControlSpec.ControlPoint + value) { + if (controlPointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureControlPointsIsMutable(); + controlPoints_.add(value); + onChanged(); + } else { + controlPointsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+           * The control points used to define the curve. The monotonic function
+           * (defined through the interpolation_type above) passes through the
+           * control points listed here.
+           * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint control_points = 4; + * + */ + public Builder addControlPoints( + int index, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .BoostControlSpec.ControlPoint + value) { + if (controlPointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureControlPointsIsMutable(); + controlPoints_.add(index, value); + onChanged(); + } else { + controlPointsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+           * The control points used to define the curve. The monotonic function
+           * (defined through the interpolation_type above) passes through the
+           * control points listed here.
+           * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint control_points = 4; + * + */ + public Builder addControlPoints( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .BoostControlSpec.ControlPoint.Builder + builderForValue) { + if (controlPointsBuilder_ == null) { + ensureControlPointsIsMutable(); + controlPoints_.add(builderForValue.build()); + onChanged(); + } else { + controlPointsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+           * The control points used to define the curve. The monotonic function
+           * (defined through the interpolation_type above) passes through the
+           * control points listed here.
+           * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint control_points = 4; + * + */ + public Builder addControlPoints( + int index, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .BoostControlSpec.ControlPoint.Builder + builderForValue) { + if (controlPointsBuilder_ == null) { + ensureControlPointsIsMutable(); + controlPoints_.add(index, builderForValue.build()); + onChanged(); + } else { + controlPointsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+           * The control points used to define the curve. The monotonic function
+           * (defined through the interpolation_type above) passes through the
+           * control points listed here.
+           * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint control_points = 4; + * + */ + public Builder addAllControlPoints( + java.lang.Iterable< + ? extends + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec.ControlPoint> + values) { + if (controlPointsBuilder_ == null) { + ensureControlPointsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, controlPoints_); + onChanged(); + } else { + controlPointsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+           * The control points used to define the curve. The monotonic function
+           * (defined through the interpolation_type above) passes through the
+           * control points listed here.
+           * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint control_points = 4; + * + */ + public Builder clearControlPoints() { + if (controlPointsBuilder_ == null) { + controlPoints_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + controlPointsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+           * The control points used to define the curve. The monotonic function
+           * (defined through the interpolation_type above) passes through the
+           * control points listed here.
+           * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint control_points = 4; + * + */ + public Builder removeControlPoints(int index) { + if (controlPointsBuilder_ == null) { + ensureControlPointsIsMutable(); + controlPoints_.remove(index); + onChanged(); + } else { + controlPointsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+           * The control points used to define the curve. The monotonic function
+           * (defined through the interpolation_type above) passes through the
+           * control points listed here.
+           * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint control_points = 4; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .BoostControlSpec.ControlPoint.Builder + getControlPointsBuilder(int index) { + return getControlPointsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+           * The control points used to define the curve. The monotonic function
+           * (defined through the interpolation_type above) passes through the
+           * control points listed here.
+           * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint control_points = 4; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .BoostControlSpec.ControlPointOrBuilder + getControlPointsOrBuilder(int index) { + if (controlPointsBuilder_ == null) { + return controlPoints_.get(index); + } else { + return controlPointsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+           * The control points used to define the curve. The monotonic function
+           * (defined through the interpolation_type above) passes through the
+           * control points listed here.
+           * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint control_points = 4; + * + */ + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec.ControlPointOrBuilder> + getControlPointsOrBuilderList() { + if (controlPointsBuilder_ != null) { + return controlPointsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(controlPoints_); + } + } + /** + * + * + *
+           * The control points used to define the curve. The monotonic function
+           * (defined through the interpolation_type above) passes through the
+           * control points listed here.
+           * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint control_points = 4; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .BoostControlSpec.ControlPoint.Builder + addControlPointsBuilder() { + return getControlPointsFieldBuilder() + .addBuilder( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec.ControlPoint.getDefaultInstance()); + } + /** + * + * + *
+           * The control points used to define the curve. The monotonic function
+           * (defined through the interpolation_type above) passes through the
+           * control points listed here.
+           * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint control_points = 4; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .BoostControlSpec.ControlPoint.Builder + addControlPointsBuilder(int index) { + return getControlPointsFieldBuilder() + .addBuilder( + index, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec.ControlPoint.getDefaultInstance()); + } + /** + * + * + *
+           * The control points used to define the curve. The monotonic function
+           * (defined through the interpolation_type above) passes through the
+           * control points listed here.
+           * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint control_points = 4; + * + */ + public java.util.List< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec.ControlPoint.Builder> + getControlPointsBuilderList() { + return getControlPointsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec.ControlPoint, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec.ControlPoint.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec.ControlPointOrBuilder> + getControlPointsFieldBuilder() { + if (controlPointsBuilder_ == null) { + controlPointsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec.ControlPoint, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec.ControlPoint.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec.ControlPointOrBuilder>( + controlPoints_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + controlPoints_ = null; + } + return controlPointsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec) + private static final com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec(); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BoostControlSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .BoostControlSpec + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int CONDITION_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object condition_ = ""; + /** + * + * + *
+       * An expression which specifies a boost condition. The syntax and
+       * supported fields are the same as a filter expression. See
+       * [SearchRequest.filter][google.cloud.discoveryengine.v1alpha.SearchRequest.filter]
+       * for detail syntax and limitations.
+       *
+       * Examples:
+       *
+       * * To boost documents with document ID "doc_1" or "doc_2", and
+       * color "Red" or "Blue":
+       * `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))`
+       * 
+ * + * string condition = 1; + * + * @return The condition. + */ + @java.lang.Override + public java.lang.String getCondition() { + java.lang.Object ref = condition_; + 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(); + condition_ = s; + return s; + } + } + /** + * + * + *
+       * An expression which specifies a boost condition. The syntax and
+       * supported fields are the same as a filter expression. See
+       * [SearchRequest.filter][google.cloud.discoveryengine.v1alpha.SearchRequest.filter]
+       * for detail syntax and limitations.
+       *
+       * Examples:
+       *
+       * * To boost documents with document ID "doc_1" or "doc_2", and
+       * color "Red" or "Blue":
+       * `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))`
+       * 
+ * + * string condition = 1; + * + * @return The bytes for condition. + */ + @java.lang.Override + public com.google.protobuf.ByteString getConditionBytes() { + java.lang.Object ref = condition_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + condition_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BOOST_FIELD_NUMBER = 2; + private float boost_ = 0F; + /** + * + * + *
+       * Strength of the condition boost, which should be in [-1, 1]. Negative
+       * boost means demotion. Default is 0.0.
+       *
+       * Setting to 1.0 gives the document a big promotion. However, it does
+       * not necessarily mean that the boosted document will be the top result
+       * at all times, nor that other documents will be excluded. Results
+       * could still be shown even when none of them matches the condition.
+       * And results that are significantly more relevant to the search query
+       * can still trump your heavily favored but irrelevant documents.
+       *
+       * Setting to -1.0 gives the document a big demotion. However, results
+       * that are deeply relevant might still be shown. The document will have
+       * an upstream battle to get a fairly high ranking, but it is not
+       * blocked out completely.
+       *
+       * Setting to 0.0 means no boost applied. The boosting condition is
+       * ignored. Only one of the (condition, boost) combination or the
+       * boost_control_spec below are set. If both are set then the global boost
+       * is ignored and the more fine-grained boost_control_spec is applied.
+       * 
+ * + * float boost = 2; + * + * @return The boost. + */ + @java.lang.Override + public float getBoost() { + return boost_; + } + + public static final int BOOST_CONTROL_SPEC_FIELD_NUMBER = 3; + private com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .BoostControlSpec + boostControlSpec_; + /** + * + * + *
+       * Complex specification for custom ranking based on customer defined
+       * attribute value.
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec boost_control_spec = 3; + * + * + * @return Whether the boostControlSpec field is set. + */ + @java.lang.Override + public boolean hasBoostControlSpec() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+       * Complex specification for custom ranking based on customer defined
+       * attribute value.
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec boost_control_spec = 3; + * + * + * @return The boostControlSpec. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .BoostControlSpec + getBoostControlSpec() { + return boostControlSpec_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .BoostControlSpec.getDefaultInstance() + : boostControlSpec_; + } + /** + * + * + *
+       * Complex specification for custom ranking based on customer defined
+       * attribute value.
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec boost_control_spec = 3; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .BoostControlSpecOrBuilder + getBoostControlSpecOrBuilder() { + return boostControlSpec_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .BoostControlSpec.getDefaultInstance() + : boostControlSpec_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(condition_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, condition_); + } + if (java.lang.Float.floatToRawIntBits(boost_) != 0) { + output.writeFloat(2, boost_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getBoostControlSpec()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(condition_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, condition_); + } + if (java.lang.Float.floatToRawIntBits(boost_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, boost_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(3, getBoostControlSpec()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec other = + (com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec) + obj; + + if (!getCondition().equals(other.getCondition())) return false; + if (java.lang.Float.floatToIntBits(getBoost()) + != java.lang.Float.floatToIntBits(other.getBoost())) return false; + if (hasBoostControlSpec() != other.hasBoostControlSpec()) return false; + if (hasBoostControlSpec()) { + if (!getBoostControlSpec().equals(other.getBoostControlSpec())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CONDITION_FIELD_NUMBER; + hash = (53 * hash) + getCondition().hashCode(); + hash = (37 * hash) + BOOST_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getBoost()); + if (hasBoostControlSpec()) { + hash = (37 * hash) + BOOST_CONTROL_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getBoostControlSpec().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * Boost applies to documents which match a condition.
+       * 
+ * + * Protobuf type {@code + * google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec) + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_BoostSpec_ConditionBoostSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_BoostSpec_ConditionBoostSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.class, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getBoostControlSpecFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + condition_ = ""; + boost_ = 0F; + boostControlSpec_ = null; + if (boostControlSpecBuilder_ != null) { + boostControlSpecBuilder_.dispose(); + boostControlSpecBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_BoostSpec_ConditionBoostSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + build() { + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + buildPartial() { + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + result = + new com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.condition_ = condition_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.boost_ = boost_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.boostControlSpec_ = + boostControlSpecBuilder_ == null + ? boostControlSpec_ + : boostControlSpecBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .getDefaultInstance()) return this; + if (!other.getCondition().isEmpty()) { + condition_ = other.condition_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getBoost() != 0F) { + setBoost(other.getBoost()); + } + if (other.hasBoostControlSpec()) { + mergeBoostControlSpec(other.getBoostControlSpec()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + condition_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 21: + { + boost_ = input.readFloat(); + bitField0_ |= 0x00000002; + break; + } // case 21 + case 26: + { + input.readMessage( + getBoostControlSpecFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object condition_ = ""; + /** + * + * + *
+         * An expression which specifies a boost condition. The syntax and
+         * supported fields are the same as a filter expression. See
+         * [SearchRequest.filter][google.cloud.discoveryengine.v1alpha.SearchRequest.filter]
+         * for detail syntax and limitations.
+         *
+         * Examples:
+         *
+         * * To boost documents with document ID "doc_1" or "doc_2", and
+         * color "Red" or "Blue":
+         * `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))`
+         * 
+ * + * string condition = 1; + * + * @return The condition. + */ + public java.lang.String getCondition() { + java.lang.Object ref = condition_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + condition_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * An expression which specifies a boost condition. The syntax and
+         * supported fields are the same as a filter expression. See
+         * [SearchRequest.filter][google.cloud.discoveryengine.v1alpha.SearchRequest.filter]
+         * for detail syntax and limitations.
+         *
+         * Examples:
+         *
+         * * To boost documents with document ID "doc_1" or "doc_2", and
+         * color "Red" or "Blue":
+         * `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))`
+         * 
+ * + * string condition = 1; + * + * @return The bytes for condition. + */ + public com.google.protobuf.ByteString getConditionBytes() { + java.lang.Object ref = condition_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + condition_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * An expression which specifies a boost condition. The syntax and
+         * supported fields are the same as a filter expression. See
+         * [SearchRequest.filter][google.cloud.discoveryengine.v1alpha.SearchRequest.filter]
+         * for detail syntax and limitations.
+         *
+         * Examples:
+         *
+         * * To boost documents with document ID "doc_1" or "doc_2", and
+         * color "Red" or "Blue":
+         * `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))`
+         * 
+ * + * string condition = 1; + * + * @param value The condition to set. + * @return This builder for chaining. + */ + public Builder setCondition(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + condition_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * An expression which specifies a boost condition. The syntax and
+         * supported fields are the same as a filter expression. See
+         * [SearchRequest.filter][google.cloud.discoveryengine.v1alpha.SearchRequest.filter]
+         * for detail syntax and limitations.
+         *
+         * Examples:
+         *
+         * * To boost documents with document ID "doc_1" or "doc_2", and
+         * color "Red" or "Blue":
+         * `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))`
+         * 
+ * + * string condition = 1; + * + * @return This builder for chaining. + */ + public Builder clearCondition() { + condition_ = getDefaultInstance().getCondition(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+         * An expression which specifies a boost condition. The syntax and
+         * supported fields are the same as a filter expression. See
+         * [SearchRequest.filter][google.cloud.discoveryengine.v1alpha.SearchRequest.filter]
+         * for detail syntax and limitations.
+         *
+         * Examples:
+         *
+         * * To boost documents with document ID "doc_1" or "doc_2", and
+         * color "Red" or "Blue":
+         * `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))`
+         * 
+ * + * string condition = 1; + * + * @param value The bytes for condition to set. + * @return This builder for chaining. + */ + public Builder setConditionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + condition_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private float boost_; + /** + * + * + *
+         * Strength of the condition boost, which should be in [-1, 1]. Negative
+         * boost means demotion. Default is 0.0.
+         *
+         * Setting to 1.0 gives the document a big promotion. However, it does
+         * not necessarily mean that the boosted document will be the top result
+         * at all times, nor that other documents will be excluded. Results
+         * could still be shown even when none of them matches the condition.
+         * And results that are significantly more relevant to the search query
+         * can still trump your heavily favored but irrelevant documents.
+         *
+         * Setting to -1.0 gives the document a big demotion. However, results
+         * that are deeply relevant might still be shown. The document will have
+         * an upstream battle to get a fairly high ranking, but it is not
+         * blocked out completely.
+         *
+         * Setting to 0.0 means no boost applied. The boosting condition is
+         * ignored. Only one of the (condition, boost) combination or the
+         * boost_control_spec below are set. If both are set then the global boost
+         * is ignored and the more fine-grained boost_control_spec is applied.
+         * 
+ * + * float boost = 2; + * + * @return The boost. + */ + @java.lang.Override + public float getBoost() { + return boost_; + } + /** + * + * + *
+         * Strength of the condition boost, which should be in [-1, 1]. Negative
+         * boost means demotion. Default is 0.0.
+         *
+         * Setting to 1.0 gives the document a big promotion. However, it does
+         * not necessarily mean that the boosted document will be the top result
+         * at all times, nor that other documents will be excluded. Results
+         * could still be shown even when none of them matches the condition.
+         * And results that are significantly more relevant to the search query
+         * can still trump your heavily favored but irrelevant documents.
+         *
+         * Setting to -1.0 gives the document a big demotion. However, results
+         * that are deeply relevant might still be shown. The document will have
+         * an upstream battle to get a fairly high ranking, but it is not
+         * blocked out completely.
+         *
+         * Setting to 0.0 means no boost applied. The boosting condition is
+         * ignored. Only one of the (condition, boost) combination or the
+         * boost_control_spec below are set. If both are set then the global boost
+         * is ignored and the more fine-grained boost_control_spec is applied.
+         * 
+ * + * float boost = 2; + * + * @param value The boost to set. + * @return This builder for chaining. + */ + public Builder setBoost(float value) { + + boost_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * Strength of the condition boost, which should be in [-1, 1]. Negative
+         * boost means demotion. Default is 0.0.
+         *
+         * Setting to 1.0 gives the document a big promotion. However, it does
+         * not necessarily mean that the boosted document will be the top result
+         * at all times, nor that other documents will be excluded. Results
+         * could still be shown even when none of them matches the condition.
+         * And results that are significantly more relevant to the search query
+         * can still trump your heavily favored but irrelevant documents.
+         *
+         * Setting to -1.0 gives the document a big demotion. However, results
+         * that are deeply relevant might still be shown. The document will have
+         * an upstream battle to get a fairly high ranking, but it is not
+         * blocked out completely.
+         *
+         * Setting to 0.0 means no boost applied. The boosting condition is
+         * ignored. Only one of the (condition, boost) combination or the
+         * boost_control_spec below are set. If both are set then the global boost
+         * is ignored and the more fine-grained boost_control_spec is applied.
+         * 
+ * + * float boost = 2; + * + * @return This builder for chaining. + */ + public Builder clearBoost() { + bitField0_ = (bitField0_ & ~0x00000002); + boost_ = 0F; + onChanged(); + return this; + } + + private com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .BoostControlSpec + boostControlSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .BoostControlSpec, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .BoostControlSpec.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .BoostControlSpecOrBuilder> + boostControlSpecBuilder_; + /** + * + * + *
+         * Complex specification for custom ranking based on customer defined
+         * attribute value.
+         * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec boost_control_spec = 3; + * + * + * @return Whether the boostControlSpec field is set. + */ + public boolean hasBoostControlSpec() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+         * Complex specification for custom ranking based on customer defined
+         * attribute value.
+         * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec boost_control_spec = 3; + * + * + * @return The boostControlSpec. + */ + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .BoostControlSpec + getBoostControlSpec() { + if (boostControlSpecBuilder_ == null) { + return boostControlSpec_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec.getDefaultInstance() + : boostControlSpec_; + } else { + return boostControlSpecBuilder_.getMessage(); + } + } + /** + * + * + *
+         * Complex specification for custom ranking based on customer defined
+         * attribute value.
+         * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec boost_control_spec = 3; + * + */ + public Builder setBoostControlSpec( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .BoostControlSpec + value) { + if (boostControlSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + boostControlSpec_ = value; + } else { + boostControlSpecBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+         * Complex specification for custom ranking based on customer defined
+         * attribute value.
+         * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec boost_control_spec = 3; + * + */ + public Builder setBoostControlSpec( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .BoostControlSpec.Builder + builderForValue) { + if (boostControlSpecBuilder_ == null) { + boostControlSpec_ = builderForValue.build(); + } else { + boostControlSpecBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+         * Complex specification for custom ranking based on customer defined
+         * attribute value.
+         * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec boost_control_spec = 3; + * + */ + public Builder mergeBoostControlSpec( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .BoostControlSpec + value) { + if (boostControlSpecBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && boostControlSpec_ != null + && boostControlSpec_ + != com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec.getDefaultInstance()) { + getBoostControlSpecBuilder().mergeFrom(value); + } else { + boostControlSpec_ = value; + } + } else { + boostControlSpecBuilder_.mergeFrom(value); + } + if (boostControlSpec_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+         * Complex specification for custom ranking based on customer defined
+         * attribute value.
+         * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec boost_control_spec = 3; + * + */ + public Builder clearBoostControlSpec() { + bitField0_ = (bitField0_ & ~0x00000004); + boostControlSpec_ = null; + if (boostControlSpecBuilder_ != null) { + boostControlSpecBuilder_.dispose(); + boostControlSpecBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+         * Complex specification for custom ranking based on customer defined
+         * attribute value.
+         * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec boost_control_spec = 3; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .BoostControlSpec.Builder + getBoostControlSpecBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getBoostControlSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * Complex specification for custom ranking based on customer defined
+         * attribute value.
+         * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec boost_control_spec = 3; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .BoostControlSpecOrBuilder + getBoostControlSpecOrBuilder() { + if (boostControlSpecBuilder_ != null) { + return boostControlSpecBuilder_.getMessageOrBuilder(); + } else { + return boostControlSpec_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec.getDefaultInstance() + : boostControlSpec_; + } + } + /** + * + * + *
+         * Complex specification for custom ranking based on customer defined
+         * attribute value.
+         * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec boost_control_spec = 3; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .BoostControlSpec, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .BoostControlSpec.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .BoostControlSpecOrBuilder> + getBoostControlSpecFieldBuilder() { + if (boostControlSpecBuilder_ == null) { + boostControlSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpec.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.BoostControlSpecOrBuilder>( + getBoostControlSpec(), getParentForChildren(), isClean()); + boostControlSpec_ = null; + } + return boostControlSpecBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec) + private static final com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec(); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ConditionBoostSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int CONDITION_BOOST_SPECS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec> + conditionBoostSpecs_; + /** + * + * + *
+     * Condition boost specifications. If a document matches multiple conditions
+     * in the specifictions, boost scores from these specifications are all
+     * applied and combined in a non-linear way. Maximum number of
+     * specifications is 20.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec> + getConditionBoostSpecsList() { + return conditionBoostSpecs_; + } + /** + * + * + *
+     * Condition boost specifications. If a document matches multiple conditions
+     * in the specifictions, boost scores from these specifications are all
+     * applied and combined in a non-linear way. Maximum number of
+     * specifications is 20.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpecOrBuilder> + getConditionBoostSpecsOrBuilderList() { + return conditionBoostSpecs_; + } + /** + * + * + *
+     * Condition boost specifications. If a document matches multiple conditions
+     * in the specifictions, boost scores from these specifications are all
+     * applied and combined in a non-linear way. Maximum number of
+     * specifications is 20.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1; + * + */ + @java.lang.Override + public int getConditionBoostSpecsCount() { + return conditionBoostSpecs_.size(); + } + /** + * + * + *
+     * Condition boost specifications. If a document matches multiple conditions
+     * in the specifictions, boost scores from these specifications are all
+     * applied and combined in a non-linear way. Maximum number of
+     * specifications is 20.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + getConditionBoostSpecs(int index) { + return conditionBoostSpecs_.get(index); + } + /** + * + * + *
+     * Condition boost specifications. If a document matches multiple conditions
+     * in the specifictions, boost scores from these specifications are all
+     * applied and combined in a non-linear way. Maximum number of
+     * specifications is 20.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpecOrBuilder + getConditionBoostSpecsOrBuilder(int index) { + return conditionBoostSpecs_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < conditionBoostSpecs_.size(); i++) { + output.writeMessage(1, conditionBoostSpecs_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < conditionBoostSpecs_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, conditionBoostSpecs_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec other = + (com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec) obj; + + if (!getConditionBoostSpecsList().equals(other.getConditionBoostSpecsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getConditionBoostSpecsCount() > 0) { + hash = (37 * hash) + CONDITION_BOOST_SPECS_FIELD_NUMBER; + hash = (53 * hash) + getConditionBoostSpecsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Boost specification to boost certain documents.
+     * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec) + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_BoostSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_BoostSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.class, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (conditionBoostSpecsBuilder_ == null) { + conditionBoostSpecs_ = java.util.Collections.emptyList(); + } else { + conditionBoostSpecs_ = null; + conditionBoostSpecsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_BoostSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec build() { + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec buildPartial() { + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec result = + new com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec result) { + if (conditionBoostSpecsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + conditionBoostSpecs_ = java.util.Collections.unmodifiableList(conditionBoostSpecs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.conditionBoostSpecs_ = conditionBoostSpecs_; + } else { + result.conditionBoostSpecs_ = conditionBoostSpecsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .getDefaultInstance()) return this; + if (conditionBoostSpecsBuilder_ == null) { + if (!other.conditionBoostSpecs_.isEmpty()) { + if (conditionBoostSpecs_.isEmpty()) { + conditionBoostSpecs_ = other.conditionBoostSpecs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureConditionBoostSpecsIsMutable(); + conditionBoostSpecs_.addAll(other.conditionBoostSpecs_); + } + onChanged(); + } + } else { + if (!other.conditionBoostSpecs_.isEmpty()) { + if (conditionBoostSpecsBuilder_.isEmpty()) { + conditionBoostSpecsBuilder_.dispose(); + conditionBoostSpecsBuilder_ = null; + conditionBoostSpecs_ = other.conditionBoostSpecs_; + bitField0_ = (bitField0_ & ~0x00000001); + conditionBoostSpecsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getConditionBoostSpecsFieldBuilder() + : null; + } else { + conditionBoostSpecsBuilder_.addAllMessages(other.conditionBoostSpecs_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec + m = + input.readMessage( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.parser(), + extensionRegistry); + if (conditionBoostSpecsBuilder_ == null) { + ensureConditionBoostSpecsIsMutable(); + conditionBoostSpecs_.add(m); + } else { + conditionBoostSpecsBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec> + conditionBoostSpecs_ = java.util.Collections.emptyList(); + + private void ensureConditionBoostSpecsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + conditionBoostSpecs_ = + new java.util.ArrayList< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec>(conditionBoostSpecs_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .Builder, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpecOrBuilder> + conditionBoostSpecsBuilder_; + + /** + * + * + *
+       * Condition boost specifications. If a document matches multiple conditions
+       * in the specifictions, boost scores from these specifications are all
+       * applied and combined in a non-linear way. Maximum number of
+       * specifications is 20.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1; + * + */ + public java.util.List< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec> + getConditionBoostSpecsList() { + if (conditionBoostSpecsBuilder_ == null) { + return java.util.Collections.unmodifiableList(conditionBoostSpecs_); + } else { + return conditionBoostSpecsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Condition boost specifications. If a document matches multiple conditions
+       * in the specifictions, boost scores from these specifications are all
+       * applied and combined in a non-linear way. Maximum number of
+       * specifications is 20.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1; + * + */ + public int getConditionBoostSpecsCount() { + if (conditionBoostSpecsBuilder_ == null) { + return conditionBoostSpecs_.size(); + } else { + return conditionBoostSpecsBuilder_.getCount(); + } + } + /** + * + * + *
+       * Condition boost specifications. If a document matches multiple conditions
+       * in the specifictions, boost scores from these specifications are all
+       * applied and combined in a non-linear way. Maximum number of
+       * specifications is 20.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + getConditionBoostSpecs(int index) { + if (conditionBoostSpecsBuilder_ == null) { + return conditionBoostSpecs_.get(index); + } else { + return conditionBoostSpecsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Condition boost specifications. If a document matches multiple conditions
+       * in the specifictions, boost scores from these specifications are all
+       * applied and combined in a non-linear way. Maximum number of
+       * specifications is 20.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1; + * + */ + public Builder setConditionBoostSpecs( + int index, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + value) { + if (conditionBoostSpecsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConditionBoostSpecsIsMutable(); + conditionBoostSpecs_.set(index, value); + onChanged(); + } else { + conditionBoostSpecsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Condition boost specifications. If a document matches multiple conditions
+       * in the specifictions, boost scores from these specifications are all
+       * applied and combined in a non-linear way. Maximum number of
+       * specifications is 20.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1; + * + */ + public Builder setConditionBoostSpecs( + int index, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .Builder + builderForValue) { + if (conditionBoostSpecsBuilder_ == null) { + ensureConditionBoostSpecsIsMutable(); + conditionBoostSpecs_.set(index, builderForValue.build()); + onChanged(); + } else { + conditionBoostSpecsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Condition boost specifications. If a document matches multiple conditions
+       * in the specifictions, boost scores from these specifications are all
+       * applied and combined in a non-linear way. Maximum number of
+       * specifications is 20.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1; + * + */ + public Builder addConditionBoostSpecs( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + value) { + if (conditionBoostSpecsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConditionBoostSpecsIsMutable(); + conditionBoostSpecs_.add(value); + onChanged(); + } else { + conditionBoostSpecsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Condition boost specifications. If a document matches multiple conditions
+       * in the specifictions, boost scores from these specifications are all
+       * applied and combined in a non-linear way. Maximum number of
+       * specifications is 20.
        * 
* * @@ -10651,52 +14235,107 @@ public interface ContentSearchSpecOrBuilder *
* * - * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ExtractiveContentSpec extractive_content_spec = 3; + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ExtractiveContentSpec extractive_content_spec = 3; + * + */ + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpecOrBuilder + getExtractiveContentSpecOrBuilder(); + + /** + * + * + *
+     * Specifies the search result mode. If unspecified, the
+     * search result mode is based on
+     * [DataStore.DocumentProcessingConfig.chunking_config][]:
+     * * If [DataStore.DocumentProcessingConfig.chunking_config][] is specified,
+     *   it defaults to `CHUNKS`.
+     * * Otherwise, it defaults to `DOCUMENTS`.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SearchResultMode search_result_mode = 4; + * + * + * @return The enum numeric value on the wire for searchResultMode. + */ + int getSearchResultModeValue(); + /** + * + * + *
+     * Specifies the search result mode. If unspecified, the
+     * search result mode is based on
+     * [DataStore.DocumentProcessingConfig.chunking_config][]:
+     * * If [DataStore.DocumentProcessingConfig.chunking_config][] is specified,
+     *   it defaults to `CHUNKS`.
+     * * Otherwise, it defaults to `DOCUMENTS`.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SearchResultMode search_result_mode = 4; + * + * + * @return The searchResultMode. + */ + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SearchResultMode + getSearchResultMode(); + + /** + * + * + *
+     * Specifies the chunk spec to be returned from the search response.
+     * Only available if the
+     * [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.search_result_mode]
+     * is set to
+     * [CHUNKS][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS]
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec chunk_spec = 5; * + * + * @return Whether the chunkSpec field is set. */ - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .ExtractiveContentSpecOrBuilder - getExtractiveContentSpecOrBuilder(); - + boolean hasChunkSpec(); /** * * *
-     * Specifies the search result mode. If unspecified, the
-     * search result mode is based on
-     * [DataStore.DocumentProcessingConfig.chunking_config][]:
-     * * If [DataStore.DocumentProcessingConfig.chunking_config][] is specified,
-     *   it defaults to `CHUNKS`.
-     * * Otherwise, it defaults to `DOCUMENTS`.
+     * Specifies the chunk spec to be returned from the search response.
+     * Only available if the
+     * [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.search_result_mode]
+     * is set to
+     * [CHUNKS][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS]
      * 
* * - * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SearchResultMode search_result_mode = 4; + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec chunk_spec = 5; * * - * @return The enum numeric value on the wire for searchResultMode. + * @return The chunkSpec. */ - int getSearchResultModeValue(); + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec + getChunkSpec(); /** * * *
-     * Specifies the search result mode. If unspecified, the
-     * search result mode is based on
-     * [DataStore.DocumentProcessingConfig.chunking_config][]:
-     * * If [DataStore.DocumentProcessingConfig.chunking_config][] is specified,
-     *   it defaults to `CHUNKS`.
-     * * Otherwise, it defaults to `DOCUMENTS`.
+     * Specifies the chunk spec to be returned from the search response.
+     * Only available if the
+     * [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.search_result_mode]
+     * is set to
+     * [CHUNKS][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS]
      * 
* * - * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SearchResultMode search_result_mode = 4; + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec chunk_spec = 5; * - * - * @return The searchResultMode. */ - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SearchResultMode - getSearchResultMode(); + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpecOrBuilder + getChunkSpecOrBuilder(); } /** * @@ -10932,7 +14571,7 @@ public interface SnippetSpecOrBuilder * * @deprecated * google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec.max_snippet_count - * is deprecated. See google/cloud/discoveryengine/v1alpha/search_service.proto;l=321 + * is deprecated. See google/cloud/discoveryengine/v1alpha/search_service.proto;l=401 * @return The maxSnippetCount. */ @java.lang.Deprecated @@ -10950,7 +14589,7 @@ public interface SnippetSpecOrBuilder * * @deprecated * google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec.reference_only - * is deprecated. See google/cloud/discoveryengine/v1alpha/search_service.proto;l=325 + * is deprecated. See google/cloud/discoveryengine/v1alpha/search_service.proto;l=405 * @return The referenceOnly. */ @java.lang.Deprecated @@ -10991,1175 +14630,1947 @@ private SnippetSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private SnippetSpec() {} + private SnippetSpec() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SnippetSpec(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_SnippetSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_SnippetSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec + .class, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec + .Builder.class); + } + + public static final int MAX_SNIPPET_COUNT_FIELD_NUMBER = 1; + private int maxSnippetCount_ = 0; + /** + * + * + *
+       * [DEPRECATED] This field is deprecated. To control snippet return, use
+       * `return_snippet` field. For backwards compatibility, we will return
+       * snippet if max_snippet_count > 0.
+       * 
+ * + * int32 max_snippet_count = 1 [deprecated = true]; + * + * @deprecated + * google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec.max_snippet_count + * is deprecated. See google/cloud/discoveryengine/v1alpha/search_service.proto;l=401 + * @return The maxSnippetCount. + */ + @java.lang.Override + @java.lang.Deprecated + public int getMaxSnippetCount() { + return maxSnippetCount_; + } + + public static final int REFERENCE_ONLY_FIELD_NUMBER = 2; + private boolean referenceOnly_ = false; + /** + * + * + *
+       * [DEPRECATED] This field is deprecated and will have no affect on the
+       * snippet.
+       * 
+ * + * bool reference_only = 2 [deprecated = true]; + * + * @deprecated + * google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec.reference_only + * is deprecated. See google/cloud/discoveryengine/v1alpha/search_service.proto;l=405 + * @return The referenceOnly. + */ + @java.lang.Override + @java.lang.Deprecated + public boolean getReferenceOnly() { + return referenceOnly_; + } + + public static final int RETURN_SNIPPET_FIELD_NUMBER = 3; + private boolean returnSnippet_ = false; + /** + * + * + *
+       * If `true`, then return snippet. If no snippet can be generated, we
+       * return "No snippet is available for this page." A `snippet_status` with
+       * `SUCCESS` or `NO_SNIPPET_AVAILABLE` will also be returned.
+       * 
+ * + * bool return_snippet = 3; + * + * @return The returnSnippet. + */ + @java.lang.Override + public boolean getReturnSnippet() { + return returnSnippet_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (maxSnippetCount_ != 0) { + output.writeInt32(1, maxSnippetCount_); + } + if (referenceOnly_ != false) { + output.writeBool(2, referenceOnly_); + } + if (returnSnippet_ != false) { + output.writeBool(3, returnSnippet_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (maxSnippetCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, maxSnippetCount_); + } + if (referenceOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, referenceOnly_); + } + if (returnSnippet_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, returnSnippet_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec other = + (com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec) + obj; + + if (getMaxSnippetCount() != other.getMaxSnippetCount()) return false; + if (getReferenceOnly() != other.getReferenceOnly()) return false; + if (getReturnSnippet() != other.getReturnSnippet()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MAX_SNIPPET_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getMaxSnippetCount(); + hash = (37 * hash) + REFERENCE_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReferenceOnly()); + hash = (37 * hash) + RETURN_SNIPPET_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnSnippet()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SnippetSpec + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SnippetSpec + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SnippetSpec + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SnippetSpec + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SnippetSpec + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SnippetSpec + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SnippetSpec + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SnippetSpec + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SnippetSpec + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new SnippetSpec(); + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SnippetSpec + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_SnippetSpec_descriptor; + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SnippetSpec + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_SnippetSpec_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec - .class, - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec - .Builder.class); + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SnippetSpec + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); } - public static final int MAX_SNIPPET_COUNT_FIELD_NUMBER = 1; - private int maxSnippetCount_ = 0; - /** - * - * - *
-       * [DEPRECATED] This field is deprecated. To control snippet return, use
-       * `return_snippet` field. For backwards compatibility, we will return
-       * snippet if max_snippet_count > 0.
-       * 
- * - * int32 max_snippet_count = 1 [deprecated = true]; - * - * @deprecated - * google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec.max_snippet_count - * is deprecated. See google/cloud/discoveryengine/v1alpha/search_service.proto;l=321 - * @return The maxSnippetCount. - */ @java.lang.Override - @java.lang.Deprecated - public int getMaxSnippetCount() { - return maxSnippetCount_; + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - public static final int REFERENCE_ONLY_FIELD_NUMBER = 2; - private boolean referenceOnly_ = false; - /** - * - * - *
-       * [DEPRECATED] This field is deprecated and will have no affect on the
-       * snippet.
-       * 
- * - * bool reference_only = 2 [deprecated = true]; - * - * @deprecated - * google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec.reference_only - * is deprecated. See google/cloud/discoveryengine/v1alpha/search_service.proto;l=325 - * @return The referenceOnly. - */ @java.lang.Override - @java.lang.Deprecated - public boolean getReferenceOnly() { - return referenceOnly_; + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } - public static final int RETURN_SNIPPET_FIELD_NUMBER = 3; - private boolean returnSnippet_ = false; + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } /** * * *
-       * If `true`, then return snippet. If no snippet can be generated, we
-       * return "No snippet is available for this page." A `snippet_status` with
-       * `SUCCESS` or `NO_SNIPPET_AVAILABLE` will also be returned.
+       * A specification for configuring snippets in a search response.
        * 
* - * bool return_snippet = 3; - * - * @return The returnSnippet. + * Protobuf type {@code + * google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec} */ - @java.lang.Override - public boolean getReturnSnippet() { - return returnSnippet_; - } + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec) + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SnippetSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_SnippetSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_SnippetSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SnippetSpec.class, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SnippetSpec.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + maxSnippetCount_ = 0; + referenceOnly_ = false; + returnSnippet_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_SnippetSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SnippetSpec.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec + build() { + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec + buildPartial() { + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec + result = + new com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SnippetSpec(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.maxSnippetCount_ = maxSnippetCount_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.referenceOnly_ = referenceOnly_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.returnSnippet_ = returnSnippet_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SnippetSpec) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SnippetSpec) + other); + } else { + super.mergeFrom(other); + return this; + } + } - private byte memoizedIsInitialized = -1; + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec + other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SnippetSpec.getDefaultInstance()) return this; + if (other.getMaxSnippetCount() != 0) { + setMaxSnippetCount(other.getMaxSnippetCount()); + } + if (other.getReferenceOnly() != false) { + setReferenceOnly(other.getReferenceOnly()); + } + if (other.getReturnSnippet() != false) { + setReturnSnippet(other.getReturnSnippet()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @java.lang.Override + public final boolean isInitialized() { + return true; + } - memoizedIsInitialized = 1; - return true; - } + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + maxSnippetCount_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + referenceOnly_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + returnSnippet_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (maxSnippetCount_ != 0) { - output.writeInt32(1, maxSnippetCount_); + private int bitField0_; + + private int maxSnippetCount_; + /** + * + * + *
+         * [DEPRECATED] This field is deprecated. To control snippet return, use
+         * `return_snippet` field. For backwards compatibility, we will return
+         * snippet if max_snippet_count > 0.
+         * 
+ * + * int32 max_snippet_count = 1 [deprecated = true]; + * + * @deprecated + * google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec.max_snippet_count + * is deprecated. See google/cloud/discoveryengine/v1alpha/search_service.proto;l=401 + * @return The maxSnippetCount. + */ + @java.lang.Override + @java.lang.Deprecated + public int getMaxSnippetCount() { + return maxSnippetCount_; } - if (referenceOnly_ != false) { - output.writeBool(2, referenceOnly_); + /** + * + * + *
+         * [DEPRECATED] This field is deprecated. To control snippet return, use
+         * `return_snippet` field. For backwards compatibility, we will return
+         * snippet if max_snippet_count > 0.
+         * 
+ * + * int32 max_snippet_count = 1 [deprecated = true]; + * + * @deprecated + * google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec.max_snippet_count + * is deprecated. See google/cloud/discoveryengine/v1alpha/search_service.proto;l=401 + * @param value The maxSnippetCount to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setMaxSnippetCount(int value) { + + maxSnippetCount_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; } - if (returnSnippet_ != false) { - output.writeBool(3, returnSnippet_); + /** + * + * + *
+         * [DEPRECATED] This field is deprecated. To control snippet return, use
+         * `return_snippet` field. For backwards compatibility, we will return
+         * snippet if max_snippet_count > 0.
+         * 
+ * + * int32 max_snippet_count = 1 [deprecated = true]; + * + * @deprecated + * google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec.max_snippet_count + * is deprecated. See google/cloud/discoveryengine/v1alpha/search_service.proto;l=401 + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder clearMaxSnippetCount() { + bitField0_ = (bitField0_ & ~0x00000001); + maxSnippetCount_ = 0; + onChanged(); + return this; } - getUnknownFields().writeTo(output); - } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; + private boolean referenceOnly_; + /** + * + * + *
+         * [DEPRECATED] This field is deprecated and will have no affect on the
+         * snippet.
+         * 
+ * + * bool reference_only = 2 [deprecated = true]; + * + * @deprecated + * google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec.reference_only + * is deprecated. See google/cloud/discoveryengine/v1alpha/search_service.proto;l=405 + * @return The referenceOnly. + */ + @java.lang.Override + @java.lang.Deprecated + public boolean getReferenceOnly() { + return referenceOnly_; + } + /** + * + * + *
+         * [DEPRECATED] This field is deprecated and will have no affect on the
+         * snippet.
+         * 
+ * + * bool reference_only = 2 [deprecated = true]; + * + * @deprecated + * google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec.reference_only + * is deprecated. See google/cloud/discoveryengine/v1alpha/search_service.proto;l=405 + * @param value The referenceOnly to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setReferenceOnly(boolean value) { - size = 0; - if (maxSnippetCount_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, maxSnippetCount_); + referenceOnly_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; } - if (referenceOnly_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, referenceOnly_); + /** + * + * + *
+         * [DEPRECATED] This field is deprecated and will have no affect on the
+         * snippet.
+         * 
+ * + * bool reference_only = 2 [deprecated = true]; + * + * @deprecated + * google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec.reference_only + * is deprecated. See google/cloud/discoveryengine/v1alpha/search_service.proto;l=405 + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder clearReferenceOnly() { + bitField0_ = (bitField0_ & ~0x00000002); + referenceOnly_ = false; + onChanged(); + return this; } - if (returnSnippet_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, returnSnippet_); + + private boolean returnSnippet_; + /** + * + * + *
+         * If `true`, then return snippet. If no snippet can be generated, we
+         * return "No snippet is available for this page." A `snippet_status` with
+         * `SUCCESS` or `NO_SNIPPET_AVAILABLE` will also be returned.
+         * 
+ * + * bool return_snippet = 3; + * + * @return The returnSnippet. + */ + @java.lang.Override + public boolean getReturnSnippet() { + return returnSnippet_; } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } + /** + * + * + *
+         * If `true`, then return snippet. If no snippet can be generated, we
+         * return "No snippet is available for this page." A `snippet_status` with
+         * `SUCCESS` or `NO_SNIPPET_AVAILABLE` will also be returned.
+         * 
+ * + * bool return_snippet = 3; + * + * @param value The returnSnippet to set. + * @return This builder for chaining. + */ + public Builder setReturnSnippet(boolean value) { - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; + returnSnippet_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; } - if (!(obj - instanceof - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec)) { - return super.equals(obj); + /** + * + * + *
+         * If `true`, then return snippet. If no snippet can be generated, we
+         * return "No snippet is available for this page." A `snippet_status` with
+         * `SUCCESS` or `NO_SNIPPET_AVAILABLE` will also be returned.
+         * 
+ * + * bool return_snippet = 3; + * + * @return This builder for chaining. + */ + public Builder clearReturnSnippet() { + bitField0_ = (bitField0_ & ~0x00000004); + returnSnippet_ = false; + onChanged(); + return this; } - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec other = - (com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec) - obj; - - if (getMaxSnippetCount() != other.getMaxSnippetCount()) return false; - if (getReferenceOnly() != other.getReferenceOnly()) return false; - if (getReturnSnippet() != other.getReturnSnippet()) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + MAX_SNIPPET_COUNT_FIELD_NUMBER; - hash = (53 * hash) + getMaxSnippetCount(); - hash = (37 * hash) + REFERENCE_ONLY_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReferenceOnly()); - hash = (37 * hash) + RETURN_SNIPPET_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnSnippet()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SnippetSpec - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SnippetSpec - parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SnippetSpec - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SnippetSpec - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SnippetSpec - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } - public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SnippetSpec - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec) } - public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec) + private static final com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec .SnippetSpec - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } + DEFAULT_INSTANCE; - public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SnippetSpec - parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SnippetSpec(); } public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec .SnippetSpec - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + getDefaultInstance() { + return DEFAULT_INSTANCE; } - public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SnippetSpec - parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SnippetSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; - public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SnippetSpec - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + public static com.google.protobuf.Parser parser() { + return PARSER; } - public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SnippetSpec - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; } @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } + } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } + public interface SummarySpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec) + com.google.protobuf.MessageOrBuilder { - public static Builder newBuilder( - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec - prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } + /** + * + * + *
+       * The number of top results to generate the summary from. If the number
+       * of results returned is less than `summaryResultCount`, the summary is
+       * generated from all of the results.
+       *
+       * At most 10 results can be used to generate a summary.
+       * 
+ * + * int32 summary_result_count = 1; + * + * @return The summaryResultCount. + */ + int getSummaryResultCount(); - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } + /** + * + * + *
+       * Specifies whether to include citations in the summary. The default
+       * value is `false`.
+       *
+       * When this field is set to `true`, summaries include in-line citation
+       * numbers.
+       *
+       * Example summary including citations:
+       *
+       * BigQuery is Google Cloud's fully managed and completely serverless
+       * enterprise data warehouse [1]. BigQuery supports all data types, works
+       * across clouds, and has built-in machine learning and business
+       * intelligence, all within a unified platform [2, 3].
+       *
+       * The citation numbers refer to the returned search results and are
+       * 1-indexed. For example, [1] means that the sentence is attributed to
+       * the first search result. [2, 3] means that the sentence is attributed
+       * to both the second and third search results.
+       * 
+ * + * bool include_citations = 2; + * + * @return The includeCitations. + */ + boolean getIncludeCitations(); - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } /** * * *
-       * A specification for configuring snippets in a search response.
+       * Specifies whether to filter out adversarial queries. The default value
+       * is `false`.
+       *
+       * Google employs search-query classification to detect adversarial
+       * queries. No summary is returned if the search query is classified as an
+       * adversarial query. For example, a user might ask a question regarding
+       * negative comments about the company or submit a query designed to
+       * generate unsafe, policy-violating output. If this field is set to
+       * `true`, we skip generating summaries for adversarial queries and return
+       * fallback messages instead.
        * 
* - * Protobuf type {@code - * google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec} + * bool ignore_adversarial_query = 3; + * + * @return The ignoreAdversarialQuery. */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec) - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SnippetSpecOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_SnippetSpec_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_SnippetSpec_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SnippetSpec.class, - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SnippetSpec.Builder.class); - } - - // Construct using - // com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - maxSnippetCount_ = 0; - referenceOnly_ = false; - returnSnippet_ = false; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_SnippetSpec_descriptor; - } - - @java.lang.Override - public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec - getDefaultInstanceForType() { - return com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SnippetSpec.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec - build() { - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec - result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec - buildPartial() { - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec - result = - new com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SnippetSpec(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0( - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec - result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.maxSnippetCount_ = maxSnippetCount_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.referenceOnly_ = referenceOnly_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.returnSnippet_ = returnSnippet_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } + boolean getIgnoreAdversarialQuery(); - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } + /** + * + * + *
+       * Specifies whether to filter out queries that are not summary-seeking.
+       * The default value is `false`.
+       *
+       * Google employs search-query classification to detect summary-seeking
+       * queries. No summary is returned if the search query is classified as a
+       * non-summary seeking query. For example, `why is the sky blue` and `Who
+       * is the best soccer player in the world?` are summary-seeking queries,
+       * but `SFO airport` and `world cup 2026` are not. They are most likely
+       * navigational queries. If this field is set to `true`, we skip
+       * generating summaries for non-summary seeking queries and return
+       * fallback messages instead.
+       * 
+ * + * bool ignore_non_summary_seeking_query = 4; + * + * @return The ignoreNonSummarySeekingQuery. + */ + boolean getIgnoreNonSummarySeekingQuery(); - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } + /** + * + * + *
+       * If specified, the spec will be used to modify the prompt provided to
+       * the LLM.
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec model_prompt_spec = 5; + * + * + * @return Whether the modelPromptSpec field is set. + */ + boolean hasModelPromptSpec(); + /** + * + * + *
+       * If specified, the spec will be used to modify the prompt provided to
+       * the LLM.
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec model_prompt_spec = 5; + * + * + * @return The modelPromptSpec. + */ + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + .ModelPromptSpec + getModelPromptSpec(); + /** + * + * + *
+       * If specified, the spec will be used to modify the prompt provided to
+       * the LLM.
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec model_prompt_spec = 5; + * + */ + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + .ModelPromptSpecOrBuilder + getModelPromptSpecOrBuilder(); - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } + /** + * + * + *
+       * Language code for Summary. Use language tags defined by
+       * [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
+       * Note: This is an experimental feature.
+       * 
+ * + * string language_code = 6; + * + * @return The languageCode. + */ + java.lang.String getLanguageCode(); + /** + * + * + *
+       * Language code for Summary. Use language tags defined by
+       * [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
+       * Note: This is an experimental feature.
+       * 
+ * + * string language_code = 6; + * + * @return The bytes for languageCode. + */ + com.google.protobuf.ByteString getLanguageCodeBytes(); - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } + /** + * + * + *
+       * If specified, the spec will be used to modify the model specification
+       * provided to the LLM.
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec model_spec = 7; + * + * + * @return Whether the modelSpec field is set. + */ + boolean hasModelSpec(); + /** + * + * + *
+       * If specified, the spec will be used to modify the model specification
+       * provided to the LLM.
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec model_spec = 7; + * + * + * @return The modelSpec. + */ + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec + getModelSpec(); + /** + * + * + *
+       * If specified, the spec will be used to modify the model specification
+       * provided to the LLM.
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec model_spec = 7; + * + */ + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + .ModelSpecOrBuilder + getModelSpecOrBuilder(); - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } + /** + * + * + *
+       * If true, answer will be generated from most relevant chunks from top
+       * search results. This feature will improve summary quality.
+       * Please note that with this feature enabled, not all top search results
+       * will be referenced and included in the reference list, so the citation
+       * source index only points to the search results listed in the reference
+       * list.
+       * 
+ * + * bool use_semantic_chunks = 8; + * + * @return The useSemanticChunks. + */ + boolean getUseSemanticChunks(); + } + /** + * + * + *
+     * A specification for configuring a summary returned in a search
+     * response.
+     * 
+ * + * Protobuf type {@code + * google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec} + */ + public static final class SummarySpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec) + SummarySpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use SummarySpec.newBuilder() to construct. + private SummarySpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SnippetSpec) { - return mergeFrom( - (com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SnippetSpec) - other); - } else { - super.mergeFrom(other); - return this; - } - } + private SummarySpec() { + languageCode_ = ""; + } - public Builder mergeFrom( - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec - other) { - if (other - == com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SnippetSpec.getDefaultInstance()) return this; - if (other.getMaxSnippetCount() != 0) { - setMaxSnippetCount(other.getMaxSnippetCount()); - } - if (other.getReferenceOnly() != false) { - setReferenceOnly(other.getReferenceOnly()); - } - if (other.getReturnSnippet() != false) { - setReturnSnippet(other.getReturnSnippet()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SummarySpec(); + } - @java.lang.Override - public final boolean isInitialized() { - return true; - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_SummarySpec_descriptor; + } - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - maxSnippetCount_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 16: - { - referenceOnly_ = input.readBool(); - bitField0_ |= 0x00000002; - break; - } // case 16 - case 24: - { - returnSnippet_ = input.readBool(); - bitField0_ |= 0x00000004; - break; - } // case 24 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_SummarySpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + .class, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + .Builder.class); + } - private int bitField0_; + public interface ModelPromptSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec) + com.google.protobuf.MessageOrBuilder { - private int maxSnippetCount_; /** * * *
-         * [DEPRECATED] This field is deprecated. To control snippet return, use
-         * `return_snippet` field. For backwards compatibility, we will return
-         * snippet if max_snippet_count > 0.
+         * Text at the beginning of the prompt that instructs the assistant.
+         * Examples are available in the user guide.
          * 
* - * int32 max_snippet_count = 1 [deprecated = true]; + * string preamble = 1; * - * @deprecated - * google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec.max_snippet_count - * is deprecated. See google/cloud/discoveryengine/v1alpha/search_service.proto;l=321 - * @return The maxSnippetCount. + * @return The preamble. */ - @java.lang.Override - @java.lang.Deprecated - public int getMaxSnippetCount() { - return maxSnippetCount_; - } + java.lang.String getPreamble(); /** * * *
-         * [DEPRECATED] This field is deprecated. To control snippet return, use
-         * `return_snippet` field. For backwards compatibility, we will return
-         * snippet if max_snippet_count > 0.
+         * Text at the beginning of the prompt that instructs the assistant.
+         * Examples are available in the user guide.
          * 
* - * int32 max_snippet_count = 1 [deprecated = true]; + * string preamble = 1; * - * @deprecated - * google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec.max_snippet_count - * is deprecated. See google/cloud/discoveryengine/v1alpha/search_service.proto;l=321 - * @param value The maxSnippetCount to set. - * @return This builder for chaining. + * @return The bytes for preamble. */ - @java.lang.Deprecated - public Builder setMaxSnippetCount(int value) { + com.google.protobuf.ByteString getPreambleBytes(); + } + /** + * + * + *
+       * Specification of the prompt to use with the model.
+       * 
+ * + * Protobuf type {@code + * google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec} + */ + public static final class ModelPromptSpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec) + ModelPromptSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use ModelPromptSpec.newBuilder() to construct. + private ModelPromptSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } - maxSnippetCount_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; + private ModelPromptSpec() { + preamble_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ModelPromptSpec(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_SummarySpec_ModelPromptSpec_descriptor; } - /** - * - * - *
-         * [DEPRECATED] This field is deprecated. To control snippet return, use
-         * `return_snippet` field. For backwards compatibility, we will return
-         * snippet if max_snippet_count > 0.
-         * 
- * - * int32 max_snippet_count = 1 [deprecated = true]; - * - * @deprecated - * google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec.max_snippet_count - * is deprecated. See google/cloud/discoveryengine/v1alpha/search_service.proto;l=321 - * @return This builder for chaining. - */ - @java.lang.Deprecated - public Builder clearMaxSnippetCount() { - bitField0_ = (bitField0_ & ~0x00000001); - maxSnippetCount_ = 0; - onChanged(); - return this; + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_SummarySpec_ModelPromptSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec.ModelPromptSpec.class, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec.ModelPromptSpec.Builder.class); } - private boolean referenceOnly_; + public static final int PREAMBLE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object preamble_ = ""; /** * * *
-         * [DEPRECATED] This field is deprecated and will have no affect on the
-         * snippet.
+         * Text at the beginning of the prompt that instructs the assistant.
+         * Examples are available in the user guide.
          * 
* - * bool reference_only = 2 [deprecated = true]; + * string preamble = 1; * - * @deprecated - * google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec.reference_only - * is deprecated. See google/cloud/discoveryengine/v1alpha/search_service.proto;l=325 - * @return The referenceOnly. + * @return The preamble. */ @java.lang.Override - @java.lang.Deprecated - public boolean getReferenceOnly() { - return referenceOnly_; + public java.lang.String getPreamble() { + java.lang.Object ref = preamble_; + 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(); + preamble_ = s; + return s; + } } /** * * *
-         * [DEPRECATED] This field is deprecated and will have no affect on the
-         * snippet.
+         * Text at the beginning of the prompt that instructs the assistant.
+         * Examples are available in the user guide.
          * 
* - * bool reference_only = 2 [deprecated = true]; + * string preamble = 1; * - * @deprecated - * google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec.reference_only - * is deprecated. See google/cloud/discoveryengine/v1alpha/search_service.proto;l=325 - * @param value The referenceOnly to set. - * @return This builder for chaining. + * @return The bytes for preamble. */ - @java.lang.Deprecated - public Builder setReferenceOnly(boolean value) { + @java.lang.Override + public com.google.protobuf.ByteString getPreambleBytes() { + java.lang.Object ref = preamble_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + preamble_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(preamble_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, preamble_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(preamble_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, preamble_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + .ModelPromptSpec)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + .ModelPromptSpec + other = + (com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec.ModelPromptSpec) + obj; + + if (!getPreamble().equals(other.getPreamble())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PREAMBLE_FIELD_NUMBER; + hash = (53 * hash) + getPreamble().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec.ModelPromptSpec + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec.ModelPromptSpec + parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec.ModelPromptSpec + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec.ModelPromptSpec + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec.ModelPromptSpec + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec.ModelPromptSpec + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec.ModelPromptSpec + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec.ModelPromptSpec + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec.ModelPromptSpec + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec.ModelPromptSpec + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec.ModelPromptSpec + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec.ModelPromptSpec + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - referenceOnly_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); } - /** - * - * - *
-         * [DEPRECATED] This field is deprecated and will have no affect on the
-         * snippet.
-         * 
- * - * bool reference_only = 2 [deprecated = true]; - * - * @deprecated - * google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec.reference_only - * is deprecated. See google/cloud/discoveryengine/v1alpha/search_service.proto;l=325 - * @return This builder for chaining. - */ - @java.lang.Deprecated - public Builder clearReferenceOnly() { - bitField0_ = (bitField0_ & ~0x00000002); - referenceOnly_ = false; - onChanged(); - return this; + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + .ModelPromptSpec + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - private boolean returnSnippet_; - /** - * - * - *
-         * If `true`, then return snippet. If no snippet can be generated, we
-         * return "No snippet is available for this page." A `snippet_status` with
-         * `SUCCESS` or `NO_SNIPPET_AVAILABLE` will also be returned.
-         * 
- * - * bool return_snippet = 3; - * - * @return The returnSnippet. - */ @java.lang.Override - public boolean getReturnSnippet() { - return returnSnippet_; + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } - /** - * - * - *
-         * If `true`, then return snippet. If no snippet can be generated, we
-         * return "No snippet is available for this page." A `snippet_status` with
-         * `SUCCESS` or `NO_SNIPPET_AVAILABLE` will also be returned.
-         * 
- * - * bool return_snippet = 3; - * - * @param value The returnSnippet to set. - * @return This builder for chaining. - */ - public Builder setReturnSnippet(boolean value) { - returnSnippet_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; } /** * * *
-         * If `true`, then return snippet. If no snippet can be generated, we
-         * return "No snippet is available for this page." A `snippet_status` with
-         * `SUCCESS` or `NO_SNIPPET_AVAILABLE` will also be returned.
+         * Specification of the prompt to use with the model.
          * 
* - * bool return_snippet = 3; - * - * @return This builder for chaining. + * Protobuf type {@code + * google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec} */ - public Builder clearReturnSnippet() { - bitField0_ = (bitField0_ & ~0x00000004); - returnSnippet_ = false; - onChanged(); - return this; - } + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec) + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + .ModelPromptSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_SummarySpec_ModelPromptSpec_descriptor; + } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_SummarySpec_ModelPromptSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec.ModelPromptSpec.class, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec.ModelPromptSpec.Builder.class); + } - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } + // Construct using + // com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec.newBuilder() + private Builder() {} - // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec) - } + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } - // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec) - private static final com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SnippetSpec - DEFAULT_INSTANCE; + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + preamble_ = ""; + return this; + } - static { - DEFAULT_INSTANCE = - new com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SnippetSpec(); - } + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_SummarySpec_ModelPromptSpec_descriptor; + } - public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SnippetSpec - getDefaultInstance() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec.ModelPromptSpec + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec.ModelPromptSpec.getDefaultInstance(); + } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SnippetSpec parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec.ModelPromptSpec + build() { + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + .ModelPromptSpec + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); } - }; + return result; + } - public static com.google.protobuf.Parser parser() { - return PARSER; - } + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec.ModelPromptSpec + buildPartial() { + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + .ModelPromptSpec + result = + new com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec.ModelPromptSpec(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + .ModelPromptSpec + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.preamble_ = preamble_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + .ModelPromptSpec) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec.ModelPromptSpec) + other); + } else { + super.mergeFrom(other); + return this; + } + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + .ModelPromptSpec + other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec.ModelPromptSpec.getDefaultInstance()) return this; + if (!other.getPreamble().isEmpty()) { + preamble_ = other.preamble_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } - public interface SummarySpecOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec) - com.google.protobuf.MessageOrBuilder { + @java.lang.Override + public final boolean isInitialized() { + return true; + } - /** - * - * - *
-       * The number of top results to generate the summary from. If the number
-       * of results returned is less than `summaryResultCount`, the summary is
-       * generated from all of the results.
-       *
-       * At most 10 results can be used to generate a summary.
-       * 
- * - * int32 summary_result_count = 1; - * - * @return The summaryResultCount. - */ - int getSummaryResultCount(); + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + preamble_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } - /** - * - * - *
-       * Specifies whether to include citations in the summary. The default
-       * value is `false`.
-       *
-       * When this field is set to `true`, summaries include in-line citation
-       * numbers.
-       *
-       * Example summary including citations:
-       *
-       * BigQuery is Google Cloud's fully managed and completely serverless
-       * enterprise data warehouse [1]. BigQuery supports all data types, works
-       * across clouds, and has built-in machine learning and business
-       * intelligence, all within a unified platform [2, 3].
-       *
-       * The citation numbers refer to the returned search results and are
-       * 1-indexed. For example, [1] means that the sentence is attributed to
-       * the first search result. [2, 3] means that the sentence is attributed
-       * to both the second and third search results.
-       * 
- * - * bool include_citations = 2; - * - * @return The includeCitations. - */ - boolean getIncludeCitations(); + private int bitField0_; - /** - * - * - *
-       * Specifies whether to filter out adversarial queries. The default value
-       * is `false`.
-       *
-       * Google employs search-query classification to detect adversarial
-       * queries. No summary is returned if the search query is classified as an
-       * adversarial query. For example, a user might ask a question regarding
-       * negative comments about the company or submit a query designed to
-       * generate unsafe, policy-violating output. If this field is set to
-       * `true`, we skip generating summaries for adversarial queries and return
-       * fallback messages instead.
-       * 
- * - * bool ignore_adversarial_query = 3; - * - * @return The ignoreAdversarialQuery. - */ - boolean getIgnoreAdversarialQuery(); + private java.lang.Object preamble_ = ""; + /** + * + * + *
+           * Text at the beginning of the prompt that instructs the assistant.
+           * Examples are available in the user guide.
+           * 
+ * + * string preamble = 1; + * + * @return The preamble. + */ + public java.lang.String getPreamble() { + java.lang.Object ref = preamble_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + preamble_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+           * Text at the beginning of the prompt that instructs the assistant.
+           * Examples are available in the user guide.
+           * 
+ * + * string preamble = 1; + * + * @return The bytes for preamble. + */ + public com.google.protobuf.ByteString getPreambleBytes() { + java.lang.Object ref = preamble_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + preamble_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+           * Text at the beginning of the prompt that instructs the assistant.
+           * Examples are available in the user guide.
+           * 
+ * + * string preamble = 1; + * + * @param value The preamble to set. + * @return This builder for chaining. + */ + public Builder setPreamble(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + preamble_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+           * Text at the beginning of the prompt that instructs the assistant.
+           * Examples are available in the user guide.
+           * 
+ * + * string preamble = 1; + * + * @return This builder for chaining. + */ + public Builder clearPreamble() { + preamble_ = getDefaultInstance().getPreamble(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+           * Text at the beginning of the prompt that instructs the assistant.
+           * Examples are available in the user guide.
+           * 
+ * + * string preamble = 1; + * + * @param value The bytes for preamble to set. + * @return This builder for chaining. + */ + public Builder setPreambleBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + preamble_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } - /** - * - * - *
-       * Specifies whether to filter out queries that are not summary-seeking.
-       * The default value is `false`.
-       *
-       * Google employs search-query classification to detect summary-seeking
-       * queries. No summary is returned if the search query is classified as a
-       * non-summary seeking query. For example, `why is the sky blue` and `Who
-       * is the best soccer player in the world?` are summary-seeking queries,
-       * but `SFO airport` and `world cup 2026` are not. They are most likely
-       * navigational queries. If this field is set to `true`, we skip
-       * generating summaries for non-summary seeking queries and return
-       * fallback messages instead.
-       * 
- * - * bool ignore_non_summary_seeking_query = 4; - * - * @return The ignoreNonSummarySeekingQuery. - */ - boolean getIgnoreNonSummarySeekingQuery(); + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } - /** - * - * - *
-       * If specified, the spec will be used to modify the prompt provided to
-       * the LLM.
-       * 
- * - * - * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec model_prompt_spec = 5; - * - * - * @return Whether the modelPromptSpec field is set. - */ - boolean hasModelPromptSpec(); - /** - * - * - *
-       * If specified, the spec will be used to modify the prompt provided to
-       * the LLM.
-       * 
- * - * - * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec model_prompt_spec = 5; - * - * - * @return The modelPromptSpec. - */ - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec - .ModelPromptSpec - getModelPromptSpec(); - /** - * - * - *
-       * If specified, the spec will be used to modify the prompt provided to
-       * the LLM.
-       * 
- * - * - * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec model_prompt_spec = 5; - * - */ - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec - .ModelPromptSpecOrBuilder - getModelPromptSpecOrBuilder(); + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } - /** - * - * - *
-       * Language code for Summary. Use language tags defined by
-       * [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
-       * Note: This is an experimental feature.
-       * 
- * - * string language_code = 6; - * - * @return The languageCode. - */ - java.lang.String getLanguageCode(); - /** - * - * - *
-       * Language code for Summary. Use language tags defined by
-       * [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
-       * Note: This is an experimental feature.
-       * 
- * - * string language_code = 6; - * - * @return The bytes for languageCode. - */ - com.google.protobuf.ByteString getLanguageCodeBytes(); + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec) + } - /** - * - * - *
-       * If specified, the spec will be used to modify the model specification
-       * provided to the LLM.
-       * 
- * - * - * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec model_spec = 7; - * - * - * @return Whether the modelSpec field is set. - */ - boolean hasModelSpec(); - /** - * - * - *
-       * If specified, the spec will be used to modify the model specification
-       * provided to the LLM.
-       * 
- * - * - * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec model_spec = 7; - * - * - * @return The modelSpec. - */ - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec - getModelSpec(); - /** - * - * - *
-       * If specified, the spec will be used to modify the model specification
-       * provided to the LLM.
-       * 
- * - * - * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec model_spec = 7; - * - */ - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec - .ModelSpecOrBuilder - getModelSpecOrBuilder(); - } - /** - * - * - *
-     * A specification for configuring a summary returned in a search
-     * response.
-     * 
- * - * Protobuf type {@code - * google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec} - */ - public static final class SummarySpec extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec) - SummarySpecOrBuilder { - private static final long serialVersionUID = 0L; - // Use SummarySpec.newBuilder() to construct. - private SummarySpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec) + private static final com.google.cloud.discoveryengine.v1alpha.SearchRequest + .ContentSearchSpec.SummarySpec.ModelPromptSpec + DEFAULT_INSTANCE; - private SummarySpec() { - languageCode_ = ""; - } + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec.ModelPromptSpec(); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new SummarySpec(); - } + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec.ModelPromptSpec + getDefaultInstance() { + return DEFAULT_INSTANCE; + } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_SummarySpec_descriptor; - } + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ModelPromptSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_SummarySpec_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec - .class, - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec - .Builder.class); + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + .ModelPromptSpec + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } - public interface ModelPromptSpecOrBuilder + public interface ModelSpecOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec) + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec) com.google.protobuf.MessageOrBuilder { /** * * *
-         * Text at the beginning of the prompt that instructs the assistant.
-         * Examples are available in the user guide.
+         * The model version used to generate the summary.
+         *
+         * Supported values are:
+         *
+         * * `stable`: string. Default value when no value is specified. Uses a
+         *    generally available, fine-tuned model. For more information, see
+         *    [Answer generation model versions and
+         *    lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models).
+         * * `preview`: string. (Public preview) Uses a preview model. For more
+         *    information, see
+         *    [Answer generation model versions and
+         *    lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models).
          * 
* - * string preamble = 1; + * string version = 1; * - * @return The preamble. + * @return The version. */ - java.lang.String getPreamble(); + java.lang.String getVersion(); /** * * *
-         * Text at the beginning of the prompt that instructs the assistant.
-         * Examples are available in the user guide.
+         * The model version used to generate the summary.
+         *
+         * Supported values are:
+         *
+         * * `stable`: string. Default value when no value is specified. Uses a
+         *    generally available, fine-tuned model. For more information, see
+         *    [Answer generation model versions and
+         *    lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models).
+         * * `preview`: string. (Public preview) Uses a preview model. For more
+         *    information, see
+         *    [Answer generation model versions and
+         *    lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models).
          * 
* - * string preamble = 1; + * string version = 1; * - * @return The bytes for preamble. + * @return The bytes for version. */ - com.google.protobuf.ByteString getPreambleBytes(); + com.google.protobuf.ByteString getVersionBytes(); } /** * * *
-       * Specification of the prompt to use with the model.
+       * Specification of the model.
        * 
* * Protobuf type {@code - * google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec} + * google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec} */ - public static final class ModelPromptSpec extends com.google.protobuf.GeneratedMessageV3 + public static final class ModelSpec extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec) - ModelPromptSpecOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec) + ModelSpecOrBuilder { private static final long serialVersionUID = 0L; - // Use ModelPromptSpec.newBuilder() to construct. - private ModelPromptSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use ModelSpec.newBuilder() to construct. + private ModelSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private ModelPromptSpec() { - preamble_ = ""; + private ModelSpec() { + version_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ModelPromptSpec(); + return new ModelSpec(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_SummarySpec_ModelPromptSpec_descriptor; + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_SummarySpec_ModelSpec_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_SummarySpec_ModelPromptSpec_fieldAccessorTable + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_SummarySpec_ModelSpec_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec.ModelPromptSpec.class, + .SummarySpec.ModelSpec.class, com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec.ModelPromptSpec.Builder.class); + .SummarySpec.ModelSpec.Builder.class); } - public static final int PREAMBLE_FIELD_NUMBER = 1; + public static final int VERSION_FIELD_NUMBER = 1; @SuppressWarnings("serial") - private volatile java.lang.Object preamble_ = ""; + private volatile java.lang.Object version_ = ""; /** * * *
-         * Text at the beginning of the prompt that instructs the assistant.
-         * Examples are available in the user guide.
+         * The model version used to generate the summary.
+         *
+         * Supported values are:
+         *
+         * * `stable`: string. Default value when no value is specified. Uses a
+         *    generally available, fine-tuned model. For more information, see
+         *    [Answer generation model versions and
+         *    lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models).
+         * * `preview`: string. (Public preview) Uses a preview model. For more
+         *    information, see
+         *    [Answer generation model versions and
+         *    lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models).
          * 
* - * string preamble = 1; + * string version = 1; * - * @return The preamble. + * @return The version. */ @java.lang.Override - public java.lang.String getPreamble() { - java.lang.Object ref = preamble_; + public java.lang.String getVersion() { + java.lang.Object ref = version_; 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(); - preamble_ = s; + version_ = s; return s; } } @@ -12167,21 +16578,31 @@ public java.lang.String getPreamble() { * * *
-         * Text at the beginning of the prompt that instructs the assistant.
-         * Examples are available in the user guide.
+         * The model version used to generate the summary.
+         *
+         * Supported values are:
+         *
+         * * `stable`: string. Default value when no value is specified. Uses a
+         *    generally available, fine-tuned model. For more information, see
+         *    [Answer generation model versions and
+         *    lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models).
+         * * `preview`: string. (Public preview) Uses a preview model. For more
+         *    information, see
+         *    [Answer generation model versions and
+         *    lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models).
          * 
* - * string preamble = 1; + * string version = 1; * - * @return The bytes for preamble. + * @return The bytes for version. */ @java.lang.Override - public com.google.protobuf.ByteString getPreambleBytes() { - java.lang.Object ref = preamble_; + public com.google.protobuf.ByteString getVersionBytes() { + java.lang.Object ref = version_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - preamble_ = b; + version_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -12203,8 +16624,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(preamble_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, preamble_); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, version_); } getUnknownFields().writeTo(output); } @@ -12215,8 +16636,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(preamble_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, preamble_); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, version_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -12231,17 +16652,17 @@ public boolean equals(final java.lang.Object obj) { if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec - .ModelPromptSpec)) { + .ModelSpec)) { return super.equals(obj); } com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec - .ModelPromptSpec + .ModelSpec other = (com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec.ModelPromptSpec) + .SummarySpec.ModelSpec) obj; - if (!getPreamble().equals(other.getPreamble())) return false; + if (!getVersion().equals(other.getVersion())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -12253,22 +16674,22 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PREAMBLE_FIELD_NUMBER; - hash = (53 * hash) + getPreamble().hashCode(); + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec.ModelPromptSpec + .SummarySpec.ModelSpec parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec.ModelPromptSpec + .SummarySpec.ModelSpec parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -12277,14 +16698,14 @@ public int hashCode() { } public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec.ModelPromptSpec + .SummarySpec.ModelSpec parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec.ModelPromptSpec + .SummarySpec.ModelSpec parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -12293,26 +16714,26 @@ public int hashCode() { } public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec.ModelPromptSpec + .SummarySpec.ModelSpec parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec.ModelPromptSpec + .SummarySpec.ModelSpec parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec.ModelPromptSpec + .SummarySpec.ModelSpec parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec.ModelPromptSpec + .SummarySpec.ModelSpec parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -12322,14 +16743,14 @@ public int hashCode() { } public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec.ModelPromptSpec + .SummarySpec.ModelSpec parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input); } public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec.ModelPromptSpec + .SummarySpec.ModelSpec parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -12339,13 +16760,13 @@ public int hashCode() { } public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec.ModelPromptSpec + .SummarySpec.ModelSpec parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec.ModelPromptSpec + .SummarySpec.ModelSpec parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -12365,7 +16786,7 @@ public static Builder newBuilder() { public static Builder newBuilder( com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec - .ModelPromptSpec + .ModelSpec prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -12385,37 +16806,37 @@ protected Builder newBuilderForType( * * *
-         * Specification of the prompt to use with the model.
+         * Specification of the model.
          * 
* * Protobuf type {@code - * google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec} + * google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec) + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec) com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec - .ModelPromptSpecOrBuilder { + .ModelSpecOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_SummarySpec_ModelPromptSpec_descriptor; + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_SummarySpec_ModelSpec_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_SummarySpec_ModelPromptSpec_fieldAccessorTable + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_SummarySpec_ModelSpec_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec.ModelPromptSpec.class, + .SummarySpec.ModelSpec.class, com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec.ModelPromptSpec.Builder.class); + .SummarySpec.ModelSpec.Builder.class); } // Construct using - // com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec.newBuilder() + // com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { @@ -12426,30 +16847,30 @@ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { public Builder clear() { super.clear(); bitField0_ = 0; - preamble_ = ""; + version_ = ""; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_SummarySpec_ModelPromptSpec_descriptor; + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_SummarySpec_ModelSpec_descriptor; } @java.lang.Override public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec.ModelPromptSpec + .SummarySpec.ModelSpec getDefaultInstanceForType() { return com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec.ModelPromptSpec.getDefaultInstance(); + .SummarySpec.ModelSpec.getDefaultInstance(); } @java.lang.Override public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec.ModelPromptSpec + .SummarySpec.ModelSpec build() { com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec - .ModelPromptSpec + .ModelSpec result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); @@ -12459,13 +16880,13 @@ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { @java.lang.Override public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec.ModelPromptSpec + .SummarySpec.ModelSpec buildPartial() { com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec - .ModelPromptSpec + .ModelSpec result = new com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec.ModelPromptSpec(this); + .SummarySpec.ModelSpec(this); if (bitField0_ != 0) { buildPartial0(result); } @@ -12475,11 +16896,11 @@ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { private void buildPartial0( com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec - .ModelPromptSpec + .ModelSpec result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { - result.preamble_ = preamble_; + result.version_ = version_; } } @@ -12523,10 +16944,10 @@ public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec - .ModelPromptSpec) { + .ModelSpec) { return mergeFrom( (com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec.ModelPromptSpec) + .SummarySpec.ModelSpec) other); } else { super.mergeFrom(other); @@ -12536,13 +16957,13 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom( com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec - .ModelPromptSpec + .ModelSpec other) { if (other == com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec.ModelPromptSpec.getDefaultInstance()) return this; - if (!other.getPreamble().isEmpty()) { - preamble_ = other.preamble_; + .SummarySpec.ModelSpec.getDefaultInstance()) return this; + if (!other.getVersion().isEmpty()) { + version_ = other.version_; bitField0_ |= 0x00000001; onChanged(); } @@ -12574,7 +16995,7 @@ public Builder mergeFrom( break; case 10: { - preamble_ = input.readStringRequireUtf8(); + version_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 @@ -12597,25 +17018,35 @@ public Builder mergeFrom( private int bitField0_; - private java.lang.Object preamble_ = ""; + private java.lang.Object version_ = ""; /** * * *
-           * Text at the beginning of the prompt that instructs the assistant.
-           * Examples are available in the user guide.
+           * The model version used to generate the summary.
+           *
+           * Supported values are:
+           *
+           * * `stable`: string. Default value when no value is specified. Uses a
+           *    generally available, fine-tuned model. For more information, see
+           *    [Answer generation model versions and
+           *    lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models).
+           * * `preview`: string. (Public preview) Uses a preview model. For more
+           *    information, see
+           *    [Answer generation model versions and
+           *    lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models).
            * 
* - * string preamble = 1; + * string version = 1; * - * @return The preamble. + * @return The version. */ - public java.lang.String getPreamble() { - java.lang.Object ref = preamble_; + public java.lang.String getVersion() { + java.lang.Object ref = version_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - preamble_ = s; + version_ = s; return s; } else { return (java.lang.String) ref; @@ -12625,20 +17056,30 @@ public java.lang.String getPreamble() { * * *
-           * Text at the beginning of the prompt that instructs the assistant.
-           * Examples are available in the user guide.
+           * The model version used to generate the summary.
+           *
+           * Supported values are:
+           *
+           * * `stable`: string. Default value when no value is specified. Uses a
+           *    generally available, fine-tuned model. For more information, see
+           *    [Answer generation model versions and
+           *    lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models).
+           * * `preview`: string. (Public preview) Uses a preview model. For more
+           *    information, see
+           *    [Answer generation model versions and
+           *    lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models).
            * 
* - * string preamble = 1; + * string version = 1; * - * @return The bytes for preamble. + * @return The bytes for version. */ - public com.google.protobuf.ByteString getPreambleBytes() { - java.lang.Object ref = preamble_; + public com.google.protobuf.ByteString getVersionBytes() { + java.lang.Object ref = version_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - preamble_ = b; + version_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -12648,20 +17089,30 @@ public com.google.protobuf.ByteString getPreambleBytes() { * * *
-           * Text at the beginning of the prompt that instructs the assistant.
-           * Examples are available in the user guide.
+           * The model version used to generate the summary.
+           *
+           * Supported values are:
+           *
+           * * `stable`: string. Default value when no value is specified. Uses a
+           *    generally available, fine-tuned model. For more information, see
+           *    [Answer generation model versions and
+           *    lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models).
+           * * `preview`: string. (Public preview) Uses a preview model. For more
+           *    information, see
+           *    [Answer generation model versions and
+           *    lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models).
            * 
* - * string preamble = 1; + * string version = 1; * - * @param value The preamble to set. + * @param value The version to set. * @return This builder for chaining. */ - public Builder setPreamble(java.lang.String value) { + public Builder setVersion(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - preamble_ = value; + version_ = value; bitField0_ |= 0x00000001; onChanged(); return this; @@ -12670,16 +17121,26 @@ public Builder setPreamble(java.lang.String value) { * * *
-           * Text at the beginning of the prompt that instructs the assistant.
-           * Examples are available in the user guide.
+           * The model version used to generate the summary.
+           *
+           * Supported values are:
+           *
+           * * `stable`: string. Default value when no value is specified. Uses a
+           *    generally available, fine-tuned model. For more information, see
+           *    [Answer generation model versions and
+           *    lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models).
+           * * `preview`: string. (Public preview) Uses a preview model. For more
+           *    information, see
+           *    [Answer generation model versions and
+           *    lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models).
            * 
* - * string preamble = 1; + * string version = 1; * * @return This builder for chaining. */ - public Builder clearPreamble() { - preamble_ = getDefaultInstance().getPreamble(); + public Builder clearVersion() { + version_ = getDefaultInstance().getVersion(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; @@ -12688,21 +17149,31 @@ public Builder clearPreamble() { * * *
-           * Text at the beginning of the prompt that instructs the assistant.
-           * Examples are available in the user guide.
+           * The model version used to generate the summary.
+           *
+           * Supported values are:
+           *
+           * * `stable`: string. Default value when no value is specified. Uses a
+           *    generally available, fine-tuned model. For more information, see
+           *    [Answer generation model versions and
+           *    lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models).
+           * * `preview`: string. (Public preview) Uses a preview model. For more
+           *    information, see
+           *    [Answer generation model versions and
+           *    lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models).
            * 
* - * string preamble = 1; + * string version = 1; * - * @param value The bytes for preamble to set. + * @param value The bytes for version to set. * @return This builder for chaining. */ - public Builder setPreambleBytes(com.google.protobuf.ByteString value) { + public Builder setVersionBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); - preamble_ = value; + version_ = value; bitField0_ |= 0x00000001; onChanged(); return this; @@ -12720,30 +17191,30 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec) + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec) } - // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec) + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec) private static final com.google.cloud.discoveryengine.v1alpha.SearchRequest - .ContentSearchSpec.SummarySpec.ModelPromptSpec + .ContentSearchSpec.SummarySpec.ModelSpec DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec.ModelPromptSpec(); + .SummarySpec.ModelSpec(); } public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec.ModelPromptSpec + .SummarySpec.ModelSpec getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public ModelPromptSpec parsePartialFrom( + public ModelSpec parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -12763,2347 +17234,2934 @@ public ModelPromptSpec parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } - - @java.lang.Override - public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec - .ModelPromptSpec - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + .ModelSpec + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int SUMMARY_RESULT_COUNT_FIELD_NUMBER = 1; + private int summaryResultCount_ = 0; + /** + * + * + *
+       * The number of top results to generate the summary from. If the number
+       * of results returned is less than `summaryResultCount`, the summary is
+       * generated from all of the results.
+       *
+       * At most 10 results can be used to generate a summary.
+       * 
+ * + * int32 summary_result_count = 1; + * + * @return The summaryResultCount. + */ + @java.lang.Override + public int getSummaryResultCount() { + return summaryResultCount_; + } + + public static final int INCLUDE_CITATIONS_FIELD_NUMBER = 2; + private boolean includeCitations_ = false; + /** + * + * + *
+       * Specifies whether to include citations in the summary. The default
+       * value is `false`.
+       *
+       * When this field is set to `true`, summaries include in-line citation
+       * numbers.
+       *
+       * Example summary including citations:
+       *
+       * BigQuery is Google Cloud's fully managed and completely serverless
+       * enterprise data warehouse [1]. BigQuery supports all data types, works
+       * across clouds, and has built-in machine learning and business
+       * intelligence, all within a unified platform [2, 3].
+       *
+       * The citation numbers refer to the returned search results and are
+       * 1-indexed. For example, [1] means that the sentence is attributed to
+       * the first search result. [2, 3] means that the sentence is attributed
+       * to both the second and third search results.
+       * 
+ * + * bool include_citations = 2; + * + * @return The includeCitations. + */ + @java.lang.Override + public boolean getIncludeCitations() { + return includeCitations_; + } + + public static final int IGNORE_ADVERSARIAL_QUERY_FIELD_NUMBER = 3; + private boolean ignoreAdversarialQuery_ = false; + /** + * + * + *
+       * Specifies whether to filter out adversarial queries. The default value
+       * is `false`.
+       *
+       * Google employs search-query classification to detect adversarial
+       * queries. No summary is returned if the search query is classified as an
+       * adversarial query. For example, a user might ask a question regarding
+       * negative comments about the company or submit a query designed to
+       * generate unsafe, policy-violating output. If this field is set to
+       * `true`, we skip generating summaries for adversarial queries and return
+       * fallback messages instead.
+       * 
+ * + * bool ignore_adversarial_query = 3; + * + * @return The ignoreAdversarialQuery. + */ + @java.lang.Override + public boolean getIgnoreAdversarialQuery() { + return ignoreAdversarialQuery_; + } + + public static final int IGNORE_NON_SUMMARY_SEEKING_QUERY_FIELD_NUMBER = 4; + private boolean ignoreNonSummarySeekingQuery_ = false; + /** + * + * + *
+       * Specifies whether to filter out queries that are not summary-seeking.
+       * The default value is `false`.
+       *
+       * Google employs search-query classification to detect summary-seeking
+       * queries. No summary is returned if the search query is classified as a
+       * non-summary seeking query. For example, `why is the sky blue` and `Who
+       * is the best soccer player in the world?` are summary-seeking queries,
+       * but `SFO airport` and `world cup 2026` are not. They are most likely
+       * navigational queries. If this field is set to `true`, we skip
+       * generating summaries for non-summary seeking queries and return
+       * fallback messages instead.
+       * 
+ * + * bool ignore_non_summary_seeking_query = 4; + * + * @return The ignoreNonSummarySeekingQuery. + */ + @java.lang.Override + public boolean getIgnoreNonSummarySeekingQuery() { + return ignoreNonSummarySeekingQuery_; + } + + public static final int MODEL_PROMPT_SPEC_FIELD_NUMBER = 5; + private com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + .ModelPromptSpec + modelPromptSpec_; + /** + * + * + *
+       * If specified, the spec will be used to modify the prompt provided to
+       * the LLM.
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec model_prompt_spec = 5; + * + * + * @return Whether the modelPromptSpec field is set. + */ + @java.lang.Override + public boolean hasModelPromptSpec() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+       * If specified, the spec will be used to modify the prompt provided to
+       * the LLM.
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec model_prompt_spec = 5; + * + * + * @return The modelPromptSpec. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + .ModelPromptSpec + getModelPromptSpec() { + return modelPromptSpec_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + .ModelPromptSpec.getDefaultInstance() + : modelPromptSpec_; + } + /** + * + * + *
+       * If specified, the spec will be used to modify the prompt provided to
+       * the LLM.
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec model_prompt_spec = 5; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + .ModelPromptSpecOrBuilder + getModelPromptSpecOrBuilder() { + return modelPromptSpec_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + .ModelPromptSpec.getDefaultInstance() + : modelPromptSpec_; + } + + public static final int LANGUAGE_CODE_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object languageCode_ = ""; + /** + * + * + *
+       * Language code for Summary. Use language tags defined by
+       * [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
+       * Note: This is an experimental feature.
+       * 
+ * + * string language_code = 6; + * + * @return The languageCode. + */ + @java.lang.Override + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + 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(); + languageCode_ = s; + return s; + } + } + /** + * + * + *
+       * Language code for Summary. Use language tags defined by
+       * [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
+       * Note: This is an experimental feature.
+       * 
+ * + * string language_code = 6; + * + * @return The bytes for languageCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } } - public interface ModelSpecOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-         * The model version used to generate the summary.
-         *
-         * Supported values are:
-         *
-         * * `stable`: string. Default value when no value is specified. Uses a
-         *   generally available, fine-tuned version of the text-bison@001
-         *   model.
-         * * `preview`: string. (Public preview) Uses a fine-tuned version of
-         *   the text-bison@002 model. This model works only for summaries in
-         *   English.
-         * 
- * - * string version = 1; - * - * @return The version. - */ - java.lang.String getVersion(); - /** - * - * - *
-         * The model version used to generate the summary.
-         *
-         * Supported values are:
-         *
-         * * `stable`: string. Default value when no value is specified. Uses a
-         *   generally available, fine-tuned version of the text-bison@001
-         *   model.
-         * * `preview`: string. (Public preview) Uses a fine-tuned version of
-         *   the text-bison@002 model. This model works only for summaries in
-         *   English.
-         * 
- * - * string version = 1; - * - * @return The bytes for version. - */ - com.google.protobuf.ByteString getVersionBytes(); + public static final int MODEL_SPEC_FIELD_NUMBER = 7; + private com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + .ModelSpec + modelSpec_; + /** + * + * + *
+       * If specified, the spec will be used to modify the model specification
+       * provided to the LLM.
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec model_spec = 7; + * + * + * @return Whether the modelSpec field is set. + */ + @java.lang.Override + public boolean hasModelSpec() { + return ((bitField0_ & 0x00000002) != 0); } /** * * *
-       * Specification of the model.
+       * If specified, the spec will be used to modify the model specification
+       * provided to the LLM.
        * 
* - * Protobuf type {@code - * google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec} + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec model_spec = 7; + * + * + * @return The modelSpec. */ - public static final class ModelSpec extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec) - ModelSpecOrBuilder { - private static final long serialVersionUID = 0L; - // Use ModelSpec.newBuilder() to construct. - private ModelSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ModelSpec() { - version_ = ""; - } + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + .ModelSpec + getModelSpec() { + return modelSpec_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + .ModelSpec.getDefaultInstance() + : modelSpec_; + } + /** + * + * + *
+       * If specified, the spec will be used to modify the model specification
+       * provided to the LLM.
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec model_spec = 7; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + .ModelSpecOrBuilder + getModelSpecOrBuilder() { + return modelSpec_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + .ModelSpec.getDefaultInstance() + : modelSpec_; + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ModelSpec(); - } + public static final int USE_SEMANTIC_CHUNKS_FIELD_NUMBER = 8; + private boolean useSemanticChunks_ = false; + /** + * + * + *
+       * If true, answer will be generated from most relevant chunks from top
+       * search results. This feature will improve summary quality.
+       * Please note that with this feature enabled, not all top search results
+       * will be referenced and included in the reference list, so the citation
+       * source index only points to the search results listed in the reference
+       * list.
+       * 
+ * + * bool use_semantic_chunks = 8; + * + * @return The useSemanticChunks. + */ + @java.lang.Override + public boolean getUseSemanticChunks() { + return useSemanticChunks_; + } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_SummarySpec_ModelSpec_descriptor; - } + private byte memoizedIsInitialized = -1; - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_SummarySpec_ModelSpec_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec.ModelSpec.class, - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec.ModelSpec.Builder.class); - } + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; - public static final int VERSION_FIELD_NUMBER = 1; + memoizedIsInitialized = 1; + return true; + } - @SuppressWarnings("serial") - private volatile java.lang.Object version_ = ""; - /** - * - * - *
-         * The model version used to generate the summary.
-         *
-         * Supported values are:
-         *
-         * * `stable`: string. Default value when no value is specified. Uses a
-         *   generally available, fine-tuned version of the text-bison@001
-         *   model.
-         * * `preview`: string. (Public preview) Uses a fine-tuned version of
-         *   the text-bison@002 model. This model works only for summaries in
-         *   English.
-         * 
- * - * string version = 1; - * - * @return The version. - */ - @java.lang.Override - public java.lang.String getVersion() { - java.lang.Object ref = version_; - 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(); - version_ = s; - return s; - } + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (summaryResultCount_ != 0) { + output.writeInt32(1, summaryResultCount_); } - /** - * - * - *
-         * The model version used to generate the summary.
-         *
-         * Supported values are:
-         *
-         * * `stable`: string. Default value when no value is specified. Uses a
-         *   generally available, fine-tuned version of the text-bison@001
-         *   model.
-         * * `preview`: string. (Public preview) Uses a fine-tuned version of
-         *   the text-bison@002 model. This model works only for summaries in
-         *   English.
-         * 
- * - * string version = 1; - * - * @return The bytes for version. - */ - @java.lang.Override - public com.google.protobuf.ByteString getVersionBytes() { - java.lang.Object ref = version_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - version_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + if (includeCitations_ != false) { + output.writeBool(2, includeCitations_); + } + if (ignoreAdversarialQuery_ != false) { + output.writeBool(3, ignoreAdversarialQuery_); + } + if (ignoreNonSummarySeekingQuery_ != false) { + output.writeBool(4, ignoreNonSummarySeekingQuery_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(5, getModelPromptSpec()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, languageCode_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(7, getModelSpec()); } + if (useSemanticChunks_ != false) { + output.writeBool(8, useSemanticChunks_); + } + getUnknownFields().writeTo(output); + } - private byte memoizedIsInitialized = -1; + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + size = 0; + if (summaryResultCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, summaryResultCount_); + } + if (includeCitations_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, includeCitations_); + } + if (ignoreAdversarialQuery_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, ignoreAdversarialQuery_); + } + if (ignoreNonSummarySeekingQuery_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize( + 4, ignoreNonSummarySeekingQuery_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getModelPromptSpec()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, languageCode_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getModelSpec()); + } + if (useSemanticChunks_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(8, useSemanticChunks_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } - memoizedIsInitialized = 1; + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { return true; } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, version_); - } - getUnknownFields().writeTo(output); + if (!(obj + instanceof + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec)) { + return super.equals(obj); } + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec other = + (com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec) + obj; - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; + if (getSummaryResultCount() != other.getSummaryResultCount()) return false; + if (getIncludeCitations() != other.getIncludeCitations()) return false; + if (getIgnoreAdversarialQuery() != other.getIgnoreAdversarialQuery()) return false; + if (getIgnoreNonSummarySeekingQuery() != other.getIgnoreNonSummarySeekingQuery()) + return false; + if (hasModelPromptSpec() != other.hasModelPromptSpec()) return false; + if (hasModelPromptSpec()) { + if (!getModelPromptSpec().equals(other.getModelPromptSpec())) return false; + } + if (!getLanguageCode().equals(other.getLanguageCode())) return false; + if (hasModelSpec() != other.hasModelSpec()) return false; + if (hasModelSpec()) { + if (!getModelSpec().equals(other.getModelSpec())) return false; + } + if (getUseSemanticChunks() != other.getUseSemanticChunks()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, version_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SUMMARY_RESULT_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getSummaryResultCount(); + hash = (37 * hash) + INCLUDE_CITATIONS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIncludeCitations()); + hash = (37 * hash) + IGNORE_ADVERSARIAL_QUERY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIgnoreAdversarialQuery()); + hash = (37 * hash) + IGNORE_NON_SUMMARY_SEEKING_QUERY_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashBoolean(getIgnoreNonSummarySeekingQuery()); + if (hasModelPromptSpec()) { + hash = (37 * hash) + MODEL_PROMPT_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getModelPromptSpec().hashCode(); + } + hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getLanguageCode().hashCode(); + if (hasModelSpec()) { + hash = (37 * hash) + MODEL_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getModelSpec().hashCode(); } + hash = (37 * hash) + USE_SEMANTIC_CHUNKS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getUseSemanticChunks()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj - instanceof - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec - .ModelSpec)) { - return super.equals(obj); - } - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec - .ModelSpec - other = - (com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec.ModelSpec) - obj; + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - if (!getVersion().equals(other.getVersion())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + VERSION_FIELD_NUMBER; - hash = (53 * hash) + getVersion().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec.ModelSpec - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec.ModelSpec - parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec.ModelSpec - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec.ModelSpec - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec.ModelSpec - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } - public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec.ModelSpec - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } - public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec.ModelSpec - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec.ModelSpec - parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } - public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec.ModelSpec - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input); - } + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec.ModelSpec - parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec.ModelSpec - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec.ModelSpec - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * A specification for configuring a summary returned in a search
+       * response.
+       * 
+ * + * Protobuf type {@code + * google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec) + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_SummarySpec_descriptor; } @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_SummarySpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec.class, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec.Builder.class); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); + // Construct using + // com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); } - public static Builder newBuilder( - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec - .ModelSpec - prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getModelPromptSpecFieldBuilder(); + getModelSpecFieldBuilder(); + } } @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-         * Specification of the model.
-         * 
- * - * Protobuf type {@code - * google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec) - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec - .ModelSpecOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_SummarySpec_ModelSpec_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_SummarySpec_ModelSpec_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec.ModelSpec.class, - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec.ModelSpec.Builder.class); + public Builder clear() { + super.clear(); + bitField0_ = 0; + summaryResultCount_ = 0; + includeCitations_ = false; + ignoreAdversarialQuery_ = false; + ignoreNonSummarySeekingQuery_ = false; + modelPromptSpec_ = null; + if (modelPromptSpecBuilder_ != null) { + modelPromptSpecBuilder_.dispose(); + modelPromptSpecBuilder_ = null; } - - // Construct using - // com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); + languageCode_ = ""; + modelSpec_ = null; + if (modelSpecBuilder_ != null) { + modelSpecBuilder_.dispose(); + modelSpecBuilder_ = null; } + useSemanticChunks_ = false; + return this; + } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - version_ = ""; - return this; - } + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_SummarySpec_descriptor; + } - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_SummarySpec_ModelSpec_descriptor; - } + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec.getDefaultInstance(); + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec.ModelSpec - getDefaultInstanceForType() { - return com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec.ModelSpec.getDefaultInstance(); + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + build() { + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); } + return result; + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec.ModelSpec - build() { - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec - .ModelSpec - result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + buildPartial() { + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + result = + new com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec(this); + if (bitField0_ != 0) { + buildPartial0(result); } + onBuilt(); + return result; + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec.ModelSpec - buildPartial() { + private void buildPartial0( com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec - .ModelSpec - result = - new com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec.ModelSpec(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.summaryResultCount_ = summaryResultCount_; } - - private void buildPartial0( - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec - .ModelSpec - result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.version_ = version_; - } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.includeCitations_ = includeCitations_; } - - @java.lang.Override - public Builder clone() { - return super.clone(); + if (((from_bitField0_ & 0x00000004) != 0)) { + result.ignoreAdversarialQuery_ = ignoreAdversarialQuery_; } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); + if (((from_bitField0_ & 0x00000008) != 0)) { + result.ignoreNonSummarySeekingQuery_ = ignoreNonSummarySeekingQuery_; } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000010) != 0)) { + result.modelPromptSpec_ = + modelPromptSpecBuilder_ == null + ? modelPromptSpec_ + : modelPromptSpecBuilder_.build(); + to_bitField0_ |= 0x00000001; } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); + if (((from_bitField0_ & 0x00000020) != 0)) { + result.languageCode_ = languageCode_; } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); + if (((from_bitField0_ & 0x00000040) != 0)) { + result.modelSpec_ = modelSpecBuilder_ == null ? modelSpec_ : modelSpecBuilder_.build(); + to_bitField0_ |= 0x00000002; } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + if (((from_bitField0_ & 0x00000080) != 0)) { + result.useSemanticChunks_ = useSemanticChunks_; } + result.bitField0_ |= to_bitField0_; + } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec - .ModelSpec) { - return mergeFrom( - (com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec.ModelSpec) - other); - } else { - super.mergeFrom(other); - return this; - } - } + @java.lang.Override + public Builder clone() { + return super.clone(); + } - public Builder mergeFrom( - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec - .ModelSpec - other) { - if (other - == com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec.ModelSpec.getDefaultInstance()) return this; - if (!other.getVersion().isEmpty()) { - version_ = other.version_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } - @java.lang.Override - public final boolean isInitialized() { - return true; - } + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - version_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } - private int bitField0_; + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } - private java.lang.Object version_ = ""; - /** - * - * - *
-           * The model version used to generate the summary.
-           *
-           * Supported values are:
-           *
-           * * `stable`: string. Default value when no value is specified. Uses a
-           *   generally available, fine-tuned version of the text-bison@001
-           *   model.
-           * * `preview`: string. (Public preview) Uses a fine-tuned version of
-           *   the text-bison@002 model. This model works only for summaries in
-           *   English.
-           * 
- * - * string version = 1; - * - * @return The version. - */ - public java.lang.String getVersion() { - java.lang.Object ref = version_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - version_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-           * The model version used to generate the summary.
-           *
-           * Supported values are:
-           *
-           * * `stable`: string. Default value when no value is specified. Uses a
-           *   generally available, fine-tuned version of the text-bison@001
-           *   model.
-           * * `preview`: string. (Public preview) Uses a fine-tuned version of
-           *   the text-bison@002 model. This model works only for summaries in
-           *   English.
-           * 
- * - * string version = 1; - * - * @return The bytes for version. - */ - public com.google.protobuf.ByteString getVersionBytes() { - java.lang.Object ref = version_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - version_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-           * The model version used to generate the summary.
-           *
-           * Supported values are:
-           *
-           * * `stable`: string. Default value when no value is specified. Uses a
-           *   generally available, fine-tuned version of the text-bison@001
-           *   model.
-           * * `preview`: string. (Public preview) Uses a fine-tuned version of
-           *   the text-bison@002 model. This model works only for summaries in
-           *   English.
-           * 
- * - * string version = 1; - * - * @param value The version to set. - * @return This builder for chaining. - */ - public Builder setVersion(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - version_ = value; - bitField0_ |= 0x00000001; - onChanged(); + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec) + other); + } else { + super.mergeFrom(other); return this; } - /** - * - * - *
-           * The model version used to generate the summary.
-           *
-           * Supported values are:
-           *
-           * * `stable`: string. Default value when no value is specified. Uses a
-           *   generally available, fine-tuned version of the text-bison@001
-           *   model.
-           * * `preview`: string. (Public preview) Uses a fine-tuned version of
-           *   the text-bison@002 model. This model works only for summaries in
-           *   English.
-           * 
- * - * string version = 1; - * - * @return This builder for chaining. - */ - public Builder clearVersion() { - version_ = getDefaultInstance().getVersion(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec.getDefaultInstance()) return this; + if (other.getSummaryResultCount() != 0) { + setSummaryResultCount(other.getSummaryResultCount()); } - /** - * - * - *
-           * The model version used to generate the summary.
-           *
-           * Supported values are:
-           *
-           * * `stable`: string. Default value when no value is specified. Uses a
-           *   generally available, fine-tuned version of the text-bison@001
-           *   model.
-           * * `preview`: string. (Public preview) Uses a fine-tuned version of
-           *   the text-bison@002 model. This model works only for summaries in
-           *   English.
-           * 
- * - * string version = 1; - * - * @param value The bytes for version to set. - * @return This builder for chaining. - */ - public Builder setVersionBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - version_ = value; - bitField0_ |= 0x00000001; + if (other.getIncludeCitations() != false) { + setIncludeCitations(other.getIncludeCitations()); + } + if (other.getIgnoreAdversarialQuery() != false) { + setIgnoreAdversarialQuery(other.getIgnoreAdversarialQuery()); + } + if (other.getIgnoreNonSummarySeekingQuery() != false) { + setIgnoreNonSummarySeekingQuery(other.getIgnoreNonSummarySeekingQuery()); + } + if (other.hasModelPromptSpec()) { + mergeModelPromptSpec(other.getModelPromptSpec()); + } + if (!other.getLanguageCode().isEmpty()) { + languageCode_ = other.languageCode_; + bitField0_ |= 0x00000020; onChanged(); - return this; } - - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); + if (other.hasModelSpec()) { + mergeModelSpec(other.getModelSpec()); } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); + if (other.getUseSemanticChunks() != false) { + setUseSemanticChunks(other.getUseSemanticChunks()); } - - // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec) + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; } - // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec) - private static final com.google.cloud.discoveryengine.v1alpha.SearchRequest - .ContentSearchSpec.SummarySpec.ModelSpec - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec.ModelSpec(); + @java.lang.Override + public final boolean isInitialized() { + return true; } - public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec.ModelSpec - getDefaultInstance() { - return DEFAULT_INSTANCE; + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + summaryResultCount_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + includeCitations_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + ignoreAdversarialQuery_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: + { + ignoreNonSummarySeekingQuery_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: + { + input.readMessage( + getModelPromptSpecFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + languageCode_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + input.readMessage(getModelSpecFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 64: + { + useSemanticChunks_ = input.readBool(); + bitField0_ |= 0x00000080; + break; + } // case 64 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ModelSpec parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + private int bitField0_; - public static com.google.protobuf.Parser parser() { - return PARSER; + private int summaryResultCount_; + /** + * + * + *
+         * The number of top results to generate the summary from. If the number
+         * of results returned is less than `summaryResultCount`, the summary is
+         * generated from all of the results.
+         *
+         * At most 10 results can be used to generate a summary.
+         * 
+ * + * int32 summary_result_count = 1; + * + * @return The summaryResultCount. + */ + @java.lang.Override + public int getSummaryResultCount() { + return summaryResultCount_; + } + /** + * + * + *
+         * The number of top results to generate the summary from. If the number
+         * of results returned is less than `summaryResultCount`, the summary is
+         * generated from all of the results.
+         *
+         * At most 10 results can be used to generate a summary.
+         * 
+ * + * int32 summary_result_count = 1; + * + * @param value The summaryResultCount to set. + * @return This builder for chaining. + */ + public Builder setSummaryResultCount(int value) { + + summaryResultCount_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; + /** + * + * + *
+         * The number of top results to generate the summary from. If the number
+         * of results returned is less than `summaryResultCount`, the summary is
+         * generated from all of the results.
+         *
+         * At most 10 results can be used to generate a summary.
+         * 
+ * + * int32 summary_result_count = 1; + * + * @return This builder for chaining. + */ + public Builder clearSummaryResultCount() { + bitField0_ = (bitField0_ & ~0x00000001); + summaryResultCount_ = 0; + onChanged(); + return this; } + private boolean includeCitations_; + /** + * + * + *
+         * Specifies whether to include citations in the summary. The default
+         * value is `false`.
+         *
+         * When this field is set to `true`, summaries include in-line citation
+         * numbers.
+         *
+         * Example summary including citations:
+         *
+         * BigQuery is Google Cloud's fully managed and completely serverless
+         * enterprise data warehouse [1]. BigQuery supports all data types, works
+         * across clouds, and has built-in machine learning and business
+         * intelligence, all within a unified platform [2, 3].
+         *
+         * The citation numbers refer to the returned search results and are
+         * 1-indexed. For example, [1] means that the sentence is attributed to
+         * the first search result. [2, 3] means that the sentence is attributed
+         * to both the second and third search results.
+         * 
+ * + * bool include_citations = 2; + * + * @return The includeCitations. + */ @java.lang.Override - public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec - .ModelSpec - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; + public boolean getIncludeCitations() { + return includeCitations_; } - } - - private int bitField0_; - public static final int SUMMARY_RESULT_COUNT_FIELD_NUMBER = 1; - private int summaryResultCount_ = 0; - /** - * - * - *
-       * The number of top results to generate the summary from. If the number
-       * of results returned is less than `summaryResultCount`, the summary is
-       * generated from all of the results.
-       *
-       * At most 10 results can be used to generate a summary.
-       * 
- * - * int32 summary_result_count = 1; - * - * @return The summaryResultCount. - */ - @java.lang.Override - public int getSummaryResultCount() { - return summaryResultCount_; - } - - public static final int INCLUDE_CITATIONS_FIELD_NUMBER = 2; - private boolean includeCitations_ = false; - /** - * - * - *
-       * Specifies whether to include citations in the summary. The default
-       * value is `false`.
-       *
-       * When this field is set to `true`, summaries include in-line citation
-       * numbers.
-       *
-       * Example summary including citations:
-       *
-       * BigQuery is Google Cloud's fully managed and completely serverless
-       * enterprise data warehouse [1]. BigQuery supports all data types, works
-       * across clouds, and has built-in machine learning and business
-       * intelligence, all within a unified platform [2, 3].
-       *
-       * The citation numbers refer to the returned search results and are
-       * 1-indexed. For example, [1] means that the sentence is attributed to
-       * the first search result. [2, 3] means that the sentence is attributed
-       * to both the second and third search results.
-       * 
- * - * bool include_citations = 2; - * - * @return The includeCitations. - */ - @java.lang.Override - public boolean getIncludeCitations() { - return includeCitations_; - } - - public static final int IGNORE_ADVERSARIAL_QUERY_FIELD_NUMBER = 3; - private boolean ignoreAdversarialQuery_ = false; - /** - * - * - *
-       * Specifies whether to filter out adversarial queries. The default value
-       * is `false`.
-       *
-       * Google employs search-query classification to detect adversarial
-       * queries. No summary is returned if the search query is classified as an
-       * adversarial query. For example, a user might ask a question regarding
-       * negative comments about the company or submit a query designed to
-       * generate unsafe, policy-violating output. If this field is set to
-       * `true`, we skip generating summaries for adversarial queries and return
-       * fallback messages instead.
-       * 
- * - * bool ignore_adversarial_query = 3; - * - * @return The ignoreAdversarialQuery. - */ - @java.lang.Override - public boolean getIgnoreAdversarialQuery() { - return ignoreAdversarialQuery_; - } - - public static final int IGNORE_NON_SUMMARY_SEEKING_QUERY_FIELD_NUMBER = 4; - private boolean ignoreNonSummarySeekingQuery_ = false; - /** - * - * - *
-       * Specifies whether to filter out queries that are not summary-seeking.
-       * The default value is `false`.
-       *
-       * Google employs search-query classification to detect summary-seeking
-       * queries. No summary is returned if the search query is classified as a
-       * non-summary seeking query. For example, `why is the sky blue` and `Who
-       * is the best soccer player in the world?` are summary-seeking queries,
-       * but `SFO airport` and `world cup 2026` are not. They are most likely
-       * navigational queries. If this field is set to `true`, we skip
-       * generating summaries for non-summary seeking queries and return
-       * fallback messages instead.
-       * 
- * - * bool ignore_non_summary_seeking_query = 4; - * - * @return The ignoreNonSummarySeekingQuery. - */ - @java.lang.Override - public boolean getIgnoreNonSummarySeekingQuery() { - return ignoreNonSummarySeekingQuery_; - } - - public static final int MODEL_PROMPT_SPEC_FIELD_NUMBER = 5; - private com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec - .ModelPromptSpec - modelPromptSpec_; - /** - * - * - *
-       * If specified, the spec will be used to modify the prompt provided to
-       * the LLM.
-       * 
- * - * - * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec model_prompt_spec = 5; - * - * - * @return Whether the modelPromptSpec field is set. - */ - @java.lang.Override - public boolean hasModelPromptSpec() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * - * - *
-       * If specified, the spec will be used to modify the prompt provided to
-       * the LLM.
-       * 
- * - * - * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec model_prompt_spec = 5; - * - * - * @return The modelPromptSpec. - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec - .ModelPromptSpec - getModelPromptSpec() { - return modelPromptSpec_ == null - ? com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec - .ModelPromptSpec.getDefaultInstance() - : modelPromptSpec_; - } - /** - * - * - *
-       * If specified, the spec will be used to modify the prompt provided to
-       * the LLM.
-       * 
- * - * - * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec model_prompt_spec = 5; - * - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec - .ModelPromptSpecOrBuilder - getModelPromptSpecOrBuilder() { - return modelPromptSpec_ == null - ? com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec - .ModelPromptSpec.getDefaultInstance() - : modelPromptSpec_; - } - - public static final int LANGUAGE_CODE_FIELD_NUMBER = 6; + /** + * + * + *
+         * Specifies whether to include citations in the summary. The default
+         * value is `false`.
+         *
+         * When this field is set to `true`, summaries include in-line citation
+         * numbers.
+         *
+         * Example summary including citations:
+         *
+         * BigQuery is Google Cloud's fully managed and completely serverless
+         * enterprise data warehouse [1]. BigQuery supports all data types, works
+         * across clouds, and has built-in machine learning and business
+         * intelligence, all within a unified platform [2, 3].
+         *
+         * The citation numbers refer to the returned search results and are
+         * 1-indexed. For example, [1] means that the sentence is attributed to
+         * the first search result. [2, 3] means that the sentence is attributed
+         * to both the second and third search results.
+         * 
+ * + * bool include_citations = 2; + * + * @param value The includeCitations to set. + * @return This builder for chaining. + */ + public Builder setIncludeCitations(boolean value) { - @SuppressWarnings("serial") - private volatile java.lang.Object languageCode_ = ""; - /** - * - * - *
-       * Language code for Summary. Use language tags defined by
-       * [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
-       * Note: This is an experimental feature.
-       * 
- * - * string language_code = 6; - * - * @return The languageCode. - */ - @java.lang.Override - public java.lang.String getLanguageCode() { - java.lang.Object ref = languageCode_; - 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(); - languageCode_ = s; - return s; + includeCitations_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; } - } - /** - * - * - *
-       * Language code for Summary. Use language tags defined by
-       * [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
-       * Note: This is an experimental feature.
-       * 
- * - * string language_code = 6; - * - * @return The bytes for languageCode. - */ - @java.lang.Override - public com.google.protobuf.ByteString getLanguageCodeBytes() { - java.lang.Object ref = languageCode_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - languageCode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + /** + * + * + *
+         * Specifies whether to include citations in the summary. The default
+         * value is `false`.
+         *
+         * When this field is set to `true`, summaries include in-line citation
+         * numbers.
+         *
+         * Example summary including citations:
+         *
+         * BigQuery is Google Cloud's fully managed and completely serverless
+         * enterprise data warehouse [1]. BigQuery supports all data types, works
+         * across clouds, and has built-in machine learning and business
+         * intelligence, all within a unified platform [2, 3].
+         *
+         * The citation numbers refer to the returned search results and are
+         * 1-indexed. For example, [1] means that the sentence is attributed to
+         * the first search result. [2, 3] means that the sentence is attributed
+         * to both the second and third search results.
+         * 
+ * + * bool include_citations = 2; + * + * @return This builder for chaining. + */ + public Builder clearIncludeCitations() { + bitField0_ = (bitField0_ & ~0x00000002); + includeCitations_ = false; + onChanged(); + return this; } - } - public static final int MODEL_SPEC_FIELD_NUMBER = 7; - private com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec - .ModelSpec - modelSpec_; - /** - * - * - *
-       * If specified, the spec will be used to modify the model specification
-       * provided to the LLM.
-       * 
- * - * - * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec model_spec = 7; - * - * - * @return Whether the modelSpec field is set. - */ - @java.lang.Override - public boolean hasModelSpec() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * - * - *
-       * If specified, the spec will be used to modify the model specification
-       * provided to the LLM.
-       * 
- * - * - * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec model_spec = 7; - * - * - * @return The modelSpec. - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec - .ModelSpec - getModelSpec() { - return modelSpec_ == null - ? com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec - .ModelSpec.getDefaultInstance() - : modelSpec_; - } - /** - * - * - *
-       * If specified, the spec will be used to modify the model specification
-       * provided to the LLM.
-       * 
- * - * - * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec model_spec = 7; - * - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec - .ModelSpecOrBuilder - getModelSpecOrBuilder() { - return modelSpec_ == null - ? com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec - .ModelSpec.getDefaultInstance() - : modelSpec_; - } + private boolean ignoreAdversarialQuery_; + /** + * + * + *
+         * Specifies whether to filter out adversarial queries. The default value
+         * is `false`.
+         *
+         * Google employs search-query classification to detect adversarial
+         * queries. No summary is returned if the search query is classified as an
+         * adversarial query. For example, a user might ask a question regarding
+         * negative comments about the company or submit a query designed to
+         * generate unsafe, policy-violating output. If this field is set to
+         * `true`, we skip generating summaries for adversarial queries and return
+         * fallback messages instead.
+         * 
+ * + * bool ignore_adversarial_query = 3; + * + * @return The ignoreAdversarialQuery. + */ + @java.lang.Override + public boolean getIgnoreAdversarialQuery() { + return ignoreAdversarialQuery_; + } + /** + * + * + *
+         * Specifies whether to filter out adversarial queries. The default value
+         * is `false`.
+         *
+         * Google employs search-query classification to detect adversarial
+         * queries. No summary is returned if the search query is classified as an
+         * adversarial query. For example, a user might ask a question regarding
+         * negative comments about the company or submit a query designed to
+         * generate unsafe, policy-violating output. If this field is set to
+         * `true`, we skip generating summaries for adversarial queries and return
+         * fallback messages instead.
+         * 
+ * + * bool ignore_adversarial_query = 3; + * + * @param value The ignoreAdversarialQuery to set. + * @return This builder for chaining. + */ + public Builder setIgnoreAdversarialQuery(boolean value) { - private byte memoizedIsInitialized = -1; + ignoreAdversarialQuery_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+         * Specifies whether to filter out adversarial queries. The default value
+         * is `false`.
+         *
+         * Google employs search-query classification to detect adversarial
+         * queries. No summary is returned if the search query is classified as an
+         * adversarial query. For example, a user might ask a question regarding
+         * negative comments about the company or submit a query designed to
+         * generate unsafe, policy-violating output. If this field is set to
+         * `true`, we skip generating summaries for adversarial queries and return
+         * fallback messages instead.
+         * 
+ * + * bool ignore_adversarial_query = 3; + * + * @return This builder for chaining. + */ + public Builder clearIgnoreAdversarialQuery() { + bitField0_ = (bitField0_ & ~0x00000004); + ignoreAdversarialQuery_ = false; + onChanged(); + return this; + } - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + private boolean ignoreNonSummarySeekingQuery_; + /** + * + * + *
+         * Specifies whether to filter out queries that are not summary-seeking.
+         * The default value is `false`.
+         *
+         * Google employs search-query classification to detect summary-seeking
+         * queries. No summary is returned if the search query is classified as a
+         * non-summary seeking query. For example, `why is the sky blue` and `Who
+         * is the best soccer player in the world?` are summary-seeking queries,
+         * but `SFO airport` and `world cup 2026` are not. They are most likely
+         * navigational queries. If this field is set to `true`, we skip
+         * generating summaries for non-summary seeking queries and return
+         * fallback messages instead.
+         * 
+ * + * bool ignore_non_summary_seeking_query = 4; + * + * @return The ignoreNonSummarySeekingQuery. + */ + @java.lang.Override + public boolean getIgnoreNonSummarySeekingQuery() { + return ignoreNonSummarySeekingQuery_; + } + /** + * + * + *
+         * Specifies whether to filter out queries that are not summary-seeking.
+         * The default value is `false`.
+         *
+         * Google employs search-query classification to detect summary-seeking
+         * queries. No summary is returned if the search query is classified as a
+         * non-summary seeking query. For example, `why is the sky blue` and `Who
+         * is the best soccer player in the world?` are summary-seeking queries,
+         * but `SFO airport` and `world cup 2026` are not. They are most likely
+         * navigational queries. If this field is set to `true`, we skip
+         * generating summaries for non-summary seeking queries and return
+         * fallback messages instead.
+         * 
+ * + * bool ignore_non_summary_seeking_query = 4; + * + * @param value The ignoreNonSummarySeekingQuery to set. + * @return This builder for chaining. + */ + public Builder setIgnoreNonSummarySeekingQuery(boolean value) { - memoizedIsInitialized = 1; - return true; - } + ignoreNonSummarySeekingQuery_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+         * Specifies whether to filter out queries that are not summary-seeking.
+         * The default value is `false`.
+         *
+         * Google employs search-query classification to detect summary-seeking
+         * queries. No summary is returned if the search query is classified as a
+         * non-summary seeking query. For example, `why is the sky blue` and `Who
+         * is the best soccer player in the world?` are summary-seeking queries,
+         * but `SFO airport` and `world cup 2026` are not. They are most likely
+         * navigational queries. If this field is set to `true`, we skip
+         * generating summaries for non-summary seeking queries and return
+         * fallback messages instead.
+         * 
+ * + * bool ignore_non_summary_seeking_query = 4; + * + * @return This builder for chaining. + */ + public Builder clearIgnoreNonSummarySeekingQuery() { + bitField0_ = (bitField0_ & ~0x00000008); + ignoreNonSummarySeekingQuery_ = false; + onChanged(); + return this; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (summaryResultCount_ != 0) { - output.writeInt32(1, summaryResultCount_); + private com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + .ModelPromptSpec + modelPromptSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + .ModelPromptSpec, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + .ModelPromptSpec.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + .ModelPromptSpecOrBuilder> + modelPromptSpecBuilder_; + /** + * + * + *
+         * If specified, the spec will be used to modify the prompt provided to
+         * the LLM.
+         * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec model_prompt_spec = 5; + * + * + * @return Whether the modelPromptSpec field is set. + */ + public boolean hasModelPromptSpec() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+         * If specified, the spec will be used to modify the prompt provided to
+         * the LLM.
+         * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec model_prompt_spec = 5; + * + * + * @return The modelPromptSpec. + */ + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + .ModelPromptSpec + getModelPromptSpec() { + if (modelPromptSpecBuilder_ == null) { + return modelPromptSpec_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec.ModelPromptSpec.getDefaultInstance() + : modelPromptSpec_; + } else { + return modelPromptSpecBuilder_.getMessage(); + } + } + /** + * + * + *
+         * If specified, the spec will be used to modify the prompt provided to
+         * the LLM.
+         * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec model_prompt_spec = 5; + * + */ + public Builder setModelPromptSpec( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + .ModelPromptSpec + value) { + if (modelPromptSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + modelPromptSpec_ = value; + } else { + modelPromptSpecBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+         * If specified, the spec will be used to modify the prompt provided to
+         * the LLM.
+         * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec model_prompt_spec = 5; + * + */ + public Builder setModelPromptSpec( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + .ModelPromptSpec.Builder + builderForValue) { + if (modelPromptSpecBuilder_ == null) { + modelPromptSpec_ = builderForValue.build(); + } else { + modelPromptSpecBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+         * If specified, the spec will be used to modify the prompt provided to
+         * the LLM.
+         * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec model_prompt_spec = 5; + * + */ + public Builder mergeModelPromptSpec( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + .ModelPromptSpec + value) { + if (modelPromptSpecBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && modelPromptSpec_ != null + && modelPromptSpec_ + != com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec.ModelPromptSpec.getDefaultInstance()) { + getModelPromptSpecBuilder().mergeFrom(value); + } else { + modelPromptSpec_ = value; + } + } else { + modelPromptSpecBuilder_.mergeFrom(value); + } + if (modelPromptSpec_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + * + * + *
+         * If specified, the spec will be used to modify the prompt provided to
+         * the LLM.
+         * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec model_prompt_spec = 5; + * + */ + public Builder clearModelPromptSpec() { + bitField0_ = (bitField0_ & ~0x00000010); + modelPromptSpec_ = null; + if (modelPromptSpecBuilder_ != null) { + modelPromptSpecBuilder_.dispose(); + modelPromptSpecBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+         * If specified, the spec will be used to modify the prompt provided to
+         * the LLM.
+         * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec model_prompt_spec = 5; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + .ModelPromptSpec.Builder + getModelPromptSpecBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getModelPromptSpecFieldBuilder().getBuilder(); } - if (includeCitations_ != false) { - output.writeBool(2, includeCitations_); + /** + * + * + *
+         * If specified, the spec will be used to modify the prompt provided to
+         * the LLM.
+         * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec model_prompt_spec = 5; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + .ModelPromptSpecOrBuilder + getModelPromptSpecOrBuilder() { + if (modelPromptSpecBuilder_ != null) { + return modelPromptSpecBuilder_.getMessageOrBuilder(); + } else { + return modelPromptSpec_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec.ModelPromptSpec.getDefaultInstance() + : modelPromptSpec_; + } } - if (ignoreAdversarialQuery_ != false) { - output.writeBool(3, ignoreAdversarialQuery_); + /** + * + * + *
+         * If specified, the spec will be used to modify the prompt provided to
+         * the LLM.
+         * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec model_prompt_spec = 5; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + .ModelPromptSpec, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + .ModelPromptSpec.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + .ModelPromptSpecOrBuilder> + getModelPromptSpecFieldBuilder() { + if (modelPromptSpecBuilder_ == null) { + modelPromptSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec.ModelPromptSpec, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec.ModelPromptSpec.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec.ModelPromptSpecOrBuilder>( + getModelPromptSpec(), getParentForChildren(), isClean()); + modelPromptSpec_ = null; + } + return modelPromptSpecBuilder_; } - if (ignoreNonSummarySeekingQuery_ != false) { - output.writeBool(4, ignoreNonSummarySeekingQuery_); + + private java.lang.Object languageCode_ = ""; + /** + * + * + *
+         * Language code for Summary. Use language tags defined by
+         * [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
+         * Note: This is an experimental feature.
+         * 
+ * + * string language_code = 6; + * + * @return The languageCode. + */ + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(5, getModelPromptSpec()); + /** + * + * + *
+         * Language code for Summary. Use language tags defined by
+         * [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
+         * Note: This is an experimental feature.
+         * 
+ * + * string language_code = 6; + * + * @return The bytes for languageCode. + */ + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, languageCode_); + /** + * + * + *
+         * Language code for Summary. Use language tags defined by
+         * [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
+         * Note: This is an experimental feature.
+         * 
+ * + * string language_code = 6; + * + * @param value The languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + languageCode_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(7, getModelSpec()); + /** + * + * + *
+         * Language code for Summary. Use language tags defined by
+         * [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
+         * Note: This is an experimental feature.
+         * 
+ * + * string language_code = 6; + * + * @return This builder for chaining. + */ + public Builder clearLanguageCode() { + languageCode_ = getDefaultInstance().getLanguageCode(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+         * Language code for Summary. Use language tags defined by
+         * [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
+         * Note: This is an experimental feature.
+         * 
+ * + * string language_code = 6; + * + * @param value The bytes for languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + languageCode_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - size = 0; - if (summaryResultCount_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, summaryResultCount_); + private com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + .ModelSpec + modelSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + .ModelSpec, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + .ModelSpec.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + .ModelSpecOrBuilder> + modelSpecBuilder_; + /** + * + * + *
+         * If specified, the spec will be used to modify the model specification
+         * provided to the LLM.
+         * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec model_spec = 7; + * + * + * @return Whether the modelSpec field is set. + */ + public boolean hasModelSpec() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+         * If specified, the spec will be used to modify the model specification
+         * provided to the LLM.
+         * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec model_spec = 7; + * + * + * @return The modelSpec. + */ + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + .ModelSpec + getModelSpec() { + if (modelSpecBuilder_ == null) { + return modelSpec_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec.ModelSpec.getDefaultInstance() + : modelSpec_; + } else { + return modelSpecBuilder_.getMessage(); + } + } + /** + * + * + *
+         * If specified, the spec will be used to modify the model specification
+         * provided to the LLM.
+         * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec model_spec = 7; + * + */ + public Builder setModelSpec( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + .ModelSpec + value) { + if (modelSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + modelSpec_ = value; + } else { + modelSpecBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; } - if (includeCitations_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, includeCitations_); + /** + * + * + *
+         * If specified, the spec will be used to modify the model specification
+         * provided to the LLM.
+         * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec model_spec = 7; + * + */ + public Builder setModelSpec( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + .ModelSpec.Builder + builderForValue) { + if (modelSpecBuilder_ == null) { + modelSpec_ = builderForValue.build(); + } else { + modelSpecBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; } - if (ignoreAdversarialQuery_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, ignoreAdversarialQuery_); + /** + * + * + *
+         * If specified, the spec will be used to modify the model specification
+         * provided to the LLM.
+         * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec model_spec = 7; + * + */ + public Builder mergeModelSpec( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + .ModelSpec + value) { + if (modelSpecBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && modelSpec_ != null + && modelSpec_ + != com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec.ModelSpec.getDefaultInstance()) { + getModelSpecBuilder().mergeFrom(value); + } else { + modelSpec_ = value; + } + } else { + modelSpecBuilder_.mergeFrom(value); + } + if (modelSpec_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; } - if (ignoreNonSummarySeekingQuery_ != false) { - size += - com.google.protobuf.CodedOutputStream.computeBoolSize( - 4, ignoreNonSummarySeekingQuery_); + /** + * + * + *
+         * If specified, the spec will be used to modify the model specification
+         * provided to the LLM.
+         * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec model_spec = 7; + * + */ + public Builder clearModelSpec() { + bitField0_ = (bitField0_ & ~0x00000040); + modelSpec_ = null; + if (modelSpecBuilder_ != null) { + modelSpecBuilder_.dispose(); + modelSpecBuilder_ = null; + } + onChanged(); + return this; } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getModelPromptSpec()); + /** + * + * + *
+         * If specified, the spec will be used to modify the model specification
+         * provided to the LLM.
+         * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec model_spec = 7; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + .ModelSpec.Builder + getModelSpecBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getModelSpecFieldBuilder().getBuilder(); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, languageCode_); + /** + * + * + *
+         * If specified, the spec will be used to modify the model specification
+         * provided to the LLM.
+         * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec model_spec = 7; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + .ModelSpecOrBuilder + getModelSpecOrBuilder() { + if (modelSpecBuilder_ != null) { + return modelSpecBuilder_.getMessageOrBuilder(); + } else { + return modelSpec_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec.ModelSpec.getDefaultInstance() + : modelSpec_; + } } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getModelSpec()); + /** + * + * + *
+         * If specified, the spec will be used to modify the model specification
+         * provided to the LLM.
+         * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec model_spec = 7; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + .ModelSpec, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + .ModelSpec.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + .ModelSpecOrBuilder> + getModelSpecFieldBuilder() { + if (modelSpecBuilder_ == null) { + modelSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec.ModelSpec, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec.ModelSpec.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec.ModelSpecOrBuilder>( + getModelSpec(), getParentForChildren(), isClean()); + modelSpec_ = null; + } + return modelSpecBuilder_; } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj - instanceof - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec)) { - return super.equals(obj); + private boolean useSemanticChunks_; + /** + * + * + *
+         * If true, answer will be generated from most relevant chunks from top
+         * search results. This feature will improve summary quality.
+         * Please note that with this feature enabled, not all top search results
+         * will be referenced and included in the reference list, so the citation
+         * source index only points to the search results listed in the reference
+         * list.
+         * 
+ * + * bool use_semantic_chunks = 8; + * + * @return The useSemanticChunks. + */ + @java.lang.Override + public boolean getUseSemanticChunks() { + return useSemanticChunks_; } - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec other = - (com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec) - obj; + /** + * + * + *
+         * If true, answer will be generated from most relevant chunks from top
+         * search results. This feature will improve summary quality.
+         * Please note that with this feature enabled, not all top search results
+         * will be referenced and included in the reference list, so the citation
+         * source index only points to the search results listed in the reference
+         * list.
+         * 
+ * + * bool use_semantic_chunks = 8; + * + * @param value The useSemanticChunks to set. + * @return This builder for chaining. + */ + public Builder setUseSemanticChunks(boolean value) { - if (getSummaryResultCount() != other.getSummaryResultCount()) return false; - if (getIncludeCitations() != other.getIncludeCitations()) return false; - if (getIgnoreAdversarialQuery() != other.getIgnoreAdversarialQuery()) return false; - if (getIgnoreNonSummarySeekingQuery() != other.getIgnoreNonSummarySeekingQuery()) - return false; - if (hasModelPromptSpec() != other.hasModelPromptSpec()) return false; - if (hasModelPromptSpec()) { - if (!getModelPromptSpec().equals(other.getModelPromptSpec())) return false; - } - if (!getLanguageCode().equals(other.getLanguageCode())) return false; - if (hasModelSpec() != other.hasModelSpec()) return false; - if (hasModelSpec()) { - if (!getModelSpec().equals(other.getModelSpec())) return false; + useSemanticChunks_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; + /** + * + * + *
+         * If true, answer will be generated from most relevant chunks from top
+         * search results. This feature will improve summary quality.
+         * Please note that with this feature enabled, not all top search results
+         * will be referenced and included in the reference list, so the citation
+         * source index only points to the search results listed in the reference
+         * list.
+         * 
+ * + * bool use_semantic_chunks = 8; + * + * @return This builder for chaining. + */ + public Builder clearUseSemanticChunks() { + bitField0_ = (bitField0_ & ~0x00000080); + useSemanticChunks_ = false; + onChanged(); + return this; } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + SUMMARY_RESULT_COUNT_FIELD_NUMBER; - hash = (53 * hash) + getSummaryResultCount(); - hash = (37 * hash) + INCLUDE_CITATIONS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIncludeCitations()); - hash = (37 * hash) + IGNORE_ADVERSARIAL_QUERY_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIgnoreAdversarialQuery()); - hash = (37 * hash) + IGNORE_NON_SUMMARY_SEEKING_QUERY_FIELD_NUMBER; - hash = - (53 * hash) - + com.google.protobuf.Internal.hashBoolean(getIgnoreNonSummarySeekingQuery()); - if (hasModelPromptSpec()) { - hash = (37 * hash) + MODEL_PROMPT_SPEC_FIELD_NUMBER; - hash = (53 * hash) + getModelPromptSpec().hashCode(); + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); } - hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; - hash = (53 * hash) + getLanguageCode().hashCode(); - if (hasModelSpec()) { - hash = (37 * hash) + MODEL_SPEC_FIELD_NUMBER; - hash = (53 * hash) + getModelSpec().hashCode(); + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec) } - public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec) + private static final com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec .SummarySpec - parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + DEFAULT_INSTANCE; - public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec(); } public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec .SummarySpec - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + getDefaultInstance() { + return DEFAULT_INSTANCE; } - public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SummarySpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; - public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + public static com.google.protobuf.Parser parser() { + return PARSER; } - public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; } - public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec - parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } + } - public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } + public interface ExtractiveContentSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ExtractiveContentSpec) + com.google.protobuf.MessageOrBuilder { - public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec - parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + /** + * + * + *
+       * The maximum number of extractive answers returned in each search
+       * result.
+       *
+       * An extractive answer is a verbatim answer extracted from the original
+       * document, which provides a precise and contextually relevant answer to
+       * the search query.
+       *
+       * If the number of matching answers is less than the
+       * `max_extractive_answer_count`, return all of the answers. Otherwise,
+       * return the `max_extractive_answer_count`.
+       *
+       * At most five answers are returned for each
+       * [SearchResult][google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult].
+       * 
+ * + * int32 max_extractive_answer_count = 1; + * + * @return The maxExtractiveAnswerCount. + */ + int getMaxExtractiveAnswerCount(); + + /** + * + * + *
+       * The max number of extractive segments returned in each search result.
+       * Only applied if the
+       * [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] is set to
+       * [DataStore.ContentConfig.CONTENT_REQUIRED][google.cloud.discoveryengine.v1alpha.DataStore.ContentConfig.CONTENT_REQUIRED]
+       * or
+       * [DataStore.solution_types][google.cloud.discoveryengine.v1alpha.DataStore.solution_types]
+       * is
+       * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_CHAT].
+       *
+       * An extractive segment is a text segment extracted from the original
+       * document that is relevant to the search query, and, in general, more
+       * verbose than an extractive answer. The segment could then be used as
+       * input for LLMs to generate summaries and answers.
+       *
+       * If the number of matching segments is less than
+       * `max_extractive_segment_count`, return all of the segments. Otherwise,
+       * return the `max_extractive_segment_count`.
+       * 
+ * + * int32 max_extractive_segment_count = 2; + * + * @return The maxExtractiveSegmentCount. + */ + int getMaxExtractiveSegmentCount(); + + /** + * + * + *
+       * Specifies whether to return the confidence score from the extractive
+       * segments in each search result. This feature is available only for new
+       * or allowlisted data stores. To allowlist your data store, please
+       * contact your Customer Engineer. The default value is `false`.
+       * 
+ * + * bool return_extractive_segment_score = 3; + * + * @return The returnExtractiveSegmentScore. + */ + boolean getReturnExtractiveSegmentScore(); + + /** + * + * + *
+       * Specifies whether to also include the adjacent from each selected
+       * segments.
+       * Return at most `num_previous_segments` segments before each selected
+       * segments.
+       * 
+ * + * int32 num_previous_segments = 4; + * + * @return The numPreviousSegments. + */ + int getNumPreviousSegments(); + + /** + * + * + *
+       * Return at most `num_next_segments` segments after each selected
+       * segments.
+       * 
+ * + * int32 num_next_segments = 5; + * + * @return The numNextSegments. + */ + int getNumNextSegments(); + } + /** + * + * + *
+     * A specification for configuring the extractive content in a search
+     * response.
+     * 
+ * + * Protobuf type {@code + * google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ExtractiveContentSpec} + */ + public static final class ExtractiveContentSpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ExtractiveContentSpec) + ExtractiveContentSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExtractiveContentSpec.newBuilder() to construct. + private ExtractiveContentSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); } - public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + private ExtractiveContentSpec() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExtractiveContentSpec(); } - public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_ExtractiveContentSpec_descriptor; } @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_ExtractiveContentSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec.class, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec.Builder.class); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); + public static final int MAX_EXTRACTIVE_ANSWER_COUNT_FIELD_NUMBER = 1; + private int maxExtractiveAnswerCount_ = 0; + /** + * + * + *
+       * The maximum number of extractive answers returned in each search
+       * result.
+       *
+       * An extractive answer is a verbatim answer extracted from the original
+       * document, which provides a precise and contextually relevant answer to
+       * the search query.
+       *
+       * If the number of matching answers is less than the
+       * `max_extractive_answer_count`, return all of the answers. Otherwise,
+       * return the `max_extractive_answer_count`.
+       *
+       * At most five answers are returned for each
+       * [SearchResult][google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult].
+       * 
+ * + * int32 max_extractive_answer_count = 1; + * + * @return The maxExtractiveAnswerCount. + */ + @java.lang.Override + public int getMaxExtractiveAnswerCount() { + return maxExtractiveAnswerCount_; } - public static Builder newBuilder( - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec - prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + public static final int MAX_EXTRACTIVE_SEGMENT_COUNT_FIELD_NUMBER = 2; + private int maxExtractiveSegmentCount_ = 0; + /** + * + * + *
+       * The max number of extractive segments returned in each search result.
+       * Only applied if the
+       * [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] is set to
+       * [DataStore.ContentConfig.CONTENT_REQUIRED][google.cloud.discoveryengine.v1alpha.DataStore.ContentConfig.CONTENT_REQUIRED]
+       * or
+       * [DataStore.solution_types][google.cloud.discoveryengine.v1alpha.DataStore.solution_types]
+       * is
+       * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_CHAT].
+       *
+       * An extractive segment is a text segment extracted from the original
+       * document that is relevant to the search query, and, in general, more
+       * verbose than an extractive answer. The segment could then be used as
+       * input for LLMs to generate summaries and answers.
+       *
+       * If the number of matching segments is less than
+       * `max_extractive_segment_count`, return all of the segments. Otherwise,
+       * return the `max_extractive_segment_count`.
+       * 
+ * + * int32 max_extractive_segment_count = 2; + * + * @return The maxExtractiveSegmentCount. + */ + @java.lang.Override + public int getMaxExtractiveSegmentCount() { + return maxExtractiveSegmentCount_; } + public static final int RETURN_EXTRACTIVE_SEGMENT_SCORE_FIELD_NUMBER = 3; + private boolean returnExtractiveSegmentScore_ = false; + /** + * + * + *
+       * Specifies whether to return the confidence score from the extractive
+       * segments in each search result. This feature is available only for new
+       * or allowlisted data stores. To allowlist your data store, please
+       * contact your Customer Engineer. The default value is `false`.
+       * 
+ * + * bool return_extractive_segment_score = 3; + * + * @return The returnExtractiveSegmentScore. + */ @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + public boolean getReturnExtractiveSegmentScore() { + return returnExtractiveSegmentScore_; } + public static final int NUM_PREVIOUS_SEGMENTS_FIELD_NUMBER = 4; + private int numPreviousSegments_ = 0; + /** + * + * + *
+       * Specifies whether to also include the adjacent from each selected
+       * segments.
+       * Return at most `num_previous_segments` segments before each selected
+       * segments.
+       * 
+ * + * int32 num_previous_segments = 4; + * + * @return The numPreviousSegments. + */ @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; + public int getNumPreviousSegments() { + return numPreviousSegments_; } + + public static final int NUM_NEXT_SEGMENTS_FIELD_NUMBER = 5; + private int numNextSegments_ = 0; /** * * *
-       * A specification for configuring a summary returned in a search
-       * response.
+       * Return at most `num_next_segments` segments after each selected
+       * segments.
        * 
* - * Protobuf type {@code - * google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec} + * int32 num_next_segments = 5; + * + * @return The numNextSegments. */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec) - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpecOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_SummarySpec_descriptor; - } + @java.lang.Override + public int getNumNextSegments() { + return numNextSegments_; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_SummarySpec_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec.class, - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec.Builder.class); - } + private byte memoizedIsInitialized = -1; - // Construct using - // com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } + memoizedIsInitialized = 1; + return true; + } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getModelPromptSpecFieldBuilder(); - getModelSpecFieldBuilder(); - } + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (maxExtractiveAnswerCount_ != 0) { + output.writeInt32(1, maxExtractiveAnswerCount_); + } + if (maxExtractiveSegmentCount_ != 0) { + output.writeInt32(2, maxExtractiveSegmentCount_); + } + if (returnExtractiveSegmentScore_ != false) { + output.writeBool(3, returnExtractiveSegmentScore_); + } + if (numPreviousSegments_ != 0) { + output.writeInt32(4, numPreviousSegments_); + } + if (numNextSegments_ != 0) { + output.writeInt32(5, numNextSegments_); } + getUnknownFields().writeTo(output); + } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - summaryResultCount_ = 0; - includeCitations_ = false; - ignoreAdversarialQuery_ = false; - ignoreNonSummarySeekingQuery_ = false; - modelPromptSpec_ = null; - if (modelPromptSpecBuilder_ != null) { - modelPromptSpecBuilder_.dispose(); - modelPromptSpecBuilder_ = null; - } - languageCode_ = ""; - modelSpec_ = null; - if (modelSpecBuilder_ != null) { - modelSpecBuilder_.dispose(); - modelSpecBuilder_ = null; - } - return this; + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (maxExtractiveAnswerCount_ != 0) { + size += + com.google.protobuf.CodedOutputStream.computeInt32Size(1, maxExtractiveAnswerCount_); + } + if (maxExtractiveSegmentCount_ != 0) { + size += + com.google.protobuf.CodedOutputStream.computeInt32Size(2, maxExtractiveSegmentCount_); + } + if (returnExtractiveSegmentScore_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize( + 3, returnExtractiveSegmentScore_); + } + if (numPreviousSegments_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, numPreviousSegments_); } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_SummarySpec_descriptor; + if (numNextSegments_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(5, numNextSegments_); } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec - getDefaultInstanceForType() { - return com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec.getDefaultInstance(); + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; } - - @java.lang.Override - public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec - build() { - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec - result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; + if (!(obj + instanceof + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec)) { + return super.equals(obj); } + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + other = + (com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec) + obj; - @java.lang.Override - public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec - buildPartial() { - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec - result = - new com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } + if (getMaxExtractiveAnswerCount() != other.getMaxExtractiveAnswerCount()) return false; + if (getMaxExtractiveSegmentCount() != other.getMaxExtractiveSegmentCount()) return false; + if (getReturnExtractiveSegmentScore() != other.getReturnExtractiveSegmentScore()) + return false; + if (getNumPreviousSegments() != other.getNumPreviousSegments()) return false; + if (getNumNextSegments() != other.getNumNextSegments()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } - private void buildPartial0( - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec - result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.summaryResultCount_ = summaryResultCount_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.includeCitations_ = includeCitations_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.ignoreAdversarialQuery_ = ignoreAdversarialQuery_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.ignoreNonSummarySeekingQuery_ = ignoreNonSummarySeekingQuery_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000010) != 0)) { - result.modelPromptSpec_ = - modelPromptSpecBuilder_ == null - ? modelPromptSpec_ - : modelPromptSpecBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.languageCode_ = languageCode_; - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.modelSpec_ = modelSpecBuilder_ == null ? modelSpec_ : modelSpecBuilder_.build(); - to_bitField0_ |= 0x00000002; - } - result.bitField0_ |= to_bitField0_; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MAX_EXTRACTIVE_ANSWER_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getMaxExtractiveAnswerCount(); + hash = (37 * hash) + MAX_EXTRACTIVE_SEGMENT_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getMaxExtractiveSegmentCount(); + hash = (37 * hash) + RETURN_EXTRACTIVE_SEGMENT_SCORE_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashBoolean(getReturnExtractiveSegmentScore()); + hash = (37 * hash) + NUM_PREVIOUS_SEGMENTS_FIELD_NUMBER; + hash = (53 * hash) + getNumPreviousSegments(); + hash = (37 * hash) + NUM_NEXT_SEGMENTS_FIELD_NUMBER; + hash = (53 * hash) + getNumNextSegments(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } - @java.lang.Override - public Builder clone() { - return super.clone(); - } + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec) { - return mergeFrom( - (com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec) - other); - } else { - super.mergeFrom(other); - return this; - } - } + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - public Builder mergeFrom( - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec - other) { - if (other - == com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec.getDefaultInstance()) return this; - if (other.getSummaryResultCount() != 0) { - setSummaryResultCount(other.getSummaryResultCount()); - } - if (other.getIncludeCitations() != false) { - setIncludeCitations(other.getIncludeCitations()); - } - if (other.getIgnoreAdversarialQuery() != false) { - setIgnoreAdversarialQuery(other.getIgnoreAdversarialQuery()); - } - if (other.getIgnoreNonSummarySeekingQuery() != false) { - setIgnoreNonSummarySeekingQuery(other.getIgnoreNonSummarySeekingQuery()); - } - if (other.hasModelPromptSpec()) { - mergeModelPromptSpec(other.getModelPromptSpec()); - } - if (!other.getLanguageCode().isEmpty()) { - languageCode_ = other.languageCode_; - bitField0_ |= 0x00000020; - onChanged(); - } - if (other.hasModelSpec()) { - mergeModelSpec(other.getModelSpec()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } - @java.lang.Override - public final boolean isInitialized() { - return true; - } + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - summaryResultCount_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 16: - { - includeCitations_ = input.readBool(); - bitField0_ |= 0x00000002; - break; - } // case 16 - case 24: - { - ignoreAdversarialQuery_ = input.readBool(); - bitField0_ |= 0x00000004; - break; - } // case 24 - case 32: - { - ignoreNonSummarySeekingQuery_ = input.readBool(); - bitField0_ |= 0x00000008; - break; - } // case 32 - case 42: - { - input.readMessage( - getModelPromptSpecFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000010; - break; - } // case 42 - case 50: - { - languageCode_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - break; - } // case 50 - case 58: - { - input.readMessage(getModelSpecFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000040; - break; - } // case 58 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } - private int bitField0_; + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - private int summaryResultCount_; - /** - * - * - *
-         * The number of top results to generate the summary from. If the number
-         * of results returned is less than `summaryResultCount`, the summary is
-         * generated from all of the results.
-         *
-         * At most 10 results can be used to generate a summary.
-         * 
- * - * int32 summary_result_count = 1; - * - * @return The summaryResultCount. - */ - @java.lang.Override - public int getSummaryResultCount() { - return summaryResultCount_; - } - /** - * - * - *
-         * The number of top results to generate the summary from. If the number
-         * of results returned is less than `summaryResultCount`, the summary is
-         * generated from all of the results.
-         *
-         * At most 10 results can be used to generate a summary.
-         * 
- * - * int32 summary_result_count = 1; - * - * @param value The summaryResultCount to set. - * @return This builder for chaining. - */ - public Builder setSummaryResultCount(int value) { + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - summaryResultCount_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-         * The number of top results to generate the summary from. If the number
-         * of results returned is less than `summaryResultCount`, the summary is
-         * generated from all of the results.
-         *
-         * At most 10 results can be used to generate a summary.
-         * 
- * - * int32 summary_result_count = 1; - * - * @return This builder for chaining. - */ - public Builder clearSummaryResultCount() { - bitField0_ = (bitField0_ & ~0x00000001); - summaryResultCount_ = 0; - onChanged(); - return this; - } + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - private boolean includeCitations_; - /** - * - * - *
-         * Specifies whether to include citations in the summary. The default
-         * value is `false`.
-         *
-         * When this field is set to `true`, summaries include in-line citation
-         * numbers.
-         *
-         * Example summary including citations:
-         *
-         * BigQuery is Google Cloud's fully managed and completely serverless
-         * enterprise data warehouse [1]. BigQuery supports all data types, works
-         * across clouds, and has built-in machine learning and business
-         * intelligence, all within a unified platform [2, 3].
-         *
-         * The citation numbers refer to the returned search results and are
-         * 1-indexed. For example, [1] means that the sentence is attributed to
-         * the first search result. [2, 3] means that the sentence is attributed
-         * to both the second and third search results.
-         * 
- * - * bool include_citations = 2; - * - * @return The includeCitations. - */ - @java.lang.Override - public boolean getIncludeCitations() { - return includeCitations_; - } - /** - * - * - *
-         * Specifies whether to include citations in the summary. The default
-         * value is `false`.
-         *
-         * When this field is set to `true`, summaries include in-line citation
-         * numbers.
-         *
-         * Example summary including citations:
-         *
-         * BigQuery is Google Cloud's fully managed and completely serverless
-         * enterprise data warehouse [1]. BigQuery supports all data types, works
-         * across clouds, and has built-in machine learning and business
-         * intelligence, all within a unified platform [2, 3].
-         *
-         * The citation numbers refer to the returned search results and are
-         * 1-indexed. For example, [1] means that the sentence is attributed to
-         * the first search result. [2, 3] means that the sentence is attributed
-         * to both the second and third search results.
-         * 
- * - * bool include_citations = 2; - * - * @param value The includeCitations to set. - * @return This builder for chaining. - */ - public Builder setIncludeCitations(boolean value) { + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * A specification for configuring the extractive content in a search
+       * response.
+       * 
+ * + * Protobuf type {@code + * google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ExtractiveContentSpec} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ExtractiveContentSpec) + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_ExtractiveContentSpec_descriptor; + } - includeCitations_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_ExtractiveContentSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec.class, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec.Builder.class); } - /** - * - * - *
-         * Specifies whether to include citations in the summary. The default
-         * value is `false`.
-         *
-         * When this field is set to `true`, summaries include in-line citation
-         * numbers.
-         *
-         * Example summary including citations:
-         *
-         * BigQuery is Google Cloud's fully managed and completely serverless
-         * enterprise data warehouse [1]. BigQuery supports all data types, works
-         * across clouds, and has built-in machine learning and business
-         * intelligence, all within a unified platform [2, 3].
-         *
-         * The citation numbers refer to the returned search results and are
-         * 1-indexed. For example, [1] means that the sentence is attributed to
-         * the first search result. [2, 3] means that the sentence is attributed
-         * to both the second and third search results.
-         * 
- * - * bool include_citations = 2; - * - * @return This builder for chaining. - */ - public Builder clearIncludeCitations() { - bitField0_ = (bitField0_ & ~0x00000002); - includeCitations_ = false; - onChanged(); + + // Construct using + // com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ExtractiveContentSpec.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + maxExtractiveAnswerCount_ = 0; + maxExtractiveSegmentCount_ = 0; + returnExtractiveSegmentScore_ = false; + numPreviousSegments_ = 0; + numNextSegments_ = 0; return this; } - private boolean ignoreAdversarialQuery_; - /** - * - * - *
-         * Specifies whether to filter out adversarial queries. The default value
-         * is `false`.
-         *
-         * Google employs search-query classification to detect adversarial
-         * queries. No summary is returned if the search query is classified as an
-         * adversarial query. For example, a user might ask a question regarding
-         * negative comments about the company or submit a query designed to
-         * generate unsafe, policy-violating output. If this field is set to
-         * `true`, we skip generating summaries for adversarial queries and return
-         * fallback messages instead.
-         * 
- * - * bool ignore_adversarial_query = 3; - * - * @return The ignoreAdversarialQuery. - */ @java.lang.Override - public boolean getIgnoreAdversarialQuery() { - return ignoreAdversarialQuery_; + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_ExtractiveContentSpec_descriptor; } - /** - * - * - *
-         * Specifies whether to filter out adversarial queries. The default value
-         * is `false`.
-         *
-         * Google employs search-query classification to detect adversarial
-         * queries. No summary is returned if the search query is classified as an
-         * adversarial query. For example, a user might ask a question regarding
-         * negative comments about the company or submit a query designed to
-         * generate unsafe, policy-violating output. If this field is set to
-         * `true`, we skip generating summaries for adversarial queries and return
-         * fallback messages instead.
-         * 
- * - * bool ignore_adversarial_query = 3; - * - * @param value The ignoreAdversarialQuery to set. - * @return This builder for chaining. - */ - public Builder setIgnoreAdversarialQuery(boolean value) { - ignoreAdversarialQuery_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec.getDefaultInstance(); } - /** - * - * - *
-         * Specifies whether to filter out adversarial queries. The default value
-         * is `false`.
-         *
-         * Google employs search-query classification to detect adversarial
-         * queries. No summary is returned if the search query is classified as an
-         * adversarial query. For example, a user might ask a question regarding
-         * negative comments about the company or submit a query designed to
-         * generate unsafe, policy-violating output. If this field is set to
-         * `true`, we skip generating summaries for adversarial queries and return
-         * fallback messages instead.
-         * 
- * - * bool ignore_adversarial_query = 3; - * - * @return This builder for chaining. - */ - public Builder clearIgnoreAdversarialQuery() { - bitField0_ = (bitField0_ & ~0x00000004); - ignoreAdversarialQuery_ = false; - onChanged(); - return this; + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + build() { + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; } - private boolean ignoreNonSummarySeekingQuery_; - /** - * - * - *
-         * Specifies whether to filter out queries that are not summary-seeking.
-         * The default value is `false`.
-         *
-         * Google employs search-query classification to detect summary-seeking
-         * queries. No summary is returned if the search query is classified as a
-         * non-summary seeking query. For example, `why is the sky blue` and `Who
-         * is the best soccer player in the world?` are summary-seeking queries,
-         * but `SFO airport` and `world cup 2026` are not. They are most likely
-         * navigational queries. If this field is set to `true`, we skip
-         * generating summaries for non-summary seeking queries and return
-         * fallback messages instead.
-         * 
- * - * bool ignore_non_summary_seeking_query = 4; - * - * @return The ignoreNonSummarySeekingQuery. - */ @java.lang.Override - public boolean getIgnoreNonSummarySeekingQuery() { - return ignoreNonSummarySeekingQuery_; + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + buildPartial() { + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + result = + new com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.maxExtractiveAnswerCount_ = maxExtractiveAnswerCount_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.maxExtractiveSegmentCount_ = maxExtractiveSegmentCount_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.returnExtractiveSegmentScore_ = returnExtractiveSegmentScore_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.numPreviousSegments_ = numPreviousSegments_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.numNextSegments_ = numNextSegments_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); } - /** - * - * - *
-         * Specifies whether to filter out queries that are not summary-seeking.
-         * The default value is `false`.
-         *
-         * Google employs search-query classification to detect summary-seeking
-         * queries. No summary is returned if the search query is classified as a
-         * non-summary seeking query. For example, `why is the sky blue` and `Who
-         * is the best soccer player in the world?` are summary-seeking queries,
-         * but `SFO airport` and `world cup 2026` are not. They are most likely
-         * navigational queries. If this field is set to `true`, we skip
-         * generating summaries for non-summary seeking queries and return
-         * fallback messages instead.
-         * 
- * - * bool ignore_non_summary_seeking_query = 4; - * - * @param value The ignoreNonSummarySeekingQuery to set. - * @return This builder for chaining. - */ - public Builder setIgnoreNonSummarySeekingQuery(boolean value) { - ignoreNonSummarySeekingQuery_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); } - /** - * - * - *
-         * Specifies whether to filter out queries that are not summary-seeking.
-         * The default value is `false`.
-         *
-         * Google employs search-query classification to detect summary-seeking
-         * queries. No summary is returned if the search query is classified as a
-         * non-summary seeking query. For example, `why is the sky blue` and `Who
-         * is the best soccer player in the world?` are summary-seeking queries,
-         * but `SFO airport` and `world cup 2026` are not. They are most likely
-         * navigational queries. If this field is set to `true`, we skip
-         * generating summaries for non-summary seeking queries and return
-         * fallback messages instead.
-         * 
- * - * bool ignore_non_summary_seeking_query = 4; - * - * @return This builder for chaining. - */ - public Builder clearIgnoreNonSummarySeekingQuery() { - bitField0_ = (bitField0_ & ~0x00000008); - ignoreNonSummarySeekingQuery_ = false; - onChanged(); - return this; + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); } - private com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec - .ModelPromptSpec - modelPromptSpec_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec - .ModelPromptSpec, - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec - .ModelPromptSpec.Builder, - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec - .ModelPromptSpecOrBuilder> - modelPromptSpecBuilder_; - /** - * - * - *
-         * If specified, the spec will be used to modify the prompt provided to
-         * the LLM.
-         * 
- * - * - * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec model_prompt_spec = 5; - * - * - * @return Whether the modelPromptSpec field is set. - */ - public boolean hasModelPromptSpec() { - return ((bitField0_ & 0x00000010) != 0); + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); } - /** - * - * - *
-         * If specified, the spec will be used to modify the prompt provided to
-         * the LLM.
-         * 
- * - * - * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec model_prompt_spec = 5; - * - * - * @return The modelPromptSpec. - */ - public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec - .ModelPromptSpec - getModelPromptSpec() { - if (modelPromptSpecBuilder_ == null) { - return modelPromptSpec_ == null - ? com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec.ModelPromptSpec.getDefaultInstance() - : modelPromptSpec_; - } else { - return modelPromptSpecBuilder_.getMessage(); - } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); } - /** - * - * - *
-         * If specified, the spec will be used to modify the prompt provided to
-         * the LLM.
-         * 
- * - * - * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec model_prompt_spec = 5; - * - */ - public Builder setModelPromptSpec( - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec - .ModelPromptSpec - value) { - if (modelPromptSpecBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - modelPromptSpec_ = value; + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec) + other); } else { - modelPromptSpecBuilder_.setMessage(value); + super.mergeFrom(other); + return this; } - bitField0_ |= 0x00000010; - onChanged(); - return this; } - /** - * - * - *
-         * If specified, the spec will be used to modify the prompt provided to
-         * the LLM.
-         * 
- * - * - * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec model_prompt_spec = 5; - * - */ - public Builder setModelPromptSpec( - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec - .ModelPromptSpec.Builder - builderForValue) { - if (modelPromptSpecBuilder_ == null) { - modelPromptSpec_ = builderForValue.build(); - } else { - modelPromptSpecBuilder_.setMessage(builderForValue.build()); + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec.getDefaultInstance()) return this; + if (other.getMaxExtractiveAnswerCount() != 0) { + setMaxExtractiveAnswerCount(other.getMaxExtractiveAnswerCount()); } - bitField0_ |= 0x00000010; + if (other.getMaxExtractiveSegmentCount() != 0) { + setMaxExtractiveSegmentCount(other.getMaxExtractiveSegmentCount()); + } + if (other.getReturnExtractiveSegmentScore() != false) { + setReturnExtractiveSegmentScore(other.getReturnExtractiveSegmentScore()); + } + if (other.getNumPreviousSegments() != 0) { + setNumPreviousSegments(other.getNumPreviousSegments()); + } + if (other.getNumNextSegments() != 0) { + setNumNextSegments(other.getNumNextSegments()); + } + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } - /** - * - * - *
-         * If specified, the spec will be used to modify the prompt provided to
-         * the LLM.
-         * 
- * - * - * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec model_prompt_spec = 5; - * - */ - public Builder mergeModelPromptSpec( - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec - .ModelPromptSpec - value) { - if (modelPromptSpecBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0) - && modelPromptSpec_ != null - && modelPromptSpec_ - != com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec.ModelPromptSpec.getDefaultInstance()) { - getModelPromptSpecBuilder().mergeFrom(value); - } else { - modelPromptSpec_ = value; - } - } else { - modelPromptSpecBuilder_.mergeFrom(value); + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); } - if (modelPromptSpec_ != null) { - bitField0_ |= 0x00000010; + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + maxExtractiveAnswerCount_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + maxExtractiveSegmentCount_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + returnExtractiveSegmentScore_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: + { + numPreviousSegments_ = input.readInt32(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: + { + numNextSegments_ = input.readInt32(); + bitField0_ |= 0x00000010; + break; + } // case 40 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { onChanged(); - } + } // finally return this; } + + private int bitField0_; + + private int maxExtractiveAnswerCount_; /** * * *
-         * If specified, the spec will be used to modify the prompt provided to
-         * the LLM.
-         * 
+ * The maximum number of extractive answers returned in each search + * result. * - * - * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec model_prompt_spec = 5; - * - */ - public Builder clearModelPromptSpec() { - bitField0_ = (bitField0_ & ~0x00000010); - modelPromptSpec_ = null; - if (modelPromptSpecBuilder_ != null) { - modelPromptSpecBuilder_.dispose(); - modelPromptSpecBuilder_ = null; - } - onChanged(); - return this; - } - /** + * An extractive answer is a verbatim answer extracted from the original + * document, which provides a precise and contextually relevant answer to + * the search query. * + * If the number of matching answers is less than the + * `max_extractive_answer_count`, return all of the answers. Otherwise, + * return the `max_extractive_answer_count`. * - *
-         * If specified, the spec will be used to modify the prompt provided to
-         * the LLM.
+         * At most five answers are returned for each
+         * [SearchResult][google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult].
          * 
* - * - * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec model_prompt_spec = 5; - * + * int32 max_extractive_answer_count = 1; + * + * @return The maxExtractiveAnswerCount. */ - public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec - .ModelPromptSpec.Builder - getModelPromptSpecBuilder() { - bitField0_ |= 0x00000010; - onChanged(); - return getModelPromptSpecFieldBuilder().getBuilder(); + @java.lang.Override + public int getMaxExtractiveAnswerCount() { + return maxExtractiveAnswerCount_; } /** * * *
-         * If specified, the spec will be used to modify the prompt provided to
-         * the LLM.
-         * 
+ * The maximum number of extractive answers returned in each search + * result. * - * - * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec model_prompt_spec = 5; - * - */ - public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec - .ModelPromptSpecOrBuilder - getModelPromptSpecOrBuilder() { - if (modelPromptSpecBuilder_ != null) { - return modelPromptSpecBuilder_.getMessageOrBuilder(); - } else { - return modelPromptSpec_ == null - ? com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec.ModelPromptSpec.getDefaultInstance() - : modelPromptSpec_; - } - } - /** + * An extractive answer is a verbatim answer extracted from the original + * document, which provides a precise and contextually relevant answer to + * the search query. * + * If the number of matching answers is less than the + * `max_extractive_answer_count`, return all of the answers. Otherwise, + * return the `max_extractive_answer_count`. * - *
-         * If specified, the spec will be used to modify the prompt provided to
-         * the LLM.
+         * At most five answers are returned for each
+         * [SearchResult][google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult].
          * 
* - * - * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec model_prompt_spec = 5; - * + * int32 max_extractive_answer_count = 1; + * + * @param value The maxExtractiveAnswerCount to set. + * @return This builder for chaining. */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec - .ModelPromptSpec, - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec - .ModelPromptSpec.Builder, - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec - .ModelPromptSpecOrBuilder> - getModelPromptSpecFieldBuilder() { - if (modelPromptSpecBuilder_ == null) { - modelPromptSpecBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec.ModelPromptSpec, - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec.ModelPromptSpec.Builder, - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec.ModelPromptSpecOrBuilder>( - getModelPromptSpec(), getParentForChildren(), isClean()); - modelPromptSpec_ = null; - } - return modelPromptSpecBuilder_; - } + public Builder setMaxExtractiveAnswerCount(int value) { - private java.lang.Object languageCode_ = ""; + maxExtractiveAnswerCount_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } /** * * *
-         * Language code for Summary. Use language tags defined by
-         * [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
-         * Note: This is an experimental feature.
-         * 
- * - * string language_code = 6; + * The maximum number of extractive answers returned in each search + * result. * - * @return The languageCode. - */ - public java.lang.String getLanguageCode() { - java.lang.Object ref = languageCode_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - languageCode_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** + * An extractive answer is a verbatim answer extracted from the original + * document, which provides a precise and contextually relevant answer to + * the search query. * + * If the number of matching answers is less than the + * `max_extractive_answer_count`, return all of the answers. Otherwise, + * return the `max_extractive_answer_count`. * - *
-         * Language code for Summary. Use language tags defined by
-         * [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
-         * Note: This is an experimental feature.
+         * At most five answers are returned for each
+         * [SearchResult][google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult].
          * 
* - * string language_code = 6; + * int32 max_extractive_answer_count = 1; * - * @return The bytes for languageCode. + * @return This builder for chaining. */ - public com.google.protobuf.ByteString getLanguageCodeBytes() { - java.lang.Object ref = languageCode_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - languageCode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public Builder clearMaxExtractiveAnswerCount() { + bitField0_ = (bitField0_ & ~0x00000001); + maxExtractiveAnswerCount_ = 0; + onChanged(); + return this; } + + private int maxExtractiveSegmentCount_; /** * * *
-         * Language code for Summary. Use language tags defined by
-         * [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
-         * Note: This is an experimental feature.
+         * The max number of extractive segments returned in each search result.
+         * Only applied if the
+         * [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] is set to
+         * [DataStore.ContentConfig.CONTENT_REQUIRED][google.cloud.discoveryengine.v1alpha.DataStore.ContentConfig.CONTENT_REQUIRED]
+         * or
+         * [DataStore.solution_types][google.cloud.discoveryengine.v1alpha.DataStore.solution_types]
+         * is
+         * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_CHAT].
+         *
+         * An extractive segment is a text segment extracted from the original
+         * document that is relevant to the search query, and, in general, more
+         * verbose than an extractive answer. The segment could then be used as
+         * input for LLMs to generate summaries and answers.
+         *
+         * If the number of matching segments is less than
+         * `max_extractive_segment_count`, return all of the segments. Otherwise,
+         * return the `max_extractive_segment_count`.
          * 
* - * string language_code = 6; + * int32 max_extractive_segment_count = 2; * - * @param value The languageCode to set. - * @return This builder for chaining. + * @return The maxExtractiveSegmentCount. */ - public Builder setLanguageCode(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - languageCode_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; + @java.lang.Override + public int getMaxExtractiveSegmentCount() { + return maxExtractiveSegmentCount_; } /** * * *
-         * Language code for Summary. Use language tags defined by
-         * [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
-         * Note: This is an experimental feature.
+         * The max number of extractive segments returned in each search result.
+         * Only applied if the
+         * [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] is set to
+         * [DataStore.ContentConfig.CONTENT_REQUIRED][google.cloud.discoveryengine.v1alpha.DataStore.ContentConfig.CONTENT_REQUIRED]
+         * or
+         * [DataStore.solution_types][google.cloud.discoveryengine.v1alpha.DataStore.solution_types]
+         * is
+         * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_CHAT].
+         *
+         * An extractive segment is a text segment extracted from the original
+         * document that is relevant to the search query, and, in general, more
+         * verbose than an extractive answer. The segment could then be used as
+         * input for LLMs to generate summaries and answers.
+         *
+         * If the number of matching segments is less than
+         * `max_extractive_segment_count`, return all of the segments. Otherwise,
+         * return the `max_extractive_segment_count`.
          * 
* - * string language_code = 6; + * int32 max_extractive_segment_count = 2; * + * @param value The maxExtractiveSegmentCount to set. * @return This builder for chaining. */ - public Builder clearLanguageCode() { - languageCode_ = getDefaultInstance().getLanguageCode(); - bitField0_ = (bitField0_ & ~0x00000020); + public Builder setMaxExtractiveSegmentCount(int value) { + + maxExtractiveSegmentCount_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -15111,267 +20169,214 @@ public Builder clearLanguageCode() { * * *
-         * Language code for Summary. Use language tags defined by
-         * [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
-         * Note: This is an experimental feature.
+         * The max number of extractive segments returned in each search result.
+         * Only applied if the
+         * [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] is set to
+         * [DataStore.ContentConfig.CONTENT_REQUIRED][google.cloud.discoveryengine.v1alpha.DataStore.ContentConfig.CONTENT_REQUIRED]
+         * or
+         * [DataStore.solution_types][google.cloud.discoveryengine.v1alpha.DataStore.solution_types]
+         * is
+         * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_CHAT].
+         *
+         * An extractive segment is a text segment extracted from the original
+         * document that is relevant to the search query, and, in general, more
+         * verbose than an extractive answer. The segment could then be used as
+         * input for LLMs to generate summaries and answers.
+         *
+         * If the number of matching segments is less than
+         * `max_extractive_segment_count`, return all of the segments. Otherwise,
+         * return the `max_extractive_segment_count`.
          * 
* - * string language_code = 6; + * int32 max_extractive_segment_count = 2; * - * @param value The bytes for languageCode to set. * @return This builder for chaining. */ - public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - languageCode_ = value; - bitField0_ |= 0x00000020; + public Builder clearMaxExtractiveSegmentCount() { + bitField0_ = (bitField0_ & ~0x00000002); + maxExtractiveSegmentCount_ = 0; onChanged(); return this; } - private com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec - .ModelSpec - modelSpec_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec - .ModelSpec, - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec - .ModelSpec.Builder, - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec - .ModelSpecOrBuilder> - modelSpecBuilder_; + private boolean returnExtractiveSegmentScore_; /** * * *
-         * If specified, the spec will be used to modify the model specification
-         * provided to the LLM.
+         * Specifies whether to return the confidence score from the extractive
+         * segments in each search result. This feature is available only for new
+         * or allowlisted data stores. To allowlist your data store, please
+         * contact your Customer Engineer. The default value is `false`.
          * 
* - * - * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec model_spec = 7; - * + * bool return_extractive_segment_score = 3; * - * @return Whether the modelSpec field is set. + * @return The returnExtractiveSegmentScore. */ - public boolean hasModelSpec() { - return ((bitField0_ & 0x00000040) != 0); + @java.lang.Override + public boolean getReturnExtractiveSegmentScore() { + return returnExtractiveSegmentScore_; } /** * * *
-         * If specified, the spec will be used to modify the model specification
-         * provided to the LLM.
+         * Specifies whether to return the confidence score from the extractive
+         * segments in each search result. This feature is available only for new
+         * or allowlisted data stores. To allowlist your data store, please
+         * contact your Customer Engineer. The default value is `false`.
          * 
* - * - * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec model_spec = 7; - * + * bool return_extractive_segment_score = 3; * - * @return The modelSpec. + * @param value The returnExtractiveSegmentScore to set. + * @return This builder for chaining. */ - public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec - .ModelSpec - getModelSpec() { - if (modelSpecBuilder_ == null) { - return modelSpec_ == null - ? com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec.ModelSpec.getDefaultInstance() - : modelSpec_; - } else { - return modelSpecBuilder_.getMessage(); - } + public Builder setReturnExtractiveSegmentScore(boolean value) { + + returnExtractiveSegmentScore_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; } /** * * *
-         * If specified, the spec will be used to modify the model specification
-         * provided to the LLM.
+         * Specifies whether to return the confidence score from the extractive
+         * segments in each search result. This feature is available only for new
+         * or allowlisted data stores. To allowlist your data store, please
+         * contact your Customer Engineer. The default value is `false`.
          * 
* - * - * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec model_spec = 7; - * + * bool return_extractive_segment_score = 3; + * + * @return This builder for chaining. */ - public Builder setModelSpec( - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec - .ModelSpec - value) { - if (modelSpecBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - modelSpec_ = value; - } else { - modelSpecBuilder_.setMessage(value); - } - bitField0_ |= 0x00000040; + public Builder clearReturnExtractiveSegmentScore() { + bitField0_ = (bitField0_ & ~0x00000004); + returnExtractiveSegmentScore_ = false; onChanged(); return this; } + + private int numPreviousSegments_; /** * * *
-         * If specified, the spec will be used to modify the model specification
-         * provided to the LLM.
+         * Specifies whether to also include the adjacent from each selected
+         * segments.
+         * Return at most `num_previous_segments` segments before each selected
+         * segments.
          * 
* - * - * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec model_spec = 7; - * + * int32 num_previous_segments = 4; + * + * @return The numPreviousSegments. */ - public Builder setModelSpec( - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec - .ModelSpec.Builder - builderForValue) { - if (modelSpecBuilder_ == null) { - modelSpec_ = builderForValue.build(); - } else { - modelSpecBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000040; - onChanged(); - return this; + @java.lang.Override + public int getNumPreviousSegments() { + return numPreviousSegments_; } /** * * *
-         * If specified, the spec will be used to modify the model specification
-         * provided to the LLM.
+         * Specifies whether to also include the adjacent from each selected
+         * segments.
+         * Return at most `num_previous_segments` segments before each selected
+         * segments.
          * 
* - * - * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec model_spec = 7; - * + * int32 num_previous_segments = 4; + * + * @param value The numPreviousSegments to set. + * @return This builder for chaining. */ - public Builder mergeModelSpec( - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec - .ModelSpec - value) { - if (modelSpecBuilder_ == null) { - if (((bitField0_ & 0x00000040) != 0) - && modelSpec_ != null - && modelSpec_ - != com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec.ModelSpec.getDefaultInstance()) { - getModelSpecBuilder().mergeFrom(value); - } else { - modelSpec_ = value; - } - } else { - modelSpecBuilder_.mergeFrom(value); - } - if (modelSpec_ != null) { - bitField0_ |= 0x00000040; - onChanged(); - } + public Builder setNumPreviousSegments(int value) { + + numPreviousSegments_ = value; + bitField0_ |= 0x00000008; + onChanged(); return this; } /** * * *
-         * If specified, the spec will be used to modify the model specification
-         * provided to the LLM.
+         * Specifies whether to also include the adjacent from each selected
+         * segments.
+         * Return at most `num_previous_segments` segments before each selected
+         * segments.
          * 
* - * - * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec model_spec = 7; - * + * int32 num_previous_segments = 4; + * + * @return This builder for chaining. */ - public Builder clearModelSpec() { - bitField0_ = (bitField0_ & ~0x00000040); - modelSpec_ = null; - if (modelSpecBuilder_ != null) { - modelSpecBuilder_.dispose(); - modelSpecBuilder_ = null; - } + public Builder clearNumPreviousSegments() { + bitField0_ = (bitField0_ & ~0x00000008); + numPreviousSegments_ = 0; onChanged(); return this; } + + private int numNextSegments_; /** * * *
-         * If specified, the spec will be used to modify the model specification
-         * provided to the LLM.
+         * Return at most `num_next_segments` segments after each selected
+         * segments.
          * 
* - * - * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec model_spec = 7; - * + * int32 num_next_segments = 5; + * + * @return The numNextSegments. */ - public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec - .ModelSpec.Builder - getModelSpecBuilder() { - bitField0_ |= 0x00000040; - onChanged(); - return getModelSpecFieldBuilder().getBuilder(); + @java.lang.Override + public int getNumNextSegments() { + return numNextSegments_; } /** * * *
-         * If specified, the spec will be used to modify the model specification
-         * provided to the LLM.
-         * 
- * - * - * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec model_spec = 7; - * - */ - public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec - .ModelSpecOrBuilder - getModelSpecOrBuilder() { - if (modelSpecBuilder_ != null) { - return modelSpecBuilder_.getMessageOrBuilder(); - } else { - return modelSpec_ == null - ? com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec.ModelSpec.getDefaultInstance() - : modelSpec_; - } + * Return at most `num_next_segments` segments after each selected + * segments. + * + * + * int32 num_next_segments = 5; + * + * @param value The numNextSegments to set. + * @return This builder for chaining. + */ + public Builder setNumNextSegments(int value) { + + numNextSegments_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; } /** * * *
-         * If specified, the spec will be used to modify the model specification
-         * provided to the LLM.
+         * Return at most `num_next_segments` segments after each selected
+         * segments.
          * 
* - * - * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec model_spec = 7; - * + * int32 num_next_segments = 5; + * + * @return This builder for chaining. */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec - .ModelSpec, - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec - .ModelSpec.Builder, - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec - .ModelSpecOrBuilder> - getModelSpecFieldBuilder() { - if (modelSpecBuilder_ == null) { - modelSpecBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec.ModelSpec, - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec.ModelSpec.Builder, - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec.ModelSpecOrBuilder>( - getModelSpec(), getParentForChildren(), isClean()); - modelSpec_ = null; - } - return modelSpecBuilder_; + public Builder clearNumNextSegments() { + bitField0_ = (bitField0_ & ~0x00000010); + numNextSegments_ = 0; + onChanged(); + return this; } @java.lang.Override @@ -15386,30 +20391,30 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec) + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ExtractiveContentSpec) } - // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec) + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ExtractiveContentSpec) private static final com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec + .ExtractiveContentSpec DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec(); + .ExtractiveContentSpec(); } public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .SummarySpec + .ExtractiveContentSpec getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public SummarySpec parsePartialFrom( + public ExtractiveContentSpec parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -15429,298 +20434,145 @@ public SummarySpec parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public interface ExtractiveContentSpecOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ExtractiveContentSpec) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-       * The maximum number of extractive answers returned in each search
-       * result.
-       *
-       * An extractive answer is a verbatim answer extracted from the original
-       * document, which provides a precise and contextually relevant answer to
-       * the search query.
-       *
-       * If the number of matching answers is less than the
-       * `max_extractive_answer_count`, return all of the answers. Otherwise,
-       * return the `max_extractive_answer_count`.
-       *
-       * At most five answers are returned for each
-       * [SearchResult][google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult].
-       * 
- * - * int32 max_extractive_answer_count = 1; - * - * @return The maxExtractiveAnswerCount. - */ - int getMaxExtractiveAnswerCount(); - - /** - * - * - *
-       * The max number of extractive segments returned in each search result.
-       * Only applied if the
-       * [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] is set to
-       * [DataStore.ContentConfig.CONTENT_REQUIRED][google.cloud.discoveryengine.v1alpha.DataStore.ContentConfig.CONTENT_REQUIRED]
-       * or
-       * [DataStore.solution_types][google.cloud.discoveryengine.v1alpha.DataStore.solution_types]
-       * is
-       * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_CHAT].
-       *
-       * An extractive segment is a text segment extracted from the original
-       * document that is relevant to the search query, and, in general, more
-       * verbose than an extractive answer. The segment could then be used as
-       * input for LLMs to generate summaries and answers.
-       *
-       * If the number of matching segments is less than
-       * `max_extractive_segment_count`, return all of the segments. Otherwise,
-       * return the `max_extractive_segment_count`.
-       * 
- * - * int32 max_extractive_segment_count = 2; - * - * @return The maxExtractiveSegmentCount. - */ - int getMaxExtractiveSegmentCount(); - - /** - * - * - *
-       * Specifies whether to return the confidence score from the extractive
-       * segments in each search result. The default value is `false`.
-       *
-       * Note: this is a priavte preview feature and only works for allowlisted
-       * users, please reach out to Cloud Support team if you want to use it.
-       * 
- * - * bool return_extractive_segment_score = 3; - * - * @return The returnExtractiveSegmentScore. - */ - boolean getReturnExtractiveSegmentScore(); - - /** - * - * - *
-       * Specifies whether to also include the adjacent from each selected
-       * segments.
-       * Return at most `num_previous_segments` segments before each selected
-       * segments.
-       * 
- * - * int32 num_previous_segments = 4; - * - * @return The numPreviousSegments. - */ - int getNumPreviousSegments(); - - /** - * - * - *
-       * Return at most `num_next_segments` segments after each selected
-       * segments.
-       * 
- * - * int32 num_next_segments = 5; - * - * @return The numNextSegments. - */ - int getNumNextSegments(); - } - /** - * - * - *
-     * A specification for configuring the extractive content in a search
-     * response.
-     * 
- * - * Protobuf type {@code - * google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ExtractiveContentSpec} - */ - public static final class ExtractiveContentSpec extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ExtractiveContentSpec) - ExtractiveContentSpecOrBuilder { - private static final long serialVersionUID = 0L; - // Use ExtractiveContentSpec.newBuilder() to construct. - private ExtractiveContentSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ExtractiveContentSpec() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ExtractiveContentSpec(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_ExtractiveContentSpec_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_ExtractiveContentSpec_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec.class, - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec.Builder.class); - } - - public static final int MAX_EXTRACTIVE_ANSWER_COUNT_FIELD_NUMBER = 1; - private int maxExtractiveAnswerCount_ = 0; - /** - * - * - *
-       * The maximum number of extractive answers returned in each search
-       * result.
-       *
-       * An extractive answer is a verbatim answer extracted from the original
-       * document, which provides a precise and contextually relevant answer to
-       * the search query.
-       *
-       * If the number of matching answers is less than the
-       * `max_extractive_answer_count`, return all of the answers. Otherwise,
-       * return the `max_extractive_answer_count`.
-       *
-       * At most five answers are returned for each
-       * [SearchResult][google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult].
-       * 
- * - * int32 max_extractive_answer_count = 1; - * - * @return The maxExtractiveAnswerCount. - */ + public static com.google.protobuf.Parser parser() { + return PARSER; + } + @java.lang.Override - public int getMaxExtractiveAnswerCount() { - return maxExtractiveAnswerCount_; + public com.google.protobuf.Parser getParserForType() { + return PARSER; } - public static final int MAX_EXTRACTIVE_SEGMENT_COUNT_FIELD_NUMBER = 2; - private int maxExtractiveSegmentCount_ = 0; + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ChunkSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec) + com.google.protobuf.MessageOrBuilder { + /** * * *
-       * The max number of extractive segments returned in each search result.
-       * Only applied if the
-       * [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] is set to
-       * [DataStore.ContentConfig.CONTENT_REQUIRED][google.cloud.discoveryengine.v1alpha.DataStore.ContentConfig.CONTENT_REQUIRED]
-       * or
-       * [DataStore.solution_types][google.cloud.discoveryengine.v1alpha.DataStore.solution_types]
-       * is
-       * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_CHAT].
-       *
-       * An extractive segment is a text segment extracted from the original
-       * document that is relevant to the search query, and, in general, more
-       * verbose than an extractive answer. The segment could then be used as
-       * input for LLMs to generate summaries and answers.
-       *
-       * If the number of matching segments is less than
-       * `max_extractive_segment_count`, return all of the segments. Otherwise,
-       * return the `max_extractive_segment_count`.
+       * The number of previous chunks to be returned of the current chunk. The
+       * maximum allowed value is 3.
+       * If not specified, no previous chunks will be returned.
        * 
* - * int32 max_extractive_segment_count = 2; + * int32 num_previous_chunks = 1; * - * @return The maxExtractiveSegmentCount. + * @return The numPreviousChunks. */ - @java.lang.Override - public int getMaxExtractiveSegmentCount() { - return maxExtractiveSegmentCount_; - } + int getNumPreviousChunks(); - public static final int RETURN_EXTRACTIVE_SEGMENT_SCORE_FIELD_NUMBER = 3; - private boolean returnExtractiveSegmentScore_ = false; /** * * *
-       * Specifies whether to return the confidence score from the extractive
-       * segments in each search result. The default value is `false`.
-       *
-       * Note: this is a priavte preview feature and only works for allowlisted
-       * users, please reach out to Cloud Support team if you want to use it.
+       * The number of next chunks to be returned of the current chunk. The
+       * maximum allowed value is 3.
+       * If not specified, no next chunks will be returned.
        * 
* - * bool return_extractive_segment_score = 3; + * int32 num_next_chunks = 2; * - * @return The returnExtractiveSegmentScore. + * @return The numNextChunks. */ + int getNumNextChunks(); + } + /** + * + * + *
+     * Specifies the chunk spec to be returned from the search response.
+     * Only available if the
+     * [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.search_result_mode]
+     * is set to
+     * [CHUNKS][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS]
+     * 
+ * + * Protobuf type {@code + * google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec} + */ + public static final class ChunkSpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec) + ChunkSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use ChunkSpec.newBuilder() to construct. + private ChunkSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ChunkSpec() {} + @java.lang.Override - public boolean getReturnExtractiveSegmentScore() { - return returnExtractiveSegmentScore_; + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ChunkSpec(); } - public static final int NUM_PREVIOUS_SEGMENTS_FIELD_NUMBER = 4; - private int numPreviousSegments_ = 0; + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_ChunkSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_ChunkSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec + .class, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec + .Builder.class); + } + + public static final int NUM_PREVIOUS_CHUNKS_FIELD_NUMBER = 1; + private int numPreviousChunks_ = 0; /** * * *
-       * Specifies whether to also include the adjacent from each selected
-       * segments.
-       * Return at most `num_previous_segments` segments before each selected
-       * segments.
+       * The number of previous chunks to be returned of the current chunk. The
+       * maximum allowed value is 3.
+       * If not specified, no previous chunks will be returned.
        * 
* - * int32 num_previous_segments = 4; + * int32 num_previous_chunks = 1; * - * @return The numPreviousSegments. + * @return The numPreviousChunks. */ @java.lang.Override - public int getNumPreviousSegments() { - return numPreviousSegments_; + public int getNumPreviousChunks() { + return numPreviousChunks_; } - public static final int NUM_NEXT_SEGMENTS_FIELD_NUMBER = 5; - private int numNextSegments_ = 0; + public static final int NUM_NEXT_CHUNKS_FIELD_NUMBER = 2; + private int numNextChunks_ = 0; /** * * *
-       * Return at most `num_next_segments` segments after each selected
-       * segments.
+       * The number of next chunks to be returned of the current chunk. The
+       * maximum allowed value is 3.
+       * If not specified, no next chunks will be returned.
        * 
* - * int32 num_next_segments = 5; + * int32 num_next_chunks = 2; * - * @return The numNextSegments. + * @return The numNextChunks. */ @java.lang.Override - public int getNumNextSegments() { - return numNextSegments_; + public int getNumNextChunks() { + return numNextChunks_; } private byte memoizedIsInitialized = -1; @@ -15737,20 +20589,11 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (maxExtractiveAnswerCount_ != 0) { - output.writeInt32(1, maxExtractiveAnswerCount_); - } - if (maxExtractiveSegmentCount_ != 0) { - output.writeInt32(2, maxExtractiveSegmentCount_); + if (numPreviousChunks_ != 0) { + output.writeInt32(1, numPreviousChunks_); } - if (returnExtractiveSegmentScore_ != false) { - output.writeBool(3, returnExtractiveSegmentScore_); - } - if (numPreviousSegments_ != 0) { - output.writeInt32(4, numPreviousSegments_); - } - if (numNextSegments_ != 0) { - output.writeInt32(5, numNextSegments_); + if (numNextChunks_ != 0) { + output.writeInt32(2, numNextChunks_); } getUnknownFields().writeTo(output); } @@ -15761,24 +20604,11 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (maxExtractiveAnswerCount_ != 0) { - size += - com.google.protobuf.CodedOutputStream.computeInt32Size(1, maxExtractiveAnswerCount_); - } - if (maxExtractiveSegmentCount_ != 0) { - size += - com.google.protobuf.CodedOutputStream.computeInt32Size(2, maxExtractiveSegmentCount_); - } - if (returnExtractiveSegmentScore_ != false) { - size += - com.google.protobuf.CodedOutputStream.computeBoolSize( - 3, returnExtractiveSegmentScore_); + if (numPreviousChunks_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, numPreviousChunks_); } - if (numPreviousSegments_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, numPreviousSegments_); - } - if (numNextSegments_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(5, numNextSegments_); + if (numNextChunks_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, numNextChunks_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -15792,23 +20622,15 @@ public boolean equals(final java.lang.Object obj) { } if (!(obj instanceof - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec)) { + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec)) { return super.equals(obj); } - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec - other = - (com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec) - obj; + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec other = + (com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec) + obj; - if (getMaxExtractiveAnswerCount() != other.getMaxExtractiveAnswerCount()) return false; - if (getMaxExtractiveSegmentCount() != other.getMaxExtractiveSegmentCount()) return false; - if (getReturnExtractiveSegmentScore() != other.getReturnExtractiveSegmentScore()) - return false; - if (getNumPreviousSegments() != other.getNumPreviousSegments()) return false; - if (getNumNextSegments() != other.getNumNextSegments()) return false; + if (getNumPreviousChunks() != other.getNumPreviousChunks()) return false; + if (getNumNextChunks() != other.getNumNextChunks()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -15820,32 +20642,24 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + MAX_EXTRACTIVE_ANSWER_COUNT_FIELD_NUMBER; - hash = (53 * hash) + getMaxExtractiveAnswerCount(); - hash = (37 * hash) + MAX_EXTRACTIVE_SEGMENT_COUNT_FIELD_NUMBER; - hash = (53 * hash) + getMaxExtractiveSegmentCount(); - hash = (37 * hash) + RETURN_EXTRACTIVE_SEGMENT_SCORE_FIELD_NUMBER; - hash = - (53 * hash) - + com.google.protobuf.Internal.hashBoolean(getReturnExtractiveSegmentScore()); - hash = (37 * hash) + NUM_PREVIOUS_SEGMENTS_FIELD_NUMBER; - hash = (53 * hash) + getNumPreviousSegments(); - hash = (37 * hash) + NUM_NEXT_SEGMENTS_FIELD_NUMBER; - hash = (53 * hash) + getNumNextSegments(); + hash = (37 * hash) + NUM_PREVIOUS_CHUNKS_FIELD_NUMBER; + hash = (53 * hash) + getNumPreviousChunks(); + hash = (37 * hash) + NUM_NEXT_CHUNKS_FIELD_NUMBER; + hash = (53 * hash) + getNumNextChunks(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec + .ChunkSpec parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec + .ChunkSpec parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -15853,14 +20667,14 @@ public int hashCode() { } public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec + .ChunkSpec parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec + .ChunkSpec parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -15869,26 +20683,26 @@ public int hashCode() { } public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec + .ChunkSpec parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec + .ChunkSpec parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec + .ChunkSpec parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec + .ChunkSpec parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -15898,13 +20712,13 @@ public int hashCode() { } public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec + .ChunkSpec parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec + .ChunkSpec parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -15914,13 +20728,13 @@ public int hashCode() { } public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec + .ChunkSpec parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec + .ChunkSpec parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -15939,8 +20753,7 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -15960,38 +20773,41 @@ protected Builder newBuilderForType( * * *
-       * A specification for configuring the extractive content in a search
-       * response.
+       * Specifies the chunk spec to be returned from the search response.
+       * Only available if the
+       * [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.search_result_mode]
+       * is set to
+       * [CHUNKS][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS]
        * 
* * Protobuf type {@code - * google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ExtractiveContentSpec} + * google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ExtractiveContentSpec) + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec) com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .ExtractiveContentSpecOrBuilder { + .ChunkSpecOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_ExtractiveContentSpec_descriptor; + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_ChunkSpec_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_ExtractiveContentSpec_fieldAccessorTable + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_ChunkSpec_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec.class, - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec.Builder.class); + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec + .class, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec + .Builder.class); } // Construct using - // com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ExtractiveContentSpec.newBuilder() + // com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { @@ -16002,34 +20818,28 @@ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { public Builder clear() { super.clear(); bitField0_ = 0; - maxExtractiveAnswerCount_ = 0; - maxExtractiveSegmentCount_ = 0; - returnExtractiveSegmentScore_ = false; - numPreviousSegments_ = 0; - numNextSegments_ = 0; + numPreviousChunks_ = 0; + numNextChunks_ = 0; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_ExtractiveContentSpec_descriptor; + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_ChunkSpec_descriptor; } @java.lang.Override - public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec getDefaultInstanceForType() { - return com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec.getDefaultInstance(); + return com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec + .getDefaultInstance(); } @java.lang.Override - public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec build() { - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); @@ -16038,14 +20848,12 @@ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { } @java.lang.Override - public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec buildPartial() { - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec result = new com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec(this); + .ChunkSpec(this); if (bitField0_ != 0) { buildPartial0(result); } @@ -16054,24 +20862,14 @@ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { } private void buildPartial0( - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { - result.maxExtractiveAnswerCount_ = maxExtractiveAnswerCount_; + result.numPreviousChunks_ = numPreviousChunks_; } if (((from_bitField0_ & 0x00000002) != 0)) { - result.maxExtractiveSegmentCount_ = maxExtractiveSegmentCount_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.returnExtractiveSegmentScore_ = returnExtractiveSegmentScore_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.numPreviousSegments_ = numPreviousSegments_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.numNextSegments_ = numNextSegments_; + result.numNextChunks_ = numNextChunks_; } } @@ -16114,11 +20912,9 @@ public Builder addRepeatedField( public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec) { + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec) { return mergeFrom( - (com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec) + (com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec) other); } else { super.mergeFrom(other); @@ -16127,26 +20923,16 @@ public Builder mergeFrom(com.google.protobuf.Message other) { } public Builder mergeFrom( - com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec other) { if (other - == com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec.getDefaultInstance()) return this; - if (other.getMaxExtractiveAnswerCount() != 0) { - setMaxExtractiveAnswerCount(other.getMaxExtractiveAnswerCount()); - } - if (other.getMaxExtractiveSegmentCount() != 0) { - setMaxExtractiveSegmentCount(other.getMaxExtractiveSegmentCount()); - } - if (other.getReturnExtractiveSegmentScore() != false) { - setReturnExtractiveSegmentScore(other.getReturnExtractiveSegmentScore()); - } - if (other.getNumPreviousSegments() != 0) { - setNumPreviousSegments(other.getNumPreviousSegments()); + == com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec + .getDefaultInstance()) return this; + if (other.getNumPreviousChunks() != 0) { + setNumPreviousChunks(other.getNumPreviousChunks()); } - if (other.getNumNextSegments() != 0) { - setNumNextSegments(other.getNumNextSegments()); + if (other.getNumNextChunks() != 0) { + setNumNextChunks(other.getNumNextChunks()); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); @@ -16176,34 +20962,16 @@ public Builder mergeFrom( break; case 8: { - maxExtractiveAnswerCount_ = input.readInt32(); + numPreviousChunks_ = input.readInt32(); bitField0_ |= 0x00000001; break; - } // case 8 - case 16: - { - maxExtractiveSegmentCount_ = input.readInt32(); - bitField0_ |= 0x00000002; - break; - } // case 16 - case 24: - { - returnExtractiveSegmentScore_ = input.readBool(); - bitField0_ |= 0x00000004; - break; - } // case 24 - case 32: - { - numPreviousSegments_ = input.readInt32(); - bitField0_ |= 0x00000008; - break; - } // case 32 - case 40: + } // case 8 + case 16: { - numNextSegments_ = input.readInt32(); - bitField0_ |= 0x00000010; + numNextChunks_ = input.readInt32(); + bitField0_ |= 0x00000002; break; - } // case 40 + } // case 16 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -16223,299 +20991,42 @@ public Builder mergeFrom( private int bitField0_; - private int maxExtractiveAnswerCount_; - /** - * - * - *
-         * The maximum number of extractive answers returned in each search
-         * result.
-         *
-         * An extractive answer is a verbatim answer extracted from the original
-         * document, which provides a precise and contextually relevant answer to
-         * the search query.
-         *
-         * If the number of matching answers is less than the
-         * `max_extractive_answer_count`, return all of the answers. Otherwise,
-         * return the `max_extractive_answer_count`.
-         *
-         * At most five answers are returned for each
-         * [SearchResult][google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult].
-         * 
- * - * int32 max_extractive_answer_count = 1; - * - * @return The maxExtractiveAnswerCount. - */ - @java.lang.Override - public int getMaxExtractiveAnswerCount() { - return maxExtractiveAnswerCount_; - } - /** - * - * - *
-         * The maximum number of extractive answers returned in each search
-         * result.
-         *
-         * An extractive answer is a verbatim answer extracted from the original
-         * document, which provides a precise and contextually relevant answer to
-         * the search query.
-         *
-         * If the number of matching answers is less than the
-         * `max_extractive_answer_count`, return all of the answers. Otherwise,
-         * return the `max_extractive_answer_count`.
-         *
-         * At most five answers are returned for each
-         * [SearchResult][google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult].
-         * 
- * - * int32 max_extractive_answer_count = 1; - * - * @param value The maxExtractiveAnswerCount to set. - * @return This builder for chaining. - */ - public Builder setMaxExtractiveAnswerCount(int value) { - - maxExtractiveAnswerCount_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-         * The maximum number of extractive answers returned in each search
-         * result.
-         *
-         * An extractive answer is a verbatim answer extracted from the original
-         * document, which provides a precise and contextually relevant answer to
-         * the search query.
-         *
-         * If the number of matching answers is less than the
-         * `max_extractive_answer_count`, return all of the answers. Otherwise,
-         * return the `max_extractive_answer_count`.
-         *
-         * At most five answers are returned for each
-         * [SearchResult][google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult].
-         * 
- * - * int32 max_extractive_answer_count = 1; - * - * @return This builder for chaining. - */ - public Builder clearMaxExtractiveAnswerCount() { - bitField0_ = (bitField0_ & ~0x00000001); - maxExtractiveAnswerCount_ = 0; - onChanged(); - return this; - } - - private int maxExtractiveSegmentCount_; - /** - * - * - *
-         * The max number of extractive segments returned in each search result.
-         * Only applied if the
-         * [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] is set to
-         * [DataStore.ContentConfig.CONTENT_REQUIRED][google.cloud.discoveryengine.v1alpha.DataStore.ContentConfig.CONTENT_REQUIRED]
-         * or
-         * [DataStore.solution_types][google.cloud.discoveryengine.v1alpha.DataStore.solution_types]
-         * is
-         * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_CHAT].
-         *
-         * An extractive segment is a text segment extracted from the original
-         * document that is relevant to the search query, and, in general, more
-         * verbose than an extractive answer. The segment could then be used as
-         * input for LLMs to generate summaries and answers.
-         *
-         * If the number of matching segments is less than
-         * `max_extractive_segment_count`, return all of the segments. Otherwise,
-         * return the `max_extractive_segment_count`.
-         * 
- * - * int32 max_extractive_segment_count = 2; - * - * @return The maxExtractiveSegmentCount. - */ - @java.lang.Override - public int getMaxExtractiveSegmentCount() { - return maxExtractiveSegmentCount_; - } - /** - * - * - *
-         * The max number of extractive segments returned in each search result.
-         * Only applied if the
-         * [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] is set to
-         * [DataStore.ContentConfig.CONTENT_REQUIRED][google.cloud.discoveryengine.v1alpha.DataStore.ContentConfig.CONTENT_REQUIRED]
-         * or
-         * [DataStore.solution_types][google.cloud.discoveryengine.v1alpha.DataStore.solution_types]
-         * is
-         * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_CHAT].
-         *
-         * An extractive segment is a text segment extracted from the original
-         * document that is relevant to the search query, and, in general, more
-         * verbose than an extractive answer. The segment could then be used as
-         * input for LLMs to generate summaries and answers.
-         *
-         * If the number of matching segments is less than
-         * `max_extractive_segment_count`, return all of the segments. Otherwise,
-         * return the `max_extractive_segment_count`.
-         * 
- * - * int32 max_extractive_segment_count = 2; - * - * @param value The maxExtractiveSegmentCount to set. - * @return This builder for chaining. - */ - public Builder setMaxExtractiveSegmentCount(int value) { - - maxExtractiveSegmentCount_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-         * The max number of extractive segments returned in each search result.
-         * Only applied if the
-         * [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] is set to
-         * [DataStore.ContentConfig.CONTENT_REQUIRED][google.cloud.discoveryengine.v1alpha.DataStore.ContentConfig.CONTENT_REQUIRED]
-         * or
-         * [DataStore.solution_types][google.cloud.discoveryengine.v1alpha.DataStore.solution_types]
-         * is
-         * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_CHAT].
-         *
-         * An extractive segment is a text segment extracted from the original
-         * document that is relevant to the search query, and, in general, more
-         * verbose than an extractive answer. The segment could then be used as
-         * input for LLMs to generate summaries and answers.
-         *
-         * If the number of matching segments is less than
-         * `max_extractive_segment_count`, return all of the segments. Otherwise,
-         * return the `max_extractive_segment_count`.
-         * 
- * - * int32 max_extractive_segment_count = 2; - * - * @return This builder for chaining. - */ - public Builder clearMaxExtractiveSegmentCount() { - bitField0_ = (bitField0_ & ~0x00000002); - maxExtractiveSegmentCount_ = 0; - onChanged(); - return this; - } - - private boolean returnExtractiveSegmentScore_; - /** - * - * - *
-         * Specifies whether to return the confidence score from the extractive
-         * segments in each search result. The default value is `false`.
-         *
-         * Note: this is a priavte preview feature and only works for allowlisted
-         * users, please reach out to Cloud Support team if you want to use it.
-         * 
- * - * bool return_extractive_segment_score = 3; - * - * @return The returnExtractiveSegmentScore. - */ - @java.lang.Override - public boolean getReturnExtractiveSegmentScore() { - return returnExtractiveSegmentScore_; - } - /** - * - * - *
-         * Specifies whether to return the confidence score from the extractive
-         * segments in each search result. The default value is `false`.
-         *
-         * Note: this is a priavte preview feature and only works for allowlisted
-         * users, please reach out to Cloud Support team if you want to use it.
-         * 
- * - * bool return_extractive_segment_score = 3; - * - * @param value The returnExtractiveSegmentScore to set. - * @return This builder for chaining. - */ - public Builder setReturnExtractiveSegmentScore(boolean value) { - - returnExtractiveSegmentScore_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-         * Specifies whether to return the confidence score from the extractive
-         * segments in each search result. The default value is `false`.
-         *
-         * Note: this is a priavte preview feature and only works for allowlisted
-         * users, please reach out to Cloud Support team if you want to use it.
-         * 
- * - * bool return_extractive_segment_score = 3; - * - * @return This builder for chaining. - */ - public Builder clearReturnExtractiveSegmentScore() { - bitField0_ = (bitField0_ & ~0x00000004); - returnExtractiveSegmentScore_ = false; - onChanged(); - return this; - } - - private int numPreviousSegments_; + private int numPreviousChunks_; /** * * *
-         * Specifies whether to also include the adjacent from each selected
-         * segments.
-         * Return at most `num_previous_segments` segments before each selected
-         * segments.
+         * The number of previous chunks to be returned of the current chunk. The
+         * maximum allowed value is 3.
+         * If not specified, no previous chunks will be returned.
          * 
* - * int32 num_previous_segments = 4; + * int32 num_previous_chunks = 1; * - * @return The numPreviousSegments. + * @return The numPreviousChunks. */ @java.lang.Override - public int getNumPreviousSegments() { - return numPreviousSegments_; + public int getNumPreviousChunks() { + return numPreviousChunks_; } /** * * *
-         * Specifies whether to also include the adjacent from each selected
-         * segments.
-         * Return at most `num_previous_segments` segments before each selected
-         * segments.
+         * The number of previous chunks to be returned of the current chunk. The
+         * maximum allowed value is 3.
+         * If not specified, no previous chunks will be returned.
          * 
* - * int32 num_previous_segments = 4; + * int32 num_previous_chunks = 1; * - * @param value The numPreviousSegments to set. + * @param value The numPreviousChunks to set. * @return This builder for chaining. */ - public Builder setNumPreviousSegments(int value) { + public Builder setNumPreviousChunks(int value) { - numPreviousSegments_ = value; - bitField0_ |= 0x00000008; + numPreviousChunks_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -16523,57 +21034,58 @@ public Builder setNumPreviousSegments(int value) { * * *
-         * Specifies whether to also include the adjacent from each selected
-         * segments.
-         * Return at most `num_previous_segments` segments before each selected
-         * segments.
+         * The number of previous chunks to be returned of the current chunk. The
+         * maximum allowed value is 3.
+         * If not specified, no previous chunks will be returned.
          * 
* - * int32 num_previous_segments = 4; + * int32 num_previous_chunks = 1; * * @return This builder for chaining. */ - public Builder clearNumPreviousSegments() { - bitField0_ = (bitField0_ & ~0x00000008); - numPreviousSegments_ = 0; + public Builder clearNumPreviousChunks() { + bitField0_ = (bitField0_ & ~0x00000001); + numPreviousChunks_ = 0; onChanged(); return this; } - private int numNextSegments_; + private int numNextChunks_; /** * * *
-         * Return at most `num_next_segments` segments after each selected
-         * segments.
+         * The number of next chunks to be returned of the current chunk. The
+         * maximum allowed value is 3.
+         * If not specified, no next chunks will be returned.
          * 
* - * int32 num_next_segments = 5; + * int32 num_next_chunks = 2; * - * @return The numNextSegments. + * @return The numNextChunks. */ @java.lang.Override - public int getNumNextSegments() { - return numNextSegments_; + public int getNumNextChunks() { + return numNextChunks_; } /** * * *
-         * Return at most `num_next_segments` segments after each selected
-         * segments.
+         * The number of next chunks to be returned of the current chunk. The
+         * maximum allowed value is 3.
+         * If not specified, no next chunks will be returned.
          * 
* - * int32 num_next_segments = 5; + * int32 num_next_chunks = 2; * - * @param value The numNextSegments to set. + * @param value The numNextChunks to set. * @return This builder for chaining. */ - public Builder setNumNextSegments(int value) { + public Builder setNumNextChunks(int value) { - numNextSegments_ = value; - bitField0_ |= 0x00000010; + numNextChunks_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -16581,17 +21093,18 @@ public Builder setNumNextSegments(int value) { * * *
-         * Return at most `num_next_segments` segments after each selected
-         * segments.
+         * The number of next chunks to be returned of the current chunk. The
+         * maximum allowed value is 3.
+         * If not specified, no next chunks will be returned.
          * 
* - * int32 num_next_segments = 5; + * int32 num_next_chunks = 2; * * @return This builder for chaining. */ - public Builder clearNumNextSegments() { - bitField0_ = (bitField0_ & ~0x00000010); - numNextSegments_ = 0; + public Builder clearNumNextChunks() { + bitField0_ = (bitField0_ & ~0x00000002); + numNextChunks_ = 0; onChanged(); return this; } @@ -16608,30 +21121,30 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ExtractiveContentSpec) + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec) } - // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ExtractiveContentSpec) + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec) private static final com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec + .ChunkSpec DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec(); + .ChunkSpec(); } public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec + .ChunkSpec getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public ExtractiveContentSpec parsePartialFrom( + public ChunkSpec parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -16651,18 +21164,17 @@ public ExtractiveContentSpec parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec getDefaultInstanceForType() { return DEFAULT_INSTANCE; } @@ -16921,6 +21433,80 @@ public int getSearchResultModeValue() { : result; } + public static final int CHUNK_SPEC_FIELD_NUMBER = 5; + private com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec + chunkSpec_; + /** + * + * + *
+     * Specifies the chunk spec to be returned from the search response.
+     * Only available if the
+     * [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.search_result_mode]
+     * is set to
+     * [CHUNKS][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS]
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec chunk_spec = 5; + * + * + * @return Whether the chunkSpec field is set. + */ + @java.lang.Override + public boolean hasChunkSpec() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Specifies the chunk spec to be returned from the search response.
+     * Only available if the
+     * [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.search_result_mode]
+     * is set to
+     * [CHUNKS][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS]
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec chunk_spec = 5; + * + * + * @return The chunkSpec. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec + getChunkSpec() { + return chunkSpec_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec + .getDefaultInstance() + : chunkSpec_; + } + /** + * + * + *
+     * Specifies the chunk spec to be returned from the search response.
+     * Only available if the
+     * [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.search_result_mode]
+     * is set to
+     * [CHUNKS][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS]
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec chunk_spec = 5; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ChunkSpecOrBuilder + getChunkSpecOrBuilder() { + return chunkSpec_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec + .getDefaultInstance() + : chunkSpec_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -16950,6 +21536,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(4, searchResultMode_); } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(5, getChunkSpec()); + } getUnknownFields().writeTo(output); } @@ -16975,6 +21564,9 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, searchResultMode_); } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getChunkSpec()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -17005,6 +21597,10 @@ public boolean equals(final java.lang.Object obj) { if (!getExtractiveContentSpec().equals(other.getExtractiveContentSpec())) return false; } if (searchResultMode_ != other.searchResultMode_) return false; + if (hasChunkSpec() != other.hasChunkSpec()) return false; + if (hasChunkSpec()) { + if (!getChunkSpec().equals(other.getChunkSpec())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -17030,6 +21626,10 @@ public int hashCode() { } hash = (37 * hash) + SEARCH_RESULT_MODE_FIELD_NUMBER; hash = (53 * hash) + searchResultMode_; + if (hasChunkSpec()) { + hash = (37 * hash) + CHUNK_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getChunkSpec().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -17184,6 +21784,7 @@ private void maybeForceBuilderInitialization() { getSnippetSpecFieldBuilder(); getSummarySpecFieldBuilder(); getExtractiveContentSpecFieldBuilder(); + getChunkSpecFieldBuilder(); } } @@ -17207,6 +21808,11 @@ public Builder clear() { extractiveContentSpecBuilder_ = null; } searchResultMode_ = 0; + chunkSpec_ = null; + if (chunkSpecBuilder_ != null) { + chunkSpecBuilder_.dispose(); + chunkSpecBuilder_ = null; + } return this; } @@ -17269,6 +21875,10 @@ private void buildPartial0( if (((from_bitField0_ & 0x00000008) != 0)) { result.searchResultMode_ = searchResultMode_; } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.chunkSpec_ = chunkSpecBuilder_ == null ? chunkSpec_ : chunkSpecBuilder_.build(); + to_bitField0_ |= 0x00000008; + } result.bitField0_ |= to_bitField0_; } @@ -17336,6 +21946,9 @@ public Builder mergeFrom( if (other.searchResultMode_ != 0) { setSearchResultModeValue(other.getSearchResultModeValue()); } + if (other.hasChunkSpec()) { + mergeChunkSpec(other.getChunkSpec()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -17387,6 +22000,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000008; break; } // case 32 + case 42: + { + input.readMessage(getChunkSpecFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -18252,6 +22871,267 @@ public Builder clearSearchResultMode() { return this; } + private com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec + chunkSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec + .Builder, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ChunkSpecOrBuilder> + chunkSpecBuilder_; + /** + * + * + *
+       * Specifies the chunk spec to be returned from the search response.
+       * Only available if the
+       * [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.search_result_mode]
+       * is set to
+       * [CHUNKS][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS]
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec chunk_spec = 5; + * + * + * @return Whether the chunkSpec field is set. + */ + public boolean hasChunkSpec() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+       * Specifies the chunk spec to be returned from the search response.
+       * Only available if the
+       * [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.search_result_mode]
+       * is set to
+       * [CHUNKS][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS]
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec chunk_spec = 5; + * + * + * @return The chunkSpec. + */ + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec + getChunkSpec() { + if (chunkSpecBuilder_ == null) { + return chunkSpec_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec + .getDefaultInstance() + : chunkSpec_; + } else { + return chunkSpecBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Specifies the chunk spec to be returned from the search response.
+       * Only available if the
+       * [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.search_result_mode]
+       * is set to
+       * [CHUNKS][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS]
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec chunk_spec = 5; + * + */ + public Builder setChunkSpec( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec + value) { + if (chunkSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + chunkSpec_ = value; + } else { + chunkSpecBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+       * Specifies the chunk spec to be returned from the search response.
+       * Only available if the
+       * [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.search_result_mode]
+       * is set to
+       * [CHUNKS][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS]
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec chunk_spec = 5; + * + */ + public Builder setChunkSpec( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec.Builder + builderForValue) { + if (chunkSpecBuilder_ == null) { + chunkSpec_ = builderForValue.build(); + } else { + chunkSpecBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+       * Specifies the chunk spec to be returned from the search response.
+       * Only available if the
+       * [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.search_result_mode]
+       * is set to
+       * [CHUNKS][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS]
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec chunk_spec = 5; + * + */ + public Builder mergeChunkSpec( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec + value) { + if (chunkSpecBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && chunkSpec_ != null + && chunkSpec_ + != com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ChunkSpec.getDefaultInstance()) { + getChunkSpecBuilder().mergeFrom(value); + } else { + chunkSpec_ = value; + } + } else { + chunkSpecBuilder_.mergeFrom(value); + } + if (chunkSpec_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + * + * + *
+       * Specifies the chunk spec to be returned from the search response.
+       * Only available if the
+       * [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.search_result_mode]
+       * is set to
+       * [CHUNKS][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS]
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec chunk_spec = 5; + * + */ + public Builder clearChunkSpec() { + bitField0_ = (bitField0_ & ~0x00000010); + chunkSpec_ = null; + if (chunkSpecBuilder_ != null) { + chunkSpecBuilder_.dispose(); + chunkSpecBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Specifies the chunk spec to be returned from the search response.
+       * Only available if the
+       * [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.search_result_mode]
+       * is set to
+       * [CHUNKS][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS]
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec chunk_spec = 5; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec + .Builder + getChunkSpecBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getChunkSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Specifies the chunk spec to be returned from the search response.
+       * Only available if the
+       * [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.search_result_mode]
+       * is set to
+       * [CHUNKS][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS]
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec chunk_spec = 5; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ChunkSpecOrBuilder + getChunkSpecOrBuilder() { + if (chunkSpecBuilder_ != null) { + return chunkSpecBuilder_.getMessageOrBuilder(); + } else { + return chunkSpec_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec + .getDefaultInstance() + : chunkSpec_; + } + } + /** + * + * + *
+       * Specifies the chunk spec to be returned from the search response.
+       * Only available if the
+       * [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.search_result_mode]
+       * is set to
+       * [CHUNKS][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS]
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec chunk_spec = 5; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec + .Builder, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ChunkSpecOrBuilder> + getChunkSpecFieldBuilder() { + if (chunkSpecBuilder_ == null) { + chunkSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ChunkSpec, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec + .Builder, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ChunkSpecOrBuilder>(getChunkSpec(), getParentForChildren(), isClean()); + chunkSpec_ = null; + } + return chunkSpecBuilder_; + } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -20666,11 +25546,15 @@ public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery getImag * *
    * Maximum number of
-   * [Document][google.cloud.discoveryengine.v1alpha.Document]s to return. If
-   * unspecified, defaults to a reasonable value. The maximum allowed value is
-   * 100. Values above 100 are coerced to 100.
+   * [Document][google.cloud.discoveryengine.v1alpha.Document]s to return. The
+   * maximum allowed value depends on the data type. Values above the maximum
+   * value are coerced to the maximum value.
    *
-   * If this field is negative, an  `INVALID_ARGUMENT`  is returned.
+   * * Websites with basic indexing: Default `10`, Maximum `25`.
+   * * Websites with advanced indexing: Default `25`, Maximum `50`.
+   * * Other: Default `50`, Maximum `100`.
+   *
+   * If this field is negative, an  `INVALID_ARGUMENT` is returned.
    * 
* * int32 page_size = 4; @@ -21733,7 +26617,8 @@ public boolean hasContentSearchSpec() { * * If * [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path] - * is not provided, it will use [ServingConfig.EmbeddingConfig.field_path][]. + * is not provided, it will use + * [ServingConfig.EmbeddingConfig.field_path][google.cloud.discoveryengine.v1alpha.ServingConfig.embedding_config]. * * * .google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec embedding_spec = 23; @@ -21757,7 +26642,8 @@ public boolean hasEmbeddingSpec() { * * If * [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path] - * is not provided, it will use [ServingConfig.EmbeddingConfig.field_path][]. + * is not provided, it will use + * [ServingConfig.EmbeddingConfig.field_path][google.cloud.discoveryengine.v1alpha.ServingConfig.embedding_config]. * * * .google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec embedding_spec = 23; @@ -21783,7 +26669,8 @@ public com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec getE * * If * [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path] - * is not provided, it will use [ServingConfig.EmbeddingConfig.field_path][]. + * is not provided, it will use + * [ServingConfig.EmbeddingConfig.field_path][google.cloud.discoveryengine.v1alpha.ServingConfig.embedding_config]. * * * .google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec embedding_spec = 23; @@ -23833,11 +28720,15 @@ public Builder clearImageQuery() { * *
      * Maximum number of
-     * [Document][google.cloud.discoveryengine.v1alpha.Document]s to return. If
-     * unspecified, defaults to a reasonable value. The maximum allowed value is
-     * 100. Values above 100 are coerced to 100.
+     * [Document][google.cloud.discoveryengine.v1alpha.Document]s to return. The
+     * maximum allowed value depends on the data type. Values above the maximum
+     * value are coerced to the maximum value.
      *
-     * If this field is negative, an  `INVALID_ARGUMENT`  is returned.
+     * * Websites with basic indexing: Default `10`, Maximum `25`.
+     * * Websites with advanced indexing: Default `25`, Maximum `50`.
+     * * Other: Default `50`, Maximum `100`.
+     *
+     * If this field is negative, an  `INVALID_ARGUMENT` is returned.
      * 
* * int32 page_size = 4; @@ -23853,11 +28744,15 @@ public int getPageSize() { * *
      * Maximum number of
-     * [Document][google.cloud.discoveryengine.v1alpha.Document]s to return. If
-     * unspecified, defaults to a reasonable value. The maximum allowed value is
-     * 100. Values above 100 are coerced to 100.
+     * [Document][google.cloud.discoveryengine.v1alpha.Document]s to return. The
+     * maximum allowed value depends on the data type. Values above the maximum
+     * value are coerced to the maximum value.
      *
-     * If this field is negative, an  `INVALID_ARGUMENT`  is returned.
+     * * Websites with basic indexing: Default `10`, Maximum `25`.
+     * * Websites with advanced indexing: Default `25`, Maximum `50`.
+     * * Other: Default `50`, Maximum `100`.
+     *
+     * If this field is negative, an  `INVALID_ARGUMENT` is returned.
      * 
* * int32 page_size = 4; @@ -23877,11 +28772,15 @@ public Builder setPageSize(int value) { * *
      * Maximum number of
-     * [Document][google.cloud.discoveryengine.v1alpha.Document]s to return. If
-     * unspecified, defaults to a reasonable value. The maximum allowed value is
-     * 100. Values above 100 are coerced to 100.
+     * [Document][google.cloud.discoveryengine.v1alpha.Document]s to return. The
+     * maximum allowed value depends on the data type. Values above the maximum
+     * value are coerced to the maximum value.
      *
-     * If this field is negative, an  `INVALID_ARGUMENT`  is returned.
+     * * Websites with basic indexing: Default `10`, Maximum `25`.
+     * * Websites with advanced indexing: Default `25`, Maximum `50`.
+     * * Other: Default `50`, Maximum `100`.
+     *
+     * If this field is negative, an  `INVALID_ARGUMENT` is returned.
      * 
* * int32 page_size = 4; @@ -27070,7 +31969,8 @@ public Builder clearContentSearchSpec() { * * If * [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path] - * is not provided, it will use [ServingConfig.EmbeddingConfig.field_path][]. + * is not provided, it will use + * [ServingConfig.EmbeddingConfig.field_path][google.cloud.discoveryengine.v1alpha.ServingConfig.embedding_config]. * * * .google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec embedding_spec = 23; @@ -27093,7 +31993,8 @@ public boolean hasEmbeddingSpec() { * * If * [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path] - * is not provided, it will use [ServingConfig.EmbeddingConfig.field_path][]. + * is not provided, it will use + * [ServingConfig.EmbeddingConfig.field_path][google.cloud.discoveryengine.v1alpha.ServingConfig.embedding_config]. * * * .google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec embedding_spec = 23; @@ -27123,7 +32024,8 @@ public com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec getE * * If * [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path] - * is not provided, it will use [ServingConfig.EmbeddingConfig.field_path][]. + * is not provided, it will use + * [ServingConfig.EmbeddingConfig.field_path][google.cloud.discoveryengine.v1alpha.ServingConfig.embedding_config]. * * * .google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec embedding_spec = 23; @@ -27155,7 +32057,8 @@ public Builder setEmbeddingSpec( * * If * [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path] - * is not provided, it will use [ServingConfig.EmbeddingConfig.field_path][]. + * is not provided, it will use + * [ServingConfig.EmbeddingConfig.field_path][google.cloud.discoveryengine.v1alpha.ServingConfig.embedding_config]. * * * .google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec embedding_spec = 23; @@ -27185,7 +32088,8 @@ public Builder setEmbeddingSpec( * * If * [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path] - * is not provided, it will use [ServingConfig.EmbeddingConfig.field_path][]. + * is not provided, it will use + * [ServingConfig.EmbeddingConfig.field_path][google.cloud.discoveryengine.v1alpha.ServingConfig.embedding_config]. * * * .google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec embedding_spec = 23; @@ -27224,7 +32128,8 @@ public Builder mergeEmbeddingSpec( * * If * [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path] - * is not provided, it will use [ServingConfig.EmbeddingConfig.field_path][]. + * is not provided, it will use + * [ServingConfig.EmbeddingConfig.field_path][google.cloud.discoveryengine.v1alpha.ServingConfig.embedding_config]. * * * .google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec embedding_spec = 23; @@ -27252,7 +32157,8 @@ public Builder clearEmbeddingSpec() { * * If * [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path] - * is not provided, it will use [ServingConfig.EmbeddingConfig.field_path][]. + * is not provided, it will use + * [ServingConfig.EmbeddingConfig.field_path][google.cloud.discoveryengine.v1alpha.ServingConfig.embedding_config]. * * * .google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec embedding_spec = 23; @@ -27276,7 +32182,8 @@ public Builder clearEmbeddingSpec() { * * If * [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path] - * is not provided, it will use [ServingConfig.EmbeddingConfig.field_path][]. + * is not provided, it will use + * [ServingConfig.EmbeddingConfig.field_path][google.cloud.discoveryengine.v1alpha.ServingConfig.embedding_config]. * * * .google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec embedding_spec = 23; @@ -27305,7 +32212,8 @@ public Builder clearEmbeddingSpec() { * * If * [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path] - * is not provided, it will use [ServingConfig.EmbeddingConfig.field_path][]. + * is not provided, it will use + * [ServingConfig.EmbeddingConfig.field_path][google.cloud.discoveryengine.v1alpha.ServingConfig.embedding_config]. * * * .google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec embedding_spec = 23; diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SearchRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SearchRequestOrBuilder.java index 2a6292c73486..030e38339070 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SearchRequestOrBuilder.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SearchRequestOrBuilder.java @@ -162,11 +162,15 @@ public interface SearchRequestOrBuilder * *
    * Maximum number of
-   * [Document][google.cloud.discoveryengine.v1alpha.Document]s to return. If
-   * unspecified, defaults to a reasonable value. The maximum allowed value is
-   * 100. Values above 100 are coerced to 100.
+   * [Document][google.cloud.discoveryengine.v1alpha.Document]s to return. The
+   * maximum allowed value depends on the data type. Values above the maximum
+   * value are coerced to the maximum value.
    *
-   * If this field is negative, an  `INVALID_ARGUMENT`  is returned.
+   * * Websites with basic indexing: Default `10`, Maximum `25`.
+   * * Websites with advanced indexing: Default `25`, Maximum `50`.
+   * * Other: Default `50`, Maximum `100`.
+   *
+   * If this field is negative, an  `INVALID_ARGUMENT` is returned.
    * 
* * int32 page_size = 4; @@ -930,7 +934,8 @@ com.google.protobuf.Value getParamsOrDefault( * * If * [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path] - * is not provided, it will use [ServingConfig.EmbeddingConfig.field_path][]. + * is not provided, it will use + * [ServingConfig.EmbeddingConfig.field_path][google.cloud.discoveryengine.v1alpha.ServingConfig.embedding_config]. * * * .google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec embedding_spec = 23; @@ -951,7 +956,8 @@ com.google.protobuf.Value getParamsOrDefault( * * If * [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path] - * is not provided, it will use [ServingConfig.EmbeddingConfig.field_path][]. + * is not provided, it will use + * [ServingConfig.EmbeddingConfig.field_path][google.cloud.discoveryengine.v1alpha.ServingConfig.embedding_config]. * * * .google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec embedding_spec = 23; @@ -972,7 +978,8 @@ com.google.protobuf.Value getParamsOrDefault( * * If * [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path] - * is not provided, it will use [ServingConfig.EmbeddingConfig.field_path][]. + * is not provided, it will use + * [ServingConfig.EmbeddingConfig.field_path][google.cloud.discoveryengine.v1alpha.ServingConfig.embedding_config]. * * * .google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec embedding_spec = 23; diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SearchResponse.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SearchResponse.java index f09fa375851e..bdc25025b137 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SearchResponse.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SearchResponse.java @@ -11787,6 +11787,77 @@ public interface ReferenceOrBuilder * @return The bytes for uri. */ com.google.protobuf.ByteString getUriBytes(); + + /** + * + * + *
+       * List of cited chunk contents derived from document content.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference.ChunkContent chunk_contents = 4; + * + */ + java.util.List< + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference + .ChunkContent> + getChunkContentsList(); + /** + * + * + *
+       * List of cited chunk contents derived from document content.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference.ChunkContent chunk_contents = 4; + * + */ + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference.ChunkContent + getChunkContents(int index); + /** + * + * + *
+       * List of cited chunk contents derived from document content.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference.ChunkContent chunk_contents = 4; + * + */ + int getChunkContentsCount(); + /** + * + * + *
+       * List of cited chunk contents derived from document content.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference.ChunkContent chunk_contents = 4; + * + */ + java.util.List< + ? extends + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference + .ChunkContentOrBuilder> + getChunkContentsOrBuilderList(); + /** + * + * + *
+       * List of cited chunk contents derived from document content.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference.ChunkContent chunk_contents = 4; + * + */ + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference + .ChunkContentOrBuilder + getChunkContentsOrBuilder(int index); } /** * @@ -11811,6 +11882,7 @@ private Reference() { title_ = ""; document_ = ""; uri_ = ""; + chunkContents_ = java.util.Collections.emptyList(); } @java.lang.Override @@ -11835,605 +11907,1933 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { .class); } - public static final int TITLE_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object title_ = ""; - /** - * - * - *
-       * Title of the document.
-       * 
- * - * string title = 1; - * - * @return The title. - */ - @java.lang.Override - public java.lang.String getTitle() { - java.lang.Object ref = title_; - 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(); - title_ = s; - return s; - } - } - /** - * - * - *
-       * Title of the document.
-       * 
- * - * string title = 1; - * - * @return The bytes for title. - */ - @java.lang.Override - public com.google.protobuf.ByteString getTitleBytes() { - java.lang.Object ref = title_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - title_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + public interface ChunkContentOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference.ChunkContent) + com.google.protobuf.MessageOrBuilder { - public static final int DOCUMENT_FIELD_NUMBER = 2; + /** + * + * + *
+         * Chunk textual content.
+         * 
+ * + * string content = 1; + * + * @return The content. + */ + java.lang.String getContent(); + /** + * + * + *
+         * Chunk textual content.
+         * 
+ * + * string content = 1; + * + * @return The bytes for content. + */ + com.google.protobuf.ByteString getContentBytes(); - @SuppressWarnings("serial") - private volatile java.lang.Object document_ = ""; - /** - * - * - *
-       * Required.
-       * [Document.name][google.cloud.discoveryengine.v1alpha.Document.name] of
-       * the document. Full resource name of the referenced document, in the
-       * format
-       * `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`.
-       * 
- * - * - * string document = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The document. - */ - @java.lang.Override - public java.lang.String getDocument() { - java.lang.Object ref = document_; - 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(); - document_ = s; - return s; - } + /** + * + * + *
+         * Page identifier.
+         * 
+ * + * string page_identifier = 2; + * + * @return The pageIdentifier. + */ + java.lang.String getPageIdentifier(); + /** + * + * + *
+         * Page identifier.
+         * 
+ * + * string page_identifier = 2; + * + * @return The bytes for pageIdentifier. + */ + com.google.protobuf.ByteString getPageIdentifierBytes(); } /** * * *
-       * Required.
-       * [Document.name][google.cloud.discoveryengine.v1alpha.Document.name] of
-       * the document. Full resource name of the referenced document, in the
-       * format
-       * `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`.
+       * Chunk content.
        * 
* - * - * string document = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for document. + * Protobuf type {@code + * google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference.ChunkContent} */ - @java.lang.Override - public com.google.protobuf.ByteString getDocumentBytes() { - java.lang.Object ref = document_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - document_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + public static final class ChunkContent extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference.ChunkContent) + ChunkContentOrBuilder { + private static final long serialVersionUID = 0L; + // Use ChunkContent.newBuilder() to construct. + private ChunkContent(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); } - } - - public static final int URI_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private volatile java.lang.Object uri_ = ""; - /** - * - * - *
-       * Cloud Storage or HTTP uri for the document.
-       * 
- * - * string uri = 3; - * - * @return The uri. - */ - @java.lang.Override - public java.lang.String getUri() { - java.lang.Object ref = uri_; - 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(); - uri_ = s; - return s; + private ChunkContent() { + content_ = ""; + pageIdentifier_ = ""; } - } - /** - * - * - *
-       * Cloud Storage or HTTP uri for the document.
-       * 
- * - * string uri = 3; - * - * @return The bytes for uri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getUriBytes() { - java.lang.Object ref = uri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - uri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ChunkContent(); } - } - private byte memoizedIsInitialized = -1; + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_Summary_Reference_ChunkContent_descriptor; + } - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_Summary_Reference_ChunkContent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference + .ChunkContent.class, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference + .ChunkContent.Builder.class); + } - memoizedIsInitialized = 1; - return true; - } + public static final int CONTENT_FIELD_NUMBER = 1; - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, title_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(document_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, document_); + @SuppressWarnings("serial") + private volatile java.lang.Object content_ = ""; + /** + * + * + *
+         * Chunk textual content.
+         * 
+ * + * string content = 1; + * + * @return The content. + */ + @java.lang.Override + public java.lang.String getContent() { + java.lang.Object ref = content_; + 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(); + content_ = s; + return s; + } } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, uri_); + /** + * + * + *
+         * Chunk textual content.
+         * 
+ * + * string content = 1; + * + * @return The bytes for content. + */ + @java.lang.Override + public com.google.protobuf.ByteString getContentBytes() { + java.lang.Object ref = content_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + content_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } - getUnknownFields().writeTo(output); - } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; + public static final int PAGE_IDENTIFIER_FIELD_NUMBER = 2; - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, title_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(document_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, document_); + @SuppressWarnings("serial") + private volatile java.lang.Object pageIdentifier_ = ""; + /** + * + * + *
+         * Page identifier.
+         * 
+ * + * string page_identifier = 2; + * + * @return The pageIdentifier. + */ + @java.lang.Override + public java.lang.String getPageIdentifier() { + java.lang.Object ref = pageIdentifier_; + 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(); + pageIdentifier_ = s; + return s; + } } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, uri_); + /** + * + * + *
+         * Page identifier.
+         * 
+ * + * string page_identifier = 2; + * + * @return The bytes for pageIdentifier. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageIdentifierBytes() { + java.lang.Object ref = pageIdentifier_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageIdentifier_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; return true; } - if (!(obj - instanceof com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference)) { - return super.equals(obj); + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(content_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, content_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageIdentifier_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, pageIdentifier_); + } + getUnknownFields().writeTo(output); } - com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference other = - (com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference) obj; - if (!getTitle().equals(other.getTitle())) return false; - if (!getDocument().equals(other.getDocument())) return false; - if (!getUri().equals(other.getUri())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(content_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, content_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageIdentifier_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, pageIdentifier_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + TITLE_FIELD_NUMBER; - hash = (53 * hash) + getTitle().hashCode(); - hash = (37 * hash) + DOCUMENT_FIELD_NUMBER; - hash = (53 * hash) + getDocument().hashCode(); - hash = (37 * hash) + URI_FIELD_NUMBER; - hash = (53 * hash) + getUri().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference + .ChunkContent)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference.ChunkContent + other = + (com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference + .ChunkContent) + obj; + + if (!getContent().equals(other.getContent())) return false; + if (!getPageIdentifier().equals(other.getPageIdentifier())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } - public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference - parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getContent().hashCode(); + hash = (37 * hash) + PAGE_IDENTIFIER_FIELD_NUMBER; + hash = (53 * hash) + getPageIdentifier().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference + .ChunkContent + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference + .ChunkContent + parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference + .ChunkContent + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference + .ChunkContent + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference + .ChunkContent + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference + .ChunkContent + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference - parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference + .ChunkContent + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference + .ChunkContent + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } - public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference - parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference + .ChunkContent + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input); + } - public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference + .ChunkContent + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } - public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference + .ChunkContent + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference + .ChunkContent + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - public static Builder newBuilder( - com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference.ChunkContent + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-       * Document reference.
-       * 
- * - * Protobuf type {@code google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference) - com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.ReferenceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_Summary_Reference_descriptor; + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_Summary_Reference_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference.class, - com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference.Builder - .class); + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; } + /** + * + * + *
+         * Chunk content.
+         * 
+ * + * Protobuf type {@code + * google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference.ChunkContent} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference.ChunkContent) + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference + .ChunkContentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_Summary_Reference_ChunkContent_descriptor; + } - // Construct using - // com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference.newBuilder() - private Builder() {} + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_Summary_Reference_ChunkContent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference + .ChunkContent.class, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference + .ChunkContent.Builder.class); + } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } + // Construct using + // com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference.ChunkContent.newBuilder() + private Builder() {} - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - title_ = ""; - document_ = ""; - uri_ = ""; - return this; - } + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_Summary_Reference_descriptor; - } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + content_ = ""; + pageIdentifier_ = ""; + return this; + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference - getDefaultInstanceForType() { - return com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference - .getDefaultInstance(); - } + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_Summary_Reference_ChunkContent_descriptor; + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference build() { - com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference + .ChunkContent + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference + .ChunkContent.getDefaultInstance(); } - return result; - } - @java.lang.Override - public com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference - buildPartial() { - com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference result = - new com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference(this); - if (bitField0_ != 0) { - buildPartial0(result); + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference + .ChunkContent + build() { + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference.ChunkContent + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; } - onBuilt(); - return result; - } - private void buildPartial0( - com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.title_ = title_; + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference + .ChunkContent + buildPartial() { + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference.ChunkContent + result = + new com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference + .ChunkContent(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.document_ = document_; + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference.ChunkContent + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.content_ = content_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageIdentifier_ = pageIdentifier_; + } } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.uri_ = uri_; + + @java.lang.Override + public Builder clone() { + return super.clone(); } - } - @java.lang.Override - public Builder clone() { - return super.clone(); - } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference + .ChunkContent) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference + .ChunkContent) + other); + } else { + super.mergeFrom(other); + return this; + } + } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof - com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference) { - return mergeFrom( - (com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference) other); - } else { - super.mergeFrom(other); + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference.ChunkContent + other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference + .ChunkContent.getDefaultInstance()) return this; + if (!other.getContent().isEmpty()) { + content_ = other.content_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getPageIdentifier().isEmpty()) { + pageIdentifier_ = other.pageIdentifier_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); return this; } - } - public Builder mergeFrom( - com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference other) { - if (other - == com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference - .getDefaultInstance()) return this; - if (!other.getTitle().isEmpty()) { - title_ = other.title_; + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + content_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + pageIdentifier_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object content_ = ""; + /** + * + * + *
+           * Chunk textual content.
+           * 
+ * + * string content = 1; + * + * @return The content. + */ + public java.lang.String getContent() { + java.lang.Object ref = content_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + content_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+           * Chunk textual content.
+           * 
+ * + * string content = 1; + * + * @return The bytes for content. + */ + public com.google.protobuf.ByteString getContentBytes() { + java.lang.Object ref = content_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + content_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+           * Chunk textual content.
+           * 
+ * + * string content = 1; + * + * @param value The content to set. + * @return This builder for chaining. + */ + public Builder setContent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + content_ = value; bitField0_ |= 0x00000001; onChanged(); + return this; } - if (!other.getDocument().isEmpty()) { - document_ = other.document_; + /** + * + * + *
+           * Chunk textual content.
+           * 
+ * + * string content = 1; + * + * @return This builder for chaining. + */ + public Builder clearContent() { + content_ = getDefaultInstance().getContent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+           * Chunk textual content.
+           * 
+ * + * string content = 1; + * + * @param value The bytes for content to set. + * @return This builder for chaining. + */ + public Builder setContentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + content_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object pageIdentifier_ = ""; + /** + * + * + *
+           * Page identifier.
+           * 
+ * + * string page_identifier = 2; + * + * @return The pageIdentifier. + */ + public java.lang.String getPageIdentifier() { + java.lang.Object ref = pageIdentifier_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageIdentifier_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+           * Page identifier.
+           * 
+ * + * string page_identifier = 2; + * + * @return The bytes for pageIdentifier. + */ + public com.google.protobuf.ByteString getPageIdentifierBytes() { + java.lang.Object ref = pageIdentifier_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageIdentifier_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+           * Page identifier.
+           * 
+ * + * string page_identifier = 2; + * + * @param value The pageIdentifier to set. + * @return This builder for chaining. + */ + public Builder setPageIdentifier(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageIdentifier_ = value; bitField0_ |= 0x00000002; onChanged(); + return this; } - if (!other.getUri().isEmpty()) { - uri_ = other.uri_; - bitField0_ |= 0x00000004; + /** + * + * + *
+           * Page identifier.
+           * 
+ * + * string page_identifier = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageIdentifier() { + pageIdentifier_ = getDefaultInstance().getPageIdentifier(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+           * Page identifier.
+           * 
+ * + * string page_identifier = 2; + * + * @param value The bytes for pageIdentifier to set. + * @return This builder for chaining. + */ + public Builder setPageIdentifierBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageIdentifier_ = value; + bitField0_ |= 0x00000002; onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference.ChunkContent) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference.ChunkContent) + private static final com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary + .Reference.ChunkContent + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference + .ChunkContent(); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference + .ChunkContent + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ChunkContent parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference + .ChunkContent + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int TITLE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object title_ = ""; + /** + * + * + *
+       * Title of the document.
+       * 
+ * + * string title = 1; + * + * @return The title. + */ + @java.lang.Override + public java.lang.String getTitle() { + java.lang.Object ref = title_; + 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(); + title_ = s; + return s; + } + } + /** + * + * + *
+       * Title of the document.
+       * 
+ * + * string title = 1; + * + * @return The bytes for title. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DOCUMENT_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object document_ = ""; + /** + * + * + *
+       * Required.
+       * [Document.name][google.cloud.discoveryengine.v1alpha.Document.name] of
+       * the document. Full resource name of the referenced document, in the
+       * format
+       * `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`.
+       * 
+ * + * + * string document = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The document. + */ + @java.lang.Override + public java.lang.String getDocument() { + java.lang.Object ref = document_; + 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(); + document_ = s; + return s; + } + } + /** + * + * + *
+       * Required.
+       * [Document.name][google.cloud.discoveryengine.v1alpha.Document.name] of
+       * the document. Full resource name of the referenced document, in the
+       * format
+       * `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`.
+       * 
+ * + * + * string document = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for document. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDocumentBytes() { + java.lang.Object ref = document_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + document_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URI_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object uri_ = ""; + /** + * + * + *
+       * Cloud Storage or HTTP uri for the document.
+       * 
+ * + * string uri = 3; + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + 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(); + uri_ = s; + return s; + } + } + /** + * + * + *
+       * Cloud Storage or HTTP uri for the document.
+       * 
+ * + * string uri = 3; + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CHUNK_CONTENTS_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference + .ChunkContent> + chunkContents_; + /** + * + * + *
+       * List of cited chunk contents derived from document content.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference.ChunkContent chunk_contents = 4; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference + .ChunkContent> + getChunkContentsList() { + return chunkContents_; + } + /** + * + * + *
+       * List of cited chunk contents derived from document content.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference.ChunkContent chunk_contents = 4; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference + .ChunkContentOrBuilder> + getChunkContentsOrBuilderList() { + return chunkContents_; + } + /** + * + * + *
+       * List of cited chunk contents derived from document content.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference.ChunkContent chunk_contents = 4; + * + */ + @java.lang.Override + public int getChunkContentsCount() { + return chunkContents_.size(); + } + /** + * + * + *
+       * List of cited chunk contents derived from document content.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference.ChunkContent chunk_contents = 4; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference.ChunkContent + getChunkContents(int index) { + return chunkContents_.get(index); + } + /** + * + * + *
+       * List of cited chunk contents derived from document content.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference.ChunkContent chunk_contents = 4; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference + .ChunkContentOrBuilder + getChunkContentsOrBuilder(int index) { + return chunkContents_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, title_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(document_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, document_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, uri_); + } + for (int i = 0; i < chunkContents_.size(); i++) { + output.writeMessage(4, chunkContents_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, title_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(document_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, document_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, uri_); + } + for (int i = 0; i < chunkContents_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(4, chunkContents_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference other = + (com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference) obj; + + if (!getTitle().equals(other.getTitle())) return false; + if (!getDocument().equals(other.getDocument())) return false; + if (!getUri().equals(other.getUri())) return false; + if (!getChunkContentsList().equals(other.getChunkContentsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TITLE_FIELD_NUMBER; + hash = (53 * hash) + getTitle().hashCode(); + hash = (37 * hash) + DOCUMENT_FIELD_NUMBER; + hash = (53 * hash) + getDocument().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + if (getChunkContentsCount() > 0) { + hash = (37 * hash) + CHUNK_CONTENTS_FIELD_NUMBER; + hash = (53 * hash) + getChunkContentsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * Document reference.
+       * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference) + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.ReferenceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_Summary_Reference_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_Summary_Reference_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference.class, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference.Builder + .class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + title_ = ""; + document_ = ""; + uri_ = ""; + if (chunkContentsBuilder_ == null) { + chunkContents_ = java.util.Collections.emptyList(); + } else { + chunkContents_ = null; + chunkContentsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_Summary_Reference_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference build() { + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference + buildPartial() { + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference result = + new com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference result) { + if (chunkContentsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + chunkContents_ = java.util.Collections.unmodifiableList(chunkContents_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.chunkContents_ = chunkContents_; + } else { + result.chunkContents_ = chunkContentsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.title_ = title_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.document_ = document_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.uri_ = uri_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference + .getDefaultInstance()) return this; + if (!other.getTitle().isEmpty()) { + title_ = other.title_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDocument().isEmpty()) { + document_ = other.document_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (chunkContentsBuilder_ == null) { + if (!other.chunkContents_.isEmpty()) { + if (chunkContents_.isEmpty()) { + chunkContents_ = other.chunkContents_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureChunkContentsIsMutable(); + chunkContents_.addAll(other.chunkContents_); + } + onChanged(); + } + } else { + if (!other.chunkContents_.isEmpty()) { + if (chunkContentsBuilder_.isEmpty()) { + chunkContentsBuilder_.dispose(); + chunkContentsBuilder_ = null; + chunkContents_ = other.chunkContents_; + bitField0_ = (bitField0_ & ~0x00000008); + chunkContentsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getChunkContentsFieldBuilder() + : null; + } else { + chunkContentsBuilder_.addAllMessages(other.chunkContents_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + title_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + document_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + uri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference + .ChunkContent + m = + input.readMessage( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary + .Reference.ChunkContent.parser(), + extensionRegistry); + if (chunkContentsBuilder_ == null) { + ensureChunkContentsIsMutable(); + chunkContents_.add(m); + } else { + chunkContentsBuilder_.addMessage(m); + } + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object title_ = ""; + /** + * + * + *
+         * Title of the document.
+         * 
+ * + * string title = 1; + * + * @return The title. + */ + public java.lang.String getTitle() { + java.lang.Object ref = title_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + title_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * Title of the document.
+         * 
+ * + * string title = 1; + * + * @return The bytes for title. + */ + public com.google.protobuf.ByteString getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * Title of the document.
+         * 
+ * + * string title = 1; + * + * @param value The title to set. + * @return This builder for chaining. + */ + public Builder setTitle(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + title_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * Title of the document.
+         * 
+ * + * string title = 1; + * + * @return This builder for chaining. + */ + public Builder clearTitle() { + title_ = getDefaultInstance().getTitle(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+         * Title of the document.
+         * 
+ * + * string title = 1; + * + * @param value The bytes for title to set. + * @return This builder for chaining. + */ + public Builder setTitleBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + title_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object document_ = ""; + /** + * + * + *
+         * Required.
+         * [Document.name][google.cloud.discoveryengine.v1alpha.Document.name] of
+         * the document. Full resource name of the referenced document, in the
+         * format
+         * `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`.
+         * 
+ * + * + * string document = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The document. + */ + public java.lang.String getDocument() { + java.lang.Object ref = document_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + document_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * Required.
+         * [Document.name][google.cloud.discoveryengine.v1alpha.Document.name] of
+         * the document. Full resource name of the referenced document, in the
+         * format
+         * `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`.
+         * 
+ * + * + * string document = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for document. + */ + public com.google.protobuf.ByteString getDocumentBytes() { + java.lang.Object ref = document_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + document_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * Required.
+         * [Document.name][google.cloud.discoveryengine.v1alpha.Document.name] of
+         * the document. Full resource name of the referenced document, in the
+         * format
+         * `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`.
+         * 
+ * + * + * string document = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The document to set. + * @return This builder for chaining. + */ + public Builder setDocument(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); } - this.mergeUnknownFields(other.getUnknownFields()); + document_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } - - @java.lang.Override - public final boolean isInitialized() { - return true; + /** + * + * + *
+         * Required.
+         * [Document.name][google.cloud.discoveryengine.v1alpha.Document.name] of
+         * the document. Full resource name of the referenced document, in the
+         * format
+         * `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`.
+         * 
+ * + * + * string document = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearDocument() { + document_ = getDefaultInstance().getDocument(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); + /** + * + * + *
+         * Required.
+         * [Document.name][google.cloud.discoveryengine.v1alpha.Document.name] of
+         * the document. Full resource name of the referenced document, in the
+         * format
+         * `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`.
+         * 
+ * + * + * string document = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for document to set. + * @return This builder for chaining. + */ + public Builder setDocumentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - title_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - document_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - uri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally + checkByteStringIsUtf8(value); + document_ = value; + bitField0_ |= 0x00000002; + onChanged(); return this; } - private int bitField0_; - - private java.lang.Object title_ = ""; + private java.lang.Object uri_ = ""; /** * * *
-         * Title of the document.
+         * Cloud Storage or HTTP uri for the document.
          * 
* - * string title = 1; + * string uri = 3; * - * @return The title. + * @return The uri. */ - public java.lang.String getTitle() { - java.lang.Object ref = title_; + public java.lang.String getUri() { + java.lang.Object ref = uri_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - title_ = s; + uri_ = s; return s; } else { return (java.lang.String) ref; @@ -12443,325 +13843,529 @@ public java.lang.String getTitle() { * * *
-         * Title of the document.
+         * Cloud Storage or HTTP uri for the document.
          * 
* - * string title = 1; + * string uri = 3; * - * @return The bytes for title. + * @return The bytes for uri. */ - public com.google.protobuf.ByteString getTitleBytes() { - java.lang.Object ref = title_; + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - title_ = b; + uri_ = b; return b; } else { - return (com.google.protobuf.ByteString) ref; + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * Cloud Storage or HTTP uri for the document.
+         * 
+ * + * string uri = 3; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uri_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+         * Cloud Storage or HTTP uri for the document.
+         * 
+ * + * string uri = 3; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + uri_ = getDefaultInstance().getUri(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+         * Cloud Storage or HTTP uri for the document.
+         * 
+ * + * string uri = 3; + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uri_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.util.List< + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference + .ChunkContent> + chunkContents_ = java.util.Collections.emptyList(); + + private void ensureChunkContentsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + chunkContents_ = + new java.util.ArrayList< + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference + .ChunkContent>(chunkContents_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference + .ChunkContent, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference + .ChunkContent.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference + .ChunkContentOrBuilder> + chunkContentsBuilder_; + + /** + * + * + *
+         * List of cited chunk contents derived from document content.
+         * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference.ChunkContent chunk_contents = 4; + * + */ + public java.util.List< + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference + .ChunkContent> + getChunkContentsList() { + if (chunkContentsBuilder_ == null) { + return java.util.Collections.unmodifiableList(chunkContents_); + } else { + return chunkContentsBuilder_.getMessageList(); + } + } + /** + * + * + *
+         * List of cited chunk contents derived from document content.
+         * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference.ChunkContent chunk_contents = 4; + * + */ + public int getChunkContentsCount() { + if (chunkContentsBuilder_ == null) { + return chunkContents_.size(); + } else { + return chunkContentsBuilder_.getCount(); + } + } + /** + * + * + *
+         * List of cited chunk contents derived from document content.
+         * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference.ChunkContent chunk_contents = 4; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference + .ChunkContent + getChunkContents(int index) { + if (chunkContentsBuilder_ == null) { + return chunkContents_.get(index); + } else { + return chunkContentsBuilder_.getMessage(index); + } + } + /** + * + * + *
+         * List of cited chunk contents derived from document content.
+         * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference.ChunkContent chunk_contents = 4; + * + */ + public Builder setChunkContents( + int index, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference.ChunkContent + value) { + if (chunkContentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureChunkContentsIsMutable(); + chunkContents_.set(index, value); + onChanged(); + } else { + chunkContentsBuilder_.setMessage(index, value); } + return this; } /** * * *
-         * Title of the document.
+         * List of cited chunk contents derived from document content.
          * 
* - * string title = 1; - * - * @param value The title to set. - * @return This builder for chaining. + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference.ChunkContent chunk_contents = 4; + * */ - public Builder setTitle(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + public Builder setChunkContents( + int index, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference.ChunkContent + .Builder + builderForValue) { + if (chunkContentsBuilder_ == null) { + ensureChunkContentsIsMutable(); + chunkContents_.set(index, builderForValue.build()); + onChanged(); + } else { + chunkContentsBuilder_.setMessage(index, builderForValue.build()); } - title_ = value; - bitField0_ |= 0x00000001; - onChanged(); return this; } /** * * *
-         * Title of the document.
+         * List of cited chunk contents derived from document content.
          * 
* - * string title = 1; - * - * @return This builder for chaining. + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference.ChunkContent chunk_contents = 4; + * */ - public Builder clearTitle() { - title_ = getDefaultInstance().getTitle(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); + public Builder addChunkContents( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference.ChunkContent + value) { + if (chunkContentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureChunkContentsIsMutable(); + chunkContents_.add(value); + onChanged(); + } else { + chunkContentsBuilder_.addMessage(value); + } return this; } /** * * *
-         * Title of the document.
+         * List of cited chunk contents derived from document content.
          * 
* - * string title = 1; - * - * @param value The bytes for title to set. - * @return This builder for chaining. + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference.ChunkContent chunk_contents = 4; + * */ - public Builder setTitleBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + public Builder addChunkContents( + int index, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference.ChunkContent + value) { + if (chunkContentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureChunkContentsIsMutable(); + chunkContents_.add(index, value); + onChanged(); + } else { + chunkContentsBuilder_.addMessage(index, value); } - checkByteStringIsUtf8(value); - title_ = value; - bitField0_ |= 0x00000001; - onChanged(); return this; } - - private java.lang.Object document_ = ""; /** * * *
-         * Required.
-         * [Document.name][google.cloud.discoveryengine.v1alpha.Document.name] of
-         * the document. Full resource name of the referenced document, in the
-         * format
-         * `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`.
+         * List of cited chunk contents derived from document content.
          * 
* * - * string document = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference.ChunkContent chunk_contents = 4; * - * - * @return The document. */ - public java.lang.String getDocument() { - java.lang.Object ref = document_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - document_ = s; - return s; + public Builder addChunkContents( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference.ChunkContent + .Builder + builderForValue) { + if (chunkContentsBuilder_ == null) { + ensureChunkContentsIsMutable(); + chunkContents_.add(builderForValue.build()); + onChanged(); } else { - return (java.lang.String) ref; + chunkContentsBuilder_.addMessage(builderForValue.build()); } + return this; } /** * * *
-         * Required.
-         * [Document.name][google.cloud.discoveryengine.v1alpha.Document.name] of
-         * the document. Full resource name of the referenced document, in the
-         * format
-         * `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`.
+         * List of cited chunk contents derived from document content.
          * 
* * - * string document = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference.ChunkContent chunk_contents = 4; * - * - * @return The bytes for document. */ - public com.google.protobuf.ByteString getDocumentBytes() { - java.lang.Object ref = document_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - document_ = b; - return b; + public Builder addChunkContents( + int index, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference.ChunkContent + .Builder + builderForValue) { + if (chunkContentsBuilder_ == null) { + ensureChunkContentsIsMutable(); + chunkContents_.add(index, builderForValue.build()); + onChanged(); } else { - return (com.google.protobuf.ByteString) ref; + chunkContentsBuilder_.addMessage(index, builderForValue.build()); } + return this; } /** * * *
-         * Required.
-         * [Document.name][google.cloud.discoveryengine.v1alpha.Document.name] of
-         * the document. Full resource name of the referenced document, in the
-         * format
-         * `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`.
+         * List of cited chunk contents derived from document content.
          * 
* * - * string document = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference.ChunkContent chunk_contents = 4; * - * - * @param value The document to set. - * @return This builder for chaining. */ - public Builder setDocument(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + public Builder addAllChunkContents( + java.lang.Iterable< + ? extends + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference + .ChunkContent> + values) { + if (chunkContentsBuilder_ == null) { + ensureChunkContentsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, chunkContents_); + onChanged(); + } else { + chunkContentsBuilder_.addAllMessages(values); } - document_ = value; - bitField0_ |= 0x00000002; - onChanged(); return this; } /** * * *
-         * Required.
-         * [Document.name][google.cloud.discoveryengine.v1alpha.Document.name] of
-         * the document. Full resource name of the referenced document, in the
-         * format
-         * `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`.
+         * List of cited chunk contents derived from document content.
          * 
* * - * string document = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference.ChunkContent chunk_contents = 4; * - * - * @return This builder for chaining. */ - public Builder clearDocument() { - document_ = getDefaultInstance().getDocument(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); + public Builder clearChunkContents() { + if (chunkContentsBuilder_ == null) { + chunkContents_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + chunkContentsBuilder_.clear(); + } return this; } /** * * *
-         * Required.
-         * [Document.name][google.cloud.discoveryengine.v1alpha.Document.name] of
-         * the document. Full resource name of the referenced document, in the
-         * format
-         * `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`.
+         * List of cited chunk contents derived from document content.
          * 
* * - * string document = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference.ChunkContent chunk_contents = 4; * - * - * @param value The bytes for document to set. - * @return This builder for chaining. */ - public Builder setDocumentBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + public Builder removeChunkContents(int index) { + if (chunkContentsBuilder_ == null) { + ensureChunkContentsIsMutable(); + chunkContents_.remove(index); + onChanged(); + } else { + chunkContentsBuilder_.remove(index); } - checkByteStringIsUtf8(value); - document_ = value; - bitField0_ |= 0x00000002; - onChanged(); return this; } - - private java.lang.Object uri_ = ""; /** * * *
-         * Cloud Storage or HTTP uri for the document.
+         * List of cited chunk contents derived from document content.
          * 
* - * string uri = 3; + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference.ChunkContent chunk_contents = 4; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference + .ChunkContent.Builder + getChunkContentsBuilder(int index) { + return getChunkContentsFieldBuilder().getBuilder(index); + } + /** * - * @return The uri. + * + *
+         * List of cited chunk contents derived from document content.
+         * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference.ChunkContent chunk_contents = 4; + * */ - public java.lang.String getUri() { - java.lang.Object ref = uri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uri_ = s; - return s; + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference + .ChunkContentOrBuilder + getChunkContentsOrBuilder(int index) { + if (chunkContentsBuilder_ == null) { + return chunkContents_.get(index); } else { - return (java.lang.String) ref; + return chunkContentsBuilder_.getMessageOrBuilder(index); } } /** * * *
-         * Cloud Storage or HTTP uri for the document.
+         * List of cited chunk contents derived from document content.
          * 
* - * string uri = 3; - * - * @return The bytes for uri. + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference.ChunkContent chunk_contents = 4; + * */ - public com.google.protobuf.ByteString getUriBytes() { - java.lang.Object ref = uri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - uri_ = b; - return b; + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference + .ChunkContentOrBuilder> + getChunkContentsOrBuilderList() { + if (chunkContentsBuilder_ != null) { + return chunkContentsBuilder_.getMessageOrBuilderList(); } else { - return (com.google.protobuf.ByteString) ref; + return java.util.Collections.unmodifiableList(chunkContents_); } } /** * * *
-         * Cloud Storage or HTTP uri for the document.
+         * List of cited chunk contents derived from document content.
          * 
* - * string uri = 3; - * - * @param value The uri to set. - * @return This builder for chaining. + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference.ChunkContent chunk_contents = 4; + * */ - public Builder setUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - uri_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference + .ChunkContent.Builder + addChunkContentsBuilder() { + return getChunkContentsFieldBuilder() + .addBuilder( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference + .ChunkContent.getDefaultInstance()); } /** * * *
-         * Cloud Storage or HTTP uri for the document.
+         * List of cited chunk contents derived from document content.
          * 
* - * string uri = 3; - * - * @return This builder for chaining. + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference.ChunkContent chunk_contents = 4; + * */ - public Builder clearUri() { - uri_ = getDefaultInstance().getUri(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference + .ChunkContent.Builder + addChunkContentsBuilder(int index) { + return getChunkContentsFieldBuilder() + .addBuilder( + index, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference + .ChunkContent.getDefaultInstance()); } /** * * *
-         * Cloud Storage or HTTP uri for the document.
+         * List of cited chunk contents derived from document content.
          * 
* - * string uri = 3; - * - * @param value The bytes for uri to set. - * @return This builder for chaining. + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference.ChunkContent chunk_contents = 4; + * */ - public Builder setUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + public java.util.List< + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference + .ChunkContent.Builder> + getChunkContentsBuilderList() { + return getChunkContentsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference + .ChunkContent, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference + .ChunkContent.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference + .ChunkContentOrBuilder> + getChunkContentsFieldBuilder() { + if (chunkContentsBuilder_ == null) { + chunkContentsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference + .ChunkContent, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference + .ChunkContent.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Reference + .ChunkContentOrBuilder>( + chunkContents_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + chunkContents_ = null; } - checkByteStringIsUtf8(value); - uri_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; + return chunkContentsBuilder_; } @java.lang.Override diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SearchServiceProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SearchServiceProto.java index fd512704b7e3..b3b2e10f6dfc 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SearchServiceProto.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SearchServiceProto.java @@ -56,6 +56,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_BoostSpec_ConditionBoostSpec_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_BoostSpec_ConditionBoostSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_BoostSpec_ConditionBoostSpec_BoostControlSpec_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_BoostSpec_ConditionBoostSpec_BoostControlSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_BoostSpec_ConditionBoostSpec_BoostControlSpec_ControlPoint_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_BoostSpec_ConditionBoostSpec_BoostControlSpec_ControlPoint_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_QueryExpansionSpec_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -88,6 +96,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_ExtractiveContentSpec_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_ExtractiveContentSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_ChunkSpec_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_ChunkSpec_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_EmbeddingSpec_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -156,6 +168,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_Summary_Reference_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_Summary_Reference_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_Summary_Reference_ChunkContent_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_Summary_Reference_ChunkContent_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_Summary_SummaryWithMetadata_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -186,7 +202,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ne/v1alpha/chunk.proto\0321google/cloud/dis" + "coveryengine/v1alpha/common.proto\0323googl" + "e/cloud/discoveryengine/v1alpha/document" - + ".proto\032\034google/protobuf/struct.proto\"\315 \n" + + ".proto\032\034google/protobuf/struct.proto\"\263(\n" + "\rSearchRequest\022L\n\016serving_config\030\001 \001(\tB4" + "\340A\002\372A.\n,discoveryengine.googleapis.com/S" + "ervingConfig\022:\n\006branch\030\002 \001(\tB*\372A\'\n%disco" @@ -235,159 +251,188 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "..google.cloud.discoveryengine.v1alpha.I" + "nterval\022\031\n\021restricted_values\030\003 \003(\t\022\020\n\010pr" + "efixes\030\004 \003(\t\022\020\n\010contains\030\005 \003(\t\022\030\n\020case_i" - + "nsensitive\030\006 \001(\010\022\020\n\010order_by\030\007 \001(\t\032\264\001\n\tB" + + "nsensitive\030\006 \001(\010\022\020\n\010order_by\030\007 \001(\t\032\325\007\n\tB" + "oostSpec\022o\n\025condition_boost_specs\030\001 \003(\0132" + "P.google.cloud.discoveryengine.v1alpha.S" + "earchRequest.BoostSpec.ConditionBoostSpe" - + "c\0326\n\022ConditionBoostSpec\022\021\n\tcondition\030\001 \001" - + "(\t\022\r\n\005boost\030\002 \001(\002\032\331\001\n\022QueryExpansionSpec" - + "\022c\n\tcondition\030\001 \001(\0162P.google.cloud.disco" - + "veryengine.v1alpha.SearchRequest.QueryEx" - + "pansionSpec.Condition\022\036\n\026pin_unexpanded_" - + "results\030\002 \001(\010\">\n\tCondition\022\031\n\025CONDITION_" - + "UNSPECIFIED\020\000\022\014\n\010DISABLED\020\001\022\010\n\004AUTO\020\002\032\256\001" - + "\n\023SpellCorrectionSpec\022Z\n\004mode\030\001 \001(\0162L.go" - + "ogle.cloud.discoveryengine.v1alpha.Searc" - + "hRequest.SpellCorrectionSpec.Mode\";\n\004Mod" - + "e\022\024\n\020MODE_UNSPECIFIED\020\000\022\023\n\017SUGGESTION_ON" - + "LY\020\001\022\010\n\004AUTO\020\002\032\262\n\n\021ContentSearchSpec\022g\n\014" - + "snippet_spec\030\001 \001(\0132Q.google.cloud.discov" - + "eryengine.v1alpha.SearchRequest.ContentS" - + "earchSpec.SnippetSpec\022g\n\014summary_spec\030\002 " - + "\001(\0132Q.google.cloud.discoveryengine.v1alp" - + "ha.SearchRequest.ContentSearchSpec.Summa" - + "rySpec\022|\n\027extractive_content_spec\030\003 \001(\0132" - + "[.google.cloud.discoveryengine.v1alpha.S" - + "earchRequest.ContentSearchSpec.Extractiv" - + "eContentSpec\022r\n\022search_result_mode\030\004 \001(\016" - + "2V.google.cloud.discoveryengine.v1alpha." - + "SearchRequest.ContentSearchSpec.SearchRe" - + "sultMode\032`\n\013SnippetSpec\022\035\n\021max_snippet_c" - + "ount\030\001 \001(\005B\002\030\001\022\032\n\016reference_only\030\002 \001(\010B\002" - + "\030\001\022\026\n\016return_snippet\030\003 \001(\010\032\333\003\n\013SummarySp" - + "ec\022\034\n\024summary_result_count\030\001 \001(\005\022\031\n\021incl" - + "ude_citations\030\002 \001(\010\022 \n\030ignore_adversaria" - + "l_query\030\003 \001(\010\022(\n ignore_non_summary_seek" - + "ing_query\030\004 \001(\010\022|\n\021model_prompt_spec\030\005 \001" - + "(\0132a.google.cloud.discoveryengine.v1alph" - + "a.SearchRequest.ContentSearchSpec.Summar" - + "ySpec.ModelPromptSpec\022\025\n\rlanguage_code\030\006" - + " \001(\t\022o\n\nmodel_spec\030\007 \001(\0132[.google.cloud." + + "c\032\326\006\n\022ConditionBoostSpec\022\021\n\tcondition\030\001 " + + "\001(\t\022\r\n\005boost\030\002 \001(\002\022}\n\022boost_control_spec" + + "\030\003 \001(\0132a.google.cloud.discoveryengine.v1" + + "alpha.SearchRequest.BoostSpec.ConditionB" + + "oostSpec.BoostControlSpec\032\236\005\n\020BoostContr" + + "olSpec\022\022\n\nfield_name\030\001 \001(\t\022\207\001\n\016attribute" + + "_type\030\002 \001(\0162o.google.cloud.discoveryengi" + + "ne.v1alpha.SearchRequest.BoostSpec.Condi" + + "tionBoostSpec.BoostControlSpec.Attribute" + + "Type\022\217\001\n\022interpolation_type\030\003 \001(\0162s.goog" + + "le.cloud.discoveryengine.v1alpha.SearchR" + + "equest.BoostSpec.ConditionBoostSpec.Boos" + + "tControlSpec.InterpolationType\022\206\001\n\016contr" + + "ol_points\030\004 \003(\0132n.google.cloud.discovery" + + "engine.v1alpha.SearchRequest.BoostSpec.C" + + "onditionBoostSpec.BoostControlSpec.Contr" + + "olPoint\032=\n\014ControlPoint\022\027\n\017attribute_val" + + "ue\030\001 \001(\t\022\024\n\014boost_amount\030\002 \001(\002\"M\n\rAttrib" + + "uteType\022\036\n\032ATTRIBUTE_TYPE_UNSPECIFIED\020\000\022" + + "\r\n\tNUMERICAL\020\001\022\r\n\tFRESHNESS\020\002\"C\n\021Interpo" + + "lationType\022\"\n\036INTERPOLATION_TYPE_UNSPECI" + + "FIED\020\000\022\n\n\006LINEAR\020\001\032\331\001\n\022QueryExpansionSpe" + + "c\022c\n\tcondition\030\001 \001(\0162P.google.cloud.disc" + + "overyengine.v1alpha.SearchRequest.QueryE" + + "xpansionSpec.Condition\022\036\n\026pin_unexpanded" + + "_results\030\002 \001(\010\">\n\tCondition\022\031\n\025CONDITION" + + "_UNSPECIFIED\020\000\022\014\n\010DISABLED\020\001\022\010\n\004AUTO\020\002\032\256" + + "\001\n\023SpellCorrectionSpec\022Z\n\004mode\030\001 \001(\0162L.g" + + "oogle.cloud.discoveryengine.v1alpha.Sear" + + "chRequest.SpellCorrectionSpec.Mode\";\n\004Mo" + + "de\022\024\n\020MODE_UNSPECIFIED\020\000\022\023\n\017SUGGESTION_O" + + "NLY\020\001\022\010\n\004AUTO\020\002\032\367\013\n\021ContentSearchSpec\022g\n" + + "\014snippet_spec\030\001 \001(\0132Q.google.cloud.disco" + + "veryengine.v1alpha.SearchRequest.Content" + + "SearchSpec.SnippetSpec\022g\n\014summary_spec\030\002" + + " \001(\0132Q.google.cloud.discoveryengine.v1al" + + "pha.SearchRequest.ContentSearchSpec.Summ" + + "arySpec\022|\n\027extractive_content_spec\030\003 \001(\013" + + "2[.google.cloud.discoveryengine.v1alpha." + + "SearchRequest.ContentSearchSpec.Extracti" + + "veContentSpec\022r\n\022search_result_mode\030\004 \001(" + + "\0162V.google.cloud.discoveryengine.v1alpha" + + ".SearchRequest.ContentSearchSpec.SearchR" + + "esultMode\022c\n\nchunk_spec\030\005 \001(\0132O.google.c" + + "loud.discoveryengine.v1alpha.SearchReque" + + "st.ContentSearchSpec.ChunkSpec\032`\n\013Snippe" + + "tSpec\022\035\n\021max_snippet_count\030\001 \001(\005B\002\030\001\022\032\n\016" + + "reference_only\030\002 \001(\010B\002\030\001\022\026\n\016return_snipp" + + "et\030\003 \001(\010\032\370\003\n\013SummarySpec\022\034\n\024summary_resu" + + "lt_count\030\001 \001(\005\022\031\n\021include_citations\030\002 \001(" + + "\010\022 \n\030ignore_adversarial_query\030\003 \001(\010\022(\n i" + + "gnore_non_summary_seeking_query\030\004 \001(\010\022|\n" + + "\021model_prompt_spec\030\005 \001(\0132a.google.cloud." + "discoveryengine.v1alpha.SearchRequest.Co" - + "ntentSearchSpec.SummarySpec.ModelSpec\032#\n" - + "\017ModelPromptSpec\022\020\n\010preamble\030\001 \001(\t\032\034\n\tMo" - + "delSpec\022\017\n\007version\030\001 \001(\t\032\305\001\n\025ExtractiveC" - + "ontentSpec\022#\n\033max_extractive_answer_coun" - + "t\030\001 \001(\005\022$\n\034max_extractive_segment_count\030" - + "\002 \001(\005\022\'\n\037return_extractive_segment_score" - + "\030\003 \001(\010\022\035\n\025num_previous_segments\030\004 \001(\005\022\031\n" - + "\021num_next_segments\030\005 \001(\005\"Q\n\020SearchResult" - + "Mode\022\"\n\036SEARCH_RESULT_MODE_UNSPECIFIED\020\000" - + "\022\r\n\tDOCUMENTS\020\001\022\n\n\006CHUNKS\020\002\032\264\001\n\rEmbeddin" - + "gSpec\022l\n\021embedding_vectors\030\001 \003(\0132Q.googl" - + "e.cloud.discoveryengine.v1alpha.SearchRe" - + "quest.EmbeddingSpec.EmbeddingVector\0325\n\017E" - + "mbeddingVector\022\022\n\nfield_path\030\001 \001(\t\022\016\n\006ve" - + "ctor\030\002 \003(\002\032E\n\013ParamsEntry\022\013\n\003key\030\001 \001(\t\022%" - + "\n\005value\030\002 \001(\0132\026.google.protobuf.Value:\0028" - + "\001\0321\n\017UserLabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005val" - + "ue\030\002 \001(\t:\0028\001\"\331\027\n\016SearchResponse\022R\n\007resul" - + "ts\030\001 \003(\0132A.google.cloud.discoveryengine." - + "v1alpha.SearchResponse.SearchResult\022J\n\006f" - + "acets\030\002 \003(\0132:.google.cloud.discoveryengi" - + "ne.v1alpha.SearchResponse.Facet\022e\n\024guide" - + "d_search_result\030\010 \001(\0132G.google.cloud.dis" - + "coveryengine.v1alpha.SearchResponse.Guid" - + "edSearchResult\022\022\n\ntotal_size\030\003 \001(\005\022\031\n\021at" - + "tribution_token\030\004 \001(\t\022\024\n\014redirect_uri\030\014 " - + "\001(\t\022\027\n\017next_page_token\030\005 \001(\t\022\027\n\017correcte" - + "d_query\030\007 \001(\t\022M\n\007summary\030\t \001(\0132<.google." - + "cloud.discoveryengine.v1alpha.SearchResp" - + "onse.Summary\022\030\n\020applied_controls\030\n \003(\t\022f" - + "\n\025geo_search_debug_info\030\020 \003(\0132G.google.c" - + "loud.discoveryengine.v1alpha.SearchRespo" - + "nse.GeoSearchDebugInfo\022e\n\024query_expansio" - + "n_info\030\016 \001(\0132G.google.cloud.discoveryeng" - + "ine.v1alpha.SearchResponse.QueryExpansio" - + "nInfo\032\350\002\n\014SearchResult\022\n\n\002id\030\001 \001(\t\022@\n\010do" - + "cument\030\002 \001(\0132..google.cloud.discoveryeng" - + "ine.v1alpha.Document\022:\n\005chunk\030\022 \001(\0132+.go" - + "ogle.cloud.discoveryengine.v1alpha.Chunk" - + "\022h\n\014model_scores\030\004 \003(\0132R.google.cloud.di" - + "scoveryengine.v1alpha.SearchResponse.Sea" - + "rchResult.ModelScoresEntry\032d\n\020ModelScore" - + "sEntry\022\013\n\003key\030\001 \001(\t\022?\n\005value\030\002 \001(\01320.goo" - + "gle.cloud.discoveryengine.v1alpha.Double" - + "List:\0028\001\032\203\002\n\005Facet\022\013\n\003key\030\001 \001(\t\022U\n\006value" - + "s\030\002 \003(\0132E.google.cloud.discoveryengine.v" - + "1alpha.SearchResponse.Facet.FacetValue\022\025" - + "\n\rdynamic_facet\030\003 \001(\010\032\177\n\nFacetValue\022\017\n\005v" - + "alue\030\001 \001(\tH\000\022B\n\010interval\030\002 \001(\0132..google." - + "cloud.discoveryengine.v1alpha.IntervalH\000" - + "\022\r\n\005count\030\003 \001(\003B\r\n\013facet_value\032\364\001\n\022Guide" - + "dSearchResult\022z\n\025refinement_attributes\030\001" - + " \003(\0132[.google.cloud.discoveryengine.v1al" - + "pha.SearchResponse.GuidedSearchResult.Re" - + "finementAttribute\022\033\n\023follow_up_questions" - + "\030\002 \003(\t\032E\n\023RefinementAttribute\022\025\n\rattribu" - + "te_key\030\001 \001(\t\022\027\n\017attribute_value\030\002 \001(\t\032\220\n" - + "\n\007Summary\022\024\n\014summary_text\030\001 \001(\t\022r\n\027summa" - + "ry_skipped_reasons\030\002 \003(\0162Q.google.cloud." + + "ntentSearchSpec.SummarySpec.ModelPromptS" + + "pec\022\025\n\rlanguage_code\030\006 \001(\t\022o\n\nmodel_spec" + + "\030\007 \001(\0132[.google.cloud.discoveryengine.v1" + + "alpha.SearchRequest.ContentSearchSpec.Su" + + "mmarySpec.ModelSpec\022\033\n\023use_semantic_chun" + + "ks\030\010 \001(\010\032#\n\017ModelPromptSpec\022\020\n\010preamble\030" + + "\001 \001(\t\032\034\n\tModelSpec\022\017\n\007version\030\001 \001(\t\032\305\001\n\025" + + "ExtractiveContentSpec\022#\n\033max_extractive_" + + "answer_count\030\001 \001(\005\022$\n\034max_extractive_seg" + + "ment_count\030\002 \001(\005\022\'\n\037return_extractive_se" + + "gment_score\030\003 \001(\010\022\035\n\025num_previous_segmen" + + "ts\030\004 \001(\005\022\031\n\021num_next_segments\030\005 \001(\005\032A\n\tC" + + "hunkSpec\022\033\n\023num_previous_chunks\030\001 \001(\005\022\027\n" + + "\017num_next_chunks\030\002 \001(\005\"Q\n\020SearchResultMo" + + "de\022\"\n\036SEARCH_RESULT_MODE_UNSPECIFIED\020\000\022\r" + + "\n\tDOCUMENTS\020\001\022\n\n\006CHUNKS\020\002\032\264\001\n\rEmbeddingS" + + "pec\022l\n\021embedding_vectors\030\001 \003(\0132Q.google." + + "cloud.discoveryengine.v1alpha.SearchRequ" + + "est.EmbeddingSpec.EmbeddingVector\0325\n\017Emb" + + "eddingVector\022\022\n\nfield_path\030\001 \001(\t\022\016\n\006vect" + + "or\030\002 \003(\002\032E\n\013ParamsEntry\022\013\n\003key\030\001 \001(\t\022%\n\005" + + "value\030\002 \001(\0132\026.google.protobuf.Value:\0028\001\032" + + "1\n\017UserLabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value" + + "\030\002 \001(\t:\0028\001\"\201\031\n\016SearchResponse\022R\n\007results" + + "\030\001 \003(\0132A.google.cloud.discoveryengine.v1" + + "alpha.SearchResponse.SearchResult\022J\n\006fac" + + "ets\030\002 \003(\0132:.google.cloud.discoveryengine" + + ".v1alpha.SearchResponse.Facet\022e\n\024guided_" + + "search_result\030\010 \001(\0132G.google.cloud.disco" + + "veryengine.v1alpha.SearchResponse.Guided" + + "SearchResult\022\022\n\ntotal_size\030\003 \001(\005\022\031\n\021attr" + + "ibution_token\030\004 \001(\t\022\024\n\014redirect_uri\030\014 \001(" + + "\t\022\027\n\017next_page_token\030\005 \001(\t\022\027\n\017corrected_" + + "query\030\007 \001(\t\022M\n\007summary\030\t \001(\0132<.google.cl" + + "oud.discoveryengine.v1alpha.SearchRespon" + + "se.Summary\022\030\n\020applied_controls\030\n \003(\t\022f\n\025" + + "geo_search_debug_info\030\020 \003(\0132G.google.clo" + + "ud.discoveryengine.v1alpha.SearchRespons" + + "e.GeoSearchDebugInfo\022e\n\024query_expansion_" + + "info\030\016 \001(\0132G.google.cloud.discoveryengin" + + "e.v1alpha.SearchResponse.QueryExpansionI" + + "nfo\032\350\002\n\014SearchResult\022\n\n\002id\030\001 \001(\t\022@\n\010docu" + + "ment\030\002 \001(\0132..google.cloud.discoveryengin" + + "e.v1alpha.Document\022:\n\005chunk\030\022 \001(\0132+.goog" + + "le.cloud.discoveryengine.v1alpha.Chunk\022h" + + "\n\014model_scores\030\004 \003(\0132R.google.cloud.disc" + + "overyengine.v1alpha.SearchResponse.Searc" + + "hResult.ModelScoresEntry\032d\n\020ModelScoresE" + + "ntry\022\013\n\003key\030\001 \001(\t\022?\n\005value\030\002 \001(\01320.googl" + + "e.cloud.discoveryengine.v1alpha.DoubleLi" + + "st:\0028\001\032\203\002\n\005Facet\022\013\n\003key\030\001 \001(\t\022U\n\006values\030" + + "\002 \003(\0132E.google.cloud.discoveryengine.v1a" + + "lpha.SearchResponse.Facet.FacetValue\022\025\n\r" + + "dynamic_facet\030\003 \001(\010\032\177\n\nFacetValue\022\017\n\005val" + + "ue\030\001 \001(\tH\000\022B\n\010interval\030\002 \001(\0132..google.cl" + + "oud.discoveryengine.v1alpha.IntervalH\000\022\r" + + "\n\005count\030\003 \001(\003B\r\n\013facet_value\032\364\001\n\022GuidedS" + + "earchResult\022z\n\025refinement_attributes\030\001 \003" + + "(\0132[.google.cloud.discoveryengine.v1alph" + + "a.SearchResponse.GuidedSearchResult.Refi" + + "nementAttribute\022\033\n\023follow_up_questions\030\002" + + " \003(\t\032E\n\023RefinementAttribute\022\025\n\rattribute" + + "_key\030\001 \001(\t\022\027\n\017attribute_value\030\002 \001(\t\032\270\013\n\007" + + "Summary\022\024\n\014summary_text\030\001 \001(\t\022r\n\027summary" + + "_skipped_reasons\030\002 \003(\0162Q.google.cloud.di" + + "scoveryengine.v1alpha.SearchResponse.Sum" + + "mary.SummarySkippedReason\022h\n\021safety_attr" + + "ibutes\030\003 \001(\0132M.google.cloud.discoveryeng" + + "ine.v1alpha.SearchResponse.Summary.Safet" + + "yAttributes\022o\n\025summary_with_metadata\030\004 \001" + + "(\0132P.google.cloud.discoveryengine.v1alph" + + "a.SearchResponse.Summary.SummaryWithMeta" + + "data\0326\n\020SafetyAttributes\022\022\n\ncategories\030\001" + + " \003(\t\022\016\n\006scores\030\002 \003(\002\032l\n\020CitationMetadata" + + "\022X\n\tcitations\030\001 \003(\0132E.google.cloud.disco" + + "veryengine.v1alpha.SearchResponse.Summar" + + "y.Citation\032\220\001\n\010Citation\022\023\n\013start_index\030\001" + + " \001(\003\022\021\n\tend_index\030\002 \001(\003\022\\\n\007sources\030\003 \003(\013" + + "2K.google.cloud.discoveryengine.v1alpha." + + "SearchResponse.Summary.CitationSource\032)\n" + + "\016CitationSource\022\027\n\017reference_index\030\004 \001(\003" + + "\032\221\002\n\tReference\022\r\n\005title\030\001 \001(\t\022A\n\010documen" + + "t\030\002 \001(\tB/\340A\002\372A)\n\'discoveryengine.googlea" + + "pis.com/Document\022\013\n\003uri\030\003 \001(\t\022k\n\016chunk_c" + + "ontents\030\004 \003(\0132S.google.cloud.discoveryen" + + "gine.v1alpha.SearchResponse.Summary.Refe" + + "rence.ChunkContent\0328\n\014ChunkContent\022\017\n\007co" + + "ntent\030\001 \001(\t\022\027\n\017page_identifier\030\002 \001(\t\032\354\001\n" + + "\023SummaryWithMetadata\022\017\n\007summary\030\001 \001(\t\022h\n" + + "\021citation_metadata\030\002 \001(\0132M.google.cloud." + "discoveryengine.v1alpha.SearchResponse.S" - + "ummary.SummarySkippedReason\022h\n\021safety_at" - + "tributes\030\003 \001(\0132M.google.cloud.discoverye" - + "ngine.v1alpha.SearchResponse.Summary.Saf" - + "etyAttributes\022o\n\025summary_with_metadata\030\004" - + " \001(\0132P.google.cloud.discoveryengine.v1al" - + "pha.SearchResponse.Summary.SummaryWithMe" - + "tadata\0326\n\020SafetyAttributes\022\022\n\ncategories" - + "\030\001 \003(\t\022\016\n\006scores\030\002 \003(\002\032l\n\020CitationMetada" - + "ta\022X\n\tcitations\030\001 \003(\0132E.google.cloud.dis" - + "coveryengine.v1alpha.SearchResponse.Summ" - + "ary.Citation\032\220\001\n\010Citation\022\023\n\013start_index" - + "\030\001 \001(\003\022\021\n\tend_index\030\002 \001(\003\022\\\n\007sources\030\003 \003" - + "(\0132K.google.cloud.discoveryengine.v1alph" - + "a.SearchResponse.Summary.CitationSource\032" - + ")\n\016CitationSource\022\027\n\017reference_index\030\004 \001" - + "(\003\032j\n\tReference\022\r\n\005title\030\001 \001(\t\022A\n\010docume" - + "nt\030\002 \001(\tB/\340A\002\372A)\n\'discoveryengine.google" - + "apis.com/Document\022\013\n\003uri\030\003 \001(\t\032\354\001\n\023Summa" - + "ryWithMetadata\022\017\n\007summary\030\001 \001(\t\022h\n\021citat" - + "ion_metadata\030\002 \001(\0132M.google.cloud.discov" - + "eryengine.v1alpha.SearchResponse.Summary" - + ".CitationMetadata\022Z\n\nreferences\030\003 \003(\0132F." - + "google.cloud.discoveryengine.v1alpha.Sea" - + "rchResponse.Summary.Reference\"\340\001\n\024Summar" - + "ySkippedReason\022&\n\"SUMMARY_SKIPPED_REASON" - + "_UNSPECIFIED\020\000\022\035\n\031ADVERSARIAL_QUERY_IGNO" - + "RED\020\001\022%\n!NON_SUMMARY_SEEKING_QUERY_IGNOR" - + "ED\020\002\022\037\n\033OUT_OF_DOMAIN_QUERY_IGNORED\020\003\022\036\n" - + "\032POTENTIAL_POLICY_VIOLATION\020\004\022\031\n\025LLM_ADD" - + "ON_NOT_ENABLED\020\005\032K\n\022GeoSearchDebugInfo\022\036" - + "\n\026original_address_query\030\001 \001(\t\022\025\n\rerror_" - + "message\030\002 \001(\t\032I\n\022QueryExpansionInfo\022\026\n\016e" - + "xpanded_query\030\001 \001(\010\022\033\n\023pinned_result_cou" - + "nt\030\002 \001(\0032\216\004\n\rSearchService\022\250\003\n\006Search\0223." - + "google.cloud.discoveryengine.v1alpha.Sea" - + "rchRequest\0324.google.cloud.discoveryengin" - + "e.v1alpha.SearchResponse\"\262\002\202\323\344\223\002\253\002\"U/v1a" - + "lpha/{serving_config=projects/*/location" - + "s/*/dataStores/*/servingConfigs/*}:searc" - + "h:\001*Zh\"c/v1alpha/{serving_config=project" - + "s/*/locations/*/collections/*/dataStores" - + "/*/servingConfigs/*}:search:\001*Ze\"`/v1alp" - + "ha/{serving_config=projects/*/locations/" - + "*/collections/*/engines/*/servingConfigs" - + "/*}:search:\001*\032R\312A\036discoveryengine.google" - + "apis.com\322A.https://www.googleapis.com/au" - + "th/cloud-platformB\236\002\n(com.google.cloud.d" - + "iscoveryengine.v1alphaB\022SearchServicePro" - + "toP\001ZRcloud.google.com/go/discoveryengin" - + "e/apiv1alpha/discoveryenginepb;discovery" - + "enginepb\242\002\017DISCOVERYENGINE\252\002$Google.Clou" - + "d.DiscoveryEngine.V1Alpha\312\002$Google\\Cloud" - + "\\DiscoveryEngine\\V1alpha\352\002\'Google::Cloud" - + "::DiscoveryEngine::V1alphab\006proto3" + + "ummary.CitationMetadata\022Z\n\nreferences\030\003 " + + "\003(\0132F.google.cloud.discoveryengine.v1alp" + + "ha.SearchResponse.Summary.Reference\"\340\001\n\024" + + "SummarySkippedReason\022&\n\"SUMMARY_SKIPPED_" + + "REASON_UNSPECIFIED\020\000\022\035\n\031ADVERSARIAL_QUER" + + "Y_IGNORED\020\001\022%\n!NON_SUMMARY_SEEKING_QUERY" + + "_IGNORED\020\002\022\037\n\033OUT_OF_DOMAIN_QUERY_IGNORE" + + "D\020\003\022\036\n\032POTENTIAL_POLICY_VIOLATION\020\004\022\031\n\025L" + + "LM_ADDON_NOT_ENABLED\020\005\032K\n\022GeoSearchDebug" + + "Info\022\036\n\026original_address_query\030\001 \001(\t\022\025\n\r" + + "error_message\030\002 \001(\t\032I\n\022QueryExpansionInf" + + "o\022\026\n\016expanded_query\030\001 \001(\010\022\033\n\023pinned_resu" + + "lt_count\030\002 \001(\0032\216\004\n\rSearchService\022\250\003\n\006Sea" + + "rch\0223.google.cloud.discoveryengine.v1alp" + + "ha.SearchRequest\0324.google.cloud.discover" + + "yengine.v1alpha.SearchResponse\"\262\002\202\323\344\223\002\253\002" + + "\"U/v1alpha/{serving_config=projects/*/lo" + + "cations/*/dataStores/*/servingConfigs/*}" + + ":search:\001*Zh\"c/v1alpha/{serving_config=p" + + "rojects/*/locations/*/collections/*/data" + + "Stores/*/servingConfigs/*}:search:\001*Ze\"`" + + "/v1alpha/{serving_config=projects/*/loca" + + "tions/*/collections/*/engines/*/servingC" + + "onfigs/*}:search:\001*\032R\312A\036discoveryengine." + + "googleapis.com\322A.https://www.googleapis." + + "com/auth/cloud-platformB\236\002\n(com.google.c" + + "loud.discoveryengine.v1alphaB\022SearchServ" + + "iceProtoP\001ZRcloud.google.com/go/discover" + + "yengine/apiv1alpha/discoveryenginepb;dis" + + "coveryenginepb\242\002\017DISCOVERYENGINE\252\002$Googl" + + "e.Cloud.DiscoveryEngine.V1Alpha\312\002$Google" + + "\\Cloud\\DiscoveryEngine\\V1alpha\352\002\'Google:" + + ":Cloud::DiscoveryEngine::V1alphab\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -497,7 +542,27 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_BoostSpec_ConditionBoostSpec_descriptor, new java.lang.String[] { - "Condition", "Boost", + "Condition", "Boost", "BoostControlSpec", + }); + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_BoostSpec_ConditionBoostSpec_BoostControlSpec_descriptor = + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_BoostSpec_ConditionBoostSpec_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_BoostSpec_ConditionBoostSpec_BoostControlSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_BoostSpec_ConditionBoostSpec_BoostControlSpec_descriptor, + new java.lang.String[] { + "FieldName", "AttributeType", "InterpolationType", "ControlPoints", + }); + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_BoostSpec_ConditionBoostSpec_BoostControlSpec_ControlPoint_descriptor = + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_BoostSpec_ConditionBoostSpec_BoostControlSpec_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_BoostSpec_ConditionBoostSpec_BoostControlSpec_ControlPoint_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_BoostSpec_ConditionBoostSpec_BoostControlSpec_ControlPoint_descriptor, + new java.lang.String[] { + "AttributeValue", "BoostAmount", }); internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_QueryExpansionSpec_descriptor = internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_descriptor @@ -527,7 +592,11 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_descriptor, new java.lang.String[] { - "SnippetSpec", "SummarySpec", "ExtractiveContentSpec", "SearchResultMode", + "SnippetSpec", + "SummarySpec", + "ExtractiveContentSpec", + "SearchResultMode", + "ChunkSpec", }); internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_SnippetSpec_descriptor = internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_descriptor @@ -554,6 +623,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ModelPromptSpec", "LanguageCode", "ModelSpec", + "UseSemanticChunks", }); internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_SummarySpec_ModelPromptSpec_descriptor = internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_SummarySpec_descriptor @@ -589,6 +659,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "NumPreviousSegments", "NumNextSegments", }); + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_ChunkSpec_descriptor = + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_descriptor + .getNestedTypes() + .get(3); + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_ChunkSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_ChunkSpec_descriptor, + new java.lang.String[] { + "NumPreviousChunks", "NumNextChunks", + }); internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_EmbeddingSpec_descriptor = internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_descriptor .getNestedTypes() @@ -766,7 +846,17 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_Summary_Reference_descriptor, new java.lang.String[] { - "Title", "Document", "Uri", + "Title", "Document", "Uri", "ChunkContents", + }); + internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_Summary_Reference_ChunkContent_descriptor = + internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_Summary_Reference_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_Summary_Reference_ChunkContent_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_Summary_Reference_ChunkContent_descriptor, + new java.lang.String[] { + "Content", "PageIdentifier", }); internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_Summary_SummaryWithMetadata_descriptor = internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_Summary_descriptor diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SearchTuningServiceProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SearchTuningServiceProto.java index 5c218916c367..5740819f4bf2 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SearchTuningServiceProto.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SearchTuningServiceProto.java @@ -40,6 +40,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_discoveryengine_v1alpha_TrainCustomModelResponse_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_discoveryengine_v1alpha_TrainCustomModelResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_TrainCustomModelResponse_MetricsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_TrainCustomModelResponse_MetricsEntry_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_discoveryengine_v1alpha_TrainCustomModelMetadata_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -73,33 +77,37 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "v\n\020GcsTrainingInput\022\030\n\020corpus_data_path\030" + "\001 \001(\t\022\027\n\017query_data_path\030\002 \001(\t\022\027\n\017train_" + "data_path\030\003 \001(\t\022\026\n\016test_data_path\030\004 \001(\tB" - + "\020\n\016training_input\"\252\001\n\030TrainCustomModelRe" + + "\020\n\016training_input\"\270\002\n\030TrainCustomModelRe" + "sponse\022)\n\rerror_samples\030\001 \003(\0132\022.google.r" + "pc.Status\022M\n\014error_config\030\002 \001(\01327.google" + ".cloud.discoveryengine.v1alpha.ImportErr" - + "orConfig\022\024\n\014model_status\030\003 \001(\t\"|\n\030TrainC" - + "ustomModelMetadata\022/\n\013create_time\030\001 \001(\0132" - + "\032.google.protobuf.Timestamp\022/\n\013update_ti" - + "me\030\002 \001(\0132\032.google.protobuf.Timestamp2\303\003\n" - + "\023SearchTuningService\022\327\002\n\020TrainCustomMode" - + "l\022=.google.cloud.discoveryengine.v1alpha" - + ".TrainCustomModelRequest\032\035.google.longru" - + "nning.Operation\"\344\001\312A~\n=google.cloud.disc" - + "overyengine.v1alpha.TrainCustomModelResp" - + "onse\022=google.cloud.discoveryengine.v1alp" - + "ha.TrainCustomModelMetadata\202\323\344\223\002]\"X/v1al" - + "pha/{data_store=projects/*/locations/*/c" - + "ollections/*/dataStores/*}:trainCustomMo" - + "del:\001*\032R\312A\036discoveryengine.googleapis.co" - + "m\322A.https://www.googleapis.com/auth/clou" - + "d-platformB\244\002\n(com.google.cloud.discover" - + "yengine.v1alphaB\030SearchTuningServiceProt" - + "oP\001ZRcloud.google.com/go/discoveryengine" - + "/apiv1alpha/discoveryenginepb;discoverye" - + "nginepb\242\002\017DISCOVERYENGINE\252\002$Google.Cloud" - + ".DiscoveryEngine.V1Alpha\312\002$Google\\Cloud\\" - + "DiscoveryEngine\\V1alpha\352\002\'Google::Cloud:" - + ":DiscoveryEngine::V1alphab\006proto3" + + "orConfig\022\024\n\014model_status\030\003 \001(\t\022\\\n\007metric" + + "s\030\004 \003(\0132K.google.cloud.discoveryengine.v" + + "1alpha.TrainCustomModelResponse.MetricsE" + + "ntry\032.\n\014MetricsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005val" + + "ue\030\002 \001(\001:\0028\001\"|\n\030TrainCustomModelMetadata" + + "\022/\n\013create_time\030\001 \001(\0132\032.google.protobuf." + + "Timestamp\022/\n\013update_time\030\002 \001(\0132\032.google." + + "protobuf.Timestamp2\303\003\n\023SearchTuningServi" + + "ce\022\327\002\n\020TrainCustomModel\022=.google.cloud.d" + + "iscoveryengine.v1alpha.TrainCustomModelR" + + "equest\032\035.google.longrunning.Operation\"\344\001" + + "\312A~\n=google.cloud.discoveryengine.v1alph" + + "a.TrainCustomModelResponse\022=google.cloud" + + ".discoveryengine.v1alpha.TrainCustomMode" + + "lMetadata\202\323\344\223\002]\"X/v1alpha/{data_store=pr" + + "ojects/*/locations/*/collections/*/dataS" + + "tores/*}:trainCustomModel:\001*\032R\312A\036discove" + + "ryengine.googleapis.com\322A.https://www.go" + + "ogleapis.com/auth/cloud-platformB\244\002\n(com" + + ".google.cloud.discoveryengine.v1alphaB\030S" + + "earchTuningServiceProtoP\001ZRcloud.google." + + "com/go/discoveryengine/apiv1alpha/discov" + + "eryenginepb;discoveryenginepb\242\002\017DISCOVER" + + "YENGINE\252\002$Google.Cloud.DiscoveryEngine.V" + + "1Alpha\312\002$Google\\Cloud\\DiscoveryEngine\\V1" + + "alpha\352\002\'Google::Cloud::DiscoveryEngine::" + + "V1alphab\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -138,7 +146,17 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_discoveryengine_v1alpha_TrainCustomModelResponse_descriptor, new java.lang.String[] { - "ErrorSamples", "ErrorConfig", "ModelStatus", + "ErrorSamples", "ErrorConfig", "ModelStatus", "Metrics", + }); + internal_static_google_cloud_discoveryengine_v1alpha_TrainCustomModelResponse_MetricsEntry_descriptor = + internal_static_google_cloud_discoveryengine_v1alpha_TrainCustomModelResponse_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_discoveryengine_v1alpha_TrainCustomModelResponse_MetricsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_TrainCustomModelResponse_MetricsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", }); internal_static_google_cloud_discoveryengine_v1alpha_TrainCustomModelMetadata_descriptor = getDescriptor().getMessageTypes().get(2); diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SolutionType.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SolutionType.java index 795441d2828a..9e473c2511b0 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SolutionType.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SolutionType.java @@ -69,6 +69,18 @@ public enum SolutionType implements com.google.protobuf.ProtocolMessageEnum { * SOLUTION_TYPE_CHAT = 3; */ SOLUTION_TYPE_CHAT(3), + /** + * + * + *
+   * Used for use cases related to the Generative Chat agent.
+   * It's used for Generative chat engine only, the associated data stores
+   * must enrolled with `SOLUTION_TYPE_CHAT` solution.
+   * 
+ * + * SOLUTION_TYPE_GENERATIVE_CHAT = 4; + */ + SOLUTION_TYPE_GENERATIVE_CHAT(4), UNRECOGNIZED(-1), ; @@ -112,6 +124,18 @@ public enum SolutionType implements com.google.protobuf.ProtocolMessageEnum { * SOLUTION_TYPE_CHAT = 3; */ public static final int SOLUTION_TYPE_CHAT_VALUE = 3; + /** + * + * + *
+   * Used for use cases related to the Generative Chat agent.
+   * It's used for Generative chat engine only, the associated data stores
+   * must enrolled with `SOLUTION_TYPE_CHAT` solution.
+   * 
+ * + * SOLUTION_TYPE_GENERATIVE_CHAT = 4; + */ + public static final int SOLUTION_TYPE_GENERATIVE_CHAT_VALUE = 4; public final int getNumber() { if (this == UNRECOGNIZED) { @@ -145,6 +169,8 @@ public static SolutionType forNumber(int value) { return SOLUTION_TYPE_SEARCH; case 3: return SOLUTION_TYPE_CHAT; + case 4: + return SOLUTION_TYPE_GENERATIVE_CHAT; default: return null; } diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SpannerSource.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SpannerSource.java new file mode 100644 index 000000000000..cc8fee80f51b --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SpannerSource.java @@ -0,0 +1,1287 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/import_config.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * The Spanner source for importing data
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.SpannerSource} + */ +public final class SpannerSource extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.SpannerSource) + SpannerSourceOrBuilder { + private static final long serialVersionUID = 0L; + // Use SpannerSource.newBuilder() to construct. + private SpannerSource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SpannerSource() { + projectId_ = ""; + instanceId_ = ""; + databaseId_ = ""; + tableId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SpannerSource(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_SpannerSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_SpannerSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.SpannerSource.class, + com.google.cloud.discoveryengine.v1alpha.SpannerSource.Builder.class); + } + + public static final int PROJECT_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object projectId_ = ""; + /** + * + * + *
+   * The project ID that the Spanner source is in with a length limit of 128
+   * characters. If not specified, inherits the project ID from the parent
+   * request.
+   * 
+ * + * string project_id = 1; + * + * @return The projectId. + */ + @java.lang.Override + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + 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(); + projectId_ = s; + return s; + } + } + /** + * + * + *
+   * The project ID that the Spanner source is in with a length limit of 128
+   * characters. If not specified, inherits the project ID from the parent
+   * request.
+   * 
+ * + * string project_id = 1; + * + * @return The bytes for projectId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INSTANCE_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object instanceId_ = ""; + /** + * + * + *
+   * Required. The instance ID of the source Spanner table.
+   * 
+ * + * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The instanceId. + */ + @java.lang.Override + public java.lang.String getInstanceId() { + java.lang.Object ref = instanceId_; + 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(); + instanceId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The instance ID of the source Spanner table.
+   * 
+ * + * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for instanceId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInstanceIdBytes() { + java.lang.Object ref = instanceId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATABASE_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object databaseId_ = ""; + /** + * + * + *
+   * Required. The database ID of the source Spanner table.
+   * 
+ * + * string database_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The databaseId. + */ + @java.lang.Override + public java.lang.String getDatabaseId() { + java.lang.Object ref = databaseId_; + 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(); + databaseId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The database ID of the source Spanner table.
+   * 
+ * + * string database_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for databaseId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDatabaseIdBytes() { + java.lang.Object ref = databaseId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + databaseId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TABLE_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object tableId_ = ""; + /** + * + * + *
+   * Required. The table name of the Spanner database that needs to be imported.
+   * 
+ * + * string table_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The tableId. + */ + @java.lang.Override + public java.lang.String getTableId() { + java.lang.Object ref = tableId_; + 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(); + tableId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The table name of the Spanner database that needs to be imported.
+   * 
+ * + * string table_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for tableId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTableIdBytes() { + java.lang.Object ref = tableId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tableId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENABLE_DATA_BOOST_FIELD_NUMBER = 5; + private boolean enableDataBoost_ = false; + /** + * + * + *
+   * Whether to apply data boost on Spanner export. Enabling this option will
+   * incur additional cost. More info can be found
+   * [here](https://cloud.google.com/spanner/docs/databoost/databoost-overview#billing_and_quotas).
+   * 
+ * + * bool enable_data_boost = 5; + * + * @return The enableDataBoost. + */ + @java.lang.Override + public boolean getEnableDataBoost() { + return enableDataBoost_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, instanceId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(databaseId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, databaseId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tableId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, tableId_); + } + if (enableDataBoost_ != false) { + output.writeBool(5, enableDataBoost_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, instanceId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(databaseId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, databaseId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tableId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, tableId_); + } + if (enableDataBoost_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, enableDataBoost_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.SpannerSource)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.SpannerSource other = + (com.google.cloud.discoveryengine.v1alpha.SpannerSource) obj; + + if (!getProjectId().equals(other.getProjectId())) return false; + if (!getInstanceId().equals(other.getInstanceId())) return false; + if (!getDatabaseId().equals(other.getDatabaseId())) return false; + if (!getTableId().equals(other.getTableId())) return false; + if (getEnableDataBoost() != other.getEnableDataBoost()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PROJECT_ID_FIELD_NUMBER; + hash = (53 * hash) + getProjectId().hashCode(); + hash = (37 * hash) + INSTANCE_ID_FIELD_NUMBER; + hash = (53 * hash) + getInstanceId().hashCode(); + hash = (37 * hash) + DATABASE_ID_FIELD_NUMBER; + hash = (53 * hash) + getDatabaseId().hashCode(); + hash = (37 * hash) + TABLE_ID_FIELD_NUMBER; + hash = (53 * hash) + getTableId().hashCode(); + hash = (37 * hash) + ENABLE_DATA_BOOST_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableDataBoost()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.SpannerSource parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SpannerSource parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SpannerSource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SpannerSource parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SpannerSource parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SpannerSource parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SpannerSource parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SpannerSource parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SpannerSource parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SpannerSource parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SpannerSource parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SpannerSource parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.SpannerSource prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The Spanner source for importing data
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.SpannerSource} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.SpannerSource) + com.google.cloud.discoveryengine.v1alpha.SpannerSourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_SpannerSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_SpannerSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.SpannerSource.class, + com.google.cloud.discoveryengine.v1alpha.SpannerSource.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1alpha.SpannerSource.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + projectId_ = ""; + instanceId_ = ""; + databaseId_ = ""; + tableId_ = ""; + enableDataBoost_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_SpannerSource_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SpannerSource getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.SpannerSource.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SpannerSource build() { + com.google.cloud.discoveryengine.v1alpha.SpannerSource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SpannerSource buildPartial() { + com.google.cloud.discoveryengine.v1alpha.SpannerSource result = + new com.google.cloud.discoveryengine.v1alpha.SpannerSource(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.discoveryengine.v1alpha.SpannerSource result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.projectId_ = projectId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.instanceId_ = instanceId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.databaseId_ = databaseId_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.tableId_ = tableId_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.enableDataBoost_ = enableDataBoost_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.SpannerSource) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.SpannerSource) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1alpha.SpannerSource other) { + if (other == com.google.cloud.discoveryengine.v1alpha.SpannerSource.getDefaultInstance()) + return this; + if (!other.getProjectId().isEmpty()) { + projectId_ = other.projectId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getInstanceId().isEmpty()) { + instanceId_ = other.instanceId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getDatabaseId().isEmpty()) { + databaseId_ = other.databaseId_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getTableId().isEmpty()) { + tableId_ = other.tableId_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.getEnableDataBoost() != false) { + setEnableDataBoost(other.getEnableDataBoost()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + projectId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + instanceId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + databaseId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + tableId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 40: + { + enableDataBoost_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case 40 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object projectId_ = ""; + /** + * + * + *
+     * The project ID that the Spanner source is in with a length limit of 128
+     * characters. If not specified, inherits the project ID from the parent
+     * request.
+     * 
+ * + * string project_id = 1; + * + * @return The projectId. + */ + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The project ID that the Spanner source is in with a length limit of 128
+     * characters. If not specified, inherits the project ID from the parent
+     * request.
+     * 
+ * + * string project_id = 1; + * + * @return The bytes for projectId. + */ + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The project ID that the Spanner source is in with a length limit of 128
+     * characters. If not specified, inherits the project ID from the parent
+     * request.
+     * 
+ * + * string project_id = 1; + * + * @param value The projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + projectId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The project ID that the Spanner source is in with a length limit of 128
+     * characters. If not specified, inherits the project ID from the parent
+     * request.
+     * 
+ * + * string project_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearProjectId() { + projectId_ = getDefaultInstance().getProjectId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The project ID that the Spanner source is in with a length limit of 128
+     * characters. If not specified, inherits the project ID from the parent
+     * request.
+     * 
+ * + * string project_id = 1; + * + * @param value The bytes for projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + projectId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object instanceId_ = ""; + /** + * + * + *
+     * Required. The instance ID of the source Spanner table.
+     * 
+ * + * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The instanceId. + */ + public java.lang.String getInstanceId() { + java.lang.Object ref = instanceId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instanceId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The instance ID of the source Spanner table.
+     * 
+ * + * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for instanceId. + */ + public com.google.protobuf.ByteString getInstanceIdBytes() { + java.lang.Object ref = instanceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The instance ID of the source Spanner table.
+     * 
+ * + * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The instanceId to set. + * @return This builder for chaining. + */ + public Builder setInstanceId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + instanceId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The instance ID of the source Spanner table.
+     * 
+ * + * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearInstanceId() { + instanceId_ = getDefaultInstance().getInstanceId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The instance ID of the source Spanner table.
+     * 
+ * + * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for instanceId to set. + * @return This builder for chaining. + */ + public Builder setInstanceIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + instanceId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object databaseId_ = ""; + /** + * + * + *
+     * Required. The database ID of the source Spanner table.
+     * 
+ * + * string database_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The databaseId. + */ + public java.lang.String getDatabaseId() { + java.lang.Object ref = databaseId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + databaseId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The database ID of the source Spanner table.
+     * 
+ * + * string database_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for databaseId. + */ + public com.google.protobuf.ByteString getDatabaseIdBytes() { + java.lang.Object ref = databaseId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + databaseId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The database ID of the source Spanner table.
+     * 
+ * + * string database_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The databaseId to set. + * @return This builder for chaining. + */ + public Builder setDatabaseId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + databaseId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The database ID of the source Spanner table.
+     * 
+ * + * string database_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDatabaseId() { + databaseId_ = getDefaultInstance().getDatabaseId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The database ID of the source Spanner table.
+     * 
+ * + * string database_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for databaseId to set. + * @return This builder for chaining. + */ + public Builder setDatabaseIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + databaseId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object tableId_ = ""; + /** + * + * + *
+     * Required. The table name of the Spanner database that needs to be imported.
+     * 
+ * + * string table_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The tableId. + */ + public java.lang.String getTableId() { + java.lang.Object ref = tableId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tableId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The table name of the Spanner database that needs to be imported.
+     * 
+ * + * string table_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for tableId. + */ + public com.google.protobuf.ByteString getTableIdBytes() { + java.lang.Object ref = tableId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tableId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The table name of the Spanner database that needs to be imported.
+     * 
+ * + * string table_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The tableId to set. + * @return This builder for chaining. + */ + public Builder setTableId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + tableId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The table name of the Spanner database that needs to be imported.
+     * 
+ * + * string table_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearTableId() { + tableId_ = getDefaultInstance().getTableId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The table name of the Spanner database that needs to be imported.
+     * 
+ * + * string table_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for tableId to set. + * @return This builder for chaining. + */ + public Builder setTableIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + tableId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private boolean enableDataBoost_; + /** + * + * + *
+     * Whether to apply data boost on Spanner export. Enabling this option will
+     * incur additional cost. More info can be found
+     * [here](https://cloud.google.com/spanner/docs/databoost/databoost-overview#billing_and_quotas).
+     * 
+ * + * bool enable_data_boost = 5; + * + * @return The enableDataBoost. + */ + @java.lang.Override + public boolean getEnableDataBoost() { + return enableDataBoost_; + } + /** + * + * + *
+     * Whether to apply data boost on Spanner export. Enabling this option will
+     * incur additional cost. More info can be found
+     * [here](https://cloud.google.com/spanner/docs/databoost/databoost-overview#billing_and_quotas).
+     * 
+ * + * bool enable_data_boost = 5; + * + * @param value The enableDataBoost to set. + * @return This builder for chaining. + */ + public Builder setEnableDataBoost(boolean value) { + + enableDataBoost_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Whether to apply data boost on Spanner export. Enabling this option will
+     * incur additional cost. More info can be found
+     * [here](https://cloud.google.com/spanner/docs/databoost/databoost-overview#billing_and_quotas).
+     * 
+ * + * bool enable_data_boost = 5; + * + * @return This builder for chaining. + */ + public Builder clearEnableDataBoost() { + bitField0_ = (bitField0_ & ~0x00000010); + enableDataBoost_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.SpannerSource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.SpannerSource) + private static final com.google.cloud.discoveryengine.v1alpha.SpannerSource DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.SpannerSource(); + } + + public static com.google.cloud.discoveryengine.v1alpha.SpannerSource getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SpannerSource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SpannerSource getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SpannerSourceOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SpannerSourceOrBuilder.java new file mode 100644 index 000000000000..2621226ea464 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SpannerSourceOrBuilder.java @@ -0,0 +1,145 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/import_config.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.discoveryengine.v1alpha; + +public interface SpannerSourceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.SpannerSource) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The project ID that the Spanner source is in with a length limit of 128
+   * characters. If not specified, inherits the project ID from the parent
+   * request.
+   * 
+ * + * string project_id = 1; + * + * @return The projectId. + */ + java.lang.String getProjectId(); + /** + * + * + *
+   * The project ID that the Spanner source is in with a length limit of 128
+   * characters. If not specified, inherits the project ID from the parent
+   * request.
+   * 
+ * + * string project_id = 1; + * + * @return The bytes for projectId. + */ + com.google.protobuf.ByteString getProjectIdBytes(); + + /** + * + * + *
+   * Required. The instance ID of the source Spanner table.
+   * 
+ * + * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The instanceId. + */ + java.lang.String getInstanceId(); + /** + * + * + *
+   * Required. The instance ID of the source Spanner table.
+   * 
+ * + * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for instanceId. + */ + com.google.protobuf.ByteString getInstanceIdBytes(); + + /** + * + * + *
+   * Required. The database ID of the source Spanner table.
+   * 
+ * + * string database_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The databaseId. + */ + java.lang.String getDatabaseId(); + /** + * + * + *
+   * Required. The database ID of the source Spanner table.
+   * 
+ * + * string database_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for databaseId. + */ + com.google.protobuf.ByteString getDatabaseIdBytes(); + + /** + * + * + *
+   * Required. The table name of the Spanner database that needs to be imported.
+   * 
+ * + * string table_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The tableId. + */ + java.lang.String getTableId(); + /** + * + * + *
+   * Required. The table name of the Spanner database that needs to be imported.
+   * 
+ * + * string table_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for tableId. + */ + com.google.protobuf.ByteString getTableIdBytes(); + + /** + * + * + *
+   * Whether to apply data boost on Spanner export. Enabling this option will
+   * incur additional cost. More info can be found
+   * [here](https://cloud.google.com/spanner/docs/databoost/databoost-overview#billing_and_quotas).
+   * 
+ * + * bool enable_data_boost = 5; + * + * @return The enableDataBoost. + */ + boolean getEnableDataBoost(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/TrainCustomModelRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/TrainCustomModelRequest.java index 6581ad5d9828..8e1b9f95655e 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/TrainCustomModelRequest.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/TrainCustomModelRequest.java @@ -80,8 +80,8 @@ public interface GcsTrainingInputOrBuilder * A newline delimited jsonl/ndjson file. * * For search-tuning model, each line should have the _id, title - * and text. Example: {"_id": "doc1", title: "relevant doc", "text": - * "relevant text"} + * and text. Example: + * `{"_id": "doc1", title: "relevant doc", "text": "relevant text"}` * * * string corpus_data_path = 1; @@ -98,8 +98,8 @@ public interface GcsTrainingInputOrBuilder * A newline delimited jsonl/ndjson file. * * For search-tuning model, each line should have the _id, title - * and text. Example: {"_id": "doc1", title: "relevant doc", "text": - * "relevant text"} + * and text. Example: + * `{"_id": "doc1", title: "relevant doc", "text": "relevant text"}` * * * string corpus_data_path = 1; @@ -276,8 +276,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * A newline delimited jsonl/ndjson file. * * For search-tuning model, each line should have the _id, title - * and text. Example: {"_id": "doc1", title: "relevant doc", "text": - * "relevant text"} + * and text. Example: + * `{"_id": "doc1", title: "relevant doc", "text": "relevant text"}` * * * string corpus_data_path = 1; @@ -305,8 +305,8 @@ public java.lang.String getCorpusDataPath() { * A newline delimited jsonl/ndjson file. * * For search-tuning model, each line should have the _id, title - * and text. Example: {"_id": "doc1", title: "relevant doc", "text": - * "relevant text"} + * and text. Example: + * `{"_id": "doc1", title: "relevant doc", "text": "relevant text"}` * * * string corpus_data_path = 1; @@ -965,8 +965,8 @@ public Builder mergeFrom( * A newline delimited jsonl/ndjson file. * * For search-tuning model, each line should have the _id, title - * and text. Example: {"_id": "doc1", title: "relevant doc", "text": - * "relevant text"} + * and text. Example: + * `{"_id": "doc1", title: "relevant doc", "text": "relevant text"}` * * * string corpus_data_path = 1; @@ -993,8 +993,8 @@ public java.lang.String getCorpusDataPath() { * A newline delimited jsonl/ndjson file. * * For search-tuning model, each line should have the _id, title - * and text. Example: {"_id": "doc1", title: "relevant doc", "text": - * "relevant text"} + * and text. Example: + * `{"_id": "doc1", title: "relevant doc", "text": "relevant text"}` * * * string corpus_data_path = 1; @@ -1021,8 +1021,8 @@ public com.google.protobuf.ByteString getCorpusDataPathBytes() { * A newline delimited jsonl/ndjson file. * * For search-tuning model, each line should have the _id, title - * and text. Example: {"_id": "doc1", title: "relevant doc", "text": - * "relevant text"} + * and text. Example: + * `{"_id": "doc1", title: "relevant doc", "text": "relevant text"}` * * * string corpus_data_path = 1; @@ -1048,8 +1048,8 @@ public Builder setCorpusDataPath(java.lang.String value) { * A newline delimited jsonl/ndjson file. * * For search-tuning model, each line should have the _id, title - * and text. Example: {"_id": "doc1", title: "relevant doc", "text": - * "relevant text"} + * and text. Example: + * `{"_id": "doc1", title: "relevant doc", "text": "relevant text"}` * * * string corpus_data_path = 1; @@ -1071,8 +1071,8 @@ public Builder clearCorpusDataPath() { * A newline delimited jsonl/ndjson file. * * For search-tuning model, each line should have the _id, title - * and text. Example: {"_id": "doc1", title: "relevant doc", "text": - * "relevant text"} + * and text. Example: + * `{"_id": "doc1", title: "relevant doc", "text": "relevant text"}` * * * string corpus_data_path = 1; diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/TrainCustomModelResponse.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/TrainCustomModelResponse.java index abadc3a48ed1..801998aa4130 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/TrainCustomModelResponse.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/TrainCustomModelResponse.java @@ -56,6 +56,18 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { .internal_static_google_cloud_discoveryengine_v1alpha_TrainCustomModelResponse_descriptor; } + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetMetrics(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { @@ -249,6 +261,105 @@ public com.google.protobuf.ByteString getModelStatusBytes() { } } + public static final int METRICS_FIELD_NUMBER = 4; + + private static final class MetricsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.discoveryengine.v1alpha.SearchTuningServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_TrainCustomModelResponse_MetricsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.DOUBLE, + 0D); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField metrics_; + + private com.google.protobuf.MapField internalGetMetrics() { + if (metrics_ == null) { + return com.google.protobuf.MapField.emptyMapField(MetricsDefaultEntryHolder.defaultEntry); + } + return metrics_; + } + + public int getMetricsCount() { + return internalGetMetrics().getMap().size(); + } + /** + * + * + *
+   * The metrics of the trained model.
+   * 
+ * + * map<string, double> metrics = 4; + */ + @java.lang.Override + public boolean containsMetrics(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetMetrics().getMap().containsKey(key); + } + /** Use {@link #getMetricsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getMetrics() { + return getMetricsMap(); + } + /** + * + * + *
+   * The metrics of the trained model.
+   * 
+ * + * map<string, double> metrics = 4; + */ + @java.lang.Override + public java.util.Map getMetricsMap() { + return internalGetMetrics().getMap(); + } + /** + * + * + *
+   * The metrics of the trained model.
+   * 
+ * + * map<string, double> metrics = 4; + */ + @java.lang.Override + public double getMetricsOrDefault(java.lang.String key, double defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetMetrics().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * The metrics of the trained model.
+   * 
+ * + * map<string, double> metrics = 4; + */ + @java.lang.Override + public double getMetricsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetMetrics().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -272,6 +383,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(modelStatus_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, modelStatus_); } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetMetrics(), MetricsDefaultEntryHolder.defaultEntry, 4); getUnknownFields().writeTo(output); } @@ -290,6 +403,16 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(modelStatus_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, modelStatus_); } + for (java.util.Map.Entry entry : + internalGetMetrics().getMap().entrySet()) { + com.google.protobuf.MapEntry metrics__ = + MetricsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, metrics__); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -312,6 +435,7 @@ public boolean equals(final java.lang.Object obj) { if (!getErrorConfig().equals(other.getErrorConfig())) return false; } if (!getModelStatus().equals(other.getModelStatus())) return false; + if (!internalGetMetrics().equals(other.internalGetMetrics())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -333,6 +457,10 @@ public int hashCode() { } hash = (37 * hash) + MODEL_STATUS_FIELD_NUMBER; hash = (53 * hash) + getModelStatus().hashCode(); + if (!internalGetMetrics().getMap().isEmpty()) { + hash = (37 * hash) + METRICS_FIELD_NUMBER; + hash = (53 * hash) + internalGetMetrics().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -455,6 +583,28 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { .internal_static_google_cloud_discoveryengine_v1alpha_TrainCustomModelResponse_descriptor; } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetMetrics(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetMutableMetrics(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { @@ -500,6 +650,7 @@ public Builder clear() { errorConfigBuilder_ = null; } modelStatus_ = ""; + internalGetMutableMetrics().clear(); return this; } @@ -561,6 +712,10 @@ private void buildPartial0( if (((from_bitField0_ & 0x00000004) != 0)) { result.modelStatus_ = modelStatus_; } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.metrics_ = internalGetMetrics(); + result.metrics_.makeImmutable(); + } result.bitField0_ |= to_bitField0_; } @@ -647,6 +802,8 @@ public Builder mergeFrom( bitField0_ |= 0x00000004; onChanged(); } + internalGetMutableMetrics().mergeFrom(other.internalGetMetrics()); + bitField0_ |= 0x00000008; this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -697,6 +854,18 @@ public Builder mergeFrom( bitField0_ |= 0x00000004; break; } // case 26 + case 34: + { + com.google.protobuf.MapEntry metrics__ = + input.readMessage( + MetricsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableMetrics() + .getMutableMap() + .put(metrics__.getKey(), metrics__.getValue()); + bitField0_ |= 0x00000008; + break; + } // case 34 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1377,6 +1546,164 @@ public Builder setModelStatusBytes(com.google.protobuf.ByteString value) { return this; } + private com.google.protobuf.MapField metrics_; + + private com.google.protobuf.MapField internalGetMetrics() { + if (metrics_ == null) { + return com.google.protobuf.MapField.emptyMapField(MetricsDefaultEntryHolder.defaultEntry); + } + return metrics_; + } + + private com.google.protobuf.MapField + internalGetMutableMetrics() { + if (metrics_ == null) { + metrics_ = com.google.protobuf.MapField.newMapField(MetricsDefaultEntryHolder.defaultEntry); + } + if (!metrics_.isMutable()) { + metrics_ = metrics_.copy(); + } + bitField0_ |= 0x00000008; + onChanged(); + return metrics_; + } + + public int getMetricsCount() { + return internalGetMetrics().getMap().size(); + } + /** + * + * + *
+     * The metrics of the trained model.
+     * 
+ * + * map<string, double> metrics = 4; + */ + @java.lang.Override + public boolean containsMetrics(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetMetrics().getMap().containsKey(key); + } + /** Use {@link #getMetricsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getMetrics() { + return getMetricsMap(); + } + /** + * + * + *
+     * The metrics of the trained model.
+     * 
+ * + * map<string, double> metrics = 4; + */ + @java.lang.Override + public java.util.Map getMetricsMap() { + return internalGetMetrics().getMap(); + } + /** + * + * + *
+     * The metrics of the trained model.
+     * 
+ * + * map<string, double> metrics = 4; + */ + @java.lang.Override + public double getMetricsOrDefault(java.lang.String key, double defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetMetrics().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * The metrics of the trained model.
+     * 
+ * + * map<string, double> metrics = 4; + */ + @java.lang.Override + public double getMetricsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetMetrics().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearMetrics() { + bitField0_ = (bitField0_ & ~0x00000008); + internalGetMutableMetrics().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * The metrics of the trained model.
+     * 
+ * + * map<string, double> metrics = 4; + */ + public Builder removeMetrics(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableMetrics().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableMetrics() { + bitField0_ |= 0x00000008; + return internalGetMutableMetrics().getMutableMap(); + } + /** + * + * + *
+     * The metrics of the trained model.
+     * 
+ * + * map<string, double> metrics = 4; + */ + public Builder putMetrics(java.lang.String key, double value) { + if (key == null) { + throw new NullPointerException("map key"); + } + + internalGetMutableMetrics().getMutableMap().put(key, value); + bitField0_ |= 0x00000008; + return this; + } + /** + * + * + *
+     * The metrics of the trained model.
+     * 
+ * + * map<string, double> metrics = 4; + */ + public Builder putAllMetrics(java.util.Map values) { + internalGetMutableMetrics().getMutableMap().putAll(values); + bitField0_ |= 0x00000008; + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/TrainCustomModelResponseOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/TrainCustomModelResponseOrBuilder.java index fed0775c3325..2ed772b5793d 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/TrainCustomModelResponseOrBuilder.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/TrainCustomModelResponseOrBuilder.java @@ -144,4 +144,58 @@ public interface TrainCustomModelResponseOrBuilder * @return The bytes for modelStatus. */ com.google.protobuf.ByteString getModelStatusBytes(); + + /** + * + * + *
+   * The metrics of the trained model.
+   * 
+ * + * map<string, double> metrics = 4; + */ + int getMetricsCount(); + /** + * + * + *
+   * The metrics of the trained model.
+   * 
+ * + * map<string, double> metrics = 4; + */ + boolean containsMetrics(java.lang.String key); + /** Use {@link #getMetricsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getMetrics(); + /** + * + * + *
+   * The metrics of the trained model.
+   * 
+ * + * map<string, double> metrics = 4; + */ + java.util.Map getMetricsMap(); + /** + * + * + *
+   * The metrics of the trained model.
+   * 
+ * + * map<string, double> metrics = 4; + */ + double getMetricsOrDefault(java.lang.String key, double defaultValue); + /** + * + * + *
+   * The metrics of the trained model.
+   * 
+ * + * map<string, double> metrics = 4; + */ + double getMetricsOrThrow(java.lang.String key); } diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/chunk.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/chunk.proto index 0d3578d26452..a30c5dd274f2 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/chunk.proto +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/chunk.proto @@ -48,6 +48,34 @@ message Chunk { string title = 2; } + // Page span of the chunk. + message PageSpan { + // The start page of the chunk. + int32 page_start = 1; + + // The end page of the chunk. + int32 page_end = 2; + } + + // Metadata of the current chunk. This field is only populated on + // [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search] + // API. + message ChunkMetadata { + // The previous chunks of the current chunk. The number is controlled by + // [SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks]. + // This field is only populated on + // [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search] + // API. + repeated Chunk previous_chunks = 1; + + // The next chunks of the current chunk. The number is controlled by + // [SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks]. + // This field is only populated on + // [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search] + // API. + repeated Chunk next_chunks = 2; + } + // The full resource name of the chunk. // Format: // `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}/chunks/{chunk_id}`. @@ -56,7 +84,7 @@ message Chunk { // characters. string name = 1; - // Unique chunk id of the current chunk. + // Unique chunk ID of the current chunk. string id = 2; // Content is a string from a document (parsed content). @@ -69,4 +97,10 @@ message Chunk { // It contains derived data that are not in the original input document. google.protobuf.Struct derived_struct_data = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Page span of the chunk. + PageSpan page_span = 6; + + // Output only. Metadata of the current chunk. + ChunkMetadata chunk_metadata = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/common.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/common.proto index c096c9c48980..026a6bf6a92e 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/common.proto +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/common.proto @@ -39,6 +39,18 @@ option (google.api.resource_definition) = { type: "discoveryengine.googleapis.com/Location" pattern: "projects/{project}/locations/{location}" }; +option (google.api.resource_definition) = { + type: "discoveryengine.googleapis.com/GroundingConfig" + pattern: "projects/{project}/locations/{location}/groundingConfigs/{grounding_config}" +}; +option (google.api.resource_definition) = { + type: "discoveryengine.googleapis.com/RankingConfig" + pattern: "projects/{project}/locations/{location}/rankingConfigs/{ranking_config}" +}; +option (google.api.resource_definition) = { + type: "healthcare.googleapis.com/FhirStore" + pattern: "projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_store}" +}; // The industry vertical associated with the // [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]. @@ -52,6 +64,9 @@ enum IndustryVertical { // The media industry vertical. MEDIA = 2; + + // The healthcare FHIR vertical. + HEALTHCARE_FHIR = 7; } // The type of solution. @@ -67,6 +82,11 @@ enum SolutionType { // Used for use cases related to the Generative AI agent. SOLUTION_TYPE_CHAT = 3; + + // Used for use cases related to the Generative Chat agent. + // It's used for Generative chat engine only, the associated data stores + // must enrolled with `SOLUTION_TYPE_CHAT` solution. + SOLUTION_TYPE_GENERATIVE_CHAT = 4; } // Tiers of search features. Different tiers might have different diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/document.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/document.proto index 88fd88868243..cead31c531a5 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/document.proto +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/document.proto @@ -202,3 +202,22 @@ message Document { google.protobuf.Timestamp index_time = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; } + +// Document captures all raw metadata information of items to be recommended or +// searched. +message ProcessedDocument { + // Output format of the processed document. + oneof processed_data_format { + // The JSON string representation of the processed document. + string json_data = 2; + } + + // Required. Full resource name of the referenced document, in the format + // `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`. + string document = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/Document" + } + ]; +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/document_service.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/document_service.proto index c4d18d23ffd4..6e954a9f6cd2 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/document_service.proto +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/document_service.proto @@ -158,6 +158,19 @@ service DocumentService { metadata_type: "google.cloud.discoveryengine.v1alpha.PurgeDocumentsMetadata" }; } + + // Gets the parsed layout information for a + // [Document][google.cloud.discoveryengine.v1alpha.Document]. + rpc GetProcessedDocument(GetProcessedDocumentRequest) + returns (ProcessedDocument) { + option (google.api.http) = { + get: "/v1alpha/{name=projects/*/locations/*/dataStores/*/branches/*/documents/*}:getProcessedDocument" + additional_bindings { + get: "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*}:getProcessedDocument" + } + }; + option (google.api.method_signature) = "name"; + } } // Request message for @@ -322,3 +335,54 @@ message DeleteDocumentRequest { } ]; } + +// Request message for +// [DocumentService.GetDocument][google.cloud.discoveryengine.v1alpha.DocumentService.GetDocument] +// method. +message GetProcessedDocumentRequest { + // The type of processing to return in the response. + enum ProcessedDocumentType { + // Default value. + PROCESSED_DOCUMENT_TYPE_UNSPECIFIED = 0; + + // Available for all data store parsing configs. + PARSED_DOCUMENT = 1; + + // Only available if ChunkingConfig is enabeld on the data store. + CHUNKED_DOCUMENT = 2; + } + + // The format of the returned processed document. If unspecified, defaults to + // JSON. + enum ProcessedDocumentFormat { + // Default value. + PROCESSED_DOCUMENT_FORMAT_UNSPECIFIED = 0; + + // output format will be a JSON string representation of processed document. + JSON = 1; + } + + // Required. Full resource name of + // [Document][google.cloud.discoveryengine.v1alpha.Document], such as + // `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. + // + // If the caller does not have permission to access the + // [Document][google.cloud.discoveryengine.v1alpha.Document], regardless of + // whether or not it exists, a `PERMISSION_DENIED` error is returned. + // + // If the requested [Document][google.cloud.discoveryengine.v1alpha.Document] + // does not exist, a `NOT_FOUND` error is returned. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/Document" + } + ]; + + // Required. What type of processing to return. + ProcessedDocumentType processed_document_type = 2 + [(google.api.field_behavior) = REQUIRED]; + + // What format output should be. If unspecified, defaults to JSON. + ProcessedDocumentFormat processed_document_format = 3; +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/import_config.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/import_config.proto index f6c45aecf186..062406a9b5f9 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/import_config.proto +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/import_config.proto @@ -21,6 +21,7 @@ import "google/api/resource.proto"; import "google/cloud/discoveryengine/v1alpha/completion.proto"; import "google/cloud/discoveryengine/v1alpha/document.proto"; import "google/cloud/discoveryengine/v1alpha/user_event.proto"; +import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; import "google/rpc/status.proto"; import "google/type/date.proto"; @@ -123,6 +124,233 @@ message BigQuerySource { string data_schema = 6; } +// The Spanner source for importing data +message SpannerSource { + // The project ID that the Spanner source is in with a length limit of 128 + // characters. If not specified, inherits the project ID from the parent + // request. + string project_id = 1; + + // Required. The instance ID of the source Spanner table. + string instance_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The database ID of the source Spanner table. + string database_id = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. The table name of the Spanner database that needs to be imported. + string table_id = 4 [(google.api.field_behavior) = REQUIRED]; + + // Whether to apply data boost on Spanner export. Enabling this option will + // incur additional cost. More info can be found + // [here](https://cloud.google.com/spanner/docs/databoost/databoost-overview#billing_and_quotas). + bool enable_data_boost = 5; +} + +// The Bigtable Options object that contains information to support +// the import. +message BigtableOptions { + // The column family of the Bigtable. + message BigtableColumnFamily { + // The field name to use for this column family in the document. The + // name has to match the pattern `[a-zA-Z0-9][a-zA-Z0-9-_]*`. If not set, + // it is parsed from the family name with best effort. However, due to + // different naming patterns, field name collisions could happen, where + // parsing behavior is undefined. + string field_name = 1; + + // The encoding mode of the values when the type is not STRING. + // Acceptable encoding values are: + // + // * `TEXT`: indicates values are alphanumeric text strings. + // * `BINARY`: indicates values are encoded using `HBase Bytes.toBytes` + // family of functions. This can be overridden for a specific column + // by listing that column in `columns` and specifying an encoding for it. + Encoding encoding = 2; + + // The type of values in this column family. + // The values are expected to be encoded using `HBase Bytes.toBytes` + // function when the encoding value is set to `BINARY`. + Type type = 3; + + // The list of objects that contains column level information for each + // column. If a column is not present in this list it will be ignored. + repeated BigtableColumn columns = 4; + } + + // The column of the Bigtable. + message BigtableColumn { + // Required. Qualifier of the column. If it cannot be decoded with utf-8, + // use a base-64 encoded string instead. + bytes qualifier = 1 [(google.api.field_behavior) = REQUIRED]; + + // The field name to use for this column in the document. The name has to + // match the pattern `[a-zA-Z0-9][a-zA-Z0-9-_]*`. + // If not set, it is parsed from the qualifier bytes with best effort. + // However, due to different naming patterns, field name collisions could + // happen, where parsing behavior is undefined. + string field_name = 2; + + // The encoding mode of the values when the type is not `STRING`. + // Acceptable encoding values are: + // + // * `TEXT`: indicates values are alphanumeric text strings. + // * `BINARY`: indicates values are encoded using `HBase Bytes.toBytes` + // family of functions. This can be overridden for a specific column + // by listing that column in `columns` and specifying an encoding for it. + Encoding encoding = 3; + + // The type of values in this column family. + // The values are expected to be encoded using `HBase Bytes.toBytes` + // function when the encoding value is set to `BINARY`. + Type type = 4; + } + + // The type of values in a Bigtable column or column family. + // The values are expected to be encoded using + // [HBase + // Bytes.toBytes](https://hbase.apache.org/apidocs/org/apache/hadoop/hbase/util/Bytes.html) + // function when the encoding value is set to `BINARY`. + enum Type { + // The type is unspecified. + TYPE_UNSPECIFIED = 0; + + // String type. + STRING = 1; + + // Numerical type. + NUMBER = 2; + + // Integer type. + INTEGER = 3; + + // Variable length integer type. + VAR_INTEGER = 4; + + // BigDecimal type. + BIG_NUMERIC = 5; + + // Boolean type. + BOOLEAN = 6; + + // JSON type. + JSON = 7; + } + + // The encoding mode of a Bigtable column or column family. + enum Encoding { + // The encoding is unspecified. + ENCODING_UNSPECIFIED = 0; + + // Text encoding. + TEXT = 1; + + // Binary encoding. + BINARY = 2; + } + + // The field name used for saving row key value in the document. The name has + // to match the pattern `[a-zA-Z0-9][a-zA-Z0-9-_]*`. + string key_field_name = 1; + + // The mapping from family names to an object that contains column families + // level information for the given column family. If a family is not present + // in this map it will be ignored. + map families = 2; +} + +// The Cloud Bigtable source for importing data. +message BigtableSource { + // The project ID that the Bigtable source is in with a length limit of 128 + // characters. If not specified, inherits the project ID from the parent + // request. + string project_id = 1; + + // Required. The instance ID of the Cloud Bigtable that needs to be imported. + string instance_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The table ID of the Cloud Bigtable that needs to be imported. + string table_id = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. Bigtable options that contains information needed when parsing + // data into typed structures. For example, column type annotations. + BigtableOptions bigtable_options = 4 [(google.api.field_behavior) = REQUIRED]; +} + +// Cloud FhirStore source import data from. +message FhirStoreSource { + // Required. The full resource name of the FHIR store to import data from, in + // the format of + // `projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_store}`. + string fhir_store = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "healthcare.googleapis.com/FhirStore" + } + ]; + + // Intermediate Cloud Storage directory used for the import with a length + // limit of 2,000 characters. Can be specified if one wants to have the + // FhirStore export to a specific Cloud Storage directory. + string gcs_staging_dir = 2; +} + +// Cloud SQL source import data from. +message CloudSqlSource { + // The project ID that the Cloud SQL source is in with a length limit of 128 + // characters. If not specified, inherits the project ID from the parent + // request. + string project_id = 1; + + // Required. The Cloud SQL instance to copy the data from with a length limit + // of 256 characters. + string instance_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The Cloud SQL database to copy the data from with a length limit + // of 256 characters. + string database_id = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. The Cloud SQL table to copy the data from with a length limit of + // 256 characters. + string table_id = 4 [(google.api.field_behavior) = REQUIRED]; + + // Intermediate Cloud Storage directory used for the import with a length + // limit of 2,000 characters. Can be specified if one wants to have the + // Cloud SQL export to a specific Cloud Storage directory. + // + // Please ensure that the Cloud SQL service account has the necessary Cloud + // Storage Admin permissions to access the specified Cloud Storage directory. + string gcs_staging_dir = 5; + + // Option for serverless export. Enabling this option will incur + // additional cost. More info can be found + // [here](https://cloud.google.com/sql/pricing#serverless). + bool offload = 6; +} + +// Firestore source import data from. +message FirestoreSource { + // The project ID that the Cloud SQL source is in with a length limit of 128 + // characters. If not specified, inherits the project ID from the parent + // request. + string project_id = 1; + + // Required. The Firestore database to copy the data from with a length limit + // of 256 characters. + string database_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The Firestore collection to copy the data from with a length + // limit of 1,500 characters. + string collection_id = 3 [(google.api.field_behavior) = REQUIRED]; + + // Intermediate Cloud Storage directory used for the import with a length + // limit of 2,000 characters. Can be specified if one wants to have the + // Firestore export to a specific Cloud Storage directory. + // + // Please ensure that the Firestore service account has the necessary Cloud + // Storage Admin permissions to access the specified Cloud Storage directory. + string gcs_staging_dir = 4; +} + // Configuration of destination for Import related errors. message ImportErrorConfig { // Required. Errors destination. @@ -220,6 +448,9 @@ message ImportDocumentsMetadata { // Count of entries that encountered errors while processing. int64 failure_count = 4; + + // Total count of entries that were processed. + int64 total_count = 5; } // Request message for Import methods. @@ -256,6 +487,21 @@ message ImportDocumentsRequest { // BigQuery input source. BigQuerySource bigquery_source = 4; + + // FhirStore input source. + FhirStoreSource fhir_store_source = 10; + + // Spanner input source. + SpannerSource spanner_source = 11; + + // Cloud SQL input source. + CloudSqlSource cloud_sql_source = 12; + + // Firestore input source. + FirestoreSource firestore_source = 13; + + // Cloud Bigtable input source. + BigtableSource bigtable_source = 15; } // Required. The parent branch resource name, such as @@ -276,6 +522,10 @@ message ImportDocumentsRequest { // [ReconciliationMode.INCREMENTAL][google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.ReconciliationMode.INCREMENTAL]. ReconciliationMode reconciliation_mode = 6; + // Indicates which fields in the provided imported documents to update. If + // not set, the default is to update all fields. + google.protobuf.FieldMask update_mask = 7; + // Whether to automatically generate IDs for the documents if absent. // // If set to `true`, @@ -289,45 +539,54 @@ message ImportDocumentsRequest { // [id_field][google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.id_field], // otherwise, documents without IDs fail to be imported. // - // Only set this field when using - // [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource] or - // [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource], and - // when + // Supported data sources: + // + // * [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource]. // [GcsSource.data_schema][google.cloud.discoveryengine.v1alpha.GcsSource.data_schema] - // or + // must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. + // * [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource]. // [BigQuerySource.data_schema][google.cloud.discoveryengine.v1alpha.BigQuerySource.data_schema] - // is `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. + // must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. + // * [SpannerSource][google.cloud.discoveryengine.v1alpha.SpannerSource]. + // * [CloudSqlSource][google.cloud.discoveryengine.v1alpha.CloudSqlSource]. + // * [FirestoreSource][google.cloud.discoveryengine.v1alpha.FirestoreSource]. + // * [BigtableSource][google.cloud.discoveryengine.v1alpha.BigtableSource]. bool auto_generate_ids = 8; - // The field in the Cloud Storage and BigQuery sources that indicates the - // unique IDs of the documents. + // The field indicates the ID field or column to be used as unique IDs of + // the documents. // // For [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource] it is the // key of the JSON field. For instance, `my_id` for JSON `{"my_id": - // "some_uuid"}`. For - // [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource] it is - // the column name of the BigQuery table where the unique ids are stored. + // "some_uuid"}`. For others, it may be the column name of the table where the + // unique ids are stored. // - // The values of the JSON field or the BigQuery column are used as the + // The values of the JSON field or the table column are used as the // [Document.id][google.cloud.discoveryengine.v1alpha.Document.id]s. The JSON - // field or the BigQuery column must be of string type, and the values must be + // field or the table column must be of string type, and the values must be // set as valid strings conform to // [RFC-1034](https://tools.ietf.org/html/rfc1034) with 1-63 characters. // Otherwise, documents without valid IDs fail to be imported. // - // Only set this field when using - // [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource] or - // [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource], and - // when - // [GcsSource.data_schema][google.cloud.discoveryengine.v1alpha.GcsSource.data_schema] - // or - // [BigQuerySource.data_schema][google.cloud.discoveryengine.v1alpha.BigQuerySource.data_schema] - // is `custom`. And only set this field when + // Only set this field when // [auto_generate_ids][google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.auto_generate_ids] // is unset or set as `false`. Otherwise, an INVALID_ARGUMENT error is thrown. // // If it is unset, a default value `_id` is used when importing from the // allowed data sources. + // + // Supported data sources: + // + // * [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource]. + // [GcsSource.data_schema][google.cloud.discoveryengine.v1alpha.GcsSource.data_schema] + // must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. + // * [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource]. + // [BigQuerySource.data_schema][google.cloud.discoveryengine.v1alpha.BigQuerySource.data_schema] + // must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. + // * [SpannerSource][google.cloud.discoveryengine.v1alpha.SpannerSource]. + // * [CloudSqlSource][google.cloud.discoveryengine.v1alpha.CloudSqlSource]. + // * [FirestoreSource][google.cloud.discoveryengine.v1alpha.FirestoreSource]. + // * [BigtableSource][google.cloud.discoveryengine.v1alpha.BigtableSource]. string id_field = 9; } @@ -405,3 +664,35 @@ message ImportSuggestionDenyListEntriesMetadata { // finish time. google.protobuf.Timestamp update_time = 2; } + +// Response of the +// [CompletionService.ImportCompletionSuggestions][google.cloud.discoveryengine.v1alpha.CompletionService.ImportCompletionSuggestions] +// method. If the long running operation is done, this message is returned by +// the google.longrunning.Operations.response field if the operation is +// successful. +message ImportCompletionSuggestionsResponse { + // A sample of errors encountered while processing the request. + repeated google.rpc.Status error_samples = 1; + + // Count of + // [CompletionSuggestion][google.cloud.discoveryengine.v1alpha.CompletionSuggestion]s + // successfully imported. + int64 success_count = 2; + + // Count of + // [CompletionSuggestion][google.cloud.discoveryengine.v1alpha.CompletionSuggestion]s + // that failed to be imported. + int64 failure_count = 3; +} + +// Metadata related to the progress of the ImportCompletionSuggestions +// operation. This will be returned by the google.longrunning.Operation.metadata +// field. +message ImportCompletionSuggestionsMetadata { + // Operation create time. + google.protobuf.Timestamp create_time = 1; + + // Operation last update time. If the operation is done, this is also the + // finish time. + google.protobuf.Timestamp update_time = 2; +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/rank_service.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/rank_service.proto new file mode 100644 index 000000000000..b10073f2f38b --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/rank_service.proto @@ -0,0 +1,115 @@ +// Copyright 2022 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.discoveryengine.v1alpha; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Alpha"; +option go_package = "cloud.google.com/go/discoveryengine/apiv1alpha/discoveryenginepb;discoveryenginepb"; +option java_multiple_files = true; +option java_outer_classname = "RankServiceProto"; +option java_package = "com.google.cloud.discoveryengine.v1alpha"; +option objc_class_prefix = "DISCOVERYENGINE"; +option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1alpha"; +option ruby_package = "Google::Cloud::DiscoveryEngine::V1alpha"; + +// Service for ranking text records. +service RankService { + option (google.api.default_host) = "discoveryengine.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Ranks a list of text records based on the given input query. + rpc Rank(RankRequest) returns (RankResponse) { + option (google.api.http) = { + post: "/v1alpha/{ranking_config=projects/*/locations/*/rankingConfigs/*}:rank" + body: "*" + }; + } +} + +// Record message for +// [RankService.Rank][google.cloud.discoveryengine.v1alpha.RankService.Rank] +// method. +message RankingRecord { + // The unique ID to represent the record. + string id = 1; + + // The title of the record. Empty by default. + // At least one of + // [title][google.cloud.discoveryengine.v1alpha.RankingRecord.title] or + // [content][google.cloud.discoveryengine.v1alpha.RankingRecord.content] + // should be set otherwise an INVALID_ARGUMENT error is thrown. + string title = 2; + + // The content of the record. Empty by default. + // At least one of + // [title][google.cloud.discoveryengine.v1alpha.RankingRecord.title] or + // [content][google.cloud.discoveryengine.v1alpha.RankingRecord.content] + // should be set otherwise an INVALID_ARGUMENT error is thrown. + string content = 3; + + // The score of this record based on the given query and selected model. + float score = 4; +} + +// Request message for +// [RankService.Rank][google.cloud.discoveryengine.v1alpha.RankService.Rank] +// method. +message RankRequest { + // Required. The resource name of the rank service config, such as + // `projects/{project_num}/locations/{location_id}/rankingConfigs/default_ranking_config`. + string ranking_config = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/RankingConfig" + } + ]; + + // The identifier of the model to use. It is one of: + // + // * `semantic-ranker-512@latest`: Semantic ranking model with maxiumn input + // token size 512. + // + // It is set to `semantic-ranker-512@latest` by default if unspecified. + string model = 2; + + // The number of results to return. If this is unset or no bigger than zero, + // returns all results. + int32 top_n = 3; + + // The query to use. + string query = 4; + + // Required. A list of records to rank. At most 200 records to rank. + repeated RankingRecord records = 5 [(google.api.field_behavior) = REQUIRED]; + + // If true, the response will contain only record ID and score. By default, it + // is false, the response will contain record details. + bool ignore_record_details_in_response = 6; +} + +// Response message for +// [RankService.Rank][google.cloud.discoveryengine.v1alpha.RankService.Rank] +// method. +message RankResponse { + // A list of records sorted by descending score. + repeated RankingRecord records = 5; +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/search_service.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/search_service.proto index 920a6ed82fdf..047a21975058 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/search_service.proto +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/search_service.proto @@ -218,6 +218,80 @@ message SearchRequest { message BoostSpec { // Boost applies to documents which match a condition. message ConditionBoostSpec { + // Specification for custom ranking based on customer specified attribute + // value. It provides more controls for customized ranking than the simple + // (condition, boost) combination above. + message BoostControlSpec { + // The control points used to define the curve. The curve defined + // through these control points can only be monotonically increasing + // or decreasing(constant values are acceptable). + message ControlPoint { + // Can be one of: + // 1. The numerical field value. + // 2. The duration spec for freshness: + // The value must be formatted as an XSD `dayTimeDuration` value (a + // restricted subset of an ISO 8601 duration value). The pattern for + // this is: `[nD][T[nH][nM][nS]]`. + string attribute_value = 1; + + // The value between -1 to 1 by which to boost the score if the + // attribute_value evaluates to the value specified above. + float boost_amount = 2; + } + + // The attribute(or function) for which the custom ranking is to be + // applied. + enum AttributeType { + // Unspecified AttributeType. + ATTRIBUTE_TYPE_UNSPECIFIED = 0; + + // The value of the numerical field will be used to dynamically update + // the boost amount. In this case, the attribute_value (the x value) + // of the control point will be the actual value of the numerical + // field for which the boost_amount is specified. + NUMERICAL = 1; + + // For the freshness use case the attribute value will be the duration + // between the current time and the date in the datetime field + // specified. The value must be formatted as an XSD `dayTimeDuration` + // value (a restricted subset of an ISO 8601 duration value). The + // pattern for this is: `[nD][T[nH][nM][nS]]`. + // E.g. `5D`, `3DT12H30M`, `T24H`. + FRESHNESS = 2; + } + + // The interpolation type to be applied. Default will be linear + // (Piecewise Linear). + enum InterpolationType { + // Interpolation type is unspecified. In this case, it defaults to + // Linear. + INTERPOLATION_TYPE_UNSPECIFIED = 0; + + // Piecewise linear interpolation will be applied. + LINEAR = 1; + } + + // The name of the field whose value will be used to determine the + // boost amount. + string field_name = 1; + + // The attribute type to be used to determine the boost amount. The + // attribute value can be derived from the field value of the specified + // field_name. In the case of numerical it is straightforward i.e. + // attribute_value = numerical_field_value. In the case of freshness + // however, attribute_value = (time.now() - datetime_field_value). + AttributeType attribute_type = 2; + + // The interpolation type to be applied to connect the control points + // listed below. + InterpolationType interpolation_type = 3; + + // The control points used to define the curve. The monotonic function + // (defined through the interpolation_type above) passes through the + // control points listed here. + repeated ControlPoint control_points = 4; + } + // An expression which specifies a boost condition. The syntax and // supported fields are the same as a filter expression. See // [SearchRequest.filter][google.cloud.discoveryengine.v1alpha.SearchRequest.filter] @@ -233,21 +307,27 @@ message SearchRequest { // Strength of the condition boost, which should be in [-1, 1]. Negative // boost means demotion. Default is 0.0. // - // Setting to 1.0 gives the document a big promotion. However, it does not - // necessarily mean that the boosted document will be the top result at - // all times, nor that other documents will be excluded. Results could - // still be shown even when none of them matches the condition. And - // results that are significantly more relevant to the search query can - // still trump your heavily favored but irrelevant documents. + // Setting to 1.0 gives the document a big promotion. However, it does + // not necessarily mean that the boosted document will be the top result + // at all times, nor that other documents will be excluded. Results + // could still be shown even when none of them matches the condition. + // And results that are significantly more relevant to the search query + // can still trump your heavily favored but irrelevant documents. // // Setting to -1.0 gives the document a big demotion. However, results // that are deeply relevant might still be shown. The document will have - // an upstream battle to get a fairly high ranking, but it is not blocked - // out completely. + // an upstream battle to get a fairly high ranking, but it is not + // blocked out completely. // // Setting to 0.0 means no boost applied. The boosting condition is - // ignored. + // ignored. Only one of the (condition, boost) combination or the + // boost_control_spec below are set. If both are set then the global boost + // is ignored and the more fine-grained boost_control_spec is applied. float boost = 2; + + // Complex specification for custom ranking based on customer defined + // attribute value. + BoostControlSpec boost_control_spec = 3; } // Condition boost specifications. If a document matches multiple conditions @@ -348,11 +428,13 @@ message SearchRequest { // Supported values are: // // * `stable`: string. Default value when no value is specified. Uses a - // generally available, fine-tuned version of the text-bison@001 - // model. - // * `preview`: string. (Public preview) Uses a fine-tuned version of - // the text-bison@002 model. This model works only for summaries in - // English. + // generally available, fine-tuned model. For more information, see + // [Answer generation model versions and + // lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). + // * `preview`: string. (Public preview) Uses a preview model. For more + // information, see + // [Answer generation model versions and + // lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). string version = 1; } @@ -419,6 +501,14 @@ message SearchRequest { // If specified, the spec will be used to modify the model specification // provided to the LLM. ModelSpec model_spec = 7; + + // If true, answer will be generated from most relevant chunks from top + // search results. This feature will improve summary quality. + // Please note that with this feature enabled, not all top search results + // will be referenced and included in the reference list, so the citation + // source index only points to the search results listed in the reference + // list. + bool use_semantic_chunks = 8; } // A specification for configuring the extractive content in a search @@ -459,10 +549,9 @@ message SearchRequest { int32 max_extractive_segment_count = 2; // Specifies whether to return the confidence score from the extractive - // segments in each search result. The default value is `false`. - // - // Note: this is a priavte preview feature and only works for allowlisted - // users, please reach out to Cloud Support team if you want to use it. + // segments in each search result. This feature is available only for new + // or allowlisted data stores. To allowlist your data store, please + // contact your Customer Engineer. The default value is `false`. bool return_extractive_segment_score = 3; // Specifies whether to also include the adjacent from each selected @@ -476,6 +565,23 @@ message SearchRequest { int32 num_next_segments = 5; } + // Specifies the chunk spec to be returned from the search response. + // Only available if the + // [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.search_result_mode] + // is set to + // [CHUNKS][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS] + message ChunkSpec { + // The number of previous chunks to be returned of the current chunk. The + // maximum allowed value is 3. + // If not specified, no previous chunks will be returned. + int32 num_previous_chunks = 1; + + // The number of next chunks to be returned of the current chunk. The + // maximum allowed value is 3. + // If not specified, no next chunks will be returned. + int32 num_next_chunks = 2; + } + // Specifies the search result mode. If unspecified, the // search result mode is based on // [DataStore.DocumentProcessingConfig.chunking_config][]: @@ -513,6 +619,13 @@ message SearchRequest { // it defaults to `CHUNKS`. // * Otherwise, it defaults to `DOCUMENTS`. SearchResultMode search_result_mode = 4; + + // Specifies the chunk spec to be returned from the search response. + // Only available if the + // [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.search_result_mode] + // is set to + // [CHUNKS][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS] + ChunkSpec chunk_spec = 5; } // The specification that uses customized query embedding vector to do @@ -560,11 +673,15 @@ message SearchRequest { ImageQuery image_query = 19; // Maximum number of - // [Document][google.cloud.discoveryengine.v1alpha.Document]s to return. If - // unspecified, defaults to a reasonable value. The maximum allowed value is - // 100. Values above 100 are coerced to 100. + // [Document][google.cloud.discoveryengine.v1alpha.Document]s to return. The + // maximum allowed value depends on the data type. Values above the maximum + // value are coerced to the maximum value. // - // If this field is negative, an `INVALID_ARGUMENT` is returned. + // * Websites with basic indexing: Default `10`, Maximum `25`. + // * Websites with advanced indexing: Default `25`, Maximum `50`. + // * Other: Default `50`, Maximum `100`. + // + // If this field is negative, an `INVALID_ARGUMENT` is returned. int32 page_size = 4; // A page token received from a previous @@ -701,7 +818,8 @@ message SearchRequest { // // If // [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path] - // is not provided, it will use [ServingConfig.EmbeddingConfig.field_path][]. + // is not provided, it will use + // [ServingConfig.EmbeddingConfig.field_path][google.cloud.discoveryengine.v1alpha.ServingConfig.embedding_config]. EmbeddingSpec embedding_spec = 23; // The ranking expression controls the customized ranking on retrieval @@ -867,6 +985,15 @@ message SearchResponse { // Document reference. message Reference { + // Chunk content. + message ChunkContent { + // Chunk textual content. + string content = 1; + + // Page identifier. + string page_identifier = 2; + } + // Title of the document. string title = 1; @@ -884,6 +1011,9 @@ message SearchResponse { // Cloud Storage or HTTP uri for the document. string uri = 3; + + // List of cited chunk contents derived from document content. + repeated ChunkContent chunk_contents = 4; } // Summary with metadata information. diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/search_tuning_service.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/search_tuning_service.proto index 334edae3e387..92d0479a9b90 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/search_tuning_service.proto +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/search_tuning_service.proto @@ -65,8 +65,8 @@ message TrainCustomModelRequest { // A newline delimited jsonl/ndjson file. // // For search-tuning model, each line should have the _id, title - // and text. Example: {"_id": "doc1", title: "relevant doc", "text": - // "relevant text"} + // and text. Example: + // `{"_id": "doc1", title: "relevant doc", "text": "relevant text"}` string corpus_data_path = 1; // The gcs query data which could be associated in train data. @@ -137,6 +137,9 @@ message TrainCustomModelResponse { // * **in-progress**: Model training is in progress. // * **ready**: The model is ready for serving. string model_status = 3; + + // The metrics of the trained model. + map metrics = 4; } // Metadata related to the progress of the TrainCustomModel operation. This is diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/serving_config_service.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/serving_config_service.proto index 22fd94fd5311..0cba972b1e67 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/serving_config_service.proto +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/serving_config_service.proto @@ -32,7 +32,8 @@ option objc_class_prefix = "DISCOVERYENGINE"; option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1alpha"; option ruby_package = "Google::Cloud::DiscoveryEngine::V1alpha"; -// Service for operations related to [ServingConfig][]. +// Service for operations related to +// [ServingConfig][google.cloud.discoveryengine.v1alpha.ServingConfig]. service ServingConfigService { option (google.api.default_host) = "discoveryengine.googleapis.com"; option (google.api.oauth_scopes) = diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/getprocesseddocument/AsyncGetProcessedDocument.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/getprocesseddocument/AsyncGetProcessedDocument.java new file mode 100644 index 000000000000..ba2c11e5cc3e --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/getprocesseddocument/AsyncGetProcessedDocument.java @@ -0,0 +1,53 @@ +/* + * Copyright 2024 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.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_DocumentService_GetProcessedDocument_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.discoveryengine.v1alpha.DocumentName; +import com.google.cloud.discoveryengine.v1alpha.DocumentServiceClient; +import com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest; +import com.google.cloud.discoveryengine.v1alpha.ProcessedDocument; + +public class AsyncGetProcessedDocument { + + public static void main(String[] args) throws Exception { + asyncGetProcessedDocument(); + } + + public static void asyncGetProcessedDocument() throws Exception { + // 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 (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) { + GetProcessedDocumentRequest request = + GetProcessedDocumentRequest.newBuilder() + .setName( + DocumentName.ofProjectLocationDataStoreBranchDocumentName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]", "[DOCUMENT]") + .toString()) + .build(); + ApiFuture future = + documentServiceClient.getProcessedDocumentCallable().futureCall(request); + // Do something. + ProcessedDocument response = future.get(); + } + } +} +// [END discoveryengine_v1alpha_generated_DocumentService_GetProcessedDocument_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/getprocesseddocument/SyncGetProcessedDocument.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/getprocesseddocument/SyncGetProcessedDocument.java new file mode 100644 index 000000000000..2728de4a10df --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/getprocesseddocument/SyncGetProcessedDocument.java @@ -0,0 +1,49 @@ +/* + * Copyright 2024 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.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_DocumentService_GetProcessedDocument_sync] +import com.google.cloud.discoveryengine.v1alpha.DocumentName; +import com.google.cloud.discoveryengine.v1alpha.DocumentServiceClient; +import com.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest; +import com.google.cloud.discoveryengine.v1alpha.ProcessedDocument; + +public class SyncGetProcessedDocument { + + public static void main(String[] args) throws Exception { + syncGetProcessedDocument(); + } + + public static void syncGetProcessedDocument() throws Exception { + // 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 (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) { + GetProcessedDocumentRequest request = + GetProcessedDocumentRequest.newBuilder() + .setName( + DocumentName.ofProjectLocationDataStoreBranchDocumentName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]", "[DOCUMENT]") + .toString()) + .build(); + ProcessedDocument response = documentServiceClient.getProcessedDocument(request); + } + } +} +// [END discoveryengine_v1alpha_generated_DocumentService_GetProcessedDocument_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/getprocesseddocument/SyncGetProcessedDocumentDocumentname.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/getprocesseddocument/SyncGetProcessedDocumentDocumentname.java new file mode 100644 index 000000000000..689482d1ce5a --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/getprocesseddocument/SyncGetProcessedDocumentDocumentname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2024 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.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_DocumentService_GetProcessedDocument_Documentname_sync] +import com.google.cloud.discoveryengine.v1alpha.DocumentName; +import com.google.cloud.discoveryengine.v1alpha.DocumentServiceClient; +import com.google.cloud.discoveryengine.v1alpha.ProcessedDocument; + +public class SyncGetProcessedDocumentDocumentname { + + public static void main(String[] args) throws Exception { + syncGetProcessedDocumentDocumentname(); + } + + public static void syncGetProcessedDocumentDocumentname() throws Exception { + // 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 (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) { + DocumentName name = + DocumentName.ofProjectLocationDataStoreBranchDocumentName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]", "[DOCUMENT]"); + ProcessedDocument response = documentServiceClient.getProcessedDocument(name); + } + } +} +// [END discoveryengine_v1alpha_generated_DocumentService_GetProcessedDocument_Documentname_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/getprocesseddocument/SyncGetProcessedDocumentString.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/getprocesseddocument/SyncGetProcessedDocumentString.java new file mode 100644 index 000000000000..7953ac191205 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/getprocesseddocument/SyncGetProcessedDocumentString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2024 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.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_DocumentService_GetProcessedDocument_String_sync] +import com.google.cloud.discoveryengine.v1alpha.DocumentName; +import com.google.cloud.discoveryengine.v1alpha.DocumentServiceClient; +import com.google.cloud.discoveryengine.v1alpha.ProcessedDocument; + +public class SyncGetProcessedDocumentString { + + public static void main(String[] args) throws Exception { + syncGetProcessedDocumentString(); + } + + public static void syncGetProcessedDocumentString() throws Exception { + // 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 (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) { + String name = + DocumentName.ofProjectLocationDataStoreBranchDocumentName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]", "[DOCUMENT]") + .toString(); + ProcessedDocument response = documentServiceClient.getProcessedDocument(name); + } + } +} +// [END discoveryengine_v1alpha_generated_DocumentService_GetProcessedDocument_String_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/importdocuments/AsyncImportDocuments.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/importdocuments/AsyncImportDocuments.java index 478d129d1578..53a8df14048a 100644 --- a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/importdocuments/AsyncImportDocuments.java +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/importdocuments/AsyncImportDocuments.java @@ -23,6 +23,7 @@ import com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest; import com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig; import com.google.longrunning.Operation; +import com.google.protobuf.FieldMask; public class AsyncImportDocuments { @@ -44,6 +45,7 @@ public static void asyncImportDocuments() throws Exception { "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]") .toString()) .setErrorConfig(ImportErrorConfig.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) .setAutoGenerateIds(true) .setIdField("idField1629396127") .build(); diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/importdocuments/AsyncImportDocumentsLRO.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/importdocuments/AsyncImportDocumentsLRO.java index 5a88a5589043..6cfbebce5f29 100644 --- a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/importdocuments/AsyncImportDocumentsLRO.java +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/importdocuments/AsyncImportDocumentsLRO.java @@ -24,6 +24,7 @@ import com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest; import com.google.cloud.discoveryengine.v1alpha.ImportDocumentsResponse; import com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig; +import com.google.protobuf.FieldMask; public class AsyncImportDocumentsLRO { @@ -45,6 +46,7 @@ public static void asyncImportDocumentsLRO() throws Exception { "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]") .toString()) .setErrorConfig(ImportErrorConfig.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) .setAutoGenerateIds(true) .setIdField("idField1629396127") .build(); diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/importdocuments/SyncImportDocuments.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/importdocuments/SyncImportDocuments.java index 801043f8973b..cf5c243bde22 100644 --- a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/importdocuments/SyncImportDocuments.java +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/importdocuments/SyncImportDocuments.java @@ -22,6 +22,7 @@ import com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest; import com.google.cloud.discoveryengine.v1alpha.ImportDocumentsResponse; import com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig; +import com.google.protobuf.FieldMask; public class SyncImportDocuments { @@ -43,6 +44,7 @@ public static void syncImportDocuments() throws Exception { "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]") .toString()) .setErrorConfig(ImportErrorConfig.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) .setAutoGenerateIds(true) .setIdField("idField1629396127") .build(); diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/rankservice/create/SyncCreateSetCredentialsProvider.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/rankservice/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..f4a55268902f --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/rankservice/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,44 @@ +/* + * Copyright 2024 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.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_RankService_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.discoveryengine.v1alpha.RankServiceClient; +import com.google.cloud.discoveryengine.v1alpha.RankServiceSettings; +import com.google.cloud.discoveryengine.v1alpha.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // 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 + RankServiceSettings rankServiceSettings = + RankServiceSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + RankServiceClient rankServiceClient = RankServiceClient.create(rankServiceSettings); + } +} +// [END discoveryengine_v1alpha_generated_RankService_Create_SetCredentialsProvider_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/rankservice/create/SyncCreateSetCredentialsProvider1.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/rankservice/create/SyncCreateSetCredentialsProvider1.java new file mode 100644 index 000000000000..455752ce93be --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/rankservice/create/SyncCreateSetCredentialsProvider1.java @@ -0,0 +1,39 @@ +/* + * Copyright 2024 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.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_RankService_Create_SetCredentialsProvider1_sync] +import com.google.cloud.discoveryengine.v1alpha.RankServiceClient; +import com.google.cloud.discoveryengine.v1alpha.RankServiceSettings; + +public class SyncCreateSetCredentialsProvider1 { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider1(); + } + + public static void syncCreateSetCredentialsProvider1() throws Exception { + // 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 + RankServiceSettings rankServiceSettings = RankServiceSettings.newHttpJsonBuilder().build(); + RankServiceClient rankServiceClient = RankServiceClient.create(rankServiceSettings); + } +} +// [END discoveryengine_v1alpha_generated_RankService_Create_SetCredentialsProvider1_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/rankservice/create/SyncCreateSetEndpoint.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/rankservice/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..4ca8c5bf400b --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/rankservice/create/SyncCreateSetEndpoint.java @@ -0,0 +1,41 @@ +/* + * Copyright 2024 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.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_RankService_Create_SetEndpoint_sync] +import com.google.cloud.discoveryengine.v1alpha.RankServiceClient; +import com.google.cloud.discoveryengine.v1alpha.RankServiceSettings; +import com.google.cloud.discoveryengine.v1alpha.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // 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 + RankServiceSettings rankServiceSettings = + RankServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); + RankServiceClient rankServiceClient = RankServiceClient.create(rankServiceSettings); + } +} +// [END discoveryengine_v1alpha_generated_RankService_Create_SetEndpoint_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/rankservice/rank/AsyncRank.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/rankservice/rank/AsyncRank.java new file mode 100644 index 000000000000..0834c7f6a80d --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/rankservice/rank/AsyncRank.java @@ -0,0 +1,57 @@ +/* + * Copyright 2024 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.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_RankService_Rank_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.discoveryengine.v1alpha.RankRequest; +import com.google.cloud.discoveryengine.v1alpha.RankResponse; +import com.google.cloud.discoveryengine.v1alpha.RankServiceClient; +import com.google.cloud.discoveryengine.v1alpha.RankingConfigName; +import com.google.cloud.discoveryengine.v1alpha.RankingRecord; +import java.util.ArrayList; + +public class AsyncRank { + + public static void main(String[] args) throws Exception { + asyncRank(); + } + + public static void asyncRank() throws Exception { + // 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 (RankServiceClient rankServiceClient = RankServiceClient.create()) { + RankRequest request = + RankRequest.newBuilder() + .setRankingConfig( + RankingConfigName.of("[PROJECT]", "[LOCATION]", "[RANKING_CONFIG]").toString()) + .setModel("model104069929") + .setTopN(110545924) + .setQuery("query107944136") + .addAllRecords(new ArrayList()) + .setIgnoreRecordDetailsInResponse(true) + .build(); + ApiFuture future = rankServiceClient.rankCallable().futureCall(request); + // Do something. + RankResponse response = future.get(); + } + } +} +// [END discoveryengine_v1alpha_generated_RankService_Rank_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/rankservice/rank/SyncRank.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/rankservice/rank/SyncRank.java new file mode 100644 index 000000000000..28aae726a3db --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/rankservice/rank/SyncRank.java @@ -0,0 +1,54 @@ +/* + * Copyright 2024 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.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_RankService_Rank_sync] +import com.google.cloud.discoveryengine.v1alpha.RankRequest; +import com.google.cloud.discoveryengine.v1alpha.RankResponse; +import com.google.cloud.discoveryengine.v1alpha.RankServiceClient; +import com.google.cloud.discoveryengine.v1alpha.RankingConfigName; +import com.google.cloud.discoveryengine.v1alpha.RankingRecord; +import java.util.ArrayList; + +public class SyncRank { + + public static void main(String[] args) throws Exception { + syncRank(); + } + + public static void syncRank() throws Exception { + // 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 (RankServiceClient rankServiceClient = RankServiceClient.create()) { + RankRequest request = + RankRequest.newBuilder() + .setRankingConfig( + RankingConfigName.of("[PROJECT]", "[LOCATION]", "[RANKING_CONFIG]").toString()) + .setModel("model104069929") + .setTopN(110545924) + .setQuery("query107944136") + .addAllRecords(new ArrayList()) + .setIgnoreRecordDetailsInResponse(true) + .build(); + RankResponse response = rankServiceClient.rank(request); + } + } +} +// [END discoveryengine_v1alpha_generated_RankService_Rank_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/rankservicesettings/rank/SyncRank.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/rankservicesettings/rank/SyncRank.java new file mode 100644 index 000000000000..6e3c4eafc878 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/rankservicesettings/rank/SyncRank.java @@ -0,0 +1,48 @@ +/* + * Copyright 2024 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.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_RankServiceSettings_Rank_sync] +import com.google.cloud.discoveryengine.v1alpha.RankServiceSettings; +import java.time.Duration; + +public class SyncRank { + + public static void main(String[] args) throws Exception { + syncRank(); + } + + public static void syncRank() throws Exception { + // 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 + RankServiceSettings.Builder rankServiceSettingsBuilder = RankServiceSettings.newBuilder(); + rankServiceSettingsBuilder + .rankSettings() + .setRetrySettings( + rankServiceSettingsBuilder + .rankSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + RankServiceSettings rankServiceSettings = rankServiceSettingsBuilder.build(); + } +} +// [END discoveryengine_v1alpha_generated_RankServiceSettings_Rank_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/stub/rankservicestubsettings/rank/SyncRank.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/stub/rankservicestubsettings/rank/SyncRank.java new file mode 100644 index 000000000000..d0b9a43bc05a --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/stub/rankservicestubsettings/rank/SyncRank.java @@ -0,0 +1,49 @@ +/* + * Copyright 2024 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.discoveryengine.v1alpha.stub.samples; + +// [START discoveryengine_v1alpha_generated_RankServiceStubSettings_Rank_sync] +import com.google.cloud.discoveryengine.v1alpha.stub.RankServiceStubSettings; +import java.time.Duration; + +public class SyncRank { + + public static void main(String[] args) throws Exception { + syncRank(); + } + + public static void syncRank() throws Exception { + // 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 + RankServiceStubSettings.Builder rankServiceSettingsBuilder = + RankServiceStubSettings.newBuilder(); + rankServiceSettingsBuilder + .rankSettings() + .setRetrySettings( + rankServiceSettingsBuilder + .rankSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + RankServiceStubSettings rankServiceSettings = rankServiceSettingsBuilder.build(); + } +} +// [END discoveryengine_v1alpha_generated_RankServiceStubSettings_Rank_sync] diff --git a/java-distributedcloudedge/README.md b/java-distributedcloudedge/README.md index 985896782016..5b5289463197 100644 --- a/java-distributedcloudedge/README.md +++ b/java-distributedcloudedge/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -201,7 +201,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-distributedcloudedge.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-distributedcloudedge/0.35.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-distributedcloudedge/0.38.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-dlp/README.md b/java-dlp/README.md index 25160a7edf83..040a954678a6 100644 --- a/java-dlp/README.md +++ b/java-dlp/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.34.0 + 26.37.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-dlp.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-dlp/3.42.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-dlp/3.45.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-dms/README.md b/java-dms/README.md index 363f0214727e..906100b11e3b 100644 --- a/java-dms/README.md +++ b/java-dms/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.34.0 + 26.37.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-dms.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-dms/2.37.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-dms/2.40.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-document-ai/README.md b/java-document-ai/README.md index 59052565af80..5ad3a8128623 100644 --- a/java-document-ai/README.md +++ b/java-document-ai/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.34.0 + 26.37.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-document-ai.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-document-ai/2.42.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-document-ai/2.45.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-document-ai/google-cloud-document-ai/src/main/resources/META-INF/native-image/com.google.cloud.documentai.v1beta3/reflect-config.json b/java-document-ai/google-cloud-document-ai/src/main/resources/META-INF/native-image/com.google.cloud.documentai.v1beta3/reflect-config.json index fc79fc6c533b..3515d647974d 100644 --- a/java-document-ai/google-cloud-document-ai/src/main/resources/META-INF/native-image/com.google.cloud.documentai.v1beta3/reflect-config.json +++ b/java-document-ai/google-cloud-document-ai/src/main/resources/META-INF/native-image/com.google.cloud.documentai.v1beta3/reflect-config.json @@ -1025,6 +1025,222 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.documentai.v1beta3.Document$ChunkedDocument", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.documentai.v1beta3.Document$ChunkedDocument$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.documentai.v1beta3.Document$ChunkedDocument$Chunk", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.documentai.v1beta3.Document$ChunkedDocument$Chunk$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.documentai.v1beta3.Document$ChunkedDocument$Chunk$ChunkPageSpan", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.documentai.v1beta3.Document$ChunkedDocument$Chunk$ChunkPageSpan$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.documentai.v1beta3.Document$DocumentLayout", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.documentai.v1beta3.Document$DocumentLayout$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.documentai.v1beta3.Document$DocumentLayout$DocumentLayoutBlock", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.documentai.v1beta3.Document$DocumentLayout$DocumentLayoutBlock$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.documentai.v1beta3.Document$DocumentLayout$DocumentLayoutBlock$LayoutListBlock", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.documentai.v1beta3.Document$DocumentLayout$DocumentLayoutBlock$LayoutListBlock$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.documentai.v1beta3.Document$DocumentLayout$DocumentLayoutBlock$LayoutListEntry", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.documentai.v1beta3.Document$DocumentLayout$DocumentLayoutBlock$LayoutListEntry$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.documentai.v1beta3.Document$DocumentLayout$DocumentLayoutBlock$LayoutPageSpan", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.documentai.v1beta3.Document$DocumentLayout$DocumentLayoutBlock$LayoutPageSpan$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.documentai.v1beta3.Document$DocumentLayout$DocumentLayoutBlock$LayoutTableBlock", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.documentai.v1beta3.Document$DocumentLayout$DocumentLayoutBlock$LayoutTableBlock$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.documentai.v1beta3.Document$DocumentLayout$DocumentLayoutBlock$LayoutTableCell", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.documentai.v1beta3.Document$DocumentLayout$DocumentLayoutBlock$LayoutTableCell$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.documentai.v1beta3.Document$DocumentLayout$DocumentLayoutBlock$LayoutTableRow", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.documentai.v1beta3.Document$DocumentLayout$DocumentLayoutBlock$LayoutTableRow$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.documentai.v1beta3.Document$DocumentLayout$DocumentLayoutBlock$LayoutTextBlock", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.documentai.v1beta3.Document$DocumentLayout$DocumentLayoutBlock$LayoutTextBlock$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.documentai.v1beta3.Document$Entity", "queryAllDeclaredConstructors": true, @@ -2951,6 +3167,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.documentai.v1beta3.ProcessOptions$LayoutConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.documentai.v1beta3.ProcessOptions$LayoutConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.documentai.v1beta3.ProcessOptions$LayoutConfig$ChunkingConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.documentai.v1beta3.ProcessOptions$LayoutConfig$ChunkingConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.documentai.v1beta3.ProcessRequest", "queryAllDeclaredConstructors": true, diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchProcessMetadata.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchProcessMetadata.java index 672c3225b7a6..79142758d4e8 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchProcessMetadata.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchProcessMetadata.java @@ -427,7 +427,7 @@ public interface IndividualProcessStatusOrBuilder * * @deprecated * google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus.human_review_operation - * is deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=597 + * is deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=629 * @return The humanReviewOperation. */ @java.lang.Deprecated @@ -448,7 +448,7 @@ public interface IndividualProcessStatusOrBuilder * * @deprecated * google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus.human_review_operation - * is deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=597 + * is deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=629 * @return The bytes for humanReviewOperation. */ @java.lang.Deprecated @@ -715,7 +715,7 @@ public com.google.protobuf.ByteString getOutputGcsDestinationBytes() { * * @deprecated * google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus.human_review_operation - * is deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=597 + * is deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=629 * @return The humanReviewOperation. */ @java.lang.Override @@ -747,7 +747,7 @@ public java.lang.String getHumanReviewOperation() { * * @deprecated * google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus.human_review_operation - * is deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=597 + * is deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=629 * @return The bytes for humanReviewOperation. */ @java.lang.Override @@ -1742,7 +1742,7 @@ public Builder setOutputGcsDestinationBytes(com.google.protobuf.ByteString value * @deprecated * google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus.human_review_operation * is deprecated. See - * google/cloud/documentai/v1beta3/document_processor_service.proto;l=597 + * google/cloud/documentai/v1beta3/document_processor_service.proto;l=629 * @return The humanReviewOperation. */ @java.lang.Deprecated @@ -1774,7 +1774,7 @@ public java.lang.String getHumanReviewOperation() { * @deprecated * google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus.human_review_operation * is deprecated. See - * google/cloud/documentai/v1beta3/document_processor_service.proto;l=597 + * google/cloud/documentai/v1beta3/document_processor_service.proto;l=629 * @return The bytes for humanReviewOperation. */ @java.lang.Deprecated @@ -1806,7 +1806,7 @@ public com.google.protobuf.ByteString getHumanReviewOperationBytes() { * @deprecated * google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus.human_review_operation * is deprecated. See - * google/cloud/documentai/v1beta3/document_processor_service.proto;l=597 + * google/cloud/documentai/v1beta3/document_processor_service.proto;l=629 * @param value The humanReviewOperation to set. * @return This builder for chaining. */ @@ -1837,7 +1837,7 @@ public Builder setHumanReviewOperation(java.lang.String value) { * @deprecated * google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus.human_review_operation * is deprecated. See - * google/cloud/documentai/v1beta3/document_processor_service.proto;l=597 + * google/cloud/documentai/v1beta3/document_processor_service.proto;l=629 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1864,7 +1864,7 @@ public Builder clearHumanReviewOperation() { * @deprecated * google.cloud.documentai.v1beta3.BatchProcessMetadata.IndividualProcessStatus.human_review_operation * is deprecated. See - * google/cloud/documentai/v1beta3/document_processor_service.proto;l=597 + * google/cloud/documentai/v1beta3/document_processor_service.proto;l=629 * @param value The bytes for humanReviewOperation to set. * @return This builder for chaining. */ diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchProcessRequest.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchProcessRequest.java index 18ffa8d9d073..f4c9be4e0bd2 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchProcessRequest.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchProcessRequest.java @@ -1848,7 +1848,7 @@ public com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig *
* * @deprecated google.cloud.documentai.v1beta3.BatchProcessRequest.output_config is deprecated. - * See google/cloud/documentai/v1beta3/document_processor_service.proto;l=541 + * See google/cloud/documentai/v1beta3/document_processor_service.proto;l=573 * @return Whether the outputConfig field is set. */ @java.lang.Override @@ -1868,7 +1868,7 @@ public boolean hasOutputConfig() { *
* * @deprecated google.cloud.documentai.v1beta3.BatchProcessRequest.output_config is deprecated. - * See google/cloud/documentai/v1beta3/document_processor_service.proto;l=541 + * See google/cloud/documentai/v1beta3/document_processor_service.proto;l=573 * @return The outputConfig. */ @java.lang.Override @@ -3445,7 +3445,7 @@ public Builder removeInputConfigs(int index) { *
* * @deprecated google.cloud.documentai.v1beta3.BatchProcessRequest.output_config is deprecated. - * See google/cloud/documentai/v1beta3/document_processor_service.proto;l=541 + * See google/cloud/documentai/v1beta3/document_processor_service.proto;l=573 * @return Whether the outputConfig field is set. */ @java.lang.Deprecated @@ -3464,7 +3464,7 @@ public boolean hasOutputConfig() { *
* * @deprecated google.cloud.documentai.v1beta3.BatchProcessRequest.output_config is deprecated. - * See google/cloud/documentai/v1beta3/document_processor_service.proto;l=541 + * See google/cloud/documentai/v1beta3/document_processor_service.proto;l=573 * @return The outputConfig. */ @java.lang.Deprecated diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchProcessRequestOrBuilder.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchProcessRequestOrBuilder.java index d93dc324a14b..d76a6c5e43bb 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchProcessRequestOrBuilder.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/BatchProcessRequestOrBuilder.java @@ -147,7 +147,7 @@ com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig getInpu *
* * @deprecated google.cloud.documentai.v1beta3.BatchProcessRequest.output_config is deprecated. - * See google/cloud/documentai/v1beta3/document_processor_service.proto;l=541 + * See google/cloud/documentai/v1beta3/document_processor_service.proto;l=573 * @return Whether the outputConfig field is set. */ @java.lang.Deprecated @@ -164,7 +164,7 @@ com.google.cloud.documentai.v1beta3.BatchProcessRequest.BatchInputConfig getInpu *
* * @deprecated google.cloud.documentai.v1beta3.BatchProcessRequest.output_config is deprecated. - * See google/cloud/documentai/v1beta3/document_processor_service.proto;l=541 + * See google/cloud/documentai/v1beta3/document_processor_service.proto;l=573 * @return The outputConfig. */ @java.lang.Deprecated diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/Document.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/Document.java index 4e52b3f9b1bf..a7c533b23469 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/Document.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/Document.java @@ -65041,6 +65041,16569 @@ public com.google.cloud.documentai.v1beta3.Document.TextChange getDefaultInstanc } } + public interface DocumentLayoutOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta3.Document.DocumentLayout) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * List of blocks in the document.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + java.util.List + getBlocksList(); + /** + * + * + *
+     * List of blocks in the document.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock getBlocks( + int index); + /** + * + * + *
+     * List of blocks in the document.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + int getBlocksCount(); + /** + * + * + *
+     * List of blocks in the document.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + java.util.List< + ? extends + com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlockOrBuilder> + getBlocksOrBuilderList(); + /** + * + * + *
+     * List of blocks in the document.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlockOrBuilder + getBlocksOrBuilder(int index); + } + /** + * + * + *
+   * Represents the parsed layout of a document as a collection of blocks that
+   * the document is divided into.
+   * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.Document.DocumentLayout} + */ + public static final class DocumentLayout extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.Document.DocumentLayout) + DocumentLayoutOrBuilder { + private static final long serialVersionUID = 0L; + // Use DocumentLayout.newBuilder() to construct. + private DocumentLayout(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DocumentLayout() { + blocks_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DocumentLayout(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.class, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.Builder.class); + } + + public interface DocumentLayoutBlockOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Block consisting of text content.
+       * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTextBlock text_block = 2; + * + * + * @return Whether the textBlock field is set. + */ + boolean hasTextBlock(); + /** + * + * + *
+       * Block consisting of text content.
+       * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTextBlock text_block = 2; + * + * + * @return The textBlock. + */ + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlock + getTextBlock(); + /** + * + * + *
+       * Block consisting of text content.
+       * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTextBlock text_block = 2; + * + */ + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlockOrBuilder + getTextBlockOrBuilder(); + + /** + * + * + *
+       * Block consisting of table content/structure.
+       * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableBlock table_block = 3; + * + * + * @return Whether the tableBlock field is set. + */ + boolean hasTableBlock(); + /** + * + * + *
+       * Block consisting of table content/structure.
+       * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableBlock table_block = 3; + * + * + * @return The tableBlock. + */ + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlock + getTableBlock(); + /** + * + * + *
+       * Block consisting of table content/structure.
+       * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableBlock table_block = 3; + * + */ + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlockOrBuilder + getTableBlockOrBuilder(); + + /** + * + * + *
+       * Block consisting of list content/structure.
+       * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutListBlock list_block = 4; + * + * + * @return Whether the listBlock field is set. + */ + boolean hasListBlock(); + /** + * + * + *
+       * Block consisting of list content/structure.
+       * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutListBlock list_block = 4; + * + * + * @return The listBlock. + */ + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlock + getListBlock(); + /** + * + * + *
+       * Block consisting of list content/structure.
+       * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutListBlock list_block = 4; + * + */ + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlockOrBuilder + getListBlockOrBuilder(); + + /** + * + * + *
+       * ID of the block.
+       * 
+ * + * string block_id = 1; + * + * @return The blockId. + */ + java.lang.String getBlockId(); + /** + * + * + *
+       * ID of the block.
+       * 
+ * + * string block_id = 1; + * + * @return The bytes for blockId. + */ + com.google.protobuf.ByteString getBlockIdBytes(); + + /** + * + * + *
+       * Page span of the block.
+       * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutPageSpan page_span = 5; + * + * + * @return Whether the pageSpan field is set. + */ + boolean hasPageSpan(); + /** + * + * + *
+       * Page span of the block.
+       * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutPageSpan page_span = 5; + * + * + * @return The pageSpan. + */ + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutPageSpan + getPageSpan(); + /** + * + * + *
+       * Page span of the block.
+       * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutPageSpan page_span = 5; + * + */ + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutPageSpanOrBuilder + getPageSpanOrBuilder(); + + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.BlockCase + getBlockCase(); + } + /** + * + * + *
+     * Represents a block. A block could be one of the various types (text,
+     * table, list) supported.
+     * 
+ * + * Protobuf type {@code + * google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock} + */ + public static final class DocumentLayoutBlock extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock) + DocumentLayoutBlockOrBuilder { + private static final long serialVersionUID = 0L; + // Use DocumentLayoutBlock.newBuilder() to construct. + private DocumentLayoutBlock(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DocumentLayoutBlock() { + blockId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DocumentLayoutBlock(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .class, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .Builder.class); + } + + public interface LayoutPageSpanOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutPageSpan) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+         * Page where block starts in the document.
+         * 
+ * + * int32 page_start = 1; + * + * @return The pageStart. + */ + int getPageStart(); + + /** + * + * + *
+         * Page where block ends in the document.
+         * 
+ * + * int32 page_end = 2; + * + * @return The pageEnd. + */ + int getPageEnd(); + } + /** + * + * + *
+       * Represents where the block starts and ends in the document.
+       * 
+ * + * Protobuf type {@code + * google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutPageSpan} + */ + public static final class LayoutPageSpan extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutPageSpan) + LayoutPageSpanOrBuilder { + private static final long serialVersionUID = 0L; + // Use LayoutPageSpan.newBuilder() to construct. + private LayoutPageSpan(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LayoutPageSpan() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new LayoutPageSpan(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_LayoutPageSpan_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_LayoutPageSpan_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutPageSpan.class, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutPageSpan.Builder.class); + } + + public static final int PAGE_START_FIELD_NUMBER = 1; + private int pageStart_ = 0; + /** + * + * + *
+         * Page where block starts in the document.
+         * 
+ * + * int32 page_start = 1; + * + * @return The pageStart. + */ + @java.lang.Override + public int getPageStart() { + return pageStart_; + } + + public static final int PAGE_END_FIELD_NUMBER = 2; + private int pageEnd_ = 0; + /** + * + * + *
+         * Page where block ends in the document.
+         * 
+ * + * int32 page_end = 2; + * + * @return The pageEnd. + */ + @java.lang.Override + public int getPageEnd() { + return pageEnd_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (pageStart_ != 0) { + output.writeInt32(1, pageStart_); + } + if (pageEnd_ != 0) { + output.writeInt32(2, pageEnd_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (pageStart_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, pageStart_); + } + if (pageEnd_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageEnd_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutPageSpan)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutPageSpan + other = + (com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutPageSpan) + obj; + + if (getPageStart() != other.getPageStart()) return false; + if (getPageEnd() != other.getPageEnd()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PAGE_START_FIELD_NUMBER; + hash = (53 * hash) + getPageStart(); + hash = (37 * hash) + PAGE_END_FIELD_NUMBER; + hash = (53 * hash) + getPageEnd(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutPageSpan + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutPageSpan + parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutPageSpan + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutPageSpan + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutPageSpan + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutPageSpan + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutPageSpan + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutPageSpan + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutPageSpan + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutPageSpan + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutPageSpan + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutPageSpan + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutPageSpan + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+         * Represents where the block starts and ends in the document.
+         * 
+ * + * Protobuf type {@code + * google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutPageSpan} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutPageSpan) + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutPageSpanOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_LayoutPageSpan_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_LayoutPageSpan_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutPageSpan.class, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutPageSpan.Builder.class); + } + + // Construct using + // com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutPageSpan.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + pageStart_ = 0; + pageEnd_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_LayoutPageSpan_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutPageSpan + getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutPageSpan.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutPageSpan + build() { + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutPageSpan + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutPageSpan + buildPartial() { + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutPageSpan + result = + new com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutPageSpan(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutPageSpan + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.pageStart_ = pageStart_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageEnd_ = pageEnd_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutPageSpan) { + return mergeFrom( + (com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutPageSpan) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutPageSpan + other) { + if (other + == com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutPageSpan.getDefaultInstance()) return this; + if (other.getPageStart() != 0) { + setPageStart(other.getPageStart()); + } + if (other.getPageEnd() != 0) { + setPageEnd(other.getPageEnd()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + pageStart_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + pageEnd_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int pageStart_; + /** + * + * + *
+           * Page where block starts in the document.
+           * 
+ * + * int32 page_start = 1; + * + * @return The pageStart. + */ + @java.lang.Override + public int getPageStart() { + return pageStart_; + } + /** + * + * + *
+           * Page where block starts in the document.
+           * 
+ * + * int32 page_start = 1; + * + * @param value The pageStart to set. + * @return This builder for chaining. + */ + public Builder setPageStart(int value) { + + pageStart_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+           * Page where block starts in the document.
+           * 
+ * + * int32 page_start = 1; + * + * @return This builder for chaining. + */ + public Builder clearPageStart() { + bitField0_ = (bitField0_ & ~0x00000001); + pageStart_ = 0; + onChanged(); + return this; + } + + private int pageEnd_; + /** + * + * + *
+           * Page where block ends in the document.
+           * 
+ * + * int32 page_end = 2; + * + * @return The pageEnd. + */ + @java.lang.Override + public int getPageEnd() { + return pageEnd_; + } + /** + * + * + *
+           * Page where block ends in the document.
+           * 
+ * + * int32 page_end = 2; + * + * @param value The pageEnd to set. + * @return This builder for chaining. + */ + public Builder setPageEnd(int value) { + + pageEnd_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+           * Page where block ends in the document.
+           * 
+ * + * int32 page_end = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageEnd() { + bitField0_ = (bitField0_ & ~0x00000002); + pageEnd_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutPageSpan) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutPageSpan) + private static final com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutPageSpan + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutPageSpan(); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutPageSpan + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LayoutPageSpan parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutPageSpan + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface LayoutTextBlockOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTextBlock) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+         * Text content stored in the block.
+         * 
+ * + * string text = 1; + * + * @return The text. + */ + java.lang.String getText(); + /** + * + * + *
+         * Text content stored in the block.
+         * 
+ * + * string text = 1; + * + * @return The bytes for text. + */ + com.google.protobuf.ByteString getTextBytes(); + + /** + * + * + *
+         * Type of the text in the block. Available options are: `paragraph`,
+         * `subtitle`, `heading-1`, `heading-2`, `heading-3`, `heading-4`,
+         * `heading-5`, `header`, `footer`.
+         * 
+ * + * string type = 2; + * + * @return The type. + */ + java.lang.String getType(); + /** + * + * + *
+         * Type of the text in the block. Available options are: `paragraph`,
+         * `subtitle`, `heading-1`, `heading-2`, `heading-3`, `heading-4`,
+         * `heading-5`, `header`, `footer`.
+         * 
+ * + * string type = 2; + * + * @return The bytes for type. + */ + com.google.protobuf.ByteString getTypeBytes(); + + /** + * + * + *
+         * A text block could further have child blocks.
+         * Repeated blocks support further hierarchies and nested blocks.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 3; + * + */ + java.util.List< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock> + getBlocksList(); + /** + * + * + *
+         * A text block could further have child blocks.
+         * Repeated blocks support further hierarchies and nested blocks.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 3; + * + */ + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock getBlocks( + int index); + /** + * + * + *
+         * A text block could further have child blocks.
+         * Repeated blocks support further hierarchies and nested blocks.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 3; + * + */ + int getBlocksCount(); + /** + * + * + *
+         * A text block could further have child blocks.
+         * Repeated blocks support further hierarchies and nested blocks.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 3; + * + */ + java.util.List< + ? extends + com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlockOrBuilder> + getBlocksOrBuilderList(); + /** + * + * + *
+         * A text block could further have child blocks.
+         * Repeated blocks support further hierarchies and nested blocks.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 3; + * + */ + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlockOrBuilder + getBlocksOrBuilder(int index); + } + /** + * + * + *
+       * Represents a text type block.
+       * 
+ * + * Protobuf type {@code + * google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTextBlock} + */ + public static final class LayoutTextBlock extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTextBlock) + LayoutTextBlockOrBuilder { + private static final long serialVersionUID = 0L; + // Use LayoutTextBlock.newBuilder() to construct. + private LayoutTextBlock(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LayoutTextBlock() { + text_ = ""; + type_ = ""; + blocks_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new LayoutTextBlock(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_LayoutTextBlock_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_LayoutTextBlock_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlock.class, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlock.Builder.class); + } + + public static final int TEXT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object text_ = ""; + /** + * + * + *
+         * Text content stored in the block.
+         * 
+ * + * string text = 1; + * + * @return The text. + */ + @java.lang.Override + public java.lang.String getText() { + java.lang.Object ref = text_; + 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(); + text_ = s; + return s; + } + } + /** + * + * + *
+         * Text content stored in the block.
+         * 
+ * + * string text = 1; + * + * @return The bytes for text. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTextBytes() { + java.lang.Object ref = text_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + text_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object type_ = ""; + /** + * + * + *
+         * Type of the text in the block. Available options are: `paragraph`,
+         * `subtitle`, `heading-1`, `heading-2`, `heading-3`, `heading-4`,
+         * `heading-5`, `header`, `footer`.
+         * 
+ * + * string type = 2; + * + * @return The type. + */ + @java.lang.Override + public java.lang.String getType() { + java.lang.Object ref = type_; + 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(); + type_ = s; + return s; + } + } + /** + * + * + *
+         * Type of the text in the block. Available options are: `paragraph`,
+         * `subtitle`, `heading-1`, `heading-2`, `heading-3`, `heading-4`,
+         * `heading-5`, `header`, `footer`.
+         * 
+ * + * string type = 2; + * + * @return The bytes for type. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BLOCKS_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock> + blocks_; + /** + * + * + *
+         * A text block could further have child blocks.
+         * Repeated blocks support further hierarchies and nested blocks.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 3; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock> + getBlocksList() { + return blocks_; + } + /** + * + * + *
+         * A text block could further have child blocks.
+         * Repeated blocks support further hierarchies and nested blocks.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 3; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlockOrBuilder> + getBlocksOrBuilderList() { + return blocks_; + } + /** + * + * + *
+         * A text block could further have child blocks.
+         * Repeated blocks support further hierarchies and nested blocks.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 3; + * + */ + @java.lang.Override + public int getBlocksCount() { + return blocks_.size(); + } + /** + * + * + *
+         * A text block could further have child blocks.
+         * Repeated blocks support further hierarchies and nested blocks.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 3; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + getBlocks(int index) { + return blocks_.get(index); + } + /** + * + * + *
+         * A text block could further have child blocks.
+         * Repeated blocks support further hierarchies and nested blocks.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 3; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlockOrBuilder + getBlocksOrBuilder(int index) { + return blocks_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, text_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, type_); + } + for (int i = 0; i < blocks_.size(); i++) { + output.writeMessage(3, blocks_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, text_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, type_); + } + for (int i = 0; i < blocks_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, blocks_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlock)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlock + other = + (com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlock) + obj; + + if (!getText().equals(other.getText())) return false; + if (!getType().equals(other.getType())) return false; + if (!getBlocksList().equals(other.getBlocksList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TEXT_FIELD_NUMBER; + hash = (53 * hash) + getText().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + if (getBlocksCount() > 0) { + hash = (37 * hash) + BLOCKS_FIELD_NUMBER; + hash = (53 * hash) + getBlocksList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTextBlock + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTextBlock + parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTextBlock + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTextBlock + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTextBlock + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTextBlock + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTextBlock + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTextBlock + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTextBlock + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTextBlock + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTextBlock + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTextBlock + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlock + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+         * Represents a text type block.
+         * 
+ * + * Protobuf type {@code + * google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTextBlock} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTextBlock) + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlockOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_LayoutTextBlock_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_LayoutTextBlock_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlock.class, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlock.Builder.class); + } + + // Construct using + // com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTextBlock.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + text_ = ""; + type_ = ""; + if (blocksBuilder_ == null) { + blocks_ = java.util.Collections.emptyList(); + } else { + blocks_ = null; + blocksBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_LayoutTextBlock_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlock + getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlock.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlock + build() { + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlock + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlock + buildPartial() { + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlock + result = + new com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTextBlock(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlock + result) { + if (blocksBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + blocks_ = java.util.Collections.unmodifiableList(blocks_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.blocks_ = blocks_; + } else { + result.blocks_ = blocksBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlock + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.text_ = text_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.type_ = type_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlock) { + return mergeFrom( + (com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlock) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlock + other) { + if (other + == com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlock.getDefaultInstance()) return this; + if (!other.getText().isEmpty()) { + text_ = other.text_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getType().isEmpty()) { + type_ = other.type_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (blocksBuilder_ == null) { + if (!other.blocks_.isEmpty()) { + if (blocks_.isEmpty()) { + blocks_ = other.blocks_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureBlocksIsMutable(); + blocks_.addAll(other.blocks_); + } + onChanged(); + } + } else { + if (!other.blocks_.isEmpty()) { + if (blocksBuilder_.isEmpty()) { + blocksBuilder_.dispose(); + blocksBuilder_ = null; + blocks_ = other.blocks_; + bitField0_ = (bitField0_ & ~0x00000004); + blocksBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getBlocksFieldBuilder() + : null; + } else { + blocksBuilder_.addAllMessages(other.blocks_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + text_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + type_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock + m = + input.readMessage( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.parser(), + extensionRegistry); + if (blocksBuilder_ == null) { + ensureBlocksIsMutable(); + blocks_.add(m); + } else { + blocksBuilder_.addMessage(m); + } + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object text_ = ""; + /** + * + * + *
+           * Text content stored in the block.
+           * 
+ * + * string text = 1; + * + * @return The text. + */ + public java.lang.String getText() { + java.lang.Object ref = text_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + text_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+           * Text content stored in the block.
+           * 
+ * + * string text = 1; + * + * @return The bytes for text. + */ + public com.google.protobuf.ByteString getTextBytes() { + java.lang.Object ref = text_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + text_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+           * Text content stored in the block.
+           * 
+ * + * string text = 1; + * + * @param value The text to set. + * @return This builder for chaining. + */ + public Builder setText(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + text_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+           * Text content stored in the block.
+           * 
+ * + * string text = 1; + * + * @return This builder for chaining. + */ + public Builder clearText() { + text_ = getDefaultInstance().getText(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+           * Text content stored in the block.
+           * 
+ * + * string text = 1; + * + * @param value The bytes for text to set. + * @return This builder for chaining. + */ + public Builder setTextBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + text_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object type_ = ""; + /** + * + * + *
+           * Type of the text in the block. Available options are: `paragraph`,
+           * `subtitle`, `heading-1`, `heading-2`, `heading-3`, `heading-4`,
+           * `heading-5`, `header`, `footer`.
+           * 
+ * + * string type = 2; + * + * @return The type. + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+           * Type of the text in the block. Available options are: `paragraph`,
+           * `subtitle`, `heading-1`, `heading-2`, `heading-3`, `heading-4`,
+           * `heading-5`, `header`, `footer`.
+           * 
+ * + * string type = 2; + * + * @return The bytes for type. + */ + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+           * Type of the text in the block. Available options are: `paragraph`,
+           * `subtitle`, `heading-1`, `heading-2`, `heading-3`, `heading-4`,
+           * `heading-5`, `header`, `footer`.
+           * 
+ * + * string type = 2; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+           * Type of the text in the block. Available options are: `paragraph`,
+           * `subtitle`, `heading-1`, `heading-2`, `heading-3`, `heading-4`,
+           * `heading-5`, `header`, `footer`.
+           * 
+ * + * string type = 2; + * + * @return This builder for chaining. + */ + public Builder clearType() { + type_ = getDefaultInstance().getType(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+           * Type of the text in the block. Available options are: `paragraph`,
+           * `subtitle`, `heading-1`, `heading-2`, `heading-3`, `heading-4`,
+           * `heading-5`, `header`, `footer`.
+           * 
+ * + * string type = 2; + * + * @param value The bytes for type to set. + * @return This builder for chaining. + */ + public Builder setTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + type_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.util.List< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock> + blocks_ = java.util.Collections.emptyList(); + + private void ensureBlocksIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + blocks_ = + new java.util.ArrayList< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock>(blocks_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .Builder, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlockOrBuilder> + blocksBuilder_; + + /** + * + * + *
+           * A text block could further have child blocks.
+           * Repeated blocks support further hierarchies and nested blocks.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 3; + * + */ + public java.util.List< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock> + getBlocksList() { + if (blocksBuilder_ == null) { + return java.util.Collections.unmodifiableList(blocks_); + } else { + return blocksBuilder_.getMessageList(); + } + } + /** + * + * + *
+           * A text block could further have child blocks.
+           * Repeated blocks support further hierarchies and nested blocks.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 3; + * + */ + public int getBlocksCount() { + if (blocksBuilder_ == null) { + return blocks_.size(); + } else { + return blocksBuilder_.getCount(); + } + } + /** + * + * + *
+           * A text block could further have child blocks.
+           * Repeated blocks support further hierarchies and nested blocks.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 3; + * + */ + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + getBlocks(int index) { + if (blocksBuilder_ == null) { + return blocks_.get(index); + } else { + return blocksBuilder_.getMessage(index); + } + } + /** + * + * + *
+           * A text block could further have child blocks.
+           * Repeated blocks support further hierarchies and nested blocks.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 3; + * + */ + public Builder setBlocks( + int index, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + value) { + if (blocksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBlocksIsMutable(); + blocks_.set(index, value); + onChanged(); + } else { + blocksBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+           * A text block could further have child blocks.
+           * Repeated blocks support further hierarchies and nested blocks.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 3; + * + */ + public Builder setBlocks( + int index, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .Builder + builderForValue) { + if (blocksBuilder_ == null) { + ensureBlocksIsMutable(); + blocks_.set(index, builderForValue.build()); + onChanged(); + } else { + blocksBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+           * A text block could further have child blocks.
+           * Repeated blocks support further hierarchies and nested blocks.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 3; + * + */ + public Builder addBlocks( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + value) { + if (blocksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBlocksIsMutable(); + blocks_.add(value); + onChanged(); + } else { + blocksBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+           * A text block could further have child blocks.
+           * Repeated blocks support further hierarchies and nested blocks.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 3; + * + */ + public Builder addBlocks( + int index, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + value) { + if (blocksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBlocksIsMutable(); + blocks_.add(index, value); + onChanged(); + } else { + blocksBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+           * A text block could further have child blocks.
+           * Repeated blocks support further hierarchies and nested blocks.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 3; + * + */ + public Builder addBlocks( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .Builder + builderForValue) { + if (blocksBuilder_ == null) { + ensureBlocksIsMutable(); + blocks_.add(builderForValue.build()); + onChanged(); + } else { + blocksBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+           * A text block could further have child blocks.
+           * Repeated blocks support further hierarchies and nested blocks.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 3; + * + */ + public Builder addBlocks( + int index, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .Builder + builderForValue) { + if (blocksBuilder_ == null) { + ensureBlocksIsMutable(); + blocks_.add(index, builderForValue.build()); + onChanged(); + } else { + blocksBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+           * A text block could further have child blocks.
+           * Repeated blocks support further hierarchies and nested blocks.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 3; + * + */ + public Builder addAllBlocks( + java.lang.Iterable< + ? extends + com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock> + values) { + if (blocksBuilder_ == null) { + ensureBlocksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, blocks_); + onChanged(); + } else { + blocksBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+           * A text block could further have child blocks.
+           * Repeated blocks support further hierarchies and nested blocks.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 3; + * + */ + public Builder clearBlocks() { + if (blocksBuilder_ == null) { + blocks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + blocksBuilder_.clear(); + } + return this; + } + /** + * + * + *
+           * A text block could further have child blocks.
+           * Repeated blocks support further hierarchies and nested blocks.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 3; + * + */ + public Builder removeBlocks(int index) { + if (blocksBuilder_ == null) { + ensureBlocksIsMutable(); + blocks_.remove(index); + onChanged(); + } else { + blocksBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+           * A text block could further have child blocks.
+           * Repeated blocks support further hierarchies and nested blocks.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 3; + * + */ + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .Builder + getBlocksBuilder(int index) { + return getBlocksFieldBuilder().getBuilder(index); + } + /** + * + * + *
+           * A text block could further have child blocks.
+           * Repeated blocks support further hierarchies and nested blocks.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 3; + * + */ + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlockOrBuilder + getBlocksOrBuilder(int index) { + if (blocksBuilder_ == null) { + return blocks_.get(index); + } else { + return blocksBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+           * A text block could further have child blocks.
+           * Repeated blocks support further hierarchies and nested blocks.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 3; + * + */ + public java.util.List< + ? extends + com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlockOrBuilder> + getBlocksOrBuilderList() { + if (blocksBuilder_ != null) { + return blocksBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(blocks_); + } + } + /** + * + * + *
+           * A text block could further have child blocks.
+           * Repeated blocks support further hierarchies and nested blocks.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 3; + * + */ + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .Builder + addBlocksBuilder() { + return getBlocksFieldBuilder() + .addBuilder( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .getDefaultInstance()); + } + /** + * + * + *
+           * A text block could further have child blocks.
+           * Repeated blocks support further hierarchies and nested blocks.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 3; + * + */ + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .Builder + addBlocksBuilder(int index) { + return getBlocksFieldBuilder() + .addBuilder( + index, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .getDefaultInstance()); + } + /** + * + * + *
+           * A text block could further have child blocks.
+           * Repeated blocks support further hierarchies and nested blocks.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 3; + * + */ + public java.util.List< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .Builder> + getBlocksBuilderList() { + return getBlocksFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .Builder, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlockOrBuilder> + getBlocksFieldBuilder() { + if (blocksBuilder_ == null) { + blocksBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.Builder, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlockOrBuilder>( + blocks_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + blocks_ = null; + } + return blocksBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTextBlock) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTextBlock) + private static final com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTextBlock + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlock(); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTextBlock + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LayoutTextBlock parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlock + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface LayoutTableBlockOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableBlock) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+         * Header rows at the top of the table.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow header_rows = 1; + * + */ + java.util.List< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRow> + getHeaderRowsList(); + /** + * + * + *
+         * Header rows at the top of the table.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow header_rows = 1; + * + */ + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRow + getHeaderRows(int index); + /** + * + * + *
+         * Header rows at the top of the table.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow header_rows = 1; + * + */ + int getHeaderRowsCount(); + /** + * + * + *
+         * Header rows at the top of the table.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow header_rows = 1; + * + */ + java.util.List< + ? extends + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRowOrBuilder> + getHeaderRowsOrBuilderList(); + /** + * + * + *
+         * Header rows at the top of the table.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow header_rows = 1; + * + */ + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRowOrBuilder + getHeaderRowsOrBuilder(int index); + + /** + * + * + *
+         * Body rows containing main table content.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow body_rows = 2; + * + */ + java.util.List< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRow> + getBodyRowsList(); + /** + * + * + *
+         * Body rows containing main table content.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow body_rows = 2; + * + */ + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRow + getBodyRows(int index); + /** + * + * + *
+         * Body rows containing main table content.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow body_rows = 2; + * + */ + int getBodyRowsCount(); + /** + * + * + *
+         * Body rows containing main table content.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow body_rows = 2; + * + */ + java.util.List< + ? extends + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRowOrBuilder> + getBodyRowsOrBuilderList(); + /** + * + * + *
+         * Body rows containing main table content.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow body_rows = 2; + * + */ + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRowOrBuilder + getBodyRowsOrBuilder(int index); + + /** + * + * + *
+         * Table caption/title.
+         * 
+ * + * string caption = 3; + * + * @return The caption. + */ + java.lang.String getCaption(); + /** + * + * + *
+         * Table caption/title.
+         * 
+ * + * string caption = 3; + * + * @return The bytes for caption. + */ + com.google.protobuf.ByteString getCaptionBytes(); + } + /** + * + * + *
+       * Represents a table type block.
+       * 
+ * + * Protobuf type {@code + * google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableBlock} + */ + public static final class LayoutTableBlock extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableBlock) + LayoutTableBlockOrBuilder { + private static final long serialVersionUID = 0L; + // Use LayoutTableBlock.newBuilder() to construct. + private LayoutTableBlock(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LayoutTableBlock() { + headerRows_ = java.util.Collections.emptyList(); + bodyRows_ = java.util.Collections.emptyList(); + caption_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new LayoutTableBlock(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_LayoutTableBlock_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_LayoutTableBlock_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlock.class, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlock.Builder.class); + } + + public static final int HEADER_ROWS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRow> + headerRows_; + /** + * + * + *
+         * Header rows at the top of the table.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow header_rows = 1; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRow> + getHeaderRowsList() { + return headerRows_; + } + /** + * + * + *
+         * Header rows at the top of the table.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow header_rows = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRowOrBuilder> + getHeaderRowsOrBuilderList() { + return headerRows_; + } + /** + * + * + *
+         * Header rows at the top of the table.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow header_rows = 1; + * + */ + @java.lang.Override + public int getHeaderRowsCount() { + return headerRows_.size(); + } + /** + * + * + *
+         * Header rows at the top of the table.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow header_rows = 1; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRow + getHeaderRows(int index) { + return headerRows_.get(index); + } + /** + * + * + *
+         * Header rows at the top of the table.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow header_rows = 1; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRowOrBuilder + getHeaderRowsOrBuilder(int index) { + return headerRows_.get(index); + } + + public static final int BODY_ROWS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRow> + bodyRows_; + /** + * + * + *
+         * Body rows containing main table content.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow body_rows = 2; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRow> + getBodyRowsList() { + return bodyRows_; + } + /** + * + * + *
+         * Body rows containing main table content.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow body_rows = 2; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRowOrBuilder> + getBodyRowsOrBuilderList() { + return bodyRows_; + } + /** + * + * + *
+         * Body rows containing main table content.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow body_rows = 2; + * + */ + @java.lang.Override + public int getBodyRowsCount() { + return bodyRows_.size(); + } + /** + * + * + *
+         * Body rows containing main table content.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow body_rows = 2; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRow + getBodyRows(int index) { + return bodyRows_.get(index); + } + /** + * + * + *
+         * Body rows containing main table content.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow body_rows = 2; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRowOrBuilder + getBodyRowsOrBuilder(int index) { + return bodyRows_.get(index); + } + + public static final int CAPTION_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object caption_ = ""; + /** + * + * + *
+         * Table caption/title.
+         * 
+ * + * string caption = 3; + * + * @return The caption. + */ + @java.lang.Override + public java.lang.String getCaption() { + java.lang.Object ref = caption_; + 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(); + caption_ = s; + return s; + } + } + /** + * + * + *
+         * Table caption/title.
+         * 
+ * + * string caption = 3; + * + * @return The bytes for caption. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCaptionBytes() { + java.lang.Object ref = caption_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + caption_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < headerRows_.size(); i++) { + output.writeMessage(1, headerRows_.get(i)); + } + for (int i = 0; i < bodyRows_.size(); i++) { + output.writeMessage(2, bodyRows_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(caption_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, caption_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < headerRows_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, headerRows_.get(i)); + } + for (int i = 0; i < bodyRows_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, bodyRows_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(caption_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, caption_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlock)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlock + other = + (com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlock) + obj; + + if (!getHeaderRowsList().equals(other.getHeaderRowsList())) return false; + if (!getBodyRowsList().equals(other.getBodyRowsList())) return false; + if (!getCaption().equals(other.getCaption())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getHeaderRowsCount() > 0) { + hash = (37 * hash) + HEADER_ROWS_FIELD_NUMBER; + hash = (53 * hash) + getHeaderRowsList().hashCode(); + } + if (getBodyRowsCount() > 0) { + hash = (37 * hash) + BODY_ROWS_FIELD_NUMBER; + hash = (53 * hash) + getBodyRowsList().hashCode(); + } + hash = (37 * hash) + CAPTION_FIELD_NUMBER; + hash = (53 * hash) + getCaption().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTableBlock + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTableBlock + parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTableBlock + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTableBlock + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTableBlock + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTableBlock + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTableBlock + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTableBlock + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTableBlock + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTableBlock + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTableBlock + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTableBlock + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlock + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+         * Represents a table type block.
+         * 
+ * + * Protobuf type {@code + * google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableBlock} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableBlock) + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlockOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_LayoutTableBlock_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_LayoutTableBlock_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlock.class, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlock.Builder.class); + } + + // Construct using + // com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableBlock.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (headerRowsBuilder_ == null) { + headerRows_ = java.util.Collections.emptyList(); + } else { + headerRows_ = null; + headerRowsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + if (bodyRowsBuilder_ == null) { + bodyRows_ = java.util.Collections.emptyList(); + } else { + bodyRows_ = null; + bodyRowsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + caption_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_LayoutTableBlock_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlock + getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlock.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlock + build() { + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlock + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlock + buildPartial() { + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlock + result = + new com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTableBlock(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlock + result) { + if (headerRowsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + headerRows_ = java.util.Collections.unmodifiableList(headerRows_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.headerRows_ = headerRows_; + } else { + result.headerRows_ = headerRowsBuilder_.build(); + } + if (bodyRowsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + bodyRows_ = java.util.Collections.unmodifiableList(bodyRows_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.bodyRows_ = bodyRows_; + } else { + result.bodyRows_ = bodyRowsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlock + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.caption_ = caption_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlock) { + return mergeFrom( + (com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlock) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlock + other) { + if (other + == com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlock.getDefaultInstance()) return this; + if (headerRowsBuilder_ == null) { + if (!other.headerRows_.isEmpty()) { + if (headerRows_.isEmpty()) { + headerRows_ = other.headerRows_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureHeaderRowsIsMutable(); + headerRows_.addAll(other.headerRows_); + } + onChanged(); + } + } else { + if (!other.headerRows_.isEmpty()) { + if (headerRowsBuilder_.isEmpty()) { + headerRowsBuilder_.dispose(); + headerRowsBuilder_ = null; + headerRows_ = other.headerRows_; + bitField0_ = (bitField0_ & ~0x00000001); + headerRowsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getHeaderRowsFieldBuilder() + : null; + } else { + headerRowsBuilder_.addAllMessages(other.headerRows_); + } + } + } + if (bodyRowsBuilder_ == null) { + if (!other.bodyRows_.isEmpty()) { + if (bodyRows_.isEmpty()) { + bodyRows_ = other.bodyRows_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureBodyRowsIsMutable(); + bodyRows_.addAll(other.bodyRows_); + } + onChanged(); + } + } else { + if (!other.bodyRows_.isEmpty()) { + if (bodyRowsBuilder_.isEmpty()) { + bodyRowsBuilder_.dispose(); + bodyRowsBuilder_ = null; + bodyRows_ = other.bodyRows_; + bitField0_ = (bitField0_ & ~0x00000002); + bodyRowsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getBodyRowsFieldBuilder() + : null; + } else { + bodyRowsBuilder_.addAllMessages(other.bodyRows_); + } + } + } + if (!other.getCaption().isEmpty()) { + caption_ = other.caption_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTableRow + m = + input.readMessage( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTableRow.parser(), + extensionRegistry); + if (headerRowsBuilder_ == null) { + ensureHeaderRowsIsMutable(); + headerRows_.add(m); + } else { + headerRowsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTableRow + m = + input.readMessage( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTableRow.parser(), + extensionRegistry); + if (bodyRowsBuilder_ == null) { + ensureBodyRowsIsMutable(); + bodyRows_.add(m); + } else { + bodyRowsBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: + { + caption_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRow> + headerRows_ = java.util.Collections.emptyList(); + + private void ensureHeaderRowsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + headerRows_ = + new java.util.ArrayList< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTableRow>(headerRows_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRow, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRow.Builder, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRowOrBuilder> + headerRowsBuilder_; + + /** + * + * + *
+           * Header rows at the top of the table.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow header_rows = 1; + * + */ + public java.util.List< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRow> + getHeaderRowsList() { + if (headerRowsBuilder_ == null) { + return java.util.Collections.unmodifiableList(headerRows_); + } else { + return headerRowsBuilder_.getMessageList(); + } + } + /** + * + * + *
+           * Header rows at the top of the table.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow header_rows = 1; + * + */ + public int getHeaderRowsCount() { + if (headerRowsBuilder_ == null) { + return headerRows_.size(); + } else { + return headerRowsBuilder_.getCount(); + } + } + /** + * + * + *
+           * Header rows at the top of the table.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow header_rows = 1; + * + */ + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRow + getHeaderRows(int index) { + if (headerRowsBuilder_ == null) { + return headerRows_.get(index); + } else { + return headerRowsBuilder_.getMessage(index); + } + } + /** + * + * + *
+           * Header rows at the top of the table.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow header_rows = 1; + * + */ + public Builder setHeaderRows( + int index, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRow + value) { + if (headerRowsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHeaderRowsIsMutable(); + headerRows_.set(index, value); + onChanged(); + } else { + headerRowsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+           * Header rows at the top of the table.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow header_rows = 1; + * + */ + public Builder setHeaderRows( + int index, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRow.Builder + builderForValue) { + if (headerRowsBuilder_ == null) { + ensureHeaderRowsIsMutable(); + headerRows_.set(index, builderForValue.build()); + onChanged(); + } else { + headerRowsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+           * Header rows at the top of the table.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow header_rows = 1; + * + */ + public Builder addHeaderRows( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRow + value) { + if (headerRowsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHeaderRowsIsMutable(); + headerRows_.add(value); + onChanged(); + } else { + headerRowsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+           * Header rows at the top of the table.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow header_rows = 1; + * + */ + public Builder addHeaderRows( + int index, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRow + value) { + if (headerRowsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHeaderRowsIsMutable(); + headerRows_.add(index, value); + onChanged(); + } else { + headerRowsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+           * Header rows at the top of the table.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow header_rows = 1; + * + */ + public Builder addHeaderRows( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRow.Builder + builderForValue) { + if (headerRowsBuilder_ == null) { + ensureHeaderRowsIsMutable(); + headerRows_.add(builderForValue.build()); + onChanged(); + } else { + headerRowsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+           * Header rows at the top of the table.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow header_rows = 1; + * + */ + public Builder addHeaderRows( + int index, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRow.Builder + builderForValue) { + if (headerRowsBuilder_ == null) { + ensureHeaderRowsIsMutable(); + headerRows_.add(index, builderForValue.build()); + onChanged(); + } else { + headerRowsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+           * Header rows at the top of the table.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow header_rows = 1; + * + */ + public Builder addAllHeaderRows( + java.lang.Iterable< + ? extends + com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTableRow> + values) { + if (headerRowsBuilder_ == null) { + ensureHeaderRowsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, headerRows_); + onChanged(); + } else { + headerRowsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+           * Header rows at the top of the table.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow header_rows = 1; + * + */ + public Builder clearHeaderRows() { + if (headerRowsBuilder_ == null) { + headerRows_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + headerRowsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+           * Header rows at the top of the table.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow header_rows = 1; + * + */ + public Builder removeHeaderRows(int index) { + if (headerRowsBuilder_ == null) { + ensureHeaderRowsIsMutable(); + headerRows_.remove(index); + onChanged(); + } else { + headerRowsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+           * Header rows at the top of the table.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow header_rows = 1; + * + */ + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRow.Builder + getHeaderRowsBuilder(int index) { + return getHeaderRowsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+           * Header rows at the top of the table.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow header_rows = 1; + * + */ + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRowOrBuilder + getHeaderRowsOrBuilder(int index) { + if (headerRowsBuilder_ == null) { + return headerRows_.get(index); + } else { + return headerRowsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+           * Header rows at the top of the table.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow header_rows = 1; + * + */ + public java.util.List< + ? extends + com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTableRowOrBuilder> + getHeaderRowsOrBuilderList() { + if (headerRowsBuilder_ != null) { + return headerRowsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(headerRows_); + } + } + /** + * + * + *
+           * Header rows at the top of the table.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow header_rows = 1; + * + */ + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRow.Builder + addHeaderRowsBuilder() { + return getHeaderRowsFieldBuilder() + .addBuilder( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRow.getDefaultInstance()); + } + /** + * + * + *
+           * Header rows at the top of the table.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow header_rows = 1; + * + */ + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRow.Builder + addHeaderRowsBuilder(int index) { + return getHeaderRowsFieldBuilder() + .addBuilder( + index, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRow.getDefaultInstance()); + } + /** + * + * + *
+           * Header rows at the top of the table.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow header_rows = 1; + * + */ + public java.util.List< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRow.Builder> + getHeaderRowsBuilderList() { + return getHeaderRowsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRow, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRow.Builder, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRowOrBuilder> + getHeaderRowsFieldBuilder() { + if (headerRowsBuilder_ == null) { + headerRowsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTableRow, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTableRow.Builder, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTableRowOrBuilder>( + headerRows_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + headerRows_ = null; + } + return headerRowsBuilder_; + } + + private java.util.List< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRow> + bodyRows_ = java.util.Collections.emptyList(); + + private void ensureBodyRowsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + bodyRows_ = + new java.util.ArrayList< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTableRow>(bodyRows_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRow, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRow.Builder, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRowOrBuilder> + bodyRowsBuilder_; + + /** + * + * + *
+           * Body rows containing main table content.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow body_rows = 2; + * + */ + public java.util.List< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRow> + getBodyRowsList() { + if (bodyRowsBuilder_ == null) { + return java.util.Collections.unmodifiableList(bodyRows_); + } else { + return bodyRowsBuilder_.getMessageList(); + } + } + /** + * + * + *
+           * Body rows containing main table content.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow body_rows = 2; + * + */ + public int getBodyRowsCount() { + if (bodyRowsBuilder_ == null) { + return bodyRows_.size(); + } else { + return bodyRowsBuilder_.getCount(); + } + } + /** + * + * + *
+           * Body rows containing main table content.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow body_rows = 2; + * + */ + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRow + getBodyRows(int index) { + if (bodyRowsBuilder_ == null) { + return bodyRows_.get(index); + } else { + return bodyRowsBuilder_.getMessage(index); + } + } + /** + * + * + *
+           * Body rows containing main table content.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow body_rows = 2; + * + */ + public Builder setBodyRows( + int index, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRow + value) { + if (bodyRowsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBodyRowsIsMutable(); + bodyRows_.set(index, value); + onChanged(); + } else { + bodyRowsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+           * Body rows containing main table content.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow body_rows = 2; + * + */ + public Builder setBodyRows( + int index, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRow.Builder + builderForValue) { + if (bodyRowsBuilder_ == null) { + ensureBodyRowsIsMutable(); + bodyRows_.set(index, builderForValue.build()); + onChanged(); + } else { + bodyRowsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+           * Body rows containing main table content.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow body_rows = 2; + * + */ + public Builder addBodyRows( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRow + value) { + if (bodyRowsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBodyRowsIsMutable(); + bodyRows_.add(value); + onChanged(); + } else { + bodyRowsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+           * Body rows containing main table content.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow body_rows = 2; + * + */ + public Builder addBodyRows( + int index, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRow + value) { + if (bodyRowsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBodyRowsIsMutable(); + bodyRows_.add(index, value); + onChanged(); + } else { + bodyRowsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+           * Body rows containing main table content.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow body_rows = 2; + * + */ + public Builder addBodyRows( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRow.Builder + builderForValue) { + if (bodyRowsBuilder_ == null) { + ensureBodyRowsIsMutable(); + bodyRows_.add(builderForValue.build()); + onChanged(); + } else { + bodyRowsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+           * Body rows containing main table content.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow body_rows = 2; + * + */ + public Builder addBodyRows( + int index, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRow.Builder + builderForValue) { + if (bodyRowsBuilder_ == null) { + ensureBodyRowsIsMutable(); + bodyRows_.add(index, builderForValue.build()); + onChanged(); + } else { + bodyRowsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+           * Body rows containing main table content.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow body_rows = 2; + * + */ + public Builder addAllBodyRows( + java.lang.Iterable< + ? extends + com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTableRow> + values) { + if (bodyRowsBuilder_ == null) { + ensureBodyRowsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, bodyRows_); + onChanged(); + } else { + bodyRowsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+           * Body rows containing main table content.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow body_rows = 2; + * + */ + public Builder clearBodyRows() { + if (bodyRowsBuilder_ == null) { + bodyRows_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + bodyRowsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+           * Body rows containing main table content.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow body_rows = 2; + * + */ + public Builder removeBodyRows(int index) { + if (bodyRowsBuilder_ == null) { + ensureBodyRowsIsMutable(); + bodyRows_.remove(index); + onChanged(); + } else { + bodyRowsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+           * Body rows containing main table content.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow body_rows = 2; + * + */ + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRow.Builder + getBodyRowsBuilder(int index) { + return getBodyRowsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+           * Body rows containing main table content.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow body_rows = 2; + * + */ + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRowOrBuilder + getBodyRowsOrBuilder(int index) { + if (bodyRowsBuilder_ == null) { + return bodyRows_.get(index); + } else { + return bodyRowsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+           * Body rows containing main table content.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow body_rows = 2; + * + */ + public java.util.List< + ? extends + com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTableRowOrBuilder> + getBodyRowsOrBuilderList() { + if (bodyRowsBuilder_ != null) { + return bodyRowsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(bodyRows_); + } + } + /** + * + * + *
+           * Body rows containing main table content.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow body_rows = 2; + * + */ + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRow.Builder + addBodyRowsBuilder() { + return getBodyRowsFieldBuilder() + .addBuilder( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRow.getDefaultInstance()); + } + /** + * + * + *
+           * Body rows containing main table content.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow body_rows = 2; + * + */ + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRow.Builder + addBodyRowsBuilder(int index) { + return getBodyRowsFieldBuilder() + .addBuilder( + index, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRow.getDefaultInstance()); + } + /** + * + * + *
+           * Body rows containing main table content.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow body_rows = 2; + * + */ + public java.util.List< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRow.Builder> + getBodyRowsBuilderList() { + return getBodyRowsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRow, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRow.Builder, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRowOrBuilder> + getBodyRowsFieldBuilder() { + if (bodyRowsBuilder_ == null) { + bodyRowsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTableRow, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTableRow.Builder, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTableRowOrBuilder>( + bodyRows_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + bodyRows_ = null; + } + return bodyRowsBuilder_; + } + + private java.lang.Object caption_ = ""; + /** + * + * + *
+           * Table caption/title.
+           * 
+ * + * string caption = 3; + * + * @return The caption. + */ + public java.lang.String getCaption() { + java.lang.Object ref = caption_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + caption_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+           * Table caption/title.
+           * 
+ * + * string caption = 3; + * + * @return The bytes for caption. + */ + public com.google.protobuf.ByteString getCaptionBytes() { + java.lang.Object ref = caption_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + caption_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+           * Table caption/title.
+           * 
+ * + * string caption = 3; + * + * @param value The caption to set. + * @return This builder for chaining. + */ + public Builder setCaption(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + caption_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+           * Table caption/title.
+           * 
+ * + * string caption = 3; + * + * @return This builder for chaining. + */ + public Builder clearCaption() { + caption_ = getDefaultInstance().getCaption(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+           * Table caption/title.
+           * 
+ * + * string caption = 3; + * + * @param value The bytes for caption to set. + * @return This builder for chaining. + */ + public Builder setCaptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + caption_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableBlock) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableBlock) + private static final com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTableBlock + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlock(); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTableBlock + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LayoutTableBlock parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlock + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface LayoutTableRowOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+         * A table row is a list of table cells.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableCell cells = 1; + * + */ + java.util.List< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableCell> + getCellsList(); + /** + * + * + *
+         * A table row is a list of table cells.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableCell cells = 1; + * + */ + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableCell + getCells(int index); + /** + * + * + *
+         * A table row is a list of table cells.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableCell cells = 1; + * + */ + int getCellsCount(); + /** + * + * + *
+         * A table row is a list of table cells.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableCell cells = 1; + * + */ + java.util.List< + ? extends + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableCellOrBuilder> + getCellsOrBuilderList(); + /** + * + * + *
+         * A table row is a list of table cells.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableCell cells = 1; + * + */ + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableCellOrBuilder + getCellsOrBuilder(int index); + } + /** + * + * + *
+       * Represents a row in a table.
+       * 
+ * + * Protobuf type {@code + * google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow} + */ + public static final class LayoutTableRow extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow) + LayoutTableRowOrBuilder { + private static final long serialVersionUID = 0L; + // Use LayoutTableRow.newBuilder() to construct. + private LayoutTableRow(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LayoutTableRow() { + cells_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new LayoutTableRow(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_LayoutTableRow_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_LayoutTableRow_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRow.class, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRow.Builder.class); + } + + public static final int CELLS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableCell> + cells_; + /** + * + * + *
+         * A table row is a list of table cells.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableCell cells = 1; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableCell> + getCellsList() { + return cells_; + } + /** + * + * + *
+         * A table row is a list of table cells.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableCell cells = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableCellOrBuilder> + getCellsOrBuilderList() { + return cells_; + } + /** + * + * + *
+         * A table row is a list of table cells.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableCell cells = 1; + * + */ + @java.lang.Override + public int getCellsCount() { + return cells_.size(); + } + /** + * + * + *
+         * A table row is a list of table cells.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableCell cells = 1; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableCell + getCells(int index) { + return cells_.get(index); + } + /** + * + * + *
+         * A table row is a list of table cells.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableCell cells = 1; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableCellOrBuilder + getCellsOrBuilder(int index) { + return cells_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < cells_.size(); i++) { + output.writeMessage(1, cells_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < cells_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, cells_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRow)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRow + other = + (com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRow) + obj; + + if (!getCellsList().equals(other.getCellsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getCellsCount() > 0) { + hash = (37 * hash) + CELLS_FIELD_NUMBER; + hash = (53 * hash) + getCellsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTableRow + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTableRow + parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTableRow + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTableRow + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTableRow + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTableRow + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTableRow + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTableRow + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTableRow + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTableRow + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTableRow + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTableRow + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRow + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+         * Represents a row in a table.
+         * 
+ * + * Protobuf type {@code + * google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow) + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRowOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_LayoutTableRow_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_LayoutTableRow_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRow.class, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRow.Builder.class); + } + + // Construct using + // com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (cellsBuilder_ == null) { + cells_ = java.util.Collections.emptyList(); + } else { + cells_ = null; + cellsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_LayoutTableRow_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRow + getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRow.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRow + build() { + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRow + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRow + buildPartial() { + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRow + result = + new com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTableRow(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRow + result) { + if (cellsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + cells_ = java.util.Collections.unmodifiableList(cells_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.cells_ = cells_; + } else { + result.cells_ = cellsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRow + result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRow) { + return mergeFrom( + (com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRow) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRow + other) { + if (other + == com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRow.getDefaultInstance()) return this; + if (cellsBuilder_ == null) { + if (!other.cells_.isEmpty()) { + if (cells_.isEmpty()) { + cells_ = other.cells_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureCellsIsMutable(); + cells_.addAll(other.cells_); + } + onChanged(); + } + } else { + if (!other.cells_.isEmpty()) { + if (cellsBuilder_.isEmpty()) { + cellsBuilder_.dispose(); + cellsBuilder_ = null; + cells_ = other.cells_; + bitField0_ = (bitField0_ & ~0x00000001); + cellsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getCellsFieldBuilder() + : null; + } else { + cellsBuilder_.addAllMessages(other.cells_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTableCell + m = + input.readMessage( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTableCell.parser(), + extensionRegistry); + if (cellsBuilder_ == null) { + ensureCellsIsMutable(); + cells_.add(m); + } else { + cellsBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableCell> + cells_ = java.util.Collections.emptyList(); + + private void ensureCellsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + cells_ = + new java.util.ArrayList< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTableCell>(cells_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableCell, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableCell.Builder, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableCellOrBuilder> + cellsBuilder_; + + /** + * + * + *
+           * A table row is a list of table cells.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableCell cells = 1; + * + */ + public java.util.List< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableCell> + getCellsList() { + if (cellsBuilder_ == null) { + return java.util.Collections.unmodifiableList(cells_); + } else { + return cellsBuilder_.getMessageList(); + } + } + /** + * + * + *
+           * A table row is a list of table cells.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableCell cells = 1; + * + */ + public int getCellsCount() { + if (cellsBuilder_ == null) { + return cells_.size(); + } else { + return cellsBuilder_.getCount(); + } + } + /** + * + * + *
+           * A table row is a list of table cells.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableCell cells = 1; + * + */ + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableCell + getCells(int index) { + if (cellsBuilder_ == null) { + return cells_.get(index); + } else { + return cellsBuilder_.getMessage(index); + } + } + /** + * + * + *
+           * A table row is a list of table cells.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableCell cells = 1; + * + */ + public Builder setCells( + int index, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableCell + value) { + if (cellsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCellsIsMutable(); + cells_.set(index, value); + onChanged(); + } else { + cellsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+           * A table row is a list of table cells.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableCell cells = 1; + * + */ + public Builder setCells( + int index, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableCell.Builder + builderForValue) { + if (cellsBuilder_ == null) { + ensureCellsIsMutable(); + cells_.set(index, builderForValue.build()); + onChanged(); + } else { + cellsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+           * A table row is a list of table cells.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableCell cells = 1; + * + */ + public Builder addCells( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableCell + value) { + if (cellsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCellsIsMutable(); + cells_.add(value); + onChanged(); + } else { + cellsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+           * A table row is a list of table cells.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableCell cells = 1; + * + */ + public Builder addCells( + int index, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableCell + value) { + if (cellsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCellsIsMutable(); + cells_.add(index, value); + onChanged(); + } else { + cellsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+           * A table row is a list of table cells.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableCell cells = 1; + * + */ + public Builder addCells( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableCell.Builder + builderForValue) { + if (cellsBuilder_ == null) { + ensureCellsIsMutable(); + cells_.add(builderForValue.build()); + onChanged(); + } else { + cellsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+           * A table row is a list of table cells.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableCell cells = 1; + * + */ + public Builder addCells( + int index, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableCell.Builder + builderForValue) { + if (cellsBuilder_ == null) { + ensureCellsIsMutable(); + cells_.add(index, builderForValue.build()); + onChanged(); + } else { + cellsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+           * A table row is a list of table cells.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableCell cells = 1; + * + */ + public Builder addAllCells( + java.lang.Iterable< + ? extends + com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTableCell> + values) { + if (cellsBuilder_ == null) { + ensureCellsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, cells_); + onChanged(); + } else { + cellsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+           * A table row is a list of table cells.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableCell cells = 1; + * + */ + public Builder clearCells() { + if (cellsBuilder_ == null) { + cells_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + cellsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+           * A table row is a list of table cells.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableCell cells = 1; + * + */ + public Builder removeCells(int index) { + if (cellsBuilder_ == null) { + ensureCellsIsMutable(); + cells_.remove(index); + onChanged(); + } else { + cellsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+           * A table row is a list of table cells.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableCell cells = 1; + * + */ + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableCell.Builder + getCellsBuilder(int index) { + return getCellsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+           * A table row is a list of table cells.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableCell cells = 1; + * + */ + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableCellOrBuilder + getCellsOrBuilder(int index) { + if (cellsBuilder_ == null) { + return cells_.get(index); + } else { + return cellsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+           * A table row is a list of table cells.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableCell cells = 1; + * + */ + public java.util.List< + ? extends + com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTableCellOrBuilder> + getCellsOrBuilderList() { + if (cellsBuilder_ != null) { + return cellsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(cells_); + } + } + /** + * + * + *
+           * A table row is a list of table cells.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableCell cells = 1; + * + */ + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableCell.Builder + addCellsBuilder() { + return getCellsFieldBuilder() + .addBuilder( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableCell.getDefaultInstance()); + } + /** + * + * + *
+           * A table row is a list of table cells.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableCell cells = 1; + * + */ + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableCell.Builder + addCellsBuilder(int index) { + return getCellsFieldBuilder() + .addBuilder( + index, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableCell.getDefaultInstance()); + } + /** + * + * + *
+           * A table row is a list of table cells.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableCell cells = 1; + * + */ + public java.util.List< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableCell.Builder> + getCellsBuilderList() { + return getCellsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableCell, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableCell.Builder, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableCellOrBuilder> + getCellsFieldBuilder() { + if (cellsBuilder_ == null) { + cellsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTableCell, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTableCell.Builder, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTableCellOrBuilder>( + cells_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + cells_ = null; + } + return cellsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow) + private static final com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTableRow + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRow(); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTableRow + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LayoutTableRow parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableRow + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface LayoutTableCellOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableCell) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+         * A table cell is a list of blocks.
+         * Repeated blocks support further hierarchies and nested blocks.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + java.util.List< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock> + getBlocksList(); + /** + * + * + *
+         * A table cell is a list of blocks.
+         * Repeated blocks support further hierarchies and nested blocks.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock getBlocks( + int index); + /** + * + * + *
+         * A table cell is a list of blocks.
+         * Repeated blocks support further hierarchies and nested blocks.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + int getBlocksCount(); + /** + * + * + *
+         * A table cell is a list of blocks.
+         * Repeated blocks support further hierarchies and nested blocks.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + java.util.List< + ? extends + com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlockOrBuilder> + getBlocksOrBuilderList(); + /** + * + * + *
+         * A table cell is a list of blocks.
+         * Repeated blocks support further hierarchies and nested blocks.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlockOrBuilder + getBlocksOrBuilder(int index); + + /** + * + * + *
+         * How many rows this cell spans.
+         * 
+ * + * int32 row_span = 2; + * + * @return The rowSpan. + */ + int getRowSpan(); + + /** + * + * + *
+         * How many columns this cell spans.
+         * 
+ * + * int32 col_span = 3; + * + * @return The colSpan. + */ + int getColSpan(); + } + /** + * + * + *
+       * Represents a cell in a table row.
+       * 
+ * + * Protobuf type {@code + * google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableCell} + */ + public static final class LayoutTableCell extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableCell) + LayoutTableCellOrBuilder { + private static final long serialVersionUID = 0L; + // Use LayoutTableCell.newBuilder() to construct. + private LayoutTableCell(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LayoutTableCell() { + blocks_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new LayoutTableCell(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_LayoutTableCell_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_LayoutTableCell_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableCell.class, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableCell.Builder.class); + } + + public static final int BLOCKS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock> + blocks_; + /** + * + * + *
+         * A table cell is a list of blocks.
+         * Repeated blocks support further hierarchies and nested blocks.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock> + getBlocksList() { + return blocks_; + } + /** + * + * + *
+         * A table cell is a list of blocks.
+         * Repeated blocks support further hierarchies and nested blocks.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlockOrBuilder> + getBlocksOrBuilderList() { + return blocks_; + } + /** + * + * + *
+         * A table cell is a list of blocks.
+         * Repeated blocks support further hierarchies and nested blocks.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + @java.lang.Override + public int getBlocksCount() { + return blocks_.size(); + } + /** + * + * + *
+         * A table cell is a list of blocks.
+         * Repeated blocks support further hierarchies and nested blocks.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + getBlocks(int index) { + return blocks_.get(index); + } + /** + * + * + *
+         * A table cell is a list of blocks.
+         * Repeated blocks support further hierarchies and nested blocks.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlockOrBuilder + getBlocksOrBuilder(int index) { + return blocks_.get(index); + } + + public static final int ROW_SPAN_FIELD_NUMBER = 2; + private int rowSpan_ = 0; + /** + * + * + *
+         * How many rows this cell spans.
+         * 
+ * + * int32 row_span = 2; + * + * @return The rowSpan. + */ + @java.lang.Override + public int getRowSpan() { + return rowSpan_; + } + + public static final int COL_SPAN_FIELD_NUMBER = 3; + private int colSpan_ = 0; + /** + * + * + *
+         * How many columns this cell spans.
+         * 
+ * + * int32 col_span = 3; + * + * @return The colSpan. + */ + @java.lang.Override + public int getColSpan() { + return colSpan_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < blocks_.size(); i++) { + output.writeMessage(1, blocks_.get(i)); + } + if (rowSpan_ != 0) { + output.writeInt32(2, rowSpan_); + } + if (colSpan_ != 0) { + output.writeInt32(3, colSpan_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < blocks_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, blocks_.get(i)); + } + if (rowSpan_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, rowSpan_); + } + if (colSpan_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, colSpan_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableCell)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableCell + other = + (com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableCell) + obj; + + if (!getBlocksList().equals(other.getBlocksList())) return false; + if (getRowSpan() != other.getRowSpan()) return false; + if (getColSpan() != other.getColSpan()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getBlocksCount() > 0) { + hash = (37 * hash) + BLOCKS_FIELD_NUMBER; + hash = (53 * hash) + getBlocksList().hashCode(); + } + hash = (37 * hash) + ROW_SPAN_FIELD_NUMBER; + hash = (53 * hash) + getRowSpan(); + hash = (37 * hash) + COL_SPAN_FIELD_NUMBER; + hash = (53 * hash) + getColSpan(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTableCell + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTableCell + parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTableCell + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTableCell + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTableCell + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTableCell + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTableCell + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTableCell + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTableCell + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTableCell + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTableCell + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTableCell + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableCell + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+         * Represents a cell in a table row.
+         * 
+ * + * Protobuf type {@code + * google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableCell} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableCell) + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableCellOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_LayoutTableCell_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_LayoutTableCell_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableCell.class, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableCell.Builder.class); + } + + // Construct using + // com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableCell.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (blocksBuilder_ == null) { + blocks_ = java.util.Collections.emptyList(); + } else { + blocks_ = null; + blocksBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + rowSpan_ = 0; + colSpan_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_LayoutTableCell_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableCell + getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableCell.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableCell + build() { + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableCell + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableCell + buildPartial() { + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableCell + result = + new com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTableCell(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableCell + result) { + if (blocksBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + blocks_ = java.util.Collections.unmodifiableList(blocks_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.blocks_ = blocks_; + } else { + result.blocks_ = blocksBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableCell + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.rowSpan_ = rowSpan_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.colSpan_ = colSpan_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableCell) { + return mergeFrom( + (com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableCell) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableCell + other) { + if (other + == com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableCell.getDefaultInstance()) return this; + if (blocksBuilder_ == null) { + if (!other.blocks_.isEmpty()) { + if (blocks_.isEmpty()) { + blocks_ = other.blocks_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureBlocksIsMutable(); + blocks_.addAll(other.blocks_); + } + onChanged(); + } + } else { + if (!other.blocks_.isEmpty()) { + if (blocksBuilder_.isEmpty()) { + blocksBuilder_.dispose(); + blocksBuilder_ = null; + blocks_ = other.blocks_; + bitField0_ = (bitField0_ & ~0x00000001); + blocksBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getBlocksFieldBuilder() + : null; + } else { + blocksBuilder_.addAllMessages(other.blocks_); + } + } + } + if (other.getRowSpan() != 0) { + setRowSpan(other.getRowSpan()); + } + if (other.getColSpan() != 0) { + setColSpan(other.getColSpan()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock + m = + input.readMessage( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.parser(), + extensionRegistry); + if (blocksBuilder_ == null) { + ensureBlocksIsMutable(); + blocks_.add(m); + } else { + blocksBuilder_.addMessage(m); + } + break; + } // case 10 + case 16: + { + rowSpan_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + colSpan_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock> + blocks_ = java.util.Collections.emptyList(); + + private void ensureBlocksIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + blocks_ = + new java.util.ArrayList< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock>(blocks_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .Builder, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlockOrBuilder> + blocksBuilder_; + + /** + * + * + *
+           * A table cell is a list of blocks.
+           * Repeated blocks support further hierarchies and nested blocks.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + public java.util.List< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock> + getBlocksList() { + if (blocksBuilder_ == null) { + return java.util.Collections.unmodifiableList(blocks_); + } else { + return blocksBuilder_.getMessageList(); + } + } + /** + * + * + *
+           * A table cell is a list of blocks.
+           * Repeated blocks support further hierarchies and nested blocks.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + public int getBlocksCount() { + if (blocksBuilder_ == null) { + return blocks_.size(); + } else { + return blocksBuilder_.getCount(); + } + } + /** + * + * + *
+           * A table cell is a list of blocks.
+           * Repeated blocks support further hierarchies and nested blocks.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + getBlocks(int index) { + if (blocksBuilder_ == null) { + return blocks_.get(index); + } else { + return blocksBuilder_.getMessage(index); + } + } + /** + * + * + *
+           * A table cell is a list of blocks.
+           * Repeated blocks support further hierarchies and nested blocks.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + public Builder setBlocks( + int index, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + value) { + if (blocksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBlocksIsMutable(); + blocks_.set(index, value); + onChanged(); + } else { + blocksBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+           * A table cell is a list of blocks.
+           * Repeated blocks support further hierarchies and nested blocks.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + public Builder setBlocks( + int index, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .Builder + builderForValue) { + if (blocksBuilder_ == null) { + ensureBlocksIsMutable(); + blocks_.set(index, builderForValue.build()); + onChanged(); + } else { + blocksBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+           * A table cell is a list of blocks.
+           * Repeated blocks support further hierarchies and nested blocks.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + public Builder addBlocks( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + value) { + if (blocksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBlocksIsMutable(); + blocks_.add(value); + onChanged(); + } else { + blocksBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+           * A table cell is a list of blocks.
+           * Repeated blocks support further hierarchies and nested blocks.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + public Builder addBlocks( + int index, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + value) { + if (blocksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBlocksIsMutable(); + blocks_.add(index, value); + onChanged(); + } else { + blocksBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+           * A table cell is a list of blocks.
+           * Repeated blocks support further hierarchies and nested blocks.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + public Builder addBlocks( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .Builder + builderForValue) { + if (blocksBuilder_ == null) { + ensureBlocksIsMutable(); + blocks_.add(builderForValue.build()); + onChanged(); + } else { + blocksBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+           * A table cell is a list of blocks.
+           * Repeated blocks support further hierarchies and nested blocks.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + public Builder addBlocks( + int index, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .Builder + builderForValue) { + if (blocksBuilder_ == null) { + ensureBlocksIsMutable(); + blocks_.add(index, builderForValue.build()); + onChanged(); + } else { + blocksBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+           * A table cell is a list of blocks.
+           * Repeated blocks support further hierarchies and nested blocks.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + public Builder addAllBlocks( + java.lang.Iterable< + ? extends + com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock> + values) { + if (blocksBuilder_ == null) { + ensureBlocksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, blocks_); + onChanged(); + } else { + blocksBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+           * A table cell is a list of blocks.
+           * Repeated blocks support further hierarchies and nested blocks.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + public Builder clearBlocks() { + if (blocksBuilder_ == null) { + blocks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + blocksBuilder_.clear(); + } + return this; + } + /** + * + * + *
+           * A table cell is a list of blocks.
+           * Repeated blocks support further hierarchies and nested blocks.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + public Builder removeBlocks(int index) { + if (blocksBuilder_ == null) { + ensureBlocksIsMutable(); + blocks_.remove(index); + onChanged(); + } else { + blocksBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+           * A table cell is a list of blocks.
+           * Repeated blocks support further hierarchies and nested blocks.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .Builder + getBlocksBuilder(int index) { + return getBlocksFieldBuilder().getBuilder(index); + } + /** + * + * + *
+           * A table cell is a list of blocks.
+           * Repeated blocks support further hierarchies and nested blocks.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlockOrBuilder + getBlocksOrBuilder(int index) { + if (blocksBuilder_ == null) { + return blocks_.get(index); + } else { + return blocksBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+           * A table cell is a list of blocks.
+           * Repeated blocks support further hierarchies and nested blocks.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + public java.util.List< + ? extends + com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlockOrBuilder> + getBlocksOrBuilderList() { + if (blocksBuilder_ != null) { + return blocksBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(blocks_); + } + } + /** + * + * + *
+           * A table cell is a list of blocks.
+           * Repeated blocks support further hierarchies and nested blocks.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .Builder + addBlocksBuilder() { + return getBlocksFieldBuilder() + .addBuilder( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .getDefaultInstance()); + } + /** + * + * + *
+           * A table cell is a list of blocks.
+           * Repeated blocks support further hierarchies and nested blocks.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .Builder + addBlocksBuilder(int index) { + return getBlocksFieldBuilder() + .addBuilder( + index, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .getDefaultInstance()); + } + /** + * + * + *
+           * A table cell is a list of blocks.
+           * Repeated blocks support further hierarchies and nested blocks.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + public java.util.List< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .Builder> + getBlocksBuilderList() { + return getBlocksFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .Builder, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlockOrBuilder> + getBlocksFieldBuilder() { + if (blocksBuilder_ == null) { + blocksBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.Builder, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlockOrBuilder>( + blocks_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + blocks_ = null; + } + return blocksBuilder_; + } + + private int rowSpan_; + /** + * + * + *
+           * How many rows this cell spans.
+           * 
+ * + * int32 row_span = 2; + * + * @return The rowSpan. + */ + @java.lang.Override + public int getRowSpan() { + return rowSpan_; + } + /** + * + * + *
+           * How many rows this cell spans.
+           * 
+ * + * int32 row_span = 2; + * + * @param value The rowSpan to set. + * @return This builder for chaining. + */ + public Builder setRowSpan(int value) { + + rowSpan_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+           * How many rows this cell spans.
+           * 
+ * + * int32 row_span = 2; + * + * @return This builder for chaining. + */ + public Builder clearRowSpan() { + bitField0_ = (bitField0_ & ~0x00000002); + rowSpan_ = 0; + onChanged(); + return this; + } + + private int colSpan_; + /** + * + * + *
+           * How many columns this cell spans.
+           * 
+ * + * int32 col_span = 3; + * + * @return The colSpan. + */ + @java.lang.Override + public int getColSpan() { + return colSpan_; + } + /** + * + * + *
+           * How many columns this cell spans.
+           * 
+ * + * int32 col_span = 3; + * + * @param value The colSpan to set. + * @return This builder for chaining. + */ + public Builder setColSpan(int value) { + + colSpan_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+           * How many columns this cell spans.
+           * 
+ * + * int32 col_span = 3; + * + * @return This builder for chaining. + */ + public Builder clearColSpan() { + bitField0_ = (bitField0_ & ~0x00000004); + colSpan_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableCell) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableCell) + private static final com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTableCell + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableCell(); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTableCell + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LayoutTableCell parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableCell + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface LayoutListBlockOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutListBlock) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+         * List entries that constitute a list block.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutListEntry list_entries = 1; + * + */ + java.util.List< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListEntry> + getListEntriesList(); + /** + * + * + *
+         * List entries that constitute a list block.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutListEntry list_entries = 1; + * + */ + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListEntry + getListEntries(int index); + /** + * + * + *
+         * List entries that constitute a list block.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutListEntry list_entries = 1; + * + */ + int getListEntriesCount(); + /** + * + * + *
+         * List entries that constitute a list block.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutListEntry list_entries = 1; + * + */ + java.util.List< + ? extends + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListEntryOrBuilder> + getListEntriesOrBuilderList(); + /** + * + * + *
+         * List entries that constitute a list block.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutListEntry list_entries = 1; + * + */ + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListEntryOrBuilder + getListEntriesOrBuilder(int index); + + /** + * + * + *
+         * Type of the list_entries (if exist). Available options are `ordered`
+         * and `unordered`.
+         * 
+ * + * string type = 2; + * + * @return The type. + */ + java.lang.String getType(); + /** + * + * + *
+         * Type of the list_entries (if exist). Available options are `ordered`
+         * and `unordered`.
+         * 
+ * + * string type = 2; + * + * @return The bytes for type. + */ + com.google.protobuf.ByteString getTypeBytes(); + } + /** + * + * + *
+       * Represents a list type block.
+       * 
+ * + * Protobuf type {@code + * google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutListBlock} + */ + public static final class LayoutListBlock extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutListBlock) + LayoutListBlockOrBuilder { + private static final long serialVersionUID = 0L; + // Use LayoutListBlock.newBuilder() to construct. + private LayoutListBlock(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LayoutListBlock() { + listEntries_ = java.util.Collections.emptyList(); + type_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new LayoutListBlock(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_LayoutListBlock_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_LayoutListBlock_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlock.class, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlock.Builder.class); + } + + public static final int LIST_ENTRIES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListEntry> + listEntries_; + /** + * + * + *
+         * List entries that constitute a list block.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutListEntry list_entries = 1; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListEntry> + getListEntriesList() { + return listEntries_; + } + /** + * + * + *
+         * List entries that constitute a list block.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutListEntry list_entries = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListEntryOrBuilder> + getListEntriesOrBuilderList() { + return listEntries_; + } + /** + * + * + *
+         * List entries that constitute a list block.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutListEntry list_entries = 1; + * + */ + @java.lang.Override + public int getListEntriesCount() { + return listEntries_.size(); + } + /** + * + * + *
+         * List entries that constitute a list block.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutListEntry list_entries = 1; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListEntry + getListEntries(int index) { + return listEntries_.get(index); + } + /** + * + * + *
+         * List entries that constitute a list block.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutListEntry list_entries = 1; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListEntryOrBuilder + getListEntriesOrBuilder(int index) { + return listEntries_.get(index); + } + + public static final int TYPE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object type_ = ""; + /** + * + * + *
+         * Type of the list_entries (if exist). Available options are `ordered`
+         * and `unordered`.
+         * 
+ * + * string type = 2; + * + * @return The type. + */ + @java.lang.Override + public java.lang.String getType() { + java.lang.Object ref = type_; + 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(); + type_ = s; + return s; + } + } + /** + * + * + *
+         * Type of the list_entries (if exist). Available options are `ordered`
+         * and `unordered`.
+         * 
+ * + * string type = 2; + * + * @return The bytes for type. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < listEntries_.size(); i++) { + output.writeMessage(1, listEntries_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, type_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < listEntries_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, listEntries_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, type_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlock)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlock + other = + (com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlock) + obj; + + if (!getListEntriesList().equals(other.getListEntriesList())) return false; + if (!getType().equals(other.getType())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getListEntriesCount() > 0) { + hash = (37 * hash) + LIST_ENTRIES_FIELD_NUMBER; + hash = (53 * hash) + getListEntriesList().hashCode(); + } + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutListBlock + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutListBlock + parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutListBlock + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutListBlock + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutListBlock + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutListBlock + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutListBlock + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutListBlock + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutListBlock + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutListBlock + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutListBlock + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutListBlock + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlock + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+         * Represents a list type block.
+         * 
+ * + * Protobuf type {@code + * google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutListBlock} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutListBlock) + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlockOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_LayoutListBlock_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_LayoutListBlock_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlock.class, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlock.Builder.class); + } + + // Construct using + // com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutListBlock.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (listEntriesBuilder_ == null) { + listEntries_ = java.util.Collections.emptyList(); + } else { + listEntries_ = null; + listEntriesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + type_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_LayoutListBlock_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlock + getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlock.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlock + build() { + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlock + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlock + buildPartial() { + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlock + result = + new com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutListBlock(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlock + result) { + if (listEntriesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + listEntries_ = java.util.Collections.unmodifiableList(listEntries_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.listEntries_ = listEntries_; + } else { + result.listEntries_ = listEntriesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlock + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.type_ = type_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlock) { + return mergeFrom( + (com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlock) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlock + other) { + if (other + == com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlock.getDefaultInstance()) return this; + if (listEntriesBuilder_ == null) { + if (!other.listEntries_.isEmpty()) { + if (listEntries_.isEmpty()) { + listEntries_ = other.listEntries_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureListEntriesIsMutable(); + listEntries_.addAll(other.listEntries_); + } + onChanged(); + } + } else { + if (!other.listEntries_.isEmpty()) { + if (listEntriesBuilder_.isEmpty()) { + listEntriesBuilder_.dispose(); + listEntriesBuilder_ = null; + listEntries_ = other.listEntries_; + bitField0_ = (bitField0_ & ~0x00000001); + listEntriesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getListEntriesFieldBuilder() + : null; + } else { + listEntriesBuilder_.addAllMessages(other.listEntries_); + } + } + } + if (!other.getType().isEmpty()) { + type_ = other.type_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutListEntry + m = + input.readMessage( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutListEntry.parser(), + extensionRegistry); + if (listEntriesBuilder_ == null) { + ensureListEntriesIsMutable(); + listEntries_.add(m); + } else { + listEntriesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + type_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListEntry> + listEntries_ = java.util.Collections.emptyList(); + + private void ensureListEntriesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + listEntries_ = + new java.util.ArrayList< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutListEntry>(listEntries_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListEntry, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListEntry.Builder, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListEntryOrBuilder> + listEntriesBuilder_; + + /** + * + * + *
+           * List entries that constitute a list block.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutListEntry list_entries = 1; + * + */ + public java.util.List< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListEntry> + getListEntriesList() { + if (listEntriesBuilder_ == null) { + return java.util.Collections.unmodifiableList(listEntries_); + } else { + return listEntriesBuilder_.getMessageList(); + } + } + /** + * + * + *
+           * List entries that constitute a list block.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutListEntry list_entries = 1; + * + */ + public int getListEntriesCount() { + if (listEntriesBuilder_ == null) { + return listEntries_.size(); + } else { + return listEntriesBuilder_.getCount(); + } + } + /** + * + * + *
+           * List entries that constitute a list block.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutListEntry list_entries = 1; + * + */ + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListEntry + getListEntries(int index) { + if (listEntriesBuilder_ == null) { + return listEntries_.get(index); + } else { + return listEntriesBuilder_.getMessage(index); + } + } + /** + * + * + *
+           * List entries that constitute a list block.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutListEntry list_entries = 1; + * + */ + public Builder setListEntries( + int index, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListEntry + value) { + if (listEntriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureListEntriesIsMutable(); + listEntries_.set(index, value); + onChanged(); + } else { + listEntriesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+           * List entries that constitute a list block.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutListEntry list_entries = 1; + * + */ + public Builder setListEntries( + int index, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListEntry.Builder + builderForValue) { + if (listEntriesBuilder_ == null) { + ensureListEntriesIsMutable(); + listEntries_.set(index, builderForValue.build()); + onChanged(); + } else { + listEntriesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+           * List entries that constitute a list block.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutListEntry list_entries = 1; + * + */ + public Builder addListEntries( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListEntry + value) { + if (listEntriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureListEntriesIsMutable(); + listEntries_.add(value); + onChanged(); + } else { + listEntriesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+           * List entries that constitute a list block.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutListEntry list_entries = 1; + * + */ + public Builder addListEntries( + int index, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListEntry + value) { + if (listEntriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureListEntriesIsMutable(); + listEntries_.add(index, value); + onChanged(); + } else { + listEntriesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+           * List entries that constitute a list block.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutListEntry list_entries = 1; + * + */ + public Builder addListEntries( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListEntry.Builder + builderForValue) { + if (listEntriesBuilder_ == null) { + ensureListEntriesIsMutable(); + listEntries_.add(builderForValue.build()); + onChanged(); + } else { + listEntriesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+           * List entries that constitute a list block.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutListEntry list_entries = 1; + * + */ + public Builder addListEntries( + int index, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListEntry.Builder + builderForValue) { + if (listEntriesBuilder_ == null) { + ensureListEntriesIsMutable(); + listEntries_.add(index, builderForValue.build()); + onChanged(); + } else { + listEntriesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+           * List entries that constitute a list block.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutListEntry list_entries = 1; + * + */ + public Builder addAllListEntries( + java.lang.Iterable< + ? extends + com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutListEntry> + values) { + if (listEntriesBuilder_ == null) { + ensureListEntriesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, listEntries_); + onChanged(); + } else { + listEntriesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+           * List entries that constitute a list block.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutListEntry list_entries = 1; + * + */ + public Builder clearListEntries() { + if (listEntriesBuilder_ == null) { + listEntries_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + listEntriesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+           * List entries that constitute a list block.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutListEntry list_entries = 1; + * + */ + public Builder removeListEntries(int index) { + if (listEntriesBuilder_ == null) { + ensureListEntriesIsMutable(); + listEntries_.remove(index); + onChanged(); + } else { + listEntriesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+           * List entries that constitute a list block.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutListEntry list_entries = 1; + * + */ + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListEntry.Builder + getListEntriesBuilder(int index) { + return getListEntriesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+           * List entries that constitute a list block.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutListEntry list_entries = 1; + * + */ + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListEntryOrBuilder + getListEntriesOrBuilder(int index) { + if (listEntriesBuilder_ == null) { + return listEntries_.get(index); + } else { + return listEntriesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+           * List entries that constitute a list block.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutListEntry list_entries = 1; + * + */ + public java.util.List< + ? extends + com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutListEntryOrBuilder> + getListEntriesOrBuilderList() { + if (listEntriesBuilder_ != null) { + return listEntriesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(listEntries_); + } + } + /** + * + * + *
+           * List entries that constitute a list block.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutListEntry list_entries = 1; + * + */ + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListEntry.Builder + addListEntriesBuilder() { + return getListEntriesFieldBuilder() + .addBuilder( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListEntry.getDefaultInstance()); + } + /** + * + * + *
+           * List entries that constitute a list block.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutListEntry list_entries = 1; + * + */ + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListEntry.Builder + addListEntriesBuilder(int index) { + return getListEntriesFieldBuilder() + .addBuilder( + index, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListEntry.getDefaultInstance()); + } + /** + * + * + *
+           * List entries that constitute a list block.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutListEntry list_entries = 1; + * + */ + public java.util.List< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListEntry.Builder> + getListEntriesBuilderList() { + return getListEntriesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListEntry, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListEntry.Builder, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListEntryOrBuilder> + getListEntriesFieldBuilder() { + if (listEntriesBuilder_ == null) { + listEntriesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutListEntry, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutListEntry.Builder, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutListEntryOrBuilder>( + listEntries_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + listEntries_ = null; + } + return listEntriesBuilder_; + } + + private java.lang.Object type_ = ""; + /** + * + * + *
+           * Type of the list_entries (if exist). Available options are `ordered`
+           * and `unordered`.
+           * 
+ * + * string type = 2; + * + * @return The type. + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+           * Type of the list_entries (if exist). Available options are `ordered`
+           * and `unordered`.
+           * 
+ * + * string type = 2; + * + * @return The bytes for type. + */ + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+           * Type of the list_entries (if exist). Available options are `ordered`
+           * and `unordered`.
+           * 
+ * + * string type = 2; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+           * Type of the list_entries (if exist). Available options are `ordered`
+           * and `unordered`.
+           * 
+ * + * string type = 2; + * + * @return This builder for chaining. + */ + public Builder clearType() { + type_ = getDefaultInstance().getType(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+           * Type of the list_entries (if exist). Available options are `ordered`
+           * and `unordered`.
+           * 
+ * + * string type = 2; + * + * @param value The bytes for type to set. + * @return This builder for chaining. + */ + public Builder setTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + type_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutListBlock) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutListBlock) + private static final com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutListBlock + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlock(); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutListBlock + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LayoutListBlock parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlock + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface LayoutListEntryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutListEntry) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+         * A list entry is a list of blocks.
+         * Repeated blocks support further hierarchies and nested blocks.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + java.util.List< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock> + getBlocksList(); + /** + * + * + *
+         * A list entry is a list of blocks.
+         * Repeated blocks support further hierarchies and nested blocks.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock getBlocks( + int index); + /** + * + * + *
+         * A list entry is a list of blocks.
+         * Repeated blocks support further hierarchies and nested blocks.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + int getBlocksCount(); + /** + * + * + *
+         * A list entry is a list of blocks.
+         * Repeated blocks support further hierarchies and nested blocks.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + java.util.List< + ? extends + com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlockOrBuilder> + getBlocksOrBuilderList(); + /** + * + * + *
+         * A list entry is a list of blocks.
+         * Repeated blocks support further hierarchies and nested blocks.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlockOrBuilder + getBlocksOrBuilder(int index); + } + /** + * + * + *
+       * Represents an entry in the list.
+       * 
+ * + * Protobuf type {@code + * google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutListEntry} + */ + public static final class LayoutListEntry extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutListEntry) + LayoutListEntryOrBuilder { + private static final long serialVersionUID = 0L; + // Use LayoutListEntry.newBuilder() to construct. + private LayoutListEntry(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LayoutListEntry() { + blocks_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new LayoutListEntry(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_LayoutListEntry_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_LayoutListEntry_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListEntry.class, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListEntry.Builder.class); + } + + public static final int BLOCKS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock> + blocks_; + /** + * + * + *
+         * A list entry is a list of blocks.
+         * Repeated blocks support further hierarchies and nested blocks.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock> + getBlocksList() { + return blocks_; + } + /** + * + * + *
+         * A list entry is a list of blocks.
+         * Repeated blocks support further hierarchies and nested blocks.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlockOrBuilder> + getBlocksOrBuilderList() { + return blocks_; + } + /** + * + * + *
+         * A list entry is a list of blocks.
+         * Repeated blocks support further hierarchies and nested blocks.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + @java.lang.Override + public int getBlocksCount() { + return blocks_.size(); + } + /** + * + * + *
+         * A list entry is a list of blocks.
+         * Repeated blocks support further hierarchies and nested blocks.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + getBlocks(int index) { + return blocks_.get(index); + } + /** + * + * + *
+         * A list entry is a list of blocks.
+         * Repeated blocks support further hierarchies and nested blocks.
+         * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlockOrBuilder + getBlocksOrBuilder(int index) { + return blocks_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < blocks_.size(); i++) { + output.writeMessage(1, blocks_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < blocks_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, blocks_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListEntry)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListEntry + other = + (com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListEntry) + obj; + + if (!getBlocksList().equals(other.getBlocksList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getBlocksCount() > 0) { + hash = (37 * hash) + BLOCKS_FIELD_NUMBER; + hash = (53 * hash) + getBlocksList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutListEntry + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutListEntry + parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutListEntry + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutListEntry + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutListEntry + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutListEntry + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutListEntry + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutListEntry + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutListEntry + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutListEntry + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutListEntry + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutListEntry + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListEntry + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+         * Represents an entry in the list.
+         * 
+ * + * Protobuf type {@code + * google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutListEntry} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutListEntry) + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListEntryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_LayoutListEntry_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_LayoutListEntry_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListEntry.class, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListEntry.Builder.class); + } + + // Construct using + // com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutListEntry.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (blocksBuilder_ == null) { + blocks_ = java.util.Collections.emptyList(); + } else { + blocks_ = null; + blocksBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_LayoutListEntry_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListEntry + getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListEntry.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListEntry + build() { + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListEntry + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListEntry + buildPartial() { + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListEntry + result = + new com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutListEntry(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListEntry + result) { + if (blocksBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + blocks_ = java.util.Collections.unmodifiableList(blocks_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.blocks_ = blocks_; + } else { + result.blocks_ = blocksBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListEntry + result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListEntry) { + return mergeFrom( + (com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListEntry) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListEntry + other) { + if (other + == com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListEntry.getDefaultInstance()) return this; + if (blocksBuilder_ == null) { + if (!other.blocks_.isEmpty()) { + if (blocks_.isEmpty()) { + blocks_ = other.blocks_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureBlocksIsMutable(); + blocks_.addAll(other.blocks_); + } + onChanged(); + } + } else { + if (!other.blocks_.isEmpty()) { + if (blocksBuilder_.isEmpty()) { + blocksBuilder_.dispose(); + blocksBuilder_ = null; + blocks_ = other.blocks_; + bitField0_ = (bitField0_ & ~0x00000001); + blocksBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getBlocksFieldBuilder() + : null; + } else { + blocksBuilder_.addAllMessages(other.blocks_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock + m = + input.readMessage( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.parser(), + extensionRegistry); + if (blocksBuilder_ == null) { + ensureBlocksIsMutable(); + blocks_.add(m); + } else { + blocksBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock> + blocks_ = java.util.Collections.emptyList(); + + private void ensureBlocksIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + blocks_ = + new java.util.ArrayList< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock>(blocks_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .Builder, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlockOrBuilder> + blocksBuilder_; + + /** + * + * + *
+           * A list entry is a list of blocks.
+           * Repeated blocks support further hierarchies and nested blocks.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + public java.util.List< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock> + getBlocksList() { + if (blocksBuilder_ == null) { + return java.util.Collections.unmodifiableList(blocks_); + } else { + return blocksBuilder_.getMessageList(); + } + } + /** + * + * + *
+           * A list entry is a list of blocks.
+           * Repeated blocks support further hierarchies and nested blocks.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + public int getBlocksCount() { + if (blocksBuilder_ == null) { + return blocks_.size(); + } else { + return blocksBuilder_.getCount(); + } + } + /** + * + * + *
+           * A list entry is a list of blocks.
+           * Repeated blocks support further hierarchies and nested blocks.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + getBlocks(int index) { + if (blocksBuilder_ == null) { + return blocks_.get(index); + } else { + return blocksBuilder_.getMessage(index); + } + } + /** + * + * + *
+           * A list entry is a list of blocks.
+           * Repeated blocks support further hierarchies and nested blocks.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + public Builder setBlocks( + int index, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + value) { + if (blocksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBlocksIsMutable(); + blocks_.set(index, value); + onChanged(); + } else { + blocksBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+           * A list entry is a list of blocks.
+           * Repeated blocks support further hierarchies and nested blocks.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + public Builder setBlocks( + int index, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .Builder + builderForValue) { + if (blocksBuilder_ == null) { + ensureBlocksIsMutable(); + blocks_.set(index, builderForValue.build()); + onChanged(); + } else { + blocksBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+           * A list entry is a list of blocks.
+           * Repeated blocks support further hierarchies and nested blocks.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + public Builder addBlocks( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + value) { + if (blocksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBlocksIsMutable(); + blocks_.add(value); + onChanged(); + } else { + blocksBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+           * A list entry is a list of blocks.
+           * Repeated blocks support further hierarchies and nested blocks.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + public Builder addBlocks( + int index, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + value) { + if (blocksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBlocksIsMutable(); + blocks_.add(index, value); + onChanged(); + } else { + blocksBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+           * A list entry is a list of blocks.
+           * Repeated blocks support further hierarchies and nested blocks.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + public Builder addBlocks( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .Builder + builderForValue) { + if (blocksBuilder_ == null) { + ensureBlocksIsMutable(); + blocks_.add(builderForValue.build()); + onChanged(); + } else { + blocksBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+           * A list entry is a list of blocks.
+           * Repeated blocks support further hierarchies and nested blocks.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + public Builder addBlocks( + int index, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .Builder + builderForValue) { + if (blocksBuilder_ == null) { + ensureBlocksIsMutable(); + blocks_.add(index, builderForValue.build()); + onChanged(); + } else { + blocksBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+           * A list entry is a list of blocks.
+           * Repeated blocks support further hierarchies and nested blocks.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + public Builder addAllBlocks( + java.lang.Iterable< + ? extends + com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock> + values) { + if (blocksBuilder_ == null) { + ensureBlocksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, blocks_); + onChanged(); + } else { + blocksBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+           * A list entry is a list of blocks.
+           * Repeated blocks support further hierarchies and nested blocks.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + public Builder clearBlocks() { + if (blocksBuilder_ == null) { + blocks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + blocksBuilder_.clear(); + } + return this; + } + /** + * + * + *
+           * A list entry is a list of blocks.
+           * Repeated blocks support further hierarchies and nested blocks.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + public Builder removeBlocks(int index) { + if (blocksBuilder_ == null) { + ensureBlocksIsMutable(); + blocks_.remove(index); + onChanged(); + } else { + blocksBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+           * A list entry is a list of blocks.
+           * Repeated blocks support further hierarchies and nested blocks.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .Builder + getBlocksBuilder(int index) { + return getBlocksFieldBuilder().getBuilder(index); + } + /** + * + * + *
+           * A list entry is a list of blocks.
+           * Repeated blocks support further hierarchies and nested blocks.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlockOrBuilder + getBlocksOrBuilder(int index) { + if (blocksBuilder_ == null) { + return blocks_.get(index); + } else { + return blocksBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+           * A list entry is a list of blocks.
+           * Repeated blocks support further hierarchies and nested blocks.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + public java.util.List< + ? extends + com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlockOrBuilder> + getBlocksOrBuilderList() { + if (blocksBuilder_ != null) { + return blocksBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(blocks_); + } + } + /** + * + * + *
+           * A list entry is a list of blocks.
+           * Repeated blocks support further hierarchies and nested blocks.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .Builder + addBlocksBuilder() { + return getBlocksFieldBuilder() + .addBuilder( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .getDefaultInstance()); + } + /** + * + * + *
+           * A list entry is a list of blocks.
+           * Repeated blocks support further hierarchies and nested blocks.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .Builder + addBlocksBuilder(int index) { + return getBlocksFieldBuilder() + .addBuilder( + index, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .getDefaultInstance()); + } + /** + * + * + *
+           * A list entry is a list of blocks.
+           * Repeated blocks support further hierarchies and nested blocks.
+           * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + public java.util.List< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .Builder> + getBlocksBuilderList() { + return getBlocksFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .Builder, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlockOrBuilder> + getBlocksFieldBuilder() { + if (blocksBuilder_ == null) { + blocksBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.Builder, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlockOrBuilder>( + blocks_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + blocks_ = null; + } + return blocksBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutListEntry) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutListEntry) + private static final com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutListEntry + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListEntry(); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutListEntry + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LayoutListEntry parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListEntry + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + private int blockCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object block_; + + public enum BlockCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + TEXT_BLOCK(2), + TABLE_BLOCK(3), + LIST_BLOCK(4), + BLOCK_NOT_SET(0); + private final int value; + + private BlockCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static BlockCase valueOf(int value) { + return forNumber(value); + } + + public static BlockCase forNumber(int value) { + switch (value) { + case 2: + return TEXT_BLOCK; + case 3: + return TABLE_BLOCK; + case 4: + return LIST_BLOCK; + case 0: + return BLOCK_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public BlockCase getBlockCase() { + return BlockCase.forNumber(blockCase_); + } + + public static final int TEXT_BLOCK_FIELD_NUMBER = 2; + /** + * + * + *
+       * Block consisting of text content.
+       * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTextBlock text_block = 2; + * + * + * @return Whether the textBlock field is set. + */ + @java.lang.Override + public boolean hasTextBlock() { + return blockCase_ == 2; + } + /** + * + * + *
+       * Block consisting of text content.
+       * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTextBlock text_block = 2; + * + * + * @return The textBlock. + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlock + getTextBlock() { + if (blockCase_ == 2) { + return (com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlock) + block_; + } + return com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlock.getDefaultInstance(); + } + /** + * + * + *
+       * Block consisting of text content.
+       * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTextBlock text_block = 2; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlockOrBuilder + getTextBlockOrBuilder() { + if (blockCase_ == 2) { + return (com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlock) + block_; + } + return com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlock.getDefaultInstance(); + } + + public static final int TABLE_BLOCK_FIELD_NUMBER = 3; + /** + * + * + *
+       * Block consisting of table content/structure.
+       * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableBlock table_block = 3; + * + * + * @return Whether the tableBlock field is set. + */ + @java.lang.Override + public boolean hasTableBlock() { + return blockCase_ == 3; + } + /** + * + * + *
+       * Block consisting of table content/structure.
+       * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableBlock table_block = 3; + * + * + * @return The tableBlock. + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlock + getTableBlock() { + if (blockCase_ == 3) { + return (com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlock) + block_; + } + return com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlock.getDefaultInstance(); + } + /** + * + * + *
+       * Block consisting of table content/structure.
+       * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableBlock table_block = 3; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlockOrBuilder + getTableBlockOrBuilder() { + if (blockCase_ == 3) { + return (com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlock) + block_; + } + return com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlock.getDefaultInstance(); + } + + public static final int LIST_BLOCK_FIELD_NUMBER = 4; + /** + * + * + *
+       * Block consisting of list content/structure.
+       * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutListBlock list_block = 4; + * + * + * @return Whether the listBlock field is set. + */ + @java.lang.Override + public boolean hasListBlock() { + return blockCase_ == 4; + } + /** + * + * + *
+       * Block consisting of list content/structure.
+       * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutListBlock list_block = 4; + * + * + * @return The listBlock. + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlock + getListBlock() { + if (blockCase_ == 4) { + return (com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlock) + block_; + } + return com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlock.getDefaultInstance(); + } + /** + * + * + *
+       * Block consisting of list content/structure.
+       * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutListBlock list_block = 4; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlockOrBuilder + getListBlockOrBuilder() { + if (blockCase_ == 4) { + return (com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlock) + block_; + } + return com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlock.getDefaultInstance(); + } + + public static final int BLOCK_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object blockId_ = ""; + /** + * + * + *
+       * ID of the block.
+       * 
+ * + * string block_id = 1; + * + * @return The blockId. + */ + @java.lang.Override + public java.lang.String getBlockId() { + java.lang.Object ref = blockId_; + 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(); + blockId_ = s; + return s; + } + } + /** + * + * + *
+       * ID of the block.
+       * 
+ * + * string block_id = 1; + * + * @return The bytes for blockId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBlockIdBytes() { + java.lang.Object ref = blockId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + blockId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SPAN_FIELD_NUMBER = 5; + private com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutPageSpan + pageSpan_; + /** + * + * + *
+       * Page span of the block.
+       * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutPageSpan page_span = 5; + * + * + * @return Whether the pageSpan field is set. + */ + @java.lang.Override + public boolean hasPageSpan() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+       * Page span of the block.
+       * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutPageSpan page_span = 5; + * + * + * @return The pageSpan. + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutPageSpan + getPageSpan() { + return pageSpan_ == null + ? com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutPageSpan.getDefaultInstance() + : pageSpan_; + } + /** + * + * + *
+       * Page span of the block.
+       * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutPageSpan page_span = 5; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutPageSpanOrBuilder + getPageSpanOrBuilder() { + return pageSpan_ == null + ? com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutPageSpan.getDefaultInstance() + : pageSpan_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(blockId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, blockId_); + } + if (blockCase_ == 2) { + output.writeMessage( + 2, + (com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlock) + block_); + } + if (blockCase_ == 3) { + output.writeMessage( + 3, + (com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlock) + block_); + } + if (blockCase_ == 4) { + output.writeMessage( + 4, + (com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlock) + block_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(5, getPageSpan()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(blockId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, blockId_); + } + if (blockCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, + (com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlock) + block_); + } + if (blockCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, + (com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlock) + block_); + } + if (blockCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, + (com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlock) + block_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getPageSpan()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock other = + (com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock) obj; + + if (!getBlockId().equals(other.getBlockId())) return false; + if (hasPageSpan() != other.hasPageSpan()) return false; + if (hasPageSpan()) { + if (!getPageSpan().equals(other.getPageSpan())) return false; + } + if (!getBlockCase().equals(other.getBlockCase())) return false; + switch (blockCase_) { + case 2: + if (!getTextBlock().equals(other.getTextBlock())) return false; + break; + case 3: + if (!getTableBlock().equals(other.getTableBlock())) return false; + break; + case 4: + if (!getListBlock().equals(other.getListBlock())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + BLOCK_ID_FIELD_NUMBER; + hash = (53 * hash) + getBlockId().hashCode(); + if (hasPageSpan()) { + hash = (37 * hash) + PAGE_SPAN_FIELD_NUMBER; + hash = (53 * hash) + getPageSpan().hashCode(); + } + switch (blockCase_) { + case 2: + hash = (37 * hash) + TEXT_BLOCK_FIELD_NUMBER; + hash = (53 * hash) + getTextBlock().hashCode(); + break; + case 3: + hash = (37 * hash) + TABLE_BLOCK_FIELD_NUMBER; + hash = (53 * hash) + getTableBlock().hashCode(); + break; + case 4: + hash = (37 * hash) + LIST_BLOCK_FIELD_NUMBER; + hash = (53 * hash) + getListBlock().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * Represents a block. A block could be one of the various types (text,
+       * table, list) supported.
+       * 
+ * + * Protobuf type {@code + * google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock) + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlockOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .class, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .Builder.class); + } + + // Construct using + // com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPageSpanFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (textBlockBuilder_ != null) { + textBlockBuilder_.clear(); + } + if (tableBlockBuilder_ != null) { + tableBlockBuilder_.clear(); + } + if (listBlockBuilder_ != null) { + listBlockBuilder_.clear(); + } + blockId_ = ""; + pageSpan_ = null; + if (pageSpanBuilder_ != null) { + pageSpanBuilder_.dispose(); + pageSpanBuilder_ = null; + } + blockCase_ = 0; + block_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + build() { + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + buildPartial() { + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock result = + new com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.blockId_ = blockId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000010) != 0)) { + result.pageSpan_ = pageSpanBuilder_ == null ? pageSpan_ : pageSpanBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + result) { + result.blockCase_ = blockCase_; + result.block_ = this.block_; + if (blockCase_ == 2 && textBlockBuilder_ != null) { + result.block_ = textBlockBuilder_.build(); + } + if (blockCase_ == 3 && tableBlockBuilder_ != null) { + result.block_ = tableBlockBuilder_.build(); + } + if (blockCase_ == 4 && listBlockBuilder_ != null) { + result.block_ = listBlockBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock) { + return mergeFrom( + (com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock other) { + if (other + == com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .getDefaultInstance()) return this; + if (!other.getBlockId().isEmpty()) { + blockId_ = other.blockId_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.hasPageSpan()) { + mergePageSpan(other.getPageSpan()); + } + switch (other.getBlockCase()) { + case TEXT_BLOCK: + { + mergeTextBlock(other.getTextBlock()); + break; + } + case TABLE_BLOCK: + { + mergeTableBlock(other.getTableBlock()); + break; + } + case LIST_BLOCK: + { + mergeListBlock(other.getListBlock()); + break; + } + case BLOCK_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + blockId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 10 + case 18: + { + input.readMessage(getTextBlockFieldBuilder().getBuilder(), extensionRegistry); + blockCase_ = 2; + break; + } // case 18 + case 26: + { + input.readMessage(getTableBlockFieldBuilder().getBuilder(), extensionRegistry); + blockCase_ = 3; + break; + } // case 26 + case 34: + { + input.readMessage(getListBlockFieldBuilder().getBuilder(), extensionRegistry); + blockCase_ = 4; + break; + } // case 34 + case 42: + { + input.readMessage(getPageSpanFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int blockCase_ = 0; + private java.lang.Object block_; + + public BlockCase getBlockCase() { + return BlockCase.forNumber(blockCase_); + } + + public Builder clearBlock() { + blockCase_ = 0; + block_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlock, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlock.Builder, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlockOrBuilder> + textBlockBuilder_; + /** + * + * + *
+         * Block consisting of text content.
+         * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTextBlock text_block = 2; + * + * + * @return Whether the textBlock field is set. + */ + @java.lang.Override + public boolean hasTextBlock() { + return blockCase_ == 2; + } + /** + * + * + *
+         * Block consisting of text content.
+         * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTextBlock text_block = 2; + * + * + * @return The textBlock. + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlock + getTextBlock() { + if (textBlockBuilder_ == null) { + if (blockCase_ == 2) { + return (com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTextBlock) + block_; + } + return com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlock.getDefaultInstance(); + } else { + if (blockCase_ == 2) { + return textBlockBuilder_.getMessage(); + } + return com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlock.getDefaultInstance(); + } + } + /** + * + * + *
+         * Block consisting of text content.
+         * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTextBlock text_block = 2; + * + */ + public Builder setTextBlock( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlock + value) { + if (textBlockBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + block_ = value; + onChanged(); + } else { + textBlockBuilder_.setMessage(value); + } + blockCase_ = 2; + return this; + } + /** + * + * + *
+         * Block consisting of text content.
+         * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTextBlock text_block = 2; + * + */ + public Builder setTextBlock( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlock.Builder + builderForValue) { + if (textBlockBuilder_ == null) { + block_ = builderForValue.build(); + onChanged(); + } else { + textBlockBuilder_.setMessage(builderForValue.build()); + } + blockCase_ = 2; + return this; + } + /** + * + * + *
+         * Block consisting of text content.
+         * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTextBlock text_block = 2; + * + */ + public Builder mergeTextBlock( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlock + value) { + if (textBlockBuilder_ == null) { + if (blockCase_ == 2 + && block_ + != com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTextBlock.getDefaultInstance()) { + block_ = + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlock.newBuilder( + (com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTextBlock) + block_) + .mergeFrom(value) + .buildPartial(); + } else { + block_ = value; + } + onChanged(); + } else { + if (blockCase_ == 2) { + textBlockBuilder_.mergeFrom(value); + } else { + textBlockBuilder_.setMessage(value); + } + } + blockCase_ = 2; + return this; + } + /** + * + * + *
+         * Block consisting of text content.
+         * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTextBlock text_block = 2; + * + */ + public Builder clearTextBlock() { + if (textBlockBuilder_ == null) { + if (blockCase_ == 2) { + blockCase_ = 0; + block_ = null; + onChanged(); + } + } else { + if (blockCase_ == 2) { + blockCase_ = 0; + block_ = null; + } + textBlockBuilder_.clear(); + } + return this; + } + /** + * + * + *
+         * Block consisting of text content.
+         * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTextBlock text_block = 2; + * + */ + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlock.Builder + getTextBlockBuilder() { + return getTextBlockFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * Block consisting of text content.
+         * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTextBlock text_block = 2; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlockOrBuilder + getTextBlockOrBuilder() { + if ((blockCase_ == 2) && (textBlockBuilder_ != null)) { + return textBlockBuilder_.getMessageOrBuilder(); + } else { + if (blockCase_ == 2) { + return (com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTextBlock) + block_; + } + return com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlock.getDefaultInstance(); + } + } + /** + * + * + *
+         * Block consisting of text content.
+         * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTextBlock text_block = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlock, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlock.Builder, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlockOrBuilder> + getTextBlockFieldBuilder() { + if (textBlockBuilder_ == null) { + if (!(blockCase_ == 2)) { + block_ = + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlock.getDefaultInstance(); + } + textBlockBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlock, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlock.Builder, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlockOrBuilder>( + (com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTextBlock) + block_, + getParentForChildren(), + isClean()); + block_ = null; + } + blockCase_ = 2; + onChanged(); + return textBlockBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlock, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlock.Builder, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlockOrBuilder> + tableBlockBuilder_; + /** + * + * + *
+         * Block consisting of table content/structure.
+         * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableBlock table_block = 3; + * + * + * @return Whether the tableBlock field is set. + */ + @java.lang.Override + public boolean hasTableBlock() { + return blockCase_ == 3; + } + /** + * + * + *
+         * Block consisting of table content/structure.
+         * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableBlock table_block = 3; + * + * + * @return The tableBlock. + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlock + getTableBlock() { + if (tableBlockBuilder_ == null) { + if (blockCase_ == 3) { + return (com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTableBlock) + block_; + } + return com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlock.getDefaultInstance(); + } else { + if (blockCase_ == 3) { + return tableBlockBuilder_.getMessage(); + } + return com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlock.getDefaultInstance(); + } + } + /** + * + * + *
+         * Block consisting of table content/structure.
+         * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableBlock table_block = 3; + * + */ + public Builder setTableBlock( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlock + value) { + if (tableBlockBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + block_ = value; + onChanged(); + } else { + tableBlockBuilder_.setMessage(value); + } + blockCase_ = 3; + return this; + } + /** + * + * + *
+         * Block consisting of table content/structure.
+         * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableBlock table_block = 3; + * + */ + public Builder setTableBlock( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlock.Builder + builderForValue) { + if (tableBlockBuilder_ == null) { + block_ = builderForValue.build(); + onChanged(); + } else { + tableBlockBuilder_.setMessage(builderForValue.build()); + } + blockCase_ = 3; + return this; + } + /** + * + * + *
+         * Block consisting of table content/structure.
+         * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableBlock table_block = 3; + * + */ + public Builder mergeTableBlock( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlock + value) { + if (tableBlockBuilder_ == null) { + if (blockCase_ == 3 + && block_ + != com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTableBlock.getDefaultInstance()) { + block_ = + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlock.newBuilder( + (com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTableBlock) + block_) + .mergeFrom(value) + .buildPartial(); + } else { + block_ = value; + } + onChanged(); + } else { + if (blockCase_ == 3) { + tableBlockBuilder_.mergeFrom(value); + } else { + tableBlockBuilder_.setMessage(value); + } + } + blockCase_ = 3; + return this; + } + /** + * + * + *
+         * Block consisting of table content/structure.
+         * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableBlock table_block = 3; + * + */ + public Builder clearTableBlock() { + if (tableBlockBuilder_ == null) { + if (blockCase_ == 3) { + blockCase_ = 0; + block_ = null; + onChanged(); + } + } else { + if (blockCase_ == 3) { + blockCase_ = 0; + block_ = null; + } + tableBlockBuilder_.clear(); + } + return this; + } + /** + * + * + *
+         * Block consisting of table content/structure.
+         * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableBlock table_block = 3; + * + */ + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlock.Builder + getTableBlockBuilder() { + return getTableBlockFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * Block consisting of table content/structure.
+         * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableBlock table_block = 3; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlockOrBuilder + getTableBlockOrBuilder() { + if ((blockCase_ == 3) && (tableBlockBuilder_ != null)) { + return tableBlockBuilder_.getMessageOrBuilder(); + } else { + if (blockCase_ == 3) { + return (com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutTableBlock) + block_; + } + return com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlock.getDefaultInstance(); + } + } + /** + * + * + *
+         * Block consisting of table content/structure.
+         * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableBlock table_block = 3; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlock, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlock.Builder, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlockOrBuilder> + getTableBlockFieldBuilder() { + if (tableBlockBuilder_ == null) { + if (!(blockCase_ == 3)) { + block_ = + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlock.getDefaultInstance(); + } + tableBlockBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlock, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlock.Builder, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlockOrBuilder>( + (com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutTableBlock) + block_, + getParentForChildren(), + isClean()); + block_ = null; + } + blockCase_ = 3; + onChanged(); + return tableBlockBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlock, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlock.Builder, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlockOrBuilder> + listBlockBuilder_; + /** + * + * + *
+         * Block consisting of list content/structure.
+         * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutListBlock list_block = 4; + * + * + * @return Whether the listBlock field is set. + */ + @java.lang.Override + public boolean hasListBlock() { + return blockCase_ == 4; + } + /** + * + * + *
+         * Block consisting of list content/structure.
+         * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutListBlock list_block = 4; + * + * + * @return The listBlock. + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlock + getListBlock() { + if (listBlockBuilder_ == null) { + if (blockCase_ == 4) { + return (com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutListBlock) + block_; + } + return com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlock.getDefaultInstance(); + } else { + if (blockCase_ == 4) { + return listBlockBuilder_.getMessage(); + } + return com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlock.getDefaultInstance(); + } + } + /** + * + * + *
+         * Block consisting of list content/structure.
+         * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutListBlock list_block = 4; + * + */ + public Builder setListBlock( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlock + value) { + if (listBlockBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + block_ = value; + onChanged(); + } else { + listBlockBuilder_.setMessage(value); + } + blockCase_ = 4; + return this; + } + /** + * + * + *
+         * Block consisting of list content/structure.
+         * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutListBlock list_block = 4; + * + */ + public Builder setListBlock( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlock.Builder + builderForValue) { + if (listBlockBuilder_ == null) { + block_ = builderForValue.build(); + onChanged(); + } else { + listBlockBuilder_.setMessage(builderForValue.build()); + } + blockCase_ = 4; + return this; + } + /** + * + * + *
+         * Block consisting of list content/structure.
+         * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutListBlock list_block = 4; + * + */ + public Builder mergeListBlock( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlock + value) { + if (listBlockBuilder_ == null) { + if (blockCase_ == 4 + && block_ + != com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutListBlock.getDefaultInstance()) { + block_ = + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlock.newBuilder( + (com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutListBlock) + block_) + .mergeFrom(value) + .buildPartial(); + } else { + block_ = value; + } + onChanged(); + } else { + if (blockCase_ == 4) { + listBlockBuilder_.mergeFrom(value); + } else { + listBlockBuilder_.setMessage(value); + } + } + blockCase_ = 4; + return this; + } + /** + * + * + *
+         * Block consisting of list content/structure.
+         * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutListBlock list_block = 4; + * + */ + public Builder clearListBlock() { + if (listBlockBuilder_ == null) { + if (blockCase_ == 4) { + blockCase_ = 0; + block_ = null; + onChanged(); + } + } else { + if (blockCase_ == 4) { + blockCase_ = 0; + block_ = null; + } + listBlockBuilder_.clear(); + } + return this; + } + /** + * + * + *
+         * Block consisting of list content/structure.
+         * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutListBlock list_block = 4; + * + */ + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlock.Builder + getListBlockBuilder() { + return getListBlockFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * Block consisting of list content/structure.
+         * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutListBlock list_block = 4; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlockOrBuilder + getListBlockOrBuilder() { + if ((blockCase_ == 4) && (listBlockBuilder_ != null)) { + return listBlockBuilder_.getMessageOrBuilder(); + } else { + if (blockCase_ == 4) { + return (com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutListBlock) + block_; + } + return com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlock.getDefaultInstance(); + } + } + /** + * + * + *
+         * Block consisting of list content/structure.
+         * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutListBlock list_block = 4; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlock, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlock.Builder, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlockOrBuilder> + getListBlockFieldBuilder() { + if (listBlockBuilder_ == null) { + if (!(blockCase_ == 4)) { + block_ = + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlock.getDefaultInstance(); + } + listBlockBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlock, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlock.Builder, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlockOrBuilder>( + (com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutListBlock) + block_, + getParentForChildren(), + isClean()); + block_ = null; + } + blockCase_ = 4; + onChanged(); + return listBlockBuilder_; + } + + private java.lang.Object blockId_ = ""; + /** + * + * + *
+         * ID of the block.
+         * 
+ * + * string block_id = 1; + * + * @return The blockId. + */ + public java.lang.String getBlockId() { + java.lang.Object ref = blockId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + blockId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * ID of the block.
+         * 
+ * + * string block_id = 1; + * + * @return The bytes for blockId. + */ + public com.google.protobuf.ByteString getBlockIdBytes() { + java.lang.Object ref = blockId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + blockId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * ID of the block.
+         * 
+ * + * string block_id = 1; + * + * @param value The blockId to set. + * @return This builder for chaining. + */ + public Builder setBlockId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + blockId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+         * ID of the block.
+         * 
+ * + * string block_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearBlockId() { + blockId_ = getDefaultInstance().getBlockId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+         * ID of the block.
+         * 
+ * + * string block_id = 1; + * + * @param value The bytes for blockId to set. + * @return This builder for chaining. + */ + public Builder setBlockIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + blockId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutPageSpan + pageSpan_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutPageSpan, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutPageSpan.Builder, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutPageSpanOrBuilder> + pageSpanBuilder_; + /** + * + * + *
+         * Page span of the block.
+         * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutPageSpan page_span = 5; + * + * + * @return Whether the pageSpan field is set. + */ + public boolean hasPageSpan() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+         * Page span of the block.
+         * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutPageSpan page_span = 5; + * + * + * @return The pageSpan. + */ + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutPageSpan + getPageSpan() { + if (pageSpanBuilder_ == null) { + return pageSpan_ == null + ? com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutPageSpan.getDefaultInstance() + : pageSpan_; + } else { + return pageSpanBuilder_.getMessage(); + } + } + /** + * + * + *
+         * Page span of the block.
+         * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutPageSpan page_span = 5; + * + */ + public Builder setPageSpan( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutPageSpan + value) { + if (pageSpanBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + pageSpan_ = value; + } else { + pageSpanBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+         * Page span of the block.
+         * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutPageSpan page_span = 5; + * + */ + public Builder setPageSpan( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutPageSpan.Builder + builderForValue) { + if (pageSpanBuilder_ == null) { + pageSpan_ = builderForValue.build(); + } else { + pageSpanBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+         * Page span of the block.
+         * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutPageSpan page_span = 5; + * + */ + public Builder mergePageSpan( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutPageSpan + value) { + if (pageSpanBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && pageSpan_ != null + && pageSpan_ + != com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.LayoutPageSpan.getDefaultInstance()) { + getPageSpanBuilder().mergeFrom(value); + } else { + pageSpan_ = value; + } + } else { + pageSpanBuilder_.mergeFrom(value); + } + if (pageSpan_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + * + * + *
+         * Page span of the block.
+         * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutPageSpan page_span = 5; + * + */ + public Builder clearPageSpan() { + bitField0_ = (bitField0_ & ~0x00000010); + pageSpan_ = null; + if (pageSpanBuilder_ != null) { + pageSpanBuilder_.dispose(); + pageSpanBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+         * Page span of the block.
+         * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutPageSpan page_span = 5; + * + */ + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutPageSpan.Builder + getPageSpanBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getPageSpanFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * Page span of the block.
+         * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutPageSpan page_span = 5; + * + */ + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutPageSpanOrBuilder + getPageSpanOrBuilder() { + if (pageSpanBuilder_ != null) { + return pageSpanBuilder_.getMessageOrBuilder(); + } else { + return pageSpan_ == null + ? com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutPageSpan.getDefaultInstance() + : pageSpan_; + } + } + /** + * + * + *
+         * Page span of the block.
+         * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.LayoutPageSpan page_span = 5; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutPageSpan, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutPageSpan.Builder, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutPageSpanOrBuilder> + getPageSpanFieldBuilder() { + if (pageSpanBuilder_ == null) { + pageSpanBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutPageSpan, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutPageSpan.Builder, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .LayoutPageSpanOrBuilder>(getPageSpan(), getParentForChildren(), isClean()); + pageSpan_ = null; + } + return pageSpanBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock) + private static final com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock(); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DocumentLayoutBlock parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int BLOCKS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock> + blocks_; + /** + * + * + *
+     * List of blocks in the document.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock> + getBlocksList() { + return blocks_; + } + /** + * + * + *
+     * List of blocks in the document.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlockOrBuilder> + getBlocksOrBuilderList() { + return blocks_; + } + /** + * + * + *
+     * List of blocks in the document.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + @java.lang.Override + public int getBlocksCount() { + return blocks_.size(); + } + /** + * + * + *
+     * List of blocks in the document.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + getBlocks(int index) { + return blocks_.get(index); + } + /** + * + * + *
+     * List of blocks in the document.
+     * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlockOrBuilder + getBlocksOrBuilder(int index) { + return blocks_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < blocks_.size(); i++) { + output.writeMessage(1, blocks_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < blocks_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, blocks_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.documentai.v1beta3.Document.DocumentLayout)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1beta3.Document.DocumentLayout other = + (com.google.cloud.documentai.v1beta3.Document.DocumentLayout) obj; + + if (!getBlocksList().equals(other.getBlocksList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getBlocksCount() > 0) { + hash = (37 * hash) + BLOCKS_FIELD_NUMBER; + hash = (53 * hash) + getBlocksList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Represents the parsed layout of a document as a collection of blocks that
+     * the document is divided into.
+     * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.Document.DocumentLayout} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta3.Document.DocumentLayout) + com.google.cloud.documentai.v1beta3.Document.DocumentLayoutOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.class, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.Builder.class); + } + + // Construct using com.google.cloud.documentai.v1beta3.Document.DocumentLayout.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (blocksBuilder_ == null) { + blocks_ = java.util.Collections.emptyList(); + } else { + blocks_ = null; + blocksBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout + getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta3.Document.DocumentLayout.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout build() { + com.google.cloud.documentai.v1beta3.Document.DocumentLayout result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout buildPartial() { + com.google.cloud.documentai.v1beta3.Document.DocumentLayout result = + new com.google.cloud.documentai.v1beta3.Document.DocumentLayout(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout result) { + if (blocksBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + blocks_ = java.util.Collections.unmodifiableList(blocks_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.blocks_ = blocks_; + } else { + result.blocks_ = blocksBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.documentai.v1beta3.Document.DocumentLayout) { + return mergeFrom((com.google.cloud.documentai.v1beta3.Document.DocumentLayout) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.documentai.v1beta3.Document.DocumentLayout other) { + if (other + == com.google.cloud.documentai.v1beta3.Document.DocumentLayout.getDefaultInstance()) + return this; + if (blocksBuilder_ == null) { + if (!other.blocks_.isEmpty()) { + if (blocks_.isEmpty()) { + blocks_ = other.blocks_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureBlocksIsMutable(); + blocks_.addAll(other.blocks_); + } + onChanged(); + } + } else { + if (!other.blocks_.isEmpty()) { + if (blocksBuilder_.isEmpty()) { + blocksBuilder_.dispose(); + blocksBuilder_ = null; + blocks_ = other.blocks_; + bitField0_ = (bitField0_ & ~0x00000001); + blocksBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getBlocksFieldBuilder() + : null; + } else { + blocksBuilder_.addAllMessages(other.blocks_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + m = + input.readMessage( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock.parser(), + extensionRegistry); + if (blocksBuilder_ == null) { + ensureBlocksIsMutable(); + blocks_.add(m); + } else { + blocksBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock> + blocks_ = java.util.Collections.emptyList(); + + private void ensureBlocksIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + blocks_ = + new java.util.ArrayList< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock>( + blocks_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .Builder, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlockOrBuilder> + blocksBuilder_; + + /** + * + * + *
+       * List of blocks in the document.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + public java.util.List< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock> + getBlocksList() { + if (blocksBuilder_ == null) { + return java.util.Collections.unmodifiableList(blocks_); + } else { + return blocksBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * List of blocks in the document.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + public int getBlocksCount() { + if (blocksBuilder_ == null) { + return blocks_.size(); + } else { + return blocksBuilder_.getCount(); + } + } + /** + * + * + *
+       * List of blocks in the document.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + getBlocks(int index) { + if (blocksBuilder_ == null) { + return blocks_.get(index); + } else { + return blocksBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * List of blocks in the document.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + public Builder setBlocks( + int index, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock value) { + if (blocksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBlocksIsMutable(); + blocks_.set(index, value); + onChanged(); + } else { + blocksBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * List of blocks in the document.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + public Builder setBlocks( + int index, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.Builder + builderForValue) { + if (blocksBuilder_ == null) { + ensureBlocksIsMutable(); + blocks_.set(index, builderForValue.build()); + onChanged(); + } else { + blocksBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * List of blocks in the document.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + public Builder addBlocks( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock value) { + if (blocksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBlocksIsMutable(); + blocks_.add(value); + onChanged(); + } else { + blocksBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * List of blocks in the document.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + public Builder addBlocks( + int index, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock value) { + if (blocksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBlocksIsMutable(); + blocks_.add(index, value); + onChanged(); + } else { + blocksBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * List of blocks in the document.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + public Builder addBlocks( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.Builder + builderForValue) { + if (blocksBuilder_ == null) { + ensureBlocksIsMutable(); + blocks_.add(builderForValue.build()); + onChanged(); + } else { + blocksBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * List of blocks in the document.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + public Builder addBlocks( + int index, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.Builder + builderForValue) { + if (blocksBuilder_ == null) { + ensureBlocksIsMutable(); + blocks_.add(index, builderForValue.build()); + onChanged(); + } else { + blocksBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * List of blocks in the document.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + public Builder addAllBlocks( + java.lang.Iterable< + ? extends + com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlock> + values) { + if (blocksBuilder_ == null) { + ensureBlocksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, blocks_); + onChanged(); + } else { + blocksBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * List of blocks in the document.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + public Builder clearBlocks() { + if (blocksBuilder_ == null) { + blocks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + blocksBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * List of blocks in the document.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + public Builder removeBlocks(int index) { + if (blocksBuilder_ == null) { + ensureBlocksIsMutable(); + blocks_.remove(index); + onChanged(); + } else { + blocksBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * List of blocks in the document.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.Builder + getBlocksBuilder(int index) { + return getBlocksFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * List of blocks in the document.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlockOrBuilder + getBlocksOrBuilder(int index) { + if (blocksBuilder_ == null) { + return blocks_.get(index); + } else { + return blocksBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * List of blocks in the document.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + public java.util.List< + ? extends + com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlockOrBuilder> + getBlocksOrBuilderList() { + if (blocksBuilder_ != null) { + return blocksBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(blocks_); + } + } + /** + * + * + *
+       * List of blocks in the document.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.Builder + addBlocksBuilder() { + return getBlocksFieldBuilder() + .addBuilder( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .getDefaultInstance()); + } + /** + * + * + *
+       * List of blocks in the document.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock.Builder + addBlocksBuilder(int index) { + return getBlocksFieldBuilder() + .addBuilder( + index, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .getDefaultInstance()); + } + /** + * + * + *
+       * List of blocks in the document.
+       * 
+ * + * + * repeated .google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock blocks = 1; + * + */ + public java.util.List< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .Builder> + getBlocksBuilderList() { + return getBlocksFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .Builder, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlockOrBuilder> + getBlocksFieldBuilder() { + if (blocksBuilder_ == null) { + blocksBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.DocumentLayoutBlock + .Builder, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .DocumentLayoutBlockOrBuilder>( + blocks_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + blocks_ = null; + } + return blocksBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta3.Document.DocumentLayout) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta3.Document.DocumentLayout) + private static final com.google.cloud.documentai.v1beta3.Document.DocumentLayout + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta3.Document.DocumentLayout(); + } + + public static com.google.cloud.documentai.v1beta3.Document.DocumentLayout getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DocumentLayout parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ChunkedDocumentOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta3.Document.ChunkedDocument) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * List of chunks.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk chunks = 1; + * + */ + java.util.List + getChunksList(); + /** + * + * + *
+     * List of chunks.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk chunks = 1; + * + */ + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk getChunks(int index); + /** + * + * + *
+     * List of chunks.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk chunks = 1; + * + */ + int getChunksCount(); + /** + * + * + *
+     * List of chunks.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk chunks = 1; + * + */ + java.util.List< + ? extends com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.ChunkOrBuilder> + getChunksOrBuilderList(); + /** + * + * + *
+     * List of chunks.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk chunks = 1; + * + */ + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.ChunkOrBuilder getChunksOrBuilder( + int index); + } + /** + * + * + *
+   * Represents the chunks that the document is divided into.
+   * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.Document.ChunkedDocument} + */ + public static final class ChunkedDocument extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.Document.ChunkedDocument) + ChunkedDocumentOrBuilder { + private static final long serialVersionUID = 0L; + // Use ChunkedDocument.newBuilder() to construct. + private ChunkedDocument(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ChunkedDocument() { + chunks_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ChunkedDocument(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_Document_ChunkedDocument_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_Document_ChunkedDocument_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.class, + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Builder.class); + } + + public interface ChunkOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * ID of the chunk.
+       * 
+ * + * string chunk_id = 1; + * + * @return The chunkId. + */ + java.lang.String getChunkId(); + /** + * + * + *
+       * ID of the chunk.
+       * 
+ * + * string chunk_id = 1; + * + * @return The bytes for chunkId. + */ + com.google.protobuf.ByteString getChunkIdBytes(); + + /** + * + * + *
+       * List of all parsed documents layout source blocks used to generate the
+       * chunk.
+       * 
+ * + * repeated string source_block_ids = 2; + * + * @return A list containing the sourceBlockIds. + */ + java.util.List getSourceBlockIdsList(); + /** + * + * + *
+       * List of all parsed documents layout source blocks used to generate the
+       * chunk.
+       * 
+ * + * repeated string source_block_ids = 2; + * + * @return The count of sourceBlockIds. + */ + int getSourceBlockIdsCount(); + /** + * + * + *
+       * List of all parsed documents layout source blocks used to generate the
+       * chunk.
+       * 
+ * + * repeated string source_block_ids = 2; + * + * @param index The index of the element to return. + * @return The sourceBlockIds at the given index. + */ + java.lang.String getSourceBlockIds(int index); + /** + * + * + *
+       * List of all parsed documents layout source blocks used to generate the
+       * chunk.
+       * 
+ * + * repeated string source_block_ids = 2; + * + * @param index The index of the value to return. + * @return The bytes of the sourceBlockIds at the given index. + */ + com.google.protobuf.ByteString getSourceBlockIdsBytes(int index); + + /** + * + * + *
+       * Text content of the chunk.
+       * 
+ * + * string content = 3; + * + * @return The content. + */ + java.lang.String getContent(); + /** + * + * + *
+       * Text content of the chunk.
+       * 
+ * + * string content = 3; + * + * @return The bytes for content. + */ + com.google.protobuf.ByteString getContentBytes(); + + /** + * + * + *
+       * Page span of the chunk.
+       * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 4; + * + * + * @return Whether the pageSpan field is set. + */ + boolean hasPageSpan(); + /** + * + * + *
+       * Page span of the chunk.
+       * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 4; + * + * + * @return The pageSpan. + */ + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk.ChunkPageSpan + getPageSpan(); + /** + * + * + *
+       * Page span of the chunk.
+       * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 4; + * + */ + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk.ChunkPageSpanOrBuilder + getPageSpanOrBuilder(); + } + /** + * + * + *
+     * Represents a chunk.
+     * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk} + */ + public static final class Chunk extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk) + ChunkOrBuilder { + private static final long serialVersionUID = 0L; + // Use Chunk.newBuilder() to construct. + private Chunk(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Chunk() { + chunkId_ = ""; + sourceBlockIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + content_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Chunk(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_Document_ChunkedDocument_Chunk_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_Document_ChunkedDocument_Chunk_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk.class, + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk.Builder.class); + } + + public interface ChunkPageSpanOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk.ChunkPageSpan) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+         * Page where chunk starts in the document.
+         * 
+ * + * int32 page_start = 1; + * + * @return The pageStart. + */ + int getPageStart(); + + /** + * + * + *
+         * Page where chunk ends in the document.
+         * 
+ * + * int32 page_end = 2; + * + * @return The pageEnd. + */ + int getPageEnd(); + } + /** + * + * + *
+       * Represents where the chunk starts and ends in the document.
+       * 
+ * + * Protobuf type {@code + * google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk.ChunkPageSpan} + */ + public static final class ChunkPageSpan extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk.ChunkPageSpan) + ChunkPageSpanOrBuilder { + private static final long serialVersionUID = 0L; + // Use ChunkPageSpan.newBuilder() to construct. + private ChunkPageSpan(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ChunkPageSpan() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ChunkPageSpan(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_Document_ChunkedDocument_Chunk_ChunkPageSpan_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_Document_ChunkedDocument_Chunk_ChunkPageSpan_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk.ChunkPageSpan + .class, + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk.ChunkPageSpan + .Builder.class); + } + + public static final int PAGE_START_FIELD_NUMBER = 1; + private int pageStart_ = 0; + /** + * + * + *
+         * Page where chunk starts in the document.
+         * 
+ * + * int32 page_start = 1; + * + * @return The pageStart. + */ + @java.lang.Override + public int getPageStart() { + return pageStart_; + } + + public static final int PAGE_END_FIELD_NUMBER = 2; + private int pageEnd_ = 0; + /** + * + * + *
+         * Page where chunk ends in the document.
+         * 
+ * + * int32 page_end = 2; + * + * @return The pageEnd. + */ + @java.lang.Override + public int getPageEnd() { + return pageEnd_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (pageStart_ != 0) { + output.writeInt32(1, pageStart_); + } + if (pageEnd_ != 0) { + output.writeInt32(2, pageEnd_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (pageStart_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, pageStart_); + } + if (pageEnd_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageEnd_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk.ChunkPageSpan)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk.ChunkPageSpan other = + (com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk.ChunkPageSpan) + obj; + + if (getPageStart() != other.getPageStart()) return false; + if (getPageEnd() != other.getPageEnd()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PAGE_START_FIELD_NUMBER; + hash = (53 * hash) + getPageStart(); + hash = (37 * hash) + PAGE_END_FIELD_NUMBER; + hash = (53 * hash) + getPageEnd(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk + .ChunkPageSpan + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk + .ChunkPageSpan + parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk + .ChunkPageSpan + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk + .ChunkPageSpan + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk + .ChunkPageSpan + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk + .ChunkPageSpan + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk + .ChunkPageSpan + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk + .ChunkPageSpan + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk + .ChunkPageSpan + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk + .ChunkPageSpan + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk + .ChunkPageSpan + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk + .ChunkPageSpan + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk.ChunkPageSpan + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+         * Represents where the chunk starts and ends in the document.
+         * 
+ * + * Protobuf type {@code + * google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk.ChunkPageSpan} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk.ChunkPageSpan) + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk + .ChunkPageSpanOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_Document_ChunkedDocument_Chunk_ChunkPageSpan_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_Document_ChunkedDocument_Chunk_ChunkPageSpan_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk.ChunkPageSpan + .class, + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk.ChunkPageSpan + .Builder.class); + } + + // Construct using + // com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk.ChunkPageSpan.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + pageStart_ = 0; + pageEnd_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_Document_ChunkedDocument_Chunk_ChunkPageSpan_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk.ChunkPageSpan + getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk.ChunkPageSpan + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk.ChunkPageSpan + build() { + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk.ChunkPageSpan + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk.ChunkPageSpan + buildPartial() { + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk.ChunkPageSpan + result = + new com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk + .ChunkPageSpan(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk.ChunkPageSpan + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.pageStart_ = pageStart_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageEnd_ = pageEnd_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk.ChunkPageSpan) { + return mergeFrom( + (com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk.ChunkPageSpan) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk.ChunkPageSpan + other) { + if (other + == com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk.ChunkPageSpan + .getDefaultInstance()) return this; + if (other.getPageStart() != 0) { + setPageStart(other.getPageStart()); + } + if (other.getPageEnd() != 0) { + setPageEnd(other.getPageEnd()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + pageStart_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + pageEnd_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int pageStart_; + /** + * + * + *
+           * Page where chunk starts in the document.
+           * 
+ * + * int32 page_start = 1; + * + * @return The pageStart. + */ + @java.lang.Override + public int getPageStart() { + return pageStart_; + } + /** + * + * + *
+           * Page where chunk starts in the document.
+           * 
+ * + * int32 page_start = 1; + * + * @param value The pageStart to set. + * @return This builder for chaining. + */ + public Builder setPageStart(int value) { + + pageStart_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+           * Page where chunk starts in the document.
+           * 
+ * + * int32 page_start = 1; + * + * @return This builder for chaining. + */ + public Builder clearPageStart() { + bitField0_ = (bitField0_ & ~0x00000001); + pageStart_ = 0; + onChanged(); + return this; + } + + private int pageEnd_; + /** + * + * + *
+           * Page where chunk ends in the document.
+           * 
+ * + * int32 page_end = 2; + * + * @return The pageEnd. + */ + @java.lang.Override + public int getPageEnd() { + return pageEnd_; + } + /** + * + * + *
+           * Page where chunk ends in the document.
+           * 
+ * + * int32 page_end = 2; + * + * @param value The pageEnd to set. + * @return This builder for chaining. + */ + public Builder setPageEnd(int value) { + + pageEnd_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+           * Page where chunk ends in the document.
+           * 
+ * + * int32 page_end = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageEnd() { + bitField0_ = (bitField0_ & ~0x00000002); + pageEnd_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk.ChunkPageSpan) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk.ChunkPageSpan) + private static final com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk + .ChunkPageSpan + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk + .ChunkPageSpan(); + } + + public static com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk + .ChunkPageSpan + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ChunkPageSpan parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk.ChunkPageSpan + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int CHUNK_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object chunkId_ = ""; + /** + * + * + *
+       * ID of the chunk.
+       * 
+ * + * string chunk_id = 1; + * + * @return The chunkId. + */ + @java.lang.Override + public java.lang.String getChunkId() { + java.lang.Object ref = chunkId_; + 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(); + chunkId_ = s; + return s; + } + } + /** + * + * + *
+       * ID of the chunk.
+       * 
+ * + * string chunk_id = 1; + * + * @return The bytes for chunkId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getChunkIdBytes() { + java.lang.Object ref = chunkId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + chunkId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SOURCE_BLOCK_IDS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList sourceBlockIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+       * List of all parsed documents layout source blocks used to generate the
+       * chunk.
+       * 
+ * + * repeated string source_block_ids = 2; + * + * @return A list containing the sourceBlockIds. + */ + public com.google.protobuf.ProtocolStringList getSourceBlockIdsList() { + return sourceBlockIds_; + } + /** + * + * + *
+       * List of all parsed documents layout source blocks used to generate the
+       * chunk.
+       * 
+ * + * repeated string source_block_ids = 2; + * + * @return The count of sourceBlockIds. + */ + public int getSourceBlockIdsCount() { + return sourceBlockIds_.size(); + } + /** + * + * + *
+       * List of all parsed documents layout source blocks used to generate the
+       * chunk.
+       * 
+ * + * repeated string source_block_ids = 2; + * + * @param index The index of the element to return. + * @return The sourceBlockIds at the given index. + */ + public java.lang.String getSourceBlockIds(int index) { + return sourceBlockIds_.get(index); + } + /** + * + * + *
+       * List of all parsed documents layout source blocks used to generate the
+       * chunk.
+       * 
+ * + * repeated string source_block_ids = 2; + * + * @param index The index of the value to return. + * @return The bytes of the sourceBlockIds at the given index. + */ + public com.google.protobuf.ByteString getSourceBlockIdsBytes(int index) { + return sourceBlockIds_.getByteString(index); + } + + public static final int CONTENT_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object content_ = ""; + /** + * + * + *
+       * Text content of the chunk.
+       * 
+ * + * string content = 3; + * + * @return The content. + */ + @java.lang.Override + public java.lang.String getContent() { + java.lang.Object ref = content_; + 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(); + content_ = s; + return s; + } + } + /** + * + * + *
+       * Text content of the chunk.
+       * 
+ * + * string content = 3; + * + * @return The bytes for content. + */ + @java.lang.Override + public com.google.protobuf.ByteString getContentBytes() { + java.lang.Object ref = content_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + content_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SPAN_FIELD_NUMBER = 4; + private com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk.ChunkPageSpan + pageSpan_; + /** + * + * + *
+       * Page span of the chunk.
+       * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 4; + * + * + * @return Whether the pageSpan field is set. + */ + @java.lang.Override + public boolean hasPageSpan() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+       * Page span of the chunk.
+       * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 4; + * + * + * @return The pageSpan. + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk.ChunkPageSpan + getPageSpan() { + return pageSpan_ == null + ? com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk.ChunkPageSpan + .getDefaultInstance() + : pageSpan_; + } + /** + * + * + *
+       * Page span of the chunk.
+       * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 4; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk + .ChunkPageSpanOrBuilder + getPageSpanOrBuilder() { + return pageSpan_ == null + ? com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk.ChunkPageSpan + .getDefaultInstance() + : pageSpan_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(chunkId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, chunkId_); + } + for (int i = 0; i < sourceBlockIds_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, sourceBlockIds_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(content_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, content_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(4, getPageSpan()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(chunkId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, chunkId_); + } + { + int dataSize = 0; + for (int i = 0; i < sourceBlockIds_.size(); i++) { + dataSize += computeStringSizeNoTag(sourceBlockIds_.getRaw(i)); + } + size += dataSize; + size += 1 * getSourceBlockIdsList().size(); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(content_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, content_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getPageSpan()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk other = + (com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk) obj; + + if (!getChunkId().equals(other.getChunkId())) return false; + if (!getSourceBlockIdsList().equals(other.getSourceBlockIdsList())) return false; + if (!getContent().equals(other.getContent())) return false; + if (hasPageSpan() != other.hasPageSpan()) return false; + if (hasPageSpan()) { + if (!getPageSpan().equals(other.getPageSpan())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CHUNK_ID_FIELD_NUMBER; + hash = (53 * hash) + getChunkId().hashCode(); + if (getSourceBlockIdsCount() > 0) { + hash = (37 * hash) + SOURCE_BLOCK_IDS_FIELD_NUMBER; + hash = (53 * hash) + getSourceBlockIdsList().hashCode(); + } + hash = (37 * hash) + CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getContent().hashCode(); + if (hasPageSpan()) { + hash = (37 * hash) + PAGE_SPAN_FIELD_NUMBER; + hash = (53 * hash) + getPageSpan().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * Represents a chunk.
+       * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk) + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.ChunkOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_Document_ChunkedDocument_Chunk_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_Document_ChunkedDocument_Chunk_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk.class, + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk.Builder.class); + } + + // Construct using + // com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPageSpanFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + chunkId_ = ""; + sourceBlockIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + content_ = ""; + pageSpan_ = null; + if (pageSpanBuilder_ != null) { + pageSpanBuilder_.dispose(); + pageSpanBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_Document_ChunkedDocument_Chunk_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk + getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk build() { + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk buildPartial() { + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk result = + new com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.chunkId_ = chunkId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + sourceBlockIds_.makeImmutable(); + result.sourceBlockIds_ = sourceBlockIds_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.content_ = content_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.pageSpan_ = pageSpanBuilder_ == null ? pageSpan_ : pageSpanBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk) { + return mergeFrom( + (com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk other) { + if (other + == com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk + .getDefaultInstance()) return this; + if (!other.getChunkId().isEmpty()) { + chunkId_ = other.chunkId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.sourceBlockIds_.isEmpty()) { + if (sourceBlockIds_.isEmpty()) { + sourceBlockIds_ = other.sourceBlockIds_; + bitField0_ |= 0x00000002; + } else { + ensureSourceBlockIdsIsMutable(); + sourceBlockIds_.addAll(other.sourceBlockIds_); + } + onChanged(); + } + if (!other.getContent().isEmpty()) { + content_ = other.content_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasPageSpan()) { + mergePageSpan(other.getPageSpan()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + chunkId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureSourceBlockIdsIsMutable(); + sourceBlockIds_.add(s); + break; + } // case 18 + case 26: + { + content_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage(getPageSpanFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object chunkId_ = ""; + /** + * + * + *
+         * ID of the chunk.
+         * 
+ * + * string chunk_id = 1; + * + * @return The chunkId. + */ + public java.lang.String getChunkId() { + java.lang.Object ref = chunkId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + chunkId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * ID of the chunk.
+         * 
+ * + * string chunk_id = 1; + * + * @return The bytes for chunkId. + */ + public com.google.protobuf.ByteString getChunkIdBytes() { + java.lang.Object ref = chunkId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + chunkId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * ID of the chunk.
+         * 
+ * + * string chunk_id = 1; + * + * @param value The chunkId to set. + * @return This builder for chaining. + */ + public Builder setChunkId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + chunkId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * ID of the chunk.
+         * 
+ * + * string chunk_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearChunkId() { + chunkId_ = getDefaultInstance().getChunkId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+         * ID of the chunk.
+         * 
+ * + * string chunk_id = 1; + * + * @param value The bytes for chunkId to set. + * @return This builder for chaining. + */ + public Builder setChunkIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + chunkId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList sourceBlockIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureSourceBlockIdsIsMutable() { + if (!sourceBlockIds_.isModifiable()) { + sourceBlockIds_ = new com.google.protobuf.LazyStringArrayList(sourceBlockIds_); + } + bitField0_ |= 0x00000002; + } + /** + * + * + *
+         * List of all parsed documents layout source blocks used to generate the
+         * chunk.
+         * 
+ * + * repeated string source_block_ids = 2; + * + * @return A list containing the sourceBlockIds. + */ + public com.google.protobuf.ProtocolStringList getSourceBlockIdsList() { + sourceBlockIds_.makeImmutable(); + return sourceBlockIds_; + } + /** + * + * + *
+         * List of all parsed documents layout source blocks used to generate the
+         * chunk.
+         * 
+ * + * repeated string source_block_ids = 2; + * + * @return The count of sourceBlockIds. + */ + public int getSourceBlockIdsCount() { + return sourceBlockIds_.size(); + } + /** + * + * + *
+         * List of all parsed documents layout source blocks used to generate the
+         * chunk.
+         * 
+ * + * repeated string source_block_ids = 2; + * + * @param index The index of the element to return. + * @return The sourceBlockIds at the given index. + */ + public java.lang.String getSourceBlockIds(int index) { + return sourceBlockIds_.get(index); + } + /** + * + * + *
+         * List of all parsed documents layout source blocks used to generate the
+         * chunk.
+         * 
+ * + * repeated string source_block_ids = 2; + * + * @param index The index of the value to return. + * @return The bytes of the sourceBlockIds at the given index. + */ + public com.google.protobuf.ByteString getSourceBlockIdsBytes(int index) { + return sourceBlockIds_.getByteString(index); + } + /** + * + * + *
+         * List of all parsed documents layout source blocks used to generate the
+         * chunk.
+         * 
+ * + * repeated string source_block_ids = 2; + * + * @param index The index to set the value at. + * @param value The sourceBlockIds to set. + * @return This builder for chaining. + */ + public Builder setSourceBlockIds(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSourceBlockIdsIsMutable(); + sourceBlockIds_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * List of all parsed documents layout source blocks used to generate the
+         * chunk.
+         * 
+ * + * repeated string source_block_ids = 2; + * + * @param value The sourceBlockIds to add. + * @return This builder for chaining. + */ + public Builder addSourceBlockIds(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSourceBlockIdsIsMutable(); + sourceBlockIds_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * List of all parsed documents layout source blocks used to generate the
+         * chunk.
+         * 
+ * + * repeated string source_block_ids = 2; + * + * @param values The sourceBlockIds to add. + * @return This builder for chaining. + */ + public Builder addAllSourceBlockIds(java.lang.Iterable values) { + ensureSourceBlockIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, sourceBlockIds_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * List of all parsed documents layout source blocks used to generate the
+         * chunk.
+         * 
+ * + * repeated string source_block_ids = 2; + * + * @return This builder for chaining. + */ + public Builder clearSourceBlockIds() { + sourceBlockIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + /** + * + * + *
+         * List of all parsed documents layout source blocks used to generate the
+         * chunk.
+         * 
+ * + * repeated string source_block_ids = 2; + * + * @param value The bytes of the sourceBlockIds to add. + * @return This builder for chaining. + */ + public Builder addSourceBlockIdsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureSourceBlockIdsIsMutable(); + sourceBlockIds_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object content_ = ""; + /** + * + * + *
+         * Text content of the chunk.
+         * 
+ * + * string content = 3; + * + * @return The content. + */ + public java.lang.String getContent() { + java.lang.Object ref = content_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + content_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * Text content of the chunk.
+         * 
+ * + * string content = 3; + * + * @return The bytes for content. + */ + public com.google.protobuf.ByteString getContentBytes() { + java.lang.Object ref = content_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + content_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * Text content of the chunk.
+         * 
+ * + * string content = 3; + * + * @param value The content to set. + * @return This builder for chaining. + */ + public Builder setContent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + content_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+         * Text content of the chunk.
+         * 
+ * + * string content = 3; + * + * @return This builder for chaining. + */ + public Builder clearContent() { + content_ = getDefaultInstance().getContent(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+         * Text content of the chunk.
+         * 
+ * + * string content = 3; + * + * @param value The bytes for content to set. + * @return This builder for chaining. + */ + public Builder setContentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + content_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk.ChunkPageSpan + pageSpan_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk.ChunkPageSpan, + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk.ChunkPageSpan + .Builder, + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk + .ChunkPageSpanOrBuilder> + pageSpanBuilder_; + /** + * + * + *
+         * Page span of the chunk.
+         * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 4; + * + * + * @return Whether the pageSpan field is set. + */ + public boolean hasPageSpan() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+         * Page span of the chunk.
+         * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 4; + * + * + * @return The pageSpan. + */ + public com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk.ChunkPageSpan + getPageSpan() { + if (pageSpanBuilder_ == null) { + return pageSpan_ == null + ? com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk.ChunkPageSpan + .getDefaultInstance() + : pageSpan_; + } else { + return pageSpanBuilder_.getMessage(); + } + } + /** + * + * + *
+         * Page span of the chunk.
+         * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 4; + * + */ + public Builder setPageSpan( + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk.ChunkPageSpan + value) { + if (pageSpanBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + pageSpan_ = value; + } else { + pageSpanBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+         * Page span of the chunk.
+         * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 4; + * + */ + public Builder setPageSpan( + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk.ChunkPageSpan.Builder + builderForValue) { + if (pageSpanBuilder_ == null) { + pageSpan_ = builderForValue.build(); + } else { + pageSpanBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+         * Page span of the chunk.
+         * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 4; + * + */ + public Builder mergePageSpan( + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk.ChunkPageSpan + value) { + if (pageSpanBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && pageSpan_ != null + && pageSpan_ + != com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk + .ChunkPageSpan.getDefaultInstance()) { + getPageSpanBuilder().mergeFrom(value); + } else { + pageSpan_ = value; + } + } else { + pageSpanBuilder_.mergeFrom(value); + } + if (pageSpan_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + * + * + *
+         * Page span of the chunk.
+         * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 4; + * + */ + public Builder clearPageSpan() { + bitField0_ = (bitField0_ & ~0x00000008); + pageSpan_ = null; + if (pageSpanBuilder_ != null) { + pageSpanBuilder_.dispose(); + pageSpanBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+         * Page span of the chunk.
+         * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 4; + * + */ + public com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk.ChunkPageSpan + .Builder + getPageSpanBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getPageSpanFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * Page span of the chunk.
+         * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 4; + * + */ + public com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk + .ChunkPageSpanOrBuilder + getPageSpanOrBuilder() { + if (pageSpanBuilder_ != null) { + return pageSpanBuilder_.getMessageOrBuilder(); + } else { + return pageSpan_ == null + ? com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk.ChunkPageSpan + .getDefaultInstance() + : pageSpan_; + } + } + /** + * + * + *
+         * Page span of the chunk.
+         * 
+ * + * + * .google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk.ChunkPageSpan page_span = 4; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk.ChunkPageSpan, + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk.ChunkPageSpan + .Builder, + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk + .ChunkPageSpanOrBuilder> + getPageSpanFieldBuilder() { + if (pageSpanBuilder_ == null) { + pageSpanBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk + .ChunkPageSpan, + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk.ChunkPageSpan + .Builder, + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk + .ChunkPageSpanOrBuilder>(getPageSpan(), getParentForChildren(), isClean()); + pageSpan_ = null; + } + return pageSpanBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk) + private static final com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk(); + } + + public static com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Chunk parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int CHUNKS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List + chunks_; + /** + * + * + *
+     * List of chunks.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk chunks = 1; + * + */ + @java.lang.Override + public java.util.List + getChunksList() { + return chunks_; + } + /** + * + * + *
+     * List of chunks.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk chunks = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.ChunkOrBuilder> + getChunksOrBuilderList() { + return chunks_; + } + /** + * + * + *
+     * List of chunks.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk chunks = 1; + * + */ + @java.lang.Override + public int getChunksCount() { + return chunks_.size(); + } + /** + * + * + *
+     * List of chunks.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk chunks = 1; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk getChunks(int index) { + return chunks_.get(index); + } + /** + * + * + *
+     * List of chunks.
+     * 
+ * + * repeated .google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk chunks = 1; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.ChunkOrBuilder + getChunksOrBuilder(int index) { + return chunks_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < chunks_.size(); i++) { + output.writeMessage(1, chunks_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < chunks_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, chunks_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.documentai.v1beta3.Document.ChunkedDocument)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument other = + (com.google.cloud.documentai.v1beta3.Document.ChunkedDocument) obj; + + if (!getChunksList().equals(other.getChunksList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getChunksCount() > 0) { + hash = (37 * hash) + CHUNKS_FIELD_NUMBER; + hash = (53 * hash) + getChunksList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1beta3.Document.ChunkedDocument parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.Document.ChunkedDocument parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Document.ChunkedDocument parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.Document.ChunkedDocument parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Document.ChunkedDocument parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.Document.ChunkedDocument parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Document.ChunkedDocument parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.Document.ChunkedDocument parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Document.ChunkedDocument parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.Document.ChunkedDocument parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.Document.ChunkedDocument parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.Document.ChunkedDocument parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Represents the chunks that the document is divided into.
+     * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.Document.ChunkedDocument} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta3.Document.ChunkedDocument) + com.google.cloud.documentai.v1beta3.Document.ChunkedDocumentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_Document_ChunkedDocument_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_Document_ChunkedDocument_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.class, + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Builder.class); + } + + // Construct using com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (chunksBuilder_ == null) { + chunks_ = java.util.Collections.emptyList(); + } else { + chunks_ = null; + chunksBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1beta3.DocumentProto + .internal_static_google_cloud_documentai_v1beta3_Document_ChunkedDocument_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.ChunkedDocument + getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.ChunkedDocument build() { + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.ChunkedDocument buildPartial() { + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument result = + new com.google.cloud.documentai.v1beta3.Document.ChunkedDocument(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument result) { + if (chunksBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + chunks_ = java.util.Collections.unmodifiableList(chunks_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.chunks_ = chunks_; + } else { + result.chunks_ = chunksBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.documentai.v1beta3.Document.ChunkedDocument) { + return mergeFrom((com.google.cloud.documentai.v1beta3.Document.ChunkedDocument) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.documentai.v1beta3.Document.ChunkedDocument other) { + if (other + == com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.getDefaultInstance()) + return this; + if (chunksBuilder_ == null) { + if (!other.chunks_.isEmpty()) { + if (chunks_.isEmpty()) { + chunks_ = other.chunks_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureChunksIsMutable(); + chunks_.addAll(other.chunks_); + } + onChanged(); + } + } else { + if (!other.chunks_.isEmpty()) { + if (chunksBuilder_.isEmpty()) { + chunksBuilder_.dispose(); + chunksBuilder_ = null; + chunks_ = other.chunks_; + bitField0_ = (bitField0_ & ~0x00000001); + chunksBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getChunksFieldBuilder() + : null; + } else { + chunksBuilder_.addAllMessages(other.chunks_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk m = + input.readMessage( + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk + .parser(), + extensionRegistry); + if (chunksBuilder_ == null) { + ensureChunksIsMutable(); + chunks_.add(m); + } else { + chunksBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List + chunks_ = java.util.Collections.emptyList(); + + private void ensureChunksIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + chunks_ = + new java.util.ArrayList< + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk>(chunks_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk, + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk.Builder, + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.ChunkOrBuilder> + chunksBuilder_; + + /** + * + * + *
+       * List of chunks.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk chunks = 1; + * + */ + public java.util.List + getChunksList() { + if (chunksBuilder_ == null) { + return java.util.Collections.unmodifiableList(chunks_); + } else { + return chunksBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * List of chunks.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk chunks = 1; + * + */ + public int getChunksCount() { + if (chunksBuilder_ == null) { + return chunks_.size(); + } else { + return chunksBuilder_.getCount(); + } + } + /** + * + * + *
+       * List of chunks.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk chunks = 1; + * + */ + public com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk getChunks( + int index) { + if (chunksBuilder_ == null) { + return chunks_.get(index); + } else { + return chunksBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * List of chunks.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk chunks = 1; + * + */ + public Builder setChunks( + int index, com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk value) { + if (chunksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureChunksIsMutable(); + chunks_.set(index, value); + onChanged(); + } else { + chunksBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * List of chunks.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk chunks = 1; + * + */ + public Builder setChunks( + int index, + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk.Builder + builderForValue) { + if (chunksBuilder_ == null) { + ensureChunksIsMutable(); + chunks_.set(index, builderForValue.build()); + onChanged(); + } else { + chunksBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * List of chunks.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk chunks = 1; + * + */ + public Builder addChunks( + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk value) { + if (chunksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureChunksIsMutable(); + chunks_.add(value); + onChanged(); + } else { + chunksBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * List of chunks.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk chunks = 1; + * + */ + public Builder addChunks( + int index, com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk value) { + if (chunksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureChunksIsMutable(); + chunks_.add(index, value); + onChanged(); + } else { + chunksBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * List of chunks.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk chunks = 1; + * + */ + public Builder addChunks( + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk.Builder + builderForValue) { + if (chunksBuilder_ == null) { + ensureChunksIsMutable(); + chunks_.add(builderForValue.build()); + onChanged(); + } else { + chunksBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * List of chunks.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk chunks = 1; + * + */ + public Builder addChunks( + int index, + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk.Builder + builderForValue) { + if (chunksBuilder_ == null) { + ensureChunksIsMutable(); + chunks_.add(index, builderForValue.build()); + onChanged(); + } else { + chunksBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * List of chunks.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk chunks = 1; + * + */ + public Builder addAllChunks( + java.lang.Iterable< + ? extends com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk> + values) { + if (chunksBuilder_ == null) { + ensureChunksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, chunks_); + onChanged(); + } else { + chunksBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * List of chunks.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk chunks = 1; + * + */ + public Builder clearChunks() { + if (chunksBuilder_ == null) { + chunks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + chunksBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * List of chunks.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk chunks = 1; + * + */ + public Builder removeChunks(int index) { + if (chunksBuilder_ == null) { + ensureChunksIsMutable(); + chunks_.remove(index); + onChanged(); + } else { + chunksBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * List of chunks.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk chunks = 1; + * + */ + public com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk.Builder + getChunksBuilder(int index) { + return getChunksFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * List of chunks.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk chunks = 1; + * + */ + public com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.ChunkOrBuilder + getChunksOrBuilder(int index) { + if (chunksBuilder_ == null) { + return chunks_.get(index); + } else { + return chunksBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * List of chunks.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk chunks = 1; + * + */ + public java.util.List< + ? extends com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.ChunkOrBuilder> + getChunksOrBuilderList() { + if (chunksBuilder_ != null) { + return chunksBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(chunks_); + } + } + /** + * + * + *
+       * List of chunks.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk chunks = 1; + * + */ + public com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk.Builder + addChunksBuilder() { + return getChunksFieldBuilder() + .addBuilder( + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk + .getDefaultInstance()); + } + /** + * + * + *
+       * List of chunks.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk chunks = 1; + * + */ + public com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk.Builder + addChunksBuilder(int index) { + return getChunksFieldBuilder() + .addBuilder( + index, + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk + .getDefaultInstance()); + } + /** + * + * + *
+       * List of chunks.
+       * 
+ * + * repeated .google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk chunks = 1; + * + */ + public java.util.List< + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk.Builder> + getChunksBuilderList() { + return getChunksFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk, + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk.Builder, + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.ChunkOrBuilder> + getChunksFieldBuilder() { + if (chunksBuilder_ == null) { + chunksBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk, + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Chunk.Builder, + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.ChunkOrBuilder>( + chunks_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + chunks_ = null; + } + return chunksBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta3.Document.ChunkedDocument) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta3.Document.ChunkedDocument) + private static final com.google.cloud.documentai.v1beta3.Document.ChunkedDocument + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta3.Document.ChunkedDocument(); + } + + public static com.google.cloud.documentai.v1beta3.Document.ChunkedDocument + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ChunkedDocument parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.ChunkedDocument + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + private int bitField0_; private int sourceCase_ = 0; @@ -65843,68 +82406,170 @@ public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { * * *
-   * Placeholder. Revision history of this document.
+   * Placeholder. Revision history of this document.
+   * 
+ * + * repeated .google.cloud.documentai.v1beta3.Document.Revision revisions = 13; + */ + @java.lang.Override + public java.util.List getRevisionsList() { + return revisions_; + } + /** + * + * + *
+   * Placeholder. Revision history of this document.
+   * 
+ * + * repeated .google.cloud.documentai.v1beta3.Document.Revision revisions = 13; + */ + @java.lang.Override + public java.util.List + getRevisionsOrBuilderList() { + return revisions_; + } + /** + * + * + *
+   * Placeholder. Revision history of this document.
+   * 
+ * + * repeated .google.cloud.documentai.v1beta3.Document.Revision revisions = 13; + */ + @java.lang.Override + public int getRevisionsCount() { + return revisions_.size(); + } + /** + * + * + *
+   * Placeholder. Revision history of this document.
+   * 
+ * + * repeated .google.cloud.documentai.v1beta3.Document.Revision revisions = 13; + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.Revision getRevisions(int index) { + return revisions_.get(index); + } + /** + * + * + *
+   * Placeholder. Revision history of this document.
+   * 
+ * + * repeated .google.cloud.documentai.v1beta3.Document.Revision revisions = 13; + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.Document.RevisionOrBuilder getRevisionsOrBuilder( + int index) { + return revisions_.get(index); + } + + public static final int DOCUMENT_LAYOUT_FIELD_NUMBER = 17; + private com.google.cloud.documentai.v1beta3.Document.DocumentLayout documentLayout_; + /** + * + * + *
+   * Parsed layout of the document.
+   * 
+ * + * .google.cloud.documentai.v1beta3.Document.DocumentLayout document_layout = 17; + * + * @return Whether the documentLayout field is set. + */ + @java.lang.Override + public boolean hasDocumentLayout() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+   * Parsed layout of the document.
    * 
* - * repeated .google.cloud.documentai.v1beta3.Document.Revision revisions = 13; + * .google.cloud.documentai.v1beta3.Document.DocumentLayout document_layout = 17; + * + * @return The documentLayout. */ @java.lang.Override - public java.util.List getRevisionsList() { - return revisions_; + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout getDocumentLayout() { + return documentLayout_ == null + ? com.google.cloud.documentai.v1beta3.Document.DocumentLayout.getDefaultInstance() + : documentLayout_; } /** * * *
-   * Placeholder. Revision history of this document.
+   * Parsed layout of the document.
    * 
* - * repeated .google.cloud.documentai.v1beta3.Document.Revision revisions = 13; + * .google.cloud.documentai.v1beta3.Document.DocumentLayout document_layout = 17; */ @java.lang.Override - public java.util.List - getRevisionsOrBuilderList() { - return revisions_; + public com.google.cloud.documentai.v1beta3.Document.DocumentLayoutOrBuilder + getDocumentLayoutOrBuilder() { + return documentLayout_ == null + ? com.google.cloud.documentai.v1beta3.Document.DocumentLayout.getDefaultInstance() + : documentLayout_; } + + public static final int CHUNKED_DOCUMENT_FIELD_NUMBER = 18; + private com.google.cloud.documentai.v1beta3.Document.ChunkedDocument chunkedDocument_; /** * * *
-   * Placeholder. Revision history of this document.
+   * Document chunked based on chunking config.
    * 
* - * repeated .google.cloud.documentai.v1beta3.Document.Revision revisions = 13; + * .google.cloud.documentai.v1beta3.Document.ChunkedDocument chunked_document = 18; + * + * @return Whether the chunkedDocument field is set. */ @java.lang.Override - public int getRevisionsCount() { - return revisions_.size(); + public boolean hasChunkedDocument() { + return ((bitField0_ & 0x00000008) != 0); } /** * * *
-   * Placeholder. Revision history of this document.
+   * Document chunked based on chunking config.
    * 
* - * repeated .google.cloud.documentai.v1beta3.Document.Revision revisions = 13; + * .google.cloud.documentai.v1beta3.Document.ChunkedDocument chunked_document = 18; + * + * @return The chunkedDocument. */ @java.lang.Override - public com.google.cloud.documentai.v1beta3.Document.Revision getRevisions(int index) { - return revisions_.get(index); + public com.google.cloud.documentai.v1beta3.Document.ChunkedDocument getChunkedDocument() { + return chunkedDocument_ == null + ? com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.getDefaultInstance() + : chunkedDocument_; } /** * * *
-   * Placeholder. Revision history of this document.
+   * Document chunked based on chunking config.
    * 
* - * repeated .google.cloud.documentai.v1beta3.Document.Revision revisions = 13; + * .google.cloud.documentai.v1beta3.Document.ChunkedDocument chunked_document = 18; */ @java.lang.Override - public com.google.cloud.documentai.v1beta3.Document.RevisionOrBuilder getRevisionsOrBuilder( - int index) { - return revisions_.get(index); + public com.google.cloud.documentai.v1beta3.Document.ChunkedDocumentOrBuilder + getChunkedDocumentOrBuilder() { + return chunkedDocument_ == null + ? com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.getDefaultInstance() + : chunkedDocument_; } private byte memoizedIsInitialized = -1; @@ -65957,6 +82622,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < textChanges_.size(); i++) { output.writeMessage(14, textChanges_.get(i)); } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(17, getDocumentLayout()); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(18, getChunkedDocument()); + } getUnknownFields().writeTo(output); } @@ -66004,6 +82675,12 @@ public int getSerializedSize() { for (int i = 0; i < textChanges_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, textChanges_.get(i)); } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(17, getDocumentLayout()); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(18, getChunkedDocument()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -66036,6 +82713,14 @@ public boolean equals(final java.lang.Object obj) { if (!getError().equals(other.getError())) return false; } if (!getRevisionsList().equals(other.getRevisionsList())) return false; + if (hasDocumentLayout() != other.hasDocumentLayout()) return false; + if (hasDocumentLayout()) { + if (!getDocumentLayout().equals(other.getDocumentLayout())) return false; + } + if (hasChunkedDocument() != other.hasChunkedDocument()) return false; + if (hasChunkedDocument()) { + if (!getChunkedDocument().equals(other.getChunkedDocument())) return false; + } if (!getSourceCase().equals(other.getSourceCase())) return false; switch (sourceCase_) { case 1: @@ -66094,6 +82779,14 @@ public int hashCode() { hash = (37 * hash) + REVISIONS_FIELD_NUMBER; hash = (53 * hash) + getRevisionsList().hashCode(); } + if (hasDocumentLayout()) { + hash = (37 * hash) + DOCUMENT_LAYOUT_FIELD_NUMBER; + hash = (53 * hash) + getDocumentLayout().hashCode(); + } + if (hasChunkedDocument()) { + hash = (37 * hash) + CHUNKED_DOCUMENT_FIELD_NUMBER; + hash = (53 * hash) + getChunkedDocument().hashCode(); + } switch (sourceCase_) { case 1: hash = (37 * hash) + URI_FIELD_NUMBER; @@ -66257,6 +82950,8 @@ private void maybeForceBuilderInitialization() { getShardInfoFieldBuilder(); getErrorFieldBuilder(); getRevisionsFieldBuilder(); + getDocumentLayoutFieldBuilder(); + getChunkedDocumentFieldBuilder(); } } @@ -66318,6 +83013,16 @@ public Builder clear() { revisionsBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000800); + documentLayout_ = null; + if (documentLayoutBuilder_ != null) { + documentLayoutBuilder_.dispose(); + documentLayoutBuilder_ = null; + } + chunkedDocument_ = null; + if (chunkedDocumentBuilder_ != null) { + chunkedDocumentBuilder_.dispose(); + chunkedDocumentBuilder_ = null; + } sourceCase_ = 0; source_ = null; return this; @@ -66430,6 +83135,16 @@ private void buildPartial0(com.google.cloud.documentai.v1beta3.Document result) result.error_ = errorBuilder_ == null ? error_ : errorBuilder_.build(); to_bitField0_ |= 0x00000002; } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.documentLayout_ = + documentLayoutBuilder_ == null ? documentLayout_ : documentLayoutBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.chunkedDocument_ = + chunkedDocumentBuilder_ == null ? chunkedDocument_ : chunkedDocumentBuilder_.build(); + to_bitField0_ |= 0x00000008; + } result.bitField0_ |= to_bitField0_; } @@ -66661,6 +83376,12 @@ public Builder mergeFrom(com.google.cloud.documentai.v1beta3.Document other) { } } } + if (other.hasDocumentLayout()) { + mergeDocumentLayout(other.getDocumentLayout()); + } + if (other.hasChunkedDocument()) { + mergeChunkedDocument(other.getChunkedDocument()); + } switch (other.getSourceCase()) { case URI: { @@ -66826,6 +83547,18 @@ public Builder mergeFrom( } break; } // case 114 + case 138: + { + input.readMessage(getDocumentLayoutFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00001000; + break; + } // case 138 + case 146: + { + input.readMessage(getChunkedDocumentFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00002000; + break; + } // case 146 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -70056,6 +86789,390 @@ public com.google.cloud.documentai.v1beta3.Document.Revision.Builder addRevision return revisionsBuilder_; } + private com.google.cloud.documentai.v1beta3.Document.DocumentLayout documentLayout_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.Builder, + com.google.cloud.documentai.v1beta3.Document.DocumentLayoutOrBuilder> + documentLayoutBuilder_; + /** + * + * + *
+     * Parsed layout of the document.
+     * 
+ * + * .google.cloud.documentai.v1beta3.Document.DocumentLayout document_layout = 17; + * + * @return Whether the documentLayout field is set. + */ + public boolean hasDocumentLayout() { + return ((bitField0_ & 0x00001000) != 0); + } + /** + * + * + *
+     * Parsed layout of the document.
+     * 
+ * + * .google.cloud.documentai.v1beta3.Document.DocumentLayout document_layout = 17; + * + * @return The documentLayout. + */ + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout getDocumentLayout() { + if (documentLayoutBuilder_ == null) { + return documentLayout_ == null + ? com.google.cloud.documentai.v1beta3.Document.DocumentLayout.getDefaultInstance() + : documentLayout_; + } else { + return documentLayoutBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Parsed layout of the document.
+     * 
+ * + * .google.cloud.documentai.v1beta3.Document.DocumentLayout document_layout = 17; + */ + public Builder setDocumentLayout( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout value) { + if (documentLayoutBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + documentLayout_ = value; + } else { + documentLayoutBuilder_.setMessage(value); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * + * + *
+     * Parsed layout of the document.
+     * 
+ * + * .google.cloud.documentai.v1beta3.Document.DocumentLayout document_layout = 17; + */ + public Builder setDocumentLayout( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.Builder builderForValue) { + if (documentLayoutBuilder_ == null) { + documentLayout_ = builderForValue.build(); + } else { + documentLayoutBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * + * + *
+     * Parsed layout of the document.
+     * 
+ * + * .google.cloud.documentai.v1beta3.Document.DocumentLayout document_layout = 17; + */ + public Builder mergeDocumentLayout( + com.google.cloud.documentai.v1beta3.Document.DocumentLayout value) { + if (documentLayoutBuilder_ == null) { + if (((bitField0_ & 0x00001000) != 0) + && documentLayout_ != null + && documentLayout_ + != com.google.cloud.documentai.v1beta3.Document.DocumentLayout + .getDefaultInstance()) { + getDocumentLayoutBuilder().mergeFrom(value); + } else { + documentLayout_ = value; + } + } else { + documentLayoutBuilder_.mergeFrom(value); + } + if (documentLayout_ != null) { + bitField0_ |= 0x00001000; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Parsed layout of the document.
+     * 
+ * + * .google.cloud.documentai.v1beta3.Document.DocumentLayout document_layout = 17; + */ + public Builder clearDocumentLayout() { + bitField0_ = (bitField0_ & ~0x00001000); + documentLayout_ = null; + if (documentLayoutBuilder_ != null) { + documentLayoutBuilder_.dispose(); + documentLayoutBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Parsed layout of the document.
+     * 
+ * + * .google.cloud.documentai.v1beta3.Document.DocumentLayout document_layout = 17; + */ + public com.google.cloud.documentai.v1beta3.Document.DocumentLayout.Builder + getDocumentLayoutBuilder() { + bitField0_ |= 0x00001000; + onChanged(); + return getDocumentLayoutFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Parsed layout of the document.
+     * 
+ * + * .google.cloud.documentai.v1beta3.Document.DocumentLayout document_layout = 17; + */ + public com.google.cloud.documentai.v1beta3.Document.DocumentLayoutOrBuilder + getDocumentLayoutOrBuilder() { + if (documentLayoutBuilder_ != null) { + return documentLayoutBuilder_.getMessageOrBuilder(); + } else { + return documentLayout_ == null + ? com.google.cloud.documentai.v1beta3.Document.DocumentLayout.getDefaultInstance() + : documentLayout_; + } + } + /** + * + * + *
+     * Parsed layout of the document.
+     * 
+ * + * .google.cloud.documentai.v1beta3.Document.DocumentLayout document_layout = 17; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.Builder, + com.google.cloud.documentai.v1beta3.Document.DocumentLayoutOrBuilder> + getDocumentLayoutFieldBuilder() { + if (documentLayoutBuilder_ == null) { + documentLayoutBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Document.DocumentLayout, + com.google.cloud.documentai.v1beta3.Document.DocumentLayout.Builder, + com.google.cloud.documentai.v1beta3.Document.DocumentLayoutOrBuilder>( + getDocumentLayout(), getParentForChildren(), isClean()); + documentLayout_ = null; + } + return documentLayoutBuilder_; + } + + private com.google.cloud.documentai.v1beta3.Document.ChunkedDocument chunkedDocument_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument, + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Builder, + com.google.cloud.documentai.v1beta3.Document.ChunkedDocumentOrBuilder> + chunkedDocumentBuilder_; + /** + * + * + *
+     * Document chunked based on chunking config.
+     * 
+ * + * .google.cloud.documentai.v1beta3.Document.ChunkedDocument chunked_document = 18; + * + * @return Whether the chunkedDocument field is set. + */ + public boolean hasChunkedDocument() { + return ((bitField0_ & 0x00002000) != 0); + } + /** + * + * + *
+     * Document chunked based on chunking config.
+     * 
+ * + * .google.cloud.documentai.v1beta3.Document.ChunkedDocument chunked_document = 18; + * + * @return The chunkedDocument. + */ + public com.google.cloud.documentai.v1beta3.Document.ChunkedDocument getChunkedDocument() { + if (chunkedDocumentBuilder_ == null) { + return chunkedDocument_ == null + ? com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.getDefaultInstance() + : chunkedDocument_; + } else { + return chunkedDocumentBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Document chunked based on chunking config.
+     * 
+ * + * .google.cloud.documentai.v1beta3.Document.ChunkedDocument chunked_document = 18; + */ + public Builder setChunkedDocument( + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument value) { + if (chunkedDocumentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + chunkedDocument_ = value; + } else { + chunkedDocumentBuilder_.setMessage(value); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * + * + *
+     * Document chunked based on chunking config.
+     * 
+ * + * .google.cloud.documentai.v1beta3.Document.ChunkedDocument chunked_document = 18; + */ + public Builder setChunkedDocument( + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Builder builderForValue) { + if (chunkedDocumentBuilder_ == null) { + chunkedDocument_ = builderForValue.build(); + } else { + chunkedDocumentBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * + * + *
+     * Document chunked based on chunking config.
+     * 
+ * + * .google.cloud.documentai.v1beta3.Document.ChunkedDocument chunked_document = 18; + */ + public Builder mergeChunkedDocument( + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument value) { + if (chunkedDocumentBuilder_ == null) { + if (((bitField0_ & 0x00002000) != 0) + && chunkedDocument_ != null + && chunkedDocument_ + != com.google.cloud.documentai.v1beta3.Document.ChunkedDocument + .getDefaultInstance()) { + getChunkedDocumentBuilder().mergeFrom(value); + } else { + chunkedDocument_ = value; + } + } else { + chunkedDocumentBuilder_.mergeFrom(value); + } + if (chunkedDocument_ != null) { + bitField0_ |= 0x00002000; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Document chunked based on chunking config.
+     * 
+ * + * .google.cloud.documentai.v1beta3.Document.ChunkedDocument chunked_document = 18; + */ + public Builder clearChunkedDocument() { + bitField0_ = (bitField0_ & ~0x00002000); + chunkedDocument_ = null; + if (chunkedDocumentBuilder_ != null) { + chunkedDocumentBuilder_.dispose(); + chunkedDocumentBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Document chunked based on chunking config.
+     * 
+ * + * .google.cloud.documentai.v1beta3.Document.ChunkedDocument chunked_document = 18; + */ + public com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Builder + getChunkedDocumentBuilder() { + bitField0_ |= 0x00002000; + onChanged(); + return getChunkedDocumentFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Document chunked based on chunking config.
+     * 
+ * + * .google.cloud.documentai.v1beta3.Document.ChunkedDocument chunked_document = 18; + */ + public com.google.cloud.documentai.v1beta3.Document.ChunkedDocumentOrBuilder + getChunkedDocumentOrBuilder() { + if (chunkedDocumentBuilder_ != null) { + return chunkedDocumentBuilder_.getMessageOrBuilder(); + } else { + return chunkedDocument_ == null + ? com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.getDefaultInstance() + : chunkedDocument_; + } + } + /** + * + * + *
+     * Document chunked based on chunking config.
+     * 
+ * + * .google.cloud.documentai.v1beta3.Document.ChunkedDocument chunked_document = 18; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument, + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Builder, + com.google.cloud.documentai.v1beta3.Document.ChunkedDocumentOrBuilder> + getChunkedDocumentFieldBuilder() { + if (chunkedDocumentBuilder_ == null) { + chunkedDocumentBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument, + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument.Builder, + com.google.cloud.documentai.v1beta3.Document.ChunkedDocumentOrBuilder>( + getChunkedDocument(), getParentForChildren(), isClean()); + chunkedDocument_ = null; + } + return chunkedDocumentBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentAiProcessor.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentAiProcessor.java index 012a314187ca..bd11b11c1076 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentAiProcessor.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentAiProcessor.java @@ -60,61 +60,61 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "umentai/v1beta3/document_schema.proto\0320g" + "oogle/cloud/documentai/v1beta3/evaluatio" + "n.proto\032\037google/protobuf/timestamp.proto" - + "\"\372\010\n\020ProcessorVersion\022\014\n\004name\030\001 \001(\t\022\024\n\014d" - + "isplay_name\030\002 \001(\t\022H\n\017document_schema\030\014 \001" - + "(\0132/.google.cloud.documentai.v1beta3.Doc" - + "umentSchema\022F\n\005state\030\006 \001(\01627.google.clou" - + "d.documentai.v1beta3.ProcessorVersion.St" - + "ate\022/\n\013create_time\030\007 \001(\0132\032.google.protob" - + "uf.Timestamp\022O\n\021latest_evaluation\030\010 \001(\0132" - + "4.google.cloud.documentai.v1beta3.Evalua" - + "tionReference\022\024\n\014kms_key_name\030\t \001(\t\022\034\n\024k" - + "ms_key_version_name\030\n \001(\t\022\033\n\016google_mana" - + "ged\030\013 \001(\010B\003\340A\003\022[\n\020deprecation_info\030\r \001(\013" - + "2A.google.cloud.documentai.v1beta3.Proce" - + "ssorVersion.DeprecationInfo\022T\n\nmodel_typ" - + "e\030\017 \001(\0162;.google.cloud.documentai.v1beta" - + "3.ProcessorVersion.ModelTypeB\003\340A\003\032\237\001\n\017De" - + "precationInfo\0224\n\020deprecation_time\030\001 \001(\0132" - + "\032.google.protobuf.Timestamp\022V\n\035replaceme" - + "nt_processor_version\030\002 \001(\tB/\372A,\n*documen" - + "tai.googleapis.com/ProcessorVersion\"\223\001\n\005" - + "State\022\025\n\021STATE_UNSPECIFIED\020\000\022\014\n\010DEPLOYED" - + "\020\001\022\r\n\tDEPLOYING\020\002\022\016\n\nUNDEPLOYED\020\003\022\017\n\013UND" - + "EPLOYING\020\004\022\014\n\010CREATING\020\005\022\014\n\010DELETING\020\006\022\n" - + "\n\006FAILED\020\007\022\r\n\tIMPORTING\020\010\"Y\n\tModelType\022\032" - + "\n\026MODEL_TYPE_UNSPECIFIED\020\000\022\031\n\025MODEL_TYPE" - + "_GENERATIVE\020\001\022\025\n\021MODEL_TYPE_CUSTOM\020\002:\226\001\352" - + "A\222\001\n*documentai.googleapis.com/Processor" - + "Version\022dprojects/{project}/locations/{l" - + "ocation}/processors/{processor}/processo" - + "rVersions/{processor_version}\"r\n\025Process" - + "orVersionAlias\022\r\n\005alias\030\001 \001(\t\022J\n\021process" - + "or_version\030\002 \001(\tB/\372A,\n*documentai.google" - + "apis.com/ProcessorVersion\"\222\005\n\tProcessor\022" - + "\024\n\004name\030\001 \001(\tB\006\340A\005\340A\003\022\014\n\004type\030\002 \001(\t\022\024\n\014d" - + "isplay_name\030\003 \001(\t\022D\n\005state\030\004 \001(\01620.googl" - + "e.cloud.documentai.v1beta3.Processor.Sta" - + "teB\003\340A\003\022R\n\031default_processor_version\030\t \001" - + "(\tB/\372A,\n*documentai.googleapis.com/Proce" - + "ssorVersion\022^\n\031processor_version_aliases" - + "\030\n \003(\01326.google.cloud.documentai.v1beta3" - + ".ProcessorVersionAliasB\003\340A\003\022 \n\020process_e" - + "ndpoint\030\006 \001(\tB\006\340A\003\340A\005\022/\n\013create_time\030\007 \001" - + "(\0132\032.google.protobuf.Timestamp\022\024\n\014kms_ke" - + "y_name\030\010 \001(\t\"~\n\005State\022\025\n\021STATE_UNSPECIFI" - + "ED\020\000\022\013\n\007ENABLED\020\001\022\014\n\010DISABLED\020\002\022\014\n\010ENABL" - + "ING\020\003\022\r\n\tDISABLING\020\004\022\014\n\010CREATING\020\005\022\n\n\006FA" - + "ILED\020\006\022\014\n\010DELETING\020\007:h\352Ae\n#documentai.go" - + "ogleapis.com/Processor\022>projects/{projec" - + "t}/locations/{location}/processors/{proc" - + "essor}B\352\001\n#com.google.cloud.documentai.v" - + "1beta3B\023DocumentAiProcessorP\001ZCcloud.goo" - + "gle.com/go/documentai/apiv1beta3/documen" - + "taipb;documentaipb\252\002\037Google.Cloud.Docume" - + "ntAI.V1Beta3\312\002\037Google\\Cloud\\DocumentAI\\V" - + "1beta3\352\002\"Google::Cloud::DocumentAI::V1be" - + "ta3b\006proto3" + + "\"\204\t\n\020ProcessorVersion\022\021\n\004name\030\001 \001(\tB\003\340A\010" + + "\022\024\n\014display_name\030\002 \001(\t\022H\n\017document_schem" + + "a\030\014 \001(\0132/.google.cloud.documentai.v1beta" + + "3.DocumentSchema\022K\n\005state\030\006 \001(\01627.google" + + ".cloud.documentai.v1beta3.ProcessorVersi" + + "on.StateB\003\340A\003\022/\n\013create_time\030\007 \001(\0132\032.goo" + + "gle.protobuf.Timestamp\022O\n\021latest_evaluat" + + "ion\030\010 \001(\01324.google.cloud.documentai.v1be" + + "ta3.EvaluationReference\022\024\n\014kms_key_name\030" + + "\t \001(\t\022\034\n\024kms_key_version_name\030\n \001(\t\022\033\n\016g" + + "oogle_managed\030\013 \001(\010B\003\340A\003\022[\n\020deprecation_" + + "info\030\r \001(\0132A.google.cloud.documentai.v1b" + + "eta3.ProcessorVersion.DeprecationInfo\022T\n" + + "\nmodel_type\030\017 \001(\0162;.google.cloud.documen" + + "tai.v1beta3.ProcessorVersion.ModelTypeB\003" + + "\340A\003\032\237\001\n\017DeprecationInfo\0224\n\020deprecation_t" + + "ime\030\001 \001(\0132\032.google.protobuf.Timestamp\022V\n" + + "\035replacement_processor_version\030\002 \001(\tB/\372A" + + ",\n*documentai.googleapis.com/ProcessorVe" + + "rsion\"\223\001\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\014" + + "\n\010DEPLOYED\020\001\022\r\n\tDEPLOYING\020\002\022\016\n\nUNDEPLOYE" + + "D\020\003\022\017\n\013UNDEPLOYING\020\004\022\014\n\010CREATING\020\005\022\014\n\010DE" + + "LETING\020\006\022\n\n\006FAILED\020\007\022\r\n\tIMPORTING\020\010\"Y\n\tM" + + "odelType\022\032\n\026MODEL_TYPE_UNSPECIFIED\020\000\022\031\n\025" + + "MODEL_TYPE_GENERATIVE\020\001\022\025\n\021MODEL_TYPE_CU" + + "STOM\020\002:\226\001\352A\222\001\n*documentai.googleapis.com" + + "/ProcessorVersion\022dprojects/{project}/lo" + + "cations/{location}/processors/{processor" + + "}/processorVersions/{processor_version}\"" + + "r\n\025ProcessorVersionAlias\022\r\n\005alias\030\001 \001(\t\022" + + "J\n\021processor_version\030\002 \001(\tB/\372A,\n*documen" + + "tai.googleapis.com/ProcessorVersion\"\222\005\n\t" + + "Processor\022\024\n\004name\030\001 \001(\tB\006\340A\005\340A\003\022\014\n\004type\030" + + "\002 \001(\t\022\024\n\014display_name\030\003 \001(\t\022D\n\005state\030\004 \001" + + "(\01620.google.cloud.documentai.v1beta3.Pro" + + "cessor.StateB\003\340A\003\022R\n\031default_processor_v" + + "ersion\030\t \001(\tB/\372A,\n*documentai.googleapis" + + ".com/ProcessorVersion\022^\n\031processor_versi" + + "on_aliases\030\n \003(\01326.google.cloud.document" + + "ai.v1beta3.ProcessorVersionAliasB\003\340A\003\022 \n" + + "\020process_endpoint\030\006 \001(\tB\006\340A\003\340A\005\022/\n\013creat" + + "e_time\030\007 \001(\0132\032.google.protobuf.Timestamp" + + "\022\024\n\014kms_key_name\030\010 \001(\t\"~\n\005State\022\025\n\021STATE" + + "_UNSPECIFIED\020\000\022\013\n\007ENABLED\020\001\022\014\n\010DISABLED\020" + + "\002\022\014\n\010ENABLING\020\003\022\r\n\tDISABLING\020\004\022\014\n\010CREATI" + + "NG\020\005\022\n\n\006FAILED\020\006\022\014\n\010DELETING\020\007:h\352Ae\n#doc" + + "umentai.googleapis.com/Processor\022>projec" + + "ts/{project}/locations/{location}/proces" + + "sors/{processor}B\352\001\n#com.google.cloud.do" + + "cumentai.v1beta3B\023DocumentAiProcessorP\001Z" + + "Ccloud.google.com/go/documentai/apiv1bet" + + "a3/documentaipb;documentaipb\252\002\037Google.Cl" + + "oud.DocumentAI.V1Beta3\312\002\037Google\\Cloud\\Do" + + "cumentAI\\V1beta3\352\002\"Google::Cloud::Docume" + + "ntAI::V1beta3b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentAiProcessorService.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentAiProcessorService.java index ae090246c4f3..f1822854a4ed 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentAiProcessorService.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentAiProcessorService.java @@ -32,6 +32,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_documentai_v1beta3_ProcessOptions_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_documentai_v1beta3_ProcessOptions_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_documentai_v1beta3_ProcessOptions_LayoutConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_documentai_v1beta3_ProcessOptions_LayoutConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_documentai_v1beta3_ProcessOptions_LayoutConfig_ChunkingConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_documentai_v1beta3_ProcessOptions_LayoutConfig_ChunkingConfig_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_documentai_v1beta3_ProcessOptions_IndividualPageSelector_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -311,428 +319,437 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "operations.proto\032\033google/protobuf/empty." + "proto\032 google/protobuf/field_mask.proto\032" + "\037google/protobuf/timestamp.proto\032\027google" - + "/rpc/status.proto\"\361\002\n\016ProcessOptions\022j\n\030" + + "/rpc/status.proto\"\364\005\n\016ProcessOptions\022j\n\030" + "individual_page_selector\030\005 \001(\0132F.google." + "cloud.documentai.v1beta3.ProcessOptions." + "IndividualPageSelectorH\000\022\024\n\nfrom_start\030\006" + " \001(\005H\000\022\022\n\010from_end\030\007 \001(\005H\000\022>\n\nocr_config" + "\030\001 \001(\0132*.google.cloud.documentai.v1beta3" - + ".OcrConfig\022M\n\017schema_override\030\010 \001(\0132/.go" - + "ogle.cloud.documentai.v1beta3.DocumentSc" - + "hemaB\003\340A\001\032,\n\026IndividualPageSelector\022\022\n\005p" - + "ages\030\001 \003(\005B\003\340A\001B\014\n\npage_range\"\334\004\n\016Proces" - + "sRequest\022D\n\017inline_document\030\004 \001(\0132).goog" - + "le.cloud.documentai.v1beta3.DocumentH\000\022D" - + "\n\014raw_document\030\005 \001(\0132,.google.cloud.docu" - + "mentai.v1beta3.RawDocumentH\000\022D\n\014gcs_docu" - + "ment\030\010 \001(\0132,.google.cloud.documentai.v1b" - + "eta3.GcsDocumentH\000\022\027\n\004name\030\001 \001(\tB\t\340A\002\372A\003" - + "\n\001*\022?\n\010document\030\002 \001(\0132).google.cloud.doc" - + "umentai.v1beta3.DocumentB\002\030\001\022\031\n\021skip_hum" - + "an_review\030\003 \001(\010\022.\n\nfield_mask\030\006 \001(\0132\032.go" - + "ogle.protobuf.FieldMask\022H\n\017process_optio" - + "ns\030\007 \001(\0132/.google.cloud.documentai.v1bet" - + "a3.ProcessOptions\022P\n\006labels\030\n \003(\0132;.goog" - + "le.cloud.documentai.v1beta3.ProcessReque" - + "st.LabelsEntryB\003\340A\001\032-\n\013LabelsEntry\022\013\n\003ke" - + "y\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001B\010\n\006source\"\363\001\n" - + "\021HumanReviewStatus\022G\n\005state\030\001 \001(\01628.goog" - + "le.cloud.documentai.v1beta3.HumanReviewS" - + "tatus.State\022\025\n\rstate_message\030\002 \001(\t\022\036\n\026hu" - + "man_review_operation\030\003 \001(\t\"^\n\005State\022\025\n\021S" - + "TATE_UNSPECIFIED\020\000\022\013\n\007SKIPPED\020\001\022\025\n\021VALID" - + "ATION_PASSED\020\002\022\017\n\013IN_PROGRESS\020\003\022\t\n\005ERROR" - + "\020\004\"\303\001\n\017ProcessResponse\022;\n\010document\030\001 \001(\013" - + "2).google.cloud.documentai.v1beta3.Docum" - + "ent\022\"\n\026human_review_operation\030\002 \001(\tB\002\030\001\022" - + "O\n\023human_review_status\030\003 \001(\01322.google.cl" - + "oud.documentai.v1beta3.HumanReviewStatus" - + "\"\373\005\n\023BatchProcessRequest\022\027\n\004name\030\001 \001(\tB\t" - + "\340A\002\372A\003\n\001*\022`\n\rinput_configs\030\002 \003(\0132E.googl" - + "e.cloud.documentai.v1beta3.BatchProcessR" - + "equest.BatchInputConfigB\002\030\001\022a\n\routput_co" - + "nfig\030\003 \001(\0132F.google.cloud.documentai.v1b" - + "eta3.BatchProcessRequest.BatchOutputConf" - + "igB\002\030\001\022S\n\017input_documents\030\005 \001(\0132:.google" - + ".cloud.documentai.v1beta3.BatchDocuments" - + "InputConfig\022U\n\026document_output_config\030\006 " - + "\001(\01325.google.cloud.documentai.v1beta3.Do" - + "cumentOutputConfig\022\031\n\021skip_human_review\030" - + "\004 \001(\010\022H\n\017process_options\030\007 \001(\0132/.google." - + "cloud.documentai.v1beta3.ProcessOptions\022" - + "U\n\006labels\030\t \003(\0132@.google.cloud.documenta" - + "i.v1beta3.BatchProcessRequest.LabelsEntr" - + "yB\003\340A\001\032=\n\020BatchInputConfig\022\022\n\ngcs_source" - + "\030\001 \001(\t\022\021\n\tmime_type\030\002 \001(\t:\002\030\001\0320\n\021BatchOu" - + "tputConfig\022\027\n\017gcs_destination\030\001 \001(\t:\002\030\001\032" - + "-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001" - + "(\t:\0028\001\"\026\n\024BatchProcessResponse\"\262\005\n\024Batch" - + "ProcessMetadata\022J\n\005state\030\001 \001(\0162;.google." - + "cloud.documentai.v1beta3.BatchProcessMet" - + "adata.State\022\025\n\rstate_message\030\002 \001(\t\022/\n\013cr" - + "eate_time\030\003 \001(\0132\032.google.protobuf.Timest" - + "amp\022/\n\013update_time\030\004 \001(\0132\032.google.protob" - + "uf.Timestamp\022r\n\033individual_process_statu" - + "ses\030\005 \003(\0132M.google.cloud.documentai.v1be" - + "ta3.BatchProcessMetadata.IndividualProce" - + "ssStatus\032\354\001\n\027IndividualProcessStatus\022\030\n\020" - + "input_gcs_source\030\001 \001(\t\022\"\n\006status\030\002 \001(\0132\022" - + ".google.rpc.Status\022\036\n\026output_gcs_destina" - + "tion\030\003 \001(\t\022\"\n\026human_review_operation\030\004 \001" - + "(\tB\002\030\001\022O\n\023human_review_status\030\005 \001(\01322.go" - + "ogle.cloud.documentai.v1beta3.HumanRevie" - + "wStatus\"r\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022" - + "\013\n\007WAITING\020\001\022\013\n\007RUNNING\020\002\022\r\n\tSUCCEEDED\020\003" - + "\022\016\n\nCANCELLING\020\004\022\r\n\tCANCELLED\020\005\022\n\n\006FAILE" - + "D\020\006\"]\n\032FetchProcessorTypesRequest\022?\n\006par" - + "ent\030\001 \001(\tB/\340A\002\372A)\022\'documentai.googleapis" - + ".com/ProcessorType\"f\n\033FetchProcessorType" - + "sResponse\022G\n\017processor_types\030\001 \003(\0132..goo" - + "gle.cloud.documentai.v1beta3.ProcessorTy" - + "pe\"\203\001\n\031ListProcessorTypesRequest\022?\n\006pare" - + "nt\030\001 \001(\tB/\340A\002\372A)\022\'documentai.googleapis." - + "com/ProcessorType\022\021\n\tpage_size\030\002 \001(\005\022\022\n\n" - + "page_token\030\003 \001(\t\"~\n\032ListProcessorTypesRe" - + "sponse\022G\n\017processor_types\030\001 \003(\0132..google" - + ".cloud.documentai.v1beta3.ProcessorType\022" - + "\027\n\017next_page_token\030\002 \001(\t\"{\n\025ListProcesso" - + "rsRequest\022;\n\006parent\030\001 \001(\tB+\340A\002\372A%\022#docum" - + "entai.googleapis.com/Processor\022\021\n\tpage_s" - + "ize\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"q\n\026ListPro" - + "cessorsResponse\022>\n\nprocessors\030\001 \003(\0132*.go" - + "ogle.cloud.documentai.v1beta3.Processor\022" - + "\027\n\017next_page_token\030\002 \001(\t\"X\n\027GetProcessor" - + "TypeRequest\022=\n\004name\030\001 \001(\tB/\340A\002\372A)\n\'docum" - + "entai.googleapis.com/ProcessorType\"P\n\023Ge" - + "tProcessorRequest\0229\n\004name\030\001 \001(\tB+\340A\002\372A%\n" - + "#documentai.googleapis.com/Processor\"^\n\032" - + "GetProcessorVersionRequest\022@\n\004name\030\001 \001(\t" - + "B2\340A\002\372A,\n*documentai.googleapis.com/Proc" - + "essorVersion\"\211\001\n\034ListProcessorVersionsRe" - + "quest\022B\n\006parent\030\001 \001(\tB2\340A\002\372A,\022*documenta" - + "i.googleapis.com/ProcessorVersion\022\021\n\tpag" - + "e_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"\207\001\n\035Lis" - + "tProcessorVersionsResponse\022M\n\022processor_" - + "versions\030\001 \003(\01321.google.cloud.documentai" - + ".v1beta3.ProcessorVersion\022\027\n\017next_page_t" - + "oken\030\002 \001(\t\"a\n\035DeleteProcessorVersionRequ" - + "est\022@\n\004name\030\001 \001(\tB2\340A\002\372A,\n*documentai.go" - + "ogleapis.com/ProcessorVersion\"s\n\036DeleteP" - + "rocessorVersionMetadata\022Q\n\017common_metada" - + "ta\030\001 \001(\01328.google.cloud.documentai.v1bet" - + "a3.CommonOperationMetadata\"a\n\035DeployProc" - + "essorVersionRequest\022@\n\004name\030\001 \001(\tB2\340A\002\372A" - + ",\n*documentai.googleapis.com/ProcessorVe" - + "rsion\" \n\036DeployProcessorVersionResponse\"" - + "s\n\036DeployProcessorVersionMetadata\022Q\n\017com" - + "mon_metadata\030\001 \001(\01328.google.cloud.docume" - + "ntai.v1beta3.CommonOperationMetadata\"c\n\037" - + "UndeployProcessorVersionRequest\022@\n\004name\030" - + "\001 \001(\tB2\340A\002\372A,\n*documentai.googleapis.com" - + "/ProcessorVersion\"\"\n UndeployProcessorVe" - + "rsionResponse\"u\n UndeployProcessorVersio" - + "nMetadata\022Q\n\017common_metadata\030\001 \001(\01328.goo" - + "gle.cloud.documentai.v1beta3.CommonOpera" - + "tionMetadata\"\231\001\n\026CreateProcessorRequest\022" - + ";\n\006parent\030\001 \001(\tB+\340A\002\372A%\022#documentai.goog" - + "leapis.com/Processor\022B\n\tprocessor\030\002 \001(\0132" - + "*.google.cloud.documentai.v1beta3.Proces" - + "sorB\003\340A\002\"S\n\026DeleteProcessorRequest\0229\n\004na" - + "me\030\001 \001(\tB+\340A\002\372A%\n#documentai.googleapis." - + "com/Processor\"l\n\027DeleteProcessorMetadata" - + "\022Q\n\017common_metadata\030\005 \001(\01328.google.cloud" - + ".documentai.v1beta3.CommonOperationMetad" - + "ata\"S\n\026EnableProcessorRequest\0229\n\004name\030\001 " - + "\001(\tB+\340A\002\372A%\n#documentai.googleapis.com/P" - + "rocessor\"\031\n\027EnableProcessorResponse\"l\n\027E" - + "nableProcessorMetadata\022Q\n\017common_metadat" - + "a\030\005 \001(\01328.google.cloud.documentai.v1beta" - + "3.CommonOperationMetadata\"T\n\027DisableProc" - + "essorRequest\0229\n\004name\030\001 \001(\tB+\340A\002\372A%\n#docu" - + "mentai.googleapis.com/Processor\"\032\n\030Disab" - + "leProcessorResponse\"m\n\030DisableProcessorM" - + "etadata\022Q\n\017common_metadata\030\005 \001(\01328.googl" - + "e.cloud.documentai.v1beta3.CommonOperati" - + "onMetadata\"\272\001\n!SetDefaultProcessorVersio" - + "nRequest\022>\n\tprocessor\030\001 \001(\tB+\340A\002\372A%\n#doc" - + "umentai.googleapis.com/Processor\022U\n\031defa" - + "ult_processor_version\030\002 \001(\tB2\340A\002\372A,\n*doc" + + ".OcrConfig\022X\n\rlayout_config\030\t \001(\0132<.goog" + + "le.cloud.documentai.v1beta3.ProcessOptio" + + "ns.LayoutConfigB\003\340A\001\022M\n\017schema_override\030" + + "\010 \001(\0132/.google.cloud.documentai.v1beta3." + + "DocumentSchemaB\003\340A\001\032\246\002\n\014LayoutConfig\022i\n\017" + + "chunking_config\030\001 \001(\0132K.google.cloud.doc" + + "umentai.v1beta3.ProcessOptions.LayoutCon" + + "fig.ChunkingConfigB\003\340A\001\032\252\001\n\016ChunkingConf" + + "ig\022\027\n\nchunk_size\030\001 \001(\005B\003\340A\001\022&\n\031include_a" + + "ncestor_headings\030\002 \001(\010B\003\340A\001\022)\n\034semantic_" + + "chunking_group_size\030\003 \001(\010B\003\340A\001\022,\n\037breakp" + + "oint_percentile_threshold\030\004 \001(\005B\003\340A\001\032,\n\026" + + "IndividualPageSelector\022\022\n\005pages\030\001 \003(\005B\003\340" + + "A\001B\014\n\npage_range\"\334\004\n\016ProcessRequest\022D\n\017i" + + "nline_document\030\004 \001(\0132).google.cloud.docu" + + "mentai.v1beta3.DocumentH\000\022D\n\014raw_documen" + + "t\030\005 \001(\0132,.google.cloud.documentai.v1beta" + + "3.RawDocumentH\000\022D\n\014gcs_document\030\010 \001(\0132,." + + "google.cloud.documentai.v1beta3.GcsDocum" + + "entH\000\022\027\n\004name\030\001 \001(\tB\t\340A\002\372A\003\n\001*\022?\n\010docume" + + "nt\030\002 \001(\0132).google.cloud.documentai.v1bet" + + "a3.DocumentB\002\030\001\022\031\n\021skip_human_review\030\003 \001" + + "(\010\022.\n\nfield_mask\030\006 \001(\0132\032.google.protobuf" + + ".FieldMask\022H\n\017process_options\030\007 \001(\0132/.go" + + "ogle.cloud.documentai.v1beta3.ProcessOpt" + + "ions\022P\n\006labels\030\n \003(\0132;.google.cloud.docu" + + "mentai.v1beta3.ProcessRequest.LabelsEntr" + + "yB\003\340A\001\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005va" + + "lue\030\002 \001(\t:\0028\001B\010\n\006source\"\363\001\n\021HumanReviewS" + + "tatus\022G\n\005state\030\001 \001(\01628.google.cloud.docu" + + "mentai.v1beta3.HumanReviewStatus.State\022\025" + + "\n\rstate_message\030\002 \001(\t\022\036\n\026human_review_op" + + "eration\030\003 \001(\t\"^\n\005State\022\025\n\021STATE_UNSPECIF" + + "IED\020\000\022\013\n\007SKIPPED\020\001\022\025\n\021VALIDATION_PASSED\020" + + "\002\022\017\n\013IN_PROGRESS\020\003\022\t\n\005ERROR\020\004\"\303\001\n\017Proces" + + "sResponse\022;\n\010document\030\001 \001(\0132).google.clo" + + "ud.documentai.v1beta3.Document\022\"\n\026human_" + + "review_operation\030\002 \001(\tB\002\030\001\022O\n\023human_revi" + + "ew_status\030\003 \001(\01322.google.cloud.documenta" + + "i.v1beta3.HumanReviewStatus\"\373\005\n\023BatchPro" + + "cessRequest\022\027\n\004name\030\001 \001(\tB\t\340A\002\372A\003\n\001*\022`\n\r" + + "input_configs\030\002 \003(\0132E.google.cloud.docum" + + "entai.v1beta3.BatchProcessRequest.BatchI" + + "nputConfigB\002\030\001\022a\n\routput_config\030\003 \001(\0132F." + + "google.cloud.documentai.v1beta3.BatchPro" + + "cessRequest.BatchOutputConfigB\002\030\001\022S\n\017inp" + + "ut_documents\030\005 \001(\0132:.google.cloud.docume" + + "ntai.v1beta3.BatchDocumentsInputConfig\022U" + + "\n\026document_output_config\030\006 \001(\01325.google." + + "cloud.documentai.v1beta3.DocumentOutputC" + + "onfig\022\031\n\021skip_human_review\030\004 \001(\010\022H\n\017proc" + + "ess_options\030\007 \001(\0132/.google.cloud.documen" + + "tai.v1beta3.ProcessOptions\022U\n\006labels\030\t \003" + + "(\0132@.google.cloud.documentai.v1beta3.Bat" + + "chProcessRequest.LabelsEntryB\003\340A\001\032=\n\020Bat" + + "chInputConfig\022\022\n\ngcs_source\030\001 \001(\t\022\021\n\tmim" + + "e_type\030\002 \001(\t:\002\030\001\0320\n\021BatchOutputConfig\022\027\n" + + "\017gcs_destination\030\001 \001(\t:\002\030\001\032-\n\013LabelsEntr" + + "y\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\026\n\024Bat" + + "chProcessResponse\"\262\005\n\024BatchProcessMetada" + + "ta\022J\n\005state\030\001 \001(\0162;.google.cloud.documen" + + "tai.v1beta3.BatchProcessMetadata.State\022\025" + + "\n\rstate_message\030\002 \001(\t\022/\n\013create_time\030\003 \001" + + "(\0132\032.google.protobuf.Timestamp\022/\n\013update" + + "_time\030\004 \001(\0132\032.google.protobuf.Timestamp\022" + + "r\n\033individual_process_statuses\030\005 \003(\0132M.g" + + "oogle.cloud.documentai.v1beta3.BatchProc" + + "essMetadata.IndividualProcessStatus\032\354\001\n\027" + + "IndividualProcessStatus\022\030\n\020input_gcs_sou" + + "rce\030\001 \001(\t\022\"\n\006status\030\002 \001(\0132\022.google.rpc.S" + + "tatus\022\036\n\026output_gcs_destination\030\003 \001(\t\022\"\n" + + "\026human_review_operation\030\004 \001(\tB\002\030\001\022O\n\023hum" + + "an_review_status\030\005 \001(\01322.google.cloud.do" + + "cumentai.v1beta3.HumanReviewStatus\"r\n\005St" + + "ate\022\025\n\021STATE_UNSPECIFIED\020\000\022\013\n\007WAITING\020\001\022" + + "\013\n\007RUNNING\020\002\022\r\n\tSUCCEEDED\020\003\022\016\n\nCANCELLIN" + + "G\020\004\022\r\n\tCANCELLED\020\005\022\n\n\006FAILED\020\006\"]\n\032FetchP" + + "rocessorTypesRequest\022?\n\006parent\030\001 \001(\tB/\340A" + + "\002\372A)\022\'documentai.googleapis.com/Processo" + + "rType\"f\n\033FetchProcessorTypesResponse\022G\n\017" + + "processor_types\030\001 \003(\0132..google.cloud.doc" + + "umentai.v1beta3.ProcessorType\"\203\001\n\031ListPr" + + "ocessorTypesRequest\022?\n\006parent\030\001 \001(\tB/\340A\002" + + "\372A)\022\'documentai.googleapis.com/Processor" + + "Type\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 " + + "\001(\t\"~\n\032ListProcessorTypesResponse\022G\n\017pro" + + "cessor_types\030\001 \003(\0132..google.cloud.docume" + + "ntai.v1beta3.ProcessorType\022\027\n\017next_page_" + + "token\030\002 \001(\t\"{\n\025ListProcessorsRequest\022;\n\006" + + "parent\030\001 \001(\tB+\340A\002\372A%\022#documentai.googlea" + + "pis.com/Processor\022\021\n\tpage_size\030\002 \001(\005\022\022\n\n" + + "page_token\030\003 \001(\t\"q\n\026ListProcessorsRespon" + + "se\022>\n\nprocessors\030\001 \003(\0132*.google.cloud.do" + + "cumentai.v1beta3.Processor\022\027\n\017next_page_" + + "token\030\002 \001(\t\"X\n\027GetProcessorTypeRequest\022=" + + "\n\004name\030\001 \001(\tB/\340A\002\372A)\n\'documentai.googlea" + + "pis.com/ProcessorType\"P\n\023GetProcessorReq" + + "uest\0229\n\004name\030\001 \001(\tB+\340A\002\372A%\n#documentai.g" + + "oogleapis.com/Processor\"^\n\032GetProcessorV" + + "ersionRequest\022@\n\004name\030\001 \001(\tB2\340A\002\372A,\n*doc" + "umentai.googleapis.com/ProcessorVersion\"" - + "$\n\"SetDefaultProcessorVersionResponse\"w\n" - + "\"SetDefaultProcessorVersionMetadata\022Q\n\017c" - + "ommon_metadata\030\001 \001(\01328.google.cloud.docu" - + "mentai.v1beta3.CommonOperationMetadata\"\314" - + "\t\n\034TrainProcessorVersionRequest\022\213\001\n\"cust" - + "om_document_extraction_options\030\005 \001(\0132].g" - + "oogle.cloud.documentai.v1beta3.TrainProc" - + "essorVersionRequest.CustomDocumentExtrac" - + "tionOptionsH\000\022\205\001\n\037foundation_model_tunin" - + "g_options\030\014 \001(\0132Z.google.cloud.documenta" - + "i.v1beta3.TrainProcessorVersionRequest.F" - + "oundationModelTuningOptionsH\000\022;\n\006parent\030" - + "\001 \001(\tB+\340A\002\372A%\n#documentai.googleapis.com" - + "/Processor\022Q\n\021processor_version\030\002 \001(\01321." - + "google.cloud.documentai.v1beta3.Processo" - + "rVersionB\003\340A\002\022M\n\017document_schema\030\n \001(\0132/" - + ".google.cloud.documentai.v1beta3.Documen" - + "tSchemaB\003\340A\001\022`\n\ninput_data\030\004 \001(\0132G.googl" - + "e.cloud.documentai.v1beta3.TrainProcesso" - + "rVersionRequest.InputDataB\003\340A\001\022#\n\026base_p" - + "rocessor_version\030\010 \001(\tB\003\340A\001\032\267\001\n\tInputDat" - + "a\022V\n\022training_documents\030\003 \001(\0132:.google.c" - + "loud.documentai.v1beta3.BatchDocumentsIn" - + "putConfig\022R\n\016test_documents\030\004 \001(\0132:.goog" - + "le.cloud.documentai.v1beta3.BatchDocumen" - + "tsInputConfig\032\201\002\n\037CustomDocumentExtracti" - + "onOptions\022\205\001\n\017training_method\030\003 \001(\0162l.go" - + "ogle.cloud.documentai.v1beta3.TrainProce" - + "ssorVersionRequest.CustomDocumentExtract" - + "ionOptions.TrainingMethod\"V\n\016TrainingMet" - + "hod\022\037\n\033TRAINING_METHOD_UNSPECIFIED\020\000\022\017\n\013" - + "MODEL_BASED\020\001\022\022\n\016TEMPLATE_BASED\020\002\032_\n\034Fou" - + "ndationModelTuningOptions\022\030\n\013train_steps" - + "\030\002 \001(\005B\003\340A\001\022%\n\030learning_rate_multiplier\030" - + "\003 \001(\002B\003\340A\001B\021\n\017processor_flags\":\n\035TrainPr" - + "ocessorVersionResponse\022\031\n\021processor_vers" - + "ion\030\001 \001(\t\"\206\004\n\035TrainProcessorVersionMetad" - + "ata\022Q\n\017common_metadata\030\001 \001(\01328.google.cl" - + "oud.documentai.v1beta3.CommonOperationMe" - + "tadata\022u\n\033training_dataset_validation\030\002 " - + "\001(\0132P.google.cloud.documentai.v1beta3.Tr" - + "ainProcessorVersionMetadata.DatasetValid" - + "ation\022q\n\027test_dataset_validation\030\003 \001(\0132P" - + ".google.cloud.documentai.v1beta3.TrainPr" - + "ocessorVersionMetadata.DatasetValidation" - + "\032\247\001\n\021DatasetValidation\022\034\n\024document_error" - + "_count\030\003 \001(\005\022\033\n\023dataset_error_count\030\004 \001(" - + "\005\022+\n\017document_errors\030\001 \003(\0132\022.google.rpc." - + "Status\022*\n\016dataset_errors\030\002 \003(\0132\022.google." - + "rpc.Status\"\336\003\n\025ReviewDocumentRequest\022D\n\017" - + "inline_document\030\004 \001(\0132).google.cloud.doc" - + "umentai.v1beta3.DocumentH\000\022P\n\023human_revi" - + "ew_config\030\001 \001(\tB3\340A\002\372A-\n+documentai.goog" - + "leapis.com/HumanReviewConfig\022?\n\010document" - + "\030\002 \001(\0132).google.cloud.documentai.v1beta3" - + ".DocumentB\002\030\001\022 \n\030enable_schema_validatio" - + "n\030\003 \001(\010\022Q\n\010priority\030\005 \001(\0162?.google.cloud" - + ".documentai.v1beta3.ReviewDocumentReques" - + "t.Priority\022H\n\017document_schema\030\006 \001(\0132/.go" - + "ogle.cloud.documentai.v1beta3.DocumentSc" - + "hema\"#\n\010Priority\022\013\n\007DEFAULT\020\000\022\n\n\006URGENT\020" - + "\001B\010\n\006source\"\326\001\n\026ReviewDocumentResponse\022\027" - + "\n\017gcs_destination\030\001 \001(\t\022L\n\005state\030\002 \001(\0162=" - + ".google.cloud.documentai.v1beta3.ReviewD" - + "ocumentResponse.State\022\030\n\020rejection_reaso" - + "n\030\003 \001(\t\";\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022" - + "\014\n\010REJECTED\020\001\022\r\n\tSUCCEEDED\020\002\"\300\003\n\037ReviewD" - + "ocumentOperationMetadata\022U\n\005state\030\001 \001(\0162" - + "F.google.cloud.documentai.v1beta3.Review" - + "DocumentOperationMetadata.State\022\025\n\rstate" - + "_message\030\002 \001(\t\022/\n\013create_time\030\003 \001(\0132\032.go" - + "ogle.protobuf.Timestamp\022/\n\013update_time\030\004" - + " \001(\0132\032.google.protobuf.Timestamp\022Q\n\017comm" - + "on_metadata\030\005 \001(\01328.google.cloud.documen" - + "tai.v1beta3.CommonOperationMetadata\022\023\n\013q" - + "uestion_id\030\006 \001(\t\"e\n\005State\022\025\n\021STATE_UNSPE" - + "CIFIED\020\000\022\013\n\007RUNNING\020\001\022\016\n\nCANCELLING\020\002\022\r\n" - + "\tSUCCEEDED\020\003\022\n\n\006FAILED\020\004\022\r\n\tCANCELLED\020\005\"" - + "\317\001\n\037EvaluateProcessorVersionRequest\022M\n\021p" - + "rocessor_version\030\001 \001(\tB2\340A\002\372A,\n*document" - + "ai.googleapis.com/ProcessorVersion\022]\n\024ev" - + "aluation_documents\030\003 \001(\0132:.google.cloud." - + "documentai.v1beta3.BatchDocumentsInputCo" - + "nfigB\003\340A\001\"u\n EvaluateProcessorVersionMet" - + "adata\022Q\n\017common_metadata\030\001 \001(\01328.google." - + "cloud.documentai.v1beta3.CommonOperation" - + "Metadata\"6\n EvaluateProcessorVersionResp" - + "onse\022\022\n\nevaluation\030\002 \001(\t\"R\n\024GetEvaluatio" - + "nRequest\022:\n\004name\030\001 \001(\tB,\340A\002\372A&\n$document" - + "ai.googleapis.com/Evaluation\"\203\001\n\026ListEva" - + "luationsRequest\022B\n\006parent\030\001 \001(\tB2\340A\002\372A,\n" - + "*documentai.googleapis.com/ProcessorVers" - + "ion\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001" - + "(\t\"t\n\027ListEvaluationsResponse\022@\n\013evaluat" - + "ions\030\001 \003(\0132+.google.cloud.documentai.v1b" - + "eta3.Evaluation\022\027\n\017next_page_token\030\002 \001(\t" - + "\"\260\003\n\035ImportProcessorVersionRequest\022S\n\030pr" - + "ocessor_version_source\030\002 \001(\tB/\372A,\n*docum" - + "entai.googleapis.com/ProcessorVersionH\000\022" - + "\212\001\n!external_processor_version_source\030\003 " - + "\001(\0132].google.cloud.documentai.v1beta3.Im" - + "portProcessorVersionRequest.ExternalProc" - + "essorVersionSourceH\000\022B\n\006parent\030\001 \001(\tB2\340A" - + "\002\372A,\022*documentai.googleapis.com/Processo" - + "rVersion\032_\n\036ExternalProcessorVersionSour" - + "ce\022\036\n\021processor_version\030\001 \001(\tB\003\340A\002\022\035\n\020se" - + "rvice_endpoint\030\002 \001(\tB\003\340A\001B\010\n\006source\"l\n\036I" - + "mportProcessorVersionResponse\022J\n\021process" - + "or_version\030\001 \001(\tB/\372A,\n*documentai.google" - + "apis.com/ProcessorVersion\"s\n\036ImportProce" - + "ssorVersionMetadata\022Q\n\017common_metadata\030\001" + + "\211\001\n\034ListProcessorVersionsRequest\022B\n\006pare" + + "nt\030\001 \001(\tB2\340A\002\372A,\022*documentai.googleapis." + + "com/ProcessorVersion\022\021\n\tpage_size\030\002 \001(\005\022" + + "\022\n\npage_token\030\003 \001(\t\"\207\001\n\035ListProcessorVer" + + "sionsResponse\022M\n\022processor_versions\030\001 \003(" + + "\01321.google.cloud.documentai.v1beta3.Proc" + + "essorVersion\022\027\n\017next_page_token\030\002 \001(\t\"a\n" + + "\035DeleteProcessorVersionRequest\022@\n\004name\030\001" + + " \001(\tB2\340A\002\372A,\n*documentai.googleapis.com/" + + "ProcessorVersion\"s\n\036DeleteProcessorVersi" + + "onMetadata\022Q\n\017common_metadata\030\001 \001(\01328.go" + + "ogle.cloud.documentai.v1beta3.CommonOper" + + "ationMetadata\"a\n\035DeployProcessorVersionR" + + "equest\022@\n\004name\030\001 \001(\tB2\340A\002\372A,\n*documentai" + + ".googleapis.com/ProcessorVersion\" \n\036Depl" + + "oyProcessorVersionResponse\"s\n\036DeployProc" + + "essorVersionMetadata\022Q\n\017common_metadata\030" + + "\001 \001(\01328.google.cloud.documentai.v1beta3." + + "CommonOperationMetadata\"c\n\037UndeployProce" + + "ssorVersionRequest\022@\n\004name\030\001 \001(\tB2\340A\002\372A," + + "\n*documentai.googleapis.com/ProcessorVer" + + "sion\"\"\n UndeployProcessorVersionResponse" + + "\"u\n UndeployProcessorVersionMetadata\022Q\n\017" + + "common_metadata\030\001 \001(\01328.google.cloud.doc" + + "umentai.v1beta3.CommonOperationMetadata\"" + + "\231\001\n\026CreateProcessorRequest\022;\n\006parent\030\001 \001" + + "(\tB+\340A\002\372A%\022#documentai.googleapis.com/Pr" + + "ocessor\022B\n\tprocessor\030\002 \001(\0132*.google.clou" + + "d.documentai.v1beta3.ProcessorB\003\340A\002\"S\n\026D" + + "eleteProcessorRequest\0229\n\004name\030\001 \001(\tB+\340A\002" + + "\372A%\n#documentai.googleapis.com/Processor" + + "\"l\n\027DeleteProcessorMetadata\022Q\n\017common_me" + + "tadata\030\005 \001(\01328.google.cloud.documentai.v" + + "1beta3.CommonOperationMetadata\"S\n\026Enable" + + "ProcessorRequest\0229\n\004name\030\001 \001(\tB+\340A\002\372A%\n#" + + "documentai.googleapis.com/Processor\"\031\n\027E" + + "nableProcessorResponse\"l\n\027EnableProcesso" + + "rMetadata\022Q\n\017common_metadata\030\005 \001(\01328.goo" + + "gle.cloud.documentai.v1beta3.CommonOpera" + + "tionMetadata\"T\n\027DisableProcessorRequest\022" + + "9\n\004name\030\001 \001(\tB+\340A\002\372A%\n#documentai.google" + + "apis.com/Processor\"\032\n\030DisableProcessorRe" + + "sponse\"m\n\030DisableProcessorMetadata\022Q\n\017co" + + "mmon_metadata\030\005 \001(\01328.google.cloud.docum" + + "entai.v1beta3.CommonOperationMetadata\"\272\001" + + "\n!SetDefaultProcessorVersionRequest\022>\n\tp" + + "rocessor\030\001 \001(\tB+\340A\002\372A%\n#documentai.googl" + + "eapis.com/Processor\022U\n\031default_processor" + + "_version\030\002 \001(\tB2\340A\002\372A,\n*documentai.googl" + + "eapis.com/ProcessorVersion\"$\n\"SetDefault" + + "ProcessorVersionResponse\"w\n\"SetDefaultPr" + + "ocessorVersionMetadata\022Q\n\017common_metadat" + + "a\030\001 \001(\01328.google.cloud.documentai.v1beta" + + "3.CommonOperationMetadata\"\314\t\n\034TrainProce" + + "ssorVersionRequest\022\213\001\n\"custom_document_e" + + "xtraction_options\030\005 \001(\0132].google.cloud.d" + + "ocumentai.v1beta3.TrainProcessorVersionR" + + "equest.CustomDocumentExtractionOptionsH\000" + + "\022\205\001\n\037foundation_model_tuning_options\030\014 \001" + + "(\0132Z.google.cloud.documentai.v1beta3.Tra" + + "inProcessorVersionRequest.FoundationMode" + + "lTuningOptionsH\000\022;\n\006parent\030\001 \001(\tB+\340A\002\372A%" + + "\n#documentai.googleapis.com/Processor\022Q\n" + + "\021processor_version\030\002 \001(\01321.google.cloud." + + "documentai.v1beta3.ProcessorVersionB\003\340A\002" + + "\022M\n\017document_schema\030\n \001(\0132/.google.cloud" + + ".documentai.v1beta3.DocumentSchemaB\003\340A\001\022" + + "`\n\ninput_data\030\004 \001(\0132G.google.cloud.docum" + + "entai.v1beta3.TrainProcessorVersionReque" + + "st.InputDataB\003\340A\001\022#\n\026base_processor_vers" + + "ion\030\010 \001(\tB\003\340A\001\032\267\001\n\tInputData\022V\n\022training" + + "_documents\030\003 \001(\0132:.google.cloud.document" + + "ai.v1beta3.BatchDocumentsInputConfig\022R\n\016" + + "test_documents\030\004 \001(\0132:.google.cloud.docu" + + "mentai.v1beta3.BatchDocumentsInputConfig" + + "\032\201\002\n\037CustomDocumentExtractionOptions\022\205\001\n" + + "\017training_method\030\003 \001(\0162l.google.cloud.do" + + "cumentai.v1beta3.TrainProcessorVersionRe" + + "quest.CustomDocumentExtractionOptions.Tr" + + "ainingMethod\"V\n\016TrainingMethod\022\037\n\033TRAINI" + + "NG_METHOD_UNSPECIFIED\020\000\022\017\n\013MODEL_BASED\020\001" + + "\022\022\n\016TEMPLATE_BASED\020\002\032_\n\034FoundationModelT" + + "uningOptions\022\030\n\013train_steps\030\002 \001(\005B\003\340A\001\022%" + + "\n\030learning_rate_multiplier\030\003 \001(\002B\003\340A\001B\021\n" + + "\017processor_flags\":\n\035TrainProcessorVersio" + + "nResponse\022\031\n\021processor_version\030\001 \001(\t\"\206\004\n" + + "\035TrainProcessorVersionMetadata\022Q\n\017common" + + "_metadata\030\001 \001(\01328.google.cloud.documenta" + + "i.v1beta3.CommonOperationMetadata\022u\n\033tra" + + "ining_dataset_validation\030\002 \001(\0132P.google." + + "cloud.documentai.v1beta3.TrainProcessorV" + + "ersionMetadata.DatasetValidation\022q\n\027test" + + "_dataset_validation\030\003 \001(\0132P.google.cloud" + + ".documentai.v1beta3.TrainProcessorVersio" + + "nMetadata.DatasetValidation\032\247\001\n\021DatasetV" + + "alidation\022\034\n\024document_error_count\030\003 \001(\005\022" + + "\033\n\023dataset_error_count\030\004 \001(\005\022+\n\017document" + + "_errors\030\001 \003(\0132\022.google.rpc.Status\022*\n\016dat" + + "aset_errors\030\002 \003(\0132\022.google.rpc.Status\"\336\003" + + "\n\025ReviewDocumentRequest\022D\n\017inline_docume" + + "nt\030\004 \001(\0132).google.cloud.documentai.v1bet" + + "a3.DocumentH\000\022P\n\023human_review_config\030\001 \001" + + "(\tB3\340A\002\372A-\n+documentai.googleapis.com/Hu" + + "manReviewConfig\022?\n\010document\030\002 \001(\0132).goog" + + "le.cloud.documentai.v1beta3.DocumentB\002\030\001" + + "\022 \n\030enable_schema_validation\030\003 \001(\010\022Q\n\010pr" + + "iority\030\005 \001(\0162?.google.cloud.documentai.v" + + "1beta3.ReviewDocumentRequest.Priority\022H\n" + + "\017document_schema\030\006 \001(\0132/.google.cloud.do" + + "cumentai.v1beta3.DocumentSchema\"#\n\010Prior" + + "ity\022\013\n\007DEFAULT\020\000\022\n\n\006URGENT\020\001B\010\n\006source\"\326" + + "\001\n\026ReviewDocumentResponse\022\027\n\017gcs_destina" + + "tion\030\001 \001(\t\022L\n\005state\030\002 \001(\0162=.google.cloud" + + ".documentai.v1beta3.ReviewDocumentRespon" + + "se.State\022\030\n\020rejection_reason\030\003 \001(\t\";\n\005St" + + "ate\022\025\n\021STATE_UNSPECIFIED\020\000\022\014\n\010REJECTED\020\001" + + "\022\r\n\tSUCCEEDED\020\002\"\300\003\n\037ReviewDocumentOperat" + + "ionMetadata\022U\n\005state\030\001 \001(\0162F.google.clou" + + "d.documentai.v1beta3.ReviewDocumentOpera" + + "tionMetadata.State\022\025\n\rstate_message\030\002 \001(" + + "\t\022/\n\013create_time\030\003 \001(\0132\032.google.protobuf" + + ".Timestamp\022/\n\013update_time\030\004 \001(\0132\032.google" + + ".protobuf.Timestamp\022Q\n\017common_metadata\030\005" + " \001(\01328.google.cloud.documentai.v1beta3.C" - + "ommonOperationMetadata2\353.\n\030DocumentProce" - + "ssorService\022\233\002\n\017ProcessDocument\022/.google" - + ".cloud.documentai.v1beta3.ProcessRequest" - + "\0320.google.cloud.documentai.v1beta3.Proce" - + "ssResponse\"\244\001\332A\004name\202\323\344\223\002\226\001\";/v1beta3/{n" - + "ame=projects/*/locations/*/processors/*}" - + ":process:\001*ZT\"O/v1beta3/{name=projects/*" - + "/locations/*/processors/*/processorVersi" - + "ons/*}:process:\001*\022\314\002\n\025BatchProcessDocume" - + "nts\0224.google.cloud.documentai.v1beta3.Ba" - + "tchProcessRequest\032\035.google.longrunning.O" - + "peration\"\335\001\312A,\n\024BatchProcessResponse\022\024Ba" - + "tchProcessMetadata\332A\004name\202\323\344\223\002\240\001\"@/v1bet" - + "a3/{name=projects/*/locations/*/processo" - + "rs/*}:batchProcess:\001*ZY\"T/v1beta3/{name=" - + "projects/*/locations/*/processors/*/proc" - + "essorVersions/*}:batchProcess:\001*\022\337\001\n\023Fet" - + "chProcessorTypes\022;.google.cloud.document" - + "ai.v1beta3.FetchProcessorTypesRequest\032<." - + "google.cloud.documentai.v1beta3.FetchPro" - + "cessorTypesResponse\"M\332A\006parent\202\323\344\223\002>\022\n\035TrainProcess" - + "orVersionResponse\022\035TrainProcessorVersion" - + "Metadata\332A\030parent,processor_version\202\323\344\223\002" - + "R\"M/v1beta3/{parent=projects/*/locations" - + "/*/processors/*}/processorVersions:train" - + ":\001*\022\335\001\n\023GetProcessorVersion\022;.google.clo" - + "ud.documentai.v1beta3.GetProcessorVersio" - + "nRequest\0321.google.cloud.documentai.v1bet" - + "a3.ProcessorVersion\"V\332A\004name\202\323\344\223\002I\022G/v1b" + + "ommonOperationMetadata\022\023\n\013question_id\030\006 " + + "\001(\t\"e\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\013\n\007R" + + "UNNING\020\001\022\016\n\nCANCELLING\020\002\022\r\n\tSUCCEEDED\020\003\022" + + "\n\n\006FAILED\020\004\022\r\n\tCANCELLED\020\005\"\317\001\n\037EvaluateP" + + "rocessorVersionRequest\022M\n\021processor_vers" + + "ion\030\001 \001(\tB2\340A\002\372A,\n*documentai.googleapis" + + ".com/ProcessorVersion\022]\n\024evaluation_docu" + + "ments\030\003 \001(\0132:.google.cloud.documentai.v1" + + "beta3.BatchDocumentsInputConfigB\003\340A\001\"u\n " + + "EvaluateProcessorVersionMetadata\022Q\n\017comm" + + "on_metadata\030\001 \001(\01328.google.cloud.documen" + + "tai.v1beta3.CommonOperationMetadata\"6\n E" + + "valuateProcessorVersionResponse\022\022\n\nevalu" + + "ation\030\002 \001(\t\"R\n\024GetEvaluationRequest\022:\n\004n" + + "ame\030\001 \001(\tB,\340A\002\372A&\n$documentai.googleapis" + + ".com/Evaluation\"\203\001\n\026ListEvaluationsReque" + + "st\022B\n\006parent\030\001 \001(\tB2\340A\002\372A,\n*documentai.g" + + "oogleapis.com/ProcessorVersion\022\021\n\tpage_s" + + "ize\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"t\n\027ListEva" + + "luationsResponse\022@\n\013evaluations\030\001 \003(\0132+." + + "google.cloud.documentai.v1beta3.Evaluati" + + "on\022\027\n\017next_page_token\030\002 \001(\t\"\260\003\n\035ImportPr" + + "ocessorVersionRequest\022S\n\030processor_versi" + + "on_source\030\002 \001(\tB/\372A,\n*documentai.googlea" + + "pis.com/ProcessorVersionH\000\022\212\001\n!external_" + + "processor_version_source\030\003 \001(\0132].google." + + "cloud.documentai.v1beta3.ImportProcessor" + + "VersionRequest.ExternalProcessorVersionS" + + "ourceH\000\022B\n\006parent\030\001 \001(\tB2\340A\002\372A,\022*documen" + + "tai.googleapis.com/ProcessorVersion\032_\n\036E" + + "xternalProcessorVersionSource\022\036\n\021process" + + "or_version\030\001 \001(\tB\003\340A\002\022\035\n\020service_endpoin" + + "t\030\002 \001(\tB\003\340A\001B\010\n\006source\"l\n\036ImportProcesso" + + "rVersionResponse\022J\n\021processor_version\030\001 " + + "\001(\tB/\372A,\n*documentai.googleapis.com/Proc" + + "essorVersion\"s\n\036ImportProcessorVersionMe" + + "tadata\022Q\n\017common_metadata\030\001 \001(\01328.google" + + ".cloud.documentai.v1beta3.CommonOperatio" + + "nMetadata2\353.\n\030DocumentProcessorService\022\233" + + "\002\n\017ProcessDocument\022/.google.cloud.docume" + + "ntai.v1beta3.ProcessRequest\0320.google.clo" + + "ud.documentai.v1beta3.ProcessResponse\"\244\001" + + "\332A\004name\202\323\344\223\002\226\001\";/v1beta3/{name=projects/" + + "*/locations/*/processors/*}:process:\001*ZT" + + "\"O/v1beta3/{name=projects/*/locations/*/" + + "processors/*/processorVersions/*}:proces" + + "s:\001*\022\314\002\n\025BatchProcessDocuments\0224.google." + + "cloud.documentai.v1beta3.BatchProcessReq" + + "uest\032\035.google.longrunning.Operation\"\335\001\312A" + + ",\n\024BatchProcessResponse\022\024BatchProcessMet" + + "adata\332A\004name\202\323\344\223\002\240\001\"@/v1beta3/{name=proj" + + "ects/*/locations/*/processors/*}:batchPr" + + "ocess:\001*ZY\"T/v1beta3/{name=projects/*/lo" + + "cations/*/processors/*/processorVersions" + + "/*}:batchProcess:\001*\022\337\001\n\023FetchProcessorTy" + + "pes\022;.google.cloud.documentai.v1beta3.Fe" + + "tchProcessorTypesRequest\032<.google.cloud." + + "documentai.v1beta3.FetchProcessorTypesRe" + + "sponse\"M\332A\006parent\202\323\344\223\002>\022.g" - + "oogle.cloud.documentai.v1beta3.ListProce" - + "ssorVersionsResponse\"X\332A\006parent\202\323\344\223\002I\022G/" - + "v1beta3/{parent=projects/*/locations/*/p" - + "rocessors/*}/processorVersions\022\212\002\n\026Delet" - + "eProcessorVersion\022>.google.cloud.documen" - + "tai.v1beta3.DeleteProcessorVersionReques" - + "t\032\035.google.longrunning.Operation\"\220\001\312A7\n\025" - + "google.protobuf.Empty\022\036DeleteProcessorVe" - + "rsionMetadata\332A\004name\202\323\344\223\002I*G/v1beta3/{na" - + "me=projects/*/locations/*/processors/*/p" - + "rocessorVersions/*}\022\235\002\n\026DeployProcessorV" - + "ersion\022>.google.cloud.documentai.v1beta3" - + ".DeployProcessorVersionRequest\032\035.google." - + "longrunning.Operation\"\243\001\312A@\n\036DeployProce" - + "ssorVersionResponse\022\036DeployProcessorVers" - + "ionMetadata\332A\004name\202\323\344\223\002S\"N/v1beta3/{name" - + "=projects/*/locations/*/processors/*/pro" - + "cessorVersions/*}:deploy:\001*\022\247\002\n\030Undeploy" - + "ProcessorVersion\022@.google.cloud.document" - + "ai.v1beta3.UndeployProcessorVersionReque" - + "st\032\035.google.longrunning.Operation\"\251\001\312AD\n" - + " UndeployProcessorVersionResponse\022 Undep" - + "loyProcessorVersionMetadata\332A\004name\202\323\344\223\002U" - + "\"P/v1beta3/{name=projects/*/locations/*/" - + "processors/*/processorVersions/*}:undepl" - + "oy:\001*\022\321\001\n\017CreateProcessor\0227.google.cloud" - + ".documentai.v1beta3.CreateProcessorReque" - + "st\032*.google.cloud.documentai.v1beta3.Pro" - + "cessor\"Y\332A\020parent,processor\202\323\344\223\002@\"3/v1be" - + "ta3/{parent=projects/*/locations/*}/proc" - + "essors:\tprocessor\022\340\001\n\017DeleteProcessor\0227." - + "google.cloud.documentai.v1beta3.DeletePr" - + "ocessorRequest\032\035.google.longrunning.Oper" - + "ation\"u\312A0\n\025google.protobuf.Empty\022\027Delet" - + "eProcessorMetadata\332A\004name\202\323\344\223\0025*3/v1beta" - + "3/{name=projects/*/locations/*/processor" - + "s/*}\022\345\001\n\017EnableProcessor\0227.google.cloud." - + "documentai.v1beta3.EnableProcessorReques" - + "t\032\035.google.longrunning.Operation\"z\312A2\n\027E" - + "nableProcessorResponse\022\027EnableProcessorM" - + "etadata\202\323\344\223\002?\":/v1beta3/{name=projects/*" - + "/locations/*/processors/*}:enable:\001*\022\352\001\n" - + "\020DisableProcessor\0228.google.cloud.documen" - + "tai.v1beta3.DisableProcessorRequest\032\035.go" - + "ogle.longrunning.Operation\"}\312A4\n\030Disable" - + "ProcessorResponse\022\030DisableProcessorMetad" - + "ata\202\323\344\223\002@\";/v1beta3/{name=projects/*/loc" - + "ations/*/processors/*}:disable:\001*\022\253\002\n\032Se" - + "tDefaultProcessorVersion\022B.google.cloud." - + "documentai.v1beta3.SetDefaultProcessorVe" - + "rsionRequest\032\035.google.longrunning.Operat" - + "ion\"\251\001\312AH\n\"SetDefaultProcessorVersionRes" - + "ponse\022\"SetDefaultProcessorVersionMetadat" - + "a\202\323\344\223\002X\"S/v1beta3/{processor=projects/*/" - + "locations/*/processors/*}:setDefaultProc" - + "essorVersion:\001*\022\252\002\n\016ReviewDocument\0226.goo" - + "gle.cloud.documentai.v1beta3.ReviewDocum" - + "entRequest\032\035.google.longrunning.Operatio" - + "n\"\300\001\312A9\n\026ReviewDocumentResponse\022\037ReviewD" - + "ocumentOperationMetadata\332A\023human_review_" - + "config\202\323\344\223\002h\"c/v1beta3/{human_review_con" - + "fig=projects/*/locations/*/processors/*/" - + "humanReviewConfig}:reviewDocument:\001*\022\321\002\n" - + "\030EvaluateProcessorVersion\022@.google.cloud" - + ".documentai.v1beta3.EvaluateProcessorVer", - "sionRequest\032\035.google.longrunning.Operati" - + "on\"\323\001\312AD\n EvaluateProcessorVersionRespon" - + "se\022 EvaluateProcessorVersionMetadata\332A\021p" - + "rocessor_version\202\323\344\223\002r\"m/v1beta3/{proces" - + "sor_version=projects/*/locations/*/proce" - + "ssors/*/processorVersions/*}:evaluatePro" - + "cessorVersion:\001*\022\331\001\n\rGetEvaluation\0225.goo" - + "gle.cloud.documentai.v1beta3.GetEvaluati" - + "onRequest\032+.google.cloud.documentai.v1be" - + "ta3.Evaluation\"d\332A\004name\202\323\344\223\002W\022U/v1beta3/" - + "{name=projects/*/locations/*/processors/" - + "*/processorVersions/*/evaluations/*}\022\354\001\n" - + "\017ListEvaluations\0227.google.cloud.document" - + "ai.v1beta3.ListEvaluationsRequest\0328.goog" - + "le.cloud.documentai.v1beta3.ListEvaluati" - + "onsResponse\"f\332A\006parent\202\323\344\223\002W\022U/v1beta3/{" + + "sors/*}\022\254\002\n\025TrainProcessorVersion\022=.goog" + + "le.cloud.documentai.v1beta3.TrainProcess" + + "orVersionRequest\032\035.google.longrunning.Op" + + "eration\"\264\001\312A>\n\035TrainProcessorVersionResp" + + "onse\022\035TrainProcessorVersionMetadata\332A\030pa" + + "rent,processor_version\202\323\344\223\002R\"M/v1beta3/{" + "parent=projects/*/locations/*/processors" - + "/*/processorVersions/*}/evaluations\022\257\002\n\026" - + "ImportProcessorVersion\022>.google.cloud.do" - + "cumentai.v1beta3.ImportProcessorVersionR" - + "equest\032\035.google.longrunning.Operation\"\265\001" - + "\312A@\n\036ImportProcessorVersionResponse\022\036Imp" - + "ortProcessorVersionMetadata\332A\006parent\202\323\344\223" - + "\002c\"^/v1beta3/{parent=projects/*/location" - + "s/*/processors/*}/processorVersions:impo" - + "rtProcessorVersion:\001*\032M\312A\031documentai.goo" - + "gleapis.com\322A.https://www.googleapis.com" - + "/auth/cloud-platformB\303\003\n#com.google.clou" - + "d.documentai.v1beta3B\032DocumentAiProcesso" - + "rServiceP\001ZCcloud.google.com/go/document" - + "ai/apiv1beta3/documentaipb;documentaipb\252" - + "\002\037Google.Cloud.DocumentAI.V1Beta3\312\002\037Goog" - + "le\\Cloud\\DocumentAI\\V1beta3\352\002\"Google::Cl" - + "oud::DocumentAI::V1beta3\352A\177\n+documentai." - + "googleapis.com/HumanReviewConfig\022Pprojec" - + "ts/{project}/locations/{location}/proces" - + "sors/{processor}/humanReviewConfig\352AM\n\"d" - + "ocumentai.googleapis.com/Location\022\'proje" - + "cts/{project}/locations/{location}b\006prot" - + "o3" + + "/*}/processorVersions:train:\001*\022\335\001\n\023GetPr" + + "ocessorVersion\022;.google.cloud.documentai" + + ".v1beta3.GetProcessorVersionRequest\0321.go" + + "ogle.cloud.documentai.v1beta3.ProcessorV" + + "ersion\"V\332A\004name\202\323\344\223\002I\022G/v1beta3/{name=pr" + + "ojects/*/locations/*/processors/*/proces" + + "sorVersions/*}\022\360\001\n\025ListProcessorVersions" + + "\022=.google.cloud.documentai.v1beta3.ListP" + + "rocessorVersionsRequest\032>.google.cloud.d" + + "ocumentai.v1beta3.ListProcessorVersionsR" + + "esponse\"X\332A\006parent\202\323\344\223\002I\022G/v1beta3/{pare" + + "nt=projects/*/locations/*/processors/*}/" + + "processorVersions\022\212\002\n\026DeleteProcessorVer" + + "sion\022>.google.cloud.documentai.v1beta3.D" + + "eleteProcessorVersionRequest\032\035.google.lo" + + "ngrunning.Operation\"\220\001\312A7\n\025google.protob" + + "uf.Empty\022\036DeleteProcessorVersionMetadata" + + "\332A\004name\202\323\344\223\002I*G/v1beta3/{name=projects/*" + + "/locations/*/processors/*/processorVersi" + + "ons/*}\022\235\002\n\026DeployProcessorVersion\022>.goog" + + "le.cloud.documentai.v1beta3.DeployProces" + + "sorVersionRequest\032\035.google.longrunning.O" + + "peration\"\243\001\312A@\n\036DeployProcessorVersionRe" + + "sponse\022\036DeployProcessorVersionMetadata\332A" + + "\004name\202\323\344\223\002S\"N/v1beta3/{name=projects/*/l" + + "ocations/*/processors/*/processorVersion" + + "s/*}:deploy:\001*\022\247\002\n\030UndeployProcessorVers" + + "ion\022@.google.cloud.documentai.v1beta3.Un" + + "deployProcessorVersionRequest\032\035.google.l" + + "ongrunning.Operation\"\251\001\312AD\n UndeployProc" + + "essorVersionResponse\022 UndeployProcessorV" + + "ersionMetadata\332A\004name\202\323\344\223\002U\"P/v1beta3/{n" + + "ame=projects/*/locations/*/processors/*/" + + "processorVersions/*}:undeploy:\001*\022\321\001\n\017Cre" + + "ateProcessor\0227.google.cloud.documentai.v" + + "1beta3.CreateProcessorRequest\032*.google.c" + + "loud.documentai.v1beta3.Processor\"Y\332A\020pa" + + "rent,processor\202\323\344\223\002@\"3/v1beta3/{parent=p" + + "rojects/*/locations/*}/processors:\tproce" + + "ssor\022\340\001\n\017DeleteProcessor\0227.google.cloud." + + "documentai.v1beta3.DeleteProcessorReques" + + "t\032\035.google.longrunning.Operation\"u\312A0\n\025g" + + "oogle.protobuf.Empty\022\027DeleteProcessorMet" + + "adata\332A\004name\202\323\344\223\0025*3/v1beta3/{name=proje" + + "cts/*/locations/*/processors/*}\022\345\001\n\017Enab" + + "leProcessor\0227.google.cloud.documentai.v1" + + "beta3.EnableProcessorRequest\032\035.google.lo" + + "ngrunning.Operation\"z\312A2\n\027EnableProcesso" + + "rResponse\022\027EnableProcessorMetadata\202\323\344\223\002?" + + "\":/v1beta3/{name=projects/*/locations/*/" + + "processors/*}:enable:\001*\022\352\001\n\020DisableProce" + + "ssor\0228.google.cloud.documentai.v1beta3.D" + + "isableProcessorRequest\032\035.google.longrunn" + + "ing.Operation\"}\312A4\n\030DisableProcessorResp" + + "onse\022\030DisableProcessorMetadata\202\323\344\223\002@\";/v" + + "1beta3/{name=projects/*/locations/*/proc" + + "essors/*}:disable:\001*\022\253\002\n\032SetDefaultProce" + + "ssorVersion\022B.google.cloud.documentai.v1" + + "beta3.SetDefaultProcessorVersionRequest\032" + + "\035.google.longrunning.Operation\"\251\001\312AH\n\"Se" + + "tDefaultProcessorVersionResponse\022\"SetDef" + + "aultProcessorVersionMetadata\202\323\344\223\002X\"S/v1b" + + "eta3/{processor=projects/*/locations/*/p" + + "rocessors/*}:setDefaultProcessorVersion:", + "\001*\022\252\002\n\016ReviewDocument\0226.google.cloud.doc" + + "umentai.v1beta3.ReviewDocumentRequest\032\035." + + "google.longrunning.Operation\"\300\001\312A9\n\026Revi" + + "ewDocumentResponse\022\037ReviewDocumentOperat" + + "ionMetadata\332A\023human_review_config\202\323\344\223\002h\"" + + "c/v1beta3/{human_review_config=projects/" + + "*/locations/*/processors/*/humanReviewCo" + + "nfig}:reviewDocument:\001*\022\321\002\n\030EvaluateProc" + + "essorVersion\022@.google.cloud.documentai.v" + + "1beta3.EvaluateProcessorVersionRequest\032\035" + + ".google.longrunning.Operation\"\323\001\312AD\n Eva" + + "luateProcessorVersionResponse\022 EvaluateP" + + "rocessorVersionMetadata\332A\021processor_vers" + + "ion\202\323\344\223\002r\"m/v1beta3/{processor_version=p" + + "rojects/*/locations/*/processors/*/proce" + + "ssorVersions/*}:evaluateProcessorVersion" + + ":\001*\022\331\001\n\rGetEvaluation\0225.google.cloud.doc" + + "umentai.v1beta3.GetEvaluationRequest\032+.g" + + "oogle.cloud.documentai.v1beta3.Evaluatio" + + "n\"d\332A\004name\202\323\344\223\002W\022U/v1beta3/{name=project" + + "s/*/locations/*/processors/*/processorVe" + + "rsions/*/evaluations/*}\022\354\001\n\017ListEvaluati" + + "ons\0227.google.cloud.documentai.v1beta3.Li" + + "stEvaluationsRequest\0328.google.cloud.docu" + + "mentai.v1beta3.ListEvaluationsResponse\"f" + + "\332A\006parent\202\323\344\223\002W\022U/v1beta3/{parent=projec" + + "ts/*/locations/*/processors/*/processorV" + + "ersions/*}/evaluations\022\257\002\n\026ImportProcess" + + "orVersion\022>.google.cloud.documentai.v1be" + + "ta3.ImportProcessorVersionRequest\032\035.goog" + + "le.longrunning.Operation\"\265\001\312A@\n\036ImportPr" + + "ocessorVersionResponse\022\036ImportProcessorV" + + "ersionMetadata\332A\006parent\202\323\344\223\002c\"^/v1beta3/" + + "{parent=projects/*/locations/*/processor" + + "s/*}/processorVersions:importProcessorVe" + + "rsion:\001*\032M\312A\031documentai.googleapis.com\322A" + + ".https://www.googleapis.com/auth/cloud-p" + + "latformB\303\003\n#com.google.cloud.documentai." + + "v1beta3B\032DocumentAiProcessorServiceP\001ZCc" + + "loud.google.com/go/documentai/apiv1beta3" + + "/documentaipb;documentaipb\252\002\037Google.Clou" + + "d.DocumentAI.V1Beta3\312\002\037Google\\Cloud\\Docu" + + "mentAI\\V1beta3\352\002\"Google::Cloud::Document" + + "AI::V1beta3\352A\177\n+documentai.googleapis.co" + + "m/HumanReviewConfig\022Pprojects/{project}/" + + "locations/{location}/processors/{process" + + "or}/humanReviewConfig\352AM\n\"documentai.goo" + + "gleapis.com/Location\022\'projects/{project}" + + "/locations/{location}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -765,13 +782,37 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "FromStart", "FromEnd", "OcrConfig", + "LayoutConfig", "SchemaOverride", "PageRange", }); - internal_static_google_cloud_documentai_v1beta3_ProcessOptions_IndividualPageSelector_descriptor = + internal_static_google_cloud_documentai_v1beta3_ProcessOptions_LayoutConfig_descriptor = internal_static_google_cloud_documentai_v1beta3_ProcessOptions_descriptor .getNestedTypes() .get(0); + internal_static_google_cloud_documentai_v1beta3_ProcessOptions_LayoutConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_documentai_v1beta3_ProcessOptions_LayoutConfig_descriptor, + new java.lang.String[] { + "ChunkingConfig", + }); + internal_static_google_cloud_documentai_v1beta3_ProcessOptions_LayoutConfig_ChunkingConfig_descriptor = + internal_static_google_cloud_documentai_v1beta3_ProcessOptions_LayoutConfig_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_documentai_v1beta3_ProcessOptions_LayoutConfig_ChunkingConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_documentai_v1beta3_ProcessOptions_LayoutConfig_ChunkingConfig_descriptor, + new java.lang.String[] { + "ChunkSize", + "IncludeAncestorHeadings", + "SemanticChunkingGroupSize", + "BreakpointPercentileThreshold", + }); + internal_static_google_cloud_documentai_v1beta3_ProcessOptions_IndividualPageSelector_descriptor = + internal_static_google_cloud_documentai_v1beta3_ProcessOptions_descriptor + .getNestedTypes() + .get(1); internal_static_google_cloud_documentai_v1beta3_ProcessOptions_IndividualPageSelector_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_documentai_v1beta3_ProcessOptions_IndividualPageSelector_descriptor, diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentOrBuilder.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentOrBuilder.java index 9112b34ab32b..154b35ede770 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentOrBuilder.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentOrBuilder.java @@ -599,5 +599,76 @@ com.google.cloud.documentai.v1beta3.Document.TextChangeOrBuilder getTextChangesO */ com.google.cloud.documentai.v1beta3.Document.RevisionOrBuilder getRevisionsOrBuilder(int index); + /** + * + * + *
+   * Parsed layout of the document.
+   * 
+ * + * .google.cloud.documentai.v1beta3.Document.DocumentLayout document_layout = 17; + * + * @return Whether the documentLayout field is set. + */ + boolean hasDocumentLayout(); + /** + * + * + *
+   * Parsed layout of the document.
+   * 
+ * + * .google.cloud.documentai.v1beta3.Document.DocumentLayout document_layout = 17; + * + * @return The documentLayout. + */ + com.google.cloud.documentai.v1beta3.Document.DocumentLayout getDocumentLayout(); + /** + * + * + *
+   * Parsed layout of the document.
+   * 
+ * + * .google.cloud.documentai.v1beta3.Document.DocumentLayout document_layout = 17; + */ + com.google.cloud.documentai.v1beta3.Document.DocumentLayoutOrBuilder getDocumentLayoutOrBuilder(); + + /** + * + * + *
+   * Document chunked based on chunking config.
+   * 
+ * + * .google.cloud.documentai.v1beta3.Document.ChunkedDocument chunked_document = 18; + * + * @return Whether the chunkedDocument field is set. + */ + boolean hasChunkedDocument(); + /** + * + * + *
+   * Document chunked based on chunking config.
+   * 
+ * + * .google.cloud.documentai.v1beta3.Document.ChunkedDocument chunked_document = 18; + * + * @return The chunkedDocument. + */ + com.google.cloud.documentai.v1beta3.Document.ChunkedDocument getChunkedDocument(); + /** + * + * + *
+   * Document chunked based on chunking config.
+   * 
+ * + * .google.cloud.documentai.v1beta3.Document.ChunkedDocument chunked_document = 18; + */ + com.google.cloud.documentai.v1beta3.Document.ChunkedDocumentOrBuilder + getChunkedDocumentOrBuilder(); + com.google.cloud.documentai.v1beta3.Document.SourceCase getSourceCase(); } diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentProto.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentProto.java index 4b045b1640f5..48717a327bfe 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentProto.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DocumentProto.java @@ -176,6 +176,54 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_documentai_v1beta3_Document_TextChange_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_documentai_v1beta3_Document_TextChange_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_LayoutPageSpan_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_LayoutPageSpan_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_LayoutTextBlock_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_LayoutTextBlock_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_LayoutTableBlock_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_LayoutTableBlock_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_LayoutTableRow_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_LayoutTableRow_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_LayoutTableCell_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_LayoutTableCell_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_LayoutListBlock_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_LayoutListBlock_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_LayoutListEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_LayoutListEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_documentai_v1beta3_Document_ChunkedDocument_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_documentai_v1beta3_Document_ChunkedDocument_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_documentai_v1beta3_Document_ChunkedDocument_Chunk_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_documentai_v1beta3_Document_ChunkedDocument_Chunk_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_documentai_v1beta3_Document_ChunkedDocument_Chunk_ChunkPageSpan_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_documentai_v1beta3_Document_ChunkedDocument_Chunk_ChunkPageSpan_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_documentai_v1beta3_RevisionRef_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -199,7 +247,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "/color.proto\032\026google/type/date.proto\032\032go" + "ogle/type/datetime.proto\032\027google/type/mo" + "ney.proto\032 google/type/postal_address.pr" - + "oto\"\210H\n\010Document\022\022\n\003uri\030\001 \001(\tB\003\340A\001H\000\022\026\n\007" + + "oto\"\321X\n\010Document\022\022\n\003uri\030\001 \001(\tB\003\340A\001H\000\022\026\n\007" + "content\030\002 \001(\014B\003\340A\001H\000\022\021\n\tmime_type\030\003 \001(\t\022" + "\021\n\004text\030\004 \001(\tB\003\340A\001\022H\n\013text_styles\030\005 \003(\0132" + "/.google.cloud.documentai.v1beta3.Docume" @@ -215,234 +263,287 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "cument.ShardInfo\022!\n\005error\030\n \001(\0132\022.google" + ".rpc.Status\022E\n\trevisions\030\r \003(\01322.google." + "cloud.documentai.v1beta3.Document.Revisi" - + "on\032J\n\tShardInfo\022\023\n\013shard_index\030\001 \001(\003\022\023\n\013" - + "shard_count\030\002 \001(\003\022\023\n\013text_offset\030\003 \001(\003\032\357" - + "\002\n\005Style\022I\n\013text_anchor\030\001 \001(\01324.google.c" - + "loud.documentai.v1beta3.Document.TextAnc" - + "hor\022!\n\005color\030\002 \001(\0132\022.google.type.Color\022," - + "\n\020background_color\030\003 \001(\0132\022.google.type.C" - + "olor\022\023\n\013font_weight\030\004 \001(\t\022\022\n\ntext_style\030" - + "\005 \001(\t\022\027\n\017text_decoration\030\006 \001(\t\022K\n\tfont_s" - + "ize\030\007 \001(\01328.google.cloud.documentai.v1be" - + "ta3.Document.Style.FontSize\022\023\n\013font_fami" - + "ly\030\010 \001(\t\032&\n\010FontSize\022\014\n\004size\030\001 \001(\002\022\014\n\004un" - + "it\030\002 \001(\t\032\320+\n\004Page\022\023\n\013page_number\030\001 \001(\005\022C" - + "\n\005image\030\r \001(\01324.google.cloud.documentai." - + "v1beta3.Document.Page.Image\022I\n\ntransform" - + "s\030\016 \003(\01325.google.cloud.documentai.v1beta" - + "3.Document.Page.Matrix\022K\n\tdimension\030\002 \001(" + + "on\022Q\n\017document_layout\030\021 \001(\01328.google.clo" + + "ud.documentai.v1beta3.Document.DocumentL" + + "ayout\022S\n\020chunked_document\030\022 \001(\01329.google" + + ".cloud.documentai.v1beta3.Document.Chunk" + + "edDocument\032J\n\tShardInfo\022\023\n\013shard_index\030\001" + + " \001(\003\022\023\n\013shard_count\030\002 \001(\003\022\023\n\013text_offset" + + "\030\003 \001(\003\032\357\002\n\005Style\022I\n\013text_anchor\030\001 \001(\01324." + + "google.cloud.documentai.v1beta3.Document" + + ".TextAnchor\022!\n\005color\030\002 \001(\0132\022.google.type" + + ".Color\022,\n\020background_color\030\003 \001(\0132\022.googl" + + "e.type.Color\022\023\n\013font_weight\030\004 \001(\t\022\022\n\ntex" + + "t_style\030\005 \001(\t\022\027\n\017text_decoration\030\006 \001(\t\022K" + + "\n\tfont_size\030\007 \001(\01328.google.cloud.documen" + + "tai.v1beta3.Document.Style.FontSize\022\023\n\013f" + + "ont_family\030\010 \001(\t\032&\n\010FontSize\022\014\n\004size\030\001 \001" + + "(\002\022\014\n\004unit\030\002 \001(\t\032\320+\n\004Page\022\023\n\013page_number" + + "\030\001 \001(\005\022C\n\005image\030\r \001(\01324.google.cloud.doc" + + "umentai.v1beta3.Document.Page.Image\022I\n\nt" + + "ransforms\030\016 \003(\01325.google.cloud.documenta" + + "i.v1beta3.Document.Page.Matrix\022K\n\tdimens" + + "ion\030\002 \001(\01328.google.cloud.documentai.v1be" + + "ta3.Document.Page.Dimension\022E\n\006layout\030\003 " + + "\001(\01325.google.cloud.documentai.v1beta3.Do" + + "cument.Page.Layout\022[\n\022detected_languages" + + "\030\004 \003(\0132?.google.cloud.documentai.v1beta3" + + ".Document.Page.DetectedLanguage\022D\n\006block" + + "s\030\005 \003(\01324.google.cloud.documentai.v1beta" + + "3.Document.Page.Block\022L\n\nparagraphs\030\006 \003(" + "\01328.google.cloud.documentai.v1beta3.Docu" - + "ment.Page.Dimension\022E\n\006layout\030\003 \001(\01325.go" - + "ogle.cloud.documentai.v1beta3.Document.P" - + "age.Layout\022[\n\022detected_languages\030\004 \003(\0132?" - + ".google.cloud.documentai.v1beta3.Documen" - + "t.Page.DetectedLanguage\022D\n\006blocks\030\005 \003(\0132" - + "4.google.cloud.documentai.v1beta3.Docume" - + "nt.Page.Block\022L\n\nparagraphs\030\006 \003(\01328.goog" - + "le.cloud.documentai.v1beta3.Document.Pag" - + "e.Paragraph\022B\n\005lines\030\007 \003(\01323.google.clou" - + "d.documentai.v1beta3.Document.Page.Line\022" - + "D\n\006tokens\030\010 \003(\01324.google.cloud.documenta" - + "i.v1beta3.Document.Page.Token\022U\n\017visual_" - + "elements\030\t \003(\0132<.google.cloud.documentai" - + ".v1beta3.Document.Page.VisualElement\022D\n\006" - + "tables\030\n \003(\01324.google.cloud.documentai.v" - + "1beta3.Document.Page.Table\022M\n\013form_field" - + "s\030\013 \003(\01328.google.cloud.documentai.v1beta" - + "3.Document.Page.FormField\022F\n\007symbols\030\014 \003" - + "(\01325.google.cloud.documentai.v1beta3.Doc" - + "ument.Page.Symbol\022Y\n\021detected_barcodes\030\017" - + " \003(\0132>.google.cloud.documentai.v1beta3.D" - + "ocument.Page.DetectedBarcode\022_\n\024image_qu" - + "ality_scores\030\021 \001(\0132A.google.cloud.docume" - + "ntai.v1beta3.Document.Page.ImageQualityS" - + "cores\022L\n\nprovenance\030\020 \001(\01324.google.cloud" - + ".documentai.v1beta3.Document.ProvenanceB" - + "\002\030\001\0328\n\tDimension\022\r\n\005width\030\001 \001(\002\022\016\n\006heigh" - + "t\030\002 \001(\002\022\014\n\004unit\030\003 \001(\t\032J\n\005Image\022\017\n\007conten" - + "t\030\001 \001(\014\022\021\n\tmime_type\030\002 \001(\t\022\r\n\005width\030\003 \001(" - + "\005\022\016\n\006height\030\004 \001(\005\032@\n\006Matrix\022\014\n\004rows\030\001 \001(" - + "\005\022\014\n\004cols\030\002 \001(\005\022\014\n\004type\030\003 \001(\005\022\014\n\004data\030\004 " - + "\001(\014\032\354\002\n\006Layout\022I\n\013text_anchor\030\001 \001(\01324.go" - + "ogle.cloud.documentai.v1beta3.Document.T" - + "extAnchor\022\022\n\nconfidence\030\002 \001(\002\022D\n\rboundin" - + "g_poly\030\003 \001(\0132-.google.cloud.documentai.v" - + "1beta3.BoundingPoly\022V\n\013orientation\030\004 \001(\016" - + "2A.google.cloud.documentai.v1beta3.Docum" - + "ent.Page.Layout.Orientation\"e\n\013Orientati" - + "on\022\033\n\027ORIENTATION_UNSPECIFIED\020\000\022\013\n\007PAGE_" - + "UP\020\001\022\016\n\nPAGE_RIGHT\020\002\022\r\n\tPAGE_DOWN\020\003\022\r\n\tP" - + "AGE_LEFT\020\004\032\371\001\n\005Block\022E\n\006layout\030\001 \001(\01325.g" - + "oogle.cloud.documentai.v1beta3.Document." - + "Page.Layout\022[\n\022detected_languages\030\002 \003(\0132" - + "?.google.cloud.documentai.v1beta3.Docume" - + "nt.Page.DetectedLanguage\022L\n\nprovenance\030\003" - + " \001(\01324.google.cloud.documentai.v1beta3.D" - + "ocument.ProvenanceB\002\030\001\032\375\001\n\tParagraph\022E\n\006" - + "layout\030\001 \001(\01325.google.cloud.documentai.v" - + "1beta3.Document.Page.Layout\022[\n\022detected_" - + "languages\030\002 \003(\0132?.google.cloud.documenta" - + "i.v1beta3.Document.Page.DetectedLanguage" - + "\022L\n\nprovenance\030\003 \001(\01324.google.cloud.docu" - + "mentai.v1beta3.Document.ProvenanceB\002\030\001\032\370" - + "\001\n\004Line\022E\n\006layout\030\001 \001(\01325.google.cloud.d" - + "ocumentai.v1beta3.Document.Page.Layout\022[" - + "\n\022detected_languages\030\002 \003(\0132?.google.clou" - + "d.documentai.v1beta3.Document.Page.Detec" - + "tedLanguage\022L\n\nprovenance\030\003 \001(\01324.google" - + ".cloud.documentai.v1beta3.Document.Prove" - + "nanceB\002\030\001\032\274\007\n\005Token\022E\n\006layout\030\001 \001(\01325.go" - + "ogle.cloud.documentai.v1beta3.Document.P" - + "age.Layout\022Z\n\016detected_break\030\002 \001(\0132B.goo" + + "ment.Page.Paragraph\022B\n\005lines\030\007 \003(\01323.goo" + "gle.cloud.documentai.v1beta3.Document.Pa" - + "ge.Token.DetectedBreak\022[\n\022detected_langu" - + "ages\030\003 \003(\0132?.google.cloud.documentai.v1b" - + "eta3.Document.Page.DetectedLanguage\022L\n\np" - + "rovenance\030\004 \001(\01324.google.cloud.documenta" - + "i.v1beta3.Document.ProvenanceB\002\030\001\022R\n\nsty" - + "le_info\030\005 \001(\0132>.google.cloud.documentai." - + "v1beta3.Document.Page.Token.StyleInfo\032\253\001" - + "\n\rDetectedBreak\022U\n\004type\030\001 \001(\0162G.google.c" - + "loud.documentai.v1beta3.Document.Page.To" - + "ken.DetectedBreak.Type\"C\n\004Type\022\024\n\020TYPE_U" - + "NSPECIFIED\020\000\022\t\n\005SPACE\020\001\022\016\n\nWIDE_SPACE\020\002\022" - + "\n\n\006HYPHEN\020\003\032\342\002\n\tStyleInfo\022\021\n\tfont_size\030\001" - + " \001(\005\022\027\n\017pixel_font_size\030\002 \001(\001\022\026\n\016letter_" - + "spacing\030\003 \001(\001\022\021\n\tfont_type\030\004 \001(\t\022\014\n\004bold" - + "\030\005 \001(\010\022\016\n\006italic\030\006 \001(\010\022\022\n\nunderlined\030\007 \001" - + "(\010\022\021\n\tstrikeout\030\010 \001(\010\022\021\n\tsubscript\030\t \001(\010" - + "\022\023\n\013superscript\030\n \001(\010\022\021\n\tsmallcaps\030\013 \001(\010" - + "\022\023\n\013font_weight\030\014 \001(\005\022\023\n\013handwritten\030\r \001" - + "(\010\022&\n\ntext_color\030\016 \001(\0132\022.google.type.Col" - + "or\022,\n\020background_color\030\017 \001(\0132\022.google.ty" - + "pe.Color\032\254\001\n\006Symbol\022E\n\006layout\030\001 \001(\01325.go" - + "ogle.cloud.documentai.v1beta3.Document.P" - + "age.Layout\022[\n\022detected_languages\030\002 \003(\0132?" - + ".google.cloud.documentai.v1beta3.Documen" - + "t.Page.DetectedLanguage\032\301\001\n\rVisualElemen" - + "t\022E\n\006layout\030\001 \001(\01325.google.cloud.documen" - + "tai.v1beta3.Document.Page.Layout\022\014\n\004type" - + "\030\002 \001(\t\022[\n\022detected_languages\030\003 \003(\0132?.goo" + + "ge.Line\022D\n\006tokens\030\010 \003(\01324.google.cloud.d" + + "ocumentai.v1beta3.Document.Page.Token\022U\n" + + "\017visual_elements\030\t \003(\0132<.google.cloud.do" + + "cumentai.v1beta3.Document.Page.VisualEle" + + "ment\022D\n\006tables\030\n \003(\01324.google.cloud.docu" + + "mentai.v1beta3.Document.Page.Table\022M\n\013fo" + + "rm_fields\030\013 \003(\01328.google.cloud.documenta" + + "i.v1beta3.Document.Page.FormField\022F\n\007sym" + + "bols\030\014 \003(\01325.google.cloud.documentai.v1b" + + "eta3.Document.Page.Symbol\022Y\n\021detected_ba" + + "rcodes\030\017 \003(\0132>.google.cloud.documentai.v" + + "1beta3.Document.Page.DetectedBarcode\022_\n\024" + + "image_quality_scores\030\021 \001(\0132A.google.clou" + + "d.documentai.v1beta3.Document.Page.Image" + + "QualityScores\022L\n\nprovenance\030\020 \001(\01324.goog" + + "le.cloud.documentai.v1beta3.Document.Pro" + + "venanceB\002\030\001\0328\n\tDimension\022\r\n\005width\030\001 \001(\002\022" + + "\016\n\006height\030\002 \001(\002\022\014\n\004unit\030\003 \001(\t\032J\n\005Image\022\017" + + "\n\007content\030\001 \001(\014\022\021\n\tmime_type\030\002 \001(\t\022\r\n\005wi" + + "dth\030\003 \001(\005\022\016\n\006height\030\004 \001(\005\032@\n\006Matrix\022\014\n\004r" + + "ows\030\001 \001(\005\022\014\n\004cols\030\002 \001(\005\022\014\n\004type\030\003 \001(\005\022\014\n" + + "\004data\030\004 \001(\014\032\354\002\n\006Layout\022I\n\013text_anchor\030\001 " + + "\001(\01324.google.cloud.documentai.v1beta3.Do" + + "cument.TextAnchor\022\022\n\nconfidence\030\002 \001(\002\022D\n" + + "\rbounding_poly\030\003 \001(\0132-.google.cloud.docu" + + "mentai.v1beta3.BoundingPoly\022V\n\013orientati" + + "on\030\004 \001(\0162A.google.cloud.documentai.v1bet" + + "a3.Document.Page.Layout.Orientation\"e\n\013O" + + "rientation\022\033\n\027ORIENTATION_UNSPECIFIED\020\000\022" + + "\013\n\007PAGE_UP\020\001\022\016\n\nPAGE_RIGHT\020\002\022\r\n\tPAGE_DOW" + + "N\020\003\022\r\n\tPAGE_LEFT\020\004\032\371\001\n\005Block\022E\n\006layout\030\001" + + " \001(\01325.google.cloud.documentai.v1beta3.D" + + "ocument.Page.Layout\022[\n\022detected_language" + + "s\030\002 \003(\0132?.google.cloud.documentai.v1beta" + + "3.Document.Page.DetectedLanguage\022L\n\nprov" + + "enance\030\003 \001(\01324.google.cloud.documentai.v" + + "1beta3.Document.ProvenanceB\002\030\001\032\375\001\n\tParag" + + "raph\022E\n\006layout\030\001 \001(\01325.google.cloud.docu" + + "mentai.v1beta3.Document.Page.Layout\022[\n\022d" + + "etected_languages\030\002 \003(\0132?.google.cloud.d" + + "ocumentai.v1beta3.Document.Page.Detected" + + "Language\022L\n\nprovenance\030\003 \001(\01324.google.cl" + + "oud.documentai.v1beta3.Document.Provenan" + + "ceB\002\030\001\032\370\001\n\004Line\022E\n\006layout\030\001 \001(\01325.google" + + ".cloud.documentai.v1beta3.Document.Page." + + "Layout\022[\n\022detected_languages\030\002 \003(\0132?.goo" + "gle.cloud.documentai.v1beta3.Document.Pa" - + "ge.DetectedLanguage\032\320\005\n\005Table\022E\n\006layout\030" - + "\001 \001(\01325.google.cloud.documentai.v1beta3." - + "Document.Page.Layout\022R\n\013header_rows\030\002 \003(" - + "\0132=.google.cloud.documentai.v1beta3.Docu" - + "ment.Page.Table.TableRow\022P\n\tbody_rows\030\003 " - + "\003(\0132=.google.cloud.documentai.v1beta3.Do" - + "cument.Page.Table.TableRow\022[\n\022detected_l" - + "anguages\030\004 \003(\0132?.google.cloud.documentai" - + ".v1beta3.Document.Page.DetectedLanguage\022" - + "L\n\nprovenance\030\005 \001(\01324.google.cloud.docum" - + "entai.v1beta3.Document.ProvenanceB\002\030\001\032Y\n" - + "\010TableRow\022M\n\005cells\030\001 \003(\0132>.google.cloud." - + "documentai.v1beta3.Document.Page.Table.T" - + "ableCell\032\323\001\n\tTableCell\022E\n\006layout\030\001 \001(\01325" - + ".google.cloud.documentai.v1beta3.Documen" - + "t.Page.Layout\022\020\n\010row_span\030\002 \001(\005\022\020\n\010col_s" - + "pan\030\003 \001(\005\022[\n\022detected_languages\030\004 \003(\0132?." + + "ge.DetectedLanguage\022L\n\nprovenance\030\003 \001(\0132" + + "4.google.cloud.documentai.v1beta3.Docume" + + "nt.ProvenanceB\002\030\001\032\274\007\n\005Token\022E\n\006layout\030\001 " + + "\001(\01325.google.cloud.documentai.v1beta3.Do" + + "cument.Page.Layout\022Z\n\016detected_break\030\002 \001" + + "(\0132B.google.cloud.documentai.v1beta3.Doc" + + "ument.Page.Token.DetectedBreak\022[\n\022detect" + + "ed_languages\030\003 \003(\0132?.google.cloud.docume" + + "ntai.v1beta3.Document.Page.DetectedLangu" + + "age\022L\n\nprovenance\030\004 \001(\01324.google.cloud.d" + + "ocumentai.v1beta3.Document.ProvenanceB\002\030" + + "\001\022R\n\nstyle_info\030\005 \001(\0132>.google.cloud.doc" + + "umentai.v1beta3.Document.Page.Token.Styl" + + "eInfo\032\253\001\n\rDetectedBreak\022U\n\004type\030\001 \001(\0162G." + "google.cloud.documentai.v1beta3.Document" - + ".Page.DetectedLanguage\032\377\003\n\tFormField\022I\n\n" - + "field_name\030\001 \001(\01325.google.cloud.document" - + "ai.v1beta3.Document.Page.Layout\022J\n\013field" - + "_value\030\002 \001(\01325.google.cloud.documentai.v" - + "1beta3.Document.Page.Layout\022`\n\027name_dete" - + "cted_languages\030\003 \003(\0132?.google.cloud.docu" - + "mentai.v1beta3.Document.Page.DetectedLan" - + "guage\022a\n\030value_detected_languages\030\004 \003(\0132" - + "?.google.cloud.documentai.v1beta3.Docume" - + "nt.Page.DetectedLanguage\022\022\n\nvalue_type\030\005" - + " \001(\t\022\032\n\022corrected_key_text\030\006 \001(\t\022\034\n\024corr" - + "ected_value_text\030\007 \001(\t\022H\n\nprovenance\030\010 \001" - + "(\01324.google.cloud.documentai.v1beta3.Doc" - + "ument.Provenance\032\223\001\n\017DetectedBarcode\022E\n\006" - + "layout\030\001 \001(\01325.google.cloud.documentai.v" - + "1beta3.Document.Page.Layout\0229\n\007barcode\030\002" - + " \001(\0132(.google.cloud.documentai.v1beta3.B" - + "arcode\032=\n\020DetectedLanguage\022\025\n\rlanguage_c" - + "ode\030\001 \001(\t\022\022\n\nconfidence\030\002 \001(\002\032\313\001\n\022ImageQ" - + "ualityScores\022\025\n\rquality_score\030\001 \001(\002\022j\n\020d" - + "etected_defects\030\002 \003(\0132P.google.cloud.doc" - + "umentai.v1beta3.Document.Page.ImageQuali" - + "tyScores.DetectedDefect\0322\n\016DetectedDefec" - + "t\022\014\n\004type\030\001 \001(\t\022\022\n\nconfidence\030\002 \001(\002\032\351\006\n\006" - + "Entity\022N\n\013text_anchor\030\001 \001(\01324.google.clo" - + "ud.documentai.v1beta3.Document.TextAncho" - + "rB\003\340A\001\022\021\n\004type\030\002 \001(\tB\003\340A\002\022\031\n\014mention_tex" - + "t\030\003 \001(\tB\003\340A\001\022\027\n\nmention_id\030\004 \001(\tB\003\340A\001\022\027\n" - + "\nconfidence\030\005 \001(\002B\003\340A\001\022N\n\013page_anchor\030\006 " - + "\001(\01324.google.cloud.documentai.v1beta3.Do" - + "cument.PageAnchorB\003\340A\001\022\017\n\002id\030\007 \001(\tB\003\340A\001\022" - + "_\n\020normalized_value\030\t \001(\0132@.google.cloud" - + ".documentai.v1beta3.Document.Entity.Norm" - + "alizedValueB\003\340A\001\022I\n\nproperties\030\n \003(\01320.g" - + "oogle.cloud.documentai.v1beta3.Document." - + "EntityB\003\340A\001\022M\n\nprovenance\030\013 \001(\01324.google" - + ".cloud.documentai.v1beta3.Document.Prove" - + "nanceB\003\340A\001\022\025\n\010redacted\030\014 \001(\010B\003\340A\001\032\273\002\n\017No" - + "rmalizedValue\022)\n\013money_value\030\002 \001(\0132\022.goo" - + "gle.type.MoneyH\000\022\'\n\ndate_value\030\003 \001(\0132\021.g" - + "oogle.type.DateH\000\022/\n\016datetime_value\030\004 \001(" - + "\0132\025.google.type.DateTimeH\000\0223\n\raddress_va" - + "lue\030\005 \001(\0132\032.google.type.PostalAddressH\000\022" - + "\027\n\rboolean_value\030\006 \001(\010H\000\022\027\n\rinteger_valu" - + "e\030\007 \001(\005H\000\022\025\n\013float_value\030\010 \001(\002H\000\022\021\n\004text" - + "\030\001 \001(\tB\003\340A\001B\022\n\020structured_value\032I\n\016Entit" - + "yRelation\022\022\n\nsubject_id\030\001 \001(\t\022\021\n\tobject_" - + "id\030\002 \001(\t\022\020\n\010relation\030\003 \001(\t\032\255\001\n\nTextAncho" - + "r\022W\n\rtext_segments\030\001 \003(\0132@.google.cloud." - + "documentai.v1beta3.Document.TextAnchor.T" - + "extSegment\022\017\n\007content\030\002 \001(\t\0325\n\013TextSegme" - + "nt\022\023\n\013start_index\030\001 \001(\003\022\021\n\tend_index\030\002 \001" - + "(\003\032\347\003\n\nPageAnchor\022O\n\tpage_refs\030\001 \003(\0132<.g" - + "oogle.cloud.documentai.v1beta3.Document." - + "PageAnchor.PageRef\032\207\003\n\007PageRef\022\021\n\004page\030\001" - + " \001(\003B\003\340A\002\022a\n\013layout_type\030\002 \001(\0162G.google." - + "cloud.documentai.v1beta3.Document.PageAn" - + "chor.PageRef.LayoutTypeB\003\340A\001\022\030\n\tlayout_i" - + "d\030\003 \001(\tB\005\030\001\340A\001\022I\n\rbounding_poly\030\004 \001(\0132-." - + "google.cloud.documentai.v1beta3.Bounding" - + "PolyB\003\340A\001\022\027\n\nconfidence\030\005 \001(\002B\003\340A\001\"\207\001\n\nL" - + "ayoutType\022\033\n\027LAYOUT_TYPE_UNSPECIFIED\020\000\022\t" - + "\n\005BLOCK\020\001\022\r\n\tPARAGRAPH\020\002\022\010\n\004LINE\020\003\022\t\n\005TO" - + "KEN\020\004\022\022\n\016VISUAL_ELEMENT\020\005\022\t\n\005TABLE\020\006\022\016\n\n" - + "FORM_FIELD\020\007\032\262\003\n\nProvenance\022\024\n\010revision\030" - + "\001 \001(\005B\002\030\001\022\016\n\002id\030\002 \001(\005B\002\030\001\022L\n\007parents\030\003 \003" - + "(\0132;.google.cloud.documentai.v1beta3.Doc" - + "ument.Provenance.Parent\022P\n\004type\030\004 \001(\0162B." + + ".Page.Token.DetectedBreak.Type\"C\n\004Type\022\024" + + "\n\020TYPE_UNSPECIFIED\020\000\022\t\n\005SPACE\020\001\022\016\n\nWIDE_" + + "SPACE\020\002\022\n\n\006HYPHEN\020\003\032\342\002\n\tStyleInfo\022\021\n\tfon" + + "t_size\030\001 \001(\005\022\027\n\017pixel_font_size\030\002 \001(\001\022\026\n" + + "\016letter_spacing\030\003 \001(\001\022\021\n\tfont_type\030\004 \001(\t" + + "\022\014\n\004bold\030\005 \001(\010\022\016\n\006italic\030\006 \001(\010\022\022\n\nunderl" + + "ined\030\007 \001(\010\022\021\n\tstrikeout\030\010 \001(\010\022\021\n\tsubscri" + + "pt\030\t \001(\010\022\023\n\013superscript\030\n \001(\010\022\021\n\tsmallca" + + "ps\030\013 \001(\010\022\023\n\013font_weight\030\014 \001(\005\022\023\n\013handwri" + + "tten\030\r \001(\010\022&\n\ntext_color\030\016 \001(\0132\022.google." + + "type.Color\022,\n\020background_color\030\017 \001(\0132\022.g" + + "oogle.type.Color\032\254\001\n\006Symbol\022E\n\006layout\030\001 " + + "\001(\01325.google.cloud.documentai.v1beta3.Do" + + "cument.Page.Layout\022[\n\022detected_languages" + + "\030\002 \003(\0132?.google.cloud.documentai.v1beta3" + + ".Document.Page.DetectedLanguage\032\301\001\n\rVisu" + + "alElement\022E\n\006layout\030\001 \001(\01325.google.cloud" + + ".documentai.v1beta3.Document.Page.Layout" + + "\022\014\n\004type\030\002 \001(\t\022[\n\022detected_languages\030\003 \003" + + "(\0132?.google.cloud.documentai.v1beta3.Doc" + + "ument.Page.DetectedLanguage\032\320\005\n\005Table\022E\n" + + "\006layout\030\001 \001(\01325.google.cloud.documentai." + + "v1beta3.Document.Page.Layout\022R\n\013header_r" + + "ows\030\002 \003(\0132=.google.cloud.documentai.v1be" + + "ta3.Document.Page.Table.TableRow\022P\n\tbody" + + "_rows\030\003 \003(\0132=.google.cloud.documentai.v1" + + "beta3.Document.Page.Table.TableRow\022[\n\022de" + + "tected_languages\030\004 \003(\0132?.google.cloud.do" + + "cumentai.v1beta3.Document.Page.DetectedL" + + "anguage\022L\n\nprovenance\030\005 \001(\01324.google.clo" + + "ud.documentai.v1beta3.Document.Provenanc" + + "eB\002\030\001\032Y\n\010TableRow\022M\n\005cells\030\001 \003(\0132>.googl" + + "e.cloud.documentai.v1beta3.Document.Page" + + ".Table.TableCell\032\323\001\n\tTableCell\022E\n\006layout" + + "\030\001 \001(\01325.google.cloud.documentai.v1beta3" + + ".Document.Page.Layout\022\020\n\010row_span\030\002 \001(\005\022" + + "\020\n\010col_span\030\003 \001(\005\022[\n\022detected_languages\030" + + "\004 \003(\0132?.google.cloud.documentai.v1beta3." + + "Document.Page.DetectedLanguage\032\377\003\n\tFormF" + + "ield\022I\n\nfield_name\030\001 \001(\01325.google.cloud." + + "documentai.v1beta3.Document.Page.Layout\022" + + "J\n\013field_value\030\002 \001(\01325.google.cloud.docu" + + "mentai.v1beta3.Document.Page.Layout\022`\n\027n" + + "ame_detected_languages\030\003 \003(\0132?.google.cl" + + "oud.documentai.v1beta3.Document.Page.Det" + + "ectedLanguage\022a\n\030value_detected_language" + + "s\030\004 \003(\0132?.google.cloud.documentai.v1beta" + + "3.Document.Page.DetectedLanguage\022\022\n\nvalu" + + "e_type\030\005 \001(\t\022\032\n\022corrected_key_text\030\006 \001(\t" + + "\022\034\n\024corrected_value_text\030\007 \001(\t\022H\n\nproven" + + "ance\030\010 \001(\01324.google.cloud.documentai.v1b" + + "eta3.Document.Provenance\032\223\001\n\017DetectedBar" + + "code\022E\n\006layout\030\001 \001(\01325.google.cloud.docu" + + "mentai.v1beta3.Document.Page.Layout\0229\n\007b" + + "arcode\030\002 \001(\0132(.google.cloud.documentai.v" + + "1beta3.Barcode\032=\n\020DetectedLanguage\022\025\n\rla" + + "nguage_code\030\001 \001(\t\022\022\n\nconfidence\030\002 \001(\002\032\313\001" + + "\n\022ImageQualityScores\022\025\n\rquality_score\030\001 " + + "\001(\002\022j\n\020detected_defects\030\002 \003(\0132P.google.c" + + "loud.documentai.v1beta3.Document.Page.Im" + + "ageQualityScores.DetectedDefect\0322\n\016Detec" + + "tedDefect\022\014\n\004type\030\001 \001(\t\022\022\n\nconfidence\030\002 " + + "\001(\002\032\351\006\n\006Entity\022N\n\013text_anchor\030\001 \001(\01324.go" + + "ogle.cloud.documentai.v1beta3.Document.T" + + "extAnchorB\003\340A\001\022\021\n\004type\030\002 \001(\tB\003\340A\002\022\031\n\014men" + + "tion_text\030\003 \001(\tB\003\340A\001\022\027\n\nmention_id\030\004 \001(\t" + + "B\003\340A\001\022\027\n\nconfidence\030\005 \001(\002B\003\340A\001\022N\n\013page_a" + + "nchor\030\006 \001(\01324.google.cloud.documentai.v1" + + "beta3.Document.PageAnchorB\003\340A\001\022\017\n\002id\030\007 \001" + + "(\tB\003\340A\001\022_\n\020normalized_value\030\t \001(\0132@.goog" + + "le.cloud.documentai.v1beta3.Document.Ent" + + "ity.NormalizedValueB\003\340A\001\022I\n\nproperties\030\n" + + " \003(\01320.google.cloud.documentai.v1beta3.D" + + "ocument.EntityB\003\340A\001\022M\n\nprovenance\030\013 \001(\0132" + + "4.google.cloud.documentai.v1beta3.Docume" + + "nt.ProvenanceB\003\340A\001\022\025\n\010redacted\030\014 \001(\010B\003\340A" + + "\001\032\273\002\n\017NormalizedValue\022)\n\013money_value\030\002 \001" + + "(\0132\022.google.type.MoneyH\000\022\'\n\ndate_value\030\003" + + " \001(\0132\021.google.type.DateH\000\022/\n\016datetime_va" + + "lue\030\004 \001(\0132\025.google.type.DateTimeH\000\0223\n\rad" + + "dress_value\030\005 \001(\0132\032.google.type.PostalAd" + + "dressH\000\022\027\n\rboolean_value\030\006 \001(\010H\000\022\027\n\rinte" + + "ger_value\030\007 \001(\005H\000\022\025\n\013float_value\030\010 \001(\002H\000" + + "\022\021\n\004text\030\001 \001(\tB\003\340A\001B\022\n\020structured_value\032" + + "I\n\016EntityRelation\022\022\n\nsubject_id\030\001 \001(\t\022\021\n" + + "\tobject_id\030\002 \001(\t\022\020\n\010relation\030\003 \001(\t\032\255\001\n\nT" + + "extAnchor\022W\n\rtext_segments\030\001 \003(\0132@.googl" + + "e.cloud.documentai.v1beta3.Document.Text" + + "Anchor.TextSegment\022\017\n\007content\030\002 \001(\t\0325\n\013T" + + "extSegment\022\023\n\013start_index\030\001 \001(\003\022\021\n\tend_i" + + "ndex\030\002 \001(\003\032\347\003\n\nPageAnchor\022O\n\tpage_refs\030\001" + + " \003(\0132<.google.cloud.documentai.v1beta3.D" + + "ocument.PageAnchor.PageRef\032\207\003\n\007PageRef\022\021" + + "\n\004page\030\001 \001(\003B\003\340A\002\022a\n\013layout_type\030\002 \001(\0162G" + + ".google.cloud.documentai.v1beta3.Documen" + + "t.PageAnchor.PageRef.LayoutTypeB\003\340A\001\022\030\n\t" + + "layout_id\030\003 \001(\tB\005\030\001\340A\001\022I\n\rbounding_poly\030" + + "\004 \001(\0132-.google.cloud.documentai.v1beta3." + + "BoundingPolyB\003\340A\001\022\027\n\nconfidence\030\005 \001(\002B\003\340" + + "A\001\"\207\001\n\nLayoutType\022\033\n\027LAYOUT_TYPE_UNSPECI" + + "FIED\020\000\022\t\n\005BLOCK\020\001\022\r\n\tPARAGRAPH\020\002\022\010\n\004LINE" + + "\020\003\022\t\n\005TOKEN\020\004\022\022\n\016VISUAL_ELEMENT\020\005\022\t\n\005TAB" + + "LE\020\006\022\016\n\nFORM_FIELD\020\007\032\262\003\n\nProvenance\022\024\n\010r" + + "evision\030\001 \001(\005B\002\030\001\022\016\n\002id\030\002 \001(\005B\002\030\001\022L\n\007par" + + "ents\030\003 \003(\0132;.google.cloud.documentai.v1b" + + "eta3.Document.Provenance.Parent\022P\n\004type\030" + + "\004 \001(\0162B.google.cloud.documentai.v1beta3." + + "Document.Provenance.OperationType\0329\n\006Par" + + "ent\022\020\n\010revision\030\001 \001(\005\022\r\n\005index\030\003 \001(\005\022\016\n\002" + + "id\030\002 \001(\005B\002\030\001\"\242\001\n\rOperationType\022\036\n\032OPERAT" + + "ION_TYPE_UNSPECIFIED\020\000\022\007\n\003ADD\020\001\022\n\n\006REMOV" + + "E\020\002\022\n\n\006UPDATE\020\007\022\013\n\007REPLACE\020\003\022\026\n\016EVAL_REQ" + + "UESTED\020\004\032\002\010\001\022\025\n\rEVAL_APPROVED\020\005\032\002\010\001\022\024\n\014E" + + "VAL_SKIPPED\020\006\032\002\010\001\032\252\002\n\010Revision\022\017\n\005agent\030" + + "\004 \001(\tH\000\022\023\n\tprocessor\030\005 \001(\tH\000\022\n\n\002id\030\001 \001(\t" + + "\022\022\n\006parent\030\002 \003(\005B\002\030\001\022\022\n\nparent_ids\030\007 \003(\t" + + "\022/\n\013create_time\030\003 \001(\0132\032.google.protobuf." + + "Timestamp\022T\n\014human_review\030\006 \001(\0132>.google" + + ".cloud.documentai.v1beta3.Document.Revis" + + "ion.HumanReview\0323\n\013HumanReview\022\r\n\005state\030" + + "\001 \001(\t\022\025\n\rstate_message\030\002 \001(\tB\010\n\006source\032\273" + + "\001\n\nTextChange\022I\n\013text_anchor\030\001 \001(\01324.goo" + + "gle.cloud.documentai.v1beta3.Document.Te" + + "xtAnchor\022\024\n\014changed_text\030\002 \001(\t\022L\n\nproven" + + "ance\030\003 \003(\01324.google.cloud.documentai.v1b" + + "eta3.Document.ProvenanceB\002\030\001\032\331\014\n\016Documen" + + "tLayout\022\\\n\006blocks\030\001 \003(\0132L.google.cloud.d" + + "ocumentai.v1beta3.Document.DocumentLayou" + + "t.DocumentLayoutBlock\032\350\013\n\023DocumentLayout" + + "Block\022r\n\ntext_block\030\002 \001(\0132\\.google.cloud" + + ".documentai.v1beta3.Document.DocumentLay" + + "out.DocumentLayoutBlock.LayoutTextBlockH" + + "\000\022t\n\013table_block\030\003 \001(\0132].google.cloud.do" + + "cumentai.v1beta3.Document.DocumentLayout" + + ".DocumentLayoutBlock.LayoutTableBlockH\000\022" + + "r\n\nlist_block\030\004 \001(\0132\\.google.cloud.docum" + + "entai.v1beta3.Document.DocumentLayout.Do" + + "cumentLayoutBlock.LayoutListBlockH\000\022\020\n\010b" + + "lock_id\030\001 \001(\t\022n\n\tpage_span\030\005 \001(\0132[.googl" + + "e.cloud.documentai.v1beta3.Document.Docu" + + "mentLayout.DocumentLayoutBlock.LayoutPag" + + "eSpan\0326\n\016LayoutPageSpan\022\022\n\npage_start\030\001 " + + "\001(\005\022\020\n\010page_end\030\002 \001(\005\032\213\001\n\017LayoutTextBloc" + + "k\022\014\n\004text\030\001 \001(\t\022\014\n\004type\030\002 \001(\t\022\\\n\006blocks\030" + + "\003 \003(\0132L.google.cloud.documentai.v1beta3." + + "Document.DocumentLayout.DocumentLayoutBl" + + "ock\032\205\002\n\020LayoutTableBlock\022p\n\013header_rows\030" + + "\001 \003(\0132[.google.cloud.documentai.v1beta3." + + "Document.DocumentLayout.DocumentLayoutBl" + + "ock.LayoutTableRow\022n\n\tbody_rows\030\002 \003(\0132[." + "google.cloud.documentai.v1beta3.Document" - + ".Provenance.OperationType\0329\n\006Parent\022\020\n\010r" - + "evision\030\001 \001(\005\022\r\n\005index\030\003 \001(\005\022\016\n\002id\030\002 \001(\005" - + "B\002\030\001\"\242\001\n\rOperationType\022\036\n\032OPERATION_TYPE" - + "_UNSPECIFIED\020\000\022\007\n\003ADD\020\001\022\n\n\006REMOVE\020\002\022\n\n\006U" - + "PDATE\020\007\022\013\n\007REPLACE\020\003\022\026\n\016EVAL_REQUESTED\020\004" - + "\032\002\010\001\022\025\n\rEVAL_APPROVED\020\005\032\002\010\001\022\024\n\014EVAL_SKIP" - + "PED\020\006\032\002\010\001\032\252\002\n\010Revision\022\017\n\005agent\030\004 \001(\tH\000\022" - + "\023\n\tprocessor\030\005 \001(\tH\000\022\n\n\002id\030\001 \001(\t\022\022\n\006pare" - + "nt\030\002 \003(\005B\002\030\001\022\022\n\nparent_ids\030\007 \003(\t\022/\n\013crea" - + "te_time\030\003 \001(\0132\032.google.protobuf.Timestam" - + "p\022T\n\014human_review\030\006 \001(\0132>.google.cloud.d" - + "ocumentai.v1beta3.Document.Revision.Huma" - + "nReview\0323\n\013HumanReview\022\r\n\005state\030\001 \001(\t\022\025\n" - + "\rstate_message\030\002 \001(\tB\010\n\006source\032\273\001\n\nTextC" - + "hange\022I\n\013text_anchor\030\001 \001(\01324.google.clou" - + "d.documentai.v1beta3.Document.TextAnchor" - + "\022\024\n\014changed_text\030\002 \001(\t\022L\n\nprovenance\030\003 \003" - + "(\01324.google.cloud.documentai.v1beta3.Doc" - + "ument.ProvenanceB\002\030\001B\010\n\006source\"\233\002\n\013Revis" - + "ionRef\022R\n\rrevision_case\030\001 \001(\01629.google.c" - + "loud.documentai.v1beta3.RevisionRef.Revi" - + "sionCaseH\000\022\025\n\013revision_id\030\002 \001(\tH\000\022\"\n\030lat" - + "est_processor_version\030\003 \001(\tH\000\"s\n\014Revisio" - + "nCase\022\035\n\031REVISION_CASE_UNSPECIFIED\020\000\022\027\n\023" - + "LATEST_HUMAN_REVIEW\020\001\022\024\n\020LATEST_TIMESTAM" - + "P\020\002\022\025\n\021BASE_OCR_REVISION\020\003B\010\n\006sourceB\344\001\n" - + "#com.google.cloud.documentai.v1beta3B\rDo" - + "cumentProtoP\001ZCcloud.google.com/go/docum" - + "entai/apiv1beta3/documentaipb;documentai" - + "pb\252\002\037Google.Cloud.DocumentAI.V1Beta3\312\002\037G" - + "oogle\\Cloud\\DocumentAI\\V1beta3\352\002\"Google:" - + ":Cloud::DocumentAI::V1beta3b\006proto3" + + ".DocumentLayout.DocumentLayoutBlock.Layo" + + "utTableRow\022\017\n\007caption\030\003 \001(\t\032}\n\016LayoutTab" + + "leRow\022k\n\005cells\030\001 \003(\0132\\.google.cloud.docu" + + "mentai.v1beta3.Document.DocumentLayout.D" + + "ocumentLayoutBlock.LayoutTableCell\032\223\001\n\017L" + + "ayoutTableCell\022\\\n\006blocks\030\001 \003(\0132L.google." + + "cloud.documentai.v1beta3.Document.Docume" + + "ntLayout.DocumentLayoutBlock\022\020\n\010row_span" + + "\030\002 \001(\005\022\020\n\010col_span\030\003 \001(\005\032\223\001\n\017LayoutListB" + + "lock\022r\n\014list_entries\030\001 \003(\0132\\.google.clou" + + "d.documentai.v1beta3.Document.DocumentLa" + + "yout.DocumentLayoutBlock.LayoutListEntry" + + "\022\014\n\004type\030\002 \001(\t\032o\n\017LayoutListEntry\022\\\n\006blo" + + "cks\030\001 \003(\0132L.google.cloud.documentai.v1be" + + "ta3.Document.DocumentLayout.DocumentLayo" + + "utBlockB\007\n\005block\032\302\002\n\017ChunkedDocument\022O\n\006" + + "chunks\030\001 \003(\0132?.google.cloud.documentai.v" + + "1beta3.Document.ChunkedDocument.Chunk\032\335\001" + + "\n\005Chunk\022\020\n\010chunk_id\030\001 \001(\t\022\030\n\020source_bloc" + + "k_ids\030\002 \003(\t\022\017\n\007content\030\003 \001(\t\022`\n\tpage_spa" + + "n\030\004 \001(\0132M.google.cloud.documentai.v1beta" + + "3.Document.ChunkedDocument.Chunk.ChunkPa" + + "geSpan\0325\n\rChunkPageSpan\022\022\n\npage_start\030\001 " + + "\001(\005\022\020\n\010page_end\030\002 \001(\005B\010\n\006source\"\233\002\n\013Revi" + + "sionRef\022R\n\rrevision_case\030\001 \001(\01629.google." + + "cloud.documentai.v1beta3.RevisionRef.Rev" + + "isionCaseH\000\022\025\n\013revision_id\030\002 \001(\tH\000\022\"\n\030la" + + "test_processor_version\030\003 \001(\tH\000\"s\n\014Revisi" + + "onCase\022\035\n\031REVISION_CASE_UNSPECIFIED\020\000\022\027\n" + + "\023LATEST_HUMAN_REVIEW\020\001\022\024\n\020LATEST_TIMESTA" + + "MP\020\002\022\025\n\021BASE_OCR_REVISION\020\003B\010\n\006sourceB\344\001" + + "\n#com.google.cloud.documentai.v1beta3B\rD" + + "ocumentProtoP\001ZCcloud.google.com/go/docu" + + "mentai/apiv1beta3/documentaipb;documenta" + + "ipb\252\002\037Google.Cloud.DocumentAI.V1Beta3\312\002\037" + + "Google\\Cloud\\DocumentAI\\V1beta3\352\002\"Google" + + "::Cloud::DocumentAI::V1beta3b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -477,6 +578,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ShardInfo", "Error", "Revisions", + "DocumentLayout", + "ChunkedDocument", "Source", }); internal_static_google_cloud_documentai_v1beta3_Document_ShardInfo_descriptor = @@ -888,6 +991,126 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "TextAnchor", "ChangedText", "Provenance", }); + internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_descriptor = + internal_static_google_cloud_documentai_v1beta3_Document_descriptor + .getNestedTypes() + .get(10); + internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_descriptor, + new java.lang.String[] { + "Blocks", + }); + internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_descriptor = + internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_descriptor, + new java.lang.String[] { + "TextBlock", "TableBlock", "ListBlock", "BlockId", "PageSpan", "Block", + }); + internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_LayoutPageSpan_descriptor = + internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_LayoutPageSpan_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_LayoutPageSpan_descriptor, + new java.lang.String[] { + "PageStart", "PageEnd", + }); + internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_LayoutTextBlock_descriptor = + internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_LayoutTextBlock_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_LayoutTextBlock_descriptor, + new java.lang.String[] { + "Text", "Type", "Blocks", + }); + internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_LayoutTableBlock_descriptor = + internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_descriptor + .getNestedTypes() + .get(2); + internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_LayoutTableBlock_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_LayoutTableBlock_descriptor, + new java.lang.String[] { + "HeaderRows", "BodyRows", "Caption", + }); + internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_LayoutTableRow_descriptor = + internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_descriptor + .getNestedTypes() + .get(3); + internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_LayoutTableRow_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_LayoutTableRow_descriptor, + new java.lang.String[] { + "Cells", + }); + internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_LayoutTableCell_descriptor = + internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_descriptor + .getNestedTypes() + .get(4); + internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_LayoutTableCell_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_LayoutTableCell_descriptor, + new java.lang.String[] { + "Blocks", "RowSpan", "ColSpan", + }); + internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_LayoutListBlock_descriptor = + internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_descriptor + .getNestedTypes() + .get(5); + internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_LayoutListBlock_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_LayoutListBlock_descriptor, + new java.lang.String[] { + "ListEntries", "Type", + }); + internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_LayoutListEntry_descriptor = + internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_descriptor + .getNestedTypes() + .get(6); + internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_LayoutListEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_documentai_v1beta3_Document_DocumentLayout_DocumentLayoutBlock_LayoutListEntry_descriptor, + new java.lang.String[] { + "Blocks", + }); + internal_static_google_cloud_documentai_v1beta3_Document_ChunkedDocument_descriptor = + internal_static_google_cloud_documentai_v1beta3_Document_descriptor + .getNestedTypes() + .get(11); + internal_static_google_cloud_documentai_v1beta3_Document_ChunkedDocument_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_documentai_v1beta3_Document_ChunkedDocument_descriptor, + new java.lang.String[] { + "Chunks", + }); + internal_static_google_cloud_documentai_v1beta3_Document_ChunkedDocument_Chunk_descriptor = + internal_static_google_cloud_documentai_v1beta3_Document_ChunkedDocument_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_documentai_v1beta3_Document_ChunkedDocument_Chunk_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_documentai_v1beta3_Document_ChunkedDocument_Chunk_descriptor, + new java.lang.String[] { + "ChunkId", "SourceBlockIds", "Content", "PageSpan", + }); + internal_static_google_cloud_documentai_v1beta3_Document_ChunkedDocument_Chunk_ChunkPageSpan_descriptor = + internal_static_google_cloud_documentai_v1beta3_Document_ChunkedDocument_Chunk_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_documentai_v1beta3_Document_ChunkedDocument_Chunk_ChunkPageSpan_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_documentai_v1beta3_Document_ChunkedDocument_Chunk_ChunkPageSpan_descriptor, + new java.lang.String[] { + "PageStart", "PageEnd", + }); internal_static_google_cloud_documentai_v1beta3_RevisionRef_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_google_cloud_documentai_v1beta3_RevisionRef_fieldAccessorTable = diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessOptions.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessOptions.java index b394a17e3001..bef13601f90b 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessOptions.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessOptions.java @@ -61,6 +61,1756 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.cloud.documentai.v1beta3.ProcessOptions.Builder.class); } + public interface LayoutConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Optional. Config for chunking in layout parser processor.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig chunking_config = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the chunkingConfig field is set. + */ + boolean hasChunkingConfig(); + /** + * + * + *
+     * Optional. Config for chunking in layout parser processor.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig chunking_config = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The chunkingConfig. + */ + com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig + getChunkingConfig(); + /** + * + * + *
+     * Optional. Config for chunking in layout parser processor.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig chunking_config = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfigOrBuilder + getChunkingConfigOrBuilder(); + } + /** + * + * + *
+   * Serving config for layout parser processor.
+   * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig} + */ + public static final class LayoutConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig) + LayoutConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use LayoutConfig.newBuilder() to construct. + private LayoutConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LayoutConfig() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new LayoutConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_ProcessOptions_LayoutConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_ProcessOptions_LayoutConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.class, + com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.Builder.class); + } + + public interface ChunkingConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Optional. The chunk sizes to use when splitting documents, in order of
+       * level.
+       * 
+ * + * int32 chunk_size = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The chunkSize. + */ + int getChunkSize(); + + /** + * + * + *
+       * Optional. Whether or not to include ancestor headings when splitting.
+       * 
+ * + * bool include_ancestor_headings = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The includeAncestorHeadings. + */ + boolean getIncludeAncestorHeadings(); + + /** + * + * + *
+       * Optional. The number of tokens to group together when evaluating
+       * semantic similarity.
+       * 
+ * + * bool semantic_chunking_group_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The semanticChunkingGroupSize. + */ + boolean getSemanticChunkingGroupSize(); + + /** + * + * + *
+       * Optional. The percentile of cosine dissimilarity that must be exceeded
+       * between a group of tokens and the next. The smaller this number is, the
+       * more chunks will be generated.
+       * 
+ * + * int32 breakpoint_percentile_threshold = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The breakpointPercentileThreshold. + */ + int getBreakpointPercentileThreshold(); + } + /** + * + * + *
+     * Serving config for chunking.
+     * 
+ * + * Protobuf type {@code + * google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig} + */ + public static final class ChunkingConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig) + ChunkingConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use ChunkingConfig.newBuilder() to construct. + private ChunkingConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ChunkingConfig() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ChunkingConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_ProcessOptions_LayoutConfig_ChunkingConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_ProcessOptions_LayoutConfig_ChunkingConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig + .class, + com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig + .Builder.class); + } + + public static final int CHUNK_SIZE_FIELD_NUMBER = 1; + private int chunkSize_ = 0; + /** + * + * + *
+       * Optional. The chunk sizes to use when splitting documents, in order of
+       * level.
+       * 
+ * + * int32 chunk_size = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The chunkSize. + */ + @java.lang.Override + public int getChunkSize() { + return chunkSize_; + } + + public static final int INCLUDE_ANCESTOR_HEADINGS_FIELD_NUMBER = 2; + private boolean includeAncestorHeadings_ = false; + /** + * + * + *
+       * Optional. Whether or not to include ancestor headings when splitting.
+       * 
+ * + * bool include_ancestor_headings = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The includeAncestorHeadings. + */ + @java.lang.Override + public boolean getIncludeAncestorHeadings() { + return includeAncestorHeadings_; + } + + public static final int SEMANTIC_CHUNKING_GROUP_SIZE_FIELD_NUMBER = 3; + private boolean semanticChunkingGroupSize_ = false; + /** + * + * + *
+       * Optional. The number of tokens to group together when evaluating
+       * semantic similarity.
+       * 
+ * + * bool semantic_chunking_group_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The semanticChunkingGroupSize. + */ + @java.lang.Override + public boolean getSemanticChunkingGroupSize() { + return semanticChunkingGroupSize_; + } + + public static final int BREAKPOINT_PERCENTILE_THRESHOLD_FIELD_NUMBER = 4; + private int breakpointPercentileThreshold_ = 0; + /** + * + * + *
+       * Optional. The percentile of cosine dissimilarity that must be exceeded
+       * between a group of tokens and the next. The smaller this number is, the
+       * more chunks will be generated.
+       * 
+ * + * int32 breakpoint_percentile_threshold = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The breakpointPercentileThreshold. + */ + @java.lang.Override + public int getBreakpointPercentileThreshold() { + return breakpointPercentileThreshold_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (chunkSize_ != 0) { + output.writeInt32(1, chunkSize_); + } + if (includeAncestorHeadings_ != false) { + output.writeBool(2, includeAncestorHeadings_); + } + if (semanticChunkingGroupSize_ != false) { + output.writeBool(3, semanticChunkingGroupSize_); + } + if (breakpointPercentileThreshold_ != 0) { + output.writeInt32(4, breakpointPercentileThreshold_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (chunkSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, chunkSize_); + } + if (includeAncestorHeadings_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize(2, includeAncestorHeadings_); + } + if (semanticChunkingGroupSize_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize(3, semanticChunkingGroupSize_); + } + if (breakpointPercentileThreshold_ != 0) { + size += + com.google.protobuf.CodedOutputStream.computeInt32Size( + 4, breakpointPercentileThreshold_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig other = + (com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig) obj; + + if (getChunkSize() != other.getChunkSize()) return false; + if (getIncludeAncestorHeadings() != other.getIncludeAncestorHeadings()) return false; + if (getSemanticChunkingGroupSize() != other.getSemanticChunkingGroupSize()) return false; + if (getBreakpointPercentileThreshold() != other.getBreakpointPercentileThreshold()) + return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CHUNK_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getChunkSize(); + hash = (37 * hash) + INCLUDE_ANCESTOR_HEADINGS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIncludeAncestorHeadings()); + hash = (37 * hash) + SEMANTIC_CHUNKING_GROUP_SIZE_FIELD_NUMBER; + hash = + (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSemanticChunkingGroupSize()); + hash = (37 * hash) + BREAKPOINT_PERCENTILE_THRESHOLD_FIELD_NUMBER; + hash = (53 * hash) + getBreakpointPercentileThreshold(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * Serving config for chunking.
+       * 
+ * + * Protobuf type {@code + * google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig) + com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_ProcessOptions_LayoutConfig_ChunkingConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_ProcessOptions_LayoutConfig_ChunkingConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig + .class, + com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig + .Builder.class); + } + + // Construct using + // com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + chunkSize_ = 0; + includeAncestorHeadings_ = false; + semanticChunkingGroupSize_ = false; + breakpointPercentileThreshold_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_ProcessOptions_LayoutConfig_ChunkingConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig + getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig + build() { + com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig + buildPartial() { + com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig result = + new com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.chunkSize_ = chunkSize_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.includeAncestorHeadings_ = includeAncestorHeadings_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.semanticChunkingGroupSize_ = semanticChunkingGroupSize_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.breakpointPercentileThreshold_ = breakpointPercentileThreshold_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig) { + return mergeFrom( + (com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig other) { + if (other + == com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig + .getDefaultInstance()) return this; + if (other.getChunkSize() != 0) { + setChunkSize(other.getChunkSize()); + } + if (other.getIncludeAncestorHeadings() != false) { + setIncludeAncestorHeadings(other.getIncludeAncestorHeadings()); + } + if (other.getSemanticChunkingGroupSize() != false) { + setSemanticChunkingGroupSize(other.getSemanticChunkingGroupSize()); + } + if (other.getBreakpointPercentileThreshold() != 0) { + setBreakpointPercentileThreshold(other.getBreakpointPercentileThreshold()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + chunkSize_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + includeAncestorHeadings_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + semanticChunkingGroupSize_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: + { + breakpointPercentileThreshold_ = input.readInt32(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int chunkSize_; + /** + * + * + *
+         * Optional. The chunk sizes to use when splitting documents, in order of
+         * level.
+         * 
+ * + * int32 chunk_size = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The chunkSize. + */ + @java.lang.Override + public int getChunkSize() { + return chunkSize_; + } + /** + * + * + *
+         * Optional. The chunk sizes to use when splitting documents, in order of
+         * level.
+         * 
+ * + * int32 chunk_size = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The chunkSize to set. + * @return This builder for chaining. + */ + public Builder setChunkSize(int value) { + + chunkSize_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * Optional. The chunk sizes to use when splitting documents, in order of
+         * level.
+         * 
+ * + * int32 chunk_size = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearChunkSize() { + bitField0_ = (bitField0_ & ~0x00000001); + chunkSize_ = 0; + onChanged(); + return this; + } + + private boolean includeAncestorHeadings_; + /** + * + * + *
+         * Optional. Whether or not to include ancestor headings when splitting.
+         * 
+ * + * bool include_ancestor_headings = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The includeAncestorHeadings. + */ + @java.lang.Override + public boolean getIncludeAncestorHeadings() { + return includeAncestorHeadings_; + } + /** + * + * + *
+         * Optional. Whether or not to include ancestor headings when splitting.
+         * 
+ * + * bool include_ancestor_headings = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The includeAncestorHeadings to set. + * @return This builder for chaining. + */ + public Builder setIncludeAncestorHeadings(boolean value) { + + includeAncestorHeadings_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * Optional. Whether or not to include ancestor headings when splitting.
+         * 
+ * + * bool include_ancestor_headings = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearIncludeAncestorHeadings() { + bitField0_ = (bitField0_ & ~0x00000002); + includeAncestorHeadings_ = false; + onChanged(); + return this; + } + + private boolean semanticChunkingGroupSize_; + /** + * + * + *
+         * Optional. The number of tokens to group together when evaluating
+         * semantic similarity.
+         * 
+ * + * bool semantic_chunking_group_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The semanticChunkingGroupSize. + */ + @java.lang.Override + public boolean getSemanticChunkingGroupSize() { + return semanticChunkingGroupSize_; + } + /** + * + * + *
+         * Optional. The number of tokens to group together when evaluating
+         * semantic similarity.
+         * 
+ * + * bool semantic_chunking_group_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The semanticChunkingGroupSize to set. + * @return This builder for chaining. + */ + public Builder setSemanticChunkingGroupSize(boolean value) { + + semanticChunkingGroupSize_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+         * Optional. The number of tokens to group together when evaluating
+         * semantic similarity.
+         * 
+ * + * bool semantic_chunking_group_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearSemanticChunkingGroupSize() { + bitField0_ = (bitField0_ & ~0x00000004); + semanticChunkingGroupSize_ = false; + onChanged(); + return this; + } + + private int breakpointPercentileThreshold_; + /** + * + * + *
+         * Optional. The percentile of cosine dissimilarity that must be exceeded
+         * between a group of tokens and the next. The smaller this number is, the
+         * more chunks will be generated.
+         * 
+ * + * + * int32 breakpoint_percentile_threshold = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The breakpointPercentileThreshold. + */ + @java.lang.Override + public int getBreakpointPercentileThreshold() { + return breakpointPercentileThreshold_; + } + /** + * + * + *
+         * Optional. The percentile of cosine dissimilarity that must be exceeded
+         * between a group of tokens and the next. The smaller this number is, the
+         * more chunks will be generated.
+         * 
+ * + * + * int32 breakpoint_percentile_threshold = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The breakpointPercentileThreshold to set. + * @return This builder for chaining. + */ + public Builder setBreakpointPercentileThreshold(int value) { + + breakpointPercentileThreshold_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+         * Optional. The percentile of cosine dissimilarity that must be exceeded
+         * between a group of tokens and the next. The smaller this number is, the
+         * more chunks will be generated.
+         * 
+ * + * + * int32 breakpoint_percentile_threshold = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearBreakpointPercentileThreshold() { + bitField0_ = (bitField0_ & ~0x00000008); + breakpointPercentileThreshold_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig) + private static final com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig + .ChunkingConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig(); + } + + public static com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ChunkingConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int CHUNKING_CONFIG_FIELD_NUMBER = 1; + private com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig + chunkingConfig_; + /** + * + * + *
+     * Optional. Config for chunking in layout parser processor.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig chunking_config = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the chunkingConfig field is set. + */ + @java.lang.Override + public boolean hasChunkingConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Optional. Config for chunking in layout parser processor.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig chunking_config = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The chunkingConfig. + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig + getChunkingConfig() { + return chunkingConfig_ == null + ? com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig + .getDefaultInstance() + : chunkingConfig_; + } + /** + * + * + *
+     * Optional. Config for chunking in layout parser processor.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig chunking_config = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfigOrBuilder + getChunkingConfigOrBuilder() { + return chunkingConfig_ == null + ? com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig + .getDefaultInstance() + : chunkingConfig_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getChunkingConfig()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getChunkingConfig()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig)) { + return super.equals(obj); + } + com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig other = + (com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig) obj; + + if (hasChunkingConfig() != other.hasChunkingConfig()) return false; + if (hasChunkingConfig()) { + if (!getChunkingConfig().equals(other.getChunkingConfig())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasChunkingConfig()) { + hash = (37 * hash) + CHUNKING_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getChunkingConfig().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Serving config for layout parser processor.
+     * 
+ * + * Protobuf type {@code google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig) + com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_ProcessOptions_LayoutConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_ProcessOptions_LayoutConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.class, + com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.Builder.class); + } + + // Construct using + // com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getChunkingConfigFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + chunkingConfig_ = null; + if (chunkingConfigBuilder_ != null) { + chunkingConfigBuilder_.dispose(); + chunkingConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.documentai.v1beta3.DocumentAiProcessorService + .internal_static_google_cloud_documentai_v1beta3_ProcessOptions_LayoutConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig + getDefaultInstanceForType() { + return com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig build() { + com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig buildPartial() { + com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig result = + new com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.chunkingConfig_ = + chunkingConfigBuilder_ == null ? chunkingConfig_ : chunkingConfigBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig) { + return mergeFrom((com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig other) { + if (other + == com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.getDefaultInstance()) + return this; + if (other.hasChunkingConfig()) { + mergeChunkingConfig(other.getChunkingConfig()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + getChunkingConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig + chunkingConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig, + com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig + .Builder, + com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig + .ChunkingConfigOrBuilder> + chunkingConfigBuilder_; + /** + * + * + *
+       * Optional. Config for chunking in layout parser processor.
+       * 
+ * + * + * .google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig chunking_config = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the chunkingConfig field is set. + */ + public boolean hasChunkingConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+       * Optional. Config for chunking in layout parser processor.
+       * 
+ * + * + * .google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig chunking_config = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The chunkingConfig. + */ + public com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig + getChunkingConfig() { + if (chunkingConfigBuilder_ == null) { + return chunkingConfig_ == null + ? com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig + .getDefaultInstance() + : chunkingConfig_; + } else { + return chunkingConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Optional. Config for chunking in layout parser processor.
+       * 
+ * + * + * .google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig chunking_config = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setChunkingConfig( + com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig value) { + if (chunkingConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + chunkingConfig_ = value; + } else { + chunkingConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Config for chunking in layout parser processor.
+       * 
+ * + * + * .google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig chunking_config = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setChunkingConfig( + com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig.Builder + builderForValue) { + if (chunkingConfigBuilder_ == null) { + chunkingConfig_ = builderForValue.build(); + } else { + chunkingConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Config for chunking in layout parser processor.
+       * 
+ * + * + * .google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig chunking_config = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeChunkingConfig( + com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig value) { + if (chunkingConfigBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && chunkingConfig_ != null + && chunkingConfig_ + != com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig + .getDefaultInstance()) { + getChunkingConfigBuilder().mergeFrom(value); + } else { + chunkingConfig_ = value; + } + } else { + chunkingConfigBuilder_.mergeFrom(value); + } + if (chunkingConfig_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+       * Optional. Config for chunking in layout parser processor.
+       * 
+ * + * + * .google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig chunking_config = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearChunkingConfig() { + bitField0_ = (bitField0_ & ~0x00000001); + chunkingConfig_ = null; + if (chunkingConfigBuilder_ != null) { + chunkingConfigBuilder_.dispose(); + chunkingConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Config for chunking in layout parser processor.
+       * 
+ * + * + * .google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig chunking_config = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig.Builder + getChunkingConfigBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getChunkingConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Optional. Config for chunking in layout parser processor.
+       * 
+ * + * + * .google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig chunking_config = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfigOrBuilder + getChunkingConfigOrBuilder() { + if (chunkingConfigBuilder_ != null) { + return chunkingConfigBuilder_.getMessageOrBuilder(); + } else { + return chunkingConfig_ == null + ? com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig + .getDefaultInstance() + : chunkingConfig_; + } + } + /** + * + * + *
+       * Optional. Config for chunking in layout parser processor.
+       * 
+ * + * + * .google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig chunking_config = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig, + com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig + .Builder, + com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig + .ChunkingConfigOrBuilder> + getChunkingConfigFieldBuilder() { + if (chunkingConfigBuilder_ == null) { + chunkingConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig, + com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig + .Builder, + com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig + .ChunkingConfigOrBuilder>( + getChunkingConfig(), getParentForChildren(), isClean()); + chunkingConfig_ = null; + } + return chunkingConfigBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig) + private static final com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig(); + } + + public static com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LayoutConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + public interface IndividualPageSelectorOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta3.ProcessOptions.IndividualPageSelector) @@ -1037,6 +2787,66 @@ public com.google.cloud.documentai.v1beta3.OcrConfigOrBuilder getOcrConfigOrBuil : ocrConfig_; } + public static final int LAYOUT_CONFIG_FIELD_NUMBER = 9; + private com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig layoutConfig_; + /** + * + * + *
+   * Optional. Only applicable to `LAYOUT_PARSER_PROCESSOR`.
+   * Returns error if set on other processor types.
+   * 
+ * + * + * .google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig layout_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the layoutConfig field is set. + */ + @java.lang.Override + public boolean hasLayoutConfig() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Optional. Only applicable to `LAYOUT_PARSER_PROCESSOR`.
+   * Returns error if set on other processor types.
+   * 
+ * + * + * .google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig layout_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The layoutConfig. + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig getLayoutConfig() { + return layoutConfig_ == null + ? com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.getDefaultInstance() + : layoutConfig_; + } + /** + * + * + *
+   * Optional. Only applicable to `LAYOUT_PARSER_PROCESSOR`.
+   * Returns error if set on other processor types.
+   * 
+ * + * + * .google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig layout_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfigOrBuilder + getLayoutConfigOrBuilder() { + return layoutConfig_ == null + ? com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.getDefaultInstance() + : layoutConfig_; + } + public static final int SCHEMA_OVERRIDE_FIELD_NUMBER = 8; private com.google.cloud.documentai.v1beta3.DocumentSchema schemaOverride_; /** @@ -1058,7 +2868,7 @@ public com.google.cloud.documentai.v1beta3.OcrConfigOrBuilder getOcrConfigOrBuil */ @java.lang.Override public boolean hasSchemaOverride() { - return ((bitField0_ & 0x00000002) != 0); + return ((bitField0_ & 0x00000004) != 0); } /** * @@ -1133,9 +2943,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (pageRangeCase_ == 7) { output.writeInt32(7, (int) ((java.lang.Integer) pageRange_)); } - if (((bitField0_ & 0x00000002) != 0)) { + if (((bitField0_ & 0x00000004) != 0)) { output.writeMessage(8, getSchemaOverride()); } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(9, getLayoutConfig()); + } getUnknownFields().writeTo(output); } @@ -1165,9 +2978,12 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeInt32Size( 7, (int) ((java.lang.Integer) pageRange_)); } - if (((bitField0_ & 0x00000002) != 0)) { + if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getSchemaOverride()); } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getLayoutConfig()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -1188,6 +3004,10 @@ public boolean equals(final java.lang.Object obj) { if (hasOcrConfig()) { if (!getOcrConfig().equals(other.getOcrConfig())) return false; } + if (hasLayoutConfig() != other.hasLayoutConfig()) return false; + if (hasLayoutConfig()) { + if (!getLayoutConfig().equals(other.getLayoutConfig())) return false; + } if (hasSchemaOverride() != other.hasSchemaOverride()) return false; if (hasSchemaOverride()) { if (!getSchemaOverride().equals(other.getSchemaOverride())) return false; @@ -1221,6 +3041,10 @@ public int hashCode() { hash = (37 * hash) + OCR_CONFIG_FIELD_NUMBER; hash = (53 * hash) + getOcrConfig().hashCode(); } + if (hasLayoutConfig()) { + hash = (37 * hash) + LAYOUT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getLayoutConfig().hashCode(); + } if (hasSchemaOverride()) { hash = (37 * hash) + SCHEMA_OVERRIDE_FIELD_NUMBER; hash = (53 * hash) + getSchemaOverride().hashCode(); @@ -1382,6 +3206,7 @@ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { getOcrConfigFieldBuilder(); + getLayoutConfigFieldBuilder(); getSchemaOverrideFieldBuilder(); } } @@ -1398,6 +3223,11 @@ public Builder clear() { ocrConfigBuilder_.dispose(); ocrConfigBuilder_ = null; } + layoutConfig_ = null; + if (layoutConfigBuilder_ != null) { + layoutConfigBuilder_.dispose(); + layoutConfigBuilder_ = null; + } schemaOverride_ = null; if (schemaOverrideBuilder_ != null) { schemaOverrideBuilder_.dispose(); @@ -1448,9 +3278,14 @@ private void buildPartial0(com.google.cloud.documentai.v1beta3.ProcessOptions re to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000010) != 0)) { + result.layoutConfig_ = + layoutConfigBuilder_ == null ? layoutConfig_ : layoutConfigBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000020) != 0)) { result.schemaOverride_ = schemaOverrideBuilder_ == null ? schemaOverride_ : schemaOverrideBuilder_.build(); - to_bitField0_ |= 0x00000002; + to_bitField0_ |= 0x00000004; } result.bitField0_ |= to_bitField0_; } @@ -1512,6 +3347,9 @@ public Builder mergeFrom(com.google.cloud.documentai.v1beta3.ProcessOptions othe if (other.hasOcrConfig()) { mergeOcrConfig(other.getOcrConfig()); } + if (other.hasLayoutConfig()) { + mergeLayoutConfig(other.getLayoutConfig()); + } if (other.hasSchemaOverride()) { mergeSchemaOverride(other.getSchemaOverride()); } @@ -1590,9 +3428,15 @@ public Builder mergeFrom( case 66: { input.readMessage(getSchemaOverrideFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; break; } // case 66 + case 74: + { + input.readMessage(getLayoutConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 74 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -2209,6 +4053,225 @@ public com.google.cloud.documentai.v1beta3.OcrConfigOrBuilder getOcrConfigOrBuil return ocrConfigBuilder_; } + private com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig layoutConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig, + com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.Builder, + com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfigOrBuilder> + layoutConfigBuilder_; + /** + * + * + *
+     * Optional. Only applicable to `LAYOUT_PARSER_PROCESSOR`.
+     * Returns error if set on other processor types.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig layout_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the layoutConfig field is set. + */ + public boolean hasLayoutConfig() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * Optional. Only applicable to `LAYOUT_PARSER_PROCESSOR`.
+     * Returns error if set on other processor types.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig layout_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The layoutConfig. + */ + public com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig getLayoutConfig() { + if (layoutConfigBuilder_ == null) { + return layoutConfig_ == null + ? com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.getDefaultInstance() + : layoutConfig_; + } else { + return layoutConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Only applicable to `LAYOUT_PARSER_PROCESSOR`.
+     * Returns error if set on other processor types.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig layout_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setLayoutConfig( + com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig value) { + if (layoutConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + layoutConfig_ = value; + } else { + layoutConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Only applicable to `LAYOUT_PARSER_PROCESSOR`.
+     * Returns error if set on other processor types.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig layout_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setLayoutConfig( + com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.Builder builderForValue) { + if (layoutConfigBuilder_ == null) { + layoutConfig_ = builderForValue.build(); + } else { + layoutConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Only applicable to `LAYOUT_PARSER_PROCESSOR`.
+     * Returns error if set on other processor types.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig layout_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeLayoutConfig( + com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig value) { + if (layoutConfigBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && layoutConfig_ != null + && layoutConfig_ + != com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig + .getDefaultInstance()) { + getLayoutConfigBuilder().mergeFrom(value); + } else { + layoutConfig_ = value; + } + } else { + layoutConfigBuilder_.mergeFrom(value); + } + if (layoutConfig_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Optional. Only applicable to `LAYOUT_PARSER_PROCESSOR`.
+     * Returns error if set on other processor types.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig layout_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearLayoutConfig() { + bitField0_ = (bitField0_ & ~0x00000010); + layoutConfig_ = null; + if (layoutConfigBuilder_ != null) { + layoutConfigBuilder_.dispose(); + layoutConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Only applicable to `LAYOUT_PARSER_PROCESSOR`.
+     * Returns error if set on other processor types.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig layout_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.Builder + getLayoutConfigBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getLayoutConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Only applicable to `LAYOUT_PARSER_PROCESSOR`.
+     * Returns error if set on other processor types.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig layout_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfigOrBuilder + getLayoutConfigOrBuilder() { + if (layoutConfigBuilder_ != null) { + return layoutConfigBuilder_.getMessageOrBuilder(); + } else { + return layoutConfig_ == null + ? com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.getDefaultInstance() + : layoutConfig_; + } + } + /** + * + * + *
+     * Optional. Only applicable to `LAYOUT_PARSER_PROCESSOR`.
+     * Returns error if set on other processor types.
+     * 
+ * + * + * .google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig layout_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig, + com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.Builder, + com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfigOrBuilder> + getLayoutConfigFieldBuilder() { + if (layoutConfigBuilder_ == null) { + layoutConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig, + com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.Builder, + com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfigOrBuilder>( + getLayoutConfig(), getParentForChildren(), isClean()); + layoutConfig_ = null; + } + return layoutConfigBuilder_; + } + private com.google.cloud.documentai.v1beta3.DocumentSchema schemaOverride_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.documentai.v1beta3.DocumentSchema, @@ -2233,7 +4296,7 @@ public com.google.cloud.documentai.v1beta3.OcrConfigOrBuilder getOcrConfigOrBuil * @return Whether the schemaOverride field is set. */ public boolean hasSchemaOverride() { - return ((bitField0_ & 0x00000010) != 0); + return ((bitField0_ & 0x00000020) != 0); } /** * @@ -2285,7 +4348,7 @@ public Builder setSchemaOverride(com.google.cloud.documentai.v1beta3.DocumentSch } else { schemaOverrideBuilder_.setMessage(value); } - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -2311,7 +4374,7 @@ public Builder setSchemaOverride( } else { schemaOverrideBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -2332,7 +4395,7 @@ public Builder setSchemaOverride( */ public Builder mergeSchemaOverride(com.google.cloud.documentai.v1beta3.DocumentSchema value) { if (schemaOverrideBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0) + if (((bitField0_ & 0x00000020) != 0) && schemaOverride_ != null && schemaOverride_ != com.google.cloud.documentai.v1beta3.DocumentSchema.getDefaultInstance()) { @@ -2344,7 +4407,7 @@ public Builder mergeSchemaOverride(com.google.cloud.documentai.v1beta3.DocumentS schemaOverrideBuilder_.mergeFrom(value); } if (schemaOverride_ != null) { - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); } return this; @@ -2365,7 +4428,7 @@ public Builder mergeSchemaOverride(com.google.cloud.documentai.v1beta3.DocumentS * */ public Builder clearSchemaOverride() { - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000020); schemaOverride_ = null; if (schemaOverrideBuilder_ != null) { schemaOverrideBuilder_.dispose(); @@ -2390,7 +4453,7 @@ public Builder clearSchemaOverride() { * */ public com.google.cloud.documentai.v1beta3.DocumentSchema.Builder getSchemaOverrideBuilder() { - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); return getSchemaOverrideFieldBuilder().getBuilder(); } diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessOptionsOrBuilder.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessOptionsOrBuilder.java index 161bdd95c02e..7ef55c6cd038 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessOptionsOrBuilder.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessOptionsOrBuilder.java @@ -157,6 +157,51 @@ public interface ProcessOptionsOrBuilder */ com.google.cloud.documentai.v1beta3.OcrConfigOrBuilder getOcrConfigOrBuilder(); + /** + * + * + *
+   * Optional. Only applicable to `LAYOUT_PARSER_PROCESSOR`.
+   * Returns error if set on other processor types.
+   * 
+ * + * + * .google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig layout_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the layoutConfig field is set. + */ + boolean hasLayoutConfig(); + /** + * + * + *
+   * Optional. Only applicable to `LAYOUT_PARSER_PROCESSOR`.
+   * Returns error if set on other processor types.
+   * 
+ * + * + * .google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig layout_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The layoutConfig. + */ + com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig getLayoutConfig(); + /** + * + * + *
+   * Optional. Only applicable to `LAYOUT_PARSER_PROCESSOR`.
+   * Returns error if set on other processor types.
+   * 
+ * + * + * .google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig layout_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfigOrBuilder + getLayoutConfigOrBuilder(); + /** * * diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessRequest.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessRequest.java index 777655bece58..50c7abb2e10b 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessRequest.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessRequest.java @@ -371,7 +371,7 @@ public com.google.protobuf.ByteString getNameBytes() { * .google.cloud.documentai.v1beta3.Document document = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1beta3.ProcessRequest.document is deprecated. See - * google/cloud/documentai/v1beta3/document_processor_service.proto;l=415 + * google/cloud/documentai/v1beta3/document_processor_service.proto;l=447 * @return Whether the document field is set. */ @java.lang.Override @@ -392,7 +392,7 @@ public boolean hasDocument() { * .google.cloud.documentai.v1beta3.Document document = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1beta3.ProcessRequest.document is deprecated. See - * google/cloud/documentai/v1beta3/document_processor_service.proto;l=415 + * google/cloud/documentai/v1beta3/document_processor_service.proto;l=447 * @return The document. */ @java.lang.Override @@ -2142,7 +2142,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { * .google.cloud.documentai.v1beta3.Document document = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1beta3.ProcessRequest.document is deprecated. See - * google/cloud/documentai/v1beta3/document_processor_service.proto;l=415 + * google/cloud/documentai/v1beta3/document_processor_service.proto;l=447 * @return Whether the document field is set. */ @java.lang.Deprecated @@ -2162,7 +2162,7 @@ public boolean hasDocument() { * .google.cloud.documentai.v1beta3.Document document = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1beta3.ProcessRequest.document is deprecated. See - * google/cloud/documentai/v1beta3/document_processor_service.proto;l=415 + * google/cloud/documentai/v1beta3/document_processor_service.proto;l=447 * @return The document. */ @java.lang.Deprecated diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessRequestOrBuilder.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessRequestOrBuilder.java index 7a98b2c59e3c..8078f0b287f9 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessRequestOrBuilder.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessRequestOrBuilder.java @@ -189,7 +189,7 @@ public interface ProcessRequestOrBuilder * .google.cloud.documentai.v1beta3.Document document = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1beta3.ProcessRequest.document is deprecated. See - * google/cloud/documentai/v1beta3/document_processor_service.proto;l=415 + * google/cloud/documentai/v1beta3/document_processor_service.proto;l=447 * @return Whether the document field is set. */ @java.lang.Deprecated @@ -207,7 +207,7 @@ public interface ProcessRequestOrBuilder * .google.cloud.documentai.v1beta3.Document document = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1beta3.ProcessRequest.document is deprecated. See - * google/cloud/documentai/v1beta3/document_processor_service.proto;l=415 + * google/cloud/documentai/v1beta3/document_processor_service.proto;l=447 * @return The document. */ @java.lang.Deprecated diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessResponse.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessResponse.java index ba4c42b8c149..19a00cb61d27 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessResponse.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessResponse.java @@ -136,7 +136,7 @@ public com.google.cloud.documentai.v1beta3.DocumentOrBuilder getDocumentOrBuilde * string human_review_operation = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1beta3.ProcessResponse.human_review_operation is - * deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=490 + * deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=522 * @return The humanReviewOperation. */ @java.lang.Override @@ -165,7 +165,7 @@ public java.lang.String getHumanReviewOperation() { * string human_review_operation = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1beta3.ProcessResponse.human_review_operation is - * deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=490 + * deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=522 * @return The bytes for humanReviewOperation. */ @java.lang.Override @@ -866,7 +866,7 @@ public com.google.cloud.documentai.v1beta3.DocumentOrBuilder getDocumentOrBuilde * string human_review_operation = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1beta3.ProcessResponse.human_review_operation is - * deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=490 + * deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=522 * @return The humanReviewOperation. */ @java.lang.Deprecated @@ -894,7 +894,7 @@ public java.lang.String getHumanReviewOperation() { * string human_review_operation = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1beta3.ProcessResponse.human_review_operation is - * deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=490 + * deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=522 * @return The bytes for humanReviewOperation. */ @java.lang.Deprecated @@ -922,7 +922,7 @@ public com.google.protobuf.ByteString getHumanReviewOperationBytes() { * string human_review_operation = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1beta3.ProcessResponse.human_review_operation is - * deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=490 + * deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=522 * @param value The humanReviewOperation to set. * @return This builder for chaining. */ @@ -949,7 +949,7 @@ public Builder setHumanReviewOperation(java.lang.String value) { * string human_review_operation = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1beta3.ProcessResponse.human_review_operation is - * deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=490 + * deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=522 * @return This builder for chaining. */ @java.lang.Deprecated @@ -972,7 +972,7 @@ public Builder clearHumanReviewOperation() { * string human_review_operation = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1beta3.ProcessResponse.human_review_operation is - * deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=490 + * deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=522 * @param value The bytes for humanReviewOperation to set. * @return This builder for chaining. */ diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessResponseOrBuilder.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessResponseOrBuilder.java index d3512fe1e95a..213eb1eecbba 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessResponseOrBuilder.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessResponseOrBuilder.java @@ -75,7 +75,7 @@ public interface ProcessResponseOrBuilder * string human_review_operation = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1beta3.ProcessResponse.human_review_operation is - * deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=490 + * deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=522 * @return The humanReviewOperation. */ @java.lang.Deprecated @@ -93,7 +93,7 @@ public interface ProcessResponseOrBuilder * string human_review_operation = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1beta3.ProcessResponse.human_review_operation is - * deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=490 + * deprecated. See google/cloud/documentai/v1beta3/document_processor_service.proto;l=522 * @return The bytes for humanReviewOperation. */ @java.lang.Deprecated diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessorVersion.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessorVersion.java index 0121bdec5809..d1889f5962d6 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessorVersion.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessorVersion.java @@ -1512,12 +1512,12 @@ public com.google.protobuf.Parser getParserForType() { * * *
-   * The resource name of the processor version.
+   * Identifier. The resource name of the processor version.
    * Format:
    * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}`
    * 
* - * string name = 1; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @return The name. */ @@ -1537,12 +1537,12 @@ public java.lang.String getName() { * * *
-   * The resource name of the processor version.
+   * Identifier. The resource name of the processor version.
    * Format:
    * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}`
    * 
* - * string name = 1; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @return The bytes for name. */ @@ -1666,10 +1666,12 @@ public com.google.cloud.documentai.v1beta3.DocumentSchemaOrBuilder getDocumentSc * * *
-   * The state of the processor version.
+   * Output only. The state of the processor version.
    * 
* - * .google.cloud.documentai.v1beta3.ProcessorVersion.State state = 6; + * + * .google.cloud.documentai.v1beta3.ProcessorVersion.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return The enum numeric value on the wire for state. */ @@ -1681,10 +1683,12 @@ public int getStateValue() { * * *
-   * The state of the processor version.
+   * Output only. The state of the processor version.
    * 
* - * .google.cloud.documentai.v1beta3.ProcessorVersion.State state = 6; + * + * .google.cloud.documentai.v1beta3.ProcessorVersion.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return The state. */ @@ -2651,12 +2655,12 @@ public Builder mergeFrom( * * *
-     * The resource name of the processor version.
+     * Identifier. The resource name of the processor version.
      * Format:
      * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}`
      * 
* - * string name = 1; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @return The name. */ @@ -2675,12 +2679,12 @@ public java.lang.String getName() { * * *
-     * The resource name of the processor version.
+     * Identifier. The resource name of the processor version.
      * Format:
      * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}`
      * 
* - * string name = 1; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @return The bytes for name. */ @@ -2699,12 +2703,12 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-     * The resource name of the processor version.
+     * Identifier. The resource name of the processor version.
      * Format:
      * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}`
      * 
* - * string name = 1; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @param value The name to set. * @return This builder for chaining. @@ -2722,12 +2726,12 @@ public Builder setName(java.lang.String value) { * * *
-     * The resource name of the processor version.
+     * Identifier. The resource name of the processor version.
      * Format:
      * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}`
      * 
* - * string name = 1; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @return This builder for chaining. */ @@ -2741,12 +2745,12 @@ public Builder clearName() { * * *
-     * The resource name of the processor version.
+     * Identifier. The resource name of the processor version.
      * Format:
      * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}`
      * 
* - * string name = 1; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @param value The bytes for name to set. * @return This builder for chaining. @@ -3061,10 +3065,12 @@ public com.google.cloud.documentai.v1beta3.DocumentSchema.Builder getDocumentSch * * *
-     * The state of the processor version.
+     * Output only. The state of the processor version.
      * 
* - * .google.cloud.documentai.v1beta3.ProcessorVersion.State state = 6; + * + * .google.cloud.documentai.v1beta3.ProcessorVersion.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return The enum numeric value on the wire for state. */ @@ -3076,10 +3082,12 @@ public int getStateValue() { * * *
-     * The state of the processor version.
+     * Output only. The state of the processor version.
      * 
* - * .google.cloud.documentai.v1beta3.ProcessorVersion.State state = 6; + * + * .google.cloud.documentai.v1beta3.ProcessorVersion.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @param value The enum numeric value on the wire for state to set. * @return This builder for chaining. @@ -3094,10 +3102,12 @@ public Builder setStateValue(int value) { * * *
-     * The state of the processor version.
+     * Output only. The state of the processor version.
      * 
* - * .google.cloud.documentai.v1beta3.ProcessorVersion.State state = 6; + * + * .google.cloud.documentai.v1beta3.ProcessorVersion.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return The state. */ @@ -3113,10 +3123,12 @@ public com.google.cloud.documentai.v1beta3.ProcessorVersion.State getState() { * * *
-     * The state of the processor version.
+     * Output only. The state of the processor version.
      * 
* - * .google.cloud.documentai.v1beta3.ProcessorVersion.State state = 6; + * + * .google.cloud.documentai.v1beta3.ProcessorVersion.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @param value The state to set. * @return This builder for chaining. @@ -3134,10 +3146,12 @@ public Builder setState(com.google.cloud.documentai.v1beta3.ProcessorVersion.Sta * * *
-     * The state of the processor version.
+     * Output only. The state of the processor version.
      * 
* - * .google.cloud.documentai.v1beta3.ProcessorVersion.State state = 6; + * + * .google.cloud.documentai.v1beta3.ProcessorVersion.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return This builder for chaining. */ diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessorVersionOrBuilder.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessorVersionOrBuilder.java index 267985d1981b..970ceaab40a5 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessorVersionOrBuilder.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ProcessorVersionOrBuilder.java @@ -28,12 +28,12 @@ public interface ProcessorVersionOrBuilder * * *
-   * The resource name of the processor version.
+   * Identifier. The resource name of the processor version.
    * Format:
    * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}`
    * 
* - * string name = 1; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @return The name. */ @@ -42,12 +42,12 @@ public interface ProcessorVersionOrBuilder * * *
-   * The resource name of the processor version.
+   * Identifier. The resource name of the processor version.
    * Format:
    * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}`
    * 
* - * string name = 1; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @return The bytes for name. */ @@ -117,10 +117,12 @@ public interface ProcessorVersionOrBuilder * * *
-   * The state of the processor version.
+   * Output only. The state of the processor version.
    * 
* - * .google.cloud.documentai.v1beta3.ProcessorVersion.State state = 6; + * + * .google.cloud.documentai.v1beta3.ProcessorVersion.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return The enum numeric value on the wire for state. */ @@ -129,10 +131,12 @@ public interface ProcessorVersionOrBuilder * * *
-   * The state of the processor version.
+   * Output only. The state of the processor version.
    * 
* - * .google.cloud.documentai.v1beta3.ProcessorVersion.State state = 6; + * + * .google.cloud.documentai.v1beta3.ProcessorVersion.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return The state. */ diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ReviewDocumentRequest.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ReviewDocumentRequest.java index 4f6e721ed1e7..e71ff36887e6 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ReviewDocumentRequest.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ReviewDocumentRequest.java @@ -374,7 +374,7 @@ public com.google.protobuf.ByteString getHumanReviewConfigBytes() { * .google.cloud.documentai.v1beta3.Document document = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1beta3.ReviewDocumentRequest.document is deprecated. See - * google/cloud/documentai/v1beta3/document_processor_service.proto;l=1162 + * google/cloud/documentai/v1beta3/document_processor_service.proto;l=1194 * @return Whether the document field is set. */ @java.lang.Override @@ -392,7 +392,7 @@ public boolean hasDocument() { * .google.cloud.documentai.v1beta3.Document document = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1beta3.ReviewDocumentRequest.document is deprecated. See - * google/cloud/documentai/v1beta3/document_processor_service.proto;l=1162 + * google/cloud/documentai/v1beta3/document_processor_service.proto;l=1194 * @return The document. */ @java.lang.Override @@ -1413,7 +1413,7 @@ public Builder setHumanReviewConfigBytes(com.google.protobuf.ByteString value) { * .google.cloud.documentai.v1beta3.Document document = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1beta3.ReviewDocumentRequest.document is deprecated. See - * google/cloud/documentai/v1beta3/document_processor_service.proto;l=1162 + * google/cloud/documentai/v1beta3/document_processor_service.proto;l=1194 * @return Whether the document field is set. */ @java.lang.Deprecated @@ -1430,7 +1430,7 @@ public boolean hasDocument() { * .google.cloud.documentai.v1beta3.Document document = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1beta3.ReviewDocumentRequest.document is deprecated. See - * google/cloud/documentai/v1beta3/document_processor_service.proto;l=1162 + * google/cloud/documentai/v1beta3/document_processor_service.proto;l=1194 * @return The document. */ @java.lang.Deprecated diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ReviewDocumentRequestOrBuilder.java b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ReviewDocumentRequestOrBuilder.java index ef4d9dbbed6d..c2644b342df7 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ReviewDocumentRequestOrBuilder.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/ReviewDocumentRequestOrBuilder.java @@ -102,7 +102,7 @@ public interface ReviewDocumentRequestOrBuilder * .google.cloud.documentai.v1beta3.Document document = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1beta3.ReviewDocumentRequest.document is deprecated. See - * google/cloud/documentai/v1beta3/document_processor_service.proto;l=1162 + * google/cloud/documentai/v1beta3/document_processor_service.proto;l=1194 * @return Whether the document field is set. */ @java.lang.Deprecated @@ -117,7 +117,7 @@ public interface ReviewDocumentRequestOrBuilder * .google.cloud.documentai.v1beta3.Document document = 2 [deprecated = true]; * * @deprecated google.cloud.documentai.v1beta3.ReviewDocumentRequest.document is deprecated. See - * google/cloud/documentai/v1beta3/document_processor_service.proto;l=1162 + * google/cloud/documentai/v1beta3/document_processor_service.proto;l=1194 * @return The document. */ @java.lang.Deprecated diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/document.proto b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/document.proto index aeb805b215bb..d93aafa98c50 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/document.proto +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/document.proto @@ -897,6 +897,137 @@ message Document { repeated Provenance provenance = 3 [deprecated = true]; } + // Represents the parsed layout of a document as a collection of blocks that + // the document is divided into. + message DocumentLayout { + // Represents a block. A block could be one of the various types (text, + // table, list) supported. + message DocumentLayoutBlock { + // Represents where the block starts and ends in the document. + message LayoutPageSpan { + // Page where block starts in the document. + int32 page_start = 1; + + // Page where block ends in the document. + int32 page_end = 2; + } + + // Represents a text type block. + message LayoutTextBlock { + // Text content stored in the block. + string text = 1; + + // Type of the text in the block. Available options are: `paragraph`, + // `subtitle`, `heading-1`, `heading-2`, `heading-3`, `heading-4`, + // `heading-5`, `header`, `footer`. + string type = 2; + + // A text block could further have child blocks. + // Repeated blocks support further hierarchies and nested blocks. + repeated DocumentLayoutBlock blocks = 3; + } + + // Represents a table type block. + message LayoutTableBlock { + // Header rows at the top of the table. + repeated LayoutTableRow header_rows = 1; + + // Body rows containing main table content. + repeated LayoutTableRow body_rows = 2; + + // Table caption/title. + string caption = 3; + } + + // Represents a row in a table. + message LayoutTableRow { + // A table row is a list of table cells. + repeated LayoutTableCell cells = 1; + } + + // Represents a cell in a table row. + message LayoutTableCell { + // A table cell is a list of blocks. + // Repeated blocks support further hierarchies and nested blocks. + repeated DocumentLayoutBlock blocks = 1; + + // How many rows this cell spans. + int32 row_span = 2; + + // How many columns this cell spans. + int32 col_span = 3; + } + + // Represents a list type block. + message LayoutListBlock { + // List entries that constitute a list block. + repeated LayoutListEntry list_entries = 1; + + // Type of the list_entries (if exist). Available options are `ordered` + // and `unordered`. + string type = 2; + } + + // Represents an entry in the list. + message LayoutListEntry { + // A list entry is a list of blocks. + // Repeated blocks support further hierarchies and nested blocks. + repeated DocumentLayoutBlock blocks = 1; + } + + oneof block { + // Block consisting of text content. + LayoutTextBlock text_block = 2; + + // Block consisting of table content/structure. + LayoutTableBlock table_block = 3; + + // Block consisting of list content/structure. + LayoutListBlock list_block = 4; + } + + // ID of the block. + string block_id = 1; + + // Page span of the block. + LayoutPageSpan page_span = 5; + } + + // List of blocks in the document. + repeated DocumentLayoutBlock blocks = 1; + } + + // Represents the chunks that the document is divided into. + message ChunkedDocument { + // Represents a chunk. + message Chunk { + // Represents where the chunk starts and ends in the document. + message ChunkPageSpan { + // Page where chunk starts in the document. + int32 page_start = 1; + + // Page where chunk ends in the document. + int32 page_end = 2; + } + + // ID of the chunk. + string chunk_id = 1; + + // List of all parsed documents layout source blocks used to generate the + // chunk. + repeated string source_block_ids = 2; + + // Text content of the chunk. + string content = 3; + + // Page span of the chunk. + ChunkPageSpan page_span = 4; + } + + // List of chunks. + repeated Chunk chunks = 1; + } + // Original source document from the user. oneof source { // Optional. Currently supports Google Cloud Storage URI of the form @@ -950,6 +1081,12 @@ message Document { // Placeholder. Revision history of this document. repeated Revision revisions = 13; + + // Parsed layout of the document. + DocumentLayout document_layout = 17; + + // Document chunked based on chunking config. + ChunkedDocument chunked_document = 18; } // The revision reference specifies which revision on the document to read. diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/document_processor_service.proto b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/document_processor_service.proto index 9769b1042a80..d1afd49cfefb 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/document_processor_service.proto +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/document_processor_service.proto @@ -342,6 +342,34 @@ service DocumentProcessorService { // Options for Process API message ProcessOptions { + // Serving config for layout parser processor. + message LayoutConfig { + // Serving config for chunking. + message ChunkingConfig { + // Optional. The chunk sizes to use when splitting documents, in order of + // level. + int32 chunk_size = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Whether or not to include ancestor headings when splitting. + bool include_ancestor_headings = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The number of tokens to group together when evaluating + // semantic similarity. + bool semantic_chunking_group_size = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The percentile of cosine dissimilarity that must be exceeded + // between a group of tokens and the next. The smaller this number is, the + // more chunks will be generated. + int32 breakpoint_percentile_threshold = 4 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. Config for chunking in layout parser processor. + ChunkingConfig chunking_config = 1 [(google.api.field_behavior) = OPTIONAL]; + } + // A list of individual page numbers. message IndividualPageSelector { // Optional. Indices of the pages (starting from 1). @@ -370,6 +398,10 @@ message ProcessOptions { // Returns error if set on other processor types. OcrConfig ocr_config = 1; + // Optional. Only applicable to `LAYOUT_PARSER_PROCESSOR`. + // Returns error if set on other processor types. + LayoutConfig layout_config = 9 [(google.api.field_behavior) = OPTIONAL]; + // Optional. Override the schema of the // [ProcessorVersion][google.cloud.documentai.v1beta3.ProcessorVersion]. Will // return an Invalid Argument error if this field is set when the underlying diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/processor.proto b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/processor.proto index 6a4437ac1af1..655f1b17deac 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/processor.proto +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/proto/google/cloud/documentai/v1beta3/processor.proto @@ -94,10 +94,10 @@ message ProcessorVersion { MODEL_TYPE_CUSTOM = 2; } - // The resource name of the processor version. + // Identifier. The resource name of the processor version. // Format: // `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}` - string name = 1; + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; // The display name of the processor version. string display_name = 2; @@ -105,8 +105,8 @@ message ProcessorVersion { // The schema of the processor version. Describes the output. DocumentSchema document_schema = 12; - // The state of the processor version. - State state = 6; + // Output only. The state of the processor version. + State state = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; // The time the processor version was created. google.protobuf.Timestamp create_time = 7; diff --git a/java-domains/README.md b/java-domains/README.md index 839e51880aab..badba31e2194 100644 --- a/java-domains/README.md +++ b/java-domains/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.34.0 + 26.37.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-domains.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-domains/1.35.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-domains/1.38.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-edgenetwork/README.md b/java-edgenetwork/README.md index eb3c3a8e562e..090e798c3538 100644 --- a/java-edgenetwork/README.md +++ b/java-edgenetwork/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -201,7 +201,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-edgenetwork.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-edgenetwork/0.6.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-edgenetwork/0.9.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-enterpriseknowledgegraph/README.md b/java-enterpriseknowledgegraph/README.md index 8c225d7b34ae..748b7c2270af 100644 --- a/java-enterpriseknowledgegraph/README.md +++ b/java-enterpriseknowledgegraph/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -201,7 +201,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-enterpriseknowledgegraph.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-enterpriseknowledgegraph/0.34.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-enterpriseknowledgegraph/0.37.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-errorreporting/README.md b/java-errorreporting/README.md index bbbbff754c5e..53901870bda9 100644 --- a/java-errorreporting/README.md +++ b/java-errorreporting/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -201,7 +201,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-errorreporting.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-errorreporting/0.159.0-beta +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-errorreporting/0.162.0-beta [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-essential-contacts/README.md b/java-essential-contacts/README.md index b7fd7bd8c1ad..dcfb96159992 100644 --- a/java-essential-contacts/README.md +++ b/java-essential-contacts/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.34.0 + 26.37.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-essential-contacts.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-essential-contacts/2.38.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-essential-contacts/2.41.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-eventarc-publishing/README.md b/java-eventarc-publishing/README.md index 4b39dad647c5..5045a7f96ce9 100644 --- a/java-eventarc-publishing/README.md +++ b/java-eventarc-publishing/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -201,7 +201,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-eventarc-publishing.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-eventarc-publishing/0.38.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-eventarc-publishing/0.41.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-eventarc/README.md b/java-eventarc/README.md index af2301c0812b..2a74f0a45d79 100644 --- a/java-eventarc/README.md +++ b/java-eventarc/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.34.0 + 26.37.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-eventarc.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-eventarc/1.38.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-eventarc/1.41.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-filestore/README.md b/java-filestore/README.md index 387d750ca872..778a556c9d03 100644 --- a/java-filestore/README.md +++ b/java-filestore/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.34.0 + 26.37.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-filestore.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-filestore/1.39.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-filestore/1.42.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-functions/README.md b/java-functions/README.md index 01c88b85c7d6..e97d59012358 100644 --- a/java-functions/README.md +++ b/java-functions/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.34.0 + 26.37.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-functions.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-functions/2.40.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-functions/2.43.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-gke-backup/README.md b/java-gke-backup/README.md index e76a4675f447..f36a5c3c2992 100644 --- a/java-gke-backup/README.md +++ b/java-gke-backup/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -201,7 +201,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-gke-backup.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-gke-backup/0.37.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-gke-backup/0.40.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-gke-connect-gateway/README.md b/java-gke-connect-gateway/README.md index 912233885746..74593ed04706 100644 --- a/java-gke-connect-gateway/README.md +++ b/java-gke-connect-gateway/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -201,7 +201,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-gke-connect-gateway.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-gke-connect-gateway/0.39.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-gke-connect-gateway/0.42.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-gke-multi-cloud/README.md b/java-gke-multi-cloud/README.md index 3b4de84e7fd2..725370e96049 100644 --- a/java-gke-multi-cloud/README.md +++ b/java-gke-multi-cloud/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -201,7 +201,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-gke-multi-cloud.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-gke-multi-cloud/0.37.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-gke-multi-cloud/0.40.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-gkehub/README.md b/java-gkehub/README.md index 5a97d8538c7a..3ecc47720831 100644 --- a/java-gkehub/README.md +++ b/java-gkehub/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.34.0 + 26.37.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-gkehub.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-gkehub/1.38.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-gkehub/1.41.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-gsuite-addons/README.md b/java-gsuite-addons/README.md index ff64004c06a4..f94f74452aa9 100644 --- a/java-gsuite-addons/README.md +++ b/java-gsuite-addons/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.34.0 + 26.37.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-gsuite-addons.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-gsuite-addons/2.38.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-gsuite-addons/2.41.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-iam-admin/README.md b/java-iam-admin/README.md index 5c403905e5ce..524ca13710a0 100644 --- a/java-iam-admin/README.md +++ b/java-iam-admin/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.34.0 + 26.37.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-iam-admin.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-iam-admin/3.33.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-iam-admin/3.36.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-iam/README.md b/java-iam/README.md index f50273d1983b..b5e7ce6f261d 100644 --- a/java-iam/README.md +++ b/java-iam/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.34.0 + 26.37.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-iam-policy.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-iam-policy/1.36.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-iam-policy/1.39.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-iamcredentials/README.md b/java-iamcredentials/README.md index b3ec3c48133e..d054f9b15644 100644 --- a/java-iamcredentials/README.md +++ b/java-iamcredentials/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.34.0 + 26.37.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-iamcredentials.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-iamcredentials/2.38.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-iamcredentials/2.41.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-ids/README.md b/java-ids/README.md index 5cc0fb70428f..2204d4fe50ea 100644 --- a/java-ids/README.md +++ b/java-ids/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.34.0 + 26.37.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-ids.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-ids/1.37.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-ids/1.40.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-infra-manager/README.md b/java-infra-manager/README.md index 913d5658353c..78cf84109ac2 100644 --- a/java-infra-manager/README.md +++ b/java-infra-manager/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -201,7 +201,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-infra-manager.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-infra-manager/0.15.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-infra-manager/0.18.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-iot/README.md b/java-iot/README.md index 74c6d4775121..b9803c12c817 100644 --- a/java-iot/README.md +++ b/java-iot/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.34.0 + 26.37.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-iot.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-iot/2.38.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-iot/2.41.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-kms/README.md b/java-kms/README.md index 62556a98e5f4..0dc43824d0e7 100644 --- a/java-kms/README.md +++ b/java-kms/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.34.0 + 26.37.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-kms.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-kms/2.41.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-kms/2.44.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-kmsinventory/README.md b/java-kmsinventory/README.md index a32fe7aa120c..96f9e845bf06 100644 --- a/java-kmsinventory/README.md +++ b/java-kmsinventory/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -201,7 +201,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-kmsinventory.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-kmsinventory/0.27.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-kmsinventory/0.30.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-language/README.md b/java-language/README.md index b17a888ca0cd..cf841f4b075e 100644 --- a/java-language/README.md +++ b/java-language/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.34.0 + 26.37.0 pom import @@ -227,7 +227,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-language.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-language/2.39.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-language/2.42.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-life-sciences/README.md b/java-life-sciences/README.md index 183a9ecedcd9..f29ef929b1b8 100644 --- a/java-life-sciences/README.md +++ b/java-life-sciences/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -201,7 +201,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-life-sciences.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-life-sciences/0.40.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-life-sciences/0.43.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-managed-identities/README.md b/java-managed-identities/README.md index d50cd6461b00..519bde58fb88 100644 --- a/java-managed-identities/README.md +++ b/java-managed-identities/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.34.0 + 26.37.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-managed-identities.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-managed-identities/1.36.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-managed-identities/1.39.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-maps-addressvalidation/README.md b/java-maps-addressvalidation/README.md index bd22bcb0407f..206a5d582db7 100644 --- a/java-maps-addressvalidation/README.md +++ b/java-maps-addressvalidation/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -201,7 +201,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.maps/google-maps-addressvalidation.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.maps/google-maps-addressvalidation/0.32.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.maps/google-maps-addressvalidation/0.35.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-maps-mapsplatformdatasets/README.md b/java-maps-mapsplatformdatasets/README.md index 1b6d6fb53002..3ad77b98fa8b 100644 --- a/java-maps-mapsplatformdatasets/README.md +++ b/java-maps-mapsplatformdatasets/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -202,7 +202,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.maps/google-maps-mapsplatformdatasets.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.maps/google-maps-mapsplatformdatasets/0.27.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.maps/google-maps-mapsplatformdatasets/0.30.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-maps-places/README.md b/java-maps-places/README.md index 1bcea5b8a765..eed1d766b743 100644 --- a/java-maps-places/README.md +++ b/java-maps-places/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -201,7 +201,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.maps/google-maps-places.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.maps/google-maps-places/0.9.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.maps/google-maps-places/0.12.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-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/PlacesClient.java b/java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/PlacesClient.java index d680da2f66f5..e6ddf41cfbc4 100644 --- a/java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/PlacesClient.java +++ b/java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/PlacesClient.java @@ -26,10 +26,10 @@ // AUTO-GENERATED DOCUMENTATION AND CLASS. /** - * Service Description: Service definition for the Places API. Note: every request actually requires - * a field mask set outside of the request proto (all/'*', is not assumed). That can be set via - * either a side channel (SystemParameterContext) over RPC, or a header (X-Goog-FieldMask) over - * HTTP. See: https://cloud.google.com/apis/docs/system-parameters + * Service Description: Service definition for the Places API. Note: every request (except for + * Autocomplete requests) requires a field mask set outside of the request proto (`all/*`, is + * not assumed). The field mask can be set via the HTTP header `X-Goog-FieldMask`. See: + * https://developers.google.com/maps/documentation/places/web-service/choose-fields * *

This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. Sample code to get started: diff --git a/java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/package-info.java b/java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/package-info.java index d3605966a149..86dcfacadc02 100644 --- a/java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/package-info.java +++ b/java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/package-info.java @@ -21,10 +21,10 @@ * *

======================= PlacesClient ======================= * - *

Service Description: Service definition for the Places API. Note: every request actually - * requires a field mask set outside of the request proto (all/'*', is not assumed). That can be - * set via either a side channel (SystemParameterContext) over RPC, or a header (X-Goog-FieldMask) - * over HTTP. See: https://cloud.google.com/apis/docs/system-parameters + *

Service Description: Service definition for the Places API. Note: every request (except for + * Autocomplete requests) requires a field mask set outside of the request proto (`all/*`, is + * not assumed). The field mask can be set via the HTTP header `X-Goog-FieldMask`. See: + * https://developers.google.com/maps/documentation/places/web-service/choose-fields * *

Sample for PlacesClient: * diff --git a/java-maps-places/grpc-google-maps-places-v1/src/main/java/com/google/maps/places/v1/PlacesGrpc.java b/java-maps-places/grpc-google-maps-places-v1/src/main/java/com/google/maps/places/v1/PlacesGrpc.java index dd71e99c73e5..43aa438ff7d0 100644 --- a/java-maps-places/grpc-google-maps-places-v1/src/main/java/com/google/maps/places/v1/PlacesGrpc.java +++ b/java-maps-places/grpc-google-maps-places-v1/src/main/java/com/google/maps/places/v1/PlacesGrpc.java @@ -22,11 +22,10 @@ * *

  * Service definition for the Places API.
- * Note: every request actually requires a field mask set outside of
- * the request proto (all/'*', is not assumed).  That can be set via either a
- * side channel (SystemParameterContext) over RPC, or a header
- * (X-Goog-FieldMask) over HTTP. See:
- * https://cloud.google.com/apis/docs/system-parameters
+ * Note: every request (except for Autocomplete requests) requires a field mask
+ * set outside of the request proto (`all/*`, is not assumed). The field mask
+ * can be set via the HTTP header `X-Goog-FieldMask`. See:
+ * https://developers.google.com/maps/documentation/places/web-service/choose-fields
  * 
*/ @javax.annotation.Generated( @@ -298,11 +297,10 @@ public PlacesFutureStub newStub( * *
    * Service definition for the Places API.
-   * Note: every request actually requires a field mask set outside of
-   * the request proto (all/'*', is not assumed).  That can be set via either a
-   * side channel (SystemParameterContext) over RPC, or a header
-   * (X-Goog-FieldMask) over HTTP. See:
-   * https://cloud.google.com/apis/docs/system-parameters
+   * Note: every request (except for Autocomplete requests) requires a field mask
+   * set outside of the request proto (`all/*`, is not assumed). The field mask
+   * can be set via the HTTP header `X-Goog-FieldMask`. See:
+   * https://developers.google.com/maps/documentation/places/web-service/choose-fields
    * 
*/ public interface AsyncService { @@ -385,11 +383,10 @@ default void autocompletePlaces( * *
    * Service definition for the Places API.
-   * Note: every request actually requires a field mask set outside of
-   * the request proto (all/'*', is not assumed).  That can be set via either a
-   * side channel (SystemParameterContext) over RPC, or a header
-   * (X-Goog-FieldMask) over HTTP. See:
-   * https://cloud.google.com/apis/docs/system-parameters
+   * Note: every request (except for Autocomplete requests) requires a field mask
+   * set outside of the request proto (`all/*`, is not assumed). The field mask
+   * can be set via the HTTP header `X-Goog-FieldMask`. See:
+   * https://developers.google.com/maps/documentation/places/web-service/choose-fields
    * 
*/ public abstract static class PlacesImplBase implements io.grpc.BindableService, AsyncService { @@ -405,11 +402,10 @@ public final io.grpc.ServerServiceDefinition bindService() { * *
    * Service definition for the Places API.
-   * Note: every request actually requires a field mask set outside of
-   * the request proto (all/'*', is not assumed).  That can be set via either a
-   * side channel (SystemParameterContext) over RPC, or a header
-   * (X-Goog-FieldMask) over HTTP. See:
-   * https://cloud.google.com/apis/docs/system-parameters
+   * Note: every request (except for Autocomplete requests) requires a field mask
+   * set outside of the request proto (`all/*`, is not assumed). The field mask
+   * can be set via the HTTP header `X-Goog-FieldMask`. See:
+   * https://developers.google.com/maps/documentation/places/web-service/choose-fields
    * 
*/ public static final class PlacesStub extends io.grpc.stub.AbstractAsyncStub { @@ -508,11 +504,10 @@ public void autocompletePlaces( * *
    * Service definition for the Places API.
-   * Note: every request actually requires a field mask set outside of
-   * the request proto (all/'*', is not assumed).  That can be set via either a
-   * side channel (SystemParameterContext) over RPC, or a header
-   * (X-Goog-FieldMask) over HTTP. See:
-   * https://cloud.google.com/apis/docs/system-parameters
+   * Note: every request (except for Autocomplete requests) requires a field mask
+   * set outside of the request proto (`all/*`, is not assumed). The field mask
+   * can be set via the HTTP header `X-Goog-FieldMask`. See:
+   * https://developers.google.com/maps/documentation/places/web-service/choose-fields
    * 
*/ public static final class PlacesBlockingStub @@ -598,11 +593,10 @@ public com.google.maps.places.v1.AutocompletePlacesResponse autocompletePlaces( * *
    * Service definition for the Places API.
-   * Note: every request actually requires a field mask set outside of
-   * the request proto (all/'*', is not assumed).  That can be set via either a
-   * side channel (SystemParameterContext) over RPC, or a header
-   * (X-Goog-FieldMask) over HTTP. See:
-   * https://cloud.google.com/apis/docs/system-parameters
+   * Note: every request (except for Autocomplete requests) requires a field mask
+   * set outside of the request proto (`all/*`, is not assumed). The field mask
+   * can be set via the HTTP header `X-Goog-FieldMask`. See:
+   * https://developers.google.com/maps/documentation/places/web-service/choose-fields
    * 
*/ public static final class PlacesFutureStub diff --git a/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/AutocompletePlacesRequest.java b/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/AutocompletePlacesRequest.java index efc86acef1ea..38b015095739 100644 --- a/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/AutocompletePlacesRequest.java +++ b/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/AutocompletePlacesRequest.java @@ -2646,8 +2646,8 @@ public boolean hasLocationRestriction() { * * *
-   * Optional. Included primary Place type (e.g. "restaurant" or "gas_station")
-   * from
+   * Optional. Included primary Place type (for example, "restaurant" or
+   * "gas_station") from
    * https://developers.google.com/maps/documentation/places/web-service/place-types.
    * A Place is only returned if its primary type is included in this list. Up
    * to 5 values can be specified. If no types are specified, all Place types
@@ -2666,8 +2666,8 @@ public com.google.protobuf.ProtocolStringList getIncludedPrimaryTypesList() {
    *
    *
    * 
-   * Optional. Included primary Place type (e.g. "restaurant" or "gas_station")
-   * from
+   * Optional. Included primary Place type (for example, "restaurant" or
+   * "gas_station") from
    * https://developers.google.com/maps/documentation/places/web-service/place-types.
    * A Place is only returned if its primary type is included in this list. Up
    * to 5 values can be specified. If no types are specified, all Place types
@@ -2686,8 +2686,8 @@ public int getIncludedPrimaryTypesCount() {
    *
    *
    * 
-   * Optional. Included primary Place type (e.g. "restaurant" or "gas_station")
-   * from
+   * Optional. Included primary Place type (for example, "restaurant" or
+   * "gas_station") from
    * https://developers.google.com/maps/documentation/places/web-service/place-types.
    * A Place is only returned if its primary type is included in this list. Up
    * to 5 values can be specified. If no types are specified, all Place types
@@ -2707,8 +2707,8 @@ public java.lang.String getIncludedPrimaryTypes(int index) {
    *
    *
    * 
-   * Optional. Included primary Place type (e.g. "restaurant" or "gas_station")
-   * from
+   * Optional. Included primary Place type (for example, "restaurant" or
+   * "gas_station") from
    * https://developers.google.com/maps/documentation/places/web-service/place-types.
    * A Place is only returned if its primary type is included in this list. Up
    * to 5 values can be specified. If no types are specified, all Place types
@@ -3020,21 +3020,23 @@ public boolean getIncludeQueryPredictions() {
    *
    *
    * 
-   * Optional. An arbitrary string which identifies an autocomplete session for
-   * billing purposes. Must be at most 36 characters in length. Otherwise an
-   * INVALID_ARGUMENT error is returned.
+   * Optional. A string which identifies an Autocomplete session for billing
+   * purposes. Must be a URL and filename safe base64 string with at most 36
+   * ASCII characters in length. Otherwise an INVALID_ARGUMENT error is
+   * returned.
    *
    * The session begins when the user starts typing a query, and concludes when
    * they select a place and a call to Place Details or Address Validation is
-   * made. Each session can have multiple queries, followed by one Place
-   * selection. The credentials used for each request within a session must
-   * belong to the same Google Cloud Console project. Once a session has
-   * concluded, the token is no longer valid; your app must generate a fresh
-   * token for each session. If the `session_token` parameter is omitted, or if
-   * you reuse a session token, the session is charged as if no session token
-   * was provided (each request is billed separately).
+   * made. Each session can have multiple queries, followed by one Place Details
+   * or Address Validation request. The credentials used for each request within
+   * a session must belong to the same Google Cloud Console project. Once a
+   * session has concluded, the token is no longer valid; your app must generate
+   * a fresh token for each session. If the `session_token` parameter is
+   * omitted, or if you reuse a session token, the session is charged as if no
+   * session token was provided (each request is billed separately).
    *
    * We recommend the following guidelines:
+   *
    * * Use session tokens for all Place Autocomplete calls.
    * * Generate a fresh token for each session. Using a version 4 UUID is
    *   recommended.
@@ -3066,21 +3068,23 @@ public java.lang.String getSessionToken() {
    *
    *
    * 
-   * Optional. An arbitrary string which identifies an autocomplete session for
-   * billing purposes. Must be at most 36 characters in length. Otherwise an
-   * INVALID_ARGUMENT error is returned.
+   * Optional. A string which identifies an Autocomplete session for billing
+   * purposes. Must be a URL and filename safe base64 string with at most 36
+   * ASCII characters in length. Otherwise an INVALID_ARGUMENT error is
+   * returned.
    *
    * The session begins when the user starts typing a query, and concludes when
    * they select a place and a call to Place Details or Address Validation is
-   * made. Each session can have multiple queries, followed by one Place
-   * selection. The credentials used for each request within a session must
-   * belong to the same Google Cloud Console project. Once a session has
-   * concluded, the token is no longer valid; your app must generate a fresh
-   * token for each session. If the `session_token` parameter is omitted, or if
-   * you reuse a session token, the session is charged as if no session token
-   * was provided (each request is billed separately).
+   * made. Each session can have multiple queries, followed by one Place Details
+   * or Address Validation request. The credentials used for each request within
+   * a session must belong to the same Google Cloud Console project. Once a
+   * session has concluded, the token is no longer valid; your app must generate
+   * a fresh token for each session. If the `session_token` parameter is
+   * omitted, or if you reuse a session token, the session is charged as if no
+   * session token was provided (each request is billed separately).
    *
    * We recommend the following guidelines:
+   *
    * * Use session tokens for all Place Autocomplete calls.
    * * Generate a fresh token for each session. Using a version 4 UUID is
    *   recommended.
@@ -4392,8 +4396,8 @@ private void ensureIncludedPrimaryTypesIsMutable() {
      *
      *
      * 
-     * Optional. Included primary Place type (e.g. "restaurant" or "gas_station")
-     * from
+     * Optional. Included primary Place type (for example, "restaurant" or
+     * "gas_station") from
      * https://developers.google.com/maps/documentation/places/web-service/place-types.
      * A Place is only returned if its primary type is included in this list. Up
      * to 5 values can be specified. If no types are specified, all Place types
@@ -4413,8 +4417,8 @@ public com.google.protobuf.ProtocolStringList getIncludedPrimaryTypesList() {
      *
      *
      * 
-     * Optional. Included primary Place type (e.g. "restaurant" or "gas_station")
-     * from
+     * Optional. Included primary Place type (for example, "restaurant" or
+     * "gas_station") from
      * https://developers.google.com/maps/documentation/places/web-service/place-types.
      * A Place is only returned if its primary type is included in this list. Up
      * to 5 values can be specified. If no types are specified, all Place types
@@ -4433,8 +4437,8 @@ public int getIncludedPrimaryTypesCount() {
      *
      *
      * 
-     * Optional. Included primary Place type (e.g. "restaurant" or "gas_station")
-     * from
+     * Optional. Included primary Place type (for example, "restaurant" or
+     * "gas_station") from
      * https://developers.google.com/maps/documentation/places/web-service/place-types.
      * A Place is only returned if its primary type is included in this list. Up
      * to 5 values can be specified. If no types are specified, all Place types
@@ -4454,8 +4458,8 @@ public java.lang.String getIncludedPrimaryTypes(int index) {
      *
      *
      * 
-     * Optional. Included primary Place type (e.g. "restaurant" or "gas_station")
-     * from
+     * Optional. Included primary Place type (for example, "restaurant" or
+     * "gas_station") from
      * https://developers.google.com/maps/documentation/places/web-service/place-types.
      * A Place is only returned if its primary type is included in this list. Up
      * to 5 values can be specified. If no types are specified, all Place types
@@ -4475,8 +4479,8 @@ public com.google.protobuf.ByteString getIncludedPrimaryTypesBytes(int index) {
      *
      *
      * 
-     * Optional. Included primary Place type (e.g. "restaurant" or "gas_station")
-     * from
+     * Optional. Included primary Place type (for example, "restaurant" or
+     * "gas_station") from
      * https://developers.google.com/maps/documentation/places/web-service/place-types.
      * A Place is only returned if its primary type is included in this list. Up
      * to 5 values can be specified. If no types are specified, all Place types
@@ -4504,8 +4508,8 @@ public Builder setIncludedPrimaryTypes(int index, java.lang.String value) {
      *
      *
      * 
-     * Optional. Included primary Place type (e.g. "restaurant" or "gas_station")
-     * from
+     * Optional. Included primary Place type (for example, "restaurant" or
+     * "gas_station") from
      * https://developers.google.com/maps/documentation/places/web-service/place-types.
      * A Place is only returned if its primary type is included in this list. Up
      * to 5 values can be specified. If no types are specified, all Place types
@@ -4532,8 +4536,8 @@ public Builder addIncludedPrimaryTypes(java.lang.String value) {
      *
      *
      * 
-     * Optional. Included primary Place type (e.g. "restaurant" or "gas_station")
-     * from
+     * Optional. Included primary Place type (for example, "restaurant" or
+     * "gas_station") from
      * https://developers.google.com/maps/documentation/places/web-service/place-types.
      * A Place is only returned if its primary type is included in this list. Up
      * to 5 values can be specified. If no types are specified, all Place types
@@ -4557,8 +4561,8 @@ public Builder addAllIncludedPrimaryTypes(java.lang.Iterable v
      *
      *
      * 
-     * Optional. Included primary Place type (e.g. "restaurant" or "gas_station")
-     * from
+     * Optional. Included primary Place type (for example, "restaurant" or
+     * "gas_station") from
      * https://developers.google.com/maps/documentation/places/web-service/place-types.
      * A Place is only returned if its primary type is included in this list. Up
      * to 5 values can be specified. If no types are specified, all Place types
@@ -4581,8 +4585,8 @@ public Builder clearIncludedPrimaryTypes() {
      *
      *
      * 
-     * Optional. Included primary Place type (e.g. "restaurant" or "gas_station")
-     * from
+     * Optional. Included primary Place type (for example, "restaurant" or
+     * "gas_station") from
      * https://developers.google.com/maps/documentation/places/web-service/place-types.
      * A Place is only returned if its primary type is included in this list. Up
      * to 5 values can be specified. If no types are specified, all Place types
@@ -5379,21 +5383,23 @@ public Builder clearIncludeQueryPredictions() {
      *
      *
      * 
-     * Optional. An arbitrary string which identifies an autocomplete session for
-     * billing purposes. Must be at most 36 characters in length. Otherwise an
-     * INVALID_ARGUMENT error is returned.
+     * Optional. A string which identifies an Autocomplete session for billing
+     * purposes. Must be a URL and filename safe base64 string with at most 36
+     * ASCII characters in length. Otherwise an INVALID_ARGUMENT error is
+     * returned.
      *
      * The session begins when the user starts typing a query, and concludes when
      * they select a place and a call to Place Details or Address Validation is
-     * made. Each session can have multiple queries, followed by one Place
-     * selection. The credentials used for each request within a session must
-     * belong to the same Google Cloud Console project. Once a session has
-     * concluded, the token is no longer valid; your app must generate a fresh
-     * token for each session. If the `session_token` parameter is omitted, or if
-     * you reuse a session token, the session is charged as if no session token
-     * was provided (each request is billed separately).
+     * made. Each session can have multiple queries, followed by one Place Details
+     * or Address Validation request. The credentials used for each request within
+     * a session must belong to the same Google Cloud Console project. Once a
+     * session has concluded, the token is no longer valid; your app must generate
+     * a fresh token for each session. If the `session_token` parameter is
+     * omitted, or if you reuse a session token, the session is charged as if no
+     * session token was provided (each request is billed separately).
      *
      * We recommend the following guidelines:
+     *
      * * Use session tokens for all Place Autocomplete calls.
      * * Generate a fresh token for each session. Using a version 4 UUID is
      *   recommended.
@@ -5424,21 +5430,23 @@ public java.lang.String getSessionToken() {
      *
      *
      * 
-     * Optional. An arbitrary string which identifies an autocomplete session for
-     * billing purposes. Must be at most 36 characters in length. Otherwise an
-     * INVALID_ARGUMENT error is returned.
+     * Optional. A string which identifies an Autocomplete session for billing
+     * purposes. Must be a URL and filename safe base64 string with at most 36
+     * ASCII characters in length. Otherwise an INVALID_ARGUMENT error is
+     * returned.
      *
      * The session begins when the user starts typing a query, and concludes when
      * they select a place and a call to Place Details or Address Validation is
-     * made. Each session can have multiple queries, followed by one Place
-     * selection. The credentials used for each request within a session must
-     * belong to the same Google Cloud Console project. Once a session has
-     * concluded, the token is no longer valid; your app must generate a fresh
-     * token for each session. If the `session_token` parameter is omitted, or if
-     * you reuse a session token, the session is charged as if no session token
-     * was provided (each request is billed separately).
+     * made. Each session can have multiple queries, followed by one Place Details
+     * or Address Validation request. The credentials used for each request within
+     * a session must belong to the same Google Cloud Console project. Once a
+     * session has concluded, the token is no longer valid; your app must generate
+     * a fresh token for each session. If the `session_token` parameter is
+     * omitted, or if you reuse a session token, the session is charged as if no
+     * session token was provided (each request is billed separately).
      *
      * We recommend the following guidelines:
+     *
      * * Use session tokens for all Place Autocomplete calls.
      * * Generate a fresh token for each session. Using a version 4 UUID is
      *   recommended.
@@ -5469,21 +5477,23 @@ public com.google.protobuf.ByteString getSessionTokenBytes() {
      *
      *
      * 
-     * Optional. An arbitrary string which identifies an autocomplete session for
-     * billing purposes. Must be at most 36 characters in length. Otherwise an
-     * INVALID_ARGUMENT error is returned.
+     * Optional. A string which identifies an Autocomplete session for billing
+     * purposes. Must be a URL and filename safe base64 string with at most 36
+     * ASCII characters in length. Otherwise an INVALID_ARGUMENT error is
+     * returned.
      *
      * The session begins when the user starts typing a query, and concludes when
      * they select a place and a call to Place Details or Address Validation is
-     * made. Each session can have multiple queries, followed by one Place
-     * selection. The credentials used for each request within a session must
-     * belong to the same Google Cloud Console project. Once a session has
-     * concluded, the token is no longer valid; your app must generate a fresh
-     * token for each session. If the `session_token` parameter is omitted, or if
-     * you reuse a session token, the session is charged as if no session token
-     * was provided (each request is billed separately).
+     * made. Each session can have multiple queries, followed by one Place Details
+     * or Address Validation request. The credentials used for each request within
+     * a session must belong to the same Google Cloud Console project. Once a
+     * session has concluded, the token is no longer valid; your app must generate
+     * a fresh token for each session. If the `session_token` parameter is
+     * omitted, or if you reuse a session token, the session is charged as if no
+     * session token was provided (each request is billed separately).
      *
      * We recommend the following guidelines:
+     *
      * * Use session tokens for all Place Autocomplete calls.
      * * Generate a fresh token for each session. Using a version 4 UUID is
      *   recommended.
@@ -5513,21 +5523,23 @@ public Builder setSessionToken(java.lang.String value) {
      *
      *
      * 
-     * Optional. An arbitrary string which identifies an autocomplete session for
-     * billing purposes. Must be at most 36 characters in length. Otherwise an
-     * INVALID_ARGUMENT error is returned.
+     * Optional. A string which identifies an Autocomplete session for billing
+     * purposes. Must be a URL and filename safe base64 string with at most 36
+     * ASCII characters in length. Otherwise an INVALID_ARGUMENT error is
+     * returned.
      *
      * The session begins when the user starts typing a query, and concludes when
      * they select a place and a call to Place Details or Address Validation is
-     * made. Each session can have multiple queries, followed by one Place
-     * selection. The credentials used for each request within a session must
-     * belong to the same Google Cloud Console project. Once a session has
-     * concluded, the token is no longer valid; your app must generate a fresh
-     * token for each session. If the `session_token` parameter is omitted, or if
-     * you reuse a session token, the session is charged as if no session token
-     * was provided (each request is billed separately).
+     * made. Each session can have multiple queries, followed by one Place Details
+     * or Address Validation request. The credentials used for each request within
+     * a session must belong to the same Google Cloud Console project. Once a
+     * session has concluded, the token is no longer valid; your app must generate
+     * a fresh token for each session. If the `session_token` parameter is
+     * omitted, or if you reuse a session token, the session is charged as if no
+     * session token was provided (each request is billed separately).
      *
      * We recommend the following guidelines:
+     *
      * * Use session tokens for all Place Autocomplete calls.
      * * Generate a fresh token for each session. Using a version 4 UUID is
      *   recommended.
@@ -5553,21 +5565,23 @@ public Builder clearSessionToken() {
      *
      *
      * 
-     * Optional. An arbitrary string which identifies an autocomplete session for
-     * billing purposes. Must be at most 36 characters in length. Otherwise an
-     * INVALID_ARGUMENT error is returned.
+     * Optional. A string which identifies an Autocomplete session for billing
+     * purposes. Must be a URL and filename safe base64 string with at most 36
+     * ASCII characters in length. Otherwise an INVALID_ARGUMENT error is
+     * returned.
      *
      * The session begins when the user starts typing a query, and concludes when
      * they select a place and a call to Place Details or Address Validation is
-     * made. Each session can have multiple queries, followed by one Place
-     * selection. The credentials used for each request within a session must
-     * belong to the same Google Cloud Console project. Once a session has
-     * concluded, the token is no longer valid; your app must generate a fresh
-     * token for each session. If the `session_token` parameter is omitted, or if
-     * you reuse a session token, the session is charged as if no session token
-     * was provided (each request is billed separately).
+     * made. Each session can have multiple queries, followed by one Place Details
+     * or Address Validation request. The credentials used for each request within
+     * a session must belong to the same Google Cloud Console project. Once a
+     * session has concluded, the token is no longer valid; your app must generate
+     * a fresh token for each session. If the `session_token` parameter is
+     * omitted, or if you reuse a session token, the session is charged as if no
+     * session token was provided (each request is billed separately).
      *
      * We recommend the following guidelines:
+     *
      * * Use session tokens for all Place Autocomplete calls.
      * * Generate a fresh token for each session. Using a version 4 UUID is
      *   recommended.
diff --git a/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/AutocompletePlacesRequestOrBuilder.java b/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/AutocompletePlacesRequestOrBuilder.java
index 70d6bcbad0ec..7dc4153101ce 100644
--- a/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/AutocompletePlacesRequestOrBuilder.java
+++ b/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/AutocompletePlacesRequestOrBuilder.java
@@ -167,8 +167,8 @@ public interface AutocompletePlacesRequestOrBuilder
    *
    *
    * 
-   * Optional. Included primary Place type (e.g. "restaurant" or "gas_station")
-   * from
+   * Optional. Included primary Place type (for example, "restaurant" or
+   * "gas_station") from
    * https://developers.google.com/maps/documentation/places/web-service/place-types.
    * A Place is only returned if its primary type is included in this list. Up
    * to 5 values can be specified. If no types are specified, all Place types
@@ -185,8 +185,8 @@ public interface AutocompletePlacesRequestOrBuilder
    *
    *
    * 
-   * Optional. Included primary Place type (e.g. "restaurant" or "gas_station")
-   * from
+   * Optional. Included primary Place type (for example, "restaurant" or
+   * "gas_station") from
    * https://developers.google.com/maps/documentation/places/web-service/place-types.
    * A Place is only returned if its primary type is included in this list. Up
    * to 5 values can be specified. If no types are specified, all Place types
@@ -203,8 +203,8 @@ public interface AutocompletePlacesRequestOrBuilder
    *
    *
    * 
-   * Optional. Included primary Place type (e.g. "restaurant" or "gas_station")
-   * from
+   * Optional. Included primary Place type (for example, "restaurant" or
+   * "gas_station") from
    * https://developers.google.com/maps/documentation/places/web-service/place-types.
    * A Place is only returned if its primary type is included in this list. Up
    * to 5 values can be specified. If no types are specified, all Place types
@@ -222,8 +222,8 @@ public interface AutocompletePlacesRequestOrBuilder
    *
    *
    * 
-   * Optional. Included primary Place type (e.g. "restaurant" or "gas_station")
-   * from
+   * Optional. Included primary Place type (for example, "restaurant" or
+   * "gas_station") from
    * https://developers.google.com/maps/documentation/places/web-service/place-types.
    * A Place is only returned if its primary type is included in this list. Up
    * to 5 values can be specified. If no types are specified, all Place types
@@ -443,21 +443,23 @@ public interface AutocompletePlacesRequestOrBuilder
    *
    *
    * 
-   * Optional. An arbitrary string which identifies an autocomplete session for
-   * billing purposes. Must be at most 36 characters in length. Otherwise an
-   * INVALID_ARGUMENT error is returned.
+   * Optional. A string which identifies an Autocomplete session for billing
+   * purposes. Must be a URL and filename safe base64 string with at most 36
+   * ASCII characters in length. Otherwise an INVALID_ARGUMENT error is
+   * returned.
    *
    * The session begins when the user starts typing a query, and concludes when
    * they select a place and a call to Place Details or Address Validation is
-   * made. Each session can have multiple queries, followed by one Place
-   * selection. The credentials used for each request within a session must
-   * belong to the same Google Cloud Console project. Once a session has
-   * concluded, the token is no longer valid; your app must generate a fresh
-   * token for each session. If the `session_token` parameter is omitted, or if
-   * you reuse a session token, the session is charged as if no session token
-   * was provided (each request is billed separately).
+   * made. Each session can have multiple queries, followed by one Place Details
+   * or Address Validation request. The credentials used for each request within
+   * a session must belong to the same Google Cloud Console project. Once a
+   * session has concluded, the token is no longer valid; your app must generate
+   * a fresh token for each session. If the `session_token` parameter is
+   * omitted, or if you reuse a session token, the session is charged as if no
+   * session token was provided (each request is billed separately).
    *
    * We recommend the following guidelines:
+   *
    * * Use session tokens for all Place Autocomplete calls.
    * * Generate a fresh token for each session. Using a version 4 UUID is
    *   recommended.
@@ -478,21 +480,23 @@ public interface AutocompletePlacesRequestOrBuilder
    *
    *
    * 
-   * Optional. An arbitrary string which identifies an autocomplete session for
-   * billing purposes. Must be at most 36 characters in length. Otherwise an
-   * INVALID_ARGUMENT error is returned.
+   * Optional. A string which identifies an Autocomplete session for billing
+   * purposes. Must be a URL and filename safe base64 string with at most 36
+   * ASCII characters in length. Otherwise an INVALID_ARGUMENT error is
+   * returned.
    *
    * The session begins when the user starts typing a query, and concludes when
    * they select a place and a call to Place Details or Address Validation is
-   * made. Each session can have multiple queries, followed by one Place
-   * selection. The credentials used for each request within a session must
-   * belong to the same Google Cloud Console project. Once a session has
-   * concluded, the token is no longer valid; your app must generate a fresh
-   * token for each session. If the `session_token` parameter is omitted, or if
-   * you reuse a session token, the session is charged as if no session token
-   * was provided (each request is billed separately).
+   * made. Each session can have multiple queries, followed by one Place Details
+   * or Address Validation request. The credentials used for each request within
+   * a session must belong to the same Google Cloud Console project. Once a
+   * session has concluded, the token is no longer valid; your app must generate
+   * a fresh token for each session. If the `session_token` parameter is
+   * omitted, or if you reuse a session token, the session is charged as if no
+   * session token was provided (each request is billed separately).
    *
    * We recommend the following guidelines:
+   *
    * * Use session tokens for all Place Autocomplete calls.
    * * Generate a fresh token for each session. Using a version 4 UUID is
    *   recommended.
diff --git a/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/AutocompletePlacesResponse.java b/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/AutocompletePlacesResponse.java
index a98beaf38046..14649dffc0c2 100644
--- a/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/AutocompletePlacesResponse.java
+++ b/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/AutocompletePlacesResponse.java
@@ -916,7 +916,7 @@ public interface FormattableTextOrBuilder
        * A list of string ranges identifying where the input request matched in
        * `text`. The ranges can be used to format specific parts of `text`. The
        * substrings may not be exact matches of `input` if the matching was
-       * determined by criteria other than string matching (e.g. spell
+       * determined by criteria other than string matching (for example, spell
        * corrections or transliterations).
        *
        * These values are Unicode character offsets of `text`. The ranges are
@@ -936,7 +936,7 @@ public interface FormattableTextOrBuilder
        * A list of string ranges identifying where the input request matched in
        * `text`. The ranges can be used to format specific parts of `text`. The
        * substrings may not be exact matches of `input` if the matching was
-       * determined by criteria other than string matching (e.g. spell
+       * determined by criteria other than string matching (for example, spell
        * corrections or transliterations).
        *
        * These values are Unicode character offsets of `text`. The ranges are
@@ -956,7 +956,7 @@ com.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange getM
        * A list of string ranges identifying where the input request matched in
        * `text`. The ranges can be used to format specific parts of `text`. The
        * substrings may not be exact matches of `input` if the matching was
-       * determined by criteria other than string matching (e.g. spell
+       * determined by criteria other than string matching (for example, spell
        * corrections or transliterations).
        *
        * These values are Unicode character offsets of `text`. The ranges are
@@ -975,7 +975,7 @@ com.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange getM
        * A list of string ranges identifying where the input request matched in
        * `text`. The ranges can be used to format specific parts of `text`. The
        * substrings may not be exact matches of `input` if the matching was
-       * determined by criteria other than string matching (e.g. spell
+       * determined by criteria other than string matching (for example, spell
        * corrections or transliterations).
        *
        * These values are Unicode character offsets of `text`. The ranges are
@@ -998,7 +998,7 @@ com.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange getM
        * A list of string ranges identifying where the input request matched in
        * `text`. The ranges can be used to format specific parts of `text`. The
        * substrings may not be exact matches of `input` if the matching was
-       * determined by criteria other than string matching (e.g. spell
+       * determined by criteria other than string matching (for example, spell
        * corrections or transliterations).
        *
        * These values are Unicode character offsets of `text`. The ranges are
@@ -1125,7 +1125,7 @@ public com.google.protobuf.ByteString getTextBytes() {
        * A list of string ranges identifying where the input request matched in
        * `text`. The ranges can be used to format specific parts of `text`. The
        * substrings may not be exact matches of `input` if the matching was
-       * determined by criteria other than string matching (e.g. spell
+       * determined by criteria other than string matching (for example, spell
        * corrections or transliterations).
        *
        * These values are Unicode character offsets of `text`. The ranges are
@@ -1149,7 +1149,7 @@ public com.google.protobuf.ByteString getTextBytes() {
        * A list of string ranges identifying where the input request matched in
        * `text`. The ranges can be used to format specific parts of `text`. The
        * substrings may not be exact matches of `input` if the matching was
-       * determined by criteria other than string matching (e.g. spell
+       * determined by criteria other than string matching (for example, spell
        * corrections or transliterations).
        *
        * These values are Unicode character offsets of `text`. The ranges are
@@ -1175,7 +1175,7 @@ public com.google.protobuf.ByteString getTextBytes() {
        * A list of string ranges identifying where the input request matched in
        * `text`. The ranges can be used to format specific parts of `text`. The
        * substrings may not be exact matches of `input` if the matching was
-       * determined by criteria other than string matching (e.g. spell
+       * determined by criteria other than string matching (for example, spell
        * corrections or transliterations).
        *
        * These values are Unicode character offsets of `text`. The ranges are
@@ -1197,7 +1197,7 @@ public int getMatchesCount() {
        * A list of string ranges identifying where the input request matched in
        * `text`. The ranges can be used to format specific parts of `text`. The
        * substrings may not be exact matches of `input` if the matching was
-       * determined by criteria other than string matching (e.g. spell
+       * determined by criteria other than string matching (for example, spell
        * corrections or transliterations).
        *
        * These values are Unicode character offsets of `text`. The ranges are
@@ -1220,7 +1220,7 @@ public com.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRan
        * A list of string ranges identifying where the input request matched in
        * `text`. The ranges can be used to format specific parts of `text`. The
        * substrings may not be exact matches of `input` if the matching was
-       * determined by criteria other than string matching (e.g. spell
+       * determined by criteria other than string matching (for example, spell
        * corrections or transliterations).
        *
        * These values are Unicode character offsets of `text`. The ranges are
@@ -1823,7 +1823,7 @@ private void ensureMatchesIsMutable() {
          * A list of string ranges identifying where the input request matched in
          * `text`. The ranges can be used to format specific parts of `text`. The
          * substrings may not be exact matches of `input` if the matching was
-         * determined by criteria other than string matching (e.g. spell
+         * determined by criteria other than string matching (for example, spell
          * corrections or transliterations).
          *
          * These values are Unicode character offsets of `text`. The ranges are
@@ -1850,7 +1850,7 @@ private void ensureMatchesIsMutable() {
          * A list of string ranges identifying where the input request matched in
          * `text`. The ranges can be used to format specific parts of `text`. The
          * substrings may not be exact matches of `input` if the matching was
-         * determined by criteria other than string matching (e.g. spell
+         * determined by criteria other than string matching (for example, spell
          * corrections or transliterations).
          *
          * These values are Unicode character offsets of `text`. The ranges are
@@ -1875,7 +1875,7 @@ public int getMatchesCount() {
          * A list of string ranges identifying where the input request matched in
          * `text`. The ranges can be used to format specific parts of `text`. The
          * substrings may not be exact matches of `input` if the matching was
-         * determined by criteria other than string matching (e.g. spell
+         * determined by criteria other than string matching (for example, spell
          * corrections or transliterations).
          *
          * These values are Unicode character offsets of `text`. The ranges are
@@ -1901,7 +1901,7 @@ public int getMatchesCount() {
          * A list of string ranges identifying where the input request matched in
          * `text`. The ranges can be used to format specific parts of `text`. The
          * substrings may not be exact matches of `input` if the matching was
-         * determined by criteria other than string matching (e.g. spell
+         * determined by criteria other than string matching (for example, spell
          * corrections or transliterations).
          *
          * These values are Unicode character offsets of `text`. The ranges are
@@ -1934,7 +1934,7 @@ public Builder setMatches(
          * A list of string ranges identifying where the input request matched in
          * `text`. The ranges can be used to format specific parts of `text`. The
          * substrings may not be exact matches of `input` if the matching was
-         * determined by criteria other than string matching (e.g. spell
+         * determined by criteria other than string matching (for example, spell
          * corrections or transliterations).
          *
          * These values are Unicode character offsets of `text`. The ranges are
@@ -1965,7 +1965,7 @@ public Builder setMatches(
          * A list of string ranges identifying where the input request matched in
          * `text`. The ranges can be used to format specific parts of `text`. The
          * substrings may not be exact matches of `input` if the matching was
-         * determined by criteria other than string matching (e.g. spell
+         * determined by criteria other than string matching (for example, spell
          * corrections or transliterations).
          *
          * These values are Unicode character offsets of `text`. The ranges are
@@ -1997,7 +1997,7 @@ public Builder addMatches(
          * A list of string ranges identifying where the input request matched in
          * `text`. The ranges can be used to format specific parts of `text`. The
          * substrings may not be exact matches of `input` if the matching was
-         * determined by criteria other than string matching (e.g. spell
+         * determined by criteria other than string matching (for example, spell
          * corrections or transliterations).
          *
          * These values are Unicode character offsets of `text`. The ranges are
@@ -2030,7 +2030,7 @@ public Builder addMatches(
          * A list of string ranges identifying where the input request matched in
          * `text`. The ranges can be used to format specific parts of `text`. The
          * substrings may not be exact matches of `input` if the matching was
-         * determined by criteria other than string matching (e.g. spell
+         * determined by criteria other than string matching (for example, spell
          * corrections or transliterations).
          *
          * These values are Unicode character offsets of `text`. The ranges are
@@ -2060,7 +2060,7 @@ public Builder addMatches(
          * A list of string ranges identifying where the input request matched in
          * `text`. The ranges can be used to format specific parts of `text`. The
          * substrings may not be exact matches of `input` if the matching was
-         * determined by criteria other than string matching (e.g. spell
+         * determined by criteria other than string matching (for example, spell
          * corrections or transliterations).
          *
          * These values are Unicode character offsets of `text`. The ranges are
@@ -2091,7 +2091,7 @@ public Builder addMatches(
          * A list of string ranges identifying where the input request matched in
          * `text`. The ranges can be used to format specific parts of `text`. The
          * substrings may not be exact matches of `input` if the matching was
-         * determined by criteria other than string matching (e.g. spell
+         * determined by criteria other than string matching (for example, spell
          * corrections or transliterations).
          *
          * These values are Unicode character offsets of `text`. The ranges are
@@ -2123,7 +2123,7 @@ public Builder addAllMatches(
          * A list of string ranges identifying where the input request matched in
          * `text`. The ranges can be used to format specific parts of `text`. The
          * substrings may not be exact matches of `input` if the matching was
-         * determined by criteria other than string matching (e.g. spell
+         * determined by criteria other than string matching (for example, spell
          * corrections or transliterations).
          *
          * These values are Unicode character offsets of `text`. The ranges are
@@ -2151,7 +2151,7 @@ public Builder clearMatches() {
          * A list of string ranges identifying where the input request matched in
          * `text`. The ranges can be used to format specific parts of `text`. The
          * substrings may not be exact matches of `input` if the matching was
-         * determined by criteria other than string matching (e.g. spell
+         * determined by criteria other than string matching (for example, spell
          * corrections or transliterations).
          *
          * These values are Unicode character offsets of `text`. The ranges are
@@ -2179,7 +2179,7 @@ public Builder removeMatches(int index) {
          * A list of string ranges identifying where the input request matched in
          * `text`. The ranges can be used to format specific parts of `text`. The
          * substrings may not be exact matches of `input` if the matching was
-         * determined by criteria other than string matching (e.g. spell
+         * determined by criteria other than string matching (for example, spell
          * corrections or transliterations).
          *
          * These values are Unicode character offsets of `text`. The ranges are
@@ -2201,7 +2201,7 @@ public Builder removeMatches(int index) {
          * A list of string ranges identifying where the input request matched in
          * `text`. The ranges can be used to format specific parts of `text`. The
          * substrings may not be exact matches of `input` if the matching was
-         * determined by criteria other than string matching (e.g. spell
+         * determined by criteria other than string matching (for example, spell
          * corrections or transliterations).
          *
          * These values are Unicode character offsets of `text`. The ranges are
@@ -2227,7 +2227,7 @@ public Builder removeMatches(int index) {
          * A list of string ranges identifying where the input request matched in
          * `text`. The ranges can be used to format specific parts of `text`. The
          * substrings may not be exact matches of `input` if the matching was
-         * determined by criteria other than string matching (e.g. spell
+         * determined by criteria other than string matching (for example, spell
          * corrections or transliterations).
          *
          * These values are Unicode character offsets of `text`. The ranges are
@@ -2256,7 +2256,7 @@ public Builder removeMatches(int index) {
          * A list of string ranges identifying where the input request matched in
          * `text`. The ranges can be used to format specific parts of `text`. The
          * substrings may not be exact matches of `input` if the matching was
-         * determined by criteria other than string matching (e.g. spell
+         * determined by criteria other than string matching (for example, spell
          * corrections or transliterations).
          *
          * These values are Unicode character offsets of `text`. The ranges are
@@ -2281,7 +2281,7 @@ public Builder removeMatches(int index) {
          * A list of string ranges identifying where the input request matched in
          * `text`. The ranges can be used to format specific parts of `text`. The
          * substrings may not be exact matches of `input` if the matching was
-         * determined by criteria other than string matching (e.g. spell
+         * determined by criteria other than string matching (for example, spell
          * corrections or transliterations).
          *
          * These values are Unicode character offsets of `text`. The ranges are
@@ -2307,7 +2307,7 @@ public Builder removeMatches(int index) {
          * A list of string ranges identifying where the input request matched in
          * `text`. The ranges can be used to format specific parts of `text`. The
          * substrings may not be exact matches of `input` if the matching was
-         * determined by criteria other than string matching (e.g. spell
+         * determined by criteria other than string matching (for example, spell
          * corrections or transliterations).
          *
          * These values are Unicode character offsets of `text`. The ranges are
@@ -6143,7 +6143,8 @@ public interface QueryPredictionOrBuilder
        *
        * 
        * The predicted text. This text does not represent a Place, but rather a
-       * text query that could be used in a search endpoint (e.g. TextSearch).
+       * text query that could be used in a search endpoint (for example,
+       * Text Search).
        *
        * `text` is recommended for developers who wish to show a single UI
        * element. Developers who wish to show two separate, but related, UI
@@ -6168,7 +6169,8 @@ public interface QueryPredictionOrBuilder
        *
        * 
        * The predicted text. This text does not represent a Place, but rather a
-       * text query that could be used in a search endpoint (e.g. TextSearch).
+       * text query that could be used in a search endpoint (for example,
+       * Text Search).
        *
        * `text` is recommended for developers who wish to show a single UI
        * element. Developers who wish to show two separate, but related, UI
@@ -6193,7 +6195,8 @@ public interface QueryPredictionOrBuilder
        *
        * 
        * The predicted text. This text does not represent a Place, but rather a
-       * text query that could be used in a search endpoint (e.g. TextSearch).
+       * text query that could be used in a search endpoint (for example,
+       * Text Search).
        *
        * `text` is recommended for developers who wish to show a single UI
        * element. Developers who wish to show two separate, but related, UI
@@ -6333,7 +6336,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
        *
        * 
        * The predicted text. This text does not represent a Place, but rather a
-       * text query that could be used in a search endpoint (e.g. TextSearch).
+       * text query that could be used in a search endpoint (for example,
+       * Text Search).
        *
        * `text` is recommended for developers who wish to show a single UI
        * element. Developers who wish to show two separate, but related, UI
@@ -6361,7 +6365,8 @@ public boolean hasText() {
        *
        * 
        * The predicted text. This text does not represent a Place, but rather a
-       * text query that could be used in a search endpoint (e.g. TextSearch).
+       * text query that could be used in a search endpoint (for example,
+       * Text Search).
        *
        * `text` is recommended for developers who wish to show a single UI
        * element. Developers who wish to show two separate, but related, UI
@@ -6393,7 +6398,8 @@ public boolean hasText() {
        *
        * 
        * The predicted text. This text does not represent a Place, but rather a
-       * text query that could be used in a search endpoint (e.g. TextSearch).
+       * text query that could be used in a search endpoint (for example,
+       * Text Search).
        *
        * `text` is recommended for developers who wish to show a single UI
        * element. Developers who wish to show two separate, but related, UI
@@ -6953,7 +6959,8 @@ public Builder mergeFrom(
          *
          * 
          * The predicted text. This text does not represent a Place, but rather a
-         * text query that could be used in a search endpoint (e.g. TextSearch).
+         * text query that could be used in a search endpoint (for example,
+         * Text Search).
          *
          * `text` is recommended for developers who wish to show a single UI
          * element. Developers who wish to show two separate, but related, UI
@@ -6980,7 +6987,8 @@ public boolean hasText() {
          *
          * 
          * The predicted text. This text does not represent a Place, but rather a
-         * text query that could be used in a search endpoint (e.g. TextSearch).
+         * text query that could be used in a search endpoint (for example,
+         * Text Search).
          *
          * `text` is recommended for developers who wish to show a single UI
          * element. Developers who wish to show two separate, but related, UI
@@ -7015,7 +7023,8 @@ public boolean hasText() {
          *
          * 
          * The predicted text. This text does not represent a Place, but rather a
-         * text query that could be used in a search endpoint (e.g. TextSearch).
+         * text query that could be used in a search endpoint (for example,
+         * Text Search).
          *
          * `text` is recommended for developers who wish to show a single UI
          * element. Developers who wish to show two separate, but related, UI
@@ -7051,7 +7060,8 @@ public Builder setText(
          *
          * 
          * The predicted text. This text does not represent a Place, but rather a
-         * text query that could be used in a search endpoint (e.g. TextSearch).
+         * text query that could be used in a search endpoint (for example,
+         * Text Search).
          *
          * `text` is recommended for developers who wish to show a single UI
          * element. Developers who wish to show two separate, but related, UI
@@ -7085,7 +7095,8 @@ public Builder setText(
          *
          * 
          * The predicted text. This text does not represent a Place, but rather a
-         * text query that could be used in a search endpoint (e.g. TextSearch).
+         * text query that could be used in a search endpoint (for example,
+         * Text Search).
          *
          * `text` is recommended for developers who wish to show a single UI
          * element. Developers who wish to show two separate, but related, UI
@@ -7128,7 +7139,8 @@ public Builder mergeText(
          *
          * 
          * The predicted text. This text does not represent a Place, but rather a
-         * text query that could be used in a search endpoint (e.g. TextSearch).
+         * text query that could be used in a search endpoint (for example,
+         * Text Search).
          *
          * `text` is recommended for developers who wish to show a single UI
          * element. Developers who wish to show two separate, but related, UI
@@ -7160,7 +7172,8 @@ public Builder clearText() {
          *
          * 
          * The predicted text. This text does not represent a Place, but rather a
-         * text query that could be used in a search endpoint (e.g. TextSearch).
+         * text query that could be used in a search endpoint (for example,
+         * Text Search).
          *
          * `text` is recommended for developers who wish to show a single UI
          * element. Developers who wish to show two separate, but related, UI
@@ -7189,7 +7202,8 @@ public Builder clearText() {
          *
          * 
          * The predicted text. This text does not represent a Place, but rather a
-         * text query that could be used in a search endpoint (e.g. TextSearch).
+         * text query that could be used in a search endpoint (for example,
+         * Text Search).
          *
          * `text` is recommended for developers who wish to show a single UI
          * element. Developers who wish to show two separate, but related, UI
@@ -7223,7 +7237,8 @@ public Builder clearText() {
          *
          * 
          * The predicted text. This text does not represent a Place, but rather a
-         * text query that could be used in a search endpoint (e.g. TextSearch).
+         * text query that could be used in a search endpoint (for example,
+         * Text Search).
          *
          * `text` is recommended for developers who wish to show a single UI
          * element. Developers who wish to show two separate, but related, UI
diff --git a/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/GetPlaceRequest.java b/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/GetPlaceRequest.java
index 7584d1820aec..0e41373445d0 100644
--- a/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/GetPlaceRequest.java
+++ b/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/GetPlaceRequest.java
@@ -256,21 +256,23 @@ public com.google.protobuf.ByteString getRegionCodeBytes() {
    *
    *
    * 
-   * Optional. An arbitrary string which identifies an autocomplete session for
-   * billing purposes. Must be at most 36 characters in length. Otherwise an
-   * INVALID_ARGUMENT error is returned.
+   * Optional. A string which identifies an Autocomplete session for billing
+   * purposes. Must be a URL and filename safe base64 string with at most 36
+   * ASCII characters in length. Otherwise an INVALID_ARGUMENT error is
+   * returned.
    *
    * The session begins when the user starts typing a query, and concludes when
    * they select a place and a call to Place Details or Address Validation is
-   * made. Each session can have multiple queries, followed by one Place
-   * selection. The credentials used for each request within a session must
-   * belong to the same Google Cloud Console project. Once a session has
-   * concluded, the token is no longer valid; your app must generate a fresh
-   * token for each session. If the `session_token` parameter is omitted, or if
-   * you reuse a session token, the session is charged as if no session token
-   * was provided (each request is billed separately).
+   * made. Each session can have multiple queries, followed by one Place Details
+   * or Address Validation request. The credentials used for each request within
+   * a session must belong to the same Google Cloud Console project. Once a
+   * session has concluded, the token is no longer valid; your app must generate
+   * a fresh token for each session. If the `session_token` parameter is
+   * omitted, or if you reuse a session token, the session is charged as if no
+   * session token was provided (each request is billed separately).
    *
    * We recommend the following guidelines:
+   *
    * * Use session tokens for all Place Autocomplete calls.
    * * Generate a fresh token for each session. Using a version 4 UUID is
    *   recommended.
@@ -302,21 +304,23 @@ public java.lang.String getSessionToken() {
    *
    *
    * 
-   * Optional. An arbitrary string which identifies an autocomplete session for
-   * billing purposes. Must be at most 36 characters in length. Otherwise an
-   * INVALID_ARGUMENT error is returned.
+   * Optional. A string which identifies an Autocomplete session for billing
+   * purposes. Must be a URL and filename safe base64 string with at most 36
+   * ASCII characters in length. Otherwise an INVALID_ARGUMENT error is
+   * returned.
    *
    * The session begins when the user starts typing a query, and concludes when
    * they select a place and a call to Place Details or Address Validation is
-   * made. Each session can have multiple queries, followed by one Place
-   * selection. The credentials used for each request within a session must
-   * belong to the same Google Cloud Console project. Once a session has
-   * concluded, the token is no longer valid; your app must generate a fresh
-   * token for each session. If the `session_token` parameter is omitted, or if
-   * you reuse a session token, the session is charged as if no session token
-   * was provided (each request is billed separately).
+   * made. Each session can have multiple queries, followed by one Place Details
+   * or Address Validation request. The credentials used for each request within
+   * a session must belong to the same Google Cloud Console project. Once a
+   * session has concluded, the token is no longer valid; your app must generate
+   * a fresh token for each session. If the `session_token` parameter is
+   * omitted, or if you reuse a session token, the session is charged as if no
+   * session token was provided (each request is billed separately).
    *
    * We recommend the following guidelines:
+   *
    * * Use session tokens for all Place Autocomplete calls.
    * * Generate a fresh token for each session. Using a version 4 UUID is
    *   recommended.
@@ -1152,21 +1156,23 @@ public Builder setRegionCodeBytes(com.google.protobuf.ByteString value) {
      *
      *
      * 
-     * Optional. An arbitrary string which identifies an autocomplete session for
-     * billing purposes. Must be at most 36 characters in length. Otherwise an
-     * INVALID_ARGUMENT error is returned.
+     * Optional. A string which identifies an Autocomplete session for billing
+     * purposes. Must be a URL and filename safe base64 string with at most 36
+     * ASCII characters in length. Otherwise an INVALID_ARGUMENT error is
+     * returned.
      *
      * The session begins when the user starts typing a query, and concludes when
      * they select a place and a call to Place Details or Address Validation is
-     * made. Each session can have multiple queries, followed by one Place
-     * selection. The credentials used for each request within a session must
-     * belong to the same Google Cloud Console project. Once a session has
-     * concluded, the token is no longer valid; your app must generate a fresh
-     * token for each session. If the `session_token` parameter is omitted, or if
-     * you reuse a session token, the session is charged as if no session token
-     * was provided (each request is billed separately).
+     * made. Each session can have multiple queries, followed by one Place Details
+     * or Address Validation request. The credentials used for each request within
+     * a session must belong to the same Google Cloud Console project. Once a
+     * session has concluded, the token is no longer valid; your app must generate
+     * a fresh token for each session. If the `session_token` parameter is
+     * omitted, or if you reuse a session token, the session is charged as if no
+     * session token was provided (each request is billed separately).
      *
      * We recommend the following guidelines:
+     *
      * * Use session tokens for all Place Autocomplete calls.
      * * Generate a fresh token for each session. Using a version 4 UUID is
      *   recommended.
@@ -1197,21 +1203,23 @@ public java.lang.String getSessionToken() {
      *
      *
      * 
-     * Optional. An arbitrary string which identifies an autocomplete session for
-     * billing purposes. Must be at most 36 characters in length. Otherwise an
-     * INVALID_ARGUMENT error is returned.
+     * Optional. A string which identifies an Autocomplete session for billing
+     * purposes. Must be a URL and filename safe base64 string with at most 36
+     * ASCII characters in length. Otherwise an INVALID_ARGUMENT error is
+     * returned.
      *
      * The session begins when the user starts typing a query, and concludes when
      * they select a place and a call to Place Details or Address Validation is
-     * made. Each session can have multiple queries, followed by one Place
-     * selection. The credentials used for each request within a session must
-     * belong to the same Google Cloud Console project. Once a session has
-     * concluded, the token is no longer valid; your app must generate a fresh
-     * token for each session. If the `session_token` parameter is omitted, or if
-     * you reuse a session token, the session is charged as if no session token
-     * was provided (each request is billed separately).
+     * made. Each session can have multiple queries, followed by one Place Details
+     * or Address Validation request. The credentials used for each request within
+     * a session must belong to the same Google Cloud Console project. Once a
+     * session has concluded, the token is no longer valid; your app must generate
+     * a fresh token for each session. If the `session_token` parameter is
+     * omitted, or if you reuse a session token, the session is charged as if no
+     * session token was provided (each request is billed separately).
      *
      * We recommend the following guidelines:
+     *
      * * Use session tokens for all Place Autocomplete calls.
      * * Generate a fresh token for each session. Using a version 4 UUID is
      *   recommended.
@@ -1242,21 +1250,23 @@ public com.google.protobuf.ByteString getSessionTokenBytes() {
      *
      *
      * 
-     * Optional. An arbitrary string which identifies an autocomplete session for
-     * billing purposes. Must be at most 36 characters in length. Otherwise an
-     * INVALID_ARGUMENT error is returned.
+     * Optional. A string which identifies an Autocomplete session for billing
+     * purposes. Must be a URL and filename safe base64 string with at most 36
+     * ASCII characters in length. Otherwise an INVALID_ARGUMENT error is
+     * returned.
      *
      * The session begins when the user starts typing a query, and concludes when
      * they select a place and a call to Place Details or Address Validation is
-     * made. Each session can have multiple queries, followed by one Place
-     * selection. The credentials used for each request within a session must
-     * belong to the same Google Cloud Console project. Once a session has
-     * concluded, the token is no longer valid; your app must generate a fresh
-     * token for each session. If the `session_token` parameter is omitted, or if
-     * you reuse a session token, the session is charged as if no session token
-     * was provided (each request is billed separately).
+     * made. Each session can have multiple queries, followed by one Place Details
+     * or Address Validation request. The credentials used for each request within
+     * a session must belong to the same Google Cloud Console project. Once a
+     * session has concluded, the token is no longer valid; your app must generate
+     * a fresh token for each session. If the `session_token` parameter is
+     * omitted, or if you reuse a session token, the session is charged as if no
+     * session token was provided (each request is billed separately).
      *
      * We recommend the following guidelines:
+     *
      * * Use session tokens for all Place Autocomplete calls.
      * * Generate a fresh token for each session. Using a version 4 UUID is
      *   recommended.
@@ -1286,21 +1296,23 @@ public Builder setSessionToken(java.lang.String value) {
      *
      *
      * 
-     * Optional. An arbitrary string which identifies an autocomplete session for
-     * billing purposes. Must be at most 36 characters in length. Otherwise an
-     * INVALID_ARGUMENT error is returned.
+     * Optional. A string which identifies an Autocomplete session for billing
+     * purposes. Must be a URL and filename safe base64 string with at most 36
+     * ASCII characters in length. Otherwise an INVALID_ARGUMENT error is
+     * returned.
      *
      * The session begins when the user starts typing a query, and concludes when
      * they select a place and a call to Place Details or Address Validation is
-     * made. Each session can have multiple queries, followed by one Place
-     * selection. The credentials used for each request within a session must
-     * belong to the same Google Cloud Console project. Once a session has
-     * concluded, the token is no longer valid; your app must generate a fresh
-     * token for each session. If the `session_token` parameter is omitted, or if
-     * you reuse a session token, the session is charged as if no session token
-     * was provided (each request is billed separately).
+     * made. Each session can have multiple queries, followed by one Place Details
+     * or Address Validation request. The credentials used for each request within
+     * a session must belong to the same Google Cloud Console project. Once a
+     * session has concluded, the token is no longer valid; your app must generate
+     * a fresh token for each session. If the `session_token` parameter is
+     * omitted, or if you reuse a session token, the session is charged as if no
+     * session token was provided (each request is billed separately).
      *
      * We recommend the following guidelines:
+     *
      * * Use session tokens for all Place Autocomplete calls.
      * * Generate a fresh token for each session. Using a version 4 UUID is
      *   recommended.
@@ -1326,21 +1338,23 @@ public Builder clearSessionToken() {
      *
      *
      * 
-     * Optional. An arbitrary string which identifies an autocomplete session for
-     * billing purposes. Must be at most 36 characters in length. Otherwise an
-     * INVALID_ARGUMENT error is returned.
+     * Optional. A string which identifies an Autocomplete session for billing
+     * purposes. Must be a URL and filename safe base64 string with at most 36
+     * ASCII characters in length. Otherwise an INVALID_ARGUMENT error is
+     * returned.
      *
      * The session begins when the user starts typing a query, and concludes when
      * they select a place and a call to Place Details or Address Validation is
-     * made. Each session can have multiple queries, followed by one Place
-     * selection. The credentials used for each request within a session must
-     * belong to the same Google Cloud Console project. Once a session has
-     * concluded, the token is no longer valid; your app must generate a fresh
-     * token for each session. If the `session_token` parameter is omitted, or if
-     * you reuse a session token, the session is charged as if no session token
-     * was provided (each request is billed separately).
+     * made. Each session can have multiple queries, followed by one Place Details
+     * or Address Validation request. The credentials used for each request within
+     * a session must belong to the same Google Cloud Console project. Once a
+     * session has concluded, the token is no longer valid; your app must generate
+     * a fresh token for each session. If the `session_token` parameter is
+     * omitted, or if you reuse a session token, the session is charged as if no
+     * session token was provided (each request is billed separately).
      *
      * We recommend the following guidelines:
+     *
      * * Use session tokens for all Place Autocomplete calls.
      * * Generate a fresh token for each session. Using a version 4 UUID is
      *   recommended.
diff --git a/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/GetPlaceRequestOrBuilder.java b/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/GetPlaceRequestOrBuilder.java
index 51534a94cc18..53286ef22f16 100644
--- a/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/GetPlaceRequestOrBuilder.java
+++ b/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/GetPlaceRequestOrBuilder.java
@@ -131,21 +131,23 @@ public interface GetPlaceRequestOrBuilder
    *
    *
    * 
-   * Optional. An arbitrary string which identifies an autocomplete session for
-   * billing purposes. Must be at most 36 characters in length. Otherwise an
-   * INVALID_ARGUMENT error is returned.
+   * Optional. A string which identifies an Autocomplete session for billing
+   * purposes. Must be a URL and filename safe base64 string with at most 36
+   * ASCII characters in length. Otherwise an INVALID_ARGUMENT error is
+   * returned.
    *
    * The session begins when the user starts typing a query, and concludes when
    * they select a place and a call to Place Details or Address Validation is
-   * made. Each session can have multiple queries, followed by one Place
-   * selection. The credentials used for each request within a session must
-   * belong to the same Google Cloud Console project. Once a session has
-   * concluded, the token is no longer valid; your app must generate a fresh
-   * token for each session. If the `session_token` parameter is omitted, or if
-   * you reuse a session token, the session is charged as if no session token
-   * was provided (each request is billed separately).
+   * made. Each session can have multiple queries, followed by one Place Details
+   * or Address Validation request. The credentials used for each request within
+   * a session must belong to the same Google Cloud Console project. Once a
+   * session has concluded, the token is no longer valid; your app must generate
+   * a fresh token for each session. If the `session_token` parameter is
+   * omitted, or if you reuse a session token, the session is charged as if no
+   * session token was provided (each request is billed separately).
    *
    * We recommend the following guidelines:
+   *
    * * Use session tokens for all Place Autocomplete calls.
    * * Generate a fresh token for each session. Using a version 4 UUID is
    *   recommended.
@@ -166,21 +168,23 @@ public interface GetPlaceRequestOrBuilder
    *
    *
    * 
-   * Optional. An arbitrary string which identifies an autocomplete session for
-   * billing purposes. Must be at most 36 characters in length. Otherwise an
-   * INVALID_ARGUMENT error is returned.
+   * Optional. A string which identifies an Autocomplete session for billing
+   * purposes. Must be a URL and filename safe base64 string with at most 36
+   * ASCII characters in length. Otherwise an INVALID_ARGUMENT error is
+   * returned.
    *
    * The session begins when the user starts typing a query, and concludes when
    * they select a place and a call to Place Details or Address Validation is
-   * made. Each session can have multiple queries, followed by one Place
-   * selection. The credentials used for each request within a session must
-   * belong to the same Google Cloud Console project. Once a session has
-   * concluded, the token is no longer valid; your app must generate a fresh
-   * token for each session. If the `session_token` parameter is omitted, or if
-   * you reuse a session token, the session is charged as if no session token
-   * was provided (each request is billed separately).
+   * made. Each session can have multiple queries, followed by one Place Details
+   * or Address Validation request. The credentials used for each request within
+   * a session must belong to the same Google Cloud Console project. Once a
+   * session has concluded, the token is no longer valid; your app must generate
+   * a fresh token for each session. If the `session_token` parameter is
+   * omitted, or if you reuse a session token, the session is charged as if no
+   * session token was provided (each request is billed separately).
    *
    * We recommend the following guidelines:
+   *
    * * Use session tokens for all Place Autocomplete calls.
    * * Generate a fresh token for each session. Using a version 4 UUID is
    *   recommended.
diff --git a/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/Place.java b/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/Place.java
index 6949b808ec42..a48c3e9145fe 100644
--- a/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/Place.java
+++ b/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/Place.java
@@ -14108,8 +14108,8 @@ public com.google.type.LocalizedTextOrBuilder getDisplayNameOrBuilder() {
    *
    * 
    * A set of type tags for this result. For example, "political" and
-   * "locality".  For the complete list of possible values, see Table A and
-   * Table B at
+   * "locality". For the complete list of possible values, see Table A and Table
+   * B at
    * https://developers.google.com/maps/documentation/places/web-service/place-types
    * 
* @@ -14125,8 +14125,8 @@ public com.google.protobuf.ProtocolStringList getTypesList() { * *
    * A set of type tags for this result. For example, "political" and
-   * "locality".  For the complete list of possible values, see Table A and
-   * Table B at
+   * "locality". For the complete list of possible values, see Table A and Table
+   * B at
    * https://developers.google.com/maps/documentation/places/web-service/place-types
    * 
* @@ -14142,8 +14142,8 @@ public int getTypesCount() { * *
    * A set of type tags for this result. For example, "political" and
-   * "locality".  For the complete list of possible values, see Table A and
-   * Table B at
+   * "locality". For the complete list of possible values, see Table A and Table
+   * B at
    * https://developers.google.com/maps/documentation/places/web-service/place-types
    * 
* @@ -14160,8 +14160,8 @@ public java.lang.String getTypes(int index) { * *
    * A set of type tags for this result. For example, "political" and
-   * "locality".  For the complete list of possible values, see Table A and
-   * Table B at
+   * "locality". For the complete list of possible values, see Table A and Table
+   * B at
    * https://developers.google.com/maps/documentation/places/web-service/place-types
    * 
* @@ -14240,8 +14240,8 @@ public com.google.protobuf.ByteString getPrimaryTypeBytes() { * *
    * The display name of the primary type, localized to the request language if
-   * applicable.  For the complete list of possible values, see Table A and
-   * Table B at
+   * applicable. For the complete list of possible values, see Table A and Table
+   * B at
    * https://developers.google.com/maps/documentation/places/web-service/place-types
    * 
* @@ -14258,8 +14258,8 @@ public boolean hasPrimaryTypeDisplayName() { * *
    * The display name of the primary type, localized to the request language if
-   * applicable.  For the complete list of possible values, see Table A and
-   * Table B at
+   * applicable. For the complete list of possible values, see Table A and Table
+   * B at
    * https://developers.google.com/maps/documentation/places/web-service/place-types
    * 
* @@ -14278,8 +14278,8 @@ public com.google.type.LocalizedText getPrimaryTypeDisplayName() { * *
    * The display name of the primary type, localized to the request language if
-   * applicable.  For the complete list of possible values, see Table A and
-   * Table B at
+   * applicable. For the complete list of possible values, see Table A and Table
+   * B at
    * https://developers.google.com/maps/documentation/places/web-service/place-types
    * 
* @@ -14910,7 +14910,8 @@ public com.google.protobuf.ByteString getWebsiteUriBytes() { * * *
-   * List of reviews about this place, sorted by relevance.
+   * List of reviews about this place, sorted by relevance. A maximum of 5
+   * reviews can be returned.
    * 
* * repeated .google.maps.places.v1.Review reviews = 53; @@ -14923,7 +14924,8 @@ public java.util.List getReviewsList() { * * *
-   * List of reviews about this place, sorted by relevance.
+   * List of reviews about this place, sorted by relevance. A maximum of 5
+   * reviews can be returned.
    * 
* * repeated .google.maps.places.v1.Review reviews = 53; @@ -14937,7 +14939,8 @@ public java.util.List getReviewsList() { * * *
-   * List of reviews about this place, sorted by relevance.
+   * List of reviews about this place, sorted by relevance. A maximum of 5
+   * reviews can be returned.
    * 
* * repeated .google.maps.places.v1.Review reviews = 53; @@ -14950,7 +14953,8 @@ public int getReviewsCount() { * * *
-   * List of reviews about this place, sorted by relevance.
+   * List of reviews about this place, sorted by relevance. A maximum of 5
+   * reviews can be returned.
    * 
* * repeated .google.maps.places.v1.Review reviews = 53; @@ -14963,7 +14967,8 @@ public com.google.maps.places.v1.Review getReviews(int index) { * * *
-   * List of reviews about this place, sorted by relevance.
+   * List of reviews about this place, sorted by relevance. A maximum of 5
+   * reviews can be returned.
    * 
* * repeated .google.maps.places.v1.Review reviews = 53; @@ -15068,7 +15073,8 @@ public int getUtcOffsetMinutes() { * * *
-   * Information (including references) about photos of this place.
+   * Information (including references) about photos of this place. A maximum of
+   * 10 photos can be returned.
    * 
* * repeated .google.maps.places.v1.Photo photos = 54; @@ -15081,7 +15087,8 @@ public java.util.List getPhotosList() { * * *
-   * Information (including references) about photos of this place.
+   * Information (including references) about photos of this place. A maximum of
+   * 10 photos can be returned.
    * 
* * repeated .google.maps.places.v1.Photo photos = 54; @@ -15095,7 +15102,8 @@ public java.util.List getPhotosList() { * * *
-   * Information (including references) about photos of this place.
+   * Information (including references) about photos of this place. A maximum of
+   * 10 photos can be returned.
    * 
* * repeated .google.maps.places.v1.Photo photos = 54; @@ -15108,7 +15116,8 @@ public int getPhotosCount() { * * *
-   * Information (including references) about photos of this place.
+   * Information (including references) about photos of this place. A maximum of
+   * 10 photos can be returned.
    * 
* * repeated .google.maps.places.v1.Photo photos = 54; @@ -15121,7 +15130,8 @@ public com.google.maps.places.v1.Photo getPhotos(int index) { * * *
-   * Information (including references) about photos of this place.
+   * Information (including references) about photos of this place. A maximum of
+   * 10 photos can be returned.
    * 
* * repeated .google.maps.places.v1.Photo photos = 54; @@ -19689,8 +19699,8 @@ private void ensureTypesIsMutable() { * *
      * A set of type tags for this result. For example, "political" and
-     * "locality".  For the complete list of possible values, see Table A and
-     * Table B at
+     * "locality". For the complete list of possible values, see Table A and Table
+     * B at
      * https://developers.google.com/maps/documentation/places/web-service/place-types
      * 
* @@ -19707,8 +19717,8 @@ public com.google.protobuf.ProtocolStringList getTypesList() { * *
      * A set of type tags for this result. For example, "political" and
-     * "locality".  For the complete list of possible values, see Table A and
-     * Table B at
+     * "locality". For the complete list of possible values, see Table A and Table
+     * B at
      * https://developers.google.com/maps/documentation/places/web-service/place-types
      * 
* @@ -19724,8 +19734,8 @@ public int getTypesCount() { * *
      * A set of type tags for this result. For example, "political" and
-     * "locality".  For the complete list of possible values, see Table A and
-     * Table B at
+     * "locality". For the complete list of possible values, see Table A and Table
+     * B at
      * https://developers.google.com/maps/documentation/places/web-service/place-types
      * 
* @@ -19742,8 +19752,8 @@ public java.lang.String getTypes(int index) { * *
      * A set of type tags for this result. For example, "political" and
-     * "locality".  For the complete list of possible values, see Table A and
-     * Table B at
+     * "locality". For the complete list of possible values, see Table A and Table
+     * B at
      * https://developers.google.com/maps/documentation/places/web-service/place-types
      * 
* @@ -19760,8 +19770,8 @@ public com.google.protobuf.ByteString getTypesBytes(int index) { * *
      * A set of type tags for this result. For example, "political" and
-     * "locality".  For the complete list of possible values, see Table A and
-     * Table B at
+     * "locality". For the complete list of possible values, see Table A and Table
+     * B at
      * https://developers.google.com/maps/documentation/places/web-service/place-types
      * 
* @@ -19786,8 +19796,8 @@ public Builder setTypes(int index, java.lang.String value) { * *
      * A set of type tags for this result. For example, "political" and
-     * "locality".  For the complete list of possible values, see Table A and
-     * Table B at
+     * "locality". For the complete list of possible values, see Table A and Table
+     * B at
      * https://developers.google.com/maps/documentation/places/web-service/place-types
      * 
* @@ -19811,8 +19821,8 @@ public Builder addTypes(java.lang.String value) { * *
      * A set of type tags for this result. For example, "political" and
-     * "locality".  For the complete list of possible values, see Table A and
-     * Table B at
+     * "locality". For the complete list of possible values, see Table A and Table
+     * B at
      * https://developers.google.com/maps/documentation/places/web-service/place-types
      * 
* @@ -19833,8 +19843,8 @@ public Builder addAllTypes(java.lang.Iterable values) { * *
      * A set of type tags for this result. For example, "political" and
-     * "locality".  For the complete list of possible values, see Table A and
-     * Table B at
+     * "locality". For the complete list of possible values, see Table A and Table
+     * B at
      * https://developers.google.com/maps/documentation/places/web-service/place-types
      * 
* @@ -19854,8 +19864,8 @@ public Builder clearTypes() { * *
      * A set of type tags for this result. For example, "political" and
-     * "locality".  For the complete list of possible values, see Table A and
-     * Table B at
+     * "locality". For the complete list of possible values, see Table A and Table
+     * B at
      * https://developers.google.com/maps/documentation/places/web-service/place-types
      * 
* @@ -20013,8 +20023,8 @@ public Builder setPrimaryTypeBytes(com.google.protobuf.ByteString value) { * *
      * The display name of the primary type, localized to the request language if
-     * applicable.  For the complete list of possible values, see Table A and
-     * Table B at
+     * applicable. For the complete list of possible values, see Table A and Table
+     * B at
      * https://developers.google.com/maps/documentation/places/web-service/place-types
      * 
* @@ -20030,8 +20040,8 @@ public boolean hasPrimaryTypeDisplayName() { * *
      * The display name of the primary type, localized to the request language if
-     * applicable.  For the complete list of possible values, see Table A and
-     * Table B at
+     * applicable. For the complete list of possible values, see Table A and Table
+     * B at
      * https://developers.google.com/maps/documentation/places/web-service/place-types
      * 
* @@ -20053,8 +20063,8 @@ public com.google.type.LocalizedText getPrimaryTypeDisplayName() { * *
      * The display name of the primary type, localized to the request language if
-     * applicable.  For the complete list of possible values, see Table A and
-     * Table B at
+     * applicable. For the complete list of possible values, see Table A and Table
+     * B at
      * https://developers.google.com/maps/documentation/places/web-service/place-types
      * 
* @@ -20078,8 +20088,8 @@ public Builder setPrimaryTypeDisplayName(com.google.type.LocalizedText value) { * *
      * The display name of the primary type, localized to the request language if
-     * applicable.  For the complete list of possible values, see Table A and
-     * Table B at
+     * applicable. For the complete list of possible values, see Table A and Table
+     * B at
      * https://developers.google.com/maps/documentation/places/web-service/place-types
      * 
* @@ -20101,8 +20111,8 @@ public Builder setPrimaryTypeDisplayName( * *
      * The display name of the primary type, localized to the request language if
-     * applicable.  For the complete list of possible values, see Table A and
-     * Table B at
+     * applicable. For the complete list of possible values, see Table A and Table
+     * B at
      * https://developers.google.com/maps/documentation/places/web-service/place-types
      * 
* @@ -20131,8 +20141,8 @@ public Builder mergePrimaryTypeDisplayName(com.google.type.LocalizedText value) * *
      * The display name of the primary type, localized to the request language if
-     * applicable.  For the complete list of possible values, see Table A and
-     * Table B at
+     * applicable. For the complete list of possible values, see Table A and Table
+     * B at
      * https://developers.google.com/maps/documentation/places/web-service/place-types
      * 
* @@ -20153,8 +20163,8 @@ public Builder clearPrimaryTypeDisplayName() { * *
      * The display name of the primary type, localized to the request language if
-     * applicable.  For the complete list of possible values, see Table A and
-     * Table B at
+     * applicable. For the complete list of possible values, see Table A and Table
+     * B at
      * https://developers.google.com/maps/documentation/places/web-service/place-types
      * 
* @@ -20170,8 +20180,8 @@ public com.google.type.LocalizedText.Builder getPrimaryTypeDisplayNameBuilder() * *
      * The display name of the primary type, localized to the request language if
-     * applicable.  For the complete list of possible values, see Table A and
-     * Table B at
+     * applicable. For the complete list of possible values, see Table A and Table
+     * B at
      * https://developers.google.com/maps/documentation/places/web-service/place-types
      * 
* @@ -20191,8 +20201,8 @@ public com.google.type.LocalizedTextOrBuilder getPrimaryTypeDisplayNameOrBuilder * *
      * The display name of the primary type, localized to the request language if
-     * applicable.  For the complete list of possible values, see Table A and
-     * Table B at
+     * applicable. For the complete list of possible values, see Table A and Table
+     * B at
      * https://developers.google.com/maps/documentation/places/web-service/place-types
      * 
* @@ -22076,7 +22086,8 @@ private void ensureReviewsIsMutable() { * * *
-     * List of reviews about this place, sorted by relevance.
+     * List of reviews about this place, sorted by relevance. A maximum of 5
+     * reviews can be returned.
      * 
* * repeated .google.maps.places.v1.Review reviews = 53; @@ -22092,7 +22103,8 @@ public java.util.List getReviewsList() { * * *
-     * List of reviews about this place, sorted by relevance.
+     * List of reviews about this place, sorted by relevance. A maximum of 5
+     * reviews can be returned.
      * 
* * repeated .google.maps.places.v1.Review reviews = 53; @@ -22108,7 +22120,8 @@ public int getReviewsCount() { * * *
-     * List of reviews about this place, sorted by relevance.
+     * List of reviews about this place, sorted by relevance. A maximum of 5
+     * reviews can be returned.
      * 
* * repeated .google.maps.places.v1.Review reviews = 53; @@ -22124,7 +22137,8 @@ public com.google.maps.places.v1.Review getReviews(int index) { * * *
-     * List of reviews about this place, sorted by relevance.
+     * List of reviews about this place, sorted by relevance. A maximum of 5
+     * reviews can be returned.
      * 
* * repeated .google.maps.places.v1.Review reviews = 53; @@ -22146,7 +22160,8 @@ public Builder setReviews(int index, com.google.maps.places.v1.Review value) { * * *
-     * List of reviews about this place, sorted by relevance.
+     * List of reviews about this place, sorted by relevance. A maximum of 5
+     * reviews can be returned.
      * 
* * repeated .google.maps.places.v1.Review reviews = 53; @@ -22165,7 +22180,8 @@ public Builder setReviews(int index, com.google.maps.places.v1.Review.Builder bu * * *
-     * List of reviews about this place, sorted by relevance.
+     * List of reviews about this place, sorted by relevance. A maximum of 5
+     * reviews can be returned.
      * 
* * repeated .google.maps.places.v1.Review reviews = 53; @@ -22187,7 +22203,8 @@ public Builder addReviews(com.google.maps.places.v1.Review value) { * * *
-     * List of reviews about this place, sorted by relevance.
+     * List of reviews about this place, sorted by relevance. A maximum of 5
+     * reviews can be returned.
      * 
* * repeated .google.maps.places.v1.Review reviews = 53; @@ -22209,7 +22226,8 @@ public Builder addReviews(int index, com.google.maps.places.v1.Review value) { * * *
-     * List of reviews about this place, sorted by relevance.
+     * List of reviews about this place, sorted by relevance. A maximum of 5
+     * reviews can be returned.
      * 
* * repeated .google.maps.places.v1.Review reviews = 53; @@ -22228,7 +22246,8 @@ public Builder addReviews(com.google.maps.places.v1.Review.Builder builderForVal * * *
-     * List of reviews about this place, sorted by relevance.
+     * List of reviews about this place, sorted by relevance. A maximum of 5
+     * reviews can be returned.
      * 
* * repeated .google.maps.places.v1.Review reviews = 53; @@ -22247,7 +22266,8 @@ public Builder addReviews(int index, com.google.maps.places.v1.Review.Builder bu * * *
-     * List of reviews about this place, sorted by relevance.
+     * List of reviews about this place, sorted by relevance. A maximum of 5
+     * reviews can be returned.
      * 
* * repeated .google.maps.places.v1.Review reviews = 53; @@ -22267,7 +22287,8 @@ public Builder addAllReviews( * * *
-     * List of reviews about this place, sorted by relevance.
+     * List of reviews about this place, sorted by relevance. A maximum of 5
+     * reviews can be returned.
      * 
* * repeated .google.maps.places.v1.Review reviews = 53; @@ -22286,7 +22307,8 @@ public Builder clearReviews() { * * *
-     * List of reviews about this place, sorted by relevance.
+     * List of reviews about this place, sorted by relevance. A maximum of 5
+     * reviews can be returned.
      * 
* * repeated .google.maps.places.v1.Review reviews = 53; @@ -22305,7 +22327,8 @@ public Builder removeReviews(int index) { * * *
-     * List of reviews about this place, sorted by relevance.
+     * List of reviews about this place, sorted by relevance. A maximum of 5
+     * reviews can be returned.
      * 
* * repeated .google.maps.places.v1.Review reviews = 53; @@ -22317,7 +22340,8 @@ public com.google.maps.places.v1.Review.Builder getReviewsBuilder(int index) { * * *
-     * List of reviews about this place, sorted by relevance.
+     * List of reviews about this place, sorted by relevance. A maximum of 5
+     * reviews can be returned.
      * 
* * repeated .google.maps.places.v1.Review reviews = 53; @@ -22333,7 +22357,8 @@ public com.google.maps.places.v1.ReviewOrBuilder getReviewsOrBuilder(int index) * * *
-     * List of reviews about this place, sorted by relevance.
+     * List of reviews about this place, sorted by relevance. A maximum of 5
+     * reviews can be returned.
      * 
* * repeated .google.maps.places.v1.Review reviews = 53; @@ -22350,7 +22375,8 @@ public com.google.maps.places.v1.ReviewOrBuilder getReviewsOrBuilder(int index) * * *
-     * List of reviews about this place, sorted by relevance.
+     * List of reviews about this place, sorted by relevance. A maximum of 5
+     * reviews can be returned.
      * 
* * repeated .google.maps.places.v1.Review reviews = 53; @@ -22363,7 +22389,8 @@ public com.google.maps.places.v1.Review.Builder addReviewsBuilder() { * * *
-     * List of reviews about this place, sorted by relevance.
+     * List of reviews about this place, sorted by relevance. A maximum of 5
+     * reviews can be returned.
      * 
* * repeated .google.maps.places.v1.Review reviews = 53; @@ -22376,7 +22403,8 @@ public com.google.maps.places.v1.Review.Builder addReviewsBuilder(int index) { * * *
-     * List of reviews about this place, sorted by relevance.
+     * List of reviews about this place, sorted by relevance. A maximum of 5
+     * reviews can be returned.
      * 
* * repeated .google.maps.places.v1.Review reviews = 53; @@ -22685,7 +22713,8 @@ private void ensurePhotosIsMutable() { * * *
-     * Information (including references) about photos of this place.
+     * Information (including references) about photos of this place. A maximum of
+     * 10 photos can be returned.
      * 
* * repeated .google.maps.places.v1.Photo photos = 54; @@ -22701,7 +22730,8 @@ public java.util.List getPhotosList() { * * *
-     * Information (including references) about photos of this place.
+     * Information (including references) about photos of this place. A maximum of
+     * 10 photos can be returned.
      * 
* * repeated .google.maps.places.v1.Photo photos = 54; @@ -22717,7 +22747,8 @@ public int getPhotosCount() { * * *
-     * Information (including references) about photos of this place.
+     * Information (including references) about photos of this place. A maximum of
+     * 10 photos can be returned.
      * 
* * repeated .google.maps.places.v1.Photo photos = 54; @@ -22733,7 +22764,8 @@ public com.google.maps.places.v1.Photo getPhotos(int index) { * * *
-     * Information (including references) about photos of this place.
+     * Information (including references) about photos of this place. A maximum of
+     * 10 photos can be returned.
      * 
* * repeated .google.maps.places.v1.Photo photos = 54; @@ -22755,7 +22787,8 @@ public Builder setPhotos(int index, com.google.maps.places.v1.Photo value) { * * *
-     * Information (including references) about photos of this place.
+     * Information (including references) about photos of this place. A maximum of
+     * 10 photos can be returned.
      * 
* * repeated .google.maps.places.v1.Photo photos = 54; @@ -22774,7 +22807,8 @@ public Builder setPhotos(int index, com.google.maps.places.v1.Photo.Builder buil * * *
-     * Information (including references) about photos of this place.
+     * Information (including references) about photos of this place. A maximum of
+     * 10 photos can be returned.
      * 
* * repeated .google.maps.places.v1.Photo photos = 54; @@ -22796,7 +22830,8 @@ public Builder addPhotos(com.google.maps.places.v1.Photo value) { * * *
-     * Information (including references) about photos of this place.
+     * Information (including references) about photos of this place. A maximum of
+     * 10 photos can be returned.
      * 
* * repeated .google.maps.places.v1.Photo photos = 54; @@ -22818,7 +22853,8 @@ public Builder addPhotos(int index, com.google.maps.places.v1.Photo value) { * * *
-     * Information (including references) about photos of this place.
+     * Information (including references) about photos of this place. A maximum of
+     * 10 photos can be returned.
      * 
* * repeated .google.maps.places.v1.Photo photos = 54; @@ -22837,7 +22873,8 @@ public Builder addPhotos(com.google.maps.places.v1.Photo.Builder builderForValue * * *
-     * Information (including references) about photos of this place.
+     * Information (including references) about photos of this place. A maximum of
+     * 10 photos can be returned.
      * 
* * repeated .google.maps.places.v1.Photo photos = 54; @@ -22856,7 +22893,8 @@ public Builder addPhotos(int index, com.google.maps.places.v1.Photo.Builder buil * * *
-     * Information (including references) about photos of this place.
+     * Information (including references) about photos of this place. A maximum of
+     * 10 photos can be returned.
      * 
* * repeated .google.maps.places.v1.Photo photos = 54; @@ -22876,7 +22914,8 @@ public Builder addAllPhotos( * * *
-     * Information (including references) about photos of this place.
+     * Information (including references) about photos of this place. A maximum of
+     * 10 photos can be returned.
      * 
* * repeated .google.maps.places.v1.Photo photos = 54; @@ -22895,7 +22934,8 @@ public Builder clearPhotos() { * * *
-     * Information (including references) about photos of this place.
+     * Information (including references) about photos of this place. A maximum of
+     * 10 photos can be returned.
      * 
* * repeated .google.maps.places.v1.Photo photos = 54; @@ -22914,7 +22954,8 @@ public Builder removePhotos(int index) { * * *
-     * Information (including references) about photos of this place.
+     * Information (including references) about photos of this place. A maximum of
+     * 10 photos can be returned.
      * 
* * repeated .google.maps.places.v1.Photo photos = 54; @@ -22926,7 +22967,8 @@ public com.google.maps.places.v1.Photo.Builder getPhotosBuilder(int index) { * * *
-     * Information (including references) about photos of this place.
+     * Information (including references) about photos of this place. A maximum of
+     * 10 photos can be returned.
      * 
* * repeated .google.maps.places.v1.Photo photos = 54; @@ -22942,7 +22984,8 @@ public com.google.maps.places.v1.PhotoOrBuilder getPhotosOrBuilder(int index) { * * *
-     * Information (including references) about photos of this place.
+     * Information (including references) about photos of this place. A maximum of
+     * 10 photos can be returned.
      * 
* * repeated .google.maps.places.v1.Photo photos = 54; @@ -22959,7 +23002,8 @@ public com.google.maps.places.v1.PhotoOrBuilder getPhotosOrBuilder(int index) { * * *
-     * Information (including references) about photos of this place.
+     * Information (including references) about photos of this place. A maximum of
+     * 10 photos can be returned.
      * 
* * repeated .google.maps.places.v1.Photo photos = 54; @@ -22972,7 +23016,8 @@ public com.google.maps.places.v1.Photo.Builder addPhotosBuilder() { * * *
-     * Information (including references) about photos of this place.
+     * Information (including references) about photos of this place. A maximum of
+     * 10 photos can be returned.
      * 
* * repeated .google.maps.places.v1.Photo photos = 54; @@ -22985,7 +23030,8 @@ public com.google.maps.places.v1.Photo.Builder addPhotosBuilder(int index) { * * *
-     * Information (including references) about photos of this place.
+     * Information (including references) about photos of this place. A maximum of
+     * 10 photos can be returned.
      * 
* * repeated .google.maps.places.v1.Photo photos = 54; diff --git a/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/PlaceOrBuilder.java b/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/PlaceOrBuilder.java index 6f64fee07d9d..d990a0c67882 100644 --- a/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/PlaceOrBuilder.java +++ b/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/PlaceOrBuilder.java @@ -119,8 +119,8 @@ public interface PlaceOrBuilder * *
    * A set of type tags for this result. For example, "political" and
-   * "locality".  For the complete list of possible values, see Table A and
-   * Table B at
+   * "locality". For the complete list of possible values, see Table A and Table
+   * B at
    * https://developers.google.com/maps/documentation/places/web-service/place-types
    * 
* @@ -134,8 +134,8 @@ public interface PlaceOrBuilder * *
    * A set of type tags for this result. For example, "political" and
-   * "locality".  For the complete list of possible values, see Table A and
-   * Table B at
+   * "locality". For the complete list of possible values, see Table A and Table
+   * B at
    * https://developers.google.com/maps/documentation/places/web-service/place-types
    * 
* @@ -149,8 +149,8 @@ public interface PlaceOrBuilder * *
    * A set of type tags for this result. For example, "political" and
-   * "locality".  For the complete list of possible values, see Table A and
-   * Table B at
+   * "locality". For the complete list of possible values, see Table A and Table
+   * B at
    * https://developers.google.com/maps/documentation/places/web-service/place-types
    * 
* @@ -165,8 +165,8 @@ public interface PlaceOrBuilder * *
    * A set of type tags for this result. For example, "political" and
-   * "locality".  For the complete list of possible values, see Table A and
-   * Table B at
+   * "locality". For the complete list of possible values, see Table A and Table
+   * B at
    * https://developers.google.com/maps/documentation/places/web-service/place-types
    * 
* @@ -215,8 +215,8 @@ public interface PlaceOrBuilder * *
    * The display name of the primary type, localized to the request language if
-   * applicable.  For the complete list of possible values, see Table A and
-   * Table B at
+   * applicable. For the complete list of possible values, see Table A and Table
+   * B at
    * https://developers.google.com/maps/documentation/places/web-service/place-types
    * 
* @@ -230,8 +230,8 @@ public interface PlaceOrBuilder * *
    * The display name of the primary type, localized to the request language if
-   * applicable.  For the complete list of possible values, see Table A and
-   * Table B at
+   * applicable. For the complete list of possible values, see Table A and Table
+   * B at
    * https://developers.google.com/maps/documentation/places/web-service/place-types
    * 
* @@ -245,8 +245,8 @@ public interface PlaceOrBuilder * *
    * The display name of the primary type, localized to the request language if
-   * applicable.  For the complete list of possible values, see Table A and
-   * Table B at
+   * applicable. For the complete list of possible values, see Table A and Table
+   * B at
    * https://developers.google.com/maps/documentation/places/web-service/place-types
    * 
* @@ -650,7 +650,8 @@ com.google.maps.places.v1.Place.AddressComponentOrBuilder getAddressComponentsOr * * *
-   * List of reviews about this place, sorted by relevance.
+   * List of reviews about this place, sorted by relevance. A maximum of 5
+   * reviews can be returned.
    * 
* * repeated .google.maps.places.v1.Review reviews = 53; @@ -660,7 +661,8 @@ com.google.maps.places.v1.Place.AddressComponentOrBuilder getAddressComponentsOr * * *
-   * List of reviews about this place, sorted by relevance.
+   * List of reviews about this place, sorted by relevance. A maximum of 5
+   * reviews can be returned.
    * 
* * repeated .google.maps.places.v1.Review reviews = 53; @@ -670,7 +672,8 @@ com.google.maps.places.v1.Place.AddressComponentOrBuilder getAddressComponentsOr * * *
-   * List of reviews about this place, sorted by relevance.
+   * List of reviews about this place, sorted by relevance. A maximum of 5
+   * reviews can be returned.
    * 
* * repeated .google.maps.places.v1.Review reviews = 53; @@ -680,7 +683,8 @@ com.google.maps.places.v1.Place.AddressComponentOrBuilder getAddressComponentsOr * * *
-   * List of reviews about this place, sorted by relevance.
+   * List of reviews about this place, sorted by relevance. A maximum of 5
+   * reviews can be returned.
    * 
* * repeated .google.maps.places.v1.Review reviews = 53; @@ -690,7 +694,8 @@ com.google.maps.places.v1.Place.AddressComponentOrBuilder getAddressComponentsOr * * *
-   * List of reviews about this place, sorted by relevance.
+   * List of reviews about this place, sorted by relevance. A maximum of 5
+   * reviews can be returned.
    * 
* * repeated .google.maps.places.v1.Review reviews = 53; @@ -765,7 +770,8 @@ com.google.maps.places.v1.Place.AddressComponentOrBuilder getAddressComponentsOr * * *
-   * Information (including references) about photos of this place.
+   * Information (including references) about photos of this place. A maximum of
+   * 10 photos can be returned.
    * 
* * repeated .google.maps.places.v1.Photo photos = 54; @@ -775,7 +781,8 @@ com.google.maps.places.v1.Place.AddressComponentOrBuilder getAddressComponentsOr * * *
-   * Information (including references) about photos of this place.
+   * Information (including references) about photos of this place. A maximum of
+   * 10 photos can be returned.
    * 
* * repeated .google.maps.places.v1.Photo photos = 54; @@ -785,7 +792,8 @@ com.google.maps.places.v1.Place.AddressComponentOrBuilder getAddressComponentsOr * * *
-   * Information (including references) about photos of this place.
+   * Information (including references) about photos of this place. A maximum of
+   * 10 photos can be returned.
    * 
* * repeated .google.maps.places.v1.Photo photos = 54; @@ -795,7 +803,8 @@ com.google.maps.places.v1.Place.AddressComponentOrBuilder getAddressComponentsOr * * *
-   * Information (including references) about photos of this place.
+   * Information (including references) about photos of this place. A maximum of
+   * 10 photos can be returned.
    * 
* * repeated .google.maps.places.v1.Photo photos = 54; @@ -805,7 +814,8 @@ com.google.maps.places.v1.Place.AddressComponentOrBuilder getAddressComponentsOr * * *
-   * Information (including references) about photos of this place.
+   * Information (including references) about photos of this place. A maximum of
+   * 10 photos can be returned.
    * 
* * repeated .google.maps.places.v1.Photo photos = 54; diff --git a/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/PriceLevel.java b/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/PriceLevel.java index 39b72d47f934..83a3f2de5e10 100644 --- a/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/PriceLevel.java +++ b/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/PriceLevel.java @@ -83,7 +83,7 @@ public enum PriceLevel implements com.google.protobuf.ProtocolMessageEnum { * * *
-   * Place provides very expensive service s.
+   * Place provides very expensive services.
    * 
* * PRICE_LEVEL_VERY_EXPENSIVE = 5; @@ -146,7 +146,7 @@ public enum PriceLevel implements com.google.protobuf.ProtocolMessageEnum { * * *
-   * Place provides very expensive service s.
+   * Place provides very expensive services.
    * 
* * PRICE_LEVEL_VERY_EXPENSIVE = 5; diff --git a/java-maps-places/proto-google-maps-places-v1/src/main/proto/google/maps/places/v1/place.proto b/java-maps-places/proto-google-maps-places-v1/src/main/proto/google/maps/places/v1/place.proto index d8886dd32073..7afb4a7d43f1 100644 --- a/java-maps-places/proto-google-maps-places-v1/src/main/proto/google/maps/places/v1/place.proto +++ b/java-maps-places/proto-google-maps-places-v1/src/main/proto/google/maps/places/v1/place.proto @@ -295,8 +295,8 @@ message Place { google.type.LocalizedText display_name = 31; // A set of type tags for this result. For example, "political" and - // "locality". For the complete list of possible values, see Table A and - // Table B at + // "locality". For the complete list of possible values, see Table A and Table + // B at // https://developers.google.com/maps/documentation/places/web-service/place-types repeated string types = 5; @@ -308,8 +308,8 @@ message Place { string primary_type = 50; // The display name of the primary type, localized to the request language if - // applicable. For the complete list of possible values, see Table A and - // Table B at + // applicable. For the complete list of possible values, see Table A and Table + // B at // https://developers.google.com/maps/documentation/places/web-service/place-types google.type.LocalizedText primary_type_display_name = 32; @@ -362,7 +362,8 @@ message Place { // chain. string website_uri = 16; - // List of reviews about this place, sorted by relevance. + // List of reviews about this place, sorted by relevance. A maximum of 5 + // reviews can be returned. repeated Review reviews = 53; // The regular hours of operation. @@ -373,7 +374,8 @@ message Place { // fractions of an hour, e.g. X hours and 15 minutes. optional int32 utc_offset_minutes = 22; - // Information (including references) about photos of this place. + // Information (including references) about photos of this place. A maximum of + // 10 photos can be returned. repeated Photo photos = 54; // The place's address in adr microformat: http://microformats.org/wiki/adr. @@ -534,6 +536,6 @@ enum PriceLevel { // Place provides expensive services. PRICE_LEVEL_EXPENSIVE = 4; - // Place provides very expensive service s. + // Place provides very expensive services. PRICE_LEVEL_VERY_EXPENSIVE = 5; } diff --git a/java-maps-places/proto-google-maps-places-v1/src/main/proto/google/maps/places/v1/places_service.proto b/java-maps-places/proto-google-maps-places-v1/src/main/proto/google/maps/places/v1/places_service.proto index aec74fd87caf..37b2f6f62d39 100644 --- a/java-maps-places/proto-google-maps-places-v1/src/main/proto/google/maps/places/v1/places_service.proto +++ b/java-maps-places/proto-google-maps-places-v1/src/main/proto/google/maps/places/v1/places_service.proto @@ -36,11 +36,10 @@ option objc_class_prefix = "GMPSV1"; option php_namespace = "Google\\Maps\\Places\\V1"; // Service definition for the Places API. -// Note: every request actually requires a field mask set outside of -// the request proto (all/'*', is not assumed). That can be set via either a -// side channel (SystemParameterContext) over RPC, or a header -// (X-Goog-FieldMask) over HTTP. See: -// https://cloud.google.com/apis/docs/system-parameters +// Note: every request (except for Autocomplete requests) requires a field mask +// set outside of the request proto (`all/*`, is not assumed). The field mask +// can be set via the HTTP header `X-Goog-FieldMask`. See: +// https://developers.google.com/maps/documentation/places/web-service/choose-fields service Places { option (google.api.default_host) = "places.googleapis.com"; @@ -465,21 +464,23 @@ message GetPlaceRequest { // Note that 3-digit region codes are not currently supported. string region_code = 3 [(google.api.field_behavior) = OPTIONAL]; - // Optional. An arbitrary string which identifies an autocomplete session for - // billing purposes. Must be at most 36 characters in length. Otherwise an - // INVALID_ARGUMENT error is returned. + // Optional. A string which identifies an Autocomplete session for billing + // purposes. Must be a URL and filename safe base64 string with at most 36 + // ASCII characters in length. Otherwise an INVALID_ARGUMENT error is + // returned. // // The session begins when the user starts typing a query, and concludes when // they select a place and a call to Place Details or Address Validation is - // made. Each session can have multiple queries, followed by one Place - // selection. The credentials used for each request within a session must - // belong to the same Google Cloud Console project. Once a session has - // concluded, the token is no longer valid; your app must generate a fresh - // token for each session. If the `session_token` parameter is omitted, or if - // you reuse a session token, the session is charged as if no session token - // was provided (each request is billed separately). + // made. Each session can have multiple queries, followed by one Place Details + // or Address Validation request. The credentials used for each request within + // a session must belong to the same Google Cloud Console project. Once a + // session has concluded, the token is no longer valid; your app must generate + // a fresh token for each session. If the `session_token` parameter is + // omitted, or if you reuse a session token, the session is charged as if no + // session token was provided (each request is billed separately). // // We recommend the following guidelines: + // // * Use session tokens for all Place Autocomplete calls. // * Generate a fresh token for each session. Using a version 4 UUID is // recommended. @@ -538,8 +539,8 @@ message AutocompletePlacesRequest { LocationRestriction location_restriction = 3 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Included primary Place type (e.g. "restaurant" or "gas_station") - // from + // Optional. Included primary Place type (for example, "restaurant" or + // "gas_station") from // https://developers.google.com/maps/documentation/places/web-service/place-types. // A Place is only returned if its primary type is included in this list. Up // to 5 values can be specified. If no types are specified, all Place types @@ -582,21 +583,23 @@ message AutocompletePlacesRequest { // predictions. Otherwise the response will only return Place predictions. bool include_query_predictions = 10 [(google.api.field_behavior) = OPTIONAL]; - // Optional. An arbitrary string which identifies an autocomplete session for - // billing purposes. Must be at most 36 characters in length. Otherwise an - // INVALID_ARGUMENT error is returned. + // Optional. A string which identifies an Autocomplete session for billing + // purposes. Must be a URL and filename safe base64 string with at most 36 + // ASCII characters in length. Otherwise an INVALID_ARGUMENT error is + // returned. // // The session begins when the user starts typing a query, and concludes when // they select a place and a call to Place Details or Address Validation is - // made. Each session can have multiple queries, followed by one Place - // selection. The credentials used for each request within a session must - // belong to the same Google Cloud Console project. Once a session has - // concluded, the token is no longer valid; your app must generate a fresh - // token for each session. If the `session_token` parameter is omitted, or if - // you reuse a session token, the session is charged as if no session token - // was provided (each request is billed separately). + // made. Each session can have multiple queries, followed by one Place Details + // or Address Validation request. The credentials used for each request within + // a session must belong to the same Google Cloud Console project. Once a + // session has concluded, the token is no longer valid; your app must generate + // a fresh token for each session. If the `session_token` parameter is + // omitted, or if you reuse a session token, the session is charged as if no + // session token was provided (each request is billed separately). // // We recommend the following guidelines: + // // * Use session tokens for all Place Autocomplete calls. // * Generate a fresh token for each session. Using a version 4 UUID is // recommended. @@ -632,7 +635,7 @@ message AutocompletePlacesResponse { // A list of string ranges identifying where the input request matched in // `text`. The ranges can be used to format specific parts of `text`. The // substrings may not be exact matches of `input` if the matching was - // determined by criteria other than string matching (e.g. spell + // determined by criteria other than string matching (for example, spell // corrections or transliterations). // // These values are Unicode character offsets of `text`. The ranges are @@ -713,7 +716,8 @@ message AutocompletePlacesResponse { // Prediction results for a Query Autocomplete prediction. message QueryPrediction { // The predicted text. This text does not represent a Place, but rather a - // text query that could be used in a search endpoint (e.g. TextSearch). + // text query that could be used in a search endpoint (for example, + // Text Search). // // `text` is recommended for developers who wish to show a single UI // element. Developers who wish to show two separate, but related, UI diff --git a/java-maps-routing/README.md b/java-maps-routing/README.md index 315016e88899..7f44ead078f2 100644 --- a/java-maps-routing/README.md +++ b/java-maps-routing/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.34.0 + 26.37.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.maps/google-maps-routing.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.maps/google-maps-routing/1.23.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.maps/google-maps-routing/1.26.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-mediatranslation/README.md b/java-mediatranslation/README.md index a81e30cefc9a..a7a0badc691d 100644 --- a/java-mediatranslation/README.md +++ b/java-mediatranslation/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -201,7 +201,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-mediatranslation.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-mediatranslation/0.44.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-mediatranslation/0.47.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-meet/README.md b/java-meet/README.md index cb8451133266..45eb80081086 100644 --- a/java-meet/README.md +++ b/java-meet/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -201,7 +201,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-meet.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-meet/0.5.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-meet/0.8.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-memcache/README.md b/java-memcache/README.md index 0d97223d8001..4e2a8ee1e56b 100644 --- a/java-memcache/README.md +++ b/java-memcache/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.34.0 + 26.37.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-memcache.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-memcache/2.38.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-memcache/2.41.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-migrationcenter/README.md b/java-migrationcenter/README.md index 9166692f8da2..a808c0c09610 100644 --- a/java-migrationcenter/README.md +++ b/java-migrationcenter/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -201,7 +201,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-migrationcenter.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-migrationcenter/0.20.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-migrationcenter/0.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-monitoring-dashboards/README.md b/java-monitoring-dashboards/README.md index 0ded9e922809..7ca441ea7bee 100644 --- a/java-monitoring-dashboards/README.md +++ b/java-monitoring-dashboards/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.34.0 + 26.37.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-monitoring-dashboard.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-monitoring-dashboard/2.40.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-monitoring-dashboard/2.43.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-monitoring-metricsscope/README.md b/java-monitoring-metricsscope/README.md index 2c4901c9f23b..05f363d99306 100644 --- a/java-monitoring-metricsscope/README.md +++ b/java-monitoring-metricsscope/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -201,7 +201,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-monitoring-metricsscope.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-monitoring-metricsscope/0.32.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-monitoring-metricsscope/0.35.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-monitoring/README.md b/java-monitoring/README.md index 41e3b742a9d9..ae21feffefb1 100644 --- a/java-monitoring/README.md +++ b/java-monitoring/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.34.0 + 26.37.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-monitoring.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-monitoring/3.39.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-monitoring/3.42.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-netapp/README.md b/java-netapp/README.md index 4a1b461d9fc3..78384f5bdff1 100644 --- a/java-netapp/README.md +++ b/java-netapp/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -201,7 +201,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-netapp.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-netapp/0.17.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-netapp/0.20.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-network-management/README.md b/java-network-management/README.md index cdfc46222e7f..eab53d4433e4 100644 --- a/java-network-management/README.md +++ b/java-network-management/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.34.0 + 26.37.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-network-management.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-network-management/1.39.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-network-management/1.42.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-network-management/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/FirewallInfo.java b/java-network-management/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/FirewallInfo.java index b9844a188482..2d2b66d66744 100644 --- a/java-network-management/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/FirewallInfo.java +++ b/java-network-management/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/FirewallInfo.java @@ -568,7 +568,7 @@ public com.google.protobuf.ByteString getDirectionBytes() { * * *
-   * Possible values: ALLOW, DENY
+   * Possible values: ALLOW, DENY, APPLY_SECURITY_PROFILE_GROUP
    * 
* * string action = 4; @@ -591,7 +591,7 @@ public java.lang.String getAction() { * * *
-   * Possible values: ALLOW, DENY
+   * Possible values: ALLOW, DENY, APPLY_SECURITY_PROFILE_GROUP
    * 
* * string action = 4; @@ -1830,7 +1830,7 @@ public Builder setDirectionBytes(com.google.protobuf.ByteString value) { * * *
-     * Possible values: ALLOW, DENY
+     * Possible values: ALLOW, DENY, APPLY_SECURITY_PROFILE_GROUP
      * 
* * string action = 4; @@ -1852,7 +1852,7 @@ public java.lang.String getAction() { * * *
-     * Possible values: ALLOW, DENY
+     * Possible values: ALLOW, DENY, APPLY_SECURITY_PROFILE_GROUP
      * 
* * string action = 4; @@ -1874,7 +1874,7 @@ public com.google.protobuf.ByteString getActionBytes() { * * *
-     * Possible values: ALLOW, DENY
+     * Possible values: ALLOW, DENY, APPLY_SECURITY_PROFILE_GROUP
      * 
* * string action = 4; @@ -1895,7 +1895,7 @@ public Builder setAction(java.lang.String value) { * * *
-     * Possible values: ALLOW, DENY
+     * Possible values: ALLOW, DENY, APPLY_SECURITY_PROFILE_GROUP
      * 
* * string action = 4; @@ -1912,7 +1912,7 @@ public Builder clearAction() { * * *
-     * Possible values: ALLOW, DENY
+     * Possible values: ALLOW, DENY, APPLY_SECURITY_PROFILE_GROUP
      * 
* * string action = 4; diff --git a/java-network-management/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/FirewallInfoOrBuilder.java b/java-network-management/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/FirewallInfoOrBuilder.java index 18d5a263e8fa..117b12cc255e 100644 --- a/java-network-management/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/FirewallInfoOrBuilder.java +++ b/java-network-management/proto-google-cloud-network-management-v1/src/main/java/com/google/cloud/networkmanagement/v1/FirewallInfoOrBuilder.java @@ -107,7 +107,7 @@ public interface FirewallInfoOrBuilder * * *
-   * Possible values: ALLOW, DENY
+   * Possible values: ALLOW, DENY, APPLY_SECURITY_PROFILE_GROUP
    * 
* * string action = 4; @@ -119,7 +119,7 @@ public interface FirewallInfoOrBuilder * * *
-   * Possible values: ALLOW, DENY
+   * Possible values: ALLOW, DENY, APPLY_SECURITY_PROFILE_GROUP
    * 
* * string action = 4; diff --git a/java-network-management/proto-google-cloud-network-management-v1/src/main/proto/google/cloud/networkmanagement/v1/trace.proto b/java-network-management/proto-google-cloud-network-management-v1/src/main/proto/google/cloud/networkmanagement/v1/trace.proto index 5594aad7cbe1..81a45b154590 100644 --- a/java-network-management/proto-google-cloud-network-management-v1/src/main/proto/google/cloud/networkmanagement/v1/trace.proto +++ b/java-network-management/proto-google-cloud-network-management-v1/src/main/proto/google/cloud/networkmanagement/v1/trace.proto @@ -375,7 +375,7 @@ message FirewallInfo { // Possible values: INGRESS, EGRESS string direction = 3; - // Possible values: ALLOW, DENY + // Possible values: ALLOW, DENY, APPLY_SECURITY_PROFILE_GROUP string action = 4; // The priority of the firewall rule. diff --git a/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/FirewallInfo.java b/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/FirewallInfo.java index 1e9aa8d0763d..d8b5f96b46c7 100644 --- a/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/FirewallInfo.java +++ b/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/FirewallInfo.java @@ -568,7 +568,7 @@ public com.google.protobuf.ByteString getDirectionBytes() { * * *
-   * Possible values: ALLOW, DENY
+   * Possible values: ALLOW, DENY, APPLY_SECURITY_PROFILE_GROUP
    * 
* * string action = 4; @@ -591,7 +591,7 @@ public java.lang.String getAction() { * * *
-   * Possible values: ALLOW, DENY
+   * Possible values: ALLOW, DENY, APPLY_SECURITY_PROFILE_GROUP
    * 
* * string action = 4; @@ -1834,7 +1834,7 @@ public Builder setDirectionBytes(com.google.protobuf.ByteString value) { * * *
-     * Possible values: ALLOW, DENY
+     * Possible values: ALLOW, DENY, APPLY_SECURITY_PROFILE_GROUP
      * 
* * string action = 4; @@ -1856,7 +1856,7 @@ public java.lang.String getAction() { * * *
-     * Possible values: ALLOW, DENY
+     * Possible values: ALLOW, DENY, APPLY_SECURITY_PROFILE_GROUP
      * 
* * string action = 4; @@ -1878,7 +1878,7 @@ public com.google.protobuf.ByteString getActionBytes() { * * *
-     * Possible values: ALLOW, DENY
+     * Possible values: ALLOW, DENY, APPLY_SECURITY_PROFILE_GROUP
      * 
* * string action = 4; @@ -1899,7 +1899,7 @@ public Builder setAction(java.lang.String value) { * * *
-     * Possible values: ALLOW, DENY
+     * Possible values: ALLOW, DENY, APPLY_SECURITY_PROFILE_GROUP
      * 
* * string action = 4; @@ -1916,7 +1916,7 @@ public Builder clearAction() { * * *
-     * Possible values: ALLOW, DENY
+     * Possible values: ALLOW, DENY, APPLY_SECURITY_PROFILE_GROUP
      * 
* * string action = 4; diff --git a/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/FirewallInfoOrBuilder.java b/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/FirewallInfoOrBuilder.java index a45c135144ea..4c6f47a16b73 100644 --- a/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/FirewallInfoOrBuilder.java +++ b/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/FirewallInfoOrBuilder.java @@ -107,7 +107,7 @@ public interface FirewallInfoOrBuilder * * *
-   * Possible values: ALLOW, DENY
+   * Possible values: ALLOW, DENY, APPLY_SECURITY_PROFILE_GROUP
    * 
* * string action = 4; @@ -119,7 +119,7 @@ public interface FirewallInfoOrBuilder * * *
-   * Possible values: ALLOW, DENY
+   * Possible values: ALLOW, DENY, APPLY_SECURITY_PROFILE_GROUP
    * 
* * string action = 4; diff --git a/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/proto/google/cloud/networkmanagement/v1beta1/trace.proto b/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/proto/google/cloud/networkmanagement/v1beta1/trace.proto index 88a33a19d36c..a7f8091a7517 100644 --- a/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/proto/google/cloud/networkmanagement/v1beta1/trace.proto +++ b/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/proto/google/cloud/networkmanagement/v1beta1/trace.proto @@ -379,7 +379,7 @@ message FirewallInfo { // Possible values: INGRESS, EGRESS string direction = 3; - // Possible values: ALLOW, DENY + // Possible values: ALLOW, DENY, APPLY_SECURITY_PROFILE_GROUP string action = 4; // The priority of the firewall rule. diff --git a/java-network-security/README.md b/java-network-security/README.md index babd7e5adfb2..61b67025e651 100644 --- a/java-network-security/README.md +++ b/java-network-security/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -201,7 +201,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-network-security.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-network-security/0.41.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-network-security/0.44.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-networkconnectivity/README.md b/java-networkconnectivity/README.md index 5809d1546bdb..a21c77c05daa 100644 --- a/java-networkconnectivity/README.md +++ b/java-networkconnectivity/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.34.0 + 26.37.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-networkconnectivity.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-networkconnectivity/1.37.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-networkconnectivity/1.40.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-notebooks/README.md b/java-notebooks/README.md index af4cb229b80d..39343e97fa34 100644 --- a/java-notebooks/README.md +++ b/java-notebooks/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.34.0 + 26.37.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-notebooks.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-notebooks/1.36.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-notebooks/1.39.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-optimization/README.md b/java-optimization/README.md index 15985ad678ab..365d9c2a36ef 100644 --- a/java-optimization/README.md +++ b/java-optimization/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.34.0 + 26.37.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-optimization.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-optimization/1.36.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-optimization/1.39.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-orchestration-airflow/README.md b/java-orchestration-airflow/README.md index 7df456cc5403..bd454c8ccac6 100644 --- a/java-orchestration-airflow/README.md +++ b/java-orchestration-airflow/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.34.0 + 26.37.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-orchestration-airflow.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-orchestration-airflow/1.38.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-orchestration-airflow/1.41.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-orgpolicy/README.md b/java-orgpolicy/README.md index 11a49201a393..ae2c531055c0 100644 --- a/java-orgpolicy/README.md +++ b/java-orgpolicy/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.34.0 + 26.37.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-orgpolicy.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-orgpolicy/2.38.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-orgpolicy/2.41.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-os-config/README.md b/java-os-config/README.md index 0ac733597511..eb196771c028 100644 --- a/java-os-config/README.md +++ b/java-os-config/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.34.0 + 26.37.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-os-config.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-os-config/2.40.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-os-config/2.43.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-os-login/README.md b/java-os-login/README.md index 701155f35db9..98f29991addb 100644 --- a/java-os-login/README.md +++ b/java-os-login/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.34.0 + 26.37.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-os-login.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-os-login/2.37.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-os-login/2.40.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-parallelstore/README.md b/java-parallelstore/README.md index e80bd775c67d..c83142f79194 100644 --- a/java-parallelstore/README.md +++ b/java-parallelstore/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -201,7 +201,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-parallelstore.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-parallelstore/0.1.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-parallelstore/0.4.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-phishingprotection/README.md b/java-phishingprotection/README.md index 3577bd32131c..4dce3eea531c 100644 --- a/java-phishingprotection/README.md +++ b/java-phishingprotection/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -201,7 +201,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-phishingprotection.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-phishingprotection/0.69.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-phishingprotection/0.72.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-policy-troubleshooter/README.md b/java-policy-troubleshooter/README.md index 588e844456ea..890b180a72bb 100644 --- a/java-policy-troubleshooter/README.md +++ b/java-policy-troubleshooter/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.34.0 + 26.37.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-policy-troubleshooter.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-policy-troubleshooter/1.37.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-policy-troubleshooter/1.40.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-policysimulator/README.md b/java-policysimulator/README.md index 2afc1d02a886..7cfc1fb74fac 100644 --- a/java-policysimulator/README.md +++ b/java-policysimulator/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -201,7 +201,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-policysimulator.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-policysimulator/0.17.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-policysimulator/0.20.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-private-catalog/README.md b/java-private-catalog/README.md index e2e368ce7be2..f6c46b9208dd 100644 --- a/java-private-catalog/README.md +++ b/java-private-catalog/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -201,7 +201,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-private-catalog.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-private-catalog/0.40.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-private-catalog/0.43.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-profiler/README.md b/java-profiler/README.md index 6866a58eadcf..b09100770c08 100644 --- a/java-profiler/README.md +++ b/java-profiler/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.34.0 + 26.37.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-profiler.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-profiler/2.38.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-profiler/2.41.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-publicca/README.md b/java-publicca/README.md index 51da4af0a6b9..0a004cf7b986 100644 --- a/java-publicca/README.md +++ b/java-publicca/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -201,7 +201,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-publicca.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-publicca/0.35.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-publicca/0.38.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-rapidmigrationassessment/README.md b/java-rapidmigrationassessment/README.md index 769a43be51d6..25054cf7a82f 100644 --- a/java-rapidmigrationassessment/README.md +++ b/java-rapidmigrationassessment/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -201,7 +201,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-rapidmigrationassessment.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-rapidmigrationassessment/0.21.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-rapidmigrationassessment/0.24.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-recaptchaenterprise/README.md b/java-recaptchaenterprise/README.md index b7f7f57b6b32..64f6c8ca05d2 100644 --- a/java-recaptchaenterprise/README.md +++ b/java-recaptchaenterprise/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.34.0 + 26.37.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-recaptchaenterprise.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-recaptchaenterprise/3.35.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-recaptchaenterprise/3.38.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-recommendations-ai/README.md b/java-recommendations-ai/README.md index d1a5404d867d..06c0f0e981a5 100644 --- a/java-recommendations-ai/README.md +++ b/java-recommendations-ai/README.md @@ -24,7 +24,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -202,7 +202,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-recommendations-ai.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-recommendations-ai/0.45.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-recommendations-ai/0.48.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-recommender/README.md b/java-recommender/README.md index 3aa89da1f24b..9ce6413e4928 100644 --- a/java-recommender/README.md +++ b/java-recommender/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.34.0 + 26.37.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-recommender.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-recommender/2.40.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-recommender/2.43.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-redis-cluster/README.md b/java-redis-cluster/README.md index 0e71310b470a..0ab80877c19b 100644 --- a/java-redis-cluster/README.md +++ b/java-redis-cluster/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -201,7 +201,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-redis-cluster.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-redis-cluster/0.10.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-redis-cluster/0.13.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-redis/README.md b/java-redis/README.md index cb4acb62ffe5..48ecd2405fbf 100644 --- a/java-redis/README.md +++ b/java-redis/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.34.0 + 26.37.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-redis.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-redis/2.41.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-redis/2.44.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-resource-settings/README.md b/java-resource-settings/README.md index 88629b163e8a..4e6bdf0d3464 100644 --- a/java-resource-settings/README.md +++ b/java-resource-settings/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.34.0 + 26.37.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-resource-settings.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-resource-settings/1.38.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-resource-settings/1.41.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-resourcemanager/README.md b/java-resourcemanager/README.md index e345776f4463..405a0e95a083 100644 --- a/java-resourcemanager/README.md +++ b/java-resourcemanager/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.34.0 + 26.37.0 pom import @@ -336,7 +336,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-resourcemanager.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-resourcemanager/1.40.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-resourcemanager/1.43.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-retail/README.md b/java-retail/README.md index bbc7bf63f978..307681c412b1 100644 --- a/java-retail/README.md +++ b/java-retail/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.34.0 + 26.37.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-retail.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-retail/2.40.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-retail/2.43.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-run/README.md b/java-run/README.md index a10252f28392..9aaf10a1d322 100644 --- a/java-run/README.md +++ b/java-run/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -201,7 +201,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-run.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-run/0.38.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-run/0.41.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-scheduler/README.md b/java-scheduler/README.md index b55a255b971f..b73dea8f1d09 100644 --- a/java-scheduler/README.md +++ b/java-scheduler/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.34.0 + 26.37.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-scheduler.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-scheduler/2.38.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-scheduler/2.41.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-secretmanager/README.md b/java-secretmanager/README.md index 969a537826e1..ba848db5a833 100644 --- a/java-secretmanager/README.md +++ b/java-secretmanager/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.34.0 + 26.37.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-secretmanager.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-secretmanager/2.38.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-secretmanager/2.41.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-securesourcemanager/README.md b/java-securesourcemanager/README.md index 78e37afe5d63..e69c555382ec 100644 --- a/java-securesourcemanager/README.md +++ b/java-securesourcemanager/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -202,7 +202,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-securesourcemanager.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-securesourcemanager/0.8.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-securesourcemanager/0.11.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-security-private-ca/README.md b/java-security-private-ca/README.md index f1091822c193..788f690068f3 100644 --- a/java-security-private-ca/README.md +++ b/java-security-private-ca/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.34.0 + 26.37.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-security-private-ca.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-security-private-ca/2.40.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-security-private-ca/2.43.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-security-private-ca/google-cloud-security-private-ca/src/main/java/com/google/cloud/security/privateca/v1/CertificateAuthorityServiceClient.java b/java-security-private-ca/google-cloud-security-private-ca/src/main/java/com/google/cloud/security/privateca/v1/CertificateAuthorityServiceClient.java index ab17ba9c707e..d04818f83472 100644 --- a/java-security-private-ca/google-cloud-security-private-ca/src/main/java/com/google/cloud/security/privateca/v1/CertificateAuthorityServiceClient.java +++ b/java-security-private-ca/google-cloud-security-private-ca/src/main/java/com/google/cloud/security/privateca/v1/CertificateAuthorityServiceClient.java @@ -476,7 +476,7 @@ * * *

FetchCaCerts - *

FetchCaCerts returns the current trust anchor for the [CaPool][google.cloud.security.privateca.v1.CaPool]. This will include CA certificate chains for all Certificate Authorities in the ENABLED, DISABLED, or STAGED states. + *

FetchCaCerts returns the current trust anchor for the [CaPool][google.cloud.security.privateca.v1.CaPool]. This will include CA certificate chains for all certificate authorities in the ENABLED, DISABLED, or STAGED states. * *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    @@ -4122,7 +4122,7 @@ public final UnaryCallable deleteCaPoolCallable( /** * FetchCaCerts returns the current trust anchor for the * [CaPool][google.cloud.security.privateca.v1.CaPool]. This will include CA certificate chains - * for all Certificate Authorities in the ENABLED, DISABLED, or STAGED states. + * for all certificate authorities in the ENABLED, DISABLED, or STAGED states. * *

    Sample code: * @@ -4156,7 +4156,7 @@ public final FetchCaCertsResponse fetchCaCerts(CaPoolName caPool) { /** * FetchCaCerts returns the current trust anchor for the * [CaPool][google.cloud.security.privateca.v1.CaPool]. This will include CA certificate chains - * for all Certificate Authorities in the ENABLED, DISABLED, or STAGED states. + * for all certificate authorities in the ENABLED, DISABLED, or STAGED states. * *

    Sample code: * @@ -4187,7 +4187,7 @@ public final FetchCaCertsResponse fetchCaCerts(String caPool) { /** * FetchCaCerts returns the current trust anchor for the * [CaPool][google.cloud.security.privateca.v1.CaPool]. This will include CA certificate chains - * for all Certificate Authorities in the ENABLED, DISABLED, or STAGED states. + * for all certificate authorities in the ENABLED, DISABLED, or STAGED states. * *

    Sample code: * @@ -4219,7 +4219,7 @@ public final FetchCaCertsResponse fetchCaCerts(FetchCaCertsRequest request) { /** * FetchCaCerts returns the current trust anchor for the * [CaPool][google.cloud.security.privateca.v1.CaPool]. This will include CA certificate chains - * for all Certificate Authorities in the ENABLED, DISABLED, or STAGED states. + * for all certificate authorities in the ENABLED, DISABLED, or STAGED states. * *

    Sample code: * diff --git a/java-security-private-ca/google-cloud-security-private-ca/src/main/resources/META-INF/native-image/com.google.cloud.security.privateca.v1/reflect-config.json b/java-security-private-ca/google-cloud-security-private-ca/src/main/resources/META-INF/native-image/com.google.cloud.security.privateca.v1/reflect-config.json index dc646eae012e..ed1ff9850093 100644 --- a/java-security-private-ca/google-cloud-security-private-ca/src/main/resources/META-INF/native-image/com.google.cloud.security.privateca.v1/reflect-config.json +++ b/java-security-private-ca/google-cloud-security-private-ca/src/main/resources/META-INF/native-image/com.google.cloud.security.privateca.v1/reflect-config.json @@ -602,6 +602,15 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.security.privateca.v1.CaPool$PublishingOptions$EncodingFormat", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.security.privateca.v1.CaPool$Tier", "queryAllDeclaredConstructors": true, diff --git a/java-security-private-ca/grpc-google-cloud-security-private-ca-v1/src/main/java/com/google/cloud/security/privateca/v1/CertificateAuthorityServiceGrpc.java b/java-security-private-ca/grpc-google-cloud-security-private-ca-v1/src/main/java/com/google/cloud/security/privateca/v1/CertificateAuthorityServiceGrpc.java index 45161e2f4196..9d3dd9845f3b 100644 --- a/java-security-private-ca/grpc-google-cloud-security-private-ca-v1/src/main/java/com/google/cloud/security/privateca/v1/CertificateAuthorityServiceGrpc.java +++ b/java-security-private-ca/grpc-google-cloud-security-private-ca-v1/src/main/java/com/google/cloud/security/privateca/v1/CertificateAuthorityServiceGrpc.java @@ -1910,7 +1910,7 @@ default void deleteCaPool( *

          * FetchCaCerts returns the current trust anchor for the
          * [CaPool][google.cloud.security.privateca.v1.CaPool]. This will include CA
    -     * certificate chains for all Certificate Authorities in the ENABLED,
    +     * certificate chains for all certificate authorities in the ENABLED,
          * DISABLED, or STAGED states.
          * 
    */ @@ -2460,7 +2460,7 @@ public void deleteCaPool( *
          * FetchCaCerts returns the current trust anchor for the
          * [CaPool][google.cloud.security.privateca.v1.CaPool]. This will include CA
    -     * certificate chains for all Certificate Authorities in the ENABLED,
    +     * certificate chains for all certificate authorities in the ENABLED,
          * DISABLED, or STAGED states.
          * 
    */ @@ -2942,7 +2942,7 @@ public com.google.longrunning.Operation deleteCaPool( *
          * FetchCaCerts returns the current trust anchor for the
          * [CaPool][google.cloud.security.privateca.v1.CaPool]. This will include CA
    -     * certificate chains for all Certificate Authorities in the ENABLED,
    +     * certificate chains for all certificate authorities in the ENABLED,
          * DISABLED, or STAGED states.
          * 
    */ @@ -3411,7 +3411,7 @@ protected CertificateAuthorityServiceFutureStub build( *
          * FetchCaCerts returns the current trust anchor for the
          * [CaPool][google.cloud.security.privateca.v1.CaPool]. This will include CA
    -     * certificate chains for all Certificate Authorities in the ENABLED,
    +     * certificate chains for all certificate authorities in the ENABLED,
          * DISABLED, or STAGED states.
          * 
    */ diff --git a/java-security-private-ca/proto-google-cloud-security-private-ca-v1/src/main/java/com/google/cloud/security/privateca/v1/CaPool.java b/java-security-private-ca/proto-google-cloud-security-private-ca-v1/src/main/java/com/google/cloud/security/privateca/v1/CaPool.java index 7fb987190035..b79c06293a08 100644 --- a/java-security-private-ca/proto-google-cloud-security-private-ca-v1/src/main/java/com/google/cloud/security/privateca/v1/CaPool.java +++ b/java-security-private-ca/proto-google-cloud-security-private-ca-v1/src/main/java/com/google/cloud/security/privateca/v1/CaPool.java @@ -284,6 +284,42 @@ public interface PublishingOptionsOrBuilder * @return The publishCrl. */ boolean getPublishCrl(); + + /** + * + * + *
    +     * Optional. Specifies the encoding format of each
    +     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
    +     * resource's CA certificate and CRLs. If this is omitted, CA certificates
    +     * and CRLs will be published in PEM.
    +     * 
    + * + * + * .google.cloud.security.privateca.v1.CaPool.PublishingOptions.EncodingFormat encoding_format = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for encodingFormat. + */ + int getEncodingFormatValue(); + /** + * + * + *
    +     * Optional. Specifies the encoding format of each
    +     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
    +     * resource's CA certificate and CRLs. If this is omitted, CA certificates
    +     * and CRLs will be published in PEM.
    +     * 
    + * + * + * .google.cloud.security.privateca.v1.CaPool.PublishingOptions.EncodingFormat encoding_format = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The encodingFormat. + */ + com.google.cloud.security.privateca.v1.CaPool.PublishingOptions.EncodingFormat + getEncodingFormat(); } /** * @@ -310,7 +346,9 @@ private PublishingOptions(com.google.protobuf.GeneratedMessageV3.Builder buil super(builder); } - private PublishingOptions() {} + private PublishingOptions() { + encodingFormat_ = 0; + } @java.lang.Override @SuppressWarnings({"unused"}) @@ -333,6 +371,176 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.cloud.security.privateca.v1.CaPool.PublishingOptions.Builder.class); } + /** + * + * + *
    +     * Supported encoding formats for publishing.
    +     * 
    + * + * Protobuf enum {@code + * google.cloud.security.privateca.v1.CaPool.PublishingOptions.EncodingFormat} + */ + public enum EncodingFormat implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
    +       * Not specified. By default, PEM format will be used.
    +       * 
    + * + * ENCODING_FORMAT_UNSPECIFIED = 0; + */ + ENCODING_FORMAT_UNSPECIFIED(0), + /** + * + * + *
    +       * The
    +       * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
    +       * CA certificate and CRLs will be published in PEM format.
    +       * 
    + * + * PEM = 1; + */ + PEM(1), + /** + * + * + *
    +       * The
    +       * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
    +       * CA certificate and CRLs will be published in DER format.
    +       * 
    + * + * DER = 2; + */ + DER(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
    +       * Not specified. By default, PEM format will be used.
    +       * 
    + * + * ENCODING_FORMAT_UNSPECIFIED = 0; + */ + public static final int ENCODING_FORMAT_UNSPECIFIED_VALUE = 0; + /** + * + * + *
    +       * The
    +       * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
    +       * CA certificate and CRLs will be published in PEM format.
    +       * 
    + * + * PEM = 1; + */ + public static final int PEM_VALUE = 1; + /** + * + * + *
    +       * The
    +       * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
    +       * CA certificate and CRLs will be published in DER format.
    +       * 
    + * + * DER = 2; + */ + public static final int DER_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static EncodingFormat valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static EncodingFormat forNumber(int value) { + switch (value) { + case 0: + return ENCODING_FORMAT_UNSPECIFIED; + case 1: + return PEM; + case 2: + return DER; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public EncodingFormat findValueByNumber(int number) { + return EncodingFormat.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.security.privateca.v1.CaPool.PublishingOptions.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final EncodingFormat[] VALUES = values(); + + public static EncodingFormat valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private EncodingFormat(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.security.privateca.v1.CaPool.PublishingOptions.EncodingFormat) + } + public static final int PUBLISH_CA_CERT_FIELD_NUMBER = 1; private boolean publishCaCert_ = false; /** @@ -383,6 +591,56 @@ public boolean getPublishCrl() { return publishCrl_; } + public static final int ENCODING_FORMAT_FIELD_NUMBER = 3; + private int encodingFormat_ = 0; + /** + * + * + *
    +     * Optional. Specifies the encoding format of each
    +     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
    +     * resource's CA certificate and CRLs. If this is omitted, CA certificates
    +     * and CRLs will be published in PEM.
    +     * 
    + * + * + * .google.cloud.security.privateca.v1.CaPool.PublishingOptions.EncodingFormat encoding_format = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for encodingFormat. + */ + @java.lang.Override + public int getEncodingFormatValue() { + return encodingFormat_; + } + /** + * + * + *
    +     * Optional. Specifies the encoding format of each
    +     * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
    +     * resource's CA certificate and CRLs. If this is omitted, CA certificates
    +     * and CRLs will be published in PEM.
    +     * 
    + * + * + * .google.cloud.security.privateca.v1.CaPool.PublishingOptions.EncodingFormat encoding_format = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The encodingFormat. + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1.CaPool.PublishingOptions.EncodingFormat + getEncodingFormat() { + com.google.cloud.security.privateca.v1.CaPool.PublishingOptions.EncodingFormat result = + com.google.cloud.security.privateca.v1.CaPool.PublishingOptions.EncodingFormat.forNumber( + encodingFormat_); + return result == null + ? com.google.cloud.security.privateca.v1.CaPool.PublishingOptions.EncodingFormat + .UNRECOGNIZED + : result; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -403,6 +661,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (publishCrl_ != false) { output.writeBool(2, publishCrl_); } + if (encodingFormat_ + != com.google.cloud.security.privateca.v1.CaPool.PublishingOptions.EncodingFormat + .ENCODING_FORMAT_UNSPECIFIED + .getNumber()) { + output.writeEnum(3, encodingFormat_); + } getUnknownFields().writeTo(output); } @@ -418,6 +682,12 @@ public int getSerializedSize() { if (publishCrl_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, publishCrl_); } + if (encodingFormat_ + != com.google.cloud.security.privateca.v1.CaPool.PublishingOptions.EncodingFormat + .ENCODING_FORMAT_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, encodingFormat_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -436,6 +706,7 @@ public boolean equals(final java.lang.Object obj) { if (getPublishCaCert() != other.getPublishCaCert()) return false; if (getPublishCrl() != other.getPublishCrl()) return false; + if (encodingFormat_ != other.encodingFormat_) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -451,6 +722,8 @@ public int hashCode() { hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getPublishCaCert()); hash = (37 * hash) + PUBLISH_CRL_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getPublishCrl()); + hash = (37 * hash) + ENCODING_FORMAT_FIELD_NUMBER; + hash = (53 * hash) + encodingFormat_; hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -603,6 +876,7 @@ public Builder clear() { bitField0_ = 0; publishCaCert_ = false; publishCrl_ = false; + encodingFormat_ = 0; return this; } @@ -647,6 +921,9 @@ private void buildPartial0( if (((from_bitField0_ & 0x00000002) != 0)) { result.publishCrl_ = publishCrl_; } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.encodingFormat_ = encodingFormat_; + } } @java.lang.Override @@ -705,6 +982,9 @@ public Builder mergeFrom( if (other.getPublishCrl() != false) { setPublishCrl(other.getPublishCrl()); } + if (other.encodingFormat_ != 0) { + setEncodingFormatValue(other.getEncodingFormatValue()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -743,6 +1023,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000002; break; } // case 16 + case 24: + { + encodingFormat_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 24 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -910,6 +1196,127 @@ public Builder clearPublishCrl() { return this; } + private int encodingFormat_ = 0; + /** + * + * + *
    +       * Optional. Specifies the encoding format of each
    +       * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
    +       * resource's CA certificate and CRLs. If this is omitted, CA certificates
    +       * and CRLs will be published in PEM.
    +       * 
    + * + * + * .google.cloud.security.privateca.v1.CaPool.PublishingOptions.EncodingFormat encoding_format = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for encodingFormat. + */ + @java.lang.Override + public int getEncodingFormatValue() { + return encodingFormat_; + } + /** + * + * + *
    +       * Optional. Specifies the encoding format of each
    +       * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
    +       * resource's CA certificate and CRLs. If this is omitted, CA certificates
    +       * and CRLs will be published in PEM.
    +       * 
    + * + * + * .google.cloud.security.privateca.v1.CaPool.PublishingOptions.EncodingFormat encoding_format = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for encodingFormat to set. + * @return This builder for chaining. + */ + public Builder setEncodingFormatValue(int value) { + encodingFormat_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
    +       * Optional. Specifies the encoding format of each
    +       * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
    +       * resource's CA certificate and CRLs. If this is omitted, CA certificates
    +       * and CRLs will be published in PEM.
    +       * 
    + * + * + * .google.cloud.security.privateca.v1.CaPool.PublishingOptions.EncodingFormat encoding_format = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The encodingFormat. + */ + @java.lang.Override + public com.google.cloud.security.privateca.v1.CaPool.PublishingOptions.EncodingFormat + getEncodingFormat() { + com.google.cloud.security.privateca.v1.CaPool.PublishingOptions.EncodingFormat result = + com.google.cloud.security.privateca.v1.CaPool.PublishingOptions.EncodingFormat + .forNumber(encodingFormat_); + return result == null + ? com.google.cloud.security.privateca.v1.CaPool.PublishingOptions.EncodingFormat + .UNRECOGNIZED + : result; + } + /** + * + * + *
    +       * Optional. Specifies the encoding format of each
    +       * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
    +       * resource's CA certificate and CRLs. If this is omitted, CA certificates
    +       * and CRLs will be published in PEM.
    +       * 
    + * + * + * .google.cloud.security.privateca.v1.CaPool.PublishingOptions.EncodingFormat encoding_format = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The encodingFormat to set. + * @return This builder for chaining. + */ + public Builder setEncodingFormat( + com.google.cloud.security.privateca.v1.CaPool.PublishingOptions.EncodingFormat value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + encodingFormat_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
    +       * Optional. Specifies the encoding format of each
    +       * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
    +       * resource's CA certificate and CRLs. If this is omitted, CA certificates
    +       * and CRLs will be published in PEM.
    +       * 
    + * + * + * .google.cloud.security.privateca.v1.CaPool.PublishingOptions.EncodingFormat encoding_format = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearEncodingFormat() { + bitField0_ = (bitField0_ & ~0x00000004); + encodingFormat_ = 0; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -1074,9 +1481,9 @@ com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType getA * if the issuing * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] * expires before a - * [Certificate][google.cloud.security.privateca.v1.Certificate]'s requested - * maximum_lifetime, the effective lifetime will be explicitly truncated to - * match it. + * [Certificate][google.cloud.security.privateca.v1.Certificate] resource's + * requested maximum_lifetime, the effective lifetime will be explicitly + * truncated to match it. *
* * @@ -1095,9 +1502,9 @@ com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType getA * if the issuing * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] * expires before a - * [Certificate][google.cloud.security.privateca.v1.Certificate]'s requested - * maximum_lifetime, the effective lifetime will be explicitly truncated to - * match it. + * [Certificate][google.cloud.security.privateca.v1.Certificate] resource's + * requested maximum_lifetime, the effective lifetime will be explicitly + * truncated to match it. *
* * @@ -1116,9 +1523,9 @@ com.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType getA * if the issuing * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] * expires before a - * [Certificate][google.cloud.security.privateca.v1.Certificate]'s requested - * maximum_lifetime, the effective lifetime will be explicitly truncated to - * match it. + * [Certificate][google.cloud.security.privateca.v1.Certificate] resource's + * requested maximum_lifetime, the effective lifetime will be explicitly + * truncated to match it. *
* * @@ -5315,9 +5722,9 @@ public int getAllowedKeyTypesCount() { * if the issuing * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] * expires before a - * [Certificate][google.cloud.security.privateca.v1.Certificate]'s requested - * maximum_lifetime, the effective lifetime will be explicitly truncated to - * match it. + * [Certificate][google.cloud.security.privateca.v1.Certificate] resource's + * requested maximum_lifetime, the effective lifetime will be explicitly + * truncated to match it. *
* * @@ -5339,9 +5746,9 @@ public boolean hasMaximumLifetime() { * if the issuing * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] * expires before a - * [Certificate][google.cloud.security.privateca.v1.Certificate]'s requested - * maximum_lifetime, the effective lifetime will be explicitly truncated to - * match it. + * [Certificate][google.cloud.security.privateca.v1.Certificate] resource's + * requested maximum_lifetime, the effective lifetime will be explicitly + * truncated to match it. *
* * @@ -5365,9 +5772,9 @@ public com.google.protobuf.Duration getMaximumLifetime() { * if the issuing * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] * expires before a - * [Certificate][google.cloud.security.privateca.v1.Certificate]'s requested - * maximum_lifetime, the effective lifetime will be explicitly truncated to - * match it. + * [Certificate][google.cloud.security.privateca.v1.Certificate] resource's + * requested maximum_lifetime, the effective lifetime will be explicitly + * truncated to match it. *
* * @@ -6801,9 +7208,9 @@ public Builder removeAllowedKeyTypes(int index) { * if the issuing * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] * expires before a - * [Certificate][google.cloud.security.privateca.v1.Certificate]'s requested - * maximum_lifetime, the effective lifetime will be explicitly truncated to - * match it. + * [Certificate][google.cloud.security.privateca.v1.Certificate] resource's + * requested maximum_lifetime, the effective lifetime will be explicitly + * truncated to match it. *
* * @@ -6824,9 +7231,9 @@ public boolean hasMaximumLifetime() { * if the issuing * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] * expires before a - * [Certificate][google.cloud.security.privateca.v1.Certificate]'s requested - * maximum_lifetime, the effective lifetime will be explicitly truncated to - * match it. + * [Certificate][google.cloud.security.privateca.v1.Certificate] resource's + * requested maximum_lifetime, the effective lifetime will be explicitly + * truncated to match it. *
* * @@ -6853,9 +7260,9 @@ public com.google.protobuf.Duration getMaximumLifetime() { * if the issuing * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] * expires before a - * [Certificate][google.cloud.security.privateca.v1.Certificate]'s requested - * maximum_lifetime, the effective lifetime will be explicitly truncated to - * match it. + * [Certificate][google.cloud.security.privateca.v1.Certificate] resource's + * requested maximum_lifetime, the effective lifetime will be explicitly + * truncated to match it. *
* * @@ -6884,9 +7291,9 @@ public Builder setMaximumLifetime(com.google.protobuf.Duration value) { * if the issuing * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] * expires before a - * [Certificate][google.cloud.security.privateca.v1.Certificate]'s requested - * maximum_lifetime, the effective lifetime will be explicitly truncated to - * match it. + * [Certificate][google.cloud.security.privateca.v1.Certificate] resource's + * requested maximum_lifetime, the effective lifetime will be explicitly + * truncated to match it. *
* * @@ -6912,9 +7319,9 @@ public Builder setMaximumLifetime(com.google.protobuf.Duration.Builder builderFo * if the issuing * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] * expires before a - * [Certificate][google.cloud.security.privateca.v1.Certificate]'s requested - * maximum_lifetime, the effective lifetime will be explicitly truncated to - * match it. + * [Certificate][google.cloud.security.privateca.v1.Certificate] resource's + * requested maximum_lifetime, the effective lifetime will be explicitly + * truncated to match it. *
* * @@ -6948,9 +7355,9 @@ public Builder mergeMaximumLifetime(com.google.protobuf.Duration value) { * if the issuing * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] * expires before a - * [Certificate][google.cloud.security.privateca.v1.Certificate]'s requested - * maximum_lifetime, the effective lifetime will be explicitly truncated to - * match it. + * [Certificate][google.cloud.security.privateca.v1.Certificate] resource's + * requested maximum_lifetime, the effective lifetime will be explicitly + * truncated to match it. *
* * @@ -6976,9 +7383,9 @@ public Builder clearMaximumLifetime() { * if the issuing * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] * expires before a - * [Certificate][google.cloud.security.privateca.v1.Certificate]'s requested - * maximum_lifetime, the effective lifetime will be explicitly truncated to - * match it. + * [Certificate][google.cloud.security.privateca.v1.Certificate] resource's + * requested maximum_lifetime, the effective lifetime will be explicitly + * truncated to match it. *
* * @@ -6999,9 +7406,9 @@ public com.google.protobuf.Duration.Builder getMaximumLifetimeBuilder() { * if the issuing * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] * expires before a - * [Certificate][google.cloud.security.privateca.v1.Certificate]'s requested - * maximum_lifetime, the effective lifetime will be explicitly truncated to - * match it. + * [Certificate][google.cloud.security.privateca.v1.Certificate] resource's + * requested maximum_lifetime, the effective lifetime will be explicitly + * truncated to match it. *
* * @@ -7026,9 +7433,9 @@ public com.google.protobuf.DurationOrBuilder getMaximumLifetimeOrBuilder() { * if the issuing * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] * expires before a - * [Certificate][google.cloud.security.privateca.v1.Certificate]'s requested - * maximum_lifetime, the effective lifetime will be explicitly truncated to - * match it. + * [Certificate][google.cloud.security.privateca.v1.Certificate] resource's + * requested maximum_lifetime, the effective lifetime will be explicitly + * truncated to match it. *
* * diff --git a/java-security-private-ca/proto-google-cloud-security-private-ca-v1/src/main/java/com/google/cloud/security/privateca/v1/CertificateConfig.java b/java-security-private-ca/proto-google-cloud-security-private-ca-v1/src/main/java/com/google/cloud/security/privateca/v1/CertificateConfig.java index 8fd5fc31a828..75446b4b97b9 100644 --- a/java-security-private-ca/proto-google-cloud-security-private-ca-v1/src/main/java/com/google/cloud/security/privateca/v1/CertificateConfig.java +++ b/java-security-private-ca/proto-google-cloud-security-private-ca-v1/src/main/java/com/google/cloud/security/privateca/v1/CertificateConfig.java @@ -2084,8 +2084,8 @@ public com.google.cloud.security.privateca.v1.PublicKeyOrBuilder getPublicKeyOrB *
    * Optional. When specified this provides a custom SKI to be used in the
    * certificate. This should only be used to maintain a SKI of an existing CA
-   * originally created outside CAS, which was not generated using method (1)
-   * described in RFC 5280 section 4.2.1.2.
+   * originally created outside CA service, which was not generated using method
+   * (1) described in RFC 5280 section 4.2.1.2.
    * 
* * @@ -2104,8 +2104,8 @@ public boolean hasSubjectKeyId() { *
    * Optional. When specified this provides a custom SKI to be used in the
    * certificate. This should only be used to maintain a SKI of an existing CA
-   * originally created outside CAS, which was not generated using method (1)
-   * described in RFC 5280 section 4.2.1.2.
+   * originally created outside CA service, which was not generated using method
+   * (1) described in RFC 5280 section 4.2.1.2.
    * 
* * @@ -2126,8 +2126,8 @@ public com.google.cloud.security.privateca.v1.CertificateConfig.KeyId getSubject *
    * Optional. When specified this provides a custom SKI to be used in the
    * certificate. This should only be used to maintain a SKI of an existing CA
-   * originally created outside CAS, which was not generated using method (1)
-   * described in RFC 5280 section 4.2.1.2.
+   * originally created outside CA service, which was not generated using method
+   * (1) described in RFC 5280 section 4.2.1.2.
    * 
* * @@ -3324,8 +3324,8 @@ public com.google.cloud.security.privateca.v1.PublicKeyOrBuilder getPublicKeyOrB *
      * Optional. When specified this provides a custom SKI to be used in the
      * certificate. This should only be used to maintain a SKI of an existing CA
-     * originally created outside CAS, which was not generated using method (1)
-     * described in RFC 5280 section 4.2.1.2.
+     * originally created outside CA service, which was not generated using method
+     * (1) described in RFC 5280 section 4.2.1.2.
      * 
* * @@ -3343,8 +3343,8 @@ public boolean hasSubjectKeyId() { *
      * Optional. When specified this provides a custom SKI to be used in the
      * certificate. This should only be used to maintain a SKI of an existing CA
-     * originally created outside CAS, which was not generated using method (1)
-     * described in RFC 5280 section 4.2.1.2.
+     * originally created outside CA service, which was not generated using method
+     * (1) described in RFC 5280 section 4.2.1.2.
      * 
* * @@ -3368,8 +3368,8 @@ public com.google.cloud.security.privateca.v1.CertificateConfig.KeyId getSubject *
      * Optional. When specified this provides a custom SKI to be used in the
      * certificate. This should only be used to maintain a SKI of an existing CA
-     * originally created outside CAS, which was not generated using method (1)
-     * described in RFC 5280 section 4.2.1.2.
+     * originally created outside CA service, which was not generated using method
+     * (1) described in RFC 5280 section 4.2.1.2.
      * 
* * @@ -3396,8 +3396,8 @@ public Builder setSubjectKeyId( *
      * Optional. When specified this provides a custom SKI to be used in the
      * certificate. This should only be used to maintain a SKI of an existing CA
-     * originally created outside CAS, which was not generated using method (1)
-     * described in RFC 5280 section 4.2.1.2.
+     * originally created outside CA service, which was not generated using method
+     * (1) described in RFC 5280 section 4.2.1.2.
      * 
* * @@ -3421,8 +3421,8 @@ public Builder setSubjectKeyId( *
      * Optional. When specified this provides a custom SKI to be used in the
      * certificate. This should only be used to maintain a SKI of an existing CA
-     * originally created outside CAS, which was not generated using method (1)
-     * described in RFC 5280 section 4.2.1.2.
+     * originally created outside CA service, which was not generated using method
+     * (1) described in RFC 5280 section 4.2.1.2.
      * 
* * @@ -3456,8 +3456,8 @@ public Builder mergeSubjectKeyId( *
      * Optional. When specified this provides a custom SKI to be used in the
      * certificate. This should only be used to maintain a SKI of an existing CA
-     * originally created outside CAS, which was not generated using method (1)
-     * described in RFC 5280 section 4.2.1.2.
+     * originally created outside CA service, which was not generated using method
+     * (1) described in RFC 5280 section 4.2.1.2.
      * 
* * @@ -3480,8 +3480,8 @@ public Builder clearSubjectKeyId() { *
      * Optional. When specified this provides a custom SKI to be used in the
      * certificate. This should only be used to maintain a SKI of an existing CA
-     * originally created outside CAS, which was not generated using method (1)
-     * described in RFC 5280 section 4.2.1.2.
+     * originally created outside CA service, which was not generated using method
+     * (1) described in RFC 5280 section 4.2.1.2.
      * 
* * @@ -3500,8 +3500,8 @@ public Builder clearSubjectKeyId() { *
      * Optional. When specified this provides a custom SKI to be used in the
      * certificate. This should only be used to maintain a SKI of an existing CA
-     * originally created outside CAS, which was not generated using method (1)
-     * described in RFC 5280 section 4.2.1.2.
+     * originally created outside CA service, which was not generated using method
+     * (1) described in RFC 5280 section 4.2.1.2.
      * 
* * @@ -3524,8 +3524,8 @@ public Builder clearSubjectKeyId() { *
      * Optional. When specified this provides a custom SKI to be used in the
      * certificate. This should only be used to maintain a SKI of an existing CA
-     * originally created outside CAS, which was not generated using method (1)
-     * described in RFC 5280 section 4.2.1.2.
+     * originally created outside CA service, which was not generated using method
+     * (1) described in RFC 5280 section 4.2.1.2.
      * 
* * diff --git a/java-security-private-ca/proto-google-cloud-security-private-ca-v1/src/main/java/com/google/cloud/security/privateca/v1/CertificateConfigOrBuilder.java b/java-security-private-ca/proto-google-cloud-security-private-ca-v1/src/main/java/com/google/cloud/security/privateca/v1/CertificateConfigOrBuilder.java index 274f3fde4b84..6155be9b39e1 100644 --- a/java-security-private-ca/proto-google-cloud-security-private-ca-v1/src/main/java/com/google/cloud/security/privateca/v1/CertificateConfigOrBuilder.java +++ b/java-security-private-ca/proto-google-cloud-security-private-ca-v1/src/main/java/com/google/cloud/security/privateca/v1/CertificateConfigOrBuilder.java @@ -181,8 +181,8 @@ public interface CertificateConfigOrBuilder *
    * Optional. When specified this provides a custom SKI to be used in the
    * certificate. This should only be used to maintain a SKI of an existing CA
-   * originally created outside CAS, which was not generated using method (1)
-   * described in RFC 5280 section 4.2.1.2.
+   * originally created outside CA service, which was not generated using method
+   * (1) described in RFC 5280 section 4.2.1.2.
    * 
* * @@ -198,8 +198,8 @@ public interface CertificateConfigOrBuilder *
    * Optional. When specified this provides a custom SKI to be used in the
    * certificate. This should only be used to maintain a SKI of an existing CA
-   * originally created outside CAS, which was not generated using method (1)
-   * described in RFC 5280 section 4.2.1.2.
+   * originally created outside CA service, which was not generated using method
+   * (1) described in RFC 5280 section 4.2.1.2.
    * 
* * @@ -215,8 +215,8 @@ public interface CertificateConfigOrBuilder *
    * Optional. When specified this provides a custom SKI to be used in the
    * certificate. This should only be used to maintain a SKI of an existing CA
-   * originally created outside CAS, which was not generated using method (1)
-   * described in RFC 5280 section 4.2.1.2.
+   * originally created outside CA service, which was not generated using method
+   * (1) described in RFC 5280 section 4.2.1.2.
    * 
* * diff --git a/java-security-private-ca/proto-google-cloud-security-private-ca-v1/src/main/java/com/google/cloud/security/privateca/v1/CertificateTemplate.java b/java-security-private-ca/proto-google-cloud-security-private-ca-v1/src/main/java/com/google/cloud/security/privateca/v1/CertificateTemplate.java index 9482038fdeb4..21fc822d9248 100644 --- a/java-security-private-ca/proto-google-cloud-security-private-ca-v1/src/main/java/com/google/cloud/security/privateca/v1/CertificateTemplate.java +++ b/java-security-private-ca/proto-google-cloud-security-private-ca-v1/src/main/java/com/google/cloud/security/privateca/v1/CertificateTemplate.java @@ -147,7 +147,7 @@ public com.google.protobuf.ByteString getNameBytes() { * Optional. The maximum lifetime allowed for issued * [Certificates][google.cloud.security.privateca.v1.Certificate] that use * this template. If the issuing - * [CaPool][google.cloud.security.privateca.v1.CaPool]'s + * [CaPool][google.cloud.security.privateca.v1.CaPool] resource's * [IssuancePolicy][google.cloud.security.privateca.v1.CaPool.IssuancePolicy] * specifies a * [maximum_lifetime][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.maximum_lifetime] @@ -177,7 +177,7 @@ public boolean hasMaximumLifetime() { * Optional. The maximum lifetime allowed for issued * [Certificates][google.cloud.security.privateca.v1.Certificate] that use * this template. If the issuing - * [CaPool][google.cloud.security.privateca.v1.CaPool]'s + * [CaPool][google.cloud.security.privateca.v1.CaPool] resource's * [IssuancePolicy][google.cloud.security.privateca.v1.CaPool.IssuancePolicy] * specifies a * [maximum_lifetime][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.maximum_lifetime] @@ -209,7 +209,7 @@ public com.google.protobuf.Duration getMaximumLifetime() { * Optional. The maximum lifetime allowed for issued * [Certificates][google.cloud.security.privateca.v1.Certificate] that use * this template. If the issuing - * [CaPool][google.cloud.security.privateca.v1.CaPool]'s + * [CaPool][google.cloud.security.privateca.v1.CaPool] resource's * [IssuancePolicy][google.cloud.security.privateca.v1.CaPool.IssuancePolicy] * specifies a * [maximum_lifetime][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.maximum_lifetime] @@ -1542,7 +1542,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { * Optional. The maximum lifetime allowed for issued * [Certificates][google.cloud.security.privateca.v1.Certificate] that use * this template. If the issuing - * [CaPool][google.cloud.security.privateca.v1.CaPool]'s + * [CaPool][google.cloud.security.privateca.v1.CaPool] resource's * [IssuancePolicy][google.cloud.security.privateca.v1.CaPool.IssuancePolicy] * specifies a * [maximum_lifetime][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.maximum_lifetime] @@ -1572,7 +1572,7 @@ public boolean hasMaximumLifetime() { * Optional. The maximum lifetime allowed for issued * [Certificates][google.cloud.security.privateca.v1.Certificate] that use * this template. If the issuing - * [CaPool][google.cloud.security.privateca.v1.CaPool]'s + * [CaPool][google.cloud.security.privateca.v1.CaPool] resource's * [IssuancePolicy][google.cloud.security.privateca.v1.CaPool.IssuancePolicy] * specifies a * [maximum_lifetime][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.maximum_lifetime] @@ -1608,7 +1608,7 @@ public com.google.protobuf.Duration getMaximumLifetime() { * Optional. The maximum lifetime allowed for issued * [Certificates][google.cloud.security.privateca.v1.Certificate] that use * this template. If the issuing - * [CaPool][google.cloud.security.privateca.v1.CaPool]'s + * [CaPool][google.cloud.security.privateca.v1.CaPool] resource's * [IssuancePolicy][google.cloud.security.privateca.v1.CaPool.IssuancePolicy] * specifies a * [maximum_lifetime][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.maximum_lifetime] @@ -1646,7 +1646,7 @@ public Builder setMaximumLifetime(com.google.protobuf.Duration value) { * Optional. The maximum lifetime allowed for issued * [Certificates][google.cloud.security.privateca.v1.Certificate] that use * this template. If the issuing - * [CaPool][google.cloud.security.privateca.v1.CaPool]'s + * [CaPool][google.cloud.security.privateca.v1.CaPool] resource's * [IssuancePolicy][google.cloud.security.privateca.v1.CaPool.IssuancePolicy] * specifies a * [maximum_lifetime][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.maximum_lifetime] @@ -1681,7 +1681,7 @@ public Builder setMaximumLifetime(com.google.protobuf.Duration.Builder builderFo * Optional. The maximum lifetime allowed for issued * [Certificates][google.cloud.security.privateca.v1.Certificate] that use * this template. If the issuing - * [CaPool][google.cloud.security.privateca.v1.CaPool]'s + * [CaPool][google.cloud.security.privateca.v1.CaPool] resource's * [IssuancePolicy][google.cloud.security.privateca.v1.CaPool.IssuancePolicy] * specifies a * [maximum_lifetime][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.maximum_lifetime] @@ -1724,7 +1724,7 @@ public Builder mergeMaximumLifetime(com.google.protobuf.Duration value) { * Optional. The maximum lifetime allowed for issued * [Certificates][google.cloud.security.privateca.v1.Certificate] that use * this template. If the issuing - * [CaPool][google.cloud.security.privateca.v1.CaPool]'s + * [CaPool][google.cloud.security.privateca.v1.CaPool] resource's * [IssuancePolicy][google.cloud.security.privateca.v1.CaPool.IssuancePolicy] * specifies a * [maximum_lifetime][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.maximum_lifetime] @@ -1759,7 +1759,7 @@ public Builder clearMaximumLifetime() { * Optional. The maximum lifetime allowed for issued * [Certificates][google.cloud.security.privateca.v1.Certificate] that use * this template. If the issuing - * [CaPool][google.cloud.security.privateca.v1.CaPool]'s + * [CaPool][google.cloud.security.privateca.v1.CaPool] resource's * [IssuancePolicy][google.cloud.security.privateca.v1.CaPool.IssuancePolicy] * specifies a * [maximum_lifetime][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.maximum_lifetime] @@ -1789,7 +1789,7 @@ public com.google.protobuf.Duration.Builder getMaximumLifetimeBuilder() { * Optional. The maximum lifetime allowed for issued * [Certificates][google.cloud.security.privateca.v1.Certificate] that use * this template. If the issuing - * [CaPool][google.cloud.security.privateca.v1.CaPool]'s + * [CaPool][google.cloud.security.privateca.v1.CaPool] resource's * [IssuancePolicy][google.cloud.security.privateca.v1.CaPool.IssuancePolicy] * specifies a * [maximum_lifetime][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.maximum_lifetime] @@ -1823,7 +1823,7 @@ public com.google.protobuf.DurationOrBuilder getMaximumLifetimeOrBuilder() { * Optional. The maximum lifetime allowed for issued * [Certificates][google.cloud.security.privateca.v1.Certificate] that use * this template. If the issuing - * [CaPool][google.cloud.security.privateca.v1.CaPool]'s + * [CaPool][google.cloud.security.privateca.v1.CaPool] resource's * [IssuancePolicy][google.cloud.security.privateca.v1.CaPool.IssuancePolicy] * specifies a * [maximum_lifetime][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.maximum_lifetime] diff --git a/java-security-private-ca/proto-google-cloud-security-private-ca-v1/src/main/java/com/google/cloud/security/privateca/v1/CertificateTemplateOrBuilder.java b/java-security-private-ca/proto-google-cloud-security-private-ca-v1/src/main/java/com/google/cloud/security/privateca/v1/CertificateTemplateOrBuilder.java index 8470e49538cd..d49c6ce58dcf 100644 --- a/java-security-private-ca/proto-google-cloud-security-private-ca-v1/src/main/java/com/google/cloud/security/privateca/v1/CertificateTemplateOrBuilder.java +++ b/java-security-private-ca/proto-google-cloud-security-private-ca-v1/src/main/java/com/google/cloud/security/privateca/v1/CertificateTemplateOrBuilder.java @@ -64,7 +64,7 @@ public interface CertificateTemplateOrBuilder * Optional. The maximum lifetime allowed for issued * [Certificates][google.cloud.security.privateca.v1.Certificate] that use * this template. If the issuing - * [CaPool][google.cloud.security.privateca.v1.CaPool]'s + * [CaPool][google.cloud.security.privateca.v1.CaPool] resource's * [IssuancePolicy][google.cloud.security.privateca.v1.CaPool.IssuancePolicy] * specifies a * [maximum_lifetime][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.maximum_lifetime] @@ -91,7 +91,7 @@ public interface CertificateTemplateOrBuilder * Optional. The maximum lifetime allowed for issued * [Certificates][google.cloud.security.privateca.v1.Certificate] that use * this template. If the issuing - * [CaPool][google.cloud.security.privateca.v1.CaPool]'s + * [CaPool][google.cloud.security.privateca.v1.CaPool] resource's * [IssuancePolicy][google.cloud.security.privateca.v1.CaPool.IssuancePolicy] * specifies a * [maximum_lifetime][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.maximum_lifetime] @@ -118,7 +118,7 @@ public interface CertificateTemplateOrBuilder * Optional. The maximum lifetime allowed for issued * [Certificates][google.cloud.security.privateca.v1.Certificate] that use * this template. If the issuing - * [CaPool][google.cloud.security.privateca.v1.CaPool]'s + * [CaPool][google.cloud.security.privateca.v1.CaPool] resource's * [IssuancePolicy][google.cloud.security.privateca.v1.CaPool.IssuancePolicy] * specifies a * [maximum_lifetime][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.maximum_lifetime] diff --git a/java-security-private-ca/proto-google-cloud-security-private-ca-v1/src/main/java/com/google/cloud/security/privateca/v1/DeleteCaPoolRequest.java b/java-security-private-ca/proto-google-cloud-security-private-ca-v1/src/main/java/com/google/cloud/security/privateca/v1/DeleteCaPoolRequest.java index 86bbd56157f1..ac606893ffed 100644 --- a/java-security-private-ca/proto-google-cloud-security-private-ca-v1/src/main/java/com/google/cloud/security/privateca/v1/DeleteCaPoolRequest.java +++ b/java-security-private-ca/proto-google-cloud-security-private-ca-v1/src/main/java/com/google/cloud/security/privateca/v1/DeleteCaPoolRequest.java @@ -207,7 +207,7 @@ public com.google.protobuf.ByteString getRequestIdBytes() { *
    * Optional. This field allows this pool to be deleted even if it's being
    * depended on by another resource. However, doing so may result in unintended
-   * and unrecoverable effects on any dependent resource(s) since the pool will
+   * and unrecoverable effects on any dependent resources since the pool will
    * no longer be able to issue certificates.
    * 
* @@ -909,7 +909,7 @@ public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { *
      * Optional. This field allows this pool to be deleted even if it's being
      * depended on by another resource. However, doing so may result in unintended
-     * and unrecoverable effects on any dependent resource(s) since the pool will
+     * and unrecoverable effects on any dependent resources since the pool will
      * no longer be able to issue certificates.
      * 
* @@ -927,7 +927,7 @@ public boolean getIgnoreDependentResources() { *
      * Optional. This field allows this pool to be deleted even if it's being
      * depended on by another resource. However, doing so may result in unintended
-     * and unrecoverable effects on any dependent resource(s) since the pool will
+     * and unrecoverable effects on any dependent resources since the pool will
      * no longer be able to issue certificates.
      * 
* @@ -949,7 +949,7 @@ public Builder setIgnoreDependentResources(boolean value) { *
      * Optional. This field allows this pool to be deleted even if it's being
      * depended on by another resource. However, doing so may result in unintended
-     * and unrecoverable effects on any dependent resource(s) since the pool will
+     * and unrecoverable effects on any dependent resources since the pool will
      * no longer be able to issue certificates.
      * 
* diff --git a/java-security-private-ca/proto-google-cloud-security-private-ca-v1/src/main/java/com/google/cloud/security/privateca/v1/DeleteCaPoolRequestOrBuilder.java b/java-security-private-ca/proto-google-cloud-security-private-ca-v1/src/main/java/com/google/cloud/security/privateca/v1/DeleteCaPoolRequestOrBuilder.java index 02bdeabceb97..0a3761928e4b 100644 --- a/java-security-private-ca/proto-google-cloud-security-private-ca-v1/src/main/java/com/google/cloud/security/privateca/v1/DeleteCaPoolRequestOrBuilder.java +++ b/java-security-private-ca/proto-google-cloud-security-private-ca-v1/src/main/java/com/google/cloud/security/privateca/v1/DeleteCaPoolRequestOrBuilder.java @@ -112,7 +112,7 @@ public interface DeleteCaPoolRequestOrBuilder *
    * Optional. This field allows this pool to be deleted even if it's being
    * depended on by another resource. However, doing so may result in unintended
-   * and unrecoverable effects on any dependent resource(s) since the pool will
+   * and unrecoverable effects on any dependent resources since the pool will
    * no longer be able to issue certificates.
    * 
* diff --git a/java-security-private-ca/proto-google-cloud-security-private-ca-v1/src/main/java/com/google/cloud/security/privateca/v1/DeleteCertificateAuthorityRequest.java b/java-security-private-ca/proto-google-cloud-security-private-ca-v1/src/main/java/com/google/cloud/security/privateca/v1/DeleteCertificateAuthorityRequest.java index 8d30cee1f54b..275d2424a2f6 100644 --- a/java-security-private-ca/proto-google-cloud-security-private-ca-v1/src/main/java/com/google/cloud/security/privateca/v1/DeleteCertificateAuthorityRequest.java +++ b/java-security-private-ca/proto-google-cloud-security-private-ca-v1/src/main/java/com/google/cloud/security/privateca/v1/DeleteCertificateAuthorityRequest.java @@ -245,9 +245,9 @@ public boolean getSkipGracePeriod() { * * *
-   * Optional. This field allows this ca to be deleted even if it's being
+   * Optional. This field allows this CA to be deleted even if it's being
    * depended on by another resource. However, doing so may result in unintended
-   * and unrecoverable effects on any dependent resource(s) since the CA will
+   * and unrecoverable effects on any dependent resources since the CA will
    * no longer be able to issue certificates.
    * 
* @@ -1118,9 +1118,9 @@ public Builder clearSkipGracePeriod() { * * *
-     * Optional. This field allows this ca to be deleted even if it's being
+     * Optional. This field allows this CA to be deleted even if it's being
      * depended on by another resource. However, doing so may result in unintended
-     * and unrecoverable effects on any dependent resource(s) since the CA will
+     * and unrecoverable effects on any dependent resources since the CA will
      * no longer be able to issue certificates.
      * 
* @@ -1136,9 +1136,9 @@ public boolean getIgnoreDependentResources() { * * *
-     * Optional. This field allows this ca to be deleted even if it's being
+     * Optional. This field allows this CA to be deleted even if it's being
      * depended on by another resource. However, doing so may result in unintended
-     * and unrecoverable effects on any dependent resource(s) since the CA will
+     * and unrecoverable effects on any dependent resources since the CA will
      * no longer be able to issue certificates.
      * 
* @@ -1158,9 +1158,9 @@ public Builder setIgnoreDependentResources(boolean value) { * * *
-     * Optional. This field allows this ca to be deleted even if it's being
+     * Optional. This field allows this CA to be deleted even if it's being
      * depended on by another resource. However, doing so may result in unintended
-     * and unrecoverable effects on any dependent resource(s) since the CA will
+     * and unrecoverable effects on any dependent resources since the CA will
      * no longer be able to issue certificates.
      * 
* diff --git a/java-security-private-ca/proto-google-cloud-security-private-ca-v1/src/main/java/com/google/cloud/security/privateca/v1/DeleteCertificateAuthorityRequestOrBuilder.java b/java-security-private-ca/proto-google-cloud-security-private-ca-v1/src/main/java/com/google/cloud/security/privateca/v1/DeleteCertificateAuthorityRequestOrBuilder.java index 1e1036dc8acb..a92610707243 100644 --- a/java-security-private-ca/proto-google-cloud-security-private-ca-v1/src/main/java/com/google/cloud/security/privateca/v1/DeleteCertificateAuthorityRequestOrBuilder.java +++ b/java-security-private-ca/proto-google-cloud-security-private-ca-v1/src/main/java/com/google/cloud/security/privateca/v1/DeleteCertificateAuthorityRequestOrBuilder.java @@ -139,9 +139,9 @@ public interface DeleteCertificateAuthorityRequestOrBuilder * * *
-   * Optional. This field allows this ca to be deleted even if it's being
+   * Optional. This field allows this CA to be deleted even if it's being
    * depended on by another resource. However, doing so may result in unintended
-   * and unrecoverable effects on any dependent resource(s) since the CA will
+   * and unrecoverable effects on any dependent resources since the CA will
    * no longer be able to issue certificates.
    * 
* diff --git a/java-security-private-ca/proto-google-cloud-security-private-ca-v1/src/main/java/com/google/cloud/security/privateca/v1/DisableCertificateAuthorityRequest.java b/java-security-private-ca/proto-google-cloud-security-private-ca-v1/src/main/java/com/google/cloud/security/privateca/v1/DisableCertificateAuthorityRequest.java index 1d05cab2bd04..52d0f83405f9 100644 --- a/java-security-private-ca/proto-google-cloud-security-private-ca-v1/src/main/java/com/google/cloud/security/privateca/v1/DisableCertificateAuthorityRequest.java +++ b/java-security-private-ca/proto-google-cloud-security-private-ca-v1/src/main/java/com/google/cloud/security/privateca/v1/DisableCertificateAuthorityRequest.java @@ -209,7 +209,7 @@ public com.google.protobuf.ByteString getRequestIdBytes() { *
    * Optional. This field allows this CA to be disabled even if it's being
    * depended on by another resource. However, doing so may result in unintended
-   * and unrecoverable effects on any dependent resource(s) since the CA will
+   * and unrecoverable effects on any dependent resources since the CA will
    * no longer be able to issue certificates.
    * 
* @@ -924,7 +924,7 @@ public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { *
      * Optional. This field allows this CA to be disabled even if it's being
      * depended on by another resource. However, doing so may result in unintended
-     * and unrecoverable effects on any dependent resource(s) since the CA will
+     * and unrecoverable effects on any dependent resources since the CA will
      * no longer be able to issue certificates.
      * 
* @@ -942,7 +942,7 @@ public boolean getIgnoreDependentResources() { *
      * Optional. This field allows this CA to be disabled even if it's being
      * depended on by another resource. However, doing so may result in unintended
-     * and unrecoverable effects on any dependent resource(s) since the CA will
+     * and unrecoverable effects on any dependent resources since the CA will
      * no longer be able to issue certificates.
      * 
* @@ -964,7 +964,7 @@ public Builder setIgnoreDependentResources(boolean value) { *
      * Optional. This field allows this CA to be disabled even if it's being
      * depended on by another resource. However, doing so may result in unintended
-     * and unrecoverable effects on any dependent resource(s) since the CA will
+     * and unrecoverable effects on any dependent resources since the CA will
      * no longer be able to issue certificates.
      * 
* diff --git a/java-security-private-ca/proto-google-cloud-security-private-ca-v1/src/main/java/com/google/cloud/security/privateca/v1/DisableCertificateAuthorityRequestOrBuilder.java b/java-security-private-ca/proto-google-cloud-security-private-ca-v1/src/main/java/com/google/cloud/security/privateca/v1/DisableCertificateAuthorityRequestOrBuilder.java index 3617d6d8febe..fea1971d6fbc 100644 --- a/java-security-private-ca/proto-google-cloud-security-private-ca-v1/src/main/java/com/google/cloud/security/privateca/v1/DisableCertificateAuthorityRequestOrBuilder.java +++ b/java-security-private-ca/proto-google-cloud-security-private-ca-v1/src/main/java/com/google/cloud/security/privateca/v1/DisableCertificateAuthorityRequestOrBuilder.java @@ -112,7 +112,7 @@ public interface DisableCertificateAuthorityRequestOrBuilder *
    * Optional. This field allows this CA to be disabled even if it's being
    * depended on by another resource. However, doing so may result in unintended
-   * and unrecoverable effects on any dependent resource(s) since the CA will
+   * and unrecoverable effects on any dependent resources since the CA will
    * no longer be able to issue certificates.
    * 
* diff --git a/java-security-private-ca/proto-google-cloud-security-private-ca-v1/src/main/java/com/google/cloud/security/privateca/v1/FetchCaCertsResponse.java b/java-security-private-ca/proto-google-cloud-security-private-ca-v1/src/main/java/com/google/cloud/security/privateca/v1/FetchCaCertsResponse.java index 0fcd4de68764..6be628f41bce 100644 --- a/java-security-private-ca/proto-google-cloud-security-private-ca-v1/src/main/java/com/google/cloud/security/privateca/v1/FetchCaCertsResponse.java +++ b/java-security-private-ca/proto-google-cloud-security-private-ca-v1/src/main/java/com/google/cloud/security/privateca/v1/FetchCaCertsResponse.java @@ -835,7 +835,7 @@ public com.google.protobuf.Parser getParserForType() { * * *
-   * The PEM encoded CA certificate chains of all Certificate Authorities in
+   * The PEM encoded CA certificate chains of all certificate authorities in
    * this [CaPool][google.cloud.security.privateca.v1.CaPool] in the ENABLED,
    * DISABLED, or STAGED states.
    * 
@@ -852,7 +852,7 @@ public com.google.protobuf.Parser getParserForType() { * * *
-   * The PEM encoded CA certificate chains of all Certificate Authorities in
+   * The PEM encoded CA certificate chains of all certificate authorities in
    * this [CaPool][google.cloud.security.privateca.v1.CaPool] in the ENABLED,
    * DISABLED, or STAGED states.
    * 
@@ -870,7 +870,7 @@ public com.google.protobuf.Parser getParserForType() { * * *
-   * The PEM encoded CA certificate chains of all Certificate Authorities in
+   * The PEM encoded CA certificate chains of all certificate authorities in
    * this [CaPool][google.cloud.security.privateca.v1.CaPool] in the ENABLED,
    * DISABLED, or STAGED states.
    * 
@@ -886,7 +886,7 @@ public int getCaCertsCount() { * * *
-   * The PEM encoded CA certificate chains of all Certificate Authorities in
+   * The PEM encoded CA certificate chains of all certificate authorities in
    * this [CaPool][google.cloud.security.privateca.v1.CaPool] in the ENABLED,
    * DISABLED, or STAGED states.
    * 
@@ -903,7 +903,7 @@ public com.google.cloud.security.privateca.v1.FetchCaCertsResponse.CertChain get * * *
-   * The PEM encoded CA certificate chains of all Certificate Authorities in
+   * The PEM encoded CA certificate chains of all certificate authorities in
    * this [CaPool][google.cloud.security.privateca.v1.CaPool] in the ENABLED,
    * DISABLED, or STAGED states.
    * 
@@ -1333,7 +1333,7 @@ private void ensureCaCertsIsMutable() { * * *
-     * The PEM encoded CA certificate chains of all Certificate Authorities in
+     * The PEM encoded CA certificate chains of all certificate authorities in
      * this [CaPool][google.cloud.security.privateca.v1.CaPool] in the ENABLED,
      * DISABLED, or STAGED states.
      * 
@@ -1354,7 +1354,7 @@ private void ensureCaCertsIsMutable() { * * *
-     * The PEM encoded CA certificate chains of all Certificate Authorities in
+     * The PEM encoded CA certificate chains of all certificate authorities in
      * this [CaPool][google.cloud.security.privateca.v1.CaPool] in the ENABLED,
      * DISABLED, or STAGED states.
      * 
@@ -1374,7 +1374,7 @@ public int getCaCertsCount() { * * *
-     * The PEM encoded CA certificate chains of all Certificate Authorities in
+     * The PEM encoded CA certificate chains of all certificate authorities in
      * this [CaPool][google.cloud.security.privateca.v1.CaPool] in the ENABLED,
      * DISABLED, or STAGED states.
      * 
@@ -1395,7 +1395,7 @@ public com.google.cloud.security.privateca.v1.FetchCaCertsResponse.CertChain get * * *
-     * The PEM encoded CA certificate chains of all Certificate Authorities in
+     * The PEM encoded CA certificate chains of all certificate authorities in
      * this [CaPool][google.cloud.security.privateca.v1.CaPool] in the ENABLED,
      * DISABLED, or STAGED states.
      * 
@@ -1422,7 +1422,7 @@ public Builder setCaCerts( * * *
-     * The PEM encoded CA certificate chains of all Certificate Authorities in
+     * The PEM encoded CA certificate chains of all certificate authorities in
      * this [CaPool][google.cloud.security.privateca.v1.CaPool] in the ENABLED,
      * DISABLED, or STAGED states.
      * 
@@ -1448,7 +1448,7 @@ public Builder setCaCerts( * * *
-     * The PEM encoded CA certificate chains of all Certificate Authorities in
+     * The PEM encoded CA certificate chains of all certificate authorities in
      * this [CaPool][google.cloud.security.privateca.v1.CaPool] in the ENABLED,
      * DISABLED, or STAGED states.
      * 
@@ -1475,7 +1475,7 @@ public Builder addCaCerts( * * *
-     * The PEM encoded CA certificate chains of all Certificate Authorities in
+     * The PEM encoded CA certificate chains of all certificate authorities in
      * this [CaPool][google.cloud.security.privateca.v1.CaPool] in the ENABLED,
      * DISABLED, or STAGED states.
      * 
@@ -1502,7 +1502,7 @@ public Builder addCaCerts( * * *
-     * The PEM encoded CA certificate chains of all Certificate Authorities in
+     * The PEM encoded CA certificate chains of all certificate authorities in
      * this [CaPool][google.cloud.security.privateca.v1.CaPool] in the ENABLED,
      * DISABLED, or STAGED states.
      * 
@@ -1527,7 +1527,7 @@ public Builder addCaCerts( * * *
-     * The PEM encoded CA certificate chains of all Certificate Authorities in
+     * The PEM encoded CA certificate chains of all certificate authorities in
      * this [CaPool][google.cloud.security.privateca.v1.CaPool] in the ENABLED,
      * DISABLED, or STAGED states.
      * 
@@ -1553,7 +1553,7 @@ public Builder addCaCerts( * * *
-     * The PEM encoded CA certificate chains of all Certificate Authorities in
+     * The PEM encoded CA certificate chains of all certificate authorities in
      * this [CaPool][google.cloud.security.privateca.v1.CaPool] in the ENABLED,
      * DISABLED, or STAGED states.
      * 
@@ -1579,7 +1579,7 @@ public Builder addAllCaCerts( * * *
-     * The PEM encoded CA certificate chains of all Certificate Authorities in
+     * The PEM encoded CA certificate chains of all certificate authorities in
      * this [CaPool][google.cloud.security.privateca.v1.CaPool] in the ENABLED,
      * DISABLED, or STAGED states.
      * 
@@ -1602,7 +1602,7 @@ public Builder clearCaCerts() { * * *
-     * The PEM encoded CA certificate chains of all Certificate Authorities in
+     * The PEM encoded CA certificate chains of all certificate authorities in
      * this [CaPool][google.cloud.security.privateca.v1.CaPool] in the ENABLED,
      * DISABLED, or STAGED states.
      * 
@@ -1625,7 +1625,7 @@ public Builder removeCaCerts(int index) { * * *
-     * The PEM encoded CA certificate chains of all Certificate Authorities in
+     * The PEM encoded CA certificate chains of all certificate authorities in
      * this [CaPool][google.cloud.security.privateca.v1.CaPool] in the ENABLED,
      * DISABLED, or STAGED states.
      * 
@@ -1642,7 +1642,7 @@ public Builder removeCaCerts(int index) { * * *
-     * The PEM encoded CA certificate chains of all Certificate Authorities in
+     * The PEM encoded CA certificate chains of all certificate authorities in
      * this [CaPool][google.cloud.security.privateca.v1.CaPool] in the ENABLED,
      * DISABLED, or STAGED states.
      * 
@@ -1663,7 +1663,7 @@ public Builder removeCaCerts(int index) { * * *
-     * The PEM encoded CA certificate chains of all Certificate Authorities in
+     * The PEM encoded CA certificate chains of all certificate authorities in
      * this [CaPool][google.cloud.security.privateca.v1.CaPool] in the ENABLED,
      * DISABLED, or STAGED states.
      * 
@@ -1686,7 +1686,7 @@ public Builder removeCaCerts(int index) { * * *
-     * The PEM encoded CA certificate chains of all Certificate Authorities in
+     * The PEM encoded CA certificate chains of all certificate authorities in
      * this [CaPool][google.cloud.security.privateca.v1.CaPool] in the ENABLED,
      * DISABLED, or STAGED states.
      * 
@@ -1706,7 +1706,7 @@ public Builder removeCaCerts(int index) { * * *
-     * The PEM encoded CA certificate chains of all Certificate Authorities in
+     * The PEM encoded CA certificate chains of all certificate authorities in
      * this [CaPool][google.cloud.security.privateca.v1.CaPool] in the ENABLED,
      * DISABLED, or STAGED states.
      * 
@@ -1727,7 +1727,7 @@ public Builder removeCaCerts(int index) { * * *
-     * The PEM encoded CA certificate chains of all Certificate Authorities in
+     * The PEM encoded CA certificate chains of all certificate authorities in
      * this [CaPool][google.cloud.security.privateca.v1.CaPool] in the ENABLED,
      * DISABLED, or STAGED states.
      * 
diff --git a/java-security-private-ca/proto-google-cloud-security-private-ca-v1/src/main/java/com/google/cloud/security/privateca/v1/FetchCaCertsResponseOrBuilder.java b/java-security-private-ca/proto-google-cloud-security-private-ca-v1/src/main/java/com/google/cloud/security/privateca/v1/FetchCaCertsResponseOrBuilder.java index b38e25f1d02e..5ea5bb829e2e 100644 --- a/java-security-private-ca/proto-google-cloud-security-private-ca-v1/src/main/java/com/google/cloud/security/privateca/v1/FetchCaCertsResponseOrBuilder.java +++ b/java-security-private-ca/proto-google-cloud-security-private-ca-v1/src/main/java/com/google/cloud/security/privateca/v1/FetchCaCertsResponseOrBuilder.java @@ -28,7 +28,7 @@ public interface FetchCaCertsResponseOrBuilder * * *
-   * The PEM encoded CA certificate chains of all Certificate Authorities in
+   * The PEM encoded CA certificate chains of all certificate authorities in
    * this [CaPool][google.cloud.security.privateca.v1.CaPool] in the ENABLED,
    * DISABLED, or STAGED states.
    * 
@@ -42,7 +42,7 @@ public interface FetchCaCertsResponseOrBuilder * * *
-   * The PEM encoded CA certificate chains of all Certificate Authorities in
+   * The PEM encoded CA certificate chains of all certificate authorities in
    * this [CaPool][google.cloud.security.privateca.v1.CaPool] in the ENABLED,
    * DISABLED, or STAGED states.
    * 
@@ -55,7 +55,7 @@ public interface FetchCaCertsResponseOrBuilder * * *
-   * The PEM encoded CA certificate chains of all Certificate Authorities in
+   * The PEM encoded CA certificate chains of all certificate authorities in
    * this [CaPool][google.cloud.security.privateca.v1.CaPool] in the ENABLED,
    * DISABLED, or STAGED states.
    * 
@@ -68,7 +68,7 @@ public interface FetchCaCertsResponseOrBuilder * * *
-   * The PEM encoded CA certificate chains of all Certificate Authorities in
+   * The PEM encoded CA certificate chains of all certificate authorities in
    * this [CaPool][google.cloud.security.privateca.v1.CaPool] in the ENABLED,
    * DISABLED, or STAGED states.
    * 
@@ -83,7 +83,7 @@ public interface FetchCaCertsResponseOrBuilder * * *
-   * The PEM encoded CA certificate chains of all Certificate Authorities in
+   * The PEM encoded CA certificate chains of all certificate authorities in
    * this [CaPool][google.cloud.security.privateca.v1.CaPool] in the ENABLED,
    * DISABLED, or STAGED states.
    * 
diff --git a/java-security-private-ca/proto-google-cloud-security-private-ca-v1/src/main/java/com/google/cloud/security/privateca/v1/PrivateCaResourcesProto.java b/java-security-private-ca/proto-google-cloud-security-private-ca-v1/src/main/java/com/google/cloud/security/privateca/v1/PrivateCaResourcesProto.java index 4e51e07a9adc..f92bd4ef93f6 100644 --- a/java-security-private-ca/proto-google-cloud-security-private-ca-v1/src/main/java/com/google/cloud/security/privateca/v1/PrivateCaResourcesProto.java +++ b/java-security-private-ca/proto-google-cloud-security-private-ca-v1/src/main/java/com/google/cloud/security/privateca/v1/PrivateCaResourcesProto.java @@ -261,7 +261,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\352A\231\001\n-privateca.googleapis.com/Certifica" + "teAuthority\022hprojects/{project}/location" + "s/{location}/caPools/{ca_pool}/certifica" - + "teAuthorities/{certificate_authority}\"\360\016" + + "teAuthorities/{certificate_authority}\"\241\020" + "\n\006CaPool\022\021\n\004name\030\001 \001(\tB\003\340A\003\022E\n\004tier\030\002 \001(" + "\0162/.google.cloud.security.privateca.v1.C" + "aPool.TierB\006\340A\002\340A\005\022W\n\017issuance_policy\030\003 " @@ -271,262 +271,267 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "privateca.v1.CaPool.PublishingOptionsB\003\340" + "A\001\022K\n\006labels\030\005 \003(\01326.google.cloud.securi" + "ty.privateca.v1.CaPool.LabelsEntryB\003\340A\001\032" - + "K\n\021PublishingOptions\022\034\n\017publish_ca_cert\030" - + "\001 \001(\010B\003\340A\001\022\030\n\013publish_crl\030\002 \001(\010B\003\340A\001\032\357\t\n" - + "\016IssuancePolicy\022h\n\021allowed_key_types\030\001 \003" - + "(\0132H.google.cloud.security.privateca.v1." - + "CaPool.IssuancePolicy.AllowedKeyTypeB\003\340A" - + "\001\0228\n\020maximum_lifetime\030\002 \001(\0132\031.google.pro" - + "tobuf.DurationB\003\340A\001\022l\n\026allowed_issuance_" - + "modes\030\003 \001(\0132G.google.cloud.security.priv" - + "ateca.v1.CaPool.IssuancePolicy.IssuanceM" - + "odesB\003\340A\001\022P\n\017baseline_values\030\004 \001(\01322.goo" - + "gle.cloud.security.privateca.v1.X509Para" - + "metersB\003\340A\001\022e\n\024identity_constraints\030\005 \001(" - + "\0132B.google.cloud.security.privateca.v1.C" - + "ertificateIdentityConstraintsB\003\340A\001\022h\n\026pa" - + "ssthrough_extensions\030\006 \001(\0132C.google.clou" - + "d.security.privateca.v1.CertificateExten" - + "sionConstraintsB\003\340A\001\032\305\004\n\016AllowedKeyType\022" - + "b\n\003rsa\030\001 \001(\0132S.google.cloud.security.pri" - + "vateca.v1.CaPool.IssuancePolicy.AllowedK" - + "eyType.RsaKeyTypeH\000\022l\n\016elliptic_curve\030\002 " - + "\001(\0132R.google.cloud.security.privateca.v1" - + ".CaPool.IssuancePolicy.AllowedKeyType.Ec" - + "KeyTypeH\000\032J\n\nRsaKeyType\022\035\n\020min_modulus_s" - + "ize\030\001 \001(\003B\003\340A\001\022\035\n\020max_modulus_size\030\002 \001(\003" - + "B\003\340A\001\032\210\002\n\tEcKeyType\022\211\001\n\023signature_algori" - + "thm\030\001 \001(\0162g.google.cloud.security.privat" - + "eca.v1.CaPool.IssuancePolicy.AllowedKeyT" - + "ype.EcKeyType.EcSignatureAlgorithmB\003\340A\001\"" - + "o\n\024EcSignatureAlgorithm\022&\n\"EC_SIGNATURE_" - + "ALGORITHM_UNSPECIFIED\020\000\022\016\n\nECDSA_P256\020\001\022" - + "\016\n\nECDSA_P384\020\002\022\017\n\013EDDSA_25519\020\003B\n\n\010key_" - + "type\032`\n\rIssuanceModes\022%\n\030allow_csr_based" - + "_issuance\030\001 \001(\010B\003\340A\001\022(\n\033allow_config_bas" - + "ed_issuance\030\002 \001(\010B\003\340A\001\032-\n\013LabelsEntry\022\013\n" - + "\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"8\n\004Tier\022\024\n" - + "\020TIER_UNSPECIFIED\020\000\022\016\n\nENTERPRISE\020\001\022\n\n\006D" - + "EVOPS\020\002:_\352A\\\n\037privateca.googleapis.com/C" - + "aPool\0229projects/{project}/locations/{loc" - + "ation}/caPools/{ca_pool}\"\274\010\n\031Certificate" - + "RevocationList\022\021\n\004name\030\001 \001(\tB\003\340A\003\022\034\n\017seq" - + "uence_number\030\002 \001(\003B\003\340A\003\022s\n\024revoked_certi" - + "ficates\030\003 \003(\0132P.google.cloud.security.pr" - + "ivateca.v1.CertificateRevocationList.Rev" - + "okedCertificateB\003\340A\003\022\024\n\007pem_crl\030\004 \001(\tB\003\340" - + "A\003\022\027\n\naccess_url\030\005 \001(\tB\003\340A\003\022W\n\005state\030\006 \001" - + "(\0162C.google.cloud.security.privateca.v1." - + "CertificateRevocationList.StateB\003\340A\003\0224\n\013" - + "create_time\030\007 \001(\0132\032.google.protobuf.Time" - + "stampB\003\340A\003\0224\n\013update_time\030\010 \001(\0132\032.google" - + ".protobuf.TimestampB\003\340A\003\022\030\n\013revision_id\030" - + "\t \001(\tB\003\340A\003\022^\n\006labels\030\n \003(\0132I.google.clou" - + "d.security.privateca.v1.CertificateRevoc" - + "ationList.LabelsEntryB\003\340A\001\032\300\001\n\022RevokedCe" - + "rtificate\022>\n\013certificate\030\001 \001(\tB)\372A&\n$pri" - + "vateca.googleapis.com/Certificate\022\031\n\021hex" - + "_serial_number\030\002 \001(\t\022O\n\021revocation_reaso" - + "n\030\003 \001(\01624.google.cloud.security.privatec" - + "a.v1.RevocationReason\032-\n\013LabelsEntry\022\013\n\003" - + "key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\":\n\005State\022\025\n" - + "\021STATE_UNSPECIFIED\020\000\022\n\n\006ACTIVE\020\001\022\016\n\nSUPE" - + "RSEDED\020\002:\334\001\352A\330\001\n2privateca.googleapis.co" - + "m/CertificateRevocationList\022\241\001projects/{" - + "project}/locations/{location}/caPools/{c" - + "a_pool}/certificateAuthorities/{certific" - + "ate_authority}/certificateRevocationList" - + "s/{certificate_revocation_list}\"\217\n\n\013Cert" - + "ificate\022:\n\004name\030\001 \001(\tB,\340A\003\372A&\n$privateca" - + ".googleapis.com/Certificate\022\026\n\007pem_csr\030\002" - + " \001(\tB\003\340A\005H\000\022L\n\006config\030\003 \001(\01325.google.clo" - + "ud.security.privateca.v1.CertificateConf" - + "igB\003\340A\005H\000\022[\n\034issuer_certificate_authorit" - + "y\030\004 \001(\tB5\340A\003\372A/\n-privateca.googleapis.co" - + "m/CertificateAuthority\0223\n\010lifetime\030\005 \001(\013" - + "2\031.google.protobuf.DurationB\006\340A\002\340A\005\022R\n\024c" - + "ertificate_template\030\006 \001(\tB4\340A\005\372A.\n,priva" - + "teca.googleapis.com/CertificateTemplate\022" - + "Q\n\014subject_mode\030\007 \001(\01626.google.cloud.sec" - + "urity.privateca.v1.SubjectRequestModeB\003\340" - + "A\005\022b\n\022revocation_details\030\010 \001(\0132A.google." - + "cloud.security.privateca.v1.Certificate." - + "RevocationDetailsB\003\340A\003\022\034\n\017pem_certificat" - + "e\030\t \001(\tB\003\340A\003\022`\n\027certificate_description\030" - + "\n \001(\0132:.google.cloud.security.privateca." - + "v1.CertificateDescriptionB\003\340A\003\022\"\n\025pem_ce" - + "rtificate_chain\030\013 \003(\tB\003\340A\003\0224\n\013create_tim" - + "e\030\014 \001(\0132\032.google.protobuf.TimestampB\003\340A\003" - + "\0224\n\013update_time\030\r \001(\0132\032.google.protobuf." - + "TimestampB\003\340A\003\022P\n\006labels\030\016 \003(\0132;.google." - + "cloud.security.privateca.v1.Certificate." - + "LabelsEntryB\003\340A\001\032\230\001\n\021RevocationDetails\022N" - + "\n\020revocation_state\030\001 \001(\01624.google.cloud." - + "security.privateca.v1.RevocationReason\0223" - + "\n\017revocation_time\030\002 \001(\0132\032.google.protobu" - + "f.Timestamp\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022" - + "\r\n\005value\030\002 \001(\t:\0028\001:\177\352A|\n$privateca.googl" - + "eapis.com/Certificate\022Tprojects/{project" - + "}/locations/{location}/caPools/{ca_pool}" - + "/certificates/{certificate}B\024\n\022certifica" - + "te_config\"\321\006\n\023CertificateTemplate\022B\n\004nam" - + "e\030\001 \001(\tB4\340A\003\372A.\n,privateca.googleapis.co" - + "m/CertificateTemplate\0228\n\020maximum_lifetim" - + "e\030\t \001(\0132\031.google.protobuf.DurationB\003\340A\001\022" - + "R\n\021predefined_values\030\002 \001(\01322.google.clou" - + "d.security.privateca.v1.X509ParametersB\003" - + "\340A\001\022e\n\024identity_constraints\030\003 \001(\0132B.goog" + + "\373\001\n\021PublishingOptions\022\034\n\017publish_ca_cert" + + "\030\001 \001(\010B\003\340A\001\022\030\n\013publish_crl\030\002 \001(\010B\003\340A\001\022i\n" + + "\017encoding_format\030\003 \001(\0162K.google.cloud.se" + + "curity.privateca.v1.CaPool.PublishingOpt" + + "ions.EncodingFormatB\003\340A\001\"C\n\016EncodingForm" + + "at\022\037\n\033ENCODING_FORMAT_UNSPECIFIED\020\000\022\007\n\003P" + + "EM\020\001\022\007\n\003DER\020\002\032\357\t\n\016IssuancePolicy\022h\n\021allo" + + "wed_key_types\030\001 \003(\0132H.google.cloud.secur" + + "ity.privateca.v1.CaPool.IssuancePolicy.A" + + "llowedKeyTypeB\003\340A\001\0228\n\020maximum_lifetime\030\002" + + " \001(\0132\031.google.protobuf.DurationB\003\340A\001\022l\n\026" + + "allowed_issuance_modes\030\003 \001(\0132G.google.cl" + + "oud.security.privateca.v1.CaPool.Issuanc" + + "ePolicy.IssuanceModesB\003\340A\001\022P\n\017baseline_v" + + "alues\030\004 \001(\01322.google.cloud.security.priv" + + "ateca.v1.X509ParametersB\003\340A\001\022e\n\024identity" + + "_constraints\030\005 \001(\0132B.google.cloud.securi" + + "ty.privateca.v1.CertificateIdentityConst" + + "raintsB\003\340A\001\022h\n\026passthrough_extensions\030\006 " + + "\001(\0132C.google.cloud.security.privateca.v1" + + ".CertificateExtensionConstraintsB\003\340A\001\032\305\004" + + "\n\016AllowedKeyType\022b\n\003rsa\030\001 \001(\0132S.google.c" + + "loud.security.privateca.v1.CaPool.Issuan" + + "cePolicy.AllowedKeyType.RsaKeyTypeH\000\022l\n\016" + + "elliptic_curve\030\002 \001(\0132R.google.cloud.secu" + + "rity.privateca.v1.CaPool.IssuancePolicy." + + "AllowedKeyType.EcKeyTypeH\000\032J\n\nRsaKeyType" + + "\022\035\n\020min_modulus_size\030\001 \001(\003B\003\340A\001\022\035\n\020max_m" + + "odulus_size\030\002 \001(\003B\003\340A\001\032\210\002\n\tEcKeyType\022\211\001\n" + + "\023signature_algorithm\030\001 \001(\0162g.google.clou" + + "d.security.privateca.v1.CaPool.IssuanceP" + + "olicy.AllowedKeyType.EcKeyType.EcSignatu" + + "reAlgorithmB\003\340A\001\"o\n\024EcSignatureAlgorithm" + + "\022&\n\"EC_SIGNATURE_ALGORITHM_UNSPECIFIED\020\000" + + "\022\016\n\nECDSA_P256\020\001\022\016\n\nECDSA_P384\020\002\022\017\n\013EDDS" + + "A_25519\020\003B\n\n\010key_type\032`\n\rIssuanceModes\022%" + + "\n\030allow_csr_based_issuance\030\001 \001(\010B\003\340A\001\022(\n" + + "\033allow_config_based_issuance\030\002 \001(\010B\003\340A\001\032" + + "-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001" + + "(\t:\0028\001\"8\n\004Tier\022\024\n\020TIER_UNSPECIFIED\020\000\022\016\n\n" + + "ENTERPRISE\020\001\022\n\n\006DEVOPS\020\002:_\352A\\\n\037privateca" + + ".googleapis.com/CaPool\0229projects/{projec" + + "t}/locations/{location}/caPools/{ca_pool" + + "}\"\274\010\n\031CertificateRevocationList\022\021\n\004name\030" + + "\001 \001(\tB\003\340A\003\022\034\n\017sequence_number\030\002 \001(\003B\003\340A\003" + + "\022s\n\024revoked_certificates\030\003 \003(\0132P.google." + + "cloud.security.privateca.v1.CertificateR" + + "evocationList.RevokedCertificateB\003\340A\003\022\024\n" + + "\007pem_crl\030\004 \001(\tB\003\340A\003\022\027\n\naccess_url\030\005 \001(\tB" + + "\003\340A\003\022W\n\005state\030\006 \001(\0162C.google.cloud.secur" + + "ity.privateca.v1.CertificateRevocationLi" + + "st.StateB\003\340A\003\0224\n\013create_time\030\007 \001(\0132\032.goo" + + "gle.protobuf.TimestampB\003\340A\003\0224\n\013update_ti" + + "me\030\010 \001(\0132\032.google.protobuf.TimestampB\003\340A" + + "\003\022\030\n\013revision_id\030\t \001(\tB\003\340A\003\022^\n\006labels\030\n " + + "\003(\0132I.google.cloud.security.privateca.v1" + + ".CertificateRevocationList.LabelsEntryB\003" + + "\340A\001\032\300\001\n\022RevokedCertificate\022>\n\013certificat" + + "e\030\001 \001(\tB)\372A&\n$privateca.googleapis.com/C" + + "ertificate\022\031\n\021hex_serial_number\030\002 \001(\t\022O\n" + + "\021revocation_reason\030\003 \001(\01624.google.cloud." + + "security.privateca.v1.RevocationReason\032-" + + "\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(" + + "\t:\0028\001\":\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\n\n" + + "\006ACTIVE\020\001\022\016\n\nSUPERSEDED\020\002:\334\001\352A\330\001\n2privat" + + "eca.googleapis.com/CertificateRevocation" + + "List\022\241\001projects/{project}/locations/{loc" + + "ation}/caPools/{ca_pool}/certificateAuth" + + "orities/{certificate_authority}/certific" + + "ateRevocationLists/{certificate_revocati" + + "on_list}\"\217\n\n\013Certificate\022:\n\004name\030\001 \001(\tB," + + "\340A\003\372A&\n$privateca.googleapis.com/Certifi" + + "cate\022\026\n\007pem_csr\030\002 \001(\tB\003\340A\005H\000\022L\n\006config\030\003" + + " \001(\01325.google.cloud.security.privateca.v" + + "1.CertificateConfigB\003\340A\005H\000\022[\n\034issuer_cer" + + "tificate_authority\030\004 \001(\tB5\340A\003\372A/\n-privat" + + "eca.googleapis.com/CertificateAuthority\022" + + "3\n\010lifetime\030\005 \001(\0132\031.google.protobuf.Dura" + + "tionB\006\340A\002\340A\005\022R\n\024certificate_template\030\006 \001" + + "(\tB4\340A\005\372A.\n,privateca.googleapis.com/Cer" + + "tificateTemplate\022Q\n\014subject_mode\030\007 \001(\01626" + + ".google.cloud.security.privateca.v1.Subj" + + "ectRequestModeB\003\340A\005\022b\n\022revocation_detail" + + "s\030\010 \001(\0132A.google.cloud.security.privatec" + + "a.v1.Certificate.RevocationDetailsB\003\340A\003\022" + + "\034\n\017pem_certificate\030\t \001(\tB\003\340A\003\022`\n\027certifi" + + "cate_description\030\n \001(\0132:.google.cloud.se" + + "curity.privateca.v1.CertificateDescripti" + + "onB\003\340A\003\022\"\n\025pem_certificate_chain\030\013 \003(\tB\003" + + "\340A\003\0224\n\013create_time\030\014 \001(\0132\032.google.protob" + + "uf.TimestampB\003\340A\003\0224\n\013update_time\030\r \001(\0132\032" + + ".google.protobuf.TimestampB\003\340A\003\022P\n\006label" + + "s\030\016 \003(\0132;.google.cloud.security.privatec" + + "a.v1.Certificate.LabelsEntryB\003\340A\001\032\230\001\n\021Re" + + "vocationDetails\022N\n\020revocation_state\030\001 \001(" + + "\01624.google.cloud.security.privateca.v1.R" + + "evocationReason\0223\n\017revocation_time\030\002 \001(\013" + + "2\032.google.protobuf.Timestamp\032-\n\013LabelsEn" + + "try\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:\177\352A|" + + "\n$privateca.googleapis.com/Certificate\022T" + + "projects/{project}/locations/{location}/" + + "caPools/{ca_pool}/certificates/{certific" + + "ate}B\024\n\022certificate_config\"\321\006\n\023Certifica" + + "teTemplate\022B\n\004name\030\001 \001(\tB4\340A\003\372A.\n,privat" + + "eca.googleapis.com/CertificateTemplate\0228" + + "\n\020maximum_lifetime\030\t \001(\0132\031.google.protob" + + "uf.DurationB\003\340A\001\022R\n\021predefined_values\030\002 " + + "\001(\01322.google.cloud.security.privateca.v1" + + ".X509ParametersB\003\340A\001\022e\n\024identity_constra" + + "ints\030\003 \001(\0132B.google.cloud.security.priva" + + "teca.v1.CertificateIdentityConstraintsB\003" + + "\340A\001\022h\n\026passthrough_extensions\030\004 \001(\0132C.go" + + "ogle.cloud.security.privateca.v1.Certifi" + + "cateExtensionConstraintsB\003\340A\001\022\030\n\013descrip" + + "tion\030\005 \001(\tB\003\340A\001\0224\n\013create_time\030\006 \001(\0132\032.g" + + "oogle.protobuf.TimestampB\003\340A\003\0224\n\013update_" + + "time\030\007 \001(\0132\032.google.protobuf.TimestampB\003" + + "\340A\003\022X\n\006labels\030\010 \003(\0132C.google.cloud.secur" + + "ity.privateca.v1.CertificateTemplate.Lab" + + "elsEntryB\003\340A\001\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(" + + "\t\022\r\n\005value\030\002 \001(\t:\0028\001:\207\001\352A\203\001\n,privateca.g" + + "oogleapis.com/CertificateTemplate\022Sproje" + + "cts/{project}/locations/{location}/certi" + + "ficateTemplates/{certificate_template}\"\316" + + "\006\n\016X509Parameters\022D\n\tkey_usage\030\001 \001(\0132,.g" + + "oogle.cloud.security.privateca.v1.KeyUsa" + + "geB\003\340A\001\022U\n\nca_options\030\002 \001(\0132<.google.clo" + + "ud.security.privateca.v1.X509Parameters." + + "CaOptionsB\003\340A\001\022E\n\npolicy_ids\030\003 \003(\0132,.goo" + + "gle.cloud.security.privateca.v1.ObjectId" + + "B\003\340A\001\022\035\n\020aia_ocsp_servers\030\004 \003(\tB\003\340A\001\022a\n\020" + + "name_constraints\030\006 \001(\0132B.google.cloud.se" + + "curity.privateca.v1.X509Parameters.NameC" + + "onstraintsB\003\340A\001\022U\n\025additional_extensions" + + "\030\005 \003(\01321.google.cloud.security.privateca" + + ".v1.X509ExtensionB\003\340A\001\032s\n\tCaOptions\022\027\n\005i" + + "s_ca\030\001 \001(\010B\003\340A\001H\000\210\001\001\022(\n\026max_issuer_path_" + + "length\030\002 \001(\005B\003\340A\001H\001\210\001\001B\010\n\006_is_caB\031\n\027_max" + + "_issuer_path_length\032\211\002\n\017NameConstraints\022" + + "\020\n\010critical\030\001 \001(\010\022\033\n\023permitted_dns_names" + + "\030\002 \003(\t\022\032\n\022excluded_dns_names\030\003 \003(\t\022\033\n\023pe" + + "rmitted_ip_ranges\030\004 \003(\t\022\032\n\022excluded_ip_r" + + "anges\030\005 \003(\t\022!\n\031permitted_email_addresses" + + "\030\006 \003(\t\022 \n\030excluded_email_addresses\030\007 \003(\t" + + "\022\026\n\016permitted_uris\030\010 \003(\t\022\025\n\rexcluded_uri" + + "s\030\t \003(\t\"\251\002\n\021SubordinateConfig\022V\n\025certifi" + + "cate_authority\030\001 \001(\tB5\340A\002\372A/\n-privateca." + + "googleapis.com/CertificateAuthorityH\000\022m\n" + + "\020pem_issuer_chain\030\002 \001(\0132L.google.cloud.s" + + "ecurity.privateca.v1.SubordinateConfig.S" + + "ubordinateConfigChainB\003\340A\002H\000\0327\n\026Subordin" + + "ateConfigChain\022\035\n\020pem_certificates\030\001 \003(\t" + + "B\003\340A\002B\024\n\022subordinate_config\"\235\001\n\tPublicKe" + + "y\022\020\n\003key\030\001 \001(\014B\003\340A\002\022L\n\006format\030\002 \001(\01627.go" + + "ogle.cloud.security.privateca.v1.PublicK" + + "ey.KeyFormatB\003\340A\002\"0\n\tKeyFormat\022\032\n\026KEY_FO" + + "RMAT_UNSPECIFIED\020\000\022\007\n\003PEM\020\001\"\254\004\n\021Certific" + + "ateConfig\022`\n\016subject_config\030\001 \001(\0132C.goog" + "le.cloud.security.privateca.v1.Certifica" - + "teIdentityConstraintsB\003\340A\001\022h\n\026passthroug" - + "h_extensions\030\004 \001(\0132C.google.cloud.securi" - + "ty.privateca.v1.CertificateExtensionCons" - + "traintsB\003\340A\001\022\030\n\013description\030\005 \001(\tB\003\340A\001\0224" - + "\n\013create_time\030\006 \001(\0132\032.google.protobuf.Ti" - + "mestampB\003\340A\003\0224\n\013update_time\030\007 \001(\0132\032.goog" - + "le.protobuf.TimestampB\003\340A\003\022X\n\006labels\030\010 \003" - + "(\0132C.google.cloud.security.privateca.v1." - + "CertificateTemplate.LabelsEntryB\003\340A\001\032-\n\013" - + "LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:" - + "\0028\001:\207\001\352A\203\001\n,privateca.googleapis.com/Cer" - + "tificateTemplate\022Sprojects/{project}/loc" - + "ations/{location}/certificateTemplates/{" - + "certificate_template}\"\316\006\n\016X509Parameters" - + "\022D\n\tkey_usage\030\001 \001(\0132,.google.cloud.secur" - + "ity.privateca.v1.KeyUsageB\003\340A\001\022U\n\nca_opt" - + "ions\030\002 \001(\0132<.google.cloud.security.priva" - + "teca.v1.X509Parameters.CaOptionsB\003\340A\001\022E\n" - + "\npolicy_ids\030\003 \003(\0132,.google.cloud.securit" - + "y.privateca.v1.ObjectIdB\003\340A\001\022\035\n\020aia_ocsp" - + "_servers\030\004 \003(\tB\003\340A\001\022a\n\020name_constraints\030" - + "\006 \001(\0132B.google.cloud.security.privateca." - + "v1.X509Parameters.NameConstraintsB\003\340A\001\022U" - + "\n\025additional_extensions\030\005 \003(\01321.google.c" - + "loud.security.privateca.v1.X509Extension" - + "B\003\340A\001\032s\n\tCaOptions\022\027\n\005is_ca\030\001 \001(\010B\003\340A\001H\000" - + "\210\001\001\022(\n\026max_issuer_path_length\030\002 \001(\005B\003\340A\001" - + "H\001\210\001\001B\010\n\006_is_caB\031\n\027_max_issuer_path_leng" - + "th\032\211\002\n\017NameConstraints\022\020\n\010critical\030\001 \001(\010" - + "\022\033\n\023permitted_dns_names\030\002 \003(\t\022\032\n\022exclude" - + "d_dns_names\030\003 \003(\t\022\033\n\023permitted_ip_ranges" - + "\030\004 \003(\t\022\032\n\022excluded_ip_ranges\030\005 \003(\t\022!\n\031pe" - + "rmitted_email_addresses\030\006 \003(\t\022 \n\030exclude" - + "d_email_addresses\030\007 \003(\t\022\026\n\016permitted_uri" - + "s\030\010 \003(\t\022\025\n\rexcluded_uris\030\t \003(\t\"\251\002\n\021Subor" - + "dinateConfig\022V\n\025certificate_authority\030\001 " - + "\001(\tB5\340A\002\372A/\n-privateca.googleapis.com/Ce" - + "rtificateAuthorityH\000\022m\n\020pem_issuer_chain" - + "\030\002 \001(\0132L.google.cloud.security.privateca" - + ".v1.SubordinateConfig.SubordinateConfigC" - + "hainB\003\340A\002H\000\0327\n\026SubordinateConfigChain\022\035\n" - + "\020pem_certificates\030\001 \003(\tB\003\340A\002B\024\n\022subordin" - + "ate_config\"\235\001\n\tPublicKey\022\020\n\003key\030\001 \001(\014B\003\340" - + "A\002\022L\n\006format\030\002 \001(\01627.google.cloud.securi" - + "ty.privateca.v1.PublicKey.KeyFormatB\003\340A\002" - + "\"0\n\tKeyFormat\022\032\n\026KEY_FORMAT_UNSPECIFIED\020" - + "\000\022\007\n\003PEM\020\001\"\254\004\n\021CertificateConfig\022`\n\016subj" - + "ect_config\030\001 \001(\0132C.google.cloud.security" - + ".privateca.v1.CertificateConfig.SubjectC" - + "onfigB\003\340A\002\022L\n\013x509_config\030\002 \001(\01322.google" - + ".cloud.security.privateca.v1.X509Paramet" - + "ersB\003\340A\002\022F\n\npublic_key\030\003 \001(\0132-.google.cl" - + "oud.security.privateca.v1.PublicKeyB\003\340A\001" - + "\022X\n\016subject_key_id\030\004 \001(\0132;.google.cloud." - + "security.privateca.v1.CertificateConfig." - + "KeyIdB\003\340A\001\032\246\001\n\rSubjectConfig\022A\n\007subject\030" - + "\001 \001(\0132+.google.cloud.security.privateca." - + "v1.SubjectB\003\340A\001\022R\n\020subject_alt_name\030\002 \001(" - + "\01323.google.cloud.security.privateca.v1.S" - + "ubjectAltNamesB\003\340A\001\032\034\n\005KeyId\022\023\n\006key_id\030\001" - + " \001(\tB\003\340A\002\"\241\010\n\026CertificateDescription\022j\n\023" - + "subject_description\030\001 \001(\0132M.google.cloud" + + "teConfig.SubjectConfigB\003\340A\002\022L\n\013x509_conf" + + "ig\030\002 \001(\01322.google.cloud.security.private" + + "ca.v1.X509ParametersB\003\340A\002\022F\n\npublic_key\030" + + "\003 \001(\0132-.google.cloud.security.privateca." + + "v1.PublicKeyB\003\340A\001\022X\n\016subject_key_id\030\004 \001(" + + "\0132;.google.cloud.security.privateca.v1.C" + + "ertificateConfig.KeyIdB\003\340A\001\032\246\001\n\rSubjectC" + + "onfig\022A\n\007subject\030\001 \001(\0132+.google.cloud.se" + + "curity.privateca.v1.SubjectB\003\340A\001\022R\n\020subj" + + "ect_alt_name\030\002 \001(\01323.google.cloud.securi" + + "ty.privateca.v1.SubjectAltNamesB\003\340A\001\032\034\n\005" + + "KeyId\022\023\n\006key_id\030\001 \001(\tB\003\340A\002\"\241\010\n\026Certifica" + + "teDescription\022j\n\023subject_description\030\001 \001" + + "(\0132M.google.cloud.security.privateca.v1." + + "CertificateDescription.SubjectDescriptio" + + "n\022L\n\020x509_description\030\002 \001(\01322.google.clo" + + "ud.security.privateca.v1.X509Parameters\022" + + "A\n\npublic_key\030\003 \001(\0132-.google.cloud.secur" + + "ity.privateca.v1.PublicKey\022X\n\016subject_ke" + + "y_id\030\004 \001(\0132@.google.cloud.security.priva" + + "teca.v1.CertificateDescription.KeyId\022Z\n\020" + + "authority_key_id\030\005 \001(\0132@.google.cloud.se" + + "curity.privateca.v1.CertificateDescripti" + + "on.KeyId\022\037\n\027crl_distribution_points\030\006 \003(" + + "\t\022$\n\034aia_issuing_certificate_urls\030\007 \003(\t\022" + + "k\n\020cert_fingerprint\030\010 \001(\0132Q.google.cloud" + ".security.privateca.v1.CertificateDescri" - + "ption.SubjectDescription\022L\n\020x509_descrip" - + "tion\030\002 \001(\01322.google.cloud.security.priva" - + "teca.v1.X509Parameters\022A\n\npublic_key\030\003 \001" - + "(\0132-.google.cloud.security.privateca.v1." - + "PublicKey\022X\n\016subject_key_id\030\004 \001(\0132@.goog" - + "le.cloud.security.privateca.v1.Certifica" - + "teDescription.KeyId\022Z\n\020authority_key_id\030" - + "\005 \001(\0132@.google.cloud.security.privateca." - + "v1.CertificateDescription.KeyId\022\037\n\027crl_d" - + "istribution_points\030\006 \003(\t\022$\n\034aia_issuing_" - + "certificate_urls\030\007 \003(\t\022k\n\020cert_fingerpri" - + "nt\030\010 \001(\0132Q.google.cloud.security.private" - + "ca.v1.CertificateDescription.Certificate" - + "Fingerprint\032\322\002\n\022SubjectDescription\022<\n\007su" - + "bject\030\001 \001(\0132+.google.cloud.security.priv" - + "ateca.v1.Subject\022M\n\020subject_alt_name\030\002 \001" - + "(\01323.google.cloud.security.privateca.v1." - + "SubjectAltNames\022\031\n\021hex_serial_number\030\003 \001" - + "(\t\022+\n\010lifetime\030\004 \001(\0132\031.google.protobuf.D" - + "uration\0223\n\017not_before_time\030\005 \001(\0132\032.googl" - + "e.protobuf.Timestamp\0222\n\016not_after_time\030\006" - + " \001(\0132\032.google.protobuf.Timestamp\032\034\n\005KeyI" - + "d\022\023\n\006key_id\030\001 \001(\tB\003\340A\001\032-\n\026CertificateFin" - + "gerprint\022\023\n\013sha256_hash\030\001 \001(\t\"\'\n\010ObjectI" - + "d\022\033\n\016object_id_path\030\001 \003(\005B\003\340A\002\"\200\001\n\rX509E" - + "xtension\022D\n\tobject_id\030\001 \001(\0132,.google.clo" - + "ud.security.privateca.v1.ObjectIdB\003\340A\002\022\025" - + "\n\010critical\030\002 \001(\010B\003\340A\001\022\022\n\005value\030\003 \001(\014B\003\340A" - + "\002\"\242\005\n\010KeyUsage\022T\n\016base_key_usage\030\001 \001(\0132<" - + ".google.cloud.security.privateca.v1.KeyU" - + "sage.KeyUsageOptions\022`\n\022extended_key_usa" - + "ge\030\002 \001(\0132D.google.cloud.security.private" - + "ca.v1.KeyUsage.ExtendedKeyUsageOptions\022Q" - + "\n\033unknown_extended_key_usages\030\003 \003(\0132,.go" - + "ogle.cloud.security.privateca.v1.ObjectI" - + "d\032\347\001\n\017KeyUsageOptions\022\031\n\021digital_signatu" - + "re\030\001 \001(\010\022\032\n\022content_commitment\030\002 \001(\010\022\030\n\020" - + "key_encipherment\030\003 \001(\010\022\031\n\021data_encipherm" - + "ent\030\004 \001(\010\022\025\n\rkey_agreement\030\005 \001(\010\022\021\n\tcert" - + "_sign\030\006 \001(\010\022\020\n\010crl_sign\030\007 \001(\010\022\025\n\renciphe" - + "r_only\030\010 \001(\010\022\025\n\rdecipher_only\030\t \001(\010\032\240\001\n\027" - + "ExtendedKeyUsageOptions\022\023\n\013server_auth\030\001" - + " \001(\010\022\023\n\013client_auth\030\002 \001(\010\022\024\n\014code_signin" - + "g\030\003 \001(\010\022\030\n\020email_protection\030\004 \001(\010\022\025\n\rtim" - + "e_stamping\030\005 \001(\010\022\024\n\014ocsp_signing\030\006 \001(\010\"\270" - + "\001\n\007Subject\022\023\n\013common_name\030\001 \001(\t\022\024\n\014count" - + "ry_code\030\002 \001(\t\022\024\n\014organization\030\003 \001(\t\022\033\n\023o" - + "rganizational_unit\030\004 \001(\t\022\020\n\010locality\030\005 \001" - + "(\t\022\020\n\010province\030\006 \001(\t\022\026\n\016street_address\030\007" - + " \001(\t\022\023\n\013postal_code\030\010 \001(\t\"\251\001\n\017SubjectAlt" - + "Names\022\021\n\tdns_names\030\001 \003(\t\022\014\n\004uris\030\002 \003(\t\022\027" - + "\n\017email_addresses\030\003 \003(\t\022\024\n\014ip_addresses\030" - + "\004 \003(\t\022F\n\013custom_sans\030\005 \003(\01321.google.clou" - + "d.security.privateca.v1.X509Extension\"\372\001" - + "\n\036CertificateIdentityConstraints\022.\n\016cel_" - + "expression\030\001 \001(\0132\021.google.type.ExprB\003\340A\001" - + "\022+\n\031allow_subject_passthrough\030\002 \001(\010B\003\340A\002" - + "H\000\210\001\001\0225\n#allow_subject_alt_names_passthr" - + "ough\030\003 \001(\010B\003\340A\002H\001\210\001\001B\034\n\032_allow_subject_p" - + "assthroughB&\n$_allow_subject_alt_names_p" - + "assthrough\"\264\003\n\037CertificateExtensionConst" - + "raints\022|\n\020known_extensions\030\001 \003(\0162].googl" - + "e.cloud.security.privateca.v1.Certificat" - + "eExtensionConstraints.KnownCertificateEx" - + "tensionB\003\340A\001\022P\n\025additional_extensions\030\002 " - + "\003(\0132,.google.cloud.security.privateca.v1" - + ".ObjectIdB\003\340A\001\"\300\001\n\031KnownCertificateExten" - + "sion\022+\n\'KNOWN_CERTIFICATE_EXTENSION_UNSP" - + "ECIFIED\020\000\022\022\n\016BASE_KEY_USAGE\020\001\022\026\n\022EXTENDE" - + "D_KEY_USAGE\020\002\022\016\n\nCA_OPTIONS\020\003\022\016\n\nPOLICY_" - + "IDS\020\004\022\024\n\020AIA_OCSP_SERVERS\020\005\022\024\n\020NAME_CONS" - + "TRAINTS\020\006*\207\002\n\020RevocationReason\022!\n\035REVOCA" - + "TION_REASON_UNSPECIFIED\020\000\022\022\n\016KEY_COMPROM" - + "ISE\020\001\022$\n CERTIFICATE_AUTHORITY_COMPROMIS" - + "E\020\002\022\027\n\023AFFILIATION_CHANGED\020\003\022\016\n\nSUPERSED" - + "ED\020\004\022\032\n\026CESSATION_OF_OPERATION\020\005\022\024\n\020CERT" - + "IFICATE_HOLD\020\006\022\027\n\023PRIVILEGE_WITHDRAWN\020\007\022" - + "\"\n\036ATTRIBUTE_AUTHORITY_COMPROMISE\020\010*]\n\022S" - + "ubjectRequestMode\022$\n SUBJECT_REQUEST_MOD" - + "E_UNSPECIFIED\020\000\022\013\n\007DEFAULT\020\001\022\024\n\020REFLECTE" - + "D_SPIFFE\020\002B\377\001\n&com.google.cloud.security" - + ".privateca.v1B\027PrivateCaResourcesProtoP\001" - + "ZDcloud.google.com/go/security/privateca" - + "/apiv1/privatecapb;privatecapb\370\001\001\252\002\"Goog" - + "le.Cloud.Security.PrivateCA.V1\312\002\"Google\\" - + "Cloud\\Security\\PrivateCA\\V1\352\002&Google::Cl" - + "oud::Security::PrivateCA::V1b\006proto3" + + "ption.CertificateFingerprint\032\322\002\n\022Subject" + + "Description\022<\n\007subject\030\001 \001(\0132+.google.cl" + + "oud.security.privateca.v1.Subject\022M\n\020sub" + + "ject_alt_name\030\002 \001(\01323.google.cloud.secur" + + "ity.privateca.v1.SubjectAltNames\022\031\n\021hex_" + + "serial_number\030\003 \001(\t\022+\n\010lifetime\030\004 \001(\0132\031." + + "google.protobuf.Duration\0223\n\017not_before_t" + + "ime\030\005 \001(\0132\032.google.protobuf.Timestamp\0222\n" + + "\016not_after_time\030\006 \001(\0132\032.google.protobuf." + + "Timestamp\032\034\n\005KeyId\022\023\n\006key_id\030\001 \001(\tB\003\340A\001\032" + + "-\n\026CertificateFingerprint\022\023\n\013sha256_hash" + + "\030\001 \001(\t\"\'\n\010ObjectId\022\033\n\016object_id_path\030\001 \003" + + "(\005B\003\340A\002\"\200\001\n\rX509Extension\022D\n\tobject_id\030\001" + + " \001(\0132,.google.cloud.security.privateca.v" + + "1.ObjectIdB\003\340A\002\022\025\n\010critical\030\002 \001(\010B\003\340A\001\022\022" + + "\n\005value\030\003 \001(\014B\003\340A\002\"\242\005\n\010KeyUsage\022T\n\016base_" + + "key_usage\030\001 \001(\0132<.google.cloud.security." + + "privateca.v1.KeyUsage.KeyUsageOptions\022`\n" + + "\022extended_key_usage\030\002 \001(\0132D.google.cloud" + + ".security.privateca.v1.KeyUsage.Extended" + + "KeyUsageOptions\022Q\n\033unknown_extended_key_" + + "usages\030\003 \003(\0132,.google.cloud.security.pri" + + "vateca.v1.ObjectId\032\347\001\n\017KeyUsageOptions\022\031" + + "\n\021digital_signature\030\001 \001(\010\022\032\n\022content_com" + + "mitment\030\002 \001(\010\022\030\n\020key_encipherment\030\003 \001(\010\022" + + "\031\n\021data_encipherment\030\004 \001(\010\022\025\n\rkey_agreem" + + "ent\030\005 \001(\010\022\021\n\tcert_sign\030\006 \001(\010\022\020\n\010crl_sign" + + "\030\007 \001(\010\022\025\n\rencipher_only\030\010 \001(\010\022\025\n\rdeciphe" + + "r_only\030\t \001(\010\032\240\001\n\027ExtendedKeyUsageOptions" + + "\022\023\n\013server_auth\030\001 \001(\010\022\023\n\013client_auth\030\002 \001" + + "(\010\022\024\n\014code_signing\030\003 \001(\010\022\030\n\020email_protec" + + "tion\030\004 \001(\010\022\025\n\rtime_stamping\030\005 \001(\010\022\024\n\014ocs" + + "p_signing\030\006 \001(\010\"\270\001\n\007Subject\022\023\n\013common_na" + + "me\030\001 \001(\t\022\024\n\014country_code\030\002 \001(\t\022\024\n\014organi" + + "zation\030\003 \001(\t\022\033\n\023organizational_unit\030\004 \001(" + + "\t\022\020\n\010locality\030\005 \001(\t\022\020\n\010province\030\006 \001(\t\022\026\n" + + "\016street_address\030\007 \001(\t\022\023\n\013postal_code\030\010 \001" + + "(\t\"\251\001\n\017SubjectAltNames\022\021\n\tdns_names\030\001 \003(" + + "\t\022\014\n\004uris\030\002 \003(\t\022\027\n\017email_addresses\030\003 \003(\t" + + "\022\024\n\014ip_addresses\030\004 \003(\t\022F\n\013custom_sans\030\005 " + + "\003(\01321.google.cloud.security.privateca.v1" + + ".X509Extension\"\372\001\n\036CertificateIdentityCo" + + "nstraints\022.\n\016cel_expression\030\001 \001(\0132\021.goog" + + "le.type.ExprB\003\340A\001\022+\n\031allow_subject_passt" + + "hrough\030\002 \001(\010B\003\340A\002H\000\210\001\001\0225\n#allow_subject_" + + "alt_names_passthrough\030\003 \001(\010B\003\340A\002H\001\210\001\001B\034\n" + + "\032_allow_subject_passthroughB&\n$_allow_su" + + "bject_alt_names_passthrough\"\264\003\n\037Certific" + + "ateExtensionConstraints\022|\n\020known_extensi" + + "ons\030\001 \003(\0162].google.cloud.security.privat" + + "eca.v1.CertificateExtensionConstraints.K" + + "nownCertificateExtensionB\003\340A\001\022P\n\025additio" + + "nal_extensions\030\002 \003(\0132,.google.cloud.secu" + + "rity.privateca.v1.ObjectIdB\003\340A\001\"\300\001\n\031Know" + + "nCertificateExtension\022+\n\'KNOWN_CERTIFICA" + + "TE_EXTENSION_UNSPECIFIED\020\000\022\022\n\016BASE_KEY_U" + + "SAGE\020\001\022\026\n\022EXTENDED_KEY_USAGE\020\002\022\016\n\nCA_OPT" + + "IONS\020\003\022\016\n\nPOLICY_IDS\020\004\022\024\n\020AIA_OCSP_SERVE" + + "RS\020\005\022\024\n\020NAME_CONSTRAINTS\020\006*\207\002\n\020Revocatio" + + "nReason\022!\n\035REVOCATION_REASON_UNSPECIFIED" + + "\020\000\022\022\n\016KEY_COMPROMISE\020\001\022$\n CERTIFICATE_AU" + + "THORITY_COMPROMISE\020\002\022\027\n\023AFFILIATION_CHAN" + + "GED\020\003\022\016\n\nSUPERSEDED\020\004\022\032\n\026CESSATION_OF_OP" + + "ERATION\020\005\022\024\n\020CERTIFICATE_HOLD\020\006\022\027\n\023PRIVI" + + "LEGE_WITHDRAWN\020\007\022\"\n\036ATTRIBUTE_AUTHORITY_" + + "COMPROMISE\020\010*]\n\022SubjectRequestMode\022$\n SU" + + "BJECT_REQUEST_MODE_UNSPECIFIED\020\000\022\013\n\007DEFA" + + "ULT\020\001\022\024\n\020REFLECTED_SPIFFE\020\002B\377\001\n&com.goog" + + "le.cloud.security.privateca.v1B\027PrivateC" + + "aResourcesProtoP\001ZDcloud.google.com/go/s" + + "ecurity/privateca/apiv1/privatecapb;priv" + + "atecapb\370\001\001\252\002\"Google.Cloud.Security.Priva" + + "teCA.V1\312\002\"Google\\Cloud\\Security\\PrivateC" + + "A\\V1\352\002&Google::Cloud::Security::PrivateC" + + "A::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -608,7 +613,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_security_privateca_v1_CaPool_PublishingOptions_descriptor, new java.lang.String[] { - "PublishCaCert", "PublishCrl", + "PublishCaCert", "PublishCrl", "EncodingFormat", }); internal_static_google_cloud_security_privateca_v1_CaPool_IssuancePolicy_descriptor = internal_static_google_cloud_security_privateca_v1_CaPool_descriptor diff --git a/java-security-private-ca/proto-google-cloud-security-private-ca-v1/src/main/proto/google/cloud/security/privateca/v1/resources.proto b/java-security-private-ca/proto-google-cloud-security-private-ca-v1/src/main/proto/google/cloud/security/privateca/v1/resources.proto index b1406556e78e..7588079a5bb5 100644 --- a/java-security-private-ca/proto-google-cloud-security-private-ca-v1/src/main/proto/google/cloud/security/privateca/v1/resources.proto +++ b/java-security-private-ca/proto-google-cloud-security-private-ca-v1/src/main/proto/google/cloud/security/privateca/v1/resources.proto @@ -338,6 +338,22 @@ message CaPool { // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] // in the [CaPool][google.cloud.security.privateca.v1.CaPool]. message PublishingOptions { + // Supported encoding formats for publishing. + enum EncodingFormat { + // Not specified. By default, PEM format will be used. + ENCODING_FORMAT_UNSPECIFIED = 0; + + // The + // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s + // CA certificate and CRLs will be published in PEM format. + PEM = 1; + + // The + // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s + // CA certificate and CRLs will be published in DER format. + DER = 2; + } + // Optional. When true, publishes each // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s // CA certificate and includes its URL in the "Authority Information Access" @@ -357,6 +373,12 @@ message CaPool { // days from their creation. However, we will rebuild daily. CRLs are also // rebuilt shortly after a certificate is revoked. bool publish_crl = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies the encoding format of each + // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] + // resource's CA certificate and CRLs. If this is omitted, CA certificates + // and CRLs will be published in PEM. + EncodingFormat encoding_format = 3 [(google.api.field_behavior) = OPTIONAL]; } // Defines controls over all certificate issuance within a @@ -455,9 +477,9 @@ message CaPool { // if the issuing // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] // expires before a - // [Certificate][google.cloud.security.privateca.v1.Certificate]'s requested - // maximum_lifetime, the effective lifetime will be explicitly truncated to - // match it. + // [Certificate][google.cloud.security.privateca.v1.Certificate] resource's + // requested maximum_lifetime, the effective lifetime will be explicitly + // truncated to match it. google.protobuf.Duration maximum_lifetime = 2 [(google.api.field_behavior) = OPTIONAL]; @@ -773,7 +795,7 @@ message CertificateTemplate { // Optional. The maximum lifetime allowed for issued // [Certificates][google.cloud.security.privateca.v1.Certificate] that use // this template. If the issuing - // [CaPool][google.cloud.security.privateca.v1.CaPool]'s + // [CaPool][google.cloud.security.privateca.v1.CaPool] resource's // [IssuancePolicy][google.cloud.security.privateca.v1.CaPool.IssuancePolicy] // specifies a // [maximum_lifetime][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.maximum_lifetime] @@ -1062,8 +1084,8 @@ message CertificateConfig { // Optional. When specified this provides a custom SKI to be used in the // certificate. This should only be used to maintain a SKI of an existing CA - // originally created outside CAS, which was not generated using method (1) - // described in RFC 5280 section 4.2.1.2. + // originally created outside CA service, which was not generated using method + // (1) described in RFC 5280 section 4.2.1.2. KeyId subject_key_id = 4 [(google.api.field_behavior) = OPTIONAL]; } diff --git a/java-security-private-ca/proto-google-cloud-security-private-ca-v1/src/main/proto/google/cloud/security/privateca/v1/service.proto b/java-security-private-ca/proto-google-cloud-security-private-ca-v1/src/main/proto/google/cloud/security/privateca/v1/service.proto index 40710af562da..1cd12c1e0199 100644 --- a/java-security-private-ca/proto-google-cloud-security-private-ca-v1/src/main/proto/google/cloud/security/privateca/v1/service.proto +++ b/java-security-private-ca/proto-google-cloud-security-private-ca-v1/src/main/proto/google/cloud/security/privateca/v1/service.proto @@ -301,7 +301,7 @@ service CertificateAuthorityService { // FetchCaCerts returns the current trust anchor for the // [CaPool][google.cloud.security.privateca.v1.CaPool]. This will include CA - // certificate chains for all Certificate Authorities in the ENABLED, + // certificate chains for all certificate authorities in the ENABLED, // DISABLED, or STAGED states. rpc FetchCaCerts(FetchCaCertsRequest) returns (FetchCaCertsResponse) { option (google.api.http) = { @@ -723,7 +723,7 @@ message DisableCertificateAuthorityRequest { // Optional. This field allows this CA to be disabled even if it's being // depended on by another resource. However, doing so may result in unintended - // and unrecoverable effects on any dependent resource(s) since the CA will + // and unrecoverable effects on any dependent resources since the CA will // no longer be able to issue certificates. bool ignore_dependent_resources = 3 [(google.api.field_behavior) = OPTIONAL]; } @@ -910,9 +910,9 @@ message DeleteCertificateAuthorityRequest { // been allowed. If you proceed, there will be no way to recover this CA. bool skip_grace_period = 5 [(google.api.field_behavior) = OPTIONAL]; - // Optional. This field allows this ca to be deleted even if it's being + // Optional. This field allows this CA to be deleted even if it's being // depended on by another resource. However, doing so may result in unintended - // and unrecoverable effects on any dependent resource(s) since the CA will + // and unrecoverable effects on any dependent resources since the CA will // no longer be able to issue certificates. bool ignore_dependent_resources = 6 [(google.api.field_behavior) = OPTIONAL]; } @@ -1040,7 +1040,7 @@ message DeleteCaPoolRequest { // Optional. This field allows this pool to be deleted even if it's being // depended on by another resource. However, doing so may result in unintended - // and unrecoverable effects on any dependent resource(s) since the pool will + // and unrecoverable effects on any dependent resources since the pool will // no longer be able to issue certificates. bool ignore_dependent_resources = 4 [(google.api.field_behavior) = OPTIONAL]; } @@ -1082,7 +1082,7 @@ message FetchCaCertsResponse { repeated string certificates = 1; } - // The PEM encoded CA certificate chains of all Certificate Authorities in + // The PEM encoded CA certificate chains of all certificate authorities in // this [CaPool][google.cloud.security.privateca.v1.CaPool] in the ENABLED, // DISABLED, or STAGED states. repeated CertChain ca_certs = 1; diff --git a/java-securitycenter-settings/README.md b/java-securitycenter-settings/README.md index 7a966a433b40..d54e00aec001 100644 --- a/java-securitycenter-settings/README.md +++ b/java-securitycenter-settings/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -201,7 +201,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-securitycenter-settings.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-securitycenter-settings/0.41.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-securitycenter-settings/0.44.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-securitycenter/README.md b/java-securitycenter/README.md index 22ba6f03da1c..49a79b0d5f54 100644 --- a/java-securitycenter/README.md +++ b/java-securitycenter/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.34.0 + 26.37.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-securitycenter.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-securitycenter/2.46.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-securitycenter/2.49.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-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/SecurityMarks.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/SecurityMarks.java index e045610c24d0..1898a3a29e38 100644 --- a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/SecurityMarks.java +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/SecurityMarks.java @@ -286,21 +286,21 @@ public java.lang.String getMarksOrThrow(java.lang.String key) { *
    * The canonical name of the marks. The following list shows some examples:
    *
-   * + `organizations/{organization_id}/assets/{asset_id}/securityMarks"
+   * + `organizations/{organization_id}/assets/{asset_id}/securityMarks`
    * +
-   * `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks"
+   * `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks`
    * +
-   * `organizations/{organization_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks"
-   * + `folders/{folder_id}/assets/{asset_id}/securityMarks"
+   * `organizations/{organization_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks`
+   * + `folders/{folder_id}/assets/{asset_id}/securityMarks`
    * +
-   * `folders/{folder_id}/sources/{source_id}/findings/{finding_id}/securityMarks"
+   * `folders/{folder_id}/sources/{source_id}/findings/{finding_id}/securityMarks`
    * +
-   * `folders/{folder_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks"
-   * + `projects/{project_number}/assets/{asset_id}/securityMarks"
+   * `folders/{folder_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks`
+   * + `projects/{project_number}/assets/{asset_id}/securityMarks`
    * +
-   * `projects/{project_number}/sources/{source_id}/findings/{finding_id}/securityMarks"
+   * `projects/{project_number}/sources/{source_id}/findings/{finding_id}/securityMarks`
    * +
-   * `projects/{project_number}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks"
+   * `projects/{project_number}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks`
    * 
* * string canonical_name = 3; @@ -325,21 +325,21 @@ public java.lang.String getCanonicalName() { *
    * The canonical name of the marks. The following list shows some examples:
    *
-   * + `organizations/{organization_id}/assets/{asset_id}/securityMarks"
+   * + `organizations/{organization_id}/assets/{asset_id}/securityMarks`
    * +
-   * `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks"
+   * `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks`
    * +
-   * `organizations/{organization_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks"
-   * + `folders/{folder_id}/assets/{asset_id}/securityMarks"
+   * `organizations/{organization_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks`
+   * + `folders/{folder_id}/assets/{asset_id}/securityMarks`
    * +
-   * `folders/{folder_id}/sources/{source_id}/findings/{finding_id}/securityMarks"
+   * `folders/{folder_id}/sources/{source_id}/findings/{finding_id}/securityMarks`
    * +
-   * `folders/{folder_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks"
-   * + `projects/{project_number}/assets/{asset_id}/securityMarks"
+   * `folders/{folder_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks`
+   * + `projects/{project_number}/assets/{asset_id}/securityMarks`
    * +
-   * `projects/{project_number}/sources/{source_id}/findings/{finding_id}/securityMarks"
+   * `projects/{project_number}/sources/{source_id}/findings/{finding_id}/securityMarks`
    * +
-   * `projects/{project_number}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks"
+   * `projects/{project_number}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks`
    * 
* * string canonical_name = 3; @@ -1148,21 +1148,21 @@ public Builder putAllMarks(java.util.Map val *
      * The canonical name of the marks. The following list shows some examples:
      *
-     * + `organizations/{organization_id}/assets/{asset_id}/securityMarks"
+     * + `organizations/{organization_id}/assets/{asset_id}/securityMarks`
      * +
-     * `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks"
+     * `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks`
      * +
-     * `organizations/{organization_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks"
-     * + `folders/{folder_id}/assets/{asset_id}/securityMarks"
+     * `organizations/{organization_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks`
+     * + `folders/{folder_id}/assets/{asset_id}/securityMarks`
      * +
-     * `folders/{folder_id}/sources/{source_id}/findings/{finding_id}/securityMarks"
+     * `folders/{folder_id}/sources/{source_id}/findings/{finding_id}/securityMarks`
      * +
-     * `folders/{folder_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks"
-     * + `projects/{project_number}/assets/{asset_id}/securityMarks"
+     * `folders/{folder_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks`
+     * + `projects/{project_number}/assets/{asset_id}/securityMarks`
      * +
-     * `projects/{project_number}/sources/{source_id}/findings/{finding_id}/securityMarks"
+     * `projects/{project_number}/sources/{source_id}/findings/{finding_id}/securityMarks`
      * +
-     * `projects/{project_number}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks"
+     * `projects/{project_number}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks`
      * 
* * string canonical_name = 3; @@ -1186,21 +1186,21 @@ public java.lang.String getCanonicalName() { *
      * The canonical name of the marks. The following list shows some examples:
      *
-     * + `organizations/{organization_id}/assets/{asset_id}/securityMarks"
+     * + `organizations/{organization_id}/assets/{asset_id}/securityMarks`
      * +
-     * `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks"
+     * `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks`
      * +
-     * `organizations/{organization_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks"
-     * + `folders/{folder_id}/assets/{asset_id}/securityMarks"
+     * `organizations/{organization_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks`
+     * + `folders/{folder_id}/assets/{asset_id}/securityMarks`
      * +
-     * `folders/{folder_id}/sources/{source_id}/findings/{finding_id}/securityMarks"
+     * `folders/{folder_id}/sources/{source_id}/findings/{finding_id}/securityMarks`
      * +
-     * `folders/{folder_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks"
-     * + `projects/{project_number}/assets/{asset_id}/securityMarks"
+     * `folders/{folder_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks`
+     * + `projects/{project_number}/assets/{asset_id}/securityMarks`
      * +
-     * `projects/{project_number}/sources/{source_id}/findings/{finding_id}/securityMarks"
+     * `projects/{project_number}/sources/{source_id}/findings/{finding_id}/securityMarks`
      * +
-     * `projects/{project_number}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks"
+     * `projects/{project_number}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks`
      * 
* * string canonical_name = 3; @@ -1224,21 +1224,21 @@ public com.google.protobuf.ByteString getCanonicalNameBytes() { *
      * The canonical name of the marks. The following list shows some examples:
      *
-     * + `organizations/{organization_id}/assets/{asset_id}/securityMarks"
+     * + `organizations/{organization_id}/assets/{asset_id}/securityMarks`
      * +
-     * `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks"
+     * `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks`
      * +
-     * `organizations/{organization_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks"
-     * + `folders/{folder_id}/assets/{asset_id}/securityMarks"
+     * `organizations/{organization_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks`
+     * + `folders/{folder_id}/assets/{asset_id}/securityMarks`
      * +
-     * `folders/{folder_id}/sources/{source_id}/findings/{finding_id}/securityMarks"
+     * `folders/{folder_id}/sources/{source_id}/findings/{finding_id}/securityMarks`
      * +
-     * `folders/{folder_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks"
-     * + `projects/{project_number}/assets/{asset_id}/securityMarks"
+     * `folders/{folder_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks`
+     * + `projects/{project_number}/assets/{asset_id}/securityMarks`
      * +
-     * `projects/{project_number}/sources/{source_id}/findings/{finding_id}/securityMarks"
+     * `projects/{project_number}/sources/{source_id}/findings/{finding_id}/securityMarks`
      * +
-     * `projects/{project_number}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks"
+     * `projects/{project_number}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks`
      * 
* * string canonical_name = 3; @@ -1261,21 +1261,21 @@ public Builder setCanonicalName(java.lang.String value) { *
      * The canonical name of the marks. The following list shows some examples:
      *
-     * + `organizations/{organization_id}/assets/{asset_id}/securityMarks"
+     * + `organizations/{organization_id}/assets/{asset_id}/securityMarks`
      * +
-     * `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks"
+     * `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks`
      * +
-     * `organizations/{organization_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks"
-     * + `folders/{folder_id}/assets/{asset_id}/securityMarks"
+     * `organizations/{organization_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks`
+     * + `folders/{folder_id}/assets/{asset_id}/securityMarks`
      * +
-     * `folders/{folder_id}/sources/{source_id}/findings/{finding_id}/securityMarks"
+     * `folders/{folder_id}/sources/{source_id}/findings/{finding_id}/securityMarks`
      * +
-     * `folders/{folder_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks"
-     * + `projects/{project_number}/assets/{asset_id}/securityMarks"
+     * `folders/{folder_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks`
+     * + `projects/{project_number}/assets/{asset_id}/securityMarks`
      * +
-     * `projects/{project_number}/sources/{source_id}/findings/{finding_id}/securityMarks"
+     * `projects/{project_number}/sources/{source_id}/findings/{finding_id}/securityMarks`
      * +
-     * `projects/{project_number}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks"
+     * `projects/{project_number}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks`
      * 
* * string canonical_name = 3; @@ -1294,21 +1294,21 @@ public Builder clearCanonicalName() { *
      * The canonical name of the marks. The following list shows some examples:
      *
-     * + `organizations/{organization_id}/assets/{asset_id}/securityMarks"
+     * + `organizations/{organization_id}/assets/{asset_id}/securityMarks`
      * +
-     * `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks"
+     * `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks`
      * +
-     * `organizations/{organization_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks"
-     * + `folders/{folder_id}/assets/{asset_id}/securityMarks"
+     * `organizations/{organization_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks`
+     * + `folders/{folder_id}/assets/{asset_id}/securityMarks`
      * +
-     * `folders/{folder_id}/sources/{source_id}/findings/{finding_id}/securityMarks"
+     * `folders/{folder_id}/sources/{source_id}/findings/{finding_id}/securityMarks`
      * +
-     * `folders/{folder_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks"
-     * + `projects/{project_number}/assets/{asset_id}/securityMarks"
+     * `folders/{folder_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks`
+     * + `projects/{project_number}/assets/{asset_id}/securityMarks`
      * +
-     * `projects/{project_number}/sources/{source_id}/findings/{finding_id}/securityMarks"
+     * `projects/{project_number}/sources/{source_id}/findings/{finding_id}/securityMarks`
      * +
-     * `projects/{project_number}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks"
+     * `projects/{project_number}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks`
      * 
* * string canonical_name = 3; diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/SecurityMarksOrBuilder.java b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/SecurityMarksOrBuilder.java index 497b9621ca6f..4935601cffe9 100644 --- a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/SecurityMarksOrBuilder.java +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/java/com/google/cloud/securitycenter/v2/SecurityMarksOrBuilder.java @@ -164,21 +164,21 @@ java.lang.String getMarksOrDefault( *
    * The canonical name of the marks. The following list shows some examples:
    *
-   * + `organizations/{organization_id}/assets/{asset_id}/securityMarks"
+   * + `organizations/{organization_id}/assets/{asset_id}/securityMarks`
    * +
-   * `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks"
+   * `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks`
    * +
-   * `organizations/{organization_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks"
-   * + `folders/{folder_id}/assets/{asset_id}/securityMarks"
+   * `organizations/{organization_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks`
+   * + `folders/{folder_id}/assets/{asset_id}/securityMarks`
    * +
-   * `folders/{folder_id}/sources/{source_id}/findings/{finding_id}/securityMarks"
+   * `folders/{folder_id}/sources/{source_id}/findings/{finding_id}/securityMarks`
    * +
-   * `folders/{folder_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks"
-   * + `projects/{project_number}/assets/{asset_id}/securityMarks"
+   * `folders/{folder_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks`
+   * + `projects/{project_number}/assets/{asset_id}/securityMarks`
    * +
-   * `projects/{project_number}/sources/{source_id}/findings/{finding_id}/securityMarks"
+   * `projects/{project_number}/sources/{source_id}/findings/{finding_id}/securityMarks`
    * +
-   * `projects/{project_number}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks"
+   * `projects/{project_number}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks`
    * 
* * string canonical_name = 3; @@ -192,21 +192,21 @@ java.lang.String getMarksOrDefault( *
    * The canonical name of the marks. The following list shows some examples:
    *
-   * + `organizations/{organization_id}/assets/{asset_id}/securityMarks"
+   * + `organizations/{organization_id}/assets/{asset_id}/securityMarks`
    * +
-   * `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks"
+   * `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks`
    * +
-   * `organizations/{organization_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks"
-   * + `folders/{folder_id}/assets/{asset_id}/securityMarks"
+   * `organizations/{organization_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks`
+   * + `folders/{folder_id}/assets/{asset_id}/securityMarks`
    * +
-   * `folders/{folder_id}/sources/{source_id}/findings/{finding_id}/securityMarks"
+   * `folders/{folder_id}/sources/{source_id}/findings/{finding_id}/securityMarks`
    * +
-   * `folders/{folder_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks"
-   * + `projects/{project_number}/assets/{asset_id}/securityMarks"
+   * `folders/{folder_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks`
+   * + `projects/{project_number}/assets/{asset_id}/securityMarks`
    * +
-   * `projects/{project_number}/sources/{source_id}/findings/{finding_id}/securityMarks"
+   * `projects/{project_number}/sources/{source_id}/findings/{finding_id}/securityMarks`
    * +
-   * `projects/{project_number}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks"
+   * `projects/{project_number}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks`
    * 
* * string canonical_name = 3; diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/proto/google/cloud/securitycenter/v2/security_marks.proto b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/proto/google/cloud/securitycenter/v2/security_marks.proto index 08b02e5c04d4..2621cd6e0834 100644 --- a/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/proto/google/cloud/securitycenter/v2/security_marks.proto +++ b/java-securitycenter/proto-google-cloud-securitycenter-v2/src/main/proto/google/cloud/securitycenter/v2/security_marks.proto @@ -67,20 +67,20 @@ message SecurityMarks { // The canonical name of the marks. The following list shows some examples: // - // + `organizations/{organization_id}/assets/{asset_id}/securityMarks" + // + `organizations/{organization_id}/assets/{asset_id}/securityMarks` // + - // `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks" + // `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks` // + - // `organizations/{organization_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks" - // + `folders/{folder_id}/assets/{asset_id}/securityMarks" + // `organizations/{organization_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks` + // + `folders/{folder_id}/assets/{asset_id}/securityMarks` // + - // `folders/{folder_id}/sources/{source_id}/findings/{finding_id}/securityMarks" + // `folders/{folder_id}/sources/{source_id}/findings/{finding_id}/securityMarks` // + - // `folders/{folder_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks" - // + `projects/{project_number}/assets/{asset_id}/securityMarks" + // `folders/{folder_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks` + // + `projects/{project_number}/assets/{asset_id}/securityMarks` // + - // `projects/{project_number}/sources/{source_id}/findings/{finding_id}/securityMarks" + // `projects/{project_number}/sources/{source_id}/findings/{finding_id}/securityMarks` // + - // `projects/{project_number}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks" + // `projects/{project_number}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks` string canonical_name = 3; } diff --git a/java-securitycentermanagement/README.md b/java-securitycentermanagement/README.md index 88df13e3d38b..434f382c7b1d 100644 --- a/java-securitycentermanagement/README.md +++ b/java-securitycentermanagement/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -201,7 +201,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-securitycentermanagement.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-securitycentermanagement/0.6.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-securitycentermanagement/0.9.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-securityposture/README.md b/java-securityposture/README.md index 4ba45b468e5e..c58f3289093f 100644 --- a/java-securityposture/README.md +++ b/java-securityposture/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -201,7 +201,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-securityposture.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-securityposture/0.3.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-securityposture/0.6.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-service-control/README.md b/java-service-control/README.md index d93592808980..e6f1b9120cb9 100644 --- a/java-service-control/README.md +++ b/java-service-control/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.34.0 + 26.37.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-service-control.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-service-control/1.38.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-service-control/1.41.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-service-management/README.md b/java-service-management/README.md index cb79f2cdb51e..8012f0e440e9 100644 --- a/java-service-management/README.md +++ b/java-service-management/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.34.0 + 26.37.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-service-management.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-service-management/3.36.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-service-management/3.39.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-service-usage/README.md b/java-service-usage/README.md index 2aef4119d590..cffe582205bf 100644 --- a/java-service-usage/README.md +++ b/java-service-usage/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.34.0 + 26.37.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-service-usage.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-service-usage/2.38.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-service-usage/2.41.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-servicedirectory/README.md b/java-servicedirectory/README.md index cd6639cefecb..cbc53385f428 100644 --- a/java-servicedirectory/README.md +++ b/java-servicedirectory/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.34.0 + 26.37.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-servicedirectory.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-servicedirectory/2.39.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-servicedirectory/2.42.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-servicehealth/README.md b/java-servicehealth/README.md index 1b087c301971..fbee39e658cd 100644 --- a/java-servicehealth/README.md +++ b/java-servicehealth/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -201,7 +201,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-servicehealth.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-servicehealth/0.5.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-servicehealth/0.8.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-shell/README.md b/java-shell/README.md index 1680ebbf8fa5..e3bb15f6177c 100644 --- a/java-shell/README.md +++ b/java-shell/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.34.0 + 26.37.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-shell.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-shell/2.37.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-shell/2.40.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-shopping-css/README.md b/java-shopping-css/README.md index 8998ab72866e..b0cfc0925a9b 100644 --- a/java-shopping-css/README.md +++ b/java-shopping-css/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -201,7 +201,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.shopping/google-shopping-css.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.shopping/google-shopping-css/0.6.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.shopping/google-shopping-css/0.9.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-shopping-merchant-inventories/README.md b/java-shopping-merchant-inventories/README.md index 4b7631ec17a5..6f1110604ead 100644 --- a/java-shopping-merchant-inventories/README.md +++ b/java-shopping-merchant-inventories/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -201,7 +201,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.shopping/google-shopping-merchant-inventories.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.shopping/google-shopping-merchant-inventories/0.14.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.shopping/google-shopping-merchant-inventories/0.17.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-shopping-merchant-quota/README.md b/java-shopping-merchant-quota/README.md index 3d8b5b8759ae..91c453588e94 100644 --- a/java-shopping-merchant-quota/README.md +++ b/java-shopping-merchant-quota/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -201,7 +201,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.shopping/google-shopping-merchant-quota.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.shopping/google-shopping-merchant-quota/0.1.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.shopping/google-shopping-merchant-quota/0.4.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-shopping-merchant-reports/README.md b/java-shopping-merchant-reports/README.md index dd26b5e28994..b8a8555e3620 100644 --- a/java-shopping-merchant-reports/README.md +++ b/java-shopping-merchant-reports/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -201,7 +201,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.shopping/google-shopping-merchant-reports.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.shopping/google-shopping-merchant-reports/0.14.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.shopping/google-shopping-merchant-reports/0.17.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-speech/README.md b/java-speech/README.md index be1ee87ed33b..df8630a5988d 100644 --- a/java-speech/README.md +++ b/java-speech/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.36.0 + 26.37.0 pom import @@ -231,7 +231,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-speech.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-speech/4.35.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-speech/4.36.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-storage-transfer/README.md b/java-storage-transfer/README.md index 76d8df96407b..fbe2aa19faa2 100644 --- a/java-storage-transfer/README.md +++ b/java-storage-transfer/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.34.0 + 26.37.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-storage-transfer.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-storage-transfer/1.38.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-storage-transfer/1.41.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-storageinsights/README.md b/java-storageinsights/README.md index 8e2e2341020e..a652dd727780 100644 --- a/java-storageinsights/README.md +++ b/java-storageinsights/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -201,7 +201,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-storageinsights.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-storageinsights/0.23.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-storageinsights/0.26.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-talent/README.md b/java-talent/README.md index 940944c6e7e2..e88b5d87f2b6 100644 --- a/java-talent/README.md +++ b/java-talent/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.34.0 + 26.37.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-talent.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-talent/2.39.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-talent/2.42.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-tasks/README.md b/java-tasks/README.md index 323b710261ce..69c1846b310c 100644 --- a/java-tasks/README.md +++ b/java-tasks/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.34.0 + 26.37.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-tasks.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-tasks/2.38.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-tasks/2.41.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-telcoautomation/README.md b/java-telcoautomation/README.md index 3f607b3e8397..f4fa39b3085b 100644 --- a/java-telcoautomation/README.md +++ b/java-telcoautomation/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -201,7 +201,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-telcoautomation.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-telcoautomation/0.8.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-telcoautomation/0.11.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-texttospeech/README.md b/java-texttospeech/README.md index 1d99564b99bb..eed78f6b02b2 100644 --- a/java-texttospeech/README.md +++ b/java-texttospeech/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.34.0 + 26.37.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-texttospeech.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-texttospeech/2.39.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-texttospeech/2.42.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-tpu/README.md b/java-tpu/README.md index 4ea75806f098..52efd44e1a86 100644 --- a/java-tpu/README.md +++ b/java-tpu/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.34.0 + 26.37.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-tpu.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-tpu/2.39.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-tpu/2.42.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-trace/README.md b/java-trace/README.md index 811d93fd5309..04feb72130b9 100644 --- a/java-trace/README.md +++ b/java-trace/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.34.0 + 26.37.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-trace.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-trace/2.38.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-trace/2.41.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-translate/README.md b/java-translate/README.md index d08a4770dc5f..02f139ccc08d 100644 --- a/java-translate/README.md +++ b/java-translate/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.34.0 + 26.37.0 pom import @@ -272,7 +272,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-translate.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-translate/2.38.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-translate/2.41.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-video-intelligence/README.md b/java-video-intelligence/README.md index 3c982bb2c4a5..b990a805b6a2 100644 --- a/java-video-intelligence/README.md +++ b/java-video-intelligence/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.34.0 + 26.37.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-video-intelligence.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-video-intelligence/2.37.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-video-intelligence/2.40.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-video-live-stream/README.md b/java-video-live-stream/README.md index 4b1b58cd7e2b..e7d714a8c6e5 100644 --- a/java-video-live-stream/README.md +++ b/java-video-live-stream/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -201,7 +201,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-live-stream.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-live-stream/0.40.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-live-stream/0.43.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-video-stitcher/README.md b/java-video-stitcher/README.md index 6f5ad0da35fc..968613aeed0e 100644 --- a/java-video-stitcher/README.md +++ b/java-video-stitcher/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -201,7 +201,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-video-stitcher.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-video-stitcher/0.38.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-video-stitcher/0.41.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-video-transcoder/README.md b/java-video-transcoder/README.md index 0832da847c22..a227ea36d39b 100644 --- a/java-video-transcoder/README.md +++ b/java-video-transcoder/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.34.0 + 26.37.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-video-transcoder.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-video-transcoder/1.37.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-video-transcoder/1.40.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-vision/README.md b/java-vision/README.md index 0ca6b4fb117f..d1da31b35717 100644 --- a/java-vision/README.md +++ b/java-vision/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.34.0 + 26.37.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-vision.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-vision/3.36.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-vision/3.39.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-vmmigration/README.md b/java-vmmigration/README.md index 895f0861c463..a1e4082a98f5 100644 --- a/java-vmmigration/README.md +++ b/java-vmmigration/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.34.0 + 26.37.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-vmmigration.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-vmmigration/1.38.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-vmmigration/1.41.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-vmwareengine/README.md b/java-vmwareengine/README.md index 5551d536f3a5..b634f9d49d0c 100644 --- a/java-vmwareengine/README.md +++ b/java-vmwareengine/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -201,7 +201,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-vmwareengine.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-vmwareengine/0.32.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-vmwareengine/0.35.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-vpcaccess/README.md b/java-vpcaccess/README.md index bf7179bde8e8..45b5e80a9eee 100644 --- a/java-vpcaccess/README.md +++ b/java-vpcaccess/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.34.0 + 26.37.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-vpcaccess.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-vpcaccess/2.39.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-vpcaccess/2.42.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-webrisk/README.md b/java-webrisk/README.md index 036fd7abb084..d509f6b62350 100644 --- a/java-webrisk/README.md +++ b/java-webrisk/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.34.0 + 26.37.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-webrisk.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-webrisk/2.37.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-webrisk/2.40.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-websecurityscanner/README.md b/java-websecurityscanner/README.md index 7affc34e7f07..8e93fd86a850 100644 --- a/java-websecurityscanner/README.md +++ b/java-websecurityscanner/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.34.0 + 26.37.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-websecurityscanner.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-websecurityscanner/2.38.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-websecurityscanner/2.41.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-workflow-executions/README.md b/java-workflow-executions/README.md index e9c4362bb9d9..663b49684e9f 100644 --- a/java-workflow-executions/README.md +++ b/java-workflow-executions/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.34.0 + 26.37.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-workflow-executions.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-workflow-executions/2.38.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-workflow-executions/2.41.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-workflows/README.md b/java-workflows/README.md index 05960d13ab0e..ed64059bc0d4 100644 --- a/java-workflows/README.md +++ b/java-workflows/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.34.0 + 26.37.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-workflows.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-workflows/2.38.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-workflows/2.41.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-workspaceevents/README.md b/java-workspaceevents/README.md index 6087f89a6d85..f1d237fa335f 100644 --- a/java-workspaceevents/README.md +++ b/java-workspaceevents/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -201,7 +201,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-workspaceevents.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-workspaceevents/0.2.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-workspaceevents/0.5.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-workstations/README.md b/java-workstations/README.md index 3b7bada2baed..ab8e795c650f 100644 --- a/java-workstations/README.md +++ b/java-workstations/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.34.0 + 26.37.0 pom import @@ -201,7 +201,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-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-workstations.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-workstations/0.26.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-workstations/0.29.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